summaryrefslogtreecommitdiff
path: root/dev-ml/xml-light/xml-light-2.2-r3.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /dev-ml/xml-light/xml-light-2.2-r3.ebuild
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
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.ebuild35
1 files changed, 21 insertions, 14 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 acc3930daa92..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 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}"
@@ -15,21 +14,23 @@ 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
+
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
}