1 |
|
# Copyright 1999-2023 Gentoo Authors
|
|
1 |
# Copyright 2019-2022 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=8
|
|
4 |
EAPI=7
|
5 |
5 |
|
6 |
|
DESCRIPTION="Objective CAML interface for Gtk+2"
|
7 |
|
HOMEPAGE="http://lablgtk.forge.ocamlcore.org"
|
8 |
|
SRC_URI="https://github.com/garrigue/lablgtk/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
9 |
|
|
10 |
|
LICENSE="LGPL-2.1-with-linking-exception examples? ( lablgtk-examples )"
|
11 |
|
SLOT="2/${PV}"
|
12 |
|
KEYWORDS="amd64 arm arm64 ~ia64 ~ppc ppc64 x86 ~amd64-linux ~x86-linux"
|
13 |
|
IUSE="debug examples glade gnomecanvas +ocamlopt sourceview spell svg"
|
14 |
|
|
15 |
|
DEPEND=">=dev-lang/ocaml-4.05:=[ocamlopt?]
|
16 |
|
dev-ml/camlp4:=
|
17 |
|
x11-libs/gtk+:2
|
18 |
|
glade? ( gnome-base/libglade )
|
19 |
|
gnomecanvas? ( gnome-base/libgnomecanvas )
|
20 |
|
sourceview? ( x11-libs/gtksourceview:2.0 )
|
21 |
|
spell? ( app-text/gtkspell:2 )
|
22 |
|
svg? ( gnome-base/librsvg:2 )"
|
23 |
|
RDEPEND="${DEPEND}"
|
24 |
|
BDEPEND="dev-ml/findlib
|
25 |
|
virtual/pkgconfig"
|
|
6 |
DUNE_PKG_NAME=lablgtk3
|
|
7 |
inherit dune
|
26 |
8 |
|
27 |
|
DOCS=( CHANGES README CHANGES.API )
|
|
9 |
DESCRIPTION="OCaml bindings to GTK-3"
|
|
10 |
HOMEPAGE="https://github.com/garrigue/lablgtk"
|
|
11 |
SRC_URI="https://github.com/garrigue/lablgtk/releases/download/${PV}/${DUNE_PKG_NAME}-${PV}.tbz"
|
|
12 |
|
|
13 |
LICENSE="LGPL-2.1-with-linking-exception"
|
|
14 |
SLOT="3/${PV}"
|
|
15 |
KEYWORDS="amd64 ~arm ~arm64 ~ppc ppc64 x86"
|
|
16 |
IUSE="+ocamlopt sourceview"
|
|
17 |
|
|
18 |
BDEPEND="dev-ml/camlp5"
|
|
19 |
DEPEND="
|
|
20 |
app-text/gtkspell:3=
|
|
21 |
x11-libs/gtk+:3=
|
|
22 |
dev-ml/cairo2:=
|
|
23 |
x11-libs/gtksourceview:3.0=
|
|
24 |
"
|
|
25 |
RDEPEND="${DEPEND}"
|
|
26 |
PDEPEND="sourceview? ( dev-ml/lablgtk-sourceview:${SLOT} )"
|
28 |
27 |
|
29 |
|
PATCHES=(
|
30 |
|
"${FILESDIR}"/${PN}-2.18.12-cflags.patch
|
31 |
|
"${FILESDIR}"/${PN}-2.18.12-Makefile.patch
|
32 |
|
"${FILESDIR}"/${PN}-2.18.12-depend.patch
|
33 |
|
)
|
34 |
|
|
35 |
|
src_configure() {
|
36 |
|
local myeconfargs=(
|
37 |
|
$(use_enable debug)
|
38 |
|
$(use_with svg rsvg)
|
39 |
|
$(use_with glade)
|
40 |
|
--without-gnomeui
|
41 |
|
--without-panel
|
42 |
|
# relies on EOL gtkglarea
|
43 |
|
--without-gl
|
44 |
|
$(use_with spell gtkspell)
|
45 |
|
--without-gtksourceview
|
46 |
|
$(use_with sourceview gtksourceview2)
|
47 |
|
$(use_with gnomecanvas)
|
48 |
|
)
|
49 |
|
|
50 |
|
econf "${myeconfargs[@]}"
|
51 |
|
}
|
52 |
|
|
53 |
|
src_compile() {
|
54 |
|
# parallel build crashes
|
55 |
|
emake -j1 all CFLAGS="${CFLAGS}"
|
56 |
|
if use ocamlopt; then
|
57 |
|
emake -j1 opt CFLAGS="${CFLAGS}"
|
58 |
|
fi
|
59 |
|
}
|
60 |
|
|
61 |
|
src_install() {
|
62 |
|
local destdir="$(ocamlfind printconf destdir || die)"
|
63 |
|
dodir "${destdir}/stublibs"
|
64 |
|
export OCAMLFIND_DESTDIR=${ED}"${destdir}"
|
65 |
|
export OCAMLPATH="${ED}${destdir}"
|
66 |
|
export OCAMLFIND_LDCONF=ignore
|
67 |
|
|
68 |
|
default
|
69 |
|
rm "${ED}/usr/$(get_libdir)/ocaml/ld.conf" || die
|
70 |
|
dosym lablgtk2/liblablgtk2.a \
|
71 |
|
/usr/$(get_libdir)/ocaml/liblablgtk2.a
|
72 |
|
use sourceview && \
|
73 |
|
dosym lablgtk2/liblablgtksourceview2.a \
|
74 |
|
/usr/$(get_libdir)/ocaml/liblablgtksourceview2.a
|
75 |
|
|
76 |
|
if use examples; then
|
77 |
|
dodoc -r examples/
|
78 |
|
docompress -x /usr/share/doc/${PF}/examples
|
79 |
|
fi
|
80 |
|
}
|
|
28 |
S="${WORKDIR}/${DUNE_PKG_NAME}-${PV}"
|