forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gecode-4.4.0-r2.ebuild
81 lines (66 loc) · 1.53 KB
/
gecode-4.4.0-r2.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools qmake-utils
DESCRIPTION="An environment for developing constraint-based applications"
HOMEPAGE="http://www.gecode.org/"
SRC_URI="http://www.gecode.org/download/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples gist gmp"
RDEPEND="
gist? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtprintsupport:5
dev-qt/qtwidgets:5
)
gmp? (
dev-libs/gmp:0
dev-libs/mpfr:0
)"
DEPEND="${RDEPEND}
sys-devel/bison
sys-devel/flex
doc? (
app-doc/doxygen
media-gfx/graphviz
)"
PATCHES=( "${FILESDIR}/${PN}-4.4.0-no-examples.patch" )
src_prepare() {
default
sed -i gecode.m4 \
-e "s/-ggdb//" -e "s/-O3//" -e "s/-pipe//" \
-e "/AC_CHECK_PROGS(QMAKE/a AC_SUBST(QMAKE,$(qt5_get_bindir)/qmake)" \
-e "/AC_CHECK_PROGS(MOC/a AC_SUBST(MOC,$(qt5_get_bindir)/moc)" \
|| die
eautoreconf
}
src_configure() {
# --disable-examples prevents COMPILING the examples.
econf \
--disable-examples \
$(use_enable doc doc-dot) \
$(use_enable doc doc-tagfile) \
$(use_enable gist qt) \
$(use_enable gist) \
$(use_enable gmp mpfr)
}
src_compile() {
default
use doc && emake doc
}
src_test() {
LD_LIBRARY_PATH="${S}" emake test
LD_LIBRARY_PATH="${S}" ./test/test || die "test suite failed"
}
src_install() {
default
# The --docdir and --htmldir that we pass to configure don't seem to
# be respected...
use doc && dodoc -r doc/html/
if use examples; then
dodoc -r examples
fi
}