media-libs/libpng: Sync with Gentoo

It's from Gentoo commit ab6f739bf876984521cee3c36323ad90a9c3d5ae.
This commit is contained in:
Flatcar Buildbot 2025-05-05 07:10:47 +00:00 committed by Krzesimir Nowak
parent d35fd6a8ce
commit 59bf33a467
2 changed files with 70 additions and 0 deletions

View File

@ -4,3 +4,4 @@ DIST libpng-1.6.46-apng-apng.patch.gz 10266 BLAKE2B 51d04187fa631fcc388fafa86683
DIST libpng-1.6.46.tar.xz 1054296 BLAKE2B 0cc4e4ca0a9394e1ee2778065ef03859854062103609c9356709a9540b8953a6198b5c44a5a05ae97d8f0e6035a171ab1797627f6523805cedf3f985960752c3 SHA512 80c4cb644e11d39533344e017faf61700fdfbf758531b1a9ffbeb0a2f8540d9ed373f4adab590ae994f5a17f7fd6eff8dac16ebfcc2a0c31e899fd63ae1e4c1e
DIST libpng-1.6.47-libpng-apng-apng.patch.gz 10697 BLAKE2B eadf410ea5ef073e444dd1158dfdb80900a594fb1cc41edfd1c63524bdd92195d10a9e0d0fbe1bf729a5df2970994d5617e56d85c861d0b845a815fdec3c4200 SHA512 5ea0e661f83a1966791eef3479ad7496787d3bc9eb6911475384da1c027444b1158bdb0f169d400ee9e1444c93e2bf435a4d8eb411901dd8e839b059baf9f38d
DIST libpng-1.6.47.tar.xz 1054664 BLAKE2B 3dafe005931cd5b7709278f8d1961250c1d80ade4e73b568a211b409e7cac44f42692c6501851620ccd549d5c466b697dc6bbecf56e969e00b54c22a7cde0d72 SHA512 932578dedd7916e2c502d8d11eef845e15733e84062510ba246b027d5467efe786725ff3dd22b9a33ff6a052c8dab3da3b45cb737a00caed43b6598c2bd8122b
DIST libpng-1.6.48.tar.xz 1054968 BLAKE2B 2aec3b237d8cf2109186518a1604d9d10e0ef6739730988e01b91f20d48dcd736a293d3c96bed719807778a68273d1bf5cc2467fc19852dbfffd39295fcbf515 SHA512 aae6cdd7d55d78aea820165493e31ea7c0de8b2272b709d334dfe7bac96e24099330f0e9049062fde34b6ea926af50987c390dab1b91bdfe3586b2ee4aed8b33

View File

@ -0,0 +1,69 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit libtool multilib-minimal
APNG_REPO=libpng-apng # sometimes libpng-apng is more up to date
APNG_VERSION="1.6.47"
DESCRIPTION="Portable Network Graphics library"
HOMEPAGE="http://www.libpng.org/"
SRC_URI="
https://downloads.sourceforge.net/${PN}/${P}.tar.xz
apng? (
https://downloads.sourceforge.net/${APNG_REPO}/${PN}$(ver_rs 1-2 '' $(ver_cut 1-2 ${APNG_VERSION}))/${PV}/${PN}-${APNG_VERSION}-apng.patch.gz -> ${PN}-${APNG_VERSION}-${APNG_REPO}-apng.patch.gz
https://downloads.sourceforge.net/${APNG_REPO}/${PN}$(ver_rs 1-2 '' $(ver_cut 1-2 ${APNG_VERSION}))/${PN}-${APNG_VERSION}-apng.patch.gz -> ${PN}-${APNG_VERSION}-${APNG_REPO}-apng.patch.gz
)
"
LICENSE="libpng2"
SLOT="0/16"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="apng cpu_flags_x86_sse static-libs test"
RESTRICT="!test? ( test )"
RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}"
DOCS=( ANNOUNCE CHANGES libpng-manual.txt README TODO )
src_prepare() {
default
if use apng; then
case ${APNG_REPO} in
apng)
eapply -p0 "${WORKDIR}"/${PN}-${APNG_VERSION}-${APNG_REPO}-apng.patch
;;
libpng-apng)
eapply "${WORKDIR}"/${PN}-${APNG_VERSION}-${APNG_REPO}-apng.patch
;;
*)
die "Unknown APNG_REPO!"
;;
esac
# Don't execute symbols check with apng patch, bug #378111
sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
fi
elibtoolize
}
multilib_src_configure() {
local myeconfargs=(
$(multilib_native_enable tools)
$(use_enable test tests)
$(use_enable cpu_flags_x86_sse intel-sse)
$(use_enable static-libs static)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_install_all() {
default
find "${ED}" \( -type f -o -type l \) -name '*.la' -delete || die
}