From fcfdf2eaf7fad12b02abfc2316b574084e7b0b43 Mon Sep 17 00:00:00 2001 From: korli Date: Tue, 25 Sep 2012 22:19:54 +0000 Subject: [PATCH] added bep file for ocaml 4.00.0 --- dev-lang/ocaml/ocaml-4.00.0.bep | 22 +++++++++ dev-lang/ocaml/patches/ocaml-4.00.0.patch | 59 +++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 dev-lang/ocaml/ocaml-4.00.0.bep create mode 100644 dev-lang/ocaml/patches/ocaml-4.00.0.patch diff --git a/dev-lang/ocaml/ocaml-4.00.0.bep b/dev-lang/ocaml/ocaml-4.00.0.bep new file mode 100644 index 000000000..b3717c1e1 --- /dev/null +++ b/dev-lang/ocaml/ocaml-4.00.0.bep @@ -0,0 +1,22 @@ +DESCRIPTION="Implementation of the Caml language" +HOMEPAGE="http://caml.inria.fr/index.en.html" +SRC_URI="http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.0.tar.gz" +CHECKSUM_MD5="fa11560a45793bd9fa45c1295a6f4a91" +REVISION="1" +STATUS_HAIKU="untested" +DEPEND="" +BUILD { + cd ocaml-4.00.0 + COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY` + ./configure --prefix `finddir B_COMMON_DIRECTORY` \ + --mandir $COMMON_DOCS/man + make world.opt +} + +INSTALL { + cd ocaml-4.00.0 + make install PREFIX=${DESTDIR}`finddir B_COMMON_DIRECTORY` + +} +LICENSE="GNU LGPL v2" +COPYRIGHT="1996-2012 Institut National de Recherche en Informatique et en Automatique (INRIA)." diff --git a/dev-lang/ocaml/patches/ocaml-4.00.0.patch b/dev-lang/ocaml/patches/ocaml-4.00.0.patch new file mode 100644 index 000000000..f73910779 --- /dev/null +++ b/dev-lang/ocaml/patches/ocaml-4.00.0.patch @@ -0,0 +1,59 @@ +diff -ruN ocaml-4.00.0/configure ocaml-4.00.0/configure +--- ocaml-4.00.0/configure 2012-06-26 15:33:50.060555264 +0000 ++++ ocaml-4.00.0/configure 2012-09-25 21:21:50.419168256 +0000 +@@ -285,6 +285,10 @@ + bytecccompopts="-fno-defer-pop $gcc_warnings" + # No -lm library + mathlib="";; ++ *,*-*-haiku*) ++ bytecccompopts="-fno-defer-pop $gcc_warnings" ++ # No -lm library ++ mathlib="";; + gcc,alpha*-*-osf*) + bytecccompopts="-fno-defer-pop $gcc_warnings" + if cc="$bytecc" sh ./hasgot -mieee; then +@@ -614,6 +618,9 @@ + byteccrpath="-Wl,-rpath," + mksharedlibrpath="-Wl,-rpath," + shared_libraries_supported=true;; ++ *-*haiku*) ++ mksharedlib="$bytecc -shared" ++ shared_libraries_supported=true;; + esac + fi + +@@ -679,6 +686,7 @@ + arch=i386; system=solaris + fi;; + i[3456]86-*-beos*) arch=i386; system=beos;; ++ i[3456]86-*-haiku*) arch=i386; system=beos;; + i[3456]86-*-cygwin*) arch=i386; system=cygwin;; + i[3456]86-*-darwin*) if $arch64; then + arch=amd64; system=macosx +@@ -901,6 +909,11 @@ + cclibs="$cclibs -lnsl -lsocket" + echo "#define HAS_SOCKETS" >> s.h + has_sockets=yes ++elif sh ./hasgot -lnetwork socket socketpair bind listen accept connect; then ++ echo "You have BSD sockets (with libraries '-lnetwork')" ++ cclibs="$cclibs -lnetwork" ++ echo "#define HAS_SOCKETS" >> s.h ++ has_sockets=yes + fi + + if sh ./hasgot -i sys/socket.h -t socklen_t; then +diff -uN ocaml-4.00.0/otherlibs/unix/nice.c ocaml-4.00.0/otherlibs/unix/nice.c +--- ocaml-4.00.0/otherlibs/unix/nice.c 2012-09-25 21:31:10.443809792 +0000 ++++ ocaml-4.00.0/otherlibs/unix/nice.c 2012-09-25 21:31:51.582221824 +0000 +@@ -24,7 +24,11 @@ + { + int ret; + errno = 0; ++#ifdef __HAIKU__ ++ ret = 0; ++#else + ret = nice(Int_val(incr)); ++#endif + if (ret == -1 && errno != 0) uerror("nice", Nothing); + return Val_int(ret); + }