dev-ml/camlp4: Version bump (v4.08_p1)
authorMikle Kolyada <zlogene@gentoo.org>
Sat, 28 Dec 2019 13:40:32 +0000 (16:40 +0300)
committerMikle Kolyada <zlogene@gentoo.org>
Sat, 28 Dec 2019 13:40:32 +0000 (16:40 +0300)
Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
dev-ml/camlp4/Manifest
dev-ml/camlp4/camlp4-4.08_p1.ebuild [new file with mode: 0644]
dev-ml/camlp4/files/oc409.patch [new file with mode: 0644]
dev-ml/camlp4/files/reload.patch [new file with mode: 0644]

index 1f2104298bcd88c7589e93e6f84853770c66e48c..cc8bcfc4f3e0b8de134acd1a942d12c3cfffc24a 100644 (file)
@@ -1,2 +1,3 @@
 DIST camlp4-4.04_p1.tar.gz 648320 BLAKE2B d383a366facaaa440b24184bb54a8e1c3bb22ae02387a0bc4f9ee4331ecdc60e5bf22715c1022c987041fb081eb448794a74026736df9f70e05c7213e08bfa44 SHA512 7db8eebcf3d230f60650ba62d9cb630c069394237e97b678a40b61d3dcaded752a2b7e089a50ff528f1ea0740d0291b722df123a072f2cee489cadc5201c6776
 DIST camlp4-4.05_p1.tar.gz 647566 BLAKE2B 068c1016a75616811787eb480b61349a32960997f03e0bc99d63e15357a8932a6019d9e7195541fd942ef99fc1d71c067fb5fcb0fd0c2c3efb77aac494589854 SHA512 0ee9720286d0d832fb7d2d21a8877856e0e47c94c86b1b58d28f8e757a18472eecb56a16e3a04ce815f240dd5048f5d597515461d084fd1cf4da1b121f97a3fe
+DIST camlp4-4.08_p1.tar.gz 649830 BLAKE2B 8dff6f82618d0f61a56acfa71ae679d4ba5ed4aea272019da7b19ea64960c80e50c55482ff9782748dad5042aa1bcd8728ff0825f8f900ff27239db0e0db3515 SHA512 1f8d6df42935ecdbed96a7b02d05564665b4bf0cbe4f5fd1800a1f292d8b3864d973df1e9e8c566c0fd00b5a55ba47ecd9bd07f134a9be83601e010b0246e075
diff --git a/dev-ml/camlp4/camlp4-4.08_p1.ebuild b/dev-ml/camlp4/camlp4-4.08_p1.ebuild
new file mode 100644 (file)
index 0000000..0c86d66
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PV=${PV/_p/+}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="System for writing extensible parsers for programming languages"
+HOMEPAGE="https://github.com/ocaml/camlp4"
+SRC_URI="https://github.com/ocaml/camlp4/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2-with-linking-exception"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+ocamlopt"
+
+DEPEND=">=dev-lang/ocaml-4.09.0:=[ocamlopt?]"
+RDEPEND="${DEPEND}
+       !<dev-lang/ocaml-4.02
+       !<dev-ml/findlib-1.5.5-r1"
+DEPEND="${DEPEND}
+       dev-ml/ocamlbuild"
+
+S=${WORKDIR}/${P/_p/-}
+PATCHES=( "${FILESDIR}/reload.patch" "${FILESDIR}/oc409.patch" )
+
+src_configure() {
+       ./configure \
+               --bindir="${EPREFIX}/usr/bin" \
+               --libdir="$(ocamlc -where)" \
+               --pkgdir="$(ocamlc -where)" \
+               || die
+}
+
+src_compile() {
+       emake byte
+       use ocamlopt && emake native
+}
+
+src_install() {
+       emake DESTDIR="${D}" install install-META
+       dodoc CHANGES.md README.md
+}
diff --git a/dev-ml/camlp4/files/oc409.patch b/dev-ml/camlp4/files/oc409.patch
new file mode 100644 (file)
index 0000000..727762a
--- /dev/null
@@ -0,0 +1,13 @@
+Index: camlp4-4.08-1/configure
+===================================================================
+--- camlp4-4.08-1.orig/configure
++++ camlp4-4.08-1/configure
+@@ -39,7 +39,7 @@ if [ $major -lt 4 -o \( $major -eq 4 -a
+     echo "The standalone Camlp4 requires OCaml >= 4.02."
+     echo "For previous versions of OCaml use the Camlp4 distributed with OCaml."
+     exit 2
+-elif [ $major -ne 4 -o $minor -ne 8 ]; then
++elif [ $major -lt 4 -o $minor -lt 8 ]; then
+     echo "This version of Camlp4 is for OCaml 4.07 but you are using OCaml $ocaml_version."
+     if [ -d .git ] ; then
+       if [ $PINNED -eq 1 ] ; then
diff --git a/dev-ml/camlp4/files/reload.patch b/dev-ml/camlp4/files/reload.patch
new file mode 100644 (file)
index 0000000..8fbc1c0
--- /dev/null
@@ -0,0 +1,13 @@
+Index: camlp4-4.08-1/camlp4/Camlp4/Struct/DynLoader.ml
+===================================================================
+--- camlp4-4.08-1.orig/camlp4/Camlp4/Struct/DynLoader.ml
++++ camlp4-4.08-1/camlp4/Camlp4/Struct/DynLoader.ml
+@@ -76,7 +76,7 @@ value load =
+         [ Not_found -> raise (Error file "file not found in path") ]
+       in
+       try Dynlink.loadfile fname with
+-      [ Dynlink.Error e -> raise (Error fname (Dynlink.error_message e)) ]
++      [ Dynlink.Error (Module_already_loaded _ ) -> () | Dynlink.Error e -> raise (Error fname (Dynlink.error_message e)) ]
+     };