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