]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
libpng: New package.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Feb 2010 20:51:49 +0000 (21:51 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Feb 2010 20:51:49 +0000 (21:51 +0100)
pkgs/core/libpng/libpng.nm [new file with mode: 0644]
pkgs/core/libpng/patches/libpng-1.2.39-pngconf.patch [new file with mode: 0644]

diff --git a/pkgs/core/libpng/libpng.nm b/pkgs/core/libpng/libpng.nm
new file mode 100644 (file)
index 0000000..93d222a
--- /dev/null
@@ -0,0 +1,48 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt                 #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include $(PKGROOT)/Include
+
+PKG_NAME       = libpng
+PKG_VER        = 1.2.39
+PKG_REL        = 0
+
+PKG_MAINTAINER =
+PKG_GROUP      = System/Libraries
+PKG_URL        = http://www.libpng.org/pub/png/
+PKG_LICENSE    = zlib
+PKG_SUMMARY    = A library of functions for manipulating PNG image format files.
+
+PKG_BUILD_DEPS+= pkg-config
+PKG_DEPS      += zlib
+
+define PKG_DESCRIPTION
+       The libpng package contains a library of functions for creating and \
+       manipulating PNG (Portable Network Graphics) image format files. \
+       PNG is a bit-mapped graphics format similar to the GIF format. PNG \
+       was created to replace the GIF format, since GIF uses a patented \
+       data compression algorithm.
+endef
+
+PKG_TARBALL    = $(THISAPP).tar.bz2
diff --git a/pkgs/core/libpng/patches/libpng-1.2.39-pngconf.patch b/pkgs/core/libpng/patches/libpng-1.2.39-pngconf.patch
new file mode 100644 (file)
index 0000000..dbaadcb
--- /dev/null
@@ -0,0 +1,42 @@
+diff -Naur libpng-1.2.29.orig/configure.ac libpng-1.2.29/configure.ac
+--- libpng-1.2.29.orig/configure.ac    2008-05-08 07:58:11.000000000 -0400
++++ libpng-1.2.29/configure.ac 2008-05-31 20:21:12.000000000 -0400
+@@ -63,7 +63,8 @@
+ AC_MSG_CHECKING(
+   [if assembler code in pnggccrd.c can be compiled without PNG_NO_MMX_CODE])
+ AC_TRY_COMPILE(
+-  [#include "$srcdir/pnggccrd.c"],
++  [#define PNG_CONFIGURE_LIBPNG
++   #include "$srcdir/pnggccrd.c"],
+   [return 0;],
+   AC_MSG_RESULT(yes)
+   LIBPNG_NO_MMX="",
+diff -Naur libpng-1.2.29.orig/pngconf.h libpng-1.2.29/pngconf.h
+--- libpng-1.2.29.orig/pngconf.h       2008-05-08 07:58:03.000000000 -0400
++++ libpng-1.2.29/pngconf.h    2008-05-31 20:21:12.000000000 -0400
+@@ -35,6 +35,25 @@
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
++#else
++/* pngconf.h is part of the exported API. When a libpng-using application
++   includes us, PNG_CONFIGURE_LIBPNG is of course not defined as we do not have
++   libpng's config.h available in this case. This means that we do not have the
++   defines added to config.h and the commandline by libpng's ./configure .
++   
++   For all defines from config.h not having them set is not a problem, however
++   ./configure also adds -DPNG_NO_ASSEMBLER_CODE to the CFLAGS when compiling
++   on a platform on which the MMX and SSE asm code in libpng is not supported.
++   
++   We do need this define as this define is used to determine whether or not
++   to define PNG_ASSEMBLER_CODE_SUPPORTED and other assembler related defines
++   and prototypes. PNG_ASSEMBLER_CODE_SUPPORTED in turn is used by applications
++   (ImageMagick for example) to determine whether or not they can use the asm
++   functions. Thus we need to define PNG_NO_ASSEMBLER_CODE here on platforms
++   on which the MMX and SSE asm code in libpng is not supported: */
++#ifndef __i386__ /* change this if MMX/SSE become supported on x86_64! */
++#define PNG_NO_ASSEMBLER_CODE
++#endif
+ #endif
+ /*