1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit libtool multilib-minimal
8 APNG_REPO=apng # sometimes libpng-apng is more up to date
10 DESCRIPTION="Portable Network Graphics library"
11 HOMEPAGE="http://www.libpng.org/"
13 https://downloads.sourceforge.net/${PN}/${P}.tar.xz
15 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
16 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
22 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"
23 IUSE="apng cpu_flags_arm_neon cpu_flags_x86_sse static-libs"
25 RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]"
28 DOCS=( ANNOUNCE CHANGES libpng-manual.txt README TODO )
36 eapply -p0 "${WORKDIR}"/${PN}-${APNG_VERSION}-${APNG_REPO}-apng.patch
39 eapply "${WORKDIR}"/${PN}-${APNG_VERSION}-${APNG_REPO}-apng.patch
42 die "Unknown APNG_REPO!"
46 # Don't execute symbols check with apng patch, bug #378111
47 sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
53 multilib_src_configure() {
55 $(use_enable cpu_flags_arm_neon arm-neon)
56 $(use_enable cpu_flags_x86_sse intel-sse)
57 $(use_enable static-libs static)
60 ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
63 multilib_src_install_all() {
66 find "${ED}" \( -type f -o -type l \) -name '*.la' -delete || die