[90887] trunk/dports/graphics/libpixman

ryandesign at macports.org ryandesign at macports.org
Fri Mar 16 23:06:25 PDT 2012


Revision: 90887
          https://trac.macports.org/changeset/90887
Author:   ryandesign at macports.org
Date:     2012-03-16 23:06:25 -0700 (Fri, 16 Mar 2012)
Log Message:
-----------
libpixman: avoid pkgconfig and autoconf requirement for excluding libpng; see #33563

Modified Paths:
--------------
    trunk/dports/graphics/libpixman/Portfile

Added Paths:
-----------
    trunk/dports/graphics/libpixman/files/patch-configure.diff

Removed Paths:
-------------
    trunk/dports/graphics/libpixman/files/0001-configure.ac-Add-an-enable-libpng-option.patch

Modified: trunk/dports/graphics/libpixman/Portfile
===================================================================
--- trunk/dports/graphics/libpixman/Portfile	2012-03-17 06:05:29 UTC (rev 90886)
+++ trunk/dports/graphics/libpixman/Portfile	2012-03-17 06:06:25 UTC (rev 90887)
@@ -28,14 +28,9 @@
 checksums               rmd160  1df92f83b0b944e8a493a8cdf6318ebc6e778914 \
                         sha256  5f4b384aa39e82a582bdc8835e2e81b28176db851dd1f7ff32d682d026a23bb5
 
-
 # remove when updating libpixman to 0.26.x
-patch.pre_args          -p1
-patchfiles-append       0001-configure.ac-Add-an-enable-libpng-option.patch
-use_autoreconf          yes
-# end of stuff to remove
+patchfiles-append       patch-configure.diff
 
-
 # llvm-gcc-4.2 makes cairo fail to generate PDFs properly
 if {${configure.compiler} == "llvm-gcc-4.2"} {
     if {[vercmp $xcodeversion 4.1] >= 0} {

Deleted: trunk/dports/graphics/libpixman/files/0001-configure.ac-Add-an-enable-libpng-option.patch
===================================================================
--- trunk/dports/graphics/libpixman/files/0001-configure.ac-Add-an-enable-libpng-option.patch	2012-03-17 06:05:29 UTC (rev 90886)
+++ trunk/dports/graphics/libpixman/files/0001-configure.ac-Add-an-enable-libpng-option.patch	2012-03-17 06:06:25 UTC (rev 90887)
@@ -1,35 +0,0 @@
-From 60b668768618c02312d247028f651b65296ac9a6 Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Sat, 11 Feb 2012 01:04:13 -0800
-Subject: [PATCH 1/2] configure.ac: Add an --enable-libpng option
-
-Now there is a way to not link against libpng even if it's available.
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
----
- configure.ac |    9 ++++++++-
- 1 files changed, 8 insertions(+), 1 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2eded70..54c8fb9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -855,7 +855,14 @@ AC_SUBST(TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR)
- dnl ==================
- dnl libpng
- 
--PKG_CHECK_MODULES(PNG, [libpng], have_libpng=yes, have_libpng=no)
-+AC_ARG_ENABLE(libpng, AS_HELP_STRING([--enable-libpng], [Build support for libpng (default: auto)]),
-+                      [have_libpng=$enableval], [have_libpng=auto])
-+
-+case x$have_libpng in
-+	xyes) PKG_CHECK_MODULES(PNG, [libpng]) ;;
-+	xno) ;;
-+	*) PKG_CHECK_MODULES(PNG, [libpng], have_libpng=yes, have_libpng=no) ;;
-+esac
- 
- if test x$have_libpng = xyes; then
-     AC_DEFINE([HAVE_LIBPNG], [1], [Whether we have libpng])
--- 
-1.7.9
-

