]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
libpng: fix for x86_64
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Sat, 17 Mar 2007 21:32:05 +0000 (21:32 +0000)
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Sat, 17 Mar 2007 21:32:05 +0000 (21:32 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1121 370017ae-e619-0410-ac65-c121f96126d4

patches/libpng/libpng.SlackBuild

index 63457984f59156f42d2af766b037fbbfd5ce6057..ecc4a9264b952a4fad9cbf8dada16cbc6fd96cca 100755 (executable)
@@ -3,8 +3,9 @@
 # slackbuild script for libpng
 # by rhatto at riseup.net
 #
-# some code grabbed from slackware 11.0 script, at
-# ftp://ftp.slackware.com/pub/slackware/slackware-11.0/source/l/libpng/
+# some code grabbed from slackware 11.0 and slamd64-11.0 scripts, found at
+# ftp://ftp.slackware.com/pub/slackware/slackware-11.0/source/l/libpng/ and
+# http://slamd64.he.net/slamd64-11.0/source/l/libpng/libpng.SlackBuild
 #
 
 if [ -s "slack-required" ]; then
@@ -85,10 +86,20 @@ find . -perm 511 -exec chmod 755 {} \;
 find . -perm 711 -exec chmod 755 {} \;
 find . -perm 555 -exec chmod 755 {} \;
 
-zcat $CWD/libpng.libs.diff.gz | patch -p1 --verbose || exit $ERROR_PATCH
-ln -sf scripts/makefile.linux ./Makefile
+if [ "$ARCH" == "x86_64" ]; then
+  # Do *NOT* move this... put here in Slamd64 so that libdir
+  # can be overriden and so that we don't have inline assembly problems
+  # - if you change this, rebuilding libpng will break, and 
+  # you'll have to rebuild everything that links to it (e.g. KDE).
+  zcat $CWD/libpng.libs.diff.gz | patch -p1 --verbose || exit $ERROR_PATCH
+  ln -sf scripts/makefile.linux ./Makefile
+  ./configure --prefix=/usr --libdir=$LIBDIR || exit $ERROR_CONF
+else
+  ./configure --prefix=/usr --libdir=$LIBDIR || exit $ERROR_CONF
+  zcat $CWD/libpng.libs.diff.gz | patch -p1 --verbose || exit $ERROR_PATCH
+  ln -sf scripts/makefile.linux ./Makefile
+fi
 
-./configure --prefix=/usr --libdir=$LIBDIR || exit $ERROR_CONF
 make || exit $ERROR_MAKE
 make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL