Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/
Date: Mon, 12 Aug 2019 16:42:13
Message-Id: 1565628114.baafb75e07e283c3387ccabb46e43f67dcadcdac.anarchy@gentoo
1 commit: baafb75e07e283c3387ccabb46e43f67dcadcdac
2 Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 12 16:41:06 2019 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 12 16:41:54 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=baafb75e
7
8 dev-lang/spidermonkey: Fix :60 invalid options in js60-config
9
10 Fixes: https://bugs.gentoo.org/691334
11 Package-Manager: Portage-2.3.71, Repoman-2.3.17
12 Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
13
14 .../spidermonkey/spidermonkey-60.5.2_p0-r3.ebuild | 154 +++++++++++++++++++++
15 1 file changed, 154 insertions(+)
16
17 diff --git a/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r3.ebuild b/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r3.ebuild
18 new file mode 100644
19 index 00000000000..ec29ac35830
20 --- /dev/null
21 +++ b/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r3.ebuild
22 @@ -0,0 +1,154 @@
23 +# Copyright 1999-2019 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=6
27 +WANT_AUTOCONF="2.1"
28 +inherit autotools check-reqs toolchain-funcs pax-utils mozcoreconf-v5
29 +
30 +MY_PN="mozjs"
31 +MY_P="${MY_PN}-${PV/_rc/.rc}"
32 +MY_P="${MY_P/_pre/pre}"
33 +MY_P="${MY_P%_p[0-9]*}"
34 +DESCRIPTION="Stand-alone JavaScript C++ library"
35 +HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
36 +#SRC_URI="https://archive.mozilla.org/pub/spidermonkey/prereleases/60/pre3/${MY_P}.tar.bz2
37 +SRC_URI="https://dev.gentoo.org/~axs/distfiles/${MY_P}.tar.bz2
38 + https://dev.gentoo.org/~anarchy/mozilla/patchsets/${PN}-60.0-patches-04.tar.xz"
39 +
40 +LICENSE="NPL-1.1"
41 +SLOT="60"
42 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
43 +IUSE="debug +jit minimal +system-icu test"
44 +
45 +RESTRICT="ia64? ( test )"
46 +
47 +S="${WORKDIR}/${MY_P%.rc*}"
48 +
49 +BUILDDIR="${S}/jsobj"
50 +
51 +RDEPEND=">=dev-libs/nspr-4.13.1
52 + virtual/libffi
53 + sys-libs/readline:0=
54 + >=sys-libs/zlib-1.2.3:=
55 + system-icu? ( >=dev-libs/icu-59.1:= )"
56 +DEPEND="${RDEPEND}"
57 +
58 +pkg_pretend() {
59 + CHECKREQS_DISK_BUILD="2G"
60 +
61 + check-reqs_pkg_setup
62 +}
63 +pkg_setup(){
64 + [[ ${MERGE_TYPE} == "binary" ]] || \
65 + moz_pkgsetup
66 + export SHELL="${EPREFIX}/bin/bash"
67 +}
68 +
69 +src_prepare() {
70 + eapply "${WORKDIR}/${PN}"
71 + eapply "${FILESDIR}/${PN}-60.5.2-ia64-support.patch"
72 +
73 + eapply_user
74 +
75 + if [[ ${CHOST} == *-freebsd* ]]; then
76 + # Don't try to be smart, this does not work in cross-compile anyway
77 + ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
78 + fi
79 +
80 + cd "${S}/js/src" || die
81 + eautoconf old-configure.in
82 + eautoconf
83 +
84 + # remove options that are not correct from js-config
85 + sed '/ib-filenames/d' -i "${S}"/js/src/build/js-config.in
86 +
87 + # there is a default config.cache that messes everything up
88 + rm -f "${S}/js/src"/config.cache || die
89 +
90 + mkdir -p "${BUILDDIR}" || die
91 +}
92 +
93 +src_configure() {
94 + cd "${BUILDDIR}" || die
95 +
96 + ECONF_SOURCE="${S}/js/src" \
97 + econf \
98 + --disable-jemalloc \
99 + --enable-readline \
100 + --with-system-nspr \
101 + --with-system-zlib \
102 + --disable-optimize \
103 + --with-intl-api \
104 + $(use_with system-icu) \
105 + $(use_enable debug) \
106 + $(use_enable jit ion) \
107 + $(use_enable test tests) \
108 + XARGS="/usr/bin/xargs" \
109 + CONFIG_SHELL="${EPREFIX}/bin/bash" \
110 + CC="${CC}" CXX="${CXX}" LD="${LD}" AR="${AR}" RANLIB="${RANLIB}"
111 +}
112 +
113 +cross_make() {
114 + emake \
115 + CFLAGS="${BUILD_CFLAGS}" \
116 + CXXFLAGS="${BUILD_CXXFLAGS}" \
117 + AR="${BUILD_AR}" \
118 + CC="${BUILD_CC}" \
119 + CXX="${BUILD_CXX}" \
120 + RANLIB="${BUILD_RANLIB}" \
121 + "$@"
122 +}
123 +src_compile() {
124 + cd "${BUILDDIR}" || die
125 + if tc-is-cross-compiler; then
126 + tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
127 + cross_make \
128 + MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
129 + HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
130 + MOZ_PGO_OPTIMIZE_FLAGS="" \
131 + host_jsoplengen host_jskwgen
132 + cross_make \
133 + MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \
134 + -C config nsinstall
135 + mv {,native-}host_jskwgen || die
136 + mv {,native-}host_jsoplengen || die
137 + mv config/{,native-}nsinstall || die
138 + sed -i \
139 + -e 's@./host_jskwgen@./native-host_jskwgen@' \
140 + -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
141 + Makefile || die
142 + sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
143 + rm -f config/host_nsinstall.o \
144 + config/host_pathsub.o \
145 + host_jskwgen.o \
146 + host_jsoplengen.o || die
147 + fi
148 +
149 + MOZ_MAKE_FLAGS="${MAKEOPTS}" \
150 + emake \
151 + MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
152 + HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
153 + MOZ_PGO_OPTIMIZE_FLAGS=""
154 +}
155 +
156 +src_test() {
157 + cd "${BUILDDIR}/js/src/jsapi-tests" || die
158 + ./jsapi-tests || die
159 +}
160 +
161 +src_install() {
162 + cd "${BUILDDIR}" || die
163 + emake DESTDIR="${D}" install
164 +
165 + if ! use minimal; then
166 + if use jit; then
167 + pax-mark m "${ED}"usr/bin/js${SLOT}
168 + fi
169 + else
170 + rm -f "${ED}"usr/bin/js${SLOT}
171 + fi
172 +
173 + # We can't actually disable building of static libraries
174 + # They're used by the tests and in a few other places
175 + find "${D}" -iname '*.a' -o -iname '*.ajs' -delete || die
176 +}