commit:     538c462a0e2e386eeb37a2966b3df4a84b431990
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 21 00:37:25 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr 21 02:09:42 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=538c462a

dev-ml/xml-light: port to EAPI 7

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{01_installopt.dpatch => 01_installopt.patch}  | 12 ++-------
 dev-ml/xml-light/files/02_cmi_depends.dpatch       | 18 --------------
 dev-ml/xml-light/files/02_cmi_depends.patch        | 10 ++++++++
 .../files/{03_cflags.dpatch => 03_cflags.patch}    | 12 ++-------
 dev-ml/xml-light/files/04_dtd_trace.dpatch         | 26 -------------------
 dev-ml/xml-light/files/04_dtd_trace.patch          | 18 ++++++++++++++
 dev-ml/xml-light/xml-light-2.2-r3.ebuild           | 29 ++++++++++++----------
 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
similarity index 52%
rename from dev-ml/xml-light/files/01_installopt.dpatch
rename to dev-ml/xml-light/files/01_installopt.patch
index 1dfb50c9e27..d3a3d845743 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 <gil...@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 1fcf1704840..00000000000
--- 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 <gil...@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 00000000000..c1f4ce31d15
--- /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
similarity index 74%
rename from dev-ml/xml-light/files/03_cflags.dpatch
rename to dev-ml/xml-light/files/03_cflags.patch
index 5dfbffe5da1..3895b2ad687 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 <gil...@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 9dbea4bdf0c..00000000000
--- 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 <gil...@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 00000000000..ac0da3cb5b8
--- /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 432a85bf453..7976f46e976 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
 }

Reply via email to