From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5235C139694 for ; Thu, 11 May 2017 20:53:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 860B6E0C07; Thu, 11 May 2017 20:53:12 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 52602E0C07 for ; Thu, 11 May 2017 20:53:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BA6A43416CA for ; Thu, 11 May 2017 20:53:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C1F4A7439 for ; Thu, 11 May 2017 20:53:07 +0000 (UTC) From: "Ian Stakenvicius" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ian Stakenvicius" Message-ID: <1494535981.b8d5670e2b0fb6cd6d2e0eef71b6acb74beec527.axs@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/spidermonkey/files/spidermonkey-17-fix_pointer_dereference.patch dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild X-VCS-Directories: dev-lang/spidermonkey/ dev-lang/spidermonkey/files/ X-VCS-Committer: axs X-VCS-Committer-Name: Ian Stakenvicius X-VCS-Revision: b8d5670e2b0fb6cd6d2e0eef71b6acb74beec527 X-VCS-Branch: master Date: Thu, 11 May 2017 20:53:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 7a69e86e-301f-435d-bacc-c8387df63286 X-Archives-Hash: 67afbce9821fa59a7d0dc0a25f51693f commit: b8d5670e2b0fb6cd6d2e0eef71b6acb74beec527 Author: Ian Stakenvicius gentoo org> AuthorDate: Thu May 11 20:52:03 2017 +0000 Commit: Ian Stakenvicius gentoo org> CommitDate: Thu May 11 20:53:01 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8d5670e dev-lang/spidermonkey: fix pointer dereference causing c++11 compile error Backported fix from mozilla25 to spidermonkey-17 and spidermonkey-24. Also bumped spidermonkey-24 EAPI to 6. Bug: http://bugs.gentoo.org/601030 Package-Manager: Portage-2.3.3, Repoman-2.3.1 .../spidermonkey-17-fix_pointer_dereference.patch | 30 +++++++++ .../spidermonkey/spidermonkey-17.0.0-r5.ebuild | 3 +- ...0.0-r5.ebuild => spidermonkey-24.2.0-r4.ebuild} | 75 +++++++++++++--------- 3 files changed, 78 insertions(+), 30 deletions(-) diff --git a/dev-lang/spidermonkey/files/spidermonkey-17-fix_pointer_dereference.patch b/dev-lang/spidermonkey/files/spidermonkey-17-fix_pointer_dereference.patch new file mode 100644 index 00000000000..da6a49f637c --- /dev/null +++ b/dev-lang/spidermonkey/files/spidermonkey-17-fix_pointer_dereference.patch @@ -0,0 +1,30 @@ +# HG changeset patch +# User Mike Hommey +# Date 1373958382 -32400 +# Tue Jul 16 16:06:22 2013 +0900 +# Node ID 1880537f26d2ce22866974a8cdf1927dc66f6dbc +# Parent 673ea5cd6ba7fc37086d1dab71ee4a6d6a77a1ab +Bug 894240 - Fix pointer dereference in js::cli::OptionParser::extractValue + +diff --git a/js/src/shell/jsoptparse.cpp b/js/src/shell/jsoptparse.cpp +--- a/js/src/shell/jsoptparse.cpp ++++ b/js/src/shell/jsoptparse.cpp +@@ -248,17 +248,17 @@ OptionParser::printHelp(const char *prog + + OptionParser::Result + OptionParser::extractValue(size_t argc, char **argv, size_t *i, char **value) + { + JS_ASSERT(*i < argc); + char *eq = strchr(argv[*i], '='); + if (eq) { + *value = eq + 1; +- if (value[0] == '\0') ++ if (*value[0] == '\0') + return error("A value is required for option %.*s", eq - argv[*i], argv[*i]); + return Okay; + } + + if (argc == *i + 1) + return error("Expected a value for option %s", argv[*i]); + + *i += 1; diff --git a/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild b/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild index b88a9ce84dc..05a4758968e 100644 --- a/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild +++ b/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI="6" @@ -47,6 +47,7 @@ PATCHES=( "${FILESDIR}"/${PN}-17.0.0-fix-file-permissions.patch "${FILESDIR}"/${PN}-17-clang.patch "${FILESDIR}"/${PN}-perl-defined-array-check.patch + "${FILESDIR}"/${PN}-17-fix_pointer_dereference.patch ) src_prepare() { diff --git a/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild b/dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild similarity index 63% copy from dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild copy to dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild index b88a9ce84dc..1e3f7b5b040 100644 --- a/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild +++ b/dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild @@ -1,39 +1,46 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=6 WANT_AUTOCONF="2.1" PYTHON_COMPAT=( python2_7 ) PYTHON_REQ_USE="threads" -inherit toolchain-funcs multilib python-any-r1 versionator pax-utils +inherit autotools toolchain-funcs multilib python-any-r1 versionator pax-utils MY_PN="mozjs" -MY_P="${MY_PN}${PV}" +MY_P="${MY_PN}-${PV/_/.}" DESCRIPTION="Stand-alone JavaScript C library" HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" -SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/js/${MY_PN}${PV}.tar.gz" +SRC_URI="https://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.tar.bz2" LICENSE="NPL-1.1" -SLOT="17" -# "MIPS, MacroAssembler is not supported" wrt #491294 for -mips -KEYWORDS="~alpha ~amd64 ~arm -hppa ~ia64 -mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="debug jit minimal static-libs test" +SLOT="24" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="debug icu jit minimal static-libs +system-icu test" -REQUIRED_USE="debug? ( jit )" RESTRICT="ia64? ( test )" -S="${WORKDIR}/${MY_P}" +S="${WORKDIR}/${MY_P%.rc*}" BUILDDIR="${S}/js/src" RDEPEND=">=dev-libs/nspr-4.9.4 virtual/libffi sys-libs/readline:0= - >=sys-libs/zlib-1.1.4" + >=sys-libs/zlib-1.1.4 + system-icu? ( >=dev-libs/icu-1.51:= )" DEPEND="${RDEPEND} ${PYTHON_DEPS} app-arch/zip virtual/pkgconfig" +PATCHES=( + "${FILESDIR}"/${PN}-${SLOT}-system-icu.patch + "${FILESDIR}"/${PN}-24.2.0-fix-file-permissions.patch + "${FILESDIR}"/${PN}-${SLOT}-upward-growing-stack.patch + "${FILESDIR}"/${PN}-perl-defined-array-check.patch + "${FILESDIR}"/${PN}-17-fix_pointer_dereference.patch +) + pkg_setup(){ if [[ ${MERGE_TYPE} != "binary" ]]; then python-any-r1_pkg_setup @@ -41,29 +48,29 @@ pkg_setup(){ fi } -PATCHES=( - "${FILESDIR}"/${PN}-${SLOT}-js-config-shebang.patch - "${FILESDIR}"/${PN}-${SLOT}-ia64-mmap.patch - "${FILESDIR}"/${PN}-17.0.0-fix-file-permissions.patch - "${FILESDIR}"/${PN}-17-clang.patch - "${FILESDIR}"/${PN}-perl-defined-array-check.patch -) - src_prepare() { default - # Remove obsolete jsuword bug #506160 - sed -i -e '/jsuword/d' "${BUILDDIR}"/jsval.h || die "sed failed" - if [[ ${CHOST} == *-freebsd* ]]; then # Don't try to be smart, this does not work in cross-compile anyway ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die fi + + cd "${BUILDDIR}" || die + eautoconf } src_configure() { + export SHELL=/bin/sh cd "${BUILDDIR}" || die + local myopts="" + if use icu; then # make sure system-icu flag only affects icu-enabled build + myopts+="$(use_with system-icu)" + else + myopts+="--without-system-icu" + fi + CC="$(tc-getCC)" CXX="$(tc-getCXX)" \ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \ LD="$(tc-getLD)" \ @@ -74,10 +81,11 @@ src_configure() { --enable-threadsafe \ --with-system-nspr \ --enable-system-ffi \ - --enable-jemalloc \ + --disable-optimize \ + $(use_enable icu intl-api) \ $(use_enable debug) \ - $(use_enable jit tracejit) \ - $(use_enable jit methodjit) \ + $(use_enable jit yarr-jit) \ + $(use_enable jit ion) \ $(use_enable static-libs static) \ $(use_enable test tests) } @@ -96,8 +104,14 @@ src_compile() { cd "${BUILDDIR}" || die if tc-is-cross-compiler; then tc-export_build_env BUILD_{AR,CC,CXX,RANLIB} - cross_make host_jsoplengen host_jskwgen - cross_make -C config nsinstall + cross_make \ + MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \ + HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \ + MOZ_PGO_OPTIMIZE_FLAGS="" \ + host_jsoplengen host_jskwgen + cross_make \ + MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \ + -C config nsinstall mv {,native-}host_jskwgen || die mv {,native-}host_jsoplengen || die mv config/{,native-}nsinstall || die @@ -111,7 +125,10 @@ src_compile() { host_jskwgen.o \ host_jsoplengen.o || die fi - emake + emake \ + MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \ + HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \ + MOZ_PGO_OPTIMIZE_FLAGS="" } src_test() {