From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 23D991381F3 for ; Thu, 22 Aug 2013 14:30:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A8B67E0CEF; Thu, 22 Aug 2013 14:30:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 33B71E0CEF for ; Thu, 22 Aug 2013 14:30:52 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0048E33EB82 for ; Thu, 22 Aug 2013 14:30:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id A6405E468F for ; Thu, 22 Aug 2013 14:30:49 +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: <1377181856.b4a9fb87edf6d0cd077108b118f2d890d960c813.axs@gentoo> Subject: [gentoo-commits] proj/mozilla:master commit in: dev-lang/spidermonkey/, dev-lang/spidermonkey/files/ X-VCS-Repository: proj/mozilla X-VCS-Files: dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch dev-lang/spidermonkey/spidermonkey-24.0_beta1.ebuild X-VCS-Directories: dev-lang/spidermonkey/ dev-lang/spidermonkey/files/ X-VCS-Committer: axs X-VCS-Committer-Name: Ian Stakenvicius X-VCS-Revision: b4a9fb87edf6d0cd077108b118f2d890d960c813 X-VCS-Branch: master Date: Thu, 22 Aug 2013 14:30:49 +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: 21f857df-0964-4c2d-a460-91f9c8232432 X-Archives-Hash: 36a9bf1c56281a89e96c07e036494864 commit: b4a9fb87edf6d0cd077108b118f2d890d960c813 Author: Ian Stakenvicius gentoo org> AuthorDate: Thu Aug 22 14:30:56 2013 +0000 Commit: Ian Stakenvicius gentoo org> CommitDate: Thu Aug 22 14:30:56 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mozilla.git;a=commit;h=b4a9fb87 finished intl support and fixed proper system-icu support --- .../files/spidermonkey-24-system-icu.patch | 199 +++++++++++++++++++++ .../spidermonkey/spidermonkey-24.0_beta1.ebuild | 16 +- 2 files changed, 209 insertions(+), 6 deletions(-) diff --git a/dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch b/dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch new file mode 100644 index 0000000..59ba0c9 --- /dev/null +++ b/dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch @@ -0,0 +1,199 @@ +diff --git a/js/src/Makefile.in b/js/src/Makefile.in +index 4944d31..4176e14 100644 +--- a/js/src/Makefile.in ++++ b/js/src/Makefile.in +@@ -237,12 +237,17 @@ endif + # ICU headers need to be available whether we build with the complete + # Internationalization API or not - ICU stubs rely on them. + ++ifdef MOZ_NATIVE_ICU ++LOCAL_INCLUDES += $(MOZ_ICU_CFLAGS) ++else + LOCAL_INCLUDES += \ + -I$(topsrcdir)/../../intl/icu/source/common \ + -I$(topsrcdir)/../../intl/icu/source/i18n \ + $(NULL) ++endif + + ifdef ENABLE_INTL_API ++ifndef MOZ_NATIVE_ICU + + ifeq ($(OS_ARCH),WINNT) + # Parallel gmake is buggy on Windows +@@ -271,6 +276,7 @@ distclean clean:: + $(call SUBMAKE,$@,intl/icu) + + endif ++endif + + # + # END ECMAScript Internationalization API +@@ -403,7 +409,11 @@ ifneq (,$(MOZ_ZLIB_LIBS)$(MOZ_GLUE_LDFLAGS)) + DEFINES += -DUSE_ZLIB + endif + +-SHARED_LIBRARY_LIBS += $(ICU_LIBS) ++ifdef MOZ_NATIVE_ICU ++EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS) ++else ++SHARED_LIBRARY_LIBS += $(MOZ_ICU_LIBS) ++endif + + # Prevent floating point errors caused by VC++ optimizations + ifdef _MSC_VER +diff --git a/js/src/config/Makefile.in b/js/src/config/Makefile.in +index 5f60d15..e1fe1f8 100644 +--- a/js/src/config/Makefile.in ++++ b/js/src/config/Makefile.in +@@ -59,6 +59,7 @@ export:: \ + $(call mkdir_deps,system_wrappers_js) \ + $(NULL) + $(PYTHON) $(srcdir)/Preprocessor.py $(DEFINES) $(ACDEFINES) \ ++ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \ + $(srcdir)/system-headers | $(PERL) $(srcdir)/make-system-wrappers.pl system_wrappers_js + $(INSTALL) system_wrappers_js $(DIST) + +diff --git a/js/src/config/system-headers b/js/src/config/system-headers +index b52aed6..1ca7420 100644 +--- a/js/src/config/system-headers ++++ b/js/src/config/system-headers +@@ -1132,3 +1132,14 @@ kvm.h + spawn.h + err.h + xlocale.h ++#if MOZ_NATIVE_ICU==1 ++unicode/locid.h ++unicode/numsys.h ++unicode/ucal.h ++unicode/ucol.h ++unicode/udat.h ++unicode/udatpg.h ++unicode/uenum.h ++unicode/unum.h ++unicode/ustring.h ++#endif +diff --git a/js/src/configure.in b/js/src/configure.in +index 4bccbe3..d535491 100644 +--- a/js/src/configure.in ++++ b/js/src/configure.in +@@ -4409,6 +4409,16 @@ fi + dnl ======================================================== + dnl ECMAScript Internationalization API Support (uses ICU) + dnl ======================================================== ++ICU_LIB_NAMES= ++MOZ_NATIVE_ICU= ++MOZ_ARG_WITH_BOOL(system-icu, ++[ --with-system-icu ++ Use system icu (located with pkgconfig)], ++ MOZ_NATIVE_ICU=1) ++ ++if test -n "$MOZ_NATIVE_ICU"; then ++ PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1) ++fi + + if test -n "$JS_STANDALONE"; then + ENABLE_INTL_API=1 +@@ -4421,37 +4431,34 @@ MOZ_ARG_ENABLE_BOOL(intl-api, + dnl Settings for the implementation of the ECMAScript Internationalization API + if test -n "$ENABLE_INTL_API"; then + AC_DEFINE(ENABLE_INTL_API) +- # We build ICU as a static library. +- AC_DEFINE(U_STATIC_IMPLEMENTATION) +- +- case "$OS_TARGET" in +- WINNT) +- ICU_LIB_NAMES="icuin icuuc icudt" +- ;; +- Darwin|Linux) +- ICU_LIB_NAMES="icui18n icuuc icudata" +- ;; +- *) +- AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform]) +- esac +- +- ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/lib)' +-else +- ICU_LIB_NAMES= +- ICU_LIBS= ++ if test -z "$MOZ_NATIVE_ICU"; then ++ case "$OS_TARGET" in ++ WINNT) ++ ICU_LIB_NAMES="icuin icuuc icudt" ++ ;; ++ Darwin|Linux|DragonFly|FreeBSD|NetBSD|OpenBSD) ++ ICU_LIB_NAMES="icui18n icuuc icudata" ++ ;; ++ *) ++ AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform]) ++ esac ++ MOZ_ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/lib)' ++ fi + fi + + AC_SUBST(ENABLE_INTL_API) + AC_SUBST(ICU_LIB_NAMES) +-AC_SUBST(ICU_LIBS) +- +-dnl Source files that use ICU should have control over which parts of the ICU +-dnl namespace they want to use. +-AC_DEFINE(U_USING_ICU_NAMESPACE,0) +- ++AC_SUBST(MOZ_ICU_LIBS) ++AC_SUBST(MOZ_NATIVE_ICU) + + dnl Settings for ICU +-if test -n "$ENABLE_INTL_API" ; then ++if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then ++ dnl We build ICU as a static library. ++ AC_DEFINE(U_STATIC_IMPLEMENTATION) ++ ++ dnl Source files that use ICU should have control over which parts of the ICU ++ dnl namespace they want to use. ++ AC_DEFINE(U_USING_ICU_NAMESPACE,0) + # Set ICU compile options + ICU_CPPFLAGS="" + # don't use icu namespace automatically in client code +diff --git a/js/src/gdb/Makefile.in b/js/src/gdb/Makefile.in +index 288934a..a582dfe 100644 +--- a/js/src/gdb/Makefile.in ++++ b/js/src/gdb/Makefile.in +@@ -19,6 +19,10 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLIB_LIB + + LOCAL_INCLUDES += -I$(topsrcdir) -I.. + ++ifdef MOZ_NATIVE_ICU ++EXTRA_LIBS += $(MOZ_ICU_LIBS) ++endif ++ + EXTRA_LIBS += $(MOZ_FFI_LIBS) + + # Place a GDB Python auto-load file next to the gdb-tests executable, both +diff --git a/js/src/jsapi-tests/Makefile.in b/js/src/jsapi-tests/Makefile.in +index 5f7d594..10d7054 100644 +--- a/js/src/jsapi-tests/Makefile.in ++++ b/js/src/jsapi-tests/Makefile.in +@@ -20,6 +20,10 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLI + + LOCAL_INCLUDES += -I$(topsrcdir) -I.. + ++ifdef MOZ_NATIVE_ICU ++EXTRA_LIBS += $(MOZ_ICU_LIBS) ++endif ++ + EXTRA_LIBS += $(MOZ_FFI_LIBS) + + ifdef QEMU_EXE +diff --git a/js/src/shell/Makefile.in b/js/src/shell/Makefile.in +index 2e1df09..db66c69 100644 +--- a/js/src/shell/Makefile.in ++++ b/js/src/shell/Makefile.in +@@ -27,6 +27,9 @@ LIBS = $(NSPR_LIBS) $(EDITLINE_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_ + ifdef MOZ_NATIVE_FFI + EXTRA_LIBS += $(MOZ_FFI_LIBS) + endif ++ifdef MOZ_NATIVE_ICU ++EXTRA_LIBS += $(MOZ_ICU_LIBS) ++endif + + LOCAL_INCLUDES += -I$(topsrcdir) -I.. + diff --git a/dev-lang/spidermonkey/spidermonkey-24.0_beta1.ebuild b/dev-lang/spidermonkey/spidermonkey-24.0_beta1.ebuild index 38d9e6b..71bd967 100644 --- a/dev-lang/spidermonkey/spidermonkey-24.0_beta1.ebuild +++ b/dev-lang/spidermonkey/spidermonkey-24.0_beta1.ebuild @@ -6,7 +6,7 @@ EAPI="5" WANT_AUTOCONF="2.1" PYTHON_COMPAT=( python2_{6,7} ) PYTHON_REQ_USE="threads" -inherit eutils toolchain-funcs multilib python-any-r1 versionator pax-utils +inherit autotools eutils toolchain-funcs multilib python-any-r1 versionator pax-utils MY_PN="mozjs" MY_P="${MY_PN}-${PV}" @@ -17,15 +17,14 @@ SRC_URI="http://dev.gentoo.org/~axs/distfiles/${MY_P}.tar.bz2" LICENSE="NPL-1.1" SLOT="24" KEYWORDS="~alpha ~amd64 ~arm ~hppa -ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="debug jit minimal static-libs test" - -REQUIRED_USE="debug? ( jit )" +IUSE="debug icu jit minimal static-libs test" S="${WORKDIR}/${MY_P}" BUILDDIR="${S}/js/src" RDEPEND=">=dev-libs/nspr-4.9.4 - virtual/libffi" + virtual/libffi + icu? ( dev-libs/icu )" DEPEND="${RDEPEND} ${PYTHON_DEPS} app-arch/zip @@ -39,12 +38,16 @@ pkg_setup(){ } src_prepare() { + epatch "${FILESDIR}"/${PN}-${SLOT}-system-icu.patch epatch_user 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() { @@ -61,7 +64,8 @@ src_configure() { --with-system-nspr \ --enable-system-ffi \ --enable-jemalloc \ - --enable-system-icu \ + $(use_enable icu intl-api) \ + $(use_with icu system-icu) \ $(use_enable debug) \ $(use_enable jit tracejit) \ $(use_enable jit methodjit) \