summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2007-05-26 13:08:14 +0000
committerAlexis Ballier <aballier@gentoo.org>2007-05-26 13:08:14 +0000
commit4f94318f659987eac5969e68e0dcb007e5d4ef4f (patch)
tree0cee6fbc83ae942d94b5ba4aff1ae7f8ad4df608 /dev-lang
parentamd64 stable, bug 176144 (diff)
downloadhistorical-4f94318f659987eac5969e68e0dcb007e5d4ef4f.tar.gz
historical-4f94318f659987eac5969e68e0dcb007e5d4ef4f.tar.bz2
historical-4f94318f659987eac5969e68e0dcb007e5d4ef4f.zip
New upstream release
Package-Manager: portage-2.1.2.7
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/ocaml/ChangeLog11
-rw-r--r--dev-lang/ocaml/Manifest42
-rw-r--r--dev-lang/ocaml/files/digest-ocaml-3.10.03
-rw-r--r--dev-lang/ocaml/files/ocaml-3.10.0-automagic.patch51
-rw-r--r--dev-lang/ocaml/files/ocaml-3.10.0-call-ld-with-proper-ldflags.patch30
-rw-r--r--dev-lang/ocaml/files/ocaml-3.10.0-configure.patch133
-rw-r--r--dev-lang/ocaml/files/ocaml-3.10.0-exec-stack-fixes.patch312
-rw-r--r--dev-lang/ocaml/ocaml-3.10.0.ebuild148
8 files changed, 725 insertions, 5 deletions
diff --git a/dev-lang/ocaml/ChangeLog b/dev-lang/ocaml/ChangeLog
index 573b18e2d686..7ff60166d0cc 100644
--- a/dev-lang/ocaml/ChangeLog
+++ b/dev-lang/ocaml/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-lang/ocaml
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.111 2007/05/15 22:29:52 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.112 2007/05/26 13:08:14 aballier Exp $
+
+*ocaml-3.10.0 (26 May 2007)
+
+ 26 May 2007; Alexis Ballier <aballier@gentoo.org>
+ +files/ocaml-3.10.0-automagic.patch,
+ +files/ocaml-3.10.0-call-ld-with-proper-ldflags.patch,
+ +files/ocaml-3.10.0-configure.patch,
+ +files/ocaml-3.10.0-exec-stack-fixes.patch, +ocaml-3.10.0.ebuild:
+ New upstream release
15 May 2007; Jeroen Roovers <jer@gentoo.org> ocaml-3.09.3-r1.ebuild:
Marked ~hppa (bug #178256).
diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest
index 4c196173b6a4..c9a5c7229afe 100644
--- a/dev-lang/ocaml/Manifest
+++ b/dev-lang/ocaml/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX ocaml-3.09.3-Makefile.patch 1489 RMD160 2405669fdfe7ac35191c59d51c36dcea4f43e2c0 SHA1 16d5cfa7e12d542928d90c144125fbc3deb049f7 SHA256 da690e61fd4f72e28ed4f41a0b7c18a26a11f9ad42d4d8aa95301c02317336b9
MD5 0d21d3b76fc3a724bd2b8d2e8d3a603f files/ocaml-3.09.3-Makefile.patch 1489
RMD160 2405669fdfe7ac35191c59d51c36dcea4f43e2c0 files/ocaml-3.09.3-Makefile.patch 1489
@@ -26,6 +29,22 @@ AUX ocaml-3.09.3-hppa-optimize-for-size-ocamlp4.patch 1049 RMD160 cd5e0018024ad6
MD5 dbac43a7f4ea541511a0a736d8204785 files/ocaml-3.09.3-hppa-optimize-for-size-ocamlp4.patch 1049
RMD160 cd5e0018024ad65c4ff0feedcb0bca066b100795 files/ocaml-3.09.3-hppa-optimize-for-size-ocamlp4.patch 1049
SHA256 4839c665ded8a44c67d9b394e3190091611e4ca3f5dfdd94c12849ccb90ea271 files/ocaml-3.09.3-hppa-optimize-for-size-ocamlp4.patch 1049
+AUX ocaml-3.10.0-automagic.patch 1849 RMD160 6986c47d9d2d9bdaf246f3399ccc59a5751fe86d SHA1 d999c1023c5aa07316d8405fde6ebf3a1bcb2b9f SHA256 f959da02f8b31f3d1ad5b76426d493b50c87dc3a6241204470866a321ece40f9
+MD5 38d0e9f012c4f840783fb188d249d133 files/ocaml-3.10.0-automagic.patch 1849
+RMD160 6986c47d9d2d9bdaf246f3399ccc59a5751fe86d files/ocaml-3.10.0-automagic.patch 1849
+SHA256 f959da02f8b31f3d1ad5b76426d493b50c87dc3a6241204470866a321ece40f9 files/ocaml-3.10.0-automagic.patch 1849
+AUX ocaml-3.10.0-call-ld-with-proper-ldflags.patch 1497 RMD160 7eef667019e79f2877836f77a31466f9d301725b SHA1 36d95fb8b05e7bbff8e5f49a8f1faec5f11f0c78 SHA256 13d6cc7401c8374327e438517975fe9abf1b99030bb3243f2adb91d12570bc8d
+MD5 969428c0722f1884b21bd863ff9634aa files/ocaml-3.10.0-call-ld-with-proper-ldflags.patch 1497
+RMD160 7eef667019e79f2877836f77a31466f9d301725b files/ocaml-3.10.0-call-ld-with-proper-ldflags.patch 1497
+SHA256 13d6cc7401c8374327e438517975fe9abf1b99030bb3243f2adb91d12570bc8d files/ocaml-3.10.0-call-ld-with-proper-ldflags.patch 1497
+AUX ocaml-3.10.0-configure.patch 5644 RMD160 1a63847a6e632f59fef8ff448b96bc45da15eae5 SHA1 6a030e48dd5fc399b985dd99e21b6c0e6b95a12e SHA256 f42e11db2d184532aa561b0b117f7ce5850bb50981ea997d08eee34f826360ac
+MD5 381c655f560cf02a78a824cdff753dc5 files/ocaml-3.10.0-configure.patch 5644
+RMD160 1a63847a6e632f59fef8ff448b96bc45da15eae5 files/ocaml-3.10.0-configure.patch 5644
+SHA256 f42e11db2d184532aa561b0b117f7ce5850bb50981ea997d08eee34f826360ac files/ocaml-3.10.0-configure.patch 5644
+AUX ocaml-3.10.0-exec-stack-fixes.patch 9393 RMD160 e4930e138a5cea9ffdcc403a290b1fa16fb0ae44 SHA1 6184524194d63fe53dbae066678255827b444ec1 SHA256 d33a0fb0e319f50f8e7e66a7adb55bfd6d88e706594c1984b19312cbb4159801
+MD5 31aa0f2faa9d32aa2aa9fd17316af7b2 files/ocaml-3.10.0-exec-stack-fixes.patch 9393
+RMD160 e4930e138a5cea9ffdcc403a290b1fa16fb0ae44 files/ocaml-3.10.0-exec-stack-fixes.patch 9393
+SHA256 d33a0fb0e319f50f8e7e66a7adb55bfd6d88e706594c1984b19312cbb4159801 files/ocaml-3.10.0-exec-stack-fixes.patch 9393
AUX ocaml-rebuild.sh 1361 RMD160 a9c452fbea18de3b38d8240f887f8595e529643e SHA1 2a682ce872c51e66a5ab13160da16b0f6d8bd366 SHA256 a8004cd4bca96ab3fc595fcfd7dbe88903833f9e430149c3d04c9fda84362b64
MD5 bcc5109143faee7e7b8f7f76bd4726a7 files/ocaml-rebuild.sh 1361
RMD160 a9c452fbea18de3b38d8240f887f8595e529643e files/ocaml-rebuild.sh 1361
@@ -33,6 +52,7 @@ SHA256 a8004cd4bca96ab3fc595fcfd7dbe88903833f9e430149c3d04c9fda84362b64 files/oc
DIST ocaml-3.08.4.tar.bz2 2054019 RMD160 448ed9af56cacb9c32208d064e1c9732a2086bd2 SHA1 d9eb54611d24f9e1c33736f12c7ba87412057cbb SHA256 8d4322791d0dd424f355636ba50934ac17dbefde269736dad0da0683c8888684
DIST ocaml-3.09.2.tar.bz2 2036341 RMD160 45edae84e5787775a5beed29a1ad2881f4df8505 SHA1 578c66707532882782735352a3628b78193da5e7 SHA256 2115d6a4e420b5517ed7313c64bd6bd93f610ec208250b7d025595376180b0b1
DIST ocaml-3.09.3.tar.bz2 2038617 RMD160 fdc124218c556c62c897ee6720970279e2d5426b SHA1 5d63c6e0d13463f85c0d5147d641d2bceef87d6b SHA256 607842b4f4917a759f19541a421370a834f5b948855ca54cef40d22b19a0934f
+DIST ocaml-3.10.0.tar.gz 3402010 RMD160 40032fb06a3ae76838a56bad51119e5b30a099fd SHA1 e1315052c2dba59e56fdb7cb89640c283d076ba5 SHA256 daa56c4ebc21640be84e124fc5fefe091d0048d412b7e2b1e68bc2f56ff74314
EBUILD ocaml-3.08.4.ebuild 2548 RMD160 c99ebd7b7ed7487e3987db53b9f0ddf0f54921d4 SHA1 3fec4a3874b4ea48b87f6cc20b138f8e69a0a452 SHA256 0b7f8a81f5db0d96d6f04384c0943b6793d22040ae3f7f95a343a41c939e9725
MD5 4e81125b11cc324ab0858900e935af51 ocaml-3.08.4.ebuild 2548
RMD160 c99ebd7b7ed7487e3987db53b9f0ddf0f54921d4 ocaml-3.08.4.ebuild 2548
@@ -49,10 +69,14 @@ EBUILD ocaml-3.09.3.ebuild 2502 RMD160 2a015120aec3b6ce103ffeebdae265e1ced4aa49
MD5 e44a3de37fac8ae24a87c9f1d4019c7a ocaml-3.09.3.ebuild 2502
RMD160 2a015120aec3b6ce103ffeebdae265e1ced4aa49 ocaml-3.09.3.ebuild 2502
SHA256 fad524f73b1a807254283cc48dc742f18a8fec1a5b3123a86435a014cbc2125f ocaml-3.09.3.ebuild 2502
-MISC ChangeLog 17366 RMD160 e4de288f2f3a1c69038cdf5a402649e4db013ebf SHA1 00c5c5624df82c641fd9b58b1046f034fd88e903 SHA256 3a36ef5bc21e516ffb65eb14cca25c6673e59e0fd76b1661143398914a64939e
-MD5 c14e30915f709015b1a5c0d64caac528 ChangeLog 17366
-RMD160 e4de288f2f3a1c69038cdf5a402649e4db013ebf ChangeLog 17366
-SHA256 3a36ef5bc21e516ffb65eb14cca25c6673e59e0fd76b1661143398914a64939e ChangeLog 17366
+EBUILD ocaml-3.10.0.ebuild 5128 RMD160 79219362f0c4f15750153bc34ed58a5102de40a0 SHA1 567c3285f95a9b6121d035318941e294f4be3f87 SHA256 6aef52081e815995bfe69cb7a05f93da118805f5d905baca77bb12d2821087a4
+MD5 860d4cf598e83d6bcfc05ca7b883aa4c ocaml-3.10.0.ebuild 5128
+RMD160 79219362f0c4f15750153bc34ed58a5102de40a0 ocaml-3.10.0.ebuild 5128
+SHA256 6aef52081e815995bfe69cb7a05f93da118805f5d905baca77bb12d2821087a4 ocaml-3.10.0.ebuild 5128
+MISC ChangeLog 17679 RMD160 c63089f1d92ac3195fc11c40dc142db81c26c4e0 SHA1 594f7ccbc31b1947dba8926e5cf230d7a6056274 SHA256 3e3cb8119d422a2204afd95b51582765fda607ecbb40b564f72ee074591c16b6
+MD5 2aa469788845a642a97463050ffb4a92 ChangeLog 17679
+RMD160 c63089f1d92ac3195fc11c40dc142db81c26c4e0 ChangeLog 17679
+SHA256 3e3cb8119d422a2204afd95b51582765fda607ecbb40b564f72ee074591c16b6 ChangeLog 17679
MISC metadata.xml 155 RMD160 dfaa057e679b01302a807c75a32a910098b26809 SHA1 94024f83dcacbb53e92be090dd0f994ec93dc90d SHA256 118048376ebb76f57628b0819f3de4856e73959c2578c88715d37ea2d1e0af81
MD5 8b350f19c06fcabf1053b0421b7c3f5a metadata.xml 155
RMD160 dfaa057e679b01302a807c75a32a910098b26809 metadata.xml 155
@@ -69,3 +93,13 @@ SHA256 19708f759185ed39623e03921462ba20fb6f3533268673d2bcd7dd07cef57350 files/di
MD5 71f3dc5bc2ee57a403689b56bc1a85c1 files/digest-ocaml-3.09.3-r1 244
RMD160 e7f0898889b94faae3b1481555bac42e9298b370 files/digest-ocaml-3.09.3-r1 244
SHA256 19708f759185ed39623e03921462ba20fb6f3533268673d2bcd7dd07cef57350 files/digest-ocaml-3.09.3-r1 244
+MD5 32b15ff4497fd92f1363c49ef055dca8 files/digest-ocaml-3.10.0 241
+RMD160 86491b12892676d992e47bb25bbcbaed14ba8364 files/digest-ocaml-3.10.0 241
+SHA256 a6f377880030b038e0db0c027d1c60e5c0293db3862c1ebb6c01fbd8bdf7adfd files/digest-ocaml-3.10.0 241
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.4 (GNU/Linux)
+
+iD8DBQFGWDFFvFcC4BYPU0oRAuBoAKCbnNk7SM6HIsy6EN/+2XP9MctpHQCfZGo9
+/slDxy033rLIRjSGcCqjmyI=
+=qUlD
+-----END PGP SIGNATURE-----
diff --git a/dev-lang/ocaml/files/digest-ocaml-3.10.0 b/dev-lang/ocaml/files/digest-ocaml-3.10.0
new file mode 100644
index 000000000000..53cf44344e2e
--- /dev/null
+++ b/dev-lang/ocaml/files/digest-ocaml-3.10.0
@@ -0,0 +1,3 @@
+MD5 5ec0b860730925f738d91ca96d692406 ocaml-3.10.0.tar.gz 3402010
+RMD160 40032fb06a3ae76838a56bad51119e5b30a099fd ocaml-3.10.0.tar.gz 3402010
+SHA256 daa56c4ebc21640be84e124fc5fefe091d0048d412b7e2b1e68bc2f56ff74314 ocaml-3.10.0.tar.gz 3402010
diff --git a/dev-lang/ocaml/files/ocaml-3.10.0-automagic.patch b/dev-lang/ocaml/files/ocaml-3.10.0-automagic.patch
new file mode 100644
index 000000000000..0aa90973793a
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-3.10.0-automagic.patch
@@ -0,0 +1,51 @@
+Index: ocaml-3.10.0/configure
+===================================================================
+--- ocaml-3.10.0.orig/configure
++++ ocaml-3.10.0/configure
+@@ -31,6 +31,8 @@ x11_include_dir=''
+ x11_lib_dir=''
+ tk_wanted=yes
+ pthread_wanted=yes
++graph_wanted=yes
++dbm_wanted=yes
+ tk_defs=''
+ tk_libs=''
+ tk_x11=yes
+@@ -87,6 +89,10 @@ while : ; do
+ ;; # Ignored for backward compatibility
+ -no-pthread*|--no-pthread*)
+ pthread_wanted=no;;
++ -no-dbm|--no-dbm)
++ dbm_wanted=no;;
++ -no-graph|--no-graph)
++ graph_wanted=no;;
+ -no-tk|--no-tk)
+ tk_wanted=no;;
+ -tkdefs*|--tkdefs*)
+@@ -1233,7 +1239,7 @@ do
+ done
+
+
+-if test "$x11_include" = "not found" || test "$x11_link" = "not found"
++if test "$x11_include" = "not found" || test "$x11_link" = "not found" || test "$graph_wanted" = "no"
+ then
+ echo "X11 not found, the \"graph\" library will not be supported."
+ x11_include=""
+@@ -1281,7 +1287,7 @@ for dir in /usr/include /usr/include/db1
+ break
+ fi
+ done
+-if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then
++if test "$dbm_include" = "not found" || test "$dbm_link" = "not found" || test "$dbm_wanted" = "no"; then
+ echo "NDBM not found, the \"dbm\" library will not be supported."
+ else
+ echo "NDBM found (in $dbm_include)"
+@@ -1546,7 +1552,7 @@ echo " $otherlibraries"
+ echo "Configuration for the \"num\" library:"
+ echo " target architecture ...... $bng_arch (asm level $bng_asm_level)"
+
+-if test "$x11_include" != "not found" && test "$x11_lib" != "not found"; then
++if test "$x11_include" != "not found" && test "$x11_lib" != "not found" && test "$graph_wanted" != "no"; then
+ echo "Configuration for the \"graph\" library:"
+ echo " options for compiling .... $x11_include"
+ echo " options for linking ...... $x11_link"
diff --git a/dev-lang/ocaml/files/ocaml-3.10.0-call-ld-with-proper-ldflags.patch b/dev-lang/ocaml/files/ocaml-3.10.0-call-ld-with-proper-ldflags.patch
new file mode 100644
index 000000000000..29d94aafb118
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-3.10.0-call-ld-with-proper-ldflags.patch
@@ -0,0 +1,30 @@
+As we now support LDFLAGS in NATIVECCLINKOPTS
+it can happen that -Wl,--foo,--bar option is in that variable
+As ocaml happens to call ld with NATIVECCLINKOPTS
+we have to "translate" it so that ld doesn't bail out with unrecognized option
+Initial patch from Julien Cristau : http://caml.inria.fr/mantis/view.php?id=4142
+Modified a bit to catch comma separated options
+Index: ocaml-3.10.0/Makefile
+===================================================================
+--- ocaml-3.10.0.orig/Makefile
++++ ocaml-3.10.0/Makefile
+@@ -316,6 +316,8 @@ partialclean::
+ rm -f ocaml toplevel/toplevellib.cma
+
+ # The configuration file
++comma = ,
++Wl = -Wl,
+
+ utils/config.ml: utils/config.mlp config/Makefile
+ @rm -f utils/config.ml
+@@ -326,8 +328,8 @@ utils/config.ml: utils/config.mlp config
+ -e 's|%%BYTELINK%%|$(BYTECC) $(BYTECCLINKOPTS)|' \
+ -e 's|%%NATIVECC%%|$(NATIVECC) $(NATIVECCCOMPOPTS)|' \
+ -e 's|%%NATIVELINK%%|$(NATIVECC) $(NATIVECCLINKOPTS)|' \
+- -e 's|%%PARTIALLD%%|$(PARTIALLD) $(NATIVECCLINKOPTS)|' \
+- -e 's|%%PACKLD%%|$(PARTIALLD) $(NATIVECCLINKOPTS) -o |' \
++ -e 's|%%PARTIALLD%%|$(PARTIALLD) $(subst $(comma), ,$(subst $(Wl),,$(NATIVECCLINKOPTS)))|' \
++ -e 's|%%PACKLD%%|$(PARTIALLD) $(subst $(comma), ,$(subst $(Wl),,$(NATIVECCLINKOPTS))) -o |' \
+ -e 's|%%BYTECCLIBS%%|$(BYTECCLIBS)|' \
+ -e 's|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|' \
+ -e 's|%%RANLIBCMD%%|$(RANLIBCMD)|' \
diff --git a/dev-lang/ocaml/files/ocaml-3.10.0-configure.patch b/dev-lang/ocaml/files/ocaml-3.10.0-configure.patch
new file mode 100644
index 000000000000..d96d3f5beed1
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-3.10.0-configure.patch
@@ -0,0 +1,133 @@
+Index: ocaml-3.10.0/configure
+===================================================================
+--- ocaml-3.10.0.orig/configure
++++ ocaml-3.10.0/configure
+@@ -233,75 +233,75 @@ esac
+ # Configure the bytecode compiler
+
+ bytecc="$cc"
+-bytecccompopts=""
+-bytecclinkopts=""
++bytecccompopts="${CFLAGS}"
++bytecclinkopts="${LDFLAGS}"
+ ostype="Unix"
+ exe=""
+
+ case "$bytecc,$host" in
+ cc,*-*-nextstep*)
+ # GNU C extensions disabled, but __GNUC__ still defined!
+- bytecccompopts="-fno-defer-pop $gcc_warnings -U__GNUC__ -posix"
+- bytecclinkopts="-posix";;
++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -U__GNUC__ -posix"
++ bytecclinkopts="$bytecclinkopts -posix";;
+ *,*-*-rhapsody*)
+ # Almost the same as NeXTStep
+- bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
+ mathlib="";;
+ *,*-*-darwin*)
+- bytecccompopts="-fno-defer-pop -no-cpp-precomp $gcc_warnings"
++ bytecccompopts="$bytecccompopts -fno-defer-pop -no-cpp-precomp $gcc_warnings"
+ mathlib=""
+ # Tell gcc that we can use 32-bit code addresses for threaded code
+ # even if we compile in 64-bit mode
+ echo "#define ARCH_CODE32" >> m.h;;
+ *,*-*-beos*)
+- bytecccompopts="-fno-defer-pop $gcc_warnings"
++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings"
+ # No -lm library
+ mathlib="";;
+ gcc,alpha*-*-osf*)
+- bytecccompopts="-fno-defer-pop $gcc_warnings"
++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings"
+ if cc="$bytecc" sh ./hasgot -mieee; then
+ bytecccompopts="-mieee $bytecccompopts";
+ fi
+ # Put code and static data in lower 4GB
+- bytecclinkopts="-Wl,-T,12000000 -Wl,-D,14000000"
++ bytecclinkopts="$bytecclinkopts -Wl,-T,12000000 -Wl,-D,14000000"
+ # Tell gcc that we can use 32-bit code addresses for threaded code
+ echo "#define ARCH_CODE32" >> m.h;;
+ cc,alpha*-*-osf*)
+- bytecccompopts="-std1 -ieee";;
++ bytecccompopts="$bytecccompopts -std1 -ieee";;
+ gcc,alpha*-*-linux*)
+ if cc="$bytecc" sh ./hasgot -mieee; then
+ bytecccompopts="-mieee $bytecccompopts";
+ fi;;
+ cc,mips-*-irix6*)
+ # Add -n32 flag to ensure compatibility with native-code compiler
+- bytecccompopts="-n32"
++ bytecccompopts="$bytecccompopts -n32"
+ # Turn off warning "unused library"
+- bytecclinkopts="-n32 -Wl,-woff,84";;
++ bytecclinkopts="$bytecclinkopts -n32 -Wl,-woff,84";;
+ cc*,mips-*-irix6*)
+ # (For those who want to force "cc -64")
+ # Turn off warning "unused library"
+- bytecclinkopts="-Wl,-woff,84";;
++ bytecclinkopts="$bytecclinkopts -Wl,-woff,84";;
+ *,alpha*-*-unicos*)
+ # For the Cray T3E
+- bytecccompopts="-DUMK";;
++ bytecccompopts="$bytecccompopts -DUMK";;
+ gcc*,powerpc-*-aix*)
+ # Avoid name-space pollution by requiring Unix98-conformant includes
+- bytecccompopts="-fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";;
++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";;
+ *,powerpc-*-aix*)
+- bytecccompopts="-D_XOPEN_SOURCE=500";;
++ bytecccompopts="$bytecccompopts -D_XOPEN_SOURCE=500";;
+ gcc*,*-*-cygwin*)
+- bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32"
++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -U_WIN32"
+ exe=".exe"
+ ostype="Cygwin";;
+ gcc*,x86_64-*-linux*)
+- bytecccompopts="-fno-defer-pop $gcc_warnings"
++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings"
+ # Tell gcc that we can use 32-bit code addresses for threaded code
+ # unless we are compiled for a shared library (-fPIC option)
+ echo "#ifndef __PIC__" >> m.h
+ echo "# define ARCH_CODE32" >> m.h
+ echo "#endif" >> m.h;;
+ gcc*)
+- bytecccompopts="-fno-defer-pop $gcc_warnings";;
++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings";;
+ esac
+
+ # Configure compiler to use in further tests
+@@ -616,22 +616,22 @@ else
+ nativecc="$ccoption"
+ fi
+
+-nativecccompopts=''
+-nativecclinkopts=''
++nativecccompopts="${CFLAGS}"
++nativecclinkopts="${LDFLAGS}"
+ nativeccrpath="$byteccrpath"
+
+ case "$arch,$nativecc,$system,$host_type" in
+- alpha,cc*,digital,*) nativecccompopts=-std1;;
+- mips,cc*,irix,*) nativecccompopts=-n32
+- nativecclinkopts="-n32 -Wl,-woff,84";;
+- *,*,nextstep,*) nativecccompopts="$gcc_warnings -U__GNUC__ -posix"
+- nativecclinkopts="-posix";;
++ alpha,cc*,digital,*) nativecccompopts="$nativecccompopts -std1";;
++ mips,cc*,irix,*) nativecccompopts="$nativecccompopts -n32"
++ nativecclinkopts="$nativecclinkopts -n32 -Wl,-woff,84";;
++ *,*,nextstep,*) nativecccompopts="$nativecccompopts $gcc_warnings -U__GNUC__ -posix"
++ nativecclinkopts="$nativecclinkopts -posix";;
+ *,*,rhapsody,*darwin[1-5].*)
+- nativecccompopts="$gcc_warnings -DSHRINKED_GNUC";;
+- *,*,rhapsody,*) nativecccompopts="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs"
++ nativecccompopts="$nativecccompopts $gcc_warnings -DSHRINKED_GNUC";;
++ *,*,rhapsody,*) nativecccompopts="$nativecccompopts $gcc_warnings -DDARWIN_VERSION_6 $dl_defs"
+ if $arch64; then partialld="ld -r -arch ppc64"; fi;;
+- *,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";;
+- *,gcc*,*,*) nativecccompopts="$gcc_warnings";;
++ *,gcc*,cygwin,*) nativecccompopts="$nativecccompopts $gcc_warnings -U_WIN32";;
++ *,gcc*,*,*) nativecccompopts="$nativecccompopts $gcc_warnings";;
+ esac
+
+ asflags=''
diff --git a/dev-lang/ocaml/files/ocaml-3.10.0-exec-stack-fixes.patch b/dev-lang/ocaml/files/ocaml-3.10.0-exec-stack-fixes.patch
new file mode 100644
index 000000000000..8b4b894befc0
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-3.10.0-exec-stack-fixes.patch
@@ -0,0 +1,312 @@
+Index: ocaml-3.10.0/asmcomp/alpha/emit.mlp
+===================================================================
+--- ocaml-3.10.0.orig/asmcomp/alpha/emit.mlp
++++ ocaml-3.10.0/asmcomp/alpha/emit.mlp
+@@ -811,6 +811,11 @@ let data l =
+ ` .data\n`;
+ List.iter emit_item l
+
++(* Mark stack as non executable *)
++let nx_stack() =
++ if Config.system = "linux" then
++ ` .section .note.GNU-stack,\"\",%progbits\n`
++
+ (* Beginning / end of an assembly file *)
+
+ let begin_assembly() =
+@@ -843,6 +848,7 @@ let begin_assembly() =
+ `{emit_symbol lbl_begin}:\n`
+
+ let end_assembly () =
++ nx_stack();
+ let lbl_end = Compilenv.make_symbol (Some "code_end") in
+ ` .text\n`;
+ ` .globl {emit_symbol lbl_end}\n`;
+Index: ocaml-3.10.0/asmrun/alpha.S
+===================================================================
+--- ocaml-3.10.0.orig/asmrun/alpha.S
++++ ocaml-3.10.0/asmrun/alpha.S
+@@ -438,3 +438,7 @@ caml_system__frametable:
+ .word -1 /* negative frame size => use callback link */
+ .word 0 /* no roots here */
+ .align 3
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
+Index: ocaml-3.10.0/asmrun/amd64.S
+===================================================================
+--- ocaml-3.10.0.orig/asmrun/amd64.S
++++ ocaml-3.10.0/asmrun/amd64.S
+@@ -366,3 +366,7 @@ caml_negf_mask:
+ .align 16
+ caml_absf_mask:
+ .quad 0x7FFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
+Index: ocaml-3.10.0/asmrun/arm.S
+===================================================================
+--- ocaml-3.10.0.orig/asmrun/arm.S
++++ ocaml-3.10.0/asmrun/arm.S
+@@ -337,3 +337,7 @@ caml_system__frametable:
+ .short -1 /* negative frame size => use callback link */
+ .short 0 /* no roots */
+ .align 2
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
+Index: ocaml-3.10.0/asmrun/hppa.S
+===================================================================
+--- ocaml-3.10.0.orig/asmrun/hppa.S
++++ ocaml-3.10.0/asmrun/hppa.S
+@@ -532,3 +532,8 @@ G(caml_system__frametable):
+ .long L104 + 3 /* return address into callback */
+ .short -1 /* negative frame size => use callback link */
+ .short 0 /* no roots */
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
++
+Index: ocaml-3.10.0/asmrun/i386.S
+===================================================================
+--- ocaml-3.10.0.orig/asmrun/i386.S
++++ ocaml-3.10.0/asmrun/i386.S
+@@ -416,3 +416,8 @@ Lmcount$stub:
+ hlt ; hlt ; hlt ; hlt ; hlt
+ .subsections_via_symbols
+ #endif
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
++
+Index: ocaml-3.10.0/asmrun/ia64.S
+===================================================================
+--- ocaml-3.10.0.orig/asmrun/ia64.S
++++ ocaml-3.10.0/asmrun/ia64.S
+@@ -528,3 +528,8 @@ caml_system__frametable:
+
+ .common caml_saved_bsp#, 8, 8
+ .common caml_saved_rnat#, 8, 8
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
++
+Index: ocaml-3.10.0/asmrun/m68k.S
+===================================================================
+--- ocaml-3.10.0.orig/asmrun/m68k.S
++++ ocaml-3.10.0/asmrun/m68k.S
+@@ -242,3 +242,8 @@ _caml_system__frametable:
+ .long L107 | return address into callback
+ .word -1 | negative frame size => use callback link
+ .word 0 | no roots here
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
++
+Index: ocaml-3.10.0/asmrun/power-elf.S
+===================================================================
+--- ocaml-3.10.0.orig/asmrun/power-elf.S
++++ ocaml-3.10.0/asmrun/power-elf.S
+@@ -419,3 +419,7 @@ caml_system__frametable:
+ .short -1 /* negative size count => use callback link */
+ .short 0 /* no roots here */
+
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
++
+Index: ocaml-3.10.0/asmrun/sparc.S
+===================================================================
+--- ocaml-3.10.0.orig/asmrun/sparc.S
++++ ocaml-3.10.0/asmrun/sparc.S
+@@ -405,3 +405,8 @@ Caml_system__frametable:
+ .type Caml_raise_exception, #function
+ .type Caml_system__frametable, #object
+ #endif
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
++
+Index: ocaml-3.10.0/asmcomp/amd64/emit.mlp
+===================================================================
+--- ocaml-3.10.0.orig/asmcomp/amd64/emit.mlp
++++ ocaml-3.10.0/asmcomp/amd64/emit.mlp
+@@ -676,6 +676,13 @@ let data l =
+ ` .data\n`;
+ List.iter emit_item l
+
++(* Mark stack as non executable *)
++let nx_stack() =
++ if Config.system = "linux" then
++ ` .section .note.GNU-stack,\"\",%progbits\n`
++
++
++
+ (* Beginning / end of an assembly file *)
+
+ let begin_assembly() =
+@@ -689,6 +696,7 @@ let begin_assembly() =
+ `{emit_symbol lbl_begin}:\n`
+
+ let end_assembly() =
++ nx_stack();
+ let lbl_end = Compilenv.make_symbol (Some "code_end") in
+ ` .text\n`;
+ ` .globl {emit_symbol lbl_end}\n`;
+Index: ocaml-3.10.0/asmcomp/arm/emit.mlp
+===================================================================
+--- ocaml-3.10.0.orig/asmcomp/arm/emit.mlp
++++ ocaml-3.10.0/asmcomp/arm/emit.mlp
+@@ -642,6 +642,13 @@ let data l =
+ ` .data\n`;
+ List.iter emit_item l
+
++(* Mark stack as non executable *)
++let nx_stack() =
++ if Config.system = "linux" then
++ ` .section .note.GNU-stack,\"\",%progbits\n`
++
++
++
+ (* Beginning / end of an assembly file *)
+
+ let begin_assembly() =
+@@ -661,6 +668,7 @@ let begin_assembly() =
+ `{emit_symbol lbl_begin}:\n`
+
+ let end_assembly () =
++ nx_stack();
+ let lbl_end = Compilenv.make_symbol (Some "code_end") in
+ ` .text\n`;
+ ` .global {emit_symbol lbl_end}\n`;
+Index: ocaml-3.10.0/asmcomp/hppa/emit.mlp
+===================================================================
+--- ocaml-3.10.0.orig/asmcomp/hppa/emit.mlp
++++ ocaml-3.10.0/asmcomp/hppa/emit.mlp
+@@ -994,6 +994,12 @@ let data l =
+ ` .data\n`;
+ List.iter emit_item l
+
++(* Mark stack as non executable *)
++let nx_stack() =
++ if Config.system = "linux" then
++ ` .section .note.GNU-stack,\"\",%progbits\n`
++
++
+ (* Beginning / end of an assembly file *)
+
+ let begin_assembly() =
+@@ -1022,6 +1028,7 @@ let begin_assembly() =
+
+
+ let end_assembly() =
++ nx_stack();
+ ` .code\n`;
+ let lbl_end = Compilenv.make_symbol (Some "code_end") in
+ declare_global lbl_end;
+Index: ocaml-3.10.0/asmcomp/i386/emit.mlp
+===================================================================
+--- ocaml-3.10.0.orig/asmcomp/i386/emit.mlp
++++ ocaml-3.10.0/asmcomp/i386/emit.mlp
+@@ -947,6 +947,11 @@ let data l =
+ ` .data\n`;
+ List.iter emit_item l
+
++(* Mark stack as non executable *)
++let nx_stack() =
++ if Config.system = "linux" then
++ ` .section .note.GNU-stack,\"\",%progbits\n`
++
+ (* Beginning / end of an assembly file *)
+
+ let begin_assembly() =
+@@ -960,6 +965,7 @@ let begin_assembly() =
+ `{emit_symbol lbl_begin}:\n`
+
+ let end_assembly() =
++ nx_stack();
+ let lbl_end = Compilenv.make_symbol (Some "code_end") in
+ ` .text\n`;
+ ` .globl {emit_symbol lbl_end}\n`;
+Index: ocaml-3.10.0/asmcomp/ia64/emit.mlp
+===================================================================
+--- ocaml-3.10.0.orig/asmcomp/ia64/emit.mlp
++++ ocaml-3.10.0/asmcomp/ia64/emit.mlp
+@@ -1306,6 +1306,11 @@ let data l =
+ ` .align 8\n`;
+ List.iter emit_item l
+
++(* Mark stack as non executable *)
++let nx_stack() =
++ if Config.system = "linux" then
++ ` .section .note.GNU-stack,\"\",%progbits\n`
++
+ (* Beginning / end of an assembly file *)
+
+ let begin_assembly() =
+@@ -1315,6 +1320,7 @@ let begin_assembly() =
+ emit_define_symbol (Compilenv.make_symbol (Some "code_begin"))
+
+ let end_assembly () =
++ nx_stack();
+ ` .data\n`;
+ emit_define_symbol (Compilenv.make_symbol (Some "data_end"));
+ ` .text\n`;
+Index: ocaml-3.10.0/asmcomp/power/emit.mlp
+===================================================================
+--- ocaml-3.10.0.orig/asmcomp/power/emit.mlp
++++ ocaml-3.10.0/asmcomp/power/emit.mlp
+@@ -916,6 +916,12 @@ let data l =
+ emit_string data_space;
+ List.iter emit_item l
+
++(* Mark stack as non executable *)
++let nx_stack() =
++ if Config.system = "linux" then
++ ` .section .note.GNU-stack,\"\",%progbits\n`
++
++
+ (* Beginning / end of an assembly file *)
+
+ let begin_assembly() =
+@@ -932,6 +938,7 @@ let begin_assembly() =
+ `{emit_symbol lbl_begin}:\n`
+
+ let end_assembly() =
++ nx_stack();
+ if pic_externals then
+ (* Emit the pointers to external functions *)
+ StringSet.iter emit_external !external_functions;
+Index: ocaml-3.10.0/asmcomp/sparc/emit.mlp
+===================================================================
+--- ocaml-3.10.0.orig/asmcomp/sparc/emit.mlp
++++ ocaml-3.10.0/asmcomp/sparc/emit.mlp
+@@ -741,6 +741,12 @@ let data l =
+ ` .data\n`;
+ List.iter emit_item l
+
++(* Mark stack as non executable *)
++let nx_stack() =
++ if Config.system = "linux" then
++ ` .section .note.GNU-stack,\"\",%progbits\n`
++
++
+ (* Beginning / end of an assembly file *)
+
+ let begin_assembly() =
+@@ -754,6 +760,7 @@ let begin_assembly() =
+ `{emit_symbol lbl_begin}:\n`
+
+ let end_assembly() =
++ nx_stack();
+ ` .text\n`;
+ let lbl_end = Compilenv.make_symbol (Some "code_end") in
+ ` .global {emit_symbol lbl_end}\n`;
diff --git a/dev-lang/ocaml/ocaml-3.10.0.ebuild b/dev-lang/ocaml/ocaml-3.10.0.ebuild
new file mode 100644
index 000000000000..a5f4843e41e8
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-3.10.0.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ocaml-3.10.0.ebuild,v 1.1 2007/05/26 13:08:14 aballier Exp $
+
+inherit flag-o-matic eutils multilib pax-utils versionator toolchain-funcs
+
+DESCRIPTION="fast modern type-inferring functional programming language descended from the ML (Meta Language) family"
+HOMEPAGE="http://www.ocaml.org/"
+SRC_URI="http://caml.inria.fr/distrib/ocaml-$( get_version_component_range 1-2)/${P}.tar.gz"
+
+LICENSE="QPL-1.0 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="gdbm ncurses tk latex X"
+
+DEPEND="tk? ( >=dev-lang/tk-3.3.3 )
+ ncurses? ( sys-libs/ncurses )
+ X? ( x11-libs/libX11 x11-proto/xproto )
+ gdbm? ( sys-libs/gdbm )"
+
+QA_EXECSTACK="/usr/lib/ocaml/compiler-*"
+
+pkg_setup() {
+ # dev-lang/ocaml fails with -fPIC errors due to a "relocation R_X86_64_32S" on AMD64/hardened
+ if use amd64 && gcc-specs-pie ; then
+ echo
+ eerror "${CATEGORY}/${PF} is currently broken on this platform with specfiles injecting -PIE."
+ eerror "Please switch to your \"${CHOST}-$(gcc-fullversion)-hardenednopie\" specfile via gcc-config!"
+ die "Current specfile (${CHOST}-$(gcc-fullversion)) not supported by ${PF}!"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Fix the EXEC_STACK in ocaml compiled binaries (#153382)
+ epatch "${FILESDIR}"/${P}-exec-stack-fixes.patch
+
+ # Quick and somewhat dirty fix for bug #110541
+# epatch "${FILESDIR}"/${P}-execheap.patch
+
+ # The configure script doesn't inherit previous defined variables,
+ # overwriting previous declarations of bytecccompopts, bytecclinkopts,
+ # nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
+ epatch "${FILESDIR}"/${P}-configure.patch
+
+ # The sed in the Makefile doesn't replace all occurences of @compiler@
+ # in driver/ocamlcomp.sh.in. Reported upstream as issue 0004268.
+# epatch "${FILESDIR}"/${P}-Makefile.patch
+
+
+ # ocaml has automagics on libX11 and gdbm
+ # http://caml.inria.fr/mantis/view.php?id=4278
+ epatch "${FILESDIR}/${P}-automagic.patch"
+
+ # Call ld with proper flags, different from gcc ones
+ # This happens when calling ocamlc -pack
+ # See comment in the patch
+ epatch "${FILESDIR}/${P}-call-ld-with-proper-ldflags.patch"
+
+ # Ocaml native code generation for hppa has a bug
+ # See comments in the patch
+ # http://bugs.gentoo.org/show_bug.cgi?id=178256
+# use hppa && epatch "${FILESDIR}/${P}-hppa-optimize-for-size-ocamlp4.patch"
+}
+
+src_compile() {
+ local myconf="--host ${CHOST}"
+
+ # dev-lang/ocaml tends to break/give unexpected results with "unsafe" CFLAGS.
+ strip-flags
+ replace-flags "-O?" -O2
+
+ use tk || myconf="${myconf} -no-tk"
+ use ncurses || myconf="${myconf} -no-curses"
+ use X || myconf="${myconf} -no-graph"
+ use gdbm || myconf="${myconf} -no-dbm"
+
+ # ocaml uses a home-brewn configure script, preventing it to use econf.
+ ./configure -prefix /usr \
+ --bindir /usr/bin \
+ --libdir /usr/$(get_libdir)/ocaml \
+ --mandir /usr/share/man \
+ --with-pthread ${myconf} || die "configure failed!"
+
+ make world || die "make world failed!"
+
+ # Native code generation is unsupported on some archs
+ if ! use ppc64 ; then
+ make opt || die "make opt failed!"
+ make opt.opt || die "make opt.opt failed!"
+ fi
+}
+
+src_install() {
+ make BINDIR="${D}"/usr/bin \
+ LIBDIR="${D}"/usr/$(get_libdir)/ocaml \
+ MANDIR="${D}"/usr/share/man \
+ install || die "make install failed!"
+
+ # Install the compiler libs
+ dodir /usr/$(get_libdir)/ocaml/compiler-libs
+ insinto /usr/$(get_libdir)/ocaml/compiler-libs
+ doins {utils,typing,parsing}/*.{mli,cmi,cmo,cmx,o}
+
+ # Symlink the headers to the right place
+ dodir /usr/include
+ dosym /usr/$(get_libdir)/ocaml/caml /usr/include/
+
+ # Remove ${D} from ld.conf, as the buildsystem isn't $(DESTDIR) aware
+ dosed "s:${D}::g" /usr/$(get_libdir)/ocaml/ld.conf
+
+ dodoc Changes INSTALL LICENSE README Upgrading
+
+ # Turn MPROTECT off for some of the ocaml binaries, since they are trying to
+ # rewrite the segment (which will obviously fail on systems having
+ # PAX_MPROTECT enabled).
+ pax-mark -m "${D}"/usr/bin/ocamldoc.opt "${D}"/usr/bin/ocamldep.opt \
+ "${D}"/usr/bin/ocamllex.opt "${D}"/usr/bin/camlp4r.opt \
+ "${D}"/usr/bin/camlp4o.opt
+
+ # Create and envd entry for latex input files (this definitely belongs into
+ # CONTENT and not in pkg_postinst.
+ if use latex ; then
+ echo "TEXINPUTS=/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc
+ doenvd "${T}"/99ocamldoc
+ fi
+
+ # Install ocaml-rebuild.sh script rather than keeping it in $PORTDIR
+ dosbin "${FILESDIR}/ocaml-rebuild.sh"
+}
+
+pkg_postinst() {
+ if use amd64 && gcc-specs-ssp ; then
+ ewarn
+ ewarn "Make sure, you switch back to the default specfile ${CHOST}-$(gcc-fullversion) via gcc-config!"
+ ewarn
+ fi
+
+ echo
+ elog "OCaml is not binary compatible from version to version, so you (may)"
+ elog "need to rebuild all packages depending on it, that are actually"
+ elog "installed on your system. To do so, you can run:"
+ elog "/usr/sbin/ocaml-rebuild.sh [-h | emerge options]"
+ elog "Which will call emerge on all old packages with the given options"
+ echo
+}