summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-21 00:37:25 +0000
committerSam James <sam@gentoo.org>2021-04-21 02:09:42 +0000
commit538c462a0e2e386eeb37a2966b3df4a84b431990 (patch)
tree4fd0cf297b275791838595fbd838518e261ddbf3 /dev-ml
parentdev-ml/uutf: port to EAPI 7 (diff)
downloadgentoo-538c462a0e2e386eeb37a2966b3df4a84b431990.tar.gz
gentoo-538c462a0e2e386eeb37a2966b3df4a84b431990.tar.bz2
gentoo-538c462a0e2e386eeb37a2966b3df4a84b431990.zip
dev-ml/xml-light: port to EAPI 7
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/xml-light/files/01_installopt.patch (renamed from dev-ml/xml-light/files/01_installopt.dpatch)12
-rw-r--r--dev-ml/xml-light/files/02_cmi_depends.dpatch18
-rw-r--r--dev-ml/xml-light/files/02_cmi_depends.patch10
-rw-r--r--dev-ml/xml-light/files/03_cflags.patch (renamed from dev-ml/xml-light/files/03_cflags.dpatch)12
-rw-r--r--dev-ml/xml-light/files/04_dtd_trace.dpatch26
-rw-r--r--dev-ml/xml-light/files/04_dtd_trace.patch18
-rw-r--r--dev-ml/xml-light/xml-light-2.2-r3.ebuild29
7 files changed, 48 insertions, 77 deletions
diff --git a/dev-ml/xml-light/files/01_installopt.dpatch b/dev-ml/xml-light/files/01_installopt.patch
index 1dfb50c9e271..d3a3d8457431 100644
--- a/dev-ml/xml-light/files/01_installopt.dpatch
+++ b/dev-ml/xml-light/files/01_installopt.patch
@@ -1,13 +1,5 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_installopt.dpatch by Sylvain Le Gall <gildor@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-@DPATCH@
-diff -urNad xml-light-2.2~/Makefile xml-light-2.2/Makefile
---- xml-light-2.2~/Makefile 2005-10-11 23:26:41.000000000 +0200
-+++ xml-light-2.2/Makefile 2005-10-11 23:28:00.000000000 +0200
+--- a/Makefile
++++ b/Makefile
@@ -11,8 +11,11 @@
opt: xml-light.cmxa test_opt.exe
diff --git a/dev-ml/xml-light/files/02_cmi_depends.dpatch b/dev-ml/xml-light/files/02_cmi_depends.dpatch
deleted file mode 100644
index 1fcf17048407..000000000000
--- a/dev-ml/xml-light/files/02_cmi_depends.dpatch
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_cmi_depends.dpatch by Sylvain Le Gall <gildor@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-@DPATCH@
-diff -urNad xml-light-2.2~/Makefile xml-light-2.2/Makefile
---- xml-light-2.2~/Makefile 2006-01-03 17:34:23.000000000 +0100
-+++ xml-light-2.2/Makefile 2006-01-03 17:35:04.000000000 +0100
-@@ -82,6 +82,6 @@
- .mll.ml:
- ocamllex $<
-
--.mly.ml:
-+%.mli %.ml: %.mly
- ocamlyacc $<
-
diff --git a/dev-ml/xml-light/files/02_cmi_depends.patch b/dev-ml/xml-light/files/02_cmi_depends.patch
new file mode 100644
index 000000000000..c1f4ce31d159
--- /dev/null
+++ b/dev-ml/xml-light/files/02_cmi_depends.patch
@@ -0,0 +1,10 @@
+--- a/Makefile
++++ b/Makefile
+@@ -82,6 +82,6 @@
+ .mll.ml:
+ ocamllex $<
+
+-.mly.ml:
++%.mli %.ml: %.mly
+ ocamlyacc $<
+
diff --git a/dev-ml/xml-light/files/03_cflags.dpatch b/dev-ml/xml-light/files/03_cflags.patch
index 5dfbffe5da1f..3895b2ad6872 100644
--- a/dev-ml/xml-light/files/03_cflags.dpatch
+++ b/dev-ml/xml-light/files/03_cflags.patch
@@ -1,13 +1,5 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_cflags.dpatch by Sylvain Le Gall <gildor@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-@DPATCH@
-diff -urNad xml-light-2.2~/Makefile xml-light-2.2/Makefile
---- xml-light-2.2~/Makefile 2006-10-26 00:22:41.000000000 +0200
-+++ xml-light-2.2/Makefile 2006-10-26 00:24:45.000000000 +0200
+--- a/Makefile
++++ b/Makefile
@@ -3,8 +3,8 @@
.SUFFIXES : .ml .mli .cmo .cmx .cmi .mll .mly
diff --git a/dev-ml/xml-light/files/04_dtd_trace.dpatch b/dev-ml/xml-light/files/04_dtd_trace.dpatch
deleted file mode 100644
index 9dbea4bdf0c8..000000000000
--- a/dev-ml/xml-light/files/04_dtd_trace.dpatch
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 04_dtd_trace.dpatch by Sylvain Le Gall <gildor@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-@DPATCH@
-diff -urNad xml-light-2.2~/dtd.ml xml-light-2.2/dtd.ml
---- xml-light-2.2~/dtd.ml 2005-02-18 10:01:54.000000000 +0100
-+++ xml-light-2.2/dtd.ml 2006-10-26 23:22:25.000000000 +0200
-@@ -267,7 +267,7 @@
- exception TmpResult of dtd_result
-
- let prove_child dtd tag =
-- trace dtd tag;
-+ (*trace dtd tag;*)
- match dtd.current with
- | DTDEmpty -> raise (Prove_error EmptyExpected)
- | DTDAny -> ()
-@@ -505,4 +505,4 @@
- sprintf "<!ELEMENT %s %s>" tag (etype_to_string etype)
-
- ;;
--to_string_ref := to_string
-\ No newline at end of file
-+to_string_ref := to_string
diff --git a/dev-ml/xml-light/files/04_dtd_trace.patch b/dev-ml/xml-light/files/04_dtd_trace.patch
new file mode 100644
index 000000000000..ac0da3cb5b86
--- /dev/null
+++ b/dev-ml/xml-light/files/04_dtd_trace.patch
@@ -0,0 +1,18 @@
+--- a/dtd.ml
++++ b/dtd.ml
+@@ -267,7 +267,7 @@
+ exception TmpResult of dtd_result
+
+ let prove_child dtd tag =
+- trace dtd tag;
++ (*trace dtd tag;*)
+ match dtd.current with
+ | DTDEmpty -> raise (Prove_error EmptyExpected)
+ | DTDAny -> ()
+@@ -505,4 +505,4 @@
+ sprintf "<!ELEMENT %s %s>" tag (etype_to_string etype)
+
+ ;;
+-to_string_ref := to_string
+\ No newline at end of file
++to_string_ref := to_string
diff --git a/dev-ml/xml-light/xml-light-2.2-r3.ebuild b/dev-ml/xml-light/xml-light-2.2-r3.ebuild
index 432a85bf453e..7976f46e976d 100644
--- a/dev-ml/xml-light/xml-light-2.2-r3.ebuild
+++ b/dev-ml/xml-light/xml-light-2.2-r3.ebuild
@@ -1,13 +1,12 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-
-inherit epatch multilib
+EAPI=7
DESCRIPTION="Minimal Xml parser and printer for OCaml"
HOMEPAGE="http://tech.motion-twin.com/xmllight.html"
SRC_URI="http://tech.motion-twin.com/zip/${P}.zip"
+S="${WORKDIR}/${PN}"
LICENSE="LGPL-2.1"
SLOT="0/${PV}"
@@ -15,15 +14,15 @@ KEYWORDS="amd64 arm arm64 ppc ppc64 x86"
IUSE="doc +ocamlopt"
RDEPEND="dev-lang/ocaml:=[ocamlopt?]"
-DEPEND="app-arch/unzip
- ${RDEPEND}"
-
-S="${WORKDIR}/${PN}"
+DEPEND="${RDEPEND}"
+BDEPEND="app-arch/unzip"
-src_prepare() {
- EPATCH_FORCE=yes EPATCH_SUFFIX=dpatch EPATCH_SOURCE="${FILESDIR}" \
- epatch
-}
+PATCHES=(
+ "${FILESDIR}"/01_installopt.patch
+ "${FILESDIR}"/02_cmi_depends.patch
+ "${FILESDIR}"/03_cflags.patch
+ "${FILESDIR}"/04_dtd_trace.patch
+)
src_compile() {
emake -j1
@@ -45,13 +44,15 @@ src_test() {
src_install() {
dodir /usr/$(get_libdir)/ocaml/${PN}
emake INSTALLDIR="${D}"/usr/$(get_libdir)/ocaml/${PN} install
- cat > "${D}"/usr/$(get_libdir)/ocaml/${PN}/META << EOF
+
+ cat > "${ED}"/usr/$(get_libdir)/ocaml/${PN}/META || die << EOF
name="${PN}"
version="${PV}"
description="${DESCRIPTION}"
requires=""
archive(byte)="xml-light.cma"
EOF
+
if use ocamlopt; then
emake INSTALLDIR="${D}"/usr/$(get_libdir)/ocaml/${PN} installopt
echo 'archive(native)="xml-light.cmxa"' >> "${ED}"/usr/$(get_libdir)/ocaml/${PN}/META || die
@@ -61,6 +62,8 @@ EOF
if use doc; then
emake doc
- dohtml doc/*
+
+ docinto html
+ dodoc doc/*
fi
}