diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-01-12 23:20:21 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-01-13 10:51:58 -0500 |
commit | cc362d57ef3f050a2dbc7c0e87d4f2cb0b1dd309 (patch) | |
tree | 00d5b41d71208e9fecbc9b87d9280f961afa7c94 /dev-lang/spidermonkey | |
parent | dev-lang/spidermonkey: depend on readline since it is used (diff) | |
download | gentoo-cc362d57ef3f050a2dbc7c0e87d4f2cb0b1dd309.tar.gz gentoo-cc362d57ef3f050a2dbc7c0e87d4f2cb0b1dd309.tar.bz2 gentoo-cc362d57ef3f050a2dbc7c0e87d4f2cb0b1dd309.zip |
dev-lang/spidermonkey: fix cross-compiling logic
Diffstat (limited to 'dev-lang/spidermonkey')
-rw-r--r-- | dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild | 28 | ||||
-rw-r--r-- | dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild | 28 | ||||
-rw-r--r-- | dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild | 30 |
3 files changed, 51 insertions, 35 deletions
diff --git a/dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild b/dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild index 10841b9b04ac..1905b66c2c8c 100644 --- a/dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild +++ b/dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild @@ -83,26 +83,32 @@ src_configure() { $(use_enable test tests) } +cross_make() { + emake \ + CFLAGS="${BUILD_CFLAGS}" \ + CXXFLAGS="${BUILD_CXXFLAGS}" \ + AR="${BUILD_AR}" \ + CC="${BUILD_CC}" \ + CXX="${BUILD_CXX}" \ + RANLIB="${BUILD_RANLIB}" \ + "$@" +} src_compile() { cd "${BUILDDIR}" || die if tc-is-cross-compiler; then - make CFLAGS="" CXXFLAGS="" \ - CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \ - AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \ - jscpucfg host_jsoplengen host_jskwgen || die - make CFLAGS="" CXXFLAGS="" \ - CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \ - AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \ - -C config nsinstall || die + tc-export_build_env BUILD_{AR,CC,CXX,RANLIB} + cross_make jscpucfg host_jsoplengen host_jskwgen + cross_make -C config nsinstall mv {,native-}jscpucfg || die mv {,native-}host_jskwgen || die mv {,native-}host_jsoplengen || die mv config/{,native-}nsinstall || die - sed -e 's@./jscpucfg@./native-jscpucfg@' \ + sed -i \ + -e 's@./jscpucfg@./native-jscpucfg@' \ -e 's@./host_jskwgen@./native-host_jskwgen@' \ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \ - -i Makefile || die - sed -e 's@/nsinstall@/native-nsinstall@' -i config/config.mk || die + Makefile || die + sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die rm -f config/host_nsinstall.o \ config/host_pathsub.o \ host_jskwgen.o \ diff --git a/dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild b/dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild index d374afb506f1..186ae1185d1f 100644 --- a/dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild +++ b/dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild @@ -80,26 +80,30 @@ src_configure() { $(use_enable test tests) } +cross_make() { + emake \ + CFLAGS="${BUILD_CFLAGS}" \ + CXXFLAGS="${BUILD_CXXFLAGS}" \ + AR="${BUILD_AR}" \ + CC="${BUILD_CC}" \ + CXX="${BUILD_CXX}" \ + RANLIB="${BUILD_RANLIB}" \ + "$@" +} src_compile() { cd "${BUILDDIR}" || die if tc-is-cross-compiler; then - make CFLAGS="" CXXFLAGS="" \ - CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \ - AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \ - jscpucfg host_jsoplengen host_jskwgen || die - make CFLAGS="" CXXFLAGS="" \ - CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \ - AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \ - -C config nsinstall || die - mv {,native-}jscpucfg || die + tc-export_build_env BUILD_{AR,CC,CXX,RANLIB} + cross_make host_jsoplengen host_jskwgen + cross_make -C config nsinstall mv {,native-}host_jskwgen || die mv {,native-}host_jsoplengen || die mv config/{,native-}nsinstall || die - sed -e 's@./jscpucfg@./native-jscpucfg@' \ + sed -i \ -e 's@./host_jskwgen@./native-host_jskwgen@' \ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \ - -i Makefile || die - sed -e 's@/nsinstall@/native-nsinstall@' -i config/config.mk || die + Makefile || die + sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die rm -f config/host_nsinstall.o \ config/host_pathsub.o \ host_jskwgen.o \ diff --git a/dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild b/dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild index 07ca9583bb5e..e891ec6def46 100644 --- a/dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild +++ b/dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild @@ -88,30 +88,36 @@ src_configure() { $(use_enable test tests) } +cross_make() { + emake \ + CFLAGS="${BUILD_CFLAGS}" \ + CXXFLAGS="${BUILD_CXXFLAGS}" \ + AR="${BUILD_AR}" \ + CC="${BUILD_CC}" \ + CXX="${BUILD_CXX}" \ + RANLIB="${BUILD_RANLIB}" \ + "$@" +} src_compile() { cd "${BUILDDIR}" || die if tc-is-cross-compiler; then - make CFLAGS="" CXXFLAGS="" \ - CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \ - AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \ + tc-export_build_env BUILD_{AR,CC,CXX,RANLIB} + cross_make \ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \ MOZ_PGO_OPTIMIZE_FLAGS="" \ - jscpucfg host_jsoplengen host_jskwgen || die - make CFLAGS="" CXXFLAGS="" \ - CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \ - AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \ + host_jsoplengen host_jskwgen + cross_make \ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \ - -C config nsinstall || die - mv {,native-}jscpucfg || die + -C config nsinstall mv {,native-}host_jskwgen || die mv {,native-}host_jsoplengen || die mv config/{,native-}nsinstall || die - sed -e 's@./jscpucfg@./native-jscpucfg@' \ + sed -i \ -e 's@./host_jskwgen@./native-host_jskwgen@' \ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \ - -i Makefile || die - sed -e 's@/nsinstall@/native-nsinstall@' -i config/config.mk || die + Makefile || die + sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die rm -f config/host_nsinstall.o \ config/host_pathsub.o \ host_jskwgen.o \ |