]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/libpng-1.2.12-no-asm.patch
Quellenupdate:
[people/pmueller/ipfire-2.x.git] / src / patches / libpng-1.2.12-no-asm.patch
1 backport from current 1.4 beta's to handle the bug where the
2 PNG_NO_ASSEMBLER_CODE define is not exported properly
3
4 http://bugs.gentoo.org/136346
5
6 --- libpng-1.2.12/configure.ac
7 +++ libpng-1.2.12/configure.ac
8 @@ -62,15 +62,12 @@
9 AC_TRY_COMPILE(
10 [#include "pnggccrd.c"],
11 [return 0;],
12 - LIBPNG_DEFINES=,
13 - LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG\ -DPNG_NO_ASSEMBLER_CODE)
14 -if test "$LIBPNG_DEFINES"; then
15 - AC_MSG_RESULT(no)
16 -else
17 - AC_MSG_RESULT(yes)
18 - LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
19 -fi
20 + [LIBPNG_NO_ASSEMBLER=yes; LIBPNG_DEFINES=""],
21 + [LIBPNG_NO_ASSEMBLER=no ; LIBPNG_DEFINES="-DPNG_NO_ASSEMBLER_CODE=1"])
22 +LIBPNG_DEFINES="$LIBPNG_DEFINES -DPNG_CONFIGURE_LIBPNG"
23 +AC_MSG_RESULT($LIBPNG_NO_ASSEMBLER)
24 AC_SUBST(LIBPNG_DEFINES)
25 +AM_CONDITIONAL(LIBPNG_NO_ASSEMBLER, test "x$LIBPNG_NO_ASSEMBLER" = "xno")
26
27 AC_MSG_CHECKING([if libraries can be versioned])
28 GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
29 --- libpng-1.2.12/Makefile.am
30 +++ libpng-1.2.12/Makefile.am
31 @@ -87,6 +87,14 @@
32
33 CLEANFILES= pngout.png libpng12.pc libpng12-config libpng.vers libpng.sym
34
35 +pngconf.h: pngconf.h.in
36 + sed "/Makefile-supplied defines go here:/q" pngconf.h.in > pngconf.h.tmp
37 +if LIBPNG_NO_ASSEMBLER
38 + echo "#define PNG_NO_ASSEMBLER_CODE 1" >> pngconf.h.tmp
39 +endif
40 + sed "1,/Makefile-supplied defines go here:/d" pngconf.h.in >> pngconf.h.tmp
41 + mv pngconf.h.tmp pngconf.h
42 +
43 $(PNGLIB_BASENAME).pc: libpng.pc
44 cp libpng.pc $@
45
46 --- libpng-1.2.12/pngconf.h
47 +++ libpng-1.2.12/pngconf.h
48 @@ -19,6 +19,13 @@
49
50 #define PNG_1_2_X
51
52 +/* Backported no-assembler fix from libpng-1.4.0beta8 */
53 +
54 +/* Makefile-supplied defines go here: */
55 +/* End of Makefile-supplied defines. */
56 +
57 +/* End of backported no-assembler fix */
58 +
59 /*
60 * PNG_USER_CONFIG has to be defined on the compiler command line. This
61 * includes the resource compiler for Windows DLL configurations.
62