Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/camomile/files/, dev-ml/camomile/
Date: Fri, 14 Aug 2020 23:23:42
Message-Id: 1597447412.74cf47dd94181c32254ce87aa89de3e360db6922.sam@gentoo
1 commit: 74cf47dd94181c32254ce87aa89de3e360db6922
2 Author: Hank Leininger <hlein <AT> korelogic <DOT> com>
3 AuthorDate: Sun Aug 2 22:21:40 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 14 23:23:32 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74cf47dd
7
8 dev-ml/camomile: ocaml-4.09 compat fixes
9
10 Existing ebuild will not build with ocaml-4.09, only with older versions
11 that have an outstanding GLSA (202007-48). ocaml-4.09 is being
12 stabilized now. This commit just uses the existing workaround/fix in
13 b.g.o and updates the ebuild to EAPI=7.
14
15 Note that EAPI7 required modifying an existing patch so it will apply
16 with -p1; should still work with the old ebuild that uses epatch.
17
18 Updated to address feedback in https://github.com/gentoo/gentoo/pull/16964
19
20 Signed-off-by: Hank Leininger <hlein <AT> korelogic.com>
21 Closes: https://bugs.gentoo.org/704102
22 Bug: https://bugs.gentoo.org/708696
23 Package-Manager: Portage-3.0.0, Repoman-2.3.23
24 Closes: https://github.com/gentoo/gentoo/pull/16964
25 Signed-off-by: Sam James <sam <AT> gentoo.org>
26
27 dev-ml/camomile/camomile-0.8.5-r2.ebuild | 47 +++++++++++++++++++++++++
28 dev-ml/camomile/files/ocaml-unsafe-string.patch | 13 +++++++
29 dev-ml/camomile/files/ocaml405.patch | 12 +++----
30 3 files changed, 66 insertions(+), 6 deletions(-)
31
32 diff --git a/dev-ml/camomile/camomile-0.8.5-r2.ebuild b/dev-ml/camomile/camomile-0.8.5-r2.ebuild
33 new file mode 100644
34 index 00000000000..437035c55c9
35 --- /dev/null
36 +++ b/dev-ml/camomile/camomile-0.8.5-r2.ebuild
37 @@ -0,0 +1,47 @@
38 +# Copyright 1999-2020 Gentoo Authors
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=7
42 +
43 +inherit findlib eutils
44 +
45 +DESCRIPTION="Camomile is a comprehensive Unicode library for ocaml"
46 +HOMEPAGE="https://github.com/yoriyuki/Camomile/wiki"
47 +SRC_URI="https://github.com/yoriyuki/Camomile/releases/download/rel-${PV}/${P}.tar.bz2"
48 +
49 +LICENSE="LGPL-2"
50 +SLOT="0/${PV}"
51 +KEYWORDS="~amd64 ~ppc ~x86"
52 +IUSE="debug +ocamlopt"
53 +
54 +PATCHES=( "${FILESDIR}"/ocaml-unsafe-string.patch )
55 +
56 +RDEPEND="
57 + >=dev-lang/ocaml-3.10.2:=[ocamlopt?]
58 + dev-ml/camlp4:=
59 +"
60 +DEPEND="${RDEPEND}"
61 +
62 +src_prepare() {
63 + default
64 +
65 + if has_version '>=dev-lang/ocaml-4.05_beta'; then
66 + eapply "${FILESDIR}/ocaml405.patch"
67 + fi
68 +}
69 +
70 +src_configure() {
71 + econf $(use_enable debug)
72 +}
73 +
74 +src_compile() {
75 + emake -j1 byte unidata unimaps charmap_data locale_data
76 + if use ocamlopt; then
77 + emake -j1 opt
78 + fi
79 +}
80 +
81 +src_install() {
82 + dodir /usr/bin
83 + findlib_src_install DATADIR="${D}/usr/share" BINDIR="${D}/usr/bin"
84 +}
85
86 diff --git a/dev-ml/camomile/files/ocaml-unsafe-string.patch b/dev-ml/camomile/files/ocaml-unsafe-string.patch
87 new file mode 100644
88 index 00000000000..49139d61ada
89 --- /dev/null
90 +++ b/dev-ml/camomile/files/ocaml-unsafe-string.patch
91 @@ -0,0 +1,13 @@
92 +--- a/Makefile.in 2013-09-15 02:48:38.000000000 -0500
93 ++++ b/Makefile.in 2020-07-03 00:43:13.639039206 -0500
94 +@@ -48,8 +48,8 @@
95 + OCAMLMKLIB = @OCAMLMKLIB@
96 +
97 + # compiler options
98 +-BOPTIONS = @DEBUG@ @ASSERT@
99 +-OOPTIONS = @COPTIONS@ @PROFILE@ @ASSERT@
100 ++BOPTIONS =@DEBUG@ @ASSERT@ -unsafe-string
101 ++OOPTIONS =@COPTIONS@ @PROFILE@ @ASSERT@ -unsafe-string
102 +
103 + #
104 + PACKAGE = camomile
105
106 diff --git a/dev-ml/camomile/files/ocaml405.patch b/dev-ml/camomile/files/ocaml405.patch
107 index 3fec6955a27..9648708f669 100644
108 --- a/dev-ml/camomile/files/ocaml405.patch
109 +++ b/dev-ml/camomile/files/ocaml405.patch
110 @@ -12,10 +12,10 @@ Date: Fri Feb 24 22:30:23 2017 -0500
111 (see MPR#7414, GPR#929). This commit adds enough annotations to avoid
112 such underspecified variables in functors.
113
114 -diff --git a/Camomile/internal/unimap.ml b/Camomile/internal/unimap.ml
115 +diff --git a/internal/unimap.ml b/internal/unimap.ml
116 index b6fdbde..6a7cc30 100644
117 ---- a/Camomile/internal/unimap.ml
118 -+++ b/Camomile/internal/unimap.ml
119 +--- a/internal/unimap.ml
120 ++++ b/internal/unimap.ml
121 @@ -58,7 +58,7 @@ val of_name : string -> t
122 end
123
124 @@ -25,10 +25,10 @@ index b6fdbde..6a7cc30 100644
125
126 type mapping = {no_char : int; tbl : Tbl31.Bytes.t}
127
128 -diff --git a/Camomile/public/uCharInfo.ml b/Camomile/public/uCharInfo.ml
129 +diff --git a/public/uCharInfo.ml b/public/uCharInfo.ml
130 index 69bf141..6a0337a 100644
131 ---- a/Camomile/public/uCharInfo.ml
132 -+++ b/Camomile/public/uCharInfo.ml
133 +--- a/public/uCharInfo.ml
134 ++++ b/public/uCharInfo.ml
135 @@ -298,7 +298,7 @@ val load_composition_exclusion_tbl : unit -> UCharTbl.Bool.t
136
137 end