Ticket #11696: libpng-1.2.35.p5.diff
File libpng-1.2.35.p5.diff, 7.7 KB (added by , 8 years ago) |
---|
-
SPKG.txt
diff --git a/SPKG.txt b/SPKG.txt
a b 2 2 3 3 == Description == 4 4 5 libpng is the official PNG reference library. It supports almost all PNG features, is extensible, and has been extensively tested for over 13 years. The home site for development versions (i.e., may be buggy or subject to change or include experimental features) is http://libpng.sourceforge.net/, and the place to go for questions about the library is the png-mng-implement mailing list. 5 libpng is the official PNG reference library. It supports almost all PNG 6 features, is extensible, and has been extensively tested for over 13 years. 7 The home site for development versions (i.e., may be buggy or subject to 8 change or include experimental features) is http://libpng.sourceforge.net/, 9 and the place to go for questions about the library is the png-mng-implement 10 mailing list. 6 11 7 12 Website: http://www.libpng.org/pub/png/libpng.html 8 13 … … 20 25 21 26 == Dependencies == 22 27 23 This spkg requires28 This spkg depends on: 24 29 25 30 * libz 26 31 27 This spkg provides dependencies for28 29 * the Sage library30 * tachyon31 * matplotlib32 33 32 == Special Update/Build Instructions == 34 33 35 * No changes went into src. There are two different tarballs, but we use the one with configure. 34 * No changes went into src. There are two different tarballs, but we use the 35 one with configure. 36 * On Darwin, the symbolic links libpng.* created by libpng12 may interfere 37 with a system-wide libPng.dylib. 38 This system-wide library is likely to be a different version and on top of 39 that the symbols exported there are prefixed with "_cg" (for "Core Graphics"), 40 so even if by chance the functionalities of the two libraries were interchangeable, 41 libraries or applications looking for one and being presented the other won't 42 find the symbols they expect. 43 Note the uppercase "P" which could prevent this conflict; unfortunately, the 44 default filesystem used by Apple is case-insensitive. 45 Also note there would be no problem if the system-wide library was not looked 46 for when Sage is being built or run, but that's not the case either; 47 it is at least looked for by the "ImageIO" framework: 48 - when Python is built with Mac OS extensions, fixed in #4008; 49 - when Mercurial is built because it uses $EDITOR, cf. #4678; 50 - when R is built and it finds -lpng, cf. #4409 and #11696. 51 As not all of these problems are easily dealt with and new ones may arise, 52 we chose to delete the $SAGE_LOCAL/lib/libpng.* symlinks on Darwin. 53 Therefore, some package as matplotlib (cf. #11686) which by default looks for 54 -lpng are patched to look for -lpng12 (unless pkg-config is installed; in 55 this case indeed we can use a non-conflicting libpng.pc symlinking to 56 libpng12.pc). 36 57 37 58 == Changelog == 38 59 60 === libpng-1.2.35.p5 (Leif Leonhardy, Jean-Pierre Flori, 19 February 2013) === 61 * #11696: Correctly build and install libpng. 62 * Delete symlinks from libpng.* in $SAGE_LOCAL/lib on Darwin only. 63 * Fix order of additions of flags and do not drop user settings. 64 * Use $MAKE and quote $UNAME. 65 * Use SYMBOL_PREFIX trick on Cygwin to build a correct import library. 66 39 67 === libpng-1.2.35.p4 (Simon King, 10th December 2011) === 40 68 * #12131: Use --libdir, to make the package work on openSUSE. 41 69 42 70 === libpng-1.2.35.p3 (David Kirkby 1st April 2011) === 43 * Remove the erronous file '.#spkg-install' in the root 44 directory of the package. 71 * Remove the erronous file '.#spkg-install' in the root 72 directory of the package. 45 73 46 74 === libpng-1.2.35.p2 (Mike Hansen, June 4th, 2010) === 47 75 * #9146: cygwin: gd doesn't correctly link in libpng with sage-4.4.3. … … 55 83 56 84 === libpng-1.2.35 (Michael Abshoff, April 10th, 2009) === 57 85 * update to latest upstream due to security issue in libpng (#5696) 58 86 59 87 === libpng-1.2.34 (Michael Abshoff, February 15th, 2009) === 60 88 * update to latest upstream release (security related) 61 * delete SAGE_LOCAL/lib/libpng.* to avoid OSX specific issues. This required a set of other fixes. 89 * delete SAGE_LOCAL/lib/libpng.* to avoid OSX specific issues. This required 90 a set of other fixes. 62 91 * unset RM 63 92 * check if SAGE_LOCAL is set 64 93 … … 77 106 78 107 === libpng-1.2.22.p4 (Michael Abshoff, Jan. 31st, 2008) === 79 108 * remove loads of ._* files (#2010) 80 -
spkg-install
diff --git a/spkg-install b/spkg-install
a b 1 1 #!/usr/bin/env bash 2 2 3 if [ "$SAGE_LOCAL" = "" ]; then4 echo "SAGE_LOCAL undefined ... exiting";5 echo"Maybe run 'sage -sh'?"6 exit 13 if [ -z "$SAGE_LOCAL" ]; then 4 echo >&2 "Error: SAGE_LOCAL undefined - exiting..." 5 echo >&2 "Maybe run 'sage -sh'?" 6 exit 1 7 7 fi 8 8 9 unset RM 9 if [ "$SAGE64" = yes ]; then 10 CFLAGS="$CFLAGS -m64 -fPIC -g" 11 LDFLAGS="$LDFLAGS -m64" 12 else 13 CFLAGS="$CFLAGS -fPIC -g" 14 fi 15 16 # Pick up Sage's zlib: 17 export CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS" 18 export LDFLAGS="-L$SAGE_LOCAL/lib $LDFLAGS" 10 19 11 20 cd src 12 21 13 # Need to detect zlib14 if [ "x$SAGE64" = xyes ]; then15 CFLAGS="-m64 $CFLAGS -fPIC -g"16 LDFLAGS="-m64"; export LDFLAGS17 else18 CFLAGS="$CFLAGS -fPIC -g"19 fi20 export CFLAGS21 22 CPPFLAGS="$CPPFLAGS -I$SAGE_LOCAL/include"23 export CPPFLAGS24 25 26 22 ./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" --enable-shared=yes 27 23 if [ $? -ne 0 ]; then 28 echo "Error configuring libpng"24 echo >&2 "Error configuring libpng" 29 25 exit 1 30 26 fi 31 27 32 make 28 # Needed to generate a correct import library 29 if [ "$UNAME" = "CYGWIN" ]; then 30 MAKE="$MAKE SYMBOL_PREFIX= " 31 fi 33 32 33 echo "Building libpng..." 34 $MAKE 34 35 if [ $? -ne 0 ]; then 35 echo "Error building libpng"36 echo >&2 "Error building libpng." 36 37 exit 1 37 38 fi 38 39 39 make install 40 40 echo "Installing libpng..." 41 $MAKE install 41 42 if [ $? -ne 0 ]; then 42 echo "Error installing libpng"43 echo >&2 "Error installing libpng." 43 44 exit 1 44 45 fi 45 46 46 if [ $UNAME = "CYGWIN" ]; then 47 rm -rf "$SAGE_LOCAL"/lib/libpng12.dll.a 48 rm -rf "$SAGE_LOCAL"/lib/libpng12.la 49 cp "$SAGE_LOCAL"/bin/cygpng12-0.dll "$SAGE_LOCAL"/lib/libpng12.dll 50 51 if [ $? -ne 0 ]; then 52 echo "Error installing libpng" 53 exit 1 54 fi 47 # On Darwin, the symbolic links libpng.* created by libpng12 may interfere 48 # with a system-wide libPng.dylib. 49 # This system-wide library is likely to be a different version and on top of 50 # that the symbols exported there are prefixed with "_cg" (for "Core Graphics"), 51 # so even if by chance the functionalities of the two libraries were interchangeable, 52 # libraries or applications looking for one and being presented the other won't 53 # find the symbols they expect. 54 # Note the uppercase "P" which could prevent this conflict; unfortunately, the 55 # default filesystem used by Apple is case-insensitive. 56 # Also note there would be no problem if the system-wide library was not looked 57 # for when Sage is being built or run, but that's not the case either; 58 # it is at least looked for by the "ImageIO" framework: 59 # - when Python is built with Mac OS extensions, fixed in #4008; 60 # - when Mercurial is built because it uses $EDITOR, cf. #4678; 61 # - when R is built and it finds -lpng, cf. #4409 and #11696. 62 # As not all of these problems are easily dealt with and new ones may arise, 63 # we chose to delete the $SAGE_LOCAL/lib/libpng.* symlinks on Darwin. 64 # Therefore, some package as matplotlib (cf. #11686) which by default looks for 65 # -lpng are patched to look for -lpng12 (unless pkg-config is installed; in 66 # this case indeed we can use a non-conflicting libpng.pc symlinking to 67 # libpng12.pc). 68 if [ "$UNAME" = "Darwin" ]; then 69 echo "Deleting libpng.*..." 70 rm -rf "$SAGE_LOCAL"/lib/libpng.* 71 if [ $? -ne 0 ]; then 72 echo >&2 "Error deleting symlinks." 73 exit 1 74 fi 55 75 fi 56 57 echo "Deleting libpng.*"58 rm -rf "$SAGE_LOCAL"/lib/libpng.*59