forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
camlimages-4.2.2.ebuild
65 lines (56 loc) · 1.74 KB
/
camlimages-4.2.2.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils vcs-snapshot findlib multilib
DESCRIPTION="An image manipulation library for ocaml"
HOMEPAGE="http://gallium.inria.fr/camlimages/"
SRC_URI="https://bitbucket.org/camlspotter/camlimages/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0/${PV}"
KEYWORDS="~amd64 ppc x86"
IUSE="doc exif gif gtk jpeg png postscript tiff truetype X xpm"
RDEPEND=">=dev-lang/ocaml-3.10.2:=[X?,ocamlopt]
exif? ( media-libs/libexif )
gif? ( media-libs/giflib )
gtk? ( dev-ml/lablgtk )
jpeg? ( virtual/jpeg )
tiff? ( media-libs/tiff )
png? ( >=media-libs/libpng-1.4:0 )
postscript? ( app-text/ghostscript-gpl )
truetype? ( >=media-libs/freetype-2 )
xpm? ( x11-libs/libXpm )
X? ( x11-apps/rgb )
sys-libs/zlib
"
DEPEND="${DEPEND}
doc? ( dev-python/sphinx[latex] )
dev-util/omake
virtual/pkgconfig
dev-ml/findlib"
camlimages_arg_want() {
echo "ARG_WANT_${2}=$(usex $1 1 0)"
}
src_compile() {
omake \
$(camlimages_arg_want exif EXIF ) \
$(camlimages_arg_want gif GIF ) \
$(camlimages_arg_want png PNG ) \
$(camlimages_arg_want jpeg JPEG ) \
$(camlimages_arg_want tiff TIFF ) \
$(camlimages_arg_want xpm XPM ) \
$(camlimages_arg_want postscript GS ) \
$(camlimages_arg_want gtk LABLGTK2) \
$(camlimages_arg_want X GRAPHICS) \
$(camlimages_arg_want truetype FREETYPE) \
PATH_GS=/bin/true \
--force-dotomake || die
if use doc ; then
sphinx-build doc/sphinx sphinxdoc || die
fi
}
src_install() {
findlib_src_preinst
omake --force-dotomake DESTDIR="${D}" install || die
dodoc README.md
use doc && dohtml -r sphinxdoc/*
}