diff options
Diffstat (limited to 'dev-ml/camlidl')
| -rw-r--r-- | dev-ml/camlidl/Manifest | 1 | ||||
| -rw-r--r-- | dev-ml/camlidl/camlidl-1.05-r1.ebuild | 53 | ||||
| -rw-r--r-- | dev-ml/camlidl/files/META.camlidl | 5 | ||||
| -rw-r--r-- | dev-ml/camlidl/files/includes.patch | 12 | ||||
| -rw-r--r-- | dev-ml/camlidl/files/tests.patch | 36 | ||||
| -rw-r--r-- | dev-ml/camlidl/metadata.xml | 5 |
6 files changed, 112 insertions, 0 deletions
diff --git a/dev-ml/camlidl/Manifest b/dev-ml/camlidl/Manifest new file mode 100644 index 000000000000..72ae702dba9a --- /dev/null +++ b/dev-ml/camlidl/Manifest @@ -0,0 +1 @@ +DIST camlidl-1.05.tar.gz 100640 SHA256 857ed5bd3b2f99c62813070e1a5b4b6375e837c6815f4ad956baeb6f8c660311 SHA512 e8857aca818a06f8c861e5f55dddd7e8e3ab1efae51647534460b4f092166709d86c6de1215c792a0489d668d72064ccfb7635e9a6d3854cd5a62f74541a9d18 WHIRLPOOL ca2ef6dea1647640a7bfae5da6b76ee864e5f29190317c33e768a946fa0fc1e9ce513f83158b7d11d4b3103b2f32fb5873775c55a7e9e24b969eece639ee0db7 diff --git a/dev-ml/camlidl/camlidl-1.05-r1.ebuild b/dev-ml/camlidl/camlidl-1.05-r1.ebuild new file mode 100644 index 000000000000..40dc28bb3122 --- /dev/null +++ b/dev-ml/camlidl/camlidl-1.05-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="CamlIDL is a stub code generator for using C/C++ libraries from O'Caml" +HOMEPAGE="http://caml.inria.fr/camlidl/" +SRC_URI="http://caml.inria.fr/distrib/bazar-ocaml/${P}.tar.gz" +LICENSE="QPL-1.0 LGPL-2" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="" +DEPEND=">=dev-lang/ocaml-3.10.2:=[ocamlopt]" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}/tests.patch" + epatch "${FILESDIR}/includes.patch" +} + +src_compile() { + # Use the UNIX makefile + libdir=`ocamlc -where` + sed -i -e "s|OCAMLLIB=.*|OCAMLLIB=${libdir}|" config/Makefile.unix + sed -i -e "s|BINDIR=.*|BINDIR=${EPREFIX}/usr/bin|" config/Makefile.unix + ln -s Makefile.unix config/Makefile + + # Make + emake -j1 +} + +src_test() { + einfo "Running tests..." + cd tests + emake CCPP="$(tc-getCXX)" +} + +src_install() { + libdir=`ocamlc -where` + dodir ${libdir#${EPREFIX}}/caml + dodir /usr/bin + # Install + emake BINDIR="${ED}/usr/bin" OCAMLLIB="${D}${libdir}" install + + # Add package header + sed -e "s/@VERSION/${P}/g" "${FILESDIR}/META.camlidl" > "${D}${libdir}/META.camlidl" || die + + # Documentation + dodoc README Changes +} diff --git a/dev-ml/camlidl/files/META.camlidl b/dev-ml/camlidl/files/META.camlidl new file mode 100644 index 000000000000..b0aeaf231415 --- /dev/null +++ b/dev-ml/camlidl/files/META.camlidl @@ -0,0 +1,5 @@ +description = "Stub generator" +version = "@VERSION" +directory = "^" +archive(byte) = "com.cma" +archive(native) = "com.cmxa" diff --git a/dev-ml/camlidl/files/includes.patch b/dev-ml/camlidl/files/includes.patch new file mode 100644 index 000000000000..060aceefd0a5 --- /dev/null +++ b/dev-ml/camlidl/files/includes.patch @@ -0,0 +1,12 @@ +Index: camlidl-1.05/runtime/comerror.c +=================================================================== +--- camlidl-1.05.orig/runtime/comerror.c ++++ camlidl-1.05/runtime/comerror.c +@@ -22,6 +22,7 @@ + #include <caml/callback.h> + #include <caml/fail.h> + #include <caml/alloc.h> ++#include <caml/printexc.h> + #include "camlidlruntime.h" + #include "comstuff.h" + diff --git a/dev-ml/camlidl/files/tests.patch b/dev-ml/camlidl/files/tests.patch new file mode 100644 index 000000000000..f7272424be80 --- /dev/null +++ b/dev-ml/camlidl/files/tests.patch @@ -0,0 +1,36 @@ +Index: camlidl-1.05/tests/unix.idl +=================================================================== +--- camlidl-1.05.orig/tests/unix.idl ++++ camlidl-1.05/tests/unix.idl +@@ -15,16 +15,16 @@ quote (C, " + + union process_status { int code; }; + +- enum { WEXITED, WSIGNALED, WSTOPPED }; ++ enum { WEXITED2, WSIGNALED, WSTOPPED2 }; + + static void decode_status(int status, int * kind, union process_status * p) + { + if (WIFEXITED(status)) { +- *kind = WEXITED; p->code = WEXITSTATUS(status); ++ *kind = WEXITED2; p->code = WEXITSTATUS(status); + } else if (WIFSIGNALED(status)) { + *kind = WSIGNALED; p->code = WTERMSIG(status); + } else { +- *kind = WSTOPPED; p->code = WSTOPSIG(status); ++ *kind = WSTOPPED2; p->code = WSTOPSIG(status); + } + } + +@@ -59,9 +59,9 @@ int execve([in,string] char * path, + int fork(void); + + union process_status { +- case WEXITED: int code; ++ case WEXITED2: int code; + case WSIGNALED: int code; +- case WSTOPPED: int code; ++ case WSTOPPED2: int code; + }; + + int wait([out] int * kind, diff --git a/dev-ml/camlidl/metadata.xml b/dev-ml/camlidl/metadata.xml new file mode 100644 index 000000000000..849ed8ebf13d --- /dev/null +++ b/dev-ml/camlidl/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>ml</herd> +</pkgmetadata> |
