summaryrefslogtreecommitdiff
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/xml-light/xml-light-2.2-r3.ebuild
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/xml-light/xml-light-2.2-r3.ebuild')
-rw-r--r--dev-ml/xml-light/xml-light-2.2-r3.ebuild29
1 files changed, 16 insertions, 13 deletions
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
}