summaryrefslogtreecommitdiff
blob: 3d79cb05c00029d32ad4e7ed0c19a1c6b6f1f08b (plain)
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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

MY_PN=${PN/-stub/}
MY_P=${P/-stub/}
DUNE_PKG_NAME="gettext-stub"
inherit dune

DESCRIPTION="Support for internationalization of OCaml programs using native gettext library"
HOMEPAGE="https://github.com/gildor478/ocaml-gettext"
SRC_URI="https://github.com/gildor478/ocaml-gettext/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
S="${WORKDIR}/${MY_PN}-${PV}"

LICENSE="LGPL-2.1-with-linking-exception"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="+ocamlopt test"
RESTRICT="!test? ( test )"

BDEPEND="
	>=dev-ml/cppo-1.6.6
	dev-ml/dune-configurator
"
RDEPEND="
	dev-ml/base:=
	dev-ml/camomile:=[ocamlopt=]
	dev-ml/ocaml-gettext:=
	!<dev-ml/ocaml-gettext-0.4.2
"
DEPEND="
	${RDEPEND}
	test? (
		dev-ml/ocaml-fileutils
		dev-ml/ounit2[ocamlopt=]
	)
"

src_prepare() {
	default

	# Port to dev-ml/ounit2
	sed -i -e 's/oUnit/ounit2/' test/{,common,test-camomile,test-stub}/dune || die
}