Skip to contentSkip to conversation

BugFix host-libpng

PATCH New Martin Banky 1 participant 3 messages Oct 5, 2010

lore
Share & tools
lore
#0 lore raw

cover BugFix host-libpng

Also happens with 1.2.44, but I'm not sure if the patch will apply cleanly. I didn't have enough time to test it.

[PATCH 1/2] libpng: bump to 1.4.4
[PATCH 2/2] host-libpng: Symbols creation fails with ccache

#1 lore raw

PATCH 1/2 libpng: bump to 1.4.4

---
 package/libpng/libpng.mk |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
package/libpng/libpng.mk +6 -7
index 5608f4f..cbcedf0 100644
@@ -3,26 +3,25 @@
 # libpng (Portable Network Graphic library)
 #
 #############################################################
-LIBPNG_VERSION:=1.2.44
+LIBPNG_VERSION = 1.4.4
+LIBPNG_SERIES = 14
 LIBPNG_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libpng
 LIBPNG_SOURCE = libpng-$(LIBPNG_VERSION).tar.bz2
 LIBPNG_LIBTOOL_PATCH = NO
 LIBPNG_INSTALL_STAGING = YES
-LIBPNG_CONF_OPT = --without-libpng-compat
 LIBPNG_DEPENDENCIES = host-pkg-config zlib
 
-HOST_LIBPNG_CONF_OPT = --without-libpng-compat
 HOST_LIBPNG_DEPENDENCIES = host-pkg-config host-zlib
 
-define LIBPNG_STAGING_LIBPNG12_CONFIG_FIXUP
+define LIBPNG_STAGING_LIBPNG_CONFIG_FIXUP
 	$(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \
 		-e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \
-		-e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include/libpng12\',g" \
+		-e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include/libpng$(LIBPNG_SERIES)\',g" \
 		-e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
-		$(STAGING_DIR)/usr/bin/libpng12-config
+		$(STAGING_DIR)/usr/bin/libpng$(LIBPNG_SERIES)-config
 endef
 
-LIBPNG_POST_INSTALL_STAGING_HOOKS += LIBPNG_STAGING_LIBPNG12_CONFIG_FIXUP
+LIBPNG_POST_INSTALL_STAGING_HOOKS += LIBPNG_STAGING_LIBPNG_CONFIG_FIXUP
 
 $(eval $(call AUTOTARGETS,package,libpng))
 $(eval $(call AUTOTARGETS,package,libpng,host))
Signature · 1 line
1.7.3.1
#2 lore raw

PATCH 2/2 host-libpng: Symbols creation fails with ccache

In reply to Martin Banky

Makefile assumes the output from $(CPP) will be to stdout, but ccache does not pass the output of $(CPP) to stdout. The Makefile creates an empty symbols file, which causes the version file to be incorrect. This causes ld to exit with the error 'libpng.vers:2: syntax error in VERSION script'.

See:
https://sourceforge.net/tracker/?func=detail&aid=3081199&group_id=5624&atid=105624

---
 package/libpng/libpng-1.4.4-ccache-version.patch |   25 ++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 package/libpng/libpng-1.4.4-ccache-version.patch
package/libpng/libpng-1.4.4-ccache-version.patch new file +25 -0
new file mode 100644
index 0000000..e1f61e6
@@ -0,0 +1,25 @@
+--- a/Makefile.am	2010-09-23 05:18:36.000000000 -0700
++++ b/Makefile.am	2010-10-04 15:51:29.000000000 -0700
+@@ -88,7 +88,8 @@ $(PNGLIB_BASENAME)-config: libpng-config
+ 
+ libpng.sym: png.h pngconf.h
+ 	rm -f $@ [email protected]
+-	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
++	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h $(srcdir)/$@
++	cat $(srcdir)/$@ | \
+ 		$(SED) -n -e \
+ 		's|^.*PNG_FUNCTION_EXPORT[ 	]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
+ 		-e 's|^.*PNG_DATA_EXPORT[ 	]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
+
+--- a/Makefile.in	2010-09-23 05:18:43.000000000 -0700
++++ b/Makefile.in	2010-10-04 15:51:29.000000000 -0700
+@@ -1213,7 +1213,8 @@ $(PNGLIB_BASENAME)-config: libpng-config
+ 
+ libpng.sym: png.h pngconf.h
+ 	rm -f $@ [email protected]
+-	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
++	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h $(srcdir)/$@
++	cat $(srcdir)/$@ | \
+ 		$(SED) -n -e \
+ 		's|^.*PNG_FUNCTION_EXPORT[ 	]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
+ 		-e 's|^.*PNG_DATA_EXPORT[ 	]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
Signature · 1 line
1.7.3.1