diff options
author | Fabian Groffen <grobian@gentoo.org> | 2012-05-26 10:10:50 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2012-05-26 10:10:50 +0000 |
commit | 5cd704d4be39d2821f0c57d7ccfbd9bd8803eb7b (patch) | |
tree | fa5a96c6aebcad222a722c98bb9426d50d87da8a /dev-lang | |
parent | arm stable, bug #416281 (diff) | |
download | gentoo-2-5cd704d4be39d2821f0c57d7ccfbd9bd8803eb7b.tar.gz gentoo-2-5cd704d4be39d2821f0c57d7ccfbd9bd8803eb7b.tar.bz2 gentoo-2-5cd704d4be39d2821f0c57d7ccfbd9bd8803eb7b.zip |
Fix compilation on Darwin, bug #417401
(Portage version: 2.2.01.20430-prefix/cvs/Darwin i386)
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/v8/ChangeLog | 7 | ||||
-rw-r--r-- | dev-lang/v8/files/v8-3.10.8.10-darwin-arch.patch | 29 | ||||
-rw-r--r-- | dev-lang/v8/v8-3.10.8.10.ebuild | 26 | ||||
-rw-r--r-- | dev-lang/v8/v8-3.10.8.7.ebuild | 4 | ||||
-rw-r--r-- | dev-lang/v8/v8-3.11.3.ebuild | 26 | ||||
-rw-r--r-- | dev-lang/v8/v8-9999.ebuild | 26 |
6 files changed, 103 insertions, 15 deletions
diff --git a/dev-lang/v8/ChangeLog b/dev-lang/v8/ChangeLog index 79ee61f07848..6cce94065b6c 100644 --- a/dev-lang/v8/ChangeLog +++ b/dev-lang/v8/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-lang/v8 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/ChangeLog,v 1.186 2012/05/25 02:08:22 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/ChangeLog,v 1.187 2012/05/26 10:10:50 grobian Exp $ + + 26 May 2012; Fabian Groffen <grobian@gentoo.org> + +files/v8-3.10.8.10-darwin-arch.patch, v8-3.10.8.10.ebuild, + v8-3.10.8.7.ebuild, v8-3.11.3.ebuild, v8-9999.ebuild: + Fix compilation on Darwin, bug #417401 *v8-3.10.8.10 (25 May 2012) diff --git a/dev-lang/v8/files/v8-3.10.8.10-darwin-arch.patch b/dev-lang/v8/files/v8-3.10.8.10-darwin-arch.patch new file mode 100644 index 000000000000..8fbb34980aa1 --- /dev/null +++ b/dev-lang/v8/files/v8-3.10.8.10-darwin-arch.patch @@ -0,0 +1,29 @@ +https://bugs.gentoo.org/show_bug.cgi?id=417401 + +The Prefix toolchain on OSX doesn't support -arch, even though using +gcc-apple. This is not really a problem (FSF GCC doesn't understand +this flag either), because we never build FAT objects. It is however a +problem when people forcibly add -arch to CFLAGS and LDFLAGS. Leave it +to the toolchain such that we can also build 64-bits. (Pro!) + +Request for removing this when unnecessary: +http://code.google.com/p/gyp/issues/detail?id=260 + +--- build/gyp/pylib/gyp/xcode_emulation.py ++++ build/gyp/pylib/gyp/xcode_emulation.py +@@ -317,7 +317,6 @@ + # TODO: Supporting fat binaries will be annoying. + self._WarnUnimplemented('ARCHS') + archs = ['i386'] +- cflags.append('-arch ' + archs[0]) + + if archs[0] in ('i386', 'x86_64'): + if self._Test('GCC_ENABLE_SSE3_EXTENSIONS', 'YES', default='NO'): +@@ -435,7 +434,6 @@ + # TODO: Supporting fat binaries will be annoying. + self._WarnUnimplemented('ARCHS') + archs = ['i386'] +- ldflags.append('-arch ' + archs[0]) + + # Xcode adds the product directory by default. + ldflags.append('-L' + product_dir) diff --git a/dev-lang/v8/v8-3.10.8.10.ebuild b/dev-lang/v8/v8-3.10.8.10.ebuild index 2f7632609586..1108efc49b8a 100644 --- a/dev-lang/v8/v8-3.10.8.10.ebuild +++ b/dev-lang/v8/v8-3.10.8.10.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.10.8.10.ebuild,v 1.1 2012/05/25 02:08:22 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.10.8.10.ebuild,v 1.2 2012/05/26 10:10:50 grobian Exp $ EAPI="4" @@ -22,6 +22,14 @@ pkg_setup() { python_pkg_setup } +src_prepare() { + # strip unsupported -arch (in Prefix) for OSX, e.g. bug #417401 + epatch "${FILESDIR}"/${P}-darwin-arch.patch + # make sure we don't target an anchient version of OSX + # issue http://code.google.com/p/v8/issues/detail?id=2151 + #sed -i -e "/MACOSX_DEPLOYMENT_TARGET/d" build/standalone.gypi || die +} + src_compile() { tc-export AR CC CXX RANLIB @@ -77,14 +85,24 @@ src_install() { insinto /usr doins -r include || die - dobin out/${mytarget}/d8 || die - if [[ ${CHOST} == *-darwin* ]] ; then # buildsystem is too horrific to get this built correctly - mv out/${mytarget}/lib.target/libv8.so.${soname_version} \ + mkdir -p out/${mytarget}/lib.target + mv out/${mytarget}/libv8.so.${soname_version} \ out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die + install_name_tool \ + -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \ + out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) \ + || die + install_name_tool \ + -change \ + "${S}"/out/${mytarget}/libv8.so.${soname_version} \ + "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \ + out/${mytarget}/d8 || die fi + dobin out/${mytarget}/d8 || die + dolib out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname) || die diff --git a/dev-lang/v8/v8-3.10.8.7.ebuild b/dev-lang/v8/v8-3.10.8.7.ebuild index d2fb66056d86..653fe15ef00c 100644 --- a/dev-lang/v8/v8-3.10.8.7.ebuild +++ b/dev-lang/v8/v8-3.10.8.7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.10.8.7.ebuild,v 1.1 2012/05/21 14:27:34 phajdan.jr Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.10.8.7.ebuild,v 1.2 2012/05/26 10:10:50 grobian Exp $ EAPI="4" @@ -14,7 +14,7 @@ SRC_URI="http://commondatastorage.googleapis.com/chromium-browser-official/${P}. LICENSE="BSD" SLOT="0" -KEYWORDS="~amd64 ~x86 ~x64-macos ~x86-macos" +KEYWORDS="~amd64 ~x86" IUSE="" pkg_setup() { diff --git a/dev-lang/v8/v8-3.11.3.ebuild b/dev-lang/v8/v8-3.11.3.ebuild index 4bbb23b28bf8..804a4550989b 100644 --- a/dev-lang/v8/v8-3.11.3.ebuild +++ b/dev-lang/v8/v8-3.11.3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.11.3.ebuild,v 1.1 2012/05/22 20:05:57 phajdan.jr Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.11.3.ebuild,v 1.2 2012/05/26 10:10:50 grobian Exp $ EAPI="4" @@ -22,6 +22,14 @@ pkg_setup() { python_pkg_setup } +src_prepare() { + # strip unsupported -arch (in Prefix) for OSX, e.g. bug #417401 + epatch "${FILESDIR}"/${PN}-3.10.8.10-darwin-arch.patch + # make sure we don't target an anchient version of OSX + # issue http://code.google.com/p/v8/issues/detail?id=2151 + #sed -i -e "/MACOSX_DEPLOYMENT_TARGET/d" build/standalone.gypi || die +} + src_compile() { tc-export AR CC CXX RANLIB @@ -77,14 +85,24 @@ src_install() { insinto /usr doins -r include || die - dobin out/${mytarget}/d8 || die - if [[ ${CHOST} == *-darwin* ]] ; then # buildsystem is too horrific to get this built correctly - mv out/${mytarget}/lib.target/libv8.so.${soname_version} \ + mkdir -p out/${mytarget}/lib.target + mv out/${mytarget}/libv8.so.${soname_version} \ out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die + install_name_tool \ + -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \ + out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) \ + || die + install_name_tool \ + -change \ + "${S}"/out/${mytarget}/libv8.so.${soname_version} \ + "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \ + out/${mytarget}/d8 || die fi + dobin out/${mytarget}/d8 || die + dolib out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname) || die diff --git a/dev-lang/v8/v8-9999.ebuild b/dev-lang/v8/v8-9999.ebuild index ad4552a7ca69..f8badf763232 100644 --- a/dev-lang/v8/v8-9999.ebuild +++ b/dev-lang/v8/v8-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-9999.ebuild,v 1.27 2012/04/12 12:36:21 phajdan.jr Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-9999.ebuild,v 1.28 2012/05/26 10:10:50 grobian Exp $ EAPI="4" @@ -28,6 +28,14 @@ src_unpack() { make dependencies || die } +src_prepare() { + # strip unsupported -arch (in Prefix) for OSX, e.g. bug #417401 + epatch "${FILESDIR}"/${PN}-3.10.8.10-darwin-arch.patch + # make sure we don't target an anchient version of OSX + # issue http://code.google.com/p/v8/issues/detail?id=2151 + #sed -i -e "/MACOSX_DEPLOYMENT_TARGET/d" build/standalone.gypi || die +} + src_compile() { tc-export AR CC CXX RANLIB @@ -84,14 +92,24 @@ src_install() { insinto /usr doins -r include || die - dobin out/${mytarget}/d8 || die - if [[ ${CHOST} == *-darwin* ]] ; then # buildsystem is too horrific to get this built correctly - mv out/${mytarget}/lib.target/libv8.so.${soname_version} \ + mkdir -p out/${mytarget}/lib.target + mv out/${mytarget}/libv8.so.${soname_version} \ out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die + install_name_tool \ + -id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \ + out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) \ + || die + install_name_tool \ + -change \ + "${S}"/out/${mytarget}/libv8.so.${soname_version} \ + "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname) \ + out/${mytarget}/d8 || die fi + dobin out/${mytarget}/d8 || die + dolib out/${mytarget}/lib.target/libv8$(get_libname ${soname_version}) || die dosym libv8$(get_libname ${soname_version}) /usr/$(get_libdir)/libv8$(get_libname) || die |