summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-07 22:49:15 +0000
committerSam James <sam@gentoo.org>2021-06-07 22:49:15 +0000
commit6baee4934267902830386919bf7470a9574b5dc4 (patch)
tree44bf1d9d54dcc4e6e2e558e3c4b1f6d3d1213f13 /dev-ml
parentapp-emulation/libguestfs: add 1.44.1 (diff)
downloadgentoo-6baee4934267902830386919bf7470a9574b5dc4.tar.gz
gentoo-6baee4934267902830386919bf7470a9574b5dc4.tar.bz2
gentoo-6baee4934267902830386919bf7470a9574b5dc4.zip
dev-ml/ocaml-gettext: Revert "drop 0.3.7-r3"
This reverts commit 5f94abf337d587ca1b72bd13bc10c6c255ba81e1. It's useful to keep this older version around for now to ease upgrades for users. Closes: https://bugs.gentoo.org/788634 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/ocaml-gettext/Manifest1
-rw-r--r--dev-ml/ocaml-gettext/files/ocaml-unsafe-string.patch17
-rw-r--r--dev-ml/ocaml-gettext/ocaml-gettext-0.3.7-r3.ebuild76
3 files changed, 94 insertions, 0 deletions
diff --git a/dev-ml/ocaml-gettext/Manifest b/dev-ml/ocaml-gettext/Manifest
index 839e7295801b..045151ba25a0 100644
--- a/dev-ml/ocaml-gettext/Manifest
+++ b/dev-ml/ocaml-gettext/Manifest
@@ -1 +1,2 @@
+DIST ocaml-gettext-0.3.7.tar.gz 134316 BLAKE2B 9de6ef9e04afbb6001ddc5ef145a687ad88a20eef1c27d3a3e6136f81ad46100cc6496cb66e3edfbf0f7eacfa8abbccb44d846d2f676862c96b8ceb860d8f424 SHA512 1358320359b9d2f3fd97a47d69b2a619942a65605c1e5cbf25e33ef42a10273167b526bca15e6c9523b87d8ea9dfd3215334050ad8eb84a8c41d4feef880a27a
DIST ocaml-gettext-0.4.2.tar.gz 110249 BLAKE2B 54a25ba9f8fb20194fdfaf651586222fab68f927ebfa711812f7c9a387ff40c19e1bf3f63124127356b32b0ca0be2c5ff4e1cdfaf5f3afe690b90c0ca96c470d SHA512 fb89be8d8d9e0ed9327b81a0c81c884ff3f1a97e46b475ef8084abded5c84a256de05d5aa0f42be94f43ab438276a4506af726b6950e4161359a9616fb5832ec
diff --git a/dev-ml/ocaml-gettext/files/ocaml-unsafe-string.patch b/dev-ml/ocaml-gettext/files/ocaml-unsafe-string.patch
new file mode 100644
index 000000000000..8d0a12c80d0e
--- /dev/null
+++ b/dev-ml/ocaml-gettext/files/ocaml-unsafe-string.patch
@@ -0,0 +1,17 @@
+diff --git a/ConfMakefile.in b/ConfMakefile.in
+index 5a1e9ea..b562698 100644
+--- a/ConfMakefile.in
++++ b/ConfMakefile.in
+@@ -37,9 +37,9 @@ OCAMLLIB=@OCAMLLIB@
+ OCAMLFIND_COMMANDS = "ocamlc=@OCAMLC@ \
+ ocamlopt=@OCAMLOPT@ \
+ ocamldep=@OCAMLDEP@"
+-OCAMLC = @OCAMLFIND@ ocamlc
+-OCAMLOPT = @OCAMLFIND@ ocamlopt
+-OCAMLDEP = @OCAMLFIND@ ocamldep
++OCAMLC = @OCAMLFIND@ ocamlc -unsafe-string
++OCAMLOPT = @OCAMLFIND@ ocamlopt -unsafe-string
++OCAMLDEP = @OCAMLFIND@ ocamldep -unsafe-string
+ OCAMLBEST = @OCAMLBEST@
+ OCAMLVERSION = @OCAMLVERSION@
+ OCAMLFIND = @OCAMLFIND@
diff --git a/dev-ml/ocaml-gettext/ocaml-gettext-0.3.7-r3.ebuild b/dev-ml/ocaml-gettext/ocaml-gettext-0.3.7-r3.ebuild
new file mode 100644
index 000000000000..7af5b26e0ad4
--- /dev/null
+++ b/dev-ml/ocaml-gettext/ocaml-gettext-0.3.7-r3.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools findlib
+
+DESCRIPTION="Provides support for internationalization of OCaml program"
+HOMEPAGE="https://github.com/gildor478/ocaml-gettext"
+SRC_URI="https://github.com/gildor478/ocaml-gettext/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1-with-linking-exception"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+PATCHES=( "${FILESDIR}"/ocaml-unsafe-string.patch )
+
+BDEPEND="
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ )
+"
+# OCaml 4.10 does not support -unsafe-string by default
+# bug #666149
+RDEPEND="
+ >=dev-lang/ocaml-3.12.1:=
+ <dev-lang/ocaml-4.10.0:=
+ >=dev-ml/ocaml-fileutils-0.4.0:=
+ >=dev-ml/camomile-0.8.3:=
+ sys-devel/gettext
+ dev-ml/camlp4:=
+ !dev-ml/ocaml-gettext-stub
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-ml/ounit2 )
+"
+
+src_prepare() {
+ default
+
+ # Porting to dev-ml/ounit2
+ sed -i \
+ -e 's/OCAMLFIND_CHECK_MODULE(oUnit/OCAMLFIND_CHECK_MODULE(ounit2/' \
+ configure.in || die
+ sed -i \
+ -e 's/oUnit/ounit2/' \
+ test/Makefile || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-docbook-stylesheet="${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets/" \
+ $(use_enable doc) \
+ $(use_enable test)
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ findlib_src_preinst
+ emake -j1 DESTDIR="${D}" \
+ BINDIR="${ED}/usr/bin" \
+ PODIR="${ED}/usr/share/locale/" \
+ DOCDIR="${ED}/usr/share/doc/${PF}" \
+ MANDIR="${ED}/usr/share/man" \
+ install
+ dodoc CHANGELOG README THANKS TODO
+}