app-admin/awscli: Bump to 1.37.9
[gentoo/gentoo.git] / media-libs / libpng / libpng-1.6.42.ebuild
blob9b2e3527fb9a9cbd6865174f1de0c65a7f698b3d
1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit libtool multilib-minimal
8 APNG_REPO=libpng-apng # sometimes libpng-apng is more up to date
9 APNG_VERSION="1.6.40"
10 DESCRIPTION="Portable Network Graphics library"
11 HOMEPAGE="http://www.libpng.org/"
12 SRC_URI="
13         https://downloads.sourceforge.net/${PN}/${P}.tar.xz
14         apng? (
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
17         )
20 LICENSE="libpng2"
21 SLOT="0/16"
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 test"
24 RESTRICT="!test? ( test )"
26 RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]"
27 DEPEND="${RDEPEND}"
29 DOCS=( ANNOUNCE CHANGES libpng-manual.txt README TODO )
31 src_prepare() {
32         default
34         if use apng; then
35                 case ${APNG_REPO} in
36                         apng)
37                                 eapply -p0 "${WORKDIR}"/${PN}-${APNG_VERSION}-${APNG_REPO}-apng.patch
38                                 ;;
39                         libpng-apng)
40                                 eapply "${WORKDIR}"/${PN}-${APNG_VERSION}-${APNG_REPO}-apng.patch
41                                 ;;
42                         *)
43                                 die "Unknown APNG_REPO!"
44                                 ;;
45                 esac
47                 # Don't execute symbols check with apng patch, bug #378111
48                 sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
49         fi
51         elibtoolize
54 multilib_src_configure() {
55         local myeconfargs=(
56                 $(multilib_native_enable tools)
57                 $(use_enable test tests)
58                 $(use_enable cpu_flags_arm_neon arm-neon)
59                 $(use_enable cpu_flags_x86_sse intel-sse)
60                 $(use_enable static-libs static)
61         )
63         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
66 multilib_src_install_all() {
67         default
69         find "${ED}" \( -type f -o -type l \) -name '*.la' -delete || die