Gentoo Archives: gentoo-commits

From: Mark Wright <gienah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/ocaml-expat/, dev-ml/ocaml-expat/files/
Date: Tue, 13 Oct 2020 12:54:24
Message-Id: 1602593627.01eca61dc9047c1892a8988f2dd4cc4672c96107.gienah@gentoo
1 commit: 01eca61dc9047c1892a8988f2dd4cc4672c96107
2 Author: Mark Wright <gienah <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 13 12:03:00 2020 +0000
4 Commit: Mark Wright <gienah <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 13 12:53:47 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01eca61d
7
8 dev-ml/ocaml-expat: EAPI=7, KEYWORDS from ml-overlay.
9
10 Co-Author: Alexis Ballier <aballier <AT> gentoo.org>
11 Package-Manager: Portage-3.0.8, Repoman-3.0.1
12 Signed-off-by: Mark Wright <gienah <AT> gentoo.org>
13
14 dev-ml/ocaml-expat/files/ounit2.patch | 17 +++++++++
15 dev-ml/ocaml-expat/metadata.xml | 11 ++++--
16 dev-ml/ocaml-expat/ocaml-expat-1.1.0-r1.ebuild | 51 ++++++++++++++++++++++++++
17 3 files changed, 75 insertions(+), 4 deletions(-)
18
19 diff --git a/dev-ml/ocaml-expat/files/ounit2.patch b/dev-ml/ocaml-expat/files/ounit2.patch
20 new file mode 100644
21 index 00000000000..5cbcc4e12b9
22 --- /dev/null
23 +++ b/dev-ml/ocaml-expat/files/ounit2.patch
24 @@ -0,0 +1,17 @@
25 +Index: ocaml-expat-1.1.0/Makefile
26 +===================================================================
27 +--- ocaml-expat-1.1.0.orig/Makefile
28 ++++ ocaml-expat-1.1.0/Makefile
29 +@@ -85,10 +85,10 @@ test: unittest
30 + testopt: unittest.opt
31 + ./unittest.opt
32 + unittest: all unittest.ml
33 +- $(OCAMLFIND) ocamlc -o unittest -package oUnit -ccopt -L. -linkpkg \
34 ++ $(OCAMLFIND) ocamlc -o unittest -package ounit2 -ccopt -L. -linkpkg \
35 + $(ARCHIVE) unittest.ml
36 + unittest.opt: allopt unittest.ml
37 +- $(OCAMLFIND) ocamlopt -o unittest.opt -package oUnit -ccopt -L. -linkpkg \
38 ++ $(OCAMLFIND) ocamlopt -o unittest.opt -package ounit2 -ccopt -L. -linkpkg \
39 + $(XARCHIVE) unittest.ml
40 +
41 + ## Cleaning up
42
43 diff --git a/dev-ml/ocaml-expat/metadata.xml b/dev-ml/ocaml-expat/metadata.xml
44 index b6a93442203..f91d68f6062 100644
45 --- a/dev-ml/ocaml-expat/metadata.xml
46 +++ b/dev-ml/ocaml-expat/metadata.xml
47 @@ -1,8 +1,11 @@
48 <?xml version="1.0" encoding="UTF-8"?>
49 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
50 <pkgmetadata>
51 - <!-- maintainer-needed -->
52 - <upstream>
53 - <remote-id type="github">whitequark/ocaml-expat</remote-id>
54 - </upstream>
55 + <maintainer type="person">
56 + <email>gienah@g.o</email>
57 + <name>Mark Wright</name>
58 + </maintainer>
59 + <upstream>
60 + <remote-id type="github">whitequark/ocaml-expat</remote-id>
61 + </upstream>
62 </pkgmetadata>
63
64 diff --git a/dev-ml/ocaml-expat/ocaml-expat-1.1.0-r1.ebuild b/dev-ml/ocaml-expat/ocaml-expat-1.1.0-r1.ebuild
65 new file mode 100644
66 index 00000000000..152a3ca7fbf
67 --- /dev/null
68 +++ b/dev-ml/ocaml-expat/ocaml-expat-1.1.0-r1.ebuild
69 @@ -0,0 +1,51 @@
70 +# Copyright 1999-2020 Gentoo Authors
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +EAPI=7
74 +
75 +inherit findlib
76 +
77 +IUSE="doc +ocamlopt test"
78 +
79 +DESCRIPTION="OCaml bindings for expat"
80 +SRC_URI="https://github.com/whitequark/ocaml-expat/archive/v${PV}.tar.gz -> ${P}.tar.gz"
81 +HOMEPAGE="https://github.com/whitequark/ocaml-expat"
82 +
83 +RDEPEND="dev-libs/expat
84 + >=dev-lang/ocaml-3.10.2:=[ocamlopt?]"
85 +
86 +DEPEND="${RDEPEND}
87 + test? ( dev-ml/ounit2 )"
88 +
89 +SLOT="0/${PV}"
90 +LICENSE="MIT"
91 +KEYWORDS="~amd64 ~arm ~arm64 ~x86"
92 +PATCHES=( "${FILESDIR}/ounit2.patch" )
93 +
94 +src_compile() {
95 + emake depend
96 + emake all
97 + if use ocamlopt; then
98 + emake allopt
99 + fi
100 + if use doc; then
101 + emake doc
102 + fi
103 +}
104 +
105 +src_test() {
106 + emake test
107 + if use ocamlopt; then
108 + emake testopt
109 + fi
110 +}
111 +src_install() {
112 + findlib_src_preinst
113 + emake install
114 +
115 + if use doc ; then
116 + docinto html
117 + dodoc -r doc/*
118 + fi
119 + dodoc README
120 +}