dev-ml/core: convert to opam.eclass and add fix for glibc 2.25
authorAlexis Ballier <aballier@gentoo.org>
Tue, 15 Aug 2017 09:46:52 +0000 (11:46 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Tue, 15 Aug 2017 09:49:15 +0000 (11:49 +0200)
Package-Manager: Portage-2.3.7, Repoman-2.3.3

dev-ml/core/core-0.9.1-r1.ebuild [moved from dev-ml/core/core-0.9.1.ebuild with 71% similarity]
dev-ml/core/files/glibc225.patch [new file with mode: 0644]

similarity index 71%
rename from dev-ml/core/core-0.9.1.ebuild
rename to dev-ml/core/core-0.9.1-r1.ebuild
index 64835cb4c69c5837f72071fb48171c07e538bb98..45cc74eb45537c2c4ad48bec87b10d4ae42a0927 100644 (file)
@@ -3,6 +3,8 @@
 
 EAPI=6
 
+inherit opam
+
 DESCRIPTION="Jane Street's alternative to the standard library"
 HOMEPAGE="https://github.com/janestreet/core"
 SRC_URI="https://github.com/janestreet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
@@ -13,7 +15,6 @@ KEYWORDS="~amd64"
 IUSE=""
 
 RDEPEND="
-       dev-lang/ocaml:=
        dev-ml/base:=
        dev-ml/configurator:=
        dev-ml/core_kernel:=
@@ -25,12 +26,5 @@ RDEPEND="
        dev-ml/stdio:=
        dev-ml/ocaml-migrate-parsetree:=
 "
-DEPEND="${RDEPEND} dev-ml/opam dev-ml/jbuilder"
-
-src_install() {
-       opam-installer -i \
-               --prefix="${ED}/usr" \
-               --libdir="${D}/$(ocamlc -where)" \
-               --docdir="${ED}/usr/share/doc/${PF}" \
-               ${PN}.install || die
-}
+DEPEND="${RDEPEND} dev-ml/jbuilder"
+PATCHES=( "${FILESDIR}/glibc225.patch" )
diff --git a/dev-ml/core/files/glibc225.patch b/dev-ml/core/files/glibc225.patch
new file mode 100644 (file)
index 0000000..1dd96c8
--- /dev/null
@@ -0,0 +1,12 @@
+Index: core-0.9.1/src/unix_stubs.c
+===================================================================
+--- core-0.9.1.orig/src/unix_stubs.c
++++ core-0.9.1/src/unix_stubs.c
+@@ -40,6 +40,7 @@
+ #include <arpa/inet.h>
+ #include <netdb.h>
+ #include <ifaddrs.h>
++#include <sys/sysmacros.h>
+ #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #define stat64 stat