summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ml/xml-light')
-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/metadata.xml7
-rw-r--r--dev-ml/xml-light/xml-light-2.2-r3.ebuild39
8 files changed, 57 insertions, 85 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/metadata.xml b/dev-ml/xml-light/metadata.xml
index c5adddd4b3e6..85e4ed814fa2 100644
--- a/dev-ml/xml-light/metadata.xml
+++ b/dev-ml/xml-light/metadata.xml
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person">
- <email>maksbotan@gentoo.org</email>
- <name>Maxim Koltsov</name>
-</maintainer>
+<!-- maintainer-needed -->
</pkgmetadata>
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 f7244b272a18..13a88a9f841b 100644
--- a/dev-ml/xml-light/xml-light-2.2-r3.ebuild
+++ b/dev-ml/xml-light/xml-light-2.2-r3.ebuild
@@ -1,35 +1,36 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-
-inherit eutils 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}"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc x86"
+KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv 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
+
if use ocamlopt; then
emake -j1 opt
fi
+
if use doc;then
emake doc
fi
@@ -43,20 +44,26 @@ 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"' >> "${D}"/usr/$(get_libdir)/ocaml/${PN}/META
+ echo 'archive(native)="xml-light.cmxa"' >> "${ED}"/usr/$(get_libdir)/ocaml/${PN}/META || die
fi
+
dodoc README
+
if use doc; then
emake doc
- dohtml doc/*
+
+ docinto html
+ dodoc doc/*
fi
}