Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33023 - (show annotations) (download)
Wed Oct 9 16:58:11 2019 UTC (4 years, 6 months ago) by niro
File size: 2789 byte(s)
-reworked multilib python issues with multiarch wrapper
1 # $Id$
2
3 PNAME="spidermonkey"
4 PVER="60.9.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++-9.2"
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}"
20
21 # enforce 32bit builds
22 EMUL_LINUX_32=true
23 sminclude multilib python2
24 msetfeature "!check"
25
26 SRC_URI=(
27 http://ftp.mozilla.org/pub/firefox/releases/${PVER}esr/source/${SRCFILE}
28 mirror://${PNAME}/${SRCFILE}
29 mirror://${PNAME}/${PNAME}-60.7.2-fix-soname.patch
30 mirror://${PNAME}/${PNAME}-60.7.2-fix-timezone-issues.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
39 mpatch ${PNAME}-60.7.2-fix-soname.patch || die
40 mpatch ${PNAME}-60.7.2-fix-timezone-issues.patch || die
41
42 export WANT_AUTOCONF=2.1
43 all-abis autoconf || die
44
45 export WANT_AUTOCONF=2.1
46 SRCSUBDIR="js/src" all-abis autoconf || die
47
48 all-abis "install -d ${SRCDIR}-$(mabi)/jsobj || die"
49 }
50
51 src_compile()
52 {
53 export CPPFLAGS=""
54 export CFLAGS+=' -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp'
55 export CXXFLAGS+=' -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-tree-vrp'
56 # will be set via multilib include
57 #export CC=gcc
58 #export CXX=g++
59 export SHELL="${SHELL}"
60
61 # honor multilib setups with multiarch-wrapper
62 # mozilla creates an virtual env, so we tell configure where to find the actual python exec for current mabi
63 # the multiarch wrapper does not work here, non multilib just take the normal python exec
64 if [[ $(mlibdir) != lib ]]
65 then
66 export PYTHON=${MAGE_PYTHON2_EXEC}-$(mabi)
67 fi
68
69 SRCSUBDIR="jsobj" \
70 all-abis $(echo PYTHON=${PYTHON}) \
71 ${SRCDIR}-$(mabi)/js/src/configure \
72 --prefix=/usr \
73 --datadir=/usr/share \
74 --libdir=/usr/'$(mlibdir)' \
75 --disable-debug \
76 --disable-debug-symbols \
77 --disable-strip \
78 --enable-linker="gold" \
79 --enable-optimize="-O2" \
80 --enable-pie \
81 --enable-posix-nspr-emulation \
82 --enable-readline \
83 --disable-jemalloc \
84 --enable-release \
85 --enable-shared-js \
86 --disable-tests \
87 --with-intl-api \
88 --with-system-zlib \
89 --without-system-icu \
90 || die
91
92 # shell export fixes some bugs in a chroot environment
93 # see: http://comments.gmane.org/gmane.linux.lfs.beyond.support/47450
94 SHELL="${SHELL}" SRCSUBDIR="jsobj" mmake || die
95 }
96
97 src_install()
98 {
99 SHELL="${SHELL}" SRCSUBDIR="jsobj" mmake DESTDIR=${BINDIR} install || die
100
101 # remove static libraries
102 find ${BINDIR} -iname '*.ajs' -delete || die
103 }