commit:     71f73db9e28a308e650824aadd949d43e0904036
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  4 18:42:39 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul  4 19:00:07 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71f73db9

media-libs/libpng: add 1.6.50

There were changes upstream to the riscv detection handling but I've
not messed with anything at all and just kept things as they were in
src_configure in 1.6.49.

Bug: https://bugs.gentoo.org/958203
Bug: https://bugs.gentoo.org/958323
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/libpng/Manifest             |  1 +
 media-libs/libpng/libpng-1.6.50.ebuild | 79 ++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)

diff --git a/media-libs/libpng/Manifest b/media-libs/libpng/Manifest
index 985c357c9c55..e583269b75a8 100644
--- a/media-libs/libpng/Manifest
+++ b/media-libs/libpng/Manifest
@@ -3,3 +3,4 @@ DIST libpng-1.6.47.tar.xz 1054664 BLAKE2B 
3dafe005931cd5b7709278f8d1961250c1d80a
 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.tar.xz 1060752 BLAKE2B 
2f09651a7c022d270ca90de2cb235c88ac9cec232b42cb72cfa9f1b8962cb2146d248348a12f5fd26b7fff78d5eb7a0f76b3457ede7df34fd30575b6781ad30f
 SHA512 
c40e605c50f632b55809199cba40041b46b5b2ff37659e17dcd5ffe457d926532f3469151f99ad7aab898ef5bedf08ed134a0a4e7d00ac1e9c8cebe5b5eef9bc
+DIST libpng-1.6.50.tar.xz 1060992 BLAKE2B 
2191536b4448d3a058b9dbb31f3d780959c9daf7b104550cc89e8ae984a3c9f01b86bf6c6708983989b4bfbe7232e3716b8a3b8cd3313a12c31e0623b6241d11
 SHA512 
05adc94ef532bbddaae46e087088a23236e6528fd3fc705c8edfb5ff293983b790d4361d6b20c20df73632a9fbe55d2f394296385cd8efd646f58393ff21257d

diff --git a/media-libs/libpng/libpng-1.6.50.ebuild 
b/media-libs/libpng/libpng-1.6.50.ebuild
new file mode 100644
index 000000000000..a7708793d226
--- /dev/null
+++ b/media-libs/libpng/libpng-1.6.50.ebuild
@@ -0,0 +1,79 @@
+# 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=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)
+               --disable-riscv-rvv
+       )
+
+       ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+       default
+
+       strip-lto-bytecode
+       find "${ED}" \( -type f -o -type l \) -name '*.la' -delete || die
+}

Reply via email to