media-libs/libpng: Sync with Gentoo

It's from Gentoo commit 9f6e70fef08ab3366e9c0b7a73ee57c8867063ff.
This commit is contained in:
Flatcar Buildbot 2025-07-07 07:12:42 +00:00
parent cb47cef568
commit 7096d73d06
2 changed files with 80 additions and 0 deletions

View File

@ -2,4 +2,6 @@ DIST libpng-1.6.47-libpng-apng-apng.patch.gz 10697 BLAKE2B eadf410ea5ef073e444dd
DIST libpng-1.6.47.tar.xz 1054664 BLAKE2B 3dafe005931cd5b7709278f8d1961250c1d80ade4e73b568a211b409e7cac44f42692c6501851620ccd549d5c466b697dc6bbecf56e969e00b54c22a7cde0d72 SHA512 932578dedd7916e2c502d8d11eef845e15733e84062510ba246b027d5467efe786725ff3dd22b9a33ff6a052c8dab3da3b45cb737a00caed43b6598c2bd8122b
DIST libpng-1.6.48.tar.xz 1054968 BLAKE2B 2aec3b237d8cf2109186518a1604d9d10e0ef6739730988e01b91f20d48dcd736a293d3c96bed719807778a68273d1bf5cc2467fc19852dbfffd39295fcbf515 SHA512 aae6cdd7d55d78aea820165493e31ea7c0de8b2272b709d334dfe7bac96e24099330f0e9049062fde34b6ea926af50987c390dab1b91bdfe3586b2ee4aed8b33
DIST libpng-1.6.49-apng-apng.patch.gz 10354 BLAKE2B b829da1c8a19e00d9b60e1ac2ab636134b8972f28c06ee9e2ff15ae90ee48d10a89b47e8589c9c9b6527d5cfa4541d12b8e51755505001272eadea104f92226f SHA512 cf0641f4cccf58b1a5ed3ea4046d7279d71308b4ce639cf4bf7439af5ecdb32e5698f54ad2c80a375c714c077a6b4dcdeaf41399766952752ad743600c6bcd48
DIST libpng-1.6.49-libpng-apng-apng.patch.gz 10676 BLAKE2B a726acae0da7905c5f1c59e42bcef8c3b46c545bf4955e0c40a21f0ed928b43af47e3dd6a771a3fb954fb6172218bec0472c62f591b4c470fc14a99a873645d3 SHA512 d3a7121f892049f5488f32b5de29fb8892f2b329ee1df956b129918601946ab86a542a4412587ee5f660c581484812aaf101f953bcc187c993d98ba9d8d63a00
DIST libpng-1.6.49.tar.xz 1060752 BLAKE2B 2f09651a7c022d270ca90de2cb235c88ac9cec232b42cb72cfa9f1b8962cb2146d248348a12f5fd26b7fff78d5eb7a0f76b3457ede7df34fd30575b6781ad30f SHA512 c40e605c50f632b55809199cba40041b46b5b2ff37659e17dcd5ffe457d926532f3469151f99ad7aab898ef5bedf08ed134a0a4e7d00ac1e9c8cebe5b5eef9bc
DIST libpng-1.6.50.tar.xz 1060992 BLAKE2B 2191536b4448d3a058b9dbb31f3d780959c9daf7b104550cc89e8ae984a3c9f01b86bf6c6708983989b4bfbe7232e3716b8a3b8cd3313a12c31e0623b6241d11 SHA512 05adc94ef532bbddaae46e087088a23236e6528fd3fc705c8edfb5ff293983b790d4361d6b20c20df73632a9fbe55d2f394296385cd8efd646f58393ff21257d

View File

@ -0,0 +1,78 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit dot-a libtool multilib-minimal
APNG_REPO=libpng-apng # sometimes libpng-apng is more up to date
APNG_VERSION="1.6.49"
DESCRIPTION="Portable Network Graphics library"
HOMEPAGE="https://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}
riscv? ( sys-kernel/linux-headers )
"
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
}
src_configure() {
lto-guarantee-fat
multilib-minimal_src_configure
}
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
strip-lto-bytecode
find "${ED}" \( -type f -o -type l \) -name '*.la' -delete || die
}