Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 437518 - Please review Prefix changes for dev-lang/spidermonkey
Summary: Please review Prefix changes for dev-lang/spidermonkey
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Jory A. Pratt
URL:
Whiteboard:
Keywords: InOverlay
Depends on:
Blocks: prefix-gx86
  Show dependency tree
 
Reported: 2012-10-07 14:08 UTC by Fabian Groffen
Modified: 2012-10-24 16:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2012-10-07 14:08:38 UTC
Because 1.7.0 is the only unmasked version, we unfortunately have to hack it for Prefix:

--- spidermonkey-1.7.0-r2.ebuild.orig   2012-10-07 16:01:03.837276383 +0200
+++ spidermonkey-1.7.0-r2.ebuild        2012-10-07 16:00:20.878353729 +0200
@@ -2,6 +2,8 @@
 # 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.2 2011/03/22 15:51:21 jer Exp $
 
+EAPI=3
+
 inherit eutils toolchain-funcs multilib flag-o-matic
 
 MY_P="js-${PV}"
@@ -19,13 +21,15 @@
 RDEPEND="threadsafe? ( dev-libs/nspr )"
 DEPEND="${RDEPEND}"
 
-src_unpack() {
-       unpack ${A}
-       cd "${S}"
+src_prepare() {
        epatch "${FILESDIR}/${PN}-1.5-build.patch"
        epatch "${FILESDIR}/${PN}-1.6-header.patch"
        epatch "${FILESDIR}/${P}-threadsafe.diff" \
                "${FILESDIR}"/${P}-ldflags.patch
+
+       # don't force owner for Prefix
+       sed -i -e '/^INSTALL :=/s/-g 0 -o root//' Makefile.ref
+
        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"
@@ -46,7 +50,7 @@
 }
 
 src_install() {
-       emake -f Makefile.ref install DESTDIR="${D}" LIBDIR="$(get_libdir)" || die
+       emake -f Makefile.ref install DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="$(get_libdir)" || die
        dodoc ../jsd/README
        dohtml README.html
 }

(1.8.7 doesn't need changes, it builds as is)

I'd be more comfortable myself if this could be a revbump to -r3.  Please review/comment.
Comment 1 Jory A. Pratt gentoo-dev 2012-10-07 14:11:27 UTC
Is there a reason why you can not work with 1.8.5 rather then a buggy 1.7.0? 1.8.5 is going stable and is where everything should be moving to.
Comment 2 Fabian Groffen gentoo-dev 2012-10-07 14:12:52 UTC
mongodb :(
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2012-10-09 13:37:34 UTC
(In reply to comment #2)
> mongodb :(

External javascript support is officially gone from mongodb upstream; if you don't want to use v8 you are supposed to use their embedded and hacked copy of a spidermonkey-1.8.0 pre-release.  See bug 390631 (which I will be trying to complete in the next day or three)
Comment 4 Fabian Groffen gentoo-dev 2012-10-09 13:40:20 UTC
whatever, the ebuild defaults to spidermonkey (and v8 is a no-go area on most platforms), so couldn't tell, really

If the ebuild needs to be hacked to do things differently, it seems mongo is very happy with this version of spidermonkey, though...
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2012-10-12 20:11:15 UTC
committed a 1.7.0-r3 with suggested changes to the overlay.  I used DESTDIR=${ED} instead of specifying a PREFIX though; i could not see any difference in the result.
Comment 6 Fabian Groffen gentoo-dev 2012-10-13 06:12:10 UTC
(In reply to comment #5)
> I used
> DESTDIR=${ED} instead of specifying a PREFIX though; i could not see any
> difference in the result.

That's a shame.  Some platforms really need to have a sane PREFIX set, because they calculate paths off of that, and store them in binaries/libraries produced.

Thanks for taking the changes to the overlay.
Comment 7 Jory A. Pratt gentoo-dev 2012-10-21 20:02:50 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > I used
> > DESTDIR=${ED} instead of specifying a PREFIX though; i could not see any
> > difference in the result.
> 
> That's a shame.  Some platforms really need to have a sane PREFIX set,
> because they calculate paths off of that, and store them in
> binaries/libraries produced.
> 
> Thanks for taking the changes to the overlay.

Change was removed from overlay, it belongs in tree feel free to commit it there for the 1.7.0 branch but it wont be around much longer due to security issues that are present in the engine.
Comment 8 Fabian Groffen gentoo-dev 2012-10-22 17:17:04 UTC
By comment #3 and comment #7, I'll declare this bug as not worth the trouble, closing without committing anything.
Comment 9 Ian Stakenvicius (RETIRED) gentoo-dev 2012-10-22 18:42:34 UTC
I'm still planning to commit it to the tree; just waiting for the herd OK to commit EAPI=5 ebuilds.