Magellan Linux

Contents of /trunk/extras/spidermonkey/spidermonkey-52.8.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 30884 - (show annotations) (download)
Mon May 14 13:19:00 2018 UTC (5 years, 11 months ago) by niro
File size: 2905 byte(s)
-fixed a typo and enabled multilib
1 # $Id$
2
3 PNAME="spidermonkey"
4 PVER="52.8.0"
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 SRCFILE="firefox-${PVER}esr.source.tar.xz"
19 SRCDIR="${BUILDDIR}/firefox-${PVER}esr"
20
21 sminclude multilib python
22 msetfeature "!check"
23
24 SRC_URI=(
25 http://ftp.mozilla.org/pub/firefox/releases/${PVER}esr/source/${SRCFILE}
26 mirror://${PNAME}/${SRCFILE}
27 mirror://${PNAME}/${PNAME}-52.7.3-fix-soname.patch
28 mirror://${PNAME}/${PNAME}-52.7.3-copy-headers.patch
29 mirror://${PNAME}/${PNAME}-52.7.3-disable-mozglue.patch
30 mirror://${PNAME}/${PNAME}-52.8.0-include-configure-script.patch
31 )
32
33 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"
34
35 src_prepare()
36 {
37 munpack ${SRCFILE} || die
38 cd ${SRCDIR}
39
40 mpatch ${PNAME}-52.7.3-fix-soname.patch || die
41 mpatch ${PNAME}-52.7.3-copy-headers.patch || die
42 mpatch ${PNAME}-52.7.3-disable-mozglue.patch || die
43 mpatch ${PNAME}-52.8.0-include-configure-script.patch || die
44
45 # create missing python execs on multilib systems
46 if [[ ${ARCH} = x86_64 ]] && [[ $(mlibdir) != lib ]]
47 then
48 for abi in ${MULTILIB_ABIS}
49 do
50 cd ${SRCDIR}-${abi}
51 sed -i '/^rm -rf _virtualenv/d' configure.in || die
52 sed -i '/^mkdir -p _virtualenv/d' configure.in || die
53
54 install -d _virtualenv/bin || die
55 cp -a /usr/bin/python-m32 _virtualenv/bin || die
56 cp -a /usr/bin/python-m64 _virtualenv/bin || die
57 cp -a /usr/bin/python$(mget-python-version)-m32 _virtualenv/bin || die
58 cp -a /usr/bin/python$(mget-python-version)-m64 _virtualenv/bin || die
59 done
60 fi
61
62 export WANT_AUTOCONF=2.1
63 all-abis autoconf || die
64
65 export WANT_AUTOCONF=2.1
66 SRCSUBDIR="js/src" all-abis autoconf || die
67 }
68
69 src_compile()
70 {
71 export CPPFLAGS=""
72 export CFLAGS+=' -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp'
73 export CXXFLAGS+=' -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp'
74 export CC=gcc
75 export CXX=g++
76 export SHELL="${SHELL}"
77
78 SRCSUBDIR="js/src" \
79 mconfigure \
80 --disable-debug \
81 --disable-debug-symbols \
82 --disable-strip \
83 --enable-gold \
84 --enable-optimize="-O2" \
85 --enable-pie \
86 --enable-posix-nspr-emulation \
87 --enable-readline \
88 --enable-release \
89 --enable-shared-js \
90 --disable-tests \
91 --with-intl-api \
92 --with-system-zlib \
93 --without-system-icu \
94 || die
95
96 # shell export fixes some bugs in a chroot environment
97 # see: http://comments.gmane.org/gmane.linux.lfs.beyond.support/47450
98 SHELL="${SHELL}" SRCSUBDIR="js/src" mmake || die
99 }
100
101 src_install()
102 {
103 SHELL="${SHELL}" SRCSUBDIR="js/src" mmake DESTDIR=${BINDIR} install || die
104 }