Skip to contentSkip to conversation

libpng: add libpng12

PATCH New Steve Kenton 2 participants 3 messages Jan 11, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libpng: add libpng12

Some programs still link using the legacy -lpng12 version of libpng for handling PNG (Portable Network Graphics) images. It is still maintained for security fixes so make it available.

http://www.libpng.org

Signed-off-by Stephen M. Kenton <[email protected]>
---
The png support in freetype uses libpng v1.2 instead of v1.6. Currently freetype is configured without png support but another package I am investigating wants it, so here is a patch to enable it. I copied and modified the files from libpng and do not know if the arm specific option is needed for v1.2 since I'm only using x86.

package/Config.in +1 -0
diff -pruN buildroot.ori/package/Config.in buildroot/package/Config.in
@@ -681,6 +681,7 @@ menu "Graphics"
 	source "package/libgtk2/Config.in"
 	source "package/libgtk3/Config.in"
 	source "package/libpng/Config.in"
+	source "package/libpng12/Config.in"
 	source "package/libqrencode/Config.in"
 	source "package/libraw/Config.in"
 	source "package/librsvg/Config.in"
package/libpng12/Config.in +12 -0
diff -pruN buildroot.ori/package/libpng12/Config.in buildroot/package/libpng12/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_LIBPNG12
+	bool "libpng12"
+	select BR2_PACKAGE_ZLIB
+	help
+	  Some programs still link using the legacy -lpng12 version
+	  of libpng for handling PNG (Portable Network Graphics)
+	  images. It is still maintained for security fixes so
+	  make it available, but do not select this unless you
+	  have an application that explicitly needs the older
+	  libpng12 functionality. Use libpng instead.
+
+	  http://www.libpng.org/
package/libpng12/libpng.mk +19 -0
diff -pruN buildroot.ori/package/libpng12/libpng.mk buildroot/package/libpng12/libpng.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# libpng12
+#
+################################################################################
+
+LIBPNG12_VERSION = 1.2.52
+LIBPNG12_SERIES = 12
+LIBPNG12_SOURCE = libpng-$(LIBPNG12_VERSION).tar.xz
+LIBPNG12_SITE = http://downloads.sourceforge.net/project/libpng/libpng${LIBPNG12_SERIES}/$(LIBPNG12_VERSION)
+LIBPNG12_LICENSE = libpng license
+LIBPNG12_LICENSE_FILES = LICENSE
+LIBPNG12_INSTALL_STAGING = YES
+LIBPNG12_DEPENDENCIES = host-pkgconf zlib
+LIBPNG12_CONFIG_SCRIPTS = libpng$(LIBPNG12_SERIES)-config libpng-config
+LIBPNG12_CONF_OPTS = $(if $(BR2_ARM_CPU_HAS_NEON),--enable-arm-neon=yes,--enable-arm-neon=no)
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
#1 lore raw

PATCH 1/1 libpng: add libpng12

Quoted 7 lines · Steve Kenton

Some programs still link using the legacy -lpng12 version of libpng for handling PNG (Portable Network Graphics) images. It is still maintained for security fixes so make it available.

http://www.libpng.org

Quoted 7 lines

Signed-off-by Stephen M. Kenton <[email protected]>
---
The png support in freetype uses libpng v1.2 instead of v1.6. Currently freetype is configured without png support but another package I am investigating wants it, so here is a patch to enable it. I copied and modified the files from libpng and do not know if the arm specific option is needed for v1.2 since I'm only using x86.

Hi.
Which programs?
Freetype works and links against libpng(16) just fine. So i don't see any reason for libpng12 right now. Regards.

#3 lore raw

PATCH 1/1 libpng: add libpng12

In reply to a message not in the archive
Quoted 2 lines · Steve Kenton

The freetype support in dvdauthor specifies libpng12 I'll try changing to libpng16 and see if it works

Keep the list CCed, someone else might be interested. There's a small patch in gentoo against 0.7.1 that allows libpng15/16 support.
It's a 2-liner and it's probably upstream in git so it's likely better than creating a new libpng package/variant (avoid complexity and size penalty).
It would also be interesting if you'd submit the package if you are succesful.
Regards.