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