Added: trunk/dports/graphics/libpixman/files/patch-configure.diff
===================================================================
--- trunk/dports/graphics/libpixman/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/graphics/libpixman/files/patch-configure.diff	2012-03-17 06:06:25 UTC (rev 90887)
@@ -0,0 +1,155 @@
+--- configure.orig	2012-02-08 18:03:41.000000000 -0600
++++ configure	2012-03-17 00:55:43.000000000 -0500
+@@ -971,6 +971,7 @@
+ enable_static_testprogs
+ enable_timers
+ enable_gtk
++enable_libpng
+ '
+       ac_precious_vars='build_alias
+ host_alias
+@@ -1646,6 +1647,7 @@
+                           build test programs as static binaries [default=no]
+   --enable-timers         enable TIMER_BEGIN and TIMER_END macros [default=no]
+   --enable-gtk            enable tests using GTK+ [default=auto]
++  --enable-libpng         Build support for libpng (default: auto)
+ 
+ Optional Packages:
+   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+@@ -24876,7 +24878,126 @@
+ 
+ 
+ 
++# Check whether --enable-libpng was given.
++if test "${enable_libpng+set}" = set; then
++  enableval=$enable_libpng; have_libpng=$enableval
++else
++  have_libpng=auto
++fi
+ 
++
++case x$have_libpng in
++	xyes)
++pkg_failed=no
++{ $as_echo "$as_me:$LINENO: checking for PNG" >&5
++$as_echo_n "checking for PNG... " >&6; }
++
++if test -n "$PNG_CFLAGS"; then
++    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++    if test -n "$PKG_CONFIG" && \
++    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpng\"") >&5
++  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); }; then
++  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
++else
++  pkg_failed=yes
++fi
++ else
++    pkg_failed=untried
++fi
++if test -n "$PNG_LIBS"; then
++    pkg_cv_PNG_LIBS="$PNG_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++    if test -n "$PKG_CONFIG" && \
++    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpng\"") >&5
++  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); }; then
++  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
++else
++  pkg_failed=yes
++fi
++ else
++    pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++        _pkg_short_errors_supported=yes
++else
++        _pkg_short_errors_supported=no
++fi
++        if test $_pkg_short_errors_supported = yes; then
++	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
++        else
++	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
++        fi
++	# Put the nasty error message in config.log where it belongs
++	echo "$PNG_PKG_ERRORS" >&5
++
++	{ { $as_echo "$as_me:$LINENO: error: Package requirements (libpng) were not met:
++
++$PNG_PKG_ERRORS
++
++Consider adjusting the PKG_CONFIG_PATH environment variable if you
++installed software in a non-standard prefix.
++
++Alternatively, you may set the environment variables PNG_CFLAGS
++and PNG_LIBS to avoid the need to call pkg-config.
++See the pkg-config man page for more details.
++" >&5
++$as_echo "$as_me: error: Package requirements (libpng) were not met:
++
++$PNG_PKG_ERRORS
++
++Consider adjusting the PKG_CONFIG_PATH environment variable if you
++installed software in a non-standard prefix.
++
++Alternatively, you may set the environment variables PNG_CFLAGS
++and PNG_LIBS to avoid the need to call pkg-config.
++See the pkg-config man page for more details.
++" >&2;}
++   { (exit 1); exit 1; }; }
++elif test $pkg_failed = untried; then
++	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
++is in your PATH or set the PKG_CONFIG environment variable to the full
++path to pkg-config.
++
++Alternatively, you may set the environment variables PNG_CFLAGS
++and PNG_LIBS to avoid the need to call pkg-config.
++See the pkg-config man page for more details.
++
++To get pkg-config, see <http://pkg-config.freedesktop.org/>.
++See \`config.log' for more details." >&5
++$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
++is in your PATH or set the PKG_CONFIG environment variable to the full
++path to pkg-config.
++
++Alternatively, you may set the environment variables PNG_CFLAGS
++and PNG_LIBS to avoid the need to call pkg-config.
++See the pkg-config man page for more details.
++
++To get pkg-config, see <http://pkg-config.freedesktop.org/>.
++See \`config.log' for more details." >&2;}
++   { (exit 1); exit 1; }; }; }
++else
++	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
++	PNG_LIBS=$pkg_cv_PNG_LIBS
++        { $as_echo "$as_me:$LINENO: result: yes" >&5
++$as_echo "yes" >&6; }
++	:
++fi ;;
++	xno) ;;
++	*)
+ pkg_failed=no
+ { $as_echo "$as_me:$LINENO: checking for PNG" >&5
+ $as_echo_n "checking for PNG... " >&6; }
+@@ -24942,7 +25063,8 @@
+         { $as_echo "$as_me:$LINENO: result: yes" >&5
+ $as_echo "yes" >&6; }
+ 	have_libpng=yes
+-fi
++fi ;;
++esac
+ 
+ if test x$have_libpng = xyes; then
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120316/9b2da006/attachment.html>


More information about the macports-changes mailing list