Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/
Date: Tue, 23 Feb 2016 15:11:43
Message-Id: 1456240278.6da989765af5a01454ee2aee29ae65a2264673eb.axs@gentoo
1 commit: 6da989765af5a01454ee2aee29ae65a2264673eb
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 23 14:45:03 2016 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 23 15:11:18 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6da98976
7
8 dev-lang/spidermonkey: add x32 patch to spidermonkey-1.8.5 for testing
9
10 Bug: https://bugs.gentoo.org/439558
11
12 Package-Manager: portage-2.2.26
13
14 dev-lang/spidermonkey/spidermonkey-1.8.5-r5.ebuild | 147 +++++++++++++++++++++
15 1 file changed, 147 insertions(+)
16
17 diff --git a/dev-lang/spidermonkey/spidermonkey-1.8.5-r5.ebuild b/dev-lang/spidermonkey/spidermonkey-1.8.5-r5.ebuild
18 new file mode 100644
19 index 0000000..dc29910
20 --- /dev/null
21 +++ b/dev-lang/spidermonkey/spidermonkey-1.8.5-r5.ebuild
22 @@ -0,0 +1,147 @@
23 +# Copyright 1999-2016 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Id$
26 +
27 +EAPI="5"
28 +WANT_AUTOCONF="2.1"
29 +PYTHON_COMPAT=( python2_7 )
30 +PYTHON_REQ_USE="threads"
31 +inherit autotools eutils toolchain-funcs multilib python-any-r1 versionator pax-utils
32 +
33 +MY_PN="js"
34 +TARBALL_PV="$(replace_all_version_separators '' $(get_version_component_range 1-3))"
35 +MY_P="${MY_PN}-${PV}"
36 +TARBALL_P="${MY_PN}${TARBALL_PV}-1.0.0"
37 +DESCRIPTION="Stand-alone JavaScript C library"
38 +HOMEPAGE="http://www.mozilla.org/js/spidermonkey/"
39 +SRC_URI="https://ftp.mozilla.org/pub/mozilla.org/js/${TARBALL_P}.tar.gz"
40 +
41 +LICENSE="NPL-1.1"
42 +SLOT="0/mozjs185"
43 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
44 +IUSE="debug minimal static-libs test"
45 +
46 +S="${WORKDIR}/${MY_P}"
47 +BUILDDIR="${S}/js/src"
48 +
49 +RDEPEND=">=dev-libs/nspr-4.7.0
50 + sys-libs/readline:0
51 + x64-macos? ( dev-libs/jemalloc )"
52 +DEPEND="${RDEPEND}
53 + ${PYTHON_DEPS}
54 + app-arch/zip
55 + virtual/pkgconfig"
56 +
57 +pkg_setup(){
58 + if [[ ${MERGE_TYPE} != "binary" ]]; then
59 + export LC_ALL="C"
60 + fi
61 +}
62 +
63 +src_prepare() {
64 + # https://bugzilla.mozilla.org/show_bug.cgi?id=628723#c43
65 + epatch "${FILESDIR}/${P}-fix-install-symlinks.patch"
66 + # https://bugzilla.mozilla.org/show_bug.cgi?id=638056#c9
67 + epatch "${FILESDIR}/${P}-fix-ppc64.patch"
68 + # https://bugs.gentoo.org/show_bug.cgi?id=400727
69 + # https://bugs.gentoo.org/show_bug.cgi?id=420471
70 + epatch "${FILESDIR}/${P}-arm_respect_cflags-3.patch"
71 + # https://bugs.gentoo.org/show_bug.cgi?id=438746
72 + epatch "${FILESDIR}"/${PN}-1.8.7-freebsd-pthreads.patch
73 + # https://bugs.gentoo.org/show_bug.cgi?id=441928
74 + epatch "${FILESDIR}"/${PN}-1.8.5-perf_event-check.patch
75 + # https://bugs.gentoo.org/show_bug.cgi?id=439260
76 + epatch "${FILESDIR}"/${P}-symbol-versions.patch
77 + # https://bugs.gentoo.org/show_bug.cgi?id=441934
78 + epatch "${FILESDIR}"/${PN}-1.8.5-ia64-fix.patch
79 + epatch "${FILESDIR}"/${PN}-1.8.5-ia64-static-strings.patch
80 + # https://bugs.gentoo.org/show_bug.cgi?id=431560
81 + epatch "${FILESDIR}"/${PN}-1.8.5-isfinite.patch
82 + # https://bugs.gentoo.org/show_bug.cgi?id=552786
83 + epatch "${FILESDIR}"/${PN}-perl-defined-array-check.patch
84 + # https://bugs.gentoo.org/show_bug.cgi?id=439558
85 + epatch "${FILESDIR}"/${PN}-1.8.7-x32.patch
86 +
87 + epatch_user
88 +
89 + cd "${BUILDDIR}" || die
90 + eautoconf
91 +}
92 +
93 +src_configure() {
94 + cd "${BUILDDIR}" || die
95 +
96 + CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
97 + AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
98 + LD="$(tc-getLD)" \
99 + econf \
100 + ${myopts} \
101 + --enable-jemalloc \
102 + --enable-readline \
103 + --enable-threadsafe \
104 + --with-system-nspr \
105 + --disable-optimize \
106 + --disable-profile-guided-optimization \
107 + $(use_enable debug) \
108 + $(use_enable static-libs static) \
109 + $(use_enable test tests)
110 +}
111 +
112 +cross_make() {
113 + emake \
114 + CFLAGS="${BUILD_CFLAGS}" \
115 + CXXFLAGS="${BUILD_CXXFLAGS}" \
116 + AR="${BUILD_AR}" \
117 + CC="${BUILD_CC}" \
118 + CXX="${BUILD_CXX}" \
119 + RANLIB="${BUILD_RANLIB}" \
120 + "$@"
121 +}
122 +src_compile() {
123 + cd "${BUILDDIR}" || die
124 + if tc-is-cross-compiler; then
125 + tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
126 + cross_make jscpucfg host_jsoplengen host_jskwgen
127 + cross_make -C config nsinstall
128 + mv {,native-}jscpucfg || die
129 + mv {,native-}host_jskwgen || die
130 + mv {,native-}host_jsoplengen || die
131 + mv config/{,native-}nsinstall || die
132 + sed -i \
133 + -e 's@./jscpucfg@./native-jscpucfg@' \
134 + -e 's@./host_jskwgen@./native-host_jskwgen@' \
135 + -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
136 + Makefile || die
137 + sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
138 + rm -f config/host_nsinstall.o \
139 + config/host_pathsub.o \
140 + host_jskwgen.o \
141 + host_jsoplengen.o || die
142 + fi
143 + emake
144 +}
145 +
146 +src_test() {
147 + cd "${BUILDDIR}/jsapi-tests" || die
148 + # for bug 415791
149 + pax-mark mr jsapi-tests
150 + emake check
151 +}
152 +
153 +src_install() {
154 + cd "${BUILDDIR}" || die
155 + emake DESTDIR="${D}" install
156 + # bug 437520 , exclude js shell for small systems
157 + if ! use minimal ; then
158 + dobin shell/js
159 + pax-mark m "${ED}/usr/bin/js"
160 + fi
161 + dodoc ../../README
162 + dohtml README.html
163 +
164 + if ! use static-libs; then
165 + # We can't actually disable building of static libraries
166 + # They're used by the tests and in a few other places
167 + find "${D}" -iname '*.a' -delete || die
168 + fi
169 +}