Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 30878 - (show annotations) (download)
Mon May 14 09:27:11 2018 UTC (5 years, 11 months ago) by niro
File size: 2714 byte(s)
-disabled optimization
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 sminclude python
23 msetfeature "!check"
24
25 SRC_URI=(
26 #https://hg.mozilla.org/mozilla-unified/archive/${SRCFILE}
27 mirror://${PNAME}/${SRCFILE}
28 mirror://${PNAME}/${PNAME}-${PVER}-fix-soname.patch
29 mirror://${PNAME}/${PNAME}-${PVER}-copy-headers.patch
30 mirror://${PNAME}/${PNAME}-${PVER}-disable-mozglue.patch
31 mirror://${PNAME}/${PNAME}-${PVER}-include-configure-script.patch
32 )
33
34 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"
35
36 src_prepare()
37 {
38 munpack ${SRCFILE} || die
39 cd ${SRCDIR}
40
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 sed -i '/^rm -rf _virtualenv/d' configure.in || die
47 sed -i '/^mkdir -p _virtualenv/d' configure.in || die
48
49 install -d _virtualenv/bin || die
50 cp -a /usr/bin/python-m32 _virtualenv/bin || die
51 cp -a /usr/bin/python-m64 _virtualenv/bin || die
52 cp -a /usr/bin/python$(mget-python-version)-m32 _virtualenv/bin || die
53 cp -a /usr/bin/python$(mget-python-version)-m64 _virtualenv/bin || die
54
55 export WANT_AUTOCONF=2.1
56 autoconf || die
57 }
58
59 src_compile()
60 {
61 export CPPFLAGS=""
62 export CFLAGS+=' -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp -flto=3'
63 export CXXFLAGS+=' -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp -flto=3'
64 export CC=gcc
65 export CXX=g++
66 export SHELL="${SHELL}"
67
68 cd ${SRCDIR}/js/src
69
70 # --enable-optimize="-O2"
71 # --enable-gold
72 mconfigure \
73 --disable-debug \
74 --disable-debug-symbols \
75 --disable-strip \
76 --enable-gold \
77 --disable-optimize \
78 --enable-pie \
79 --enable-posix-nspr-emulation \
80 --enable-readline \
81 --enable-release \
82 --enable-shared-js \
83 --disable-tests \
84 --with-intl-api \
85 --with-system-zlib \
86 --without-system-icu \
87 || die
88
89 # shell export fixes some bugs in a chroot environment
90 # see: http://comments.gmane.org/gmane.linux.lfs.beyond.support/47450
91 SHELL="${SHELL}" mmake || die
92 }
93
94 src_install()
95 {
96 cd ${SRCDIR}/js/src
97 SHELL="${SHELL}" mmake DESTDIR=${BINDIR} install || die
98 }