Drop $Id$ per council decision in bug #611234.
[gentoo.git] / media-libs / libwebp / libwebp-0.5.2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit autotools eutils libtool multilib-minimal
6
7 DESCRIPTION="A lossy image compression format"
8 HOMEPAGE="https://developers.google.com/speed/webp/download"
9 SRC_URI="http://downloads.webmproject.org/releases/webp/${P}.tar.gz"
10
11 LICENSE="BSD"
12 SLOT="0/6" # subslot = libwebp soname version
13 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~m68k-mint"
14 IUSE="cpu_flags_x86_avx2 cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 experimental gif +jpeg neon opengl +png static-libs swap-16bit-csp tiff"
15
16 # TODO: dev-lang/swig bindings in swig/ subdirectory
17 RDEPEND="gif? ( media-libs/giflib:= )
18         jpeg? ( virtual/jpeg:0= )
19         opengl? (
20                 media-libs/freeglut
21                 virtual/opengl
22                 )
23         png? ( media-libs/libpng:0= )
24         tiff? ( media-libs/tiff:0= )"
25 DEPEND="${RDEPEND}"
26
27 ECONF_SOURCE=${S}
28
29 src_prepare() {
30         default
31
32         # Fix libtool relinking, bug 499270.
33         #elibtoolize
34         eautoreconf
35 }
36
37 multilib_src_configure() {
38         local args=(
39                 --enable-libwebpmux
40                 --enable-libwebpdemux
41                 --enable-libwebpdecoder
42                 $(use_enable static-libs static)
43                 $(use_enable swap-16bit-csp)
44                 $(use_enable experimental)
45                 $(use_enable jpeg)
46                 $(use_enable png)
47                 $(use_enable opengl gl)
48                 $(use_enable tiff)
49
50                 $(use_enable cpu_flags_x86_avx2 avx2)
51                 $(use_enable cpu_flags_x86_sse2 sse2)
52                 $(use_enable cpu_flags_x86_sse4_1 sse4.1)
53                 $(use_enable neon)
54
55                 # Only used for gif2webp binary wrt #486646
56                 $(multilib_native_use_enable gif)
57         )
58
59         econf "${args[@]}"
60 }
61
62 multilib_src_install() {
63         emake DESTDIR="${D}" install
64 }
65
66 multilib_src_install_all() {
67         prune_libtool_files
68         dodoc AUTHORS ChangeLog doc/*.txt NEWS README{,.mux}
69 }