app-admin/awscli: Bump to 1.37.9
[gentoo/gentoo.git] / media-libs / libpng / libpng-1.6.40-r1.ebuild
blobeb69793bf039cd606360924f076351481c000ff0
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=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"
25 RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]"
26 DEPEND="${RDEPEND}"
28 DOCS=( ANNOUNCE CHANGES libpng-manual.txt README TODO )
30 src_prepare() {
31         default
33         if use apng; then
34                 case ${APNG_REPO} in
35                         apng)
36                                 eapply -p0 "${WORKDIR}"/${PN}-${APNG_VERSION}-${APNG_REPO}-apng.patch
37                                 ;;
38                         libpng-apng)
39                                 eapply "${WORKDIR}"/${PN}-${APNG_VERSION}-${APNG_REPO}-apng.patch
40                                 ;;
41                         *)
42                                 die "Unknown APNG_REPO!"
43                                 ;;
44                 esac
46                 # Don't execute symbols check with apng patch, bug #378111
47                 sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
48         fi
50         elibtoolize
53 multilib_src_configure() {
54         local myeconfargs=(
55                 $(use_enable cpu_flags_arm_neon arm-neon)
56                 $(use_enable cpu_flags_x86_sse intel-sse)
57                 $(use_enable static-libs static)
58         )
60         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
63 multilib_src_install_all() {
64         default
66         find "${ED}" \( -type f -o -type l \) -name '*.la' -delete || die