media-libs/gegl: Drop to ~hppa
[gentoo.git] / media-libs / gegl / gegl-0.3.26.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python2_7 )
6
7 # vala and introspection support is broken, bug #468208
8 VALA_USE_DEPEND=vapigen
9
10 inherit versionator gnome2-utils eutils autotools python-any-r1 vala
11
12 if [[ ${PV} == *9999* ]]; then
13         inherit autotools git-r3
14         EGIT_REPO_URI="git://git.gnome.org/gegl"
15         SRC_URI=""
16 else
17         SRC_URI="http://download.gimp.org/pub/${PN}/${PV:0:3}/${P}.tar.bz2"
18         KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ppc64 ~sparc x86 ~amd64-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
19 fi
20
21 DESCRIPTION="A graph based image processing framework"
22 HOMEPAGE="http://www.gegl.org/"
23
24 LICENSE="|| ( GPL-3 LGPL-3 )"
25 SLOT="0.3"
26
27 IUSE="cairo cpu_flags_x86_mmx cpu_flags_x86_sse debug ffmpeg +introspection jpeg2k lcms lensfun openexr raw sdl svg test tiff umfpack vala v4l webp"
28 REQUIRED_USE="
29         svg? ( cairo )
30         vala? ( introspection )
31 "
32
33 # NOTE: Even current libav 11.4 does not have AV_CODEC_CAP_VARIABLE_FRAME_SIZE
34 #       so there is no chance to support libav right now (Gentoo bug #567638)
35 #       If it returns, please check prior GEGL ebuilds for how libav was integrated.  Thanks!
36 RDEPEND="
37         >=dev-libs/glib-2.44:2
38         dev-libs/json-glib
39         >=media-libs/babl-0.1.38
40         sys-libs/zlib
41         >=x11-libs/gdk-pixbuf-2.32:2
42         x11-libs/pango
43
44         cairo? ( >=x11-libs/cairo-1.12.2 )
45         ffmpeg? (
46                 >=media-video/ffmpeg-2.8:0=
47         )
48         introspection? ( >=dev-libs/gobject-introspection-1.32:= )
49         virtual/jpeg:0=
50         jpeg2k? ( >=media-libs/jasper-1.900.1:= )
51         lcms? ( >=media-libs/lcms-2.8:2 )
52         lensfun? ( >=media-libs/lensfun-0.2.5 )
53         openexr? ( >=media-libs/openexr-1.6.1:= )
54         >=media-libs/libpng-1.6.0:0=
55         raw? ( >=media-libs/libraw-0.15.4:0= )
56         sdl? ( >=media-libs/libsdl-1.2.0 )
57         svg? ( >=gnome-base/librsvg-2.40.6:2 )
58         tiff? ( >=media-libs/tiff-4:0 )
59         umfpack? ( sci-libs/umfpack )
60         v4l? ( >=media-libs/libv4l-1.0.1 )
61         webp? ( >=media-libs/libwebp-0.5.0:= )
62 "
63 DEPEND="${RDEPEND}
64         >=dev-util/gtk-doc-am-1
65         >=sys-devel/gettext-0.19.8
66         dev-lang/perl
67         virtual/pkgconfig
68         >=sys-devel/libtool-2.2
69         test? ( introspection? (
70                 $(python_gen_any_dep '>=dev-python/pygobject-3.2[${PYTHON_USEDEP}]') ) )
71         vala? ( $(vala_depend) )
72 "
73
74 pkg_setup() {
75         use test && use introspection && python-any-r1_pkg_setup
76 }
77
78 PATCHES=(
79         "${FILESDIR}"/${PN}-0.3.12-failing-tests.patch
80 )
81
82 src_prepare() {
83         default
84
85         # FIXME: the following should be proper patch sent to upstream
86         # fix OSX loadable module filename extension
87         sed -i -e 's/\.dylib/.bundle/' configure.ac || die
88         # don't require Apple's OpenCL on versions of OSX that don't have it
89         if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -le 9 ]] ; then
90                 sed -i -e 's/#ifdef __APPLE__/#if 0/' gegl/opencl/* || die
91         fi
92
93         # commit 7c78497b : tests that use gegl.png are broken on non-amd64
94         sed -e '/clones.xml/d' \
95                 -e '/composite-transform.xml/d' \
96                 -i tests/compositions/Makefile.am || die
97
98         eautoreconf
99
100         gnome2_environment_reset
101
102         use vala && vala_src_prepare
103 }
104
105 src_configure() {
106         # never enable altering of CFLAGS via profile option
107         # libspiro: not in portage main tree
108         # disable documentation as the generating is bit automagic
109         #    if anyone wants to work on it just create bug with patch
110
111         # Also please note that:
112         #
113         #  - Some auto-detections are not patched away since the docs are
114         #    not built (--disable-docs, lack of --enable-gtk-doc) and these
115         #    tools affect re-generation of docs, only
116         #    (e.g. ruby, asciidoc, dot (of graphviz), enscript)
117         #
118         #  - Parameter --with-exiv2 compiles a noinst-app only, no use
119         #
120         #  - Parameter --disable-workshop disables any use of Lua, effectivly
121         #
122         #  - v4l support does not work with our media-libs/libv4l-0.8.9,
123         #    upstream bug at https://bugzilla.gnome.org/show_bug.cgi?id=654675
124         #
125         #  - There are two checks for dot, one controllable by --with(out)-graphviz
126         #    which toggles HAVE_GRAPHVIZ that is not used anywhere.  Yes.
127         #
128         #  - mrg is not in tree and gexiv2 support only has effect when mrg support
129         #    is enabled
130         #
131         # So that's why USE="exif graphviz lua v4l" got resolved.  More at:
132         # https://bugs.gentoo.org/show_bug.cgi?id=451136
133         #
134         econf \
135                 --disable-docs \
136                 --disable-profile \
137                 --disable-silent-rules \
138                 --disable-workshop \
139                 --program-suffix=-${SLOT} \
140                 --with-gdk-pixbuf \
141                 --with-pango \
142                 --without-libspiro \
143                 $(use_enable cpu_flags_x86_mmx mmx) \
144                 $(use_enable cpu_flags_x86_sse sse) \
145                 $(use_enable debug) \
146                 $(use_with cairo) \
147                 $(use_with cairo pangocairo) \
148                 --without-exiv2 \
149                 $(use_with ffmpeg libavformat) \
150                 --without-gexiv2 \
151                 --without-graphviz \
152                 $(use_with jpeg2k jasper) \
153                 $(use_with lcms) \
154                 $(use_with lensfun) \
155                 --without-lua \
156                 --without-mrg \
157                 $(use_with openexr) \
158                 $(use_with raw libraw) \
159                 $(use_with sdl) \
160                 $(use_with svg librsvg) \
161                 $(use_with tiff libtiff) \
162                 $(use_with umfpack) \
163                 $(use_with v4l libv4l) \
164                 $(use_with v4l libv4l2) \
165                 $(use_enable introspection) \
166                 $(use_with vala) \
167                 $(use_with webp)
168 }
169
170 src_compile() {
171         default
172
173         [[ ${PV} == *9999* ]] && emake ./ChangeLog  # "./" prevents "Circular ChangeLog <- ChangeLog dependency dropped."
174 }
175
176 src_install() {
177         default
178         prune_libtool_files --all
179 }