summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2010-08-06 23:15:48 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2010-08-06 23:15:48 +0000
commit516a27fc6911686cbc39c37b0877d6dee53bf339 (patch)
treed02ddb94aa62398406498e8a1239b3f8b9871884 /dev-lang
parentVersion bump. Removed old. (diff)
downloadgentoo-2-516a27fc6911686cbc39c37b0877d6dee53bf339.tar.gz
gentoo-2-516a27fc6911686cbc39c37b0877d6dee53bf339.tar.bz2
gentoo-2-516a27fc6911686cbc39c37b0877d6dee53bf339.zip
Apply patch from Kacper Kowalik <xarthisius@gentoo.org> to respect LDFLAGS. Bug #331129
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/spidermonkey/ChangeLog9
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch24
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.7.0-r2.ebuild52
3 files changed, 84 insertions, 1 deletions
diff --git a/dev-lang/spidermonkey/ChangeLog b/dev-lang/spidermonkey/ChangeLog
index 1e5a1fcd6446..e9343494738d 100644
--- a/dev-lang/spidermonkey/ChangeLog
+++ b/dev-lang/spidermonkey/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-lang/spidermonkey
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/spidermonkey/ChangeLog,v 1.46 2010/03/07 22:38:56 ramereth Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/spidermonkey/ChangeLog,v 1.47 2010/08/06 23:15:48 hwoarang Exp $
+
+*spidermonkey-1.7.0-r2 (06 Aug 2010)
+
+ 06 Aug 2010; Markos Chandras <hwoarang@gentoo.org>
+ +spidermonkey-1.7.0-r2.ebuild, +files/spidermonkey-1.7.0-ldflags.patch:
+ Apply patch from Kacper Kowalik <xarthisius@gentoo.org> to respect
+ LDFLAGS. Bug #331129
*spidermonkey-1.7.0-r1 (07 Mar 2010)
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch b/dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch
new file mode 100644
index 000000000000..2aad9404f4d4
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch
@@ -0,0 +1,24 @@
+Respect LDFLAGS
+
+http://bugs.gentoo.org/show_bug.cgi?id=331129
+
+--- js/src/Makefile.ref
++++ js/src/Makefile.ref
+@@ -338,7 +338,7 @@
+ link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
+ else
+ $(PROGRAM): $(PROG_OBJS) $(LIBRARY)
+- $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
++ $(CC) $(HOST_LDFLAGS) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
+ $(PROG_LIBS)
+ endif
+
+@@ -355,7 +355,7 @@
+ $(OBJDIR)/jscpucfg > $@
+
+ $(OBJDIR)/jscpucfg: $(OBJDIR)/jscpucfg.o
+- $(CC) -o $@ $(OBJDIR)/jscpucfg.o
++ $(CC) $(HOST_LDFLAGS) -o $@ $(OBJDIR)/jscpucfg.o
+
+ # Add to TARGETS for clobber rule
+ TARGETS += $(OBJDIR)/jsautocfg.h $(OBJDIR)/jscpucfg \
diff --git a/dev-lang/spidermonkey/spidermonkey-1.7.0-r2.ebuild b/dev-lang/spidermonkey/spidermonkey-1.7.0-r2.ebuild
new file mode 100644
index 000000000000..94d68f5742cd
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.7.0-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/spidermonkey/spidermonkey-1.7.0-r2.ebuild,v 1.1 2010/08/06 23:15:48 hwoarang Exp $
+
+inherit eutils toolchain-funcs multilib flag-o-matic
+
+MY_P="js-${PV}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="http://www.mozilla.org/js/spidermonkey/"
+SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.tar.gz"
+
+LICENSE="NPL-1.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="threadsafe unicode"
+
+S="${WORKDIR}/js/src"
+
+RDEPEND="threadsafe? ( dev-libs/nspr )"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-1.5-build.patch"
+ epatch "${FILESDIR}/${PN}-1.6-header.patch"
+ epatch "${FILESDIR}/${P}-threadsafe.diff" \
+ "${FILESDIR}"/${P}-ldflags.patch
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -s "${S}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk"
+ fi
+}
+
+src_compile() {
+ use unicode && append-flags "-DJS_C_STRINGS_ARE_UTF8"
+ tc-export CC LD AR
+ if use threadsafe; then
+ emake -j1 -f Makefile.ref LIBDIR="$(get_libdir)" JS_THREADSAFE=1 \
+ XLDFLAGS="$(raw-ldflags)" HOST_LDFLAGS="${LDFLAGS}" \
+ || die "emake with threadsafe enabled failed";
+ else
+ emake -j1 -f Makefile.ref LIBDIR="$(get_libdir)" XLDFLAGS="$(raw-ldflags)" \
+ HOST_LDFLAGS="${LDFLAGS}" || die "emake without threadsafe enabled failed";
+ fi
+}
+
+src_install() {
+ emake -f Makefile.ref install DESTDIR="${D}" LIBDIR="$(get_libdir)" || die
+ dodoc ../jsd/README
+ dohtml README.html
+}