Contents of /trunk/extras/spidermonkey/spidermonkey-52.7.3-r1.smage2
Parent Directory | Revision Log
Revision 30875 -
(show annotations)
(download)
Fri May 11 08:15:33 2018 UTC (5 years, 11 months ago) by niro
File size: 2917 byte(s)
Fri May 11 08:15:33 2018 UTC (5 years, 11 months ago) by niro
File size: 2917 byte(s)
-disabled multilib
1 | # $Id$ |
2 | |
3 | PNAME="spidermonkey" |
4 | PVER="52.7.3" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="dev-java" |
8 | |
9 | DESCRIPTION="SpiderMonkey is the code-name for the Mozilla's C implementation of JavaScript." |
10 | HOMEPAGE="https://developer.mozilla.org/en-US/docs/SpiderMonkey" |
11 | |
12 | DEPEND=">= sys-libs/zlib-1.2 |
13 | >= sys-libs/readline-7 |
14 | >= sys-libs/libstdc++-7.3" |
15 | SDEPEND=">= dev-lang/python-2.7 |
16 | >= app-arch/zip-3" |
17 | |
18 | # direct mecurial export |
19 | SRCFILE="FIREFOX_${PVER//./_}esr_RELEASE.tar.bz2" |
20 | SRCDIR="${BUILDDIR}/mozilla-unified-FIREFOX_${PVER//./_}esr_RELEASE" |
21 | |
22 | #EMUL_LINUX_32=true |
23 | #sminclude multilib python |
24 | sminclude python |
25 | msetfeature "!check" |
26 | |
27 | SRC_URI=( |
28 | #https://hg.mozilla.org/mozilla-unified/archive/${SRCFILE} |
29 | mirror://${PNAME}/${SRCFILE} |
30 | mirror://${PNAME}/${PNAME}-${PVER}-fix-soname.patch |
31 | mirror://${PNAME}/${PNAME}-${PVER}-copy-headers.patch |
32 | mirror://${PNAME}/${PNAME}-${PVER}-disable-mozglue.patch |
33 | mirror://${PNAME}/${PNAME}-${PVER}-include-configure-script.patch |
34 | ) |
35 | |
36 | UP2DATE="updatecmd https://hg.mozilla.org/mozilla-unified/tags | grep '/FIREFOX_.*esr_RELEASE' | sed -e 's:.*/FIREFOX_\(.*\)esr_RELEASE:\1:' -e 's:_:\.:g' | upsort_pipe" |
37 | |
38 | src_prepare() |
39 | { |
40 | munpack ${SRCFILE} || die |
41 | mpatch ${PNAME}-${PVER}-fix-soname.patch || die |
42 | mpatch ${PNAME}-${PVER}-copy-headers.patch || die |
43 | mpatch ${PNAME}-${PVER}-disable-mozglue.patch || die |
44 | mpatch ${PNAME}-${PVER}-include-configure-script.patch || die |
45 | |
46 | # create missing python execs on multilib systems |
47 | if [[ ${ARCH} = x86_64 ]] && [[ $(mlibdir) != lib ]] |
48 | then |
49 | for abi in ${MULTILIB_ABIS} |
50 | do |
51 | cd ${SRCDIR}-${abi} |
52 | sed -i '/^rm -rf _virtualenv/d' configure.in || die |
53 | sed -i '/^mkdir -p _virtualenv/d' configure.in || die |
54 | |
55 | install -d _virtualenv/bin || die |
56 | cp -a /usr/bin/python-m32 _virtualenv/bin || die |
57 | cp -a /usr/bin/python-m64 _virtualenv/bin || die |
58 | cp -a /usr/bin/python$(mget-python-version)-m32 _virtualenv/bin || die |
59 | cp -a /usr/bin/python$(mget-python-version)-m64 _virtualenv/bin || die |
60 | done |
61 | fi |
62 | |
63 | export WANT_AUTOCONF=2.1 |
64 | autoconf || die |
65 | } |
66 | |
67 | src_compile() |
68 | { |
69 | export CPPFLAGS="" |
70 | export CFLAGS+=' -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp -flto=3' |
71 | export CXXFLAGS+=' -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp -flto=3' |
72 | export CC=gcc |
73 | export CXX=g++ |
74 | export SHELL="${SHELL}" |
75 | |
76 | SRCSUBDIR="js/src" \ |
77 | mconfigure \ |
78 | --disable-debug \ |
79 | --disable-debug-symbols \ |
80 | --disable-strip \ |
81 | --enable-gold \ |
82 | --enable-optimize="-O2" \ |
83 | --enable-pie \ |
84 | --enable-posix-nspr-emulation \ |
85 | --enable-readline \ |
86 | --enable-release \ |
87 | --enable-shared-js \ |
88 | --enable-tests \ |
89 | --with-intl-api \ |
90 | --with-system-zlib \ |
91 | --without-system-icu \ |
92 | || die |
93 | |
94 | # shell export fixes some bugs in a chroot environment |
95 | # see: http://comments.gmane.org/gmane.linux.lfs.beyond.support/47450 |
96 | SRCSUBDIR="js/src" SHELL="${SHELL}" mmake || die |
97 | } |
98 | |
99 | src_install() |
100 | { |
101 | SRCSUBDIR="js/src" SHELL="${SHELL}" mmake DESTDIR=${BINDIR} install || die |
102 | } |