summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2007-05-14 22:37:06 +0000
committerAlexis Ballier <aballier@gentoo.org>2007-05-14 22:37:06 +0000
commit07916b9a4a95c9c655eaac8e257f30bd37a07f9b (patch)
tree099872e04e783bca99819aba33f30394e809307e /dev-lang/ocaml
parentMake the tests pass without FEATURES=-userpriv (bug #176201). (diff)
downloadgentoo-2-07916b9a4a95c9c655eaac8e257f30bd37a07f9b.tar.gz
gentoo-2-07916b9a4a95c9c655eaac8e257f30bd37a07f9b.tar.bz2
gentoo-2-07916b9a4a95c9c655eaac8e257f30bd37a07f9b.zip
Call ld with proper flags to prevent compilation failures of some other ocaml packages
(Portage version: 2.1.2.7)
Diffstat (limited to 'dev-lang/ocaml')
-rw-r--r--dev-lang/ocaml/ChangeLog8
-rw-r--r--dev-lang/ocaml/files/ocaml-3.09.3-call_ld_with_proper_flags.patch30
-rw-r--r--dev-lang/ocaml/ocaml-3.09.3-r1.ebuild7
3 files changed, 43 insertions, 2 deletions
diff --git a/dev-lang/ocaml/ChangeLog b/dev-lang/ocaml/ChangeLog
index dd1bd2a012bf..f2d94a301d1e 100644
--- a/dev-lang/ocaml/ChangeLog
+++ b/dev-lang/ocaml/ChangeLog
@@ -1,6 +1,12 @@
# 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.108 2007/05/14 18:42:44 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.109 2007/05/14 22:37:06 aballier Exp $
+
+ 14 May 2007; Alexis Ballier <aballier@gentoo.org>
+ +files/ocaml-3.09.3-call_ld_with_proper_flags.patch,
+ ocaml-3.09.3-r1.ebuild:
+ Call ld with proper flags to prevent compilation failures of some other
+ ocaml packages
14 May 2007; Jeroen Roovers <jer@gentoo.org> ocaml-3.09.3-r1.ebuild:
Reverting ~hppa keywording due to build failure.
diff --git a/dev-lang/ocaml/files/ocaml-3.09.3-call_ld_with_proper_flags.patch b/dev-lang/ocaml/files/ocaml-3.09.3-call_ld_with_proper_flags.patch
new file mode 100644
index 000000000000..edf040570d99
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-3.09.3-call_ld_with_proper_flags.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.09.3/Makefile
+===================================================================
+--- ocaml-3.09.3.orig/Makefile
++++ ocaml-3.09.3/Makefile
+@@ -314,6 +314,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
+@@ -324,8 +326,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%%|ld -r $(NATIVECCLINKOPTS)|' \
+- -e 's|%%PACKLD%%|ld -r $(NATIVECCLINKOPTS)|' \
++ -e 's|%%PARTIALLD%%|ld -r $(subst $(comma), ,$(subst $(Wl),,$(NATIVECCLINKOPTS)))|' \
++ -e 's|%%PACKLD%%|ld -r $(subst $(comma), ,$(subst $(Wl),,$(NATIVECCLINKOPTS)))|' \
+ -e 's|%%BYTECCLIBS%%|$(BYTECCLIBS)|' \
+ -e 's|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|' \
+ -e 's|%%RANLIBCMD%%|$(RANLIBCMD)|' \
diff --git a/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild b/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild
index 4a059300a635..ad5ee27fd8ba 100644
--- a/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild
+++ b/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild
@@ -1,6 +1,6 @@
# 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.09.3-r1.ebuild,v 1.10 2007/05/14 18:42:44 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ocaml-3.09.3-r1.ebuild,v 1.11 2007/05/14 22:37:06 aballier Exp $
inherit flag-o-matic eutils multilib pax-utils versionator toolchain-funcs
@@ -56,6 +56,11 @@ src_unpack() {
# 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_flags.patch"
+
# Change the configure script to add the CFLAGS to bytecccompopts, LDFLAGS
# to bytecclinkopts.
sed -i -e "s,bytecccompopts=\"\",bytecccompopts=\"\${CFLAGS}\"," \