media-libs/coin: keyworded 3.1.3-r2 for sparc, bug #550040
[gentoo.git] / media-libs / libpng / libpng-1.6.35.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit libtool multilib-minimal
7
8 DESCRIPTION="Portable Network Graphics library"
9 HOMEPAGE="http://www.libpng.org/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz
11         apng? ( mirror://sourceforge/apng/${P}-apng.patch.gz )"
12
13 LICENSE="libpng"
14 SLOT="0/16"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
16 IUSE="apng cpu_flags_x86_sse neon static-libs"
17
18 RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]"
19 DEPEND="${RDEPEND}
20         app-arch/xz-utils"
21
22 src_prepare() {
23         default
24         if use apng; then
25                 eapply -p0 "${WORKDIR}"/${PN}-*-apng.patch
26                 # Don't execute symbols check with apng patch wrt #378111
27                 sed -i -e '/^check/s:scripts/symbols.chk::' Makefile.in || die
28         fi
29         elibtoolize
30 }
31
32 multilib_src_configure() {
33         local myeconfargs=(
34                 $(use_enable cpu_flags_x86_sse intel-sse)
35                 $(use_enable static-libs static)
36                 --enable-arm-neon=$(usex neon)
37         )
38         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
39 }
40
41 multilib_src_install_all() {
42         DOCS=( ANNOUNCE CHANGES libpng-manual.txt README TODO )
43         einstalldocs
44         find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
45 }