media-libs/libpng-compat: Move from media-libs/libpng
authorMichał Górny <mgorny@gentoo.org>
Tue, 5 Nov 2019 19:21:51 +0000 (20:21 +0100)
committerMichał Górny <mgorny@gentoo.org>
Fri, 8 Nov 2019 06:47:59 +0000 (07:47 +0100)
Bug: https://bugs.gentoo.org/697820
Signed-off-by: Michał Górny <mgorny@gentoo.org>
media-libs/libpng-compat/Manifest [new file with mode: 0644]
media-libs/libpng-compat/libpng-compat-1.2.59.ebuild [new file with mode: 0644]
media-libs/libpng-compat/libpng-compat-1.5.30.ebuild [new file with mode: 0644]
media-libs/libpng-compat/metadata.xml [new file with mode: 0644]

diff --git a/media-libs/libpng-compat/Manifest b/media-libs/libpng-compat/Manifest
new file mode 100644 (file)
index 0000000..4ca0b59
--- /dev/null
@@ -0,0 +1,3 @@
+DIST libpng-1.2.59.tar.xz 657424 BLAKE2B a64a8e5c914a20b1f16a219b508b06d12ff28903083792cf07dae841ad13b3636b9d715d9bbfc459a134dfdf2a9b37bac1fbcff14a91c214340325ba8266431e SHA512 bfdc51eca72a76697f1396611a08aa4ce6a169837197699c55d845fdef17850e8f7665b7b81ba815c277453737f12eeb41409ff9c7eca1ac0c0d134c44492a6e
+DIST libpng-1.5.30-apng.patch.gz 10272 BLAKE2B 335b99e30a476b358483b0ca44d895580bddad05d18ab7f47b4cfa383a04c53c1db7d5773919445c281b0b0921485b946cb67c36db07aad494f051d4db19e4e1 SHA512 1c06e2e1b2420580d4399b7b752df9ed193c81febcc9983351fc72ce3900dc43a433780e7a0184b612b7723d8870a514db7398ec0c081dabe6cb4ea824880236
+DIST libpng-1.5.30.tar.xz 756992 BLAKE2B 02813c7cf06e61d429fe963ae2c1e68bfb390b8eeea52147f582729b4a86c73055c2c79eb3d0b533587dd5a16dc0abf7afd986794c01ec59ae0a7dfe3333a989 SHA512 8716c6720c1ddbb38f439df42dbb472d37490fd207efe59bd872ce9adec7359025dc84544efddd19c8e339ecc28389a746e6987ff41ac6e76915c1e1d2c6f20d
diff --git a/media-libs/libpng-compat/libpng-compat-1.2.59.ebuild b/media-libs/libpng-compat/libpng-compat-1.2.59.ebuild
new file mode 100644 (file)
index 0000000..c785849
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# this ebuild is only for the libpng12.so.0 SONAME for ABI compat
+
+inherit libtool multilib-minimal
+
+MY_P=libpng-${PV}
+DESCRIPTION="Portable Network Graphics library"
+HOMEPAGE="http://www.libpng.org/"
+SRC_URI="mirror://sourceforge/libpng/${MY_P}.tar.xz"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="libpng"
+SLOT="1.2"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+       !=media-libs/libpng-1.2*"
+DEPEND="${RDEPEND}
+       app-arch/xz-utils"
+
+DOCS=""
+
+src_prepare() {
+       default
+       elibtoolize
+}
+
+multilib_src_configure() {
+       ECONF_SOURCE=${S} econf --disable-static
+}
+
+multilib_src_compile() {
+       emake libpng12.la
+}
+
+multilib_src_install() {
+       newlib.so .libs/libpng12.so.0.* libpng12.so.0
+}
diff --git a/media-libs/libpng-compat/libpng-compat-1.5.30.ebuild b/media-libs/libpng-compat/libpng-compat-1.5.30.ebuild
new file mode 100644 (file)
index 0000000..79fc3ab
--- /dev/null
@@ -0,0 +1,60 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# this ebuild is only for the libpng15.so.15 SONAME for ABI compat
+
+inherit eutils libtool multilib-minimal
+
+MY_P=libpng-${PV}
+DESCRIPTION="Portable Network Graphics library"
+HOMEPAGE="http://www.libpng.org/"
+SRC_URI="mirror://sourceforge/libpng/${MY_P}.tar.xz
+       apng? ( https://dev.gentoo.org/~polynomial-c/${MY_P}-apng.patch.gz )"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="libpng"
+SLOT="1.5"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="apng neon"
+
+RDEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
+       !=media-libs/libpng-1.5*"
+DEPEND="${RDEPEND}
+       app-arch/xz-utils"
+
+DOCS=""
+
+pkg_setup() {
+       local _preserved_lib=${EROOT}/usr/$(get_libdir)/libpng15.so.15
+       [[ -e ${_preserved_lib} ]] && rm -f "${_preserved_lib}"
+}
+
+src_prepare() {
+       default
+       if use apng; then
+               # fix windows path in patch file. Please check for each release if this can be removed again.
+               sed 's@scripts\\symbols.def@scripts/symbols.def@' \
+                       -i "${WORKDIR}"/${PN}-*-apng.patch || die
+               eapply "${WORKDIR}"/${PN}-*-apng.patch
+               # Don't execute symbols check with apng patch wrt #378111
+               sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
+       fi
+       elibtoolize
+}
+
+multilib_src_configure() {
+       ECONF_SOURCE="${S}" \
+       econf \
+               --disable-static \
+               --enable-arm-neon=$(usex neon)
+}
+
+multilib_src_compile() {
+       emake libpng15.la
+}
+
+multilib_src_install() {
+       newlib.so .libs/libpng15.so.15.* libpng15.so.15
+}
diff --git a/media-libs/libpng-compat/metadata.xml b/media-libs/libpng-compat/metadata.xml
new file mode 100644 (file)
index 0000000..973c824
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="project">
+               <email>base-system@gentoo.org</email>
+               <name>Gentoo Base System</name>
+       </maintainer>
+       <use>
+               <flag name="apng">support unofficial APNG (Animated PNG) spec</flag>
+       </use>
+       <upstream>
+               <remote-id type="cpe">cpe:/a:libpng:libpng</remote-id>
+               <remote-id type="sourceforge">apng</remote-id>
+       </upstream>
+       <slots>
+               <slot name="0">For building against. This is the only slot
+                       that provides headers and command line tools.</slot>
+               <slot name="1.2">For binary compatibility, provides libpng12.so.0
+                       only.</slot>
+               <slot name="1.5">For binary compatibility, provides libpng15.so.15
+                       only.</slot>
+               <subslots>Reflect ABI compatibility for libpng.so.</subslots>
+       </slots>
+</pkgmetadata>