From 2a3641bc154a0ab1d17a096823a1e8f20cb0048d Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 23 Dec 2013 12:29:53 -0700 Subject: [PATCH] Add gcc2 support for optipng Also switched it to use the system lib{png,z} --- media-gfx/optipng/optipng-0.7.4.recipe | 22 +++++---- media-gfx/optipng/patches/optipng-0.7.4.patch | 25 ----------- .../optipng/patches/optipng-0.7.4.patchset | 45 +++++++++++++++++++ 3 files changed, 55 insertions(+), 37 deletions(-) delete mode 100644 media-gfx/optipng/patches/optipng-0.7.4.patch create mode 100644 media-gfx/optipng/patches/optipng-0.7.4.patchset diff --git a/media-gfx/optipng/optipng-0.7.4.recipe b/media-gfx/optipng/optipng-0.7.4.recipe index 354d2cac9..b20530acf 100644 --- a/media-gfx/optipng/optipng-0.7.4.recipe +++ b/media-gfx/optipng/optipng-0.7.4.recipe @@ -10,14 +10,8 @@ SRC_URI="http://prdownloads.sourceforge.net/optipng/optipng-0.7.4.tar.gz" CHECKSUM_MD5="8853d89aaf859065e95dcdf98b6bed73" LICENSE="Zlib" COPYRIGHT="2001-2012 Cosmin Truta" -REVISION="1" -ARCHITECTURES="?x86 ?x86_64" -SECONDARY_ARCHITECTURES="x86" -if [ $effectiveTargetArchitecture != x86_gcc2 ]; then - # x86_gcc2 is fine as primary target architecture as long as we're building - # for a different secondary architecture. - ARCHITECTURES="$ARCHITECTURES x86_gcc2" -fi +REVISION="2" +ARCHITECTURES="x86_gcc2 x86 ?x86_64" PROVIDES=" optipng$secondaryArchSuffix = $portVersion @@ -26,10 +20,14 @@ PROVIDES=" REQUIRES=" haiku$secondaryArchSuffix >= $haikuVersion + lib:libpng + lib:libz " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel >= $haikuVersion + devel:libpng + devel:libz " BUILD_PREREQUIRES=" @@ -39,13 +37,13 @@ BUILD_PREREQUIRES=" cmd:ranlib " -PATCHES=" - optipng-0.7.4.patch - " +PATCHES="optipng-0.7.4.patchset" BUILD() { - ./configure -bindir=$binDir -mandir=$manDir + ./configure -bindir=$binDir -mandir=$manDir \ + -with-system-libpng \ + -with-system-zlib make } diff --git a/media-gfx/optipng/patches/optipng-0.7.4.patch b/media-gfx/optipng/patches/optipng-0.7.4.patch deleted file mode 100644 index 8f27d354f..000000000 --- a/media-gfx/optipng/patches/optipng-0.7.4.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8fc175d03be69e84940012866ffdfa0b7b6c865b Mon Sep 17 00:00:00 2001 -From: Luke -Date: Fri, 20 Dec 2013 17:11:40 +0000 -Subject: [PATCH] Remove reference to libm - ---- - configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure b/configure -index 5437b74..f7087fe 100755 ---- a/configure -+++ b/configure -@@ -305,7 +305,7 @@ sed_config=" - s#@ARFLAGS@#${ARFLAGS-cru}#g - s#@RANLIB@#${RANLIB-ranlib}#g - s#@LIBS@#${LIBS-}#g -- s#@LIBM@#${LIBM--lm}#g -+ s#@LIBM@#${LIBM-}#g - s#@LIBZ@#${LIBZ--lz}#g - s#@LIBPNG@#${LIBPNG--lpng}#g - s#@DIFF@#${DIFF-diff -b -u}#g --- -1.8.3.4 - diff --git a/media-gfx/optipng/patches/optipng-0.7.4.patchset b/media-gfx/optipng/patches/optipng-0.7.4.patchset new file mode 100644 index 000000000..aeb75492f --- /dev/null +++ b/media-gfx/optipng/patches/optipng-0.7.4.patchset @@ -0,0 +1,45 @@ +From 9aeb37585d609791981ff00956a99d54a9bf446e Mon Sep 17 00:00:00 2001 +From: Chris Roberts +Date: Mon, 23 Dec 2013 12:13:23 -0700 +Subject: applying patch optipng-0.7.4.patch + + +diff --git a/configure b/configure +index 5437b74..f7087fe 100755 +--- a/configure ++++ b/configure +@@ -305,7 +305,7 @@ sed_config=" + s#@ARFLAGS@#${ARFLAGS-cru}#g + s#@RANLIB@#${RANLIB-ranlib}#g + s#@LIBS@#${LIBS-}#g +- s#@LIBM@#${LIBM--lm}#g ++ s#@LIBM@#${LIBM-}#g + s#@LIBZ@#${LIBZ--lz}#g + s#@LIBPNG@#${LIBPNG--lpng}#g + s#@DIFF@#${DIFF-diff -b -u}#g +-- +1.8.3.4 + + +From 02727f980a432201225b91c51f7f76fad3d12cca Mon Sep 17 00:00:00 2001 +From: Chris Roberts +Date: Mon, 23 Dec 2013 12:16:17 -0700 +Subject: Remove Wextra from CFLAGS to make gcc2 happy + + +diff --git a/configure b/configure +index f7087fe..f3bca47 100755 +--- a/configure ++++ b/configure +@@ -192,7 +192,7 @@ rm -f $test.c $test.o + if test $gccish -ne 0 + then + CC="${CC-$cc}" +- CFLAGS="${CFLAGS--O2 -Wall -Wextra}" ++ CFLAGS="${CFLAGS--O2 -Wall}" + else + CC="${CC-cc}" + CFLAGS="${CFLAGS--O}" +-- +1.8.3.4 +