pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/spidermonkey52 - Fix for polkit and gjs



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9efedc9a4fd5
branches:  trunk
changeset: 380525:9efedc9a4fd5
user:      youri <youri%pkgsrc.org@localhost>
date:      Wed May 16 11:36:36 2018 +0000

description:
- Fix for polkit and gjs
- Remove the huge static lib
- attempt to not break other platforms..

diffstat:

 lang/spidermonkey52/Makefile                                                        |  21 +-
 lang/spidermonkey52/PLIST                                                           |   6 +-
 lang/spidermonkey52/distinfo                                                        |   7 +-
 lang/spidermonkey52/patches/patch-config_gcc__hidden.h                              |  12 +
 lang/spidermonkey52/patches/patch-js_src_old-configure_in                           |  93 ++++++++++
 lang/spidermonkey52/patches/patch-mozglue_build_moz.build                           |  15 +
 lang/spidermonkey52/patches/patch-python_mozbuild_mozbuild_backend_recursivemake.py |  21 ++
 7 files changed, 157 insertions(+), 18 deletions(-)

diffs (259 lines):

diff -r 9d4a14ae7c5d -r 9efedc9a4fd5 lang/spidermonkey52/Makefile
--- a/lang/spidermonkey52/Makefile      Wed May 16 11:36:00 2018 +0000
+++ b/lang/spidermonkey52/Makefile      Wed May 16 11:36:36 2018 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2018/05/11 19:18:35 jperkin Exp $
+# $NetBSD: Makefile,v 1.4 2018/05/16 11:36:36 youri Exp $
 
 DISTNAME=      mozjs-52.7.4
+PKGREVISION=   1
 PKGNAME=       ${DISTNAME:S/mozjs/spidermonkey52/}
 CATEGORIES=    lang
 MASTER_SITES=  https://queue.taskcluster.net/v1/task/YqG2fjJJSTGzGX090FjDYg/runs/0/artifacts/public/build/
@@ -13,7 +14,8 @@
 
 HAS_CONFIGURE= yes
 USE_LANGUAGES= c c++
-USE_TOOLS+=    pkg-config perl gmake
+USE_TOOLS+=    pkg-config perl gmake autoconf213
+AUTOCONF_REQD= 2.13
 
 CONFIGURE_ARGS+=       --prefix=${PREFIX}
 CONFIGURE_ARGS+=       --enable-readline
@@ -21,16 +23,7 @@
 CONFIGURE_ARGS+=       --with-system-nspr
 CONFIGURE_ARGS+=       --with-system-zlib
 CONFIGURE_ARGS+=       --with-pthreads
-
-PLIST_VARS+=   jemalloc
-
-.include "../../mk/bsd.prefs.mk"
-
-.if ${OPSYS} == "SunOS"
 CONFIGURE_ARGS+=       --disable-jemalloc
-.else
-PLIST.jemalloc=                yes
-.endif
 
 CONFIGURE_DIRS=                js/src
 
@@ -43,6 +36,12 @@
 # fails, does not find hg/git checkout
 TEST_TARGET=           check
 
+pre-configure:
+       cd ${WRKSRC}/js/src && autoconf
+
+post-install:
+       ${RM} ${DESTDIR}${PREFIX}/lib/libjs_static.ajs
+
 .include "../../devel/nspr/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../lang/python/tool.mk"
diff -r 9d4a14ae7c5d -r 9efedc9a4fd5 lang/spidermonkey52/PLIST
--- a/lang/spidermonkey52/PLIST Wed May 16 11:36:00 2018 +0000
+++ b/lang/spidermonkey52/PLIST Wed May 16 11:36:36 2018 +0000
@@ -1,8 +1,7 @@
-@comment $NetBSD: PLIST,v 1.2 2018/05/11 19:18:35 jperkin Exp $
+@comment $NetBSD: PLIST,v 1.3 2018/05/16 11:36:36 youri Exp $
 bin/js52
 bin/js52-config
 include/mozjs-52/fdlibm.h
-${PLIST.jemalloc}include/mozjs-52/jemalloc_types.h
 include/mozjs-52/js-config.h
 include/mozjs-52/js.msg
 include/mozjs-52/js/CallArgs.h
@@ -155,8 +154,5 @@
 include/mozjs-52/mozilla/mozalloc_abort.h
 include/mozjs-52/mozilla/mozalloc_oom.h
 include/mozjs-52/mozilla/utils.h
-${PLIST.jemalloc}include/mozjs-52/mozmemory.h
-${PLIST.jemalloc}include/mozjs-52/mozmemory_wrap.h
-lib/libjs_static.ajs
 lib/libmozjs-52.so
 lib/pkgconfig/mozjs-52.pc
diff -r 9d4a14ae7c5d -r 9efedc9a4fd5 lang/spidermonkey52/distinfo
--- a/lang/spidermonkey52/distinfo      Wed May 16 11:36:00 2018 +0000
+++ b/lang/spidermonkey52/distinfo      Wed May 16 11:36:36 2018 +0000
@@ -1,14 +1,15 @@
-$NetBSD: distinfo,v 1.2 2018/05/11 19:18:35 jperkin Exp $
+$NetBSD: distinfo,v 1.3 2018/05/16 11:36:36 youri Exp $
 
 SHA1 (mozjs-52.7.4.tar.bz2) = ff009853040bb46017204fda4ed69a79484fd321
 RMD160 (mozjs-52.7.4.tar.bz2) = 71ee71c2444d8b6a1b2b3c744c9f52a2b7129879
 SHA512 (mozjs-52.7.4.tar.bz2) = 7381f251ca9a4983d181eee2198f89b30505a0de636020e52c0c5b174f4d5cd19ca851222b6d8013bb657f2f1ce1ffcb54816eb928e481be2c9242f918d0125e
 Size (mozjs-52.7.4.tar.bz2) = 30494311 bytes
 SHA1 (patch-build_moz.configure_init.configure) = 63ed71d4269e8fbf990f44eecadca796991d5c1f
+SHA1 (patch-config_gcc__hidden.h) = c2042035288e01601b6c240fb08c8a1f598b9dfd
 SHA1 (patch-intl_icu_source_configure) = 1ff1be8ca68566e153219e15b8db696afd08b746
 SHA1 (patch-js_src_gc_Memory.cpp) = b1bb0c3045163d586c0b4d731d0ed7c23f339f3c
 SHA1 (patch-js_src_jsnativestack.cpp) = 3d0b06ccc3e24b408b97d01faa7758353f2edc85
-SHA1 (patch-js_src_old-configure) = f9a32ee234f7962c038a10f2b085c0a6fcbcfd8a
+SHA1 (patch-js_src_old-configure_in) = 5897958c45b1d9a8e642a05979350726a5008e9d
 SHA1 (patch-js_src_tests_update-test262.sh) = 10d73d95f4b849090bccb8fe656df79cbcea89f3
 SHA1 (patch-js_src_threading_posix_Thread.cpp) = e490d04ed28ffd8b2e9901a24739ad19fe6759e0
 SHA1 (patch-js_src_wasm_WasmSignalHandlers.cpp) = fd9b836d35d71103c3d8b628a6fe7c446bd4c7da
@@ -16,4 +17,6 @@
 SHA1 (patch-mfbt_Poison.cpp) = f4560e4552beeb70d0564e3fdfd908c5e0bd94c4
 SHA1 (patch-mfbt_tests_TestPoisonArea.cpp) = 054441d4618bf630be6d6e71babdcdaa884f533a
 SHA1 (patch-modules_fdlibm_src_math__private.h) = afa40802bfdb917d7906de486eb8882da426c9cf
+SHA1 (patch-mozglue_build_moz.build) = f35ffa1a54ccc4cd1ed7983aac792e334c9169b1
+SHA1 (patch-python_mozbuild_mozbuild_backend_recursivemake.py) = ffb59ddf2d95eb284d24dad3d3aedc7d7f5b5d96
 SHA1 (patch-python_mozbuild_mozbuild_configure_constants.py) = aed1c08cecc29e29edc8ccee98d032546814d6e4
diff -r 9d4a14ae7c5d -r 9efedc9a4fd5 lang/spidermonkey52/patches/patch-config_gcc__hidden.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-config_gcc__hidden.h    Wed May 16 11:36:36 2018 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-config_gcc__hidden.h,v 1.1 2018/05/16 11:36:36 youri Exp $
+
+Gjs needs some symbols.
+
+--- config/gcc_hidden.h.orig   2018-04-28 01:04:01.000000000 +0000
++++ config/gcc_hidden.h
+@@ -3,4 +3,4 @@
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ /* Begin all files as hidden visibility */
+-#pragma GCC visibility push(hidden)
++#pragma GCC visibility push(default)
diff -r 9d4a14ae7c5d -r 9efedc9a4fd5 lang/spidermonkey52/patches/patch-js_src_old-configure_in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-js_src_old-configure_in Wed May 16 11:36:36 2018 +0000
@@ -0,0 +1,93 @@
+$OpenBSD: patch-js_src_old-configure_in,v 1.5 2017/11/03 12:42:29 ajacoutot Exp $
+
+2nd chunk:
+From 7e6d628456af3e99ebcb9a01a27e1461585082a4 Mon Sep 17 00:00:00 2001
+From: Till Schneidereit <till%tillschneidereit.net@localhost>
+Date: Thu, 1 Oct 2015 12:59:09 +0200
+Subject: [PATCH] Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all platforms
+
+Index: js/src/old-configure.in
+--- js/src/old-configure.in.orig       2018-04-28 01:04:03.000000000 +0000
++++ js/src/old-configure.in
+@@ -599,6 +599,11 @@ dnl System overrides of the defaults for
+ dnl ========================================================
+ 
+ case "$target" in
++
++*-solaris*)
++    MOZ_FIX_LINK_PATHS=
++    ;;
++
+ *-darwin*)
+     MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
+     MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
+@@ -917,18 +922,34 @@ case "$target" in
+     if test "$LIBRUNPATH"; then
+       DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
+     fi
+-    MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(DSO_SONAME) -o $@'
+-    MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(DSO_SONAME) -o $@'
++    if test "$GNU_LD"; then
++        # Don't allow undefined symbols in libraries
++        DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"
++    fi
++    LDFLAGS="$LDFLAGS -Wl,-z,wxneeded"
++    MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
++    MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
+     ;;
+ 
+ *-openbsd*)
+-    DLL_SUFFIX=".so.1.0"
++    if test "$SO_VERSION"; then
++        DLL_SUFFIX=".so.$SO_VERSION"
++    else
++        DLL_SUFFIX=".so.1.0"
++    fi
+     DSO_CFLAGS=''
+     DSO_PIC_CFLAGS='-fPIC'
+     DSO_LDOPTS='-shared -fPIC'
+     if test "$LIBRUNPATH"; then
+-      DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
++        DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
++    fi
++    if test "$GNU_LD"; then
++        # Don't allow undefined symbols in libraries
++        DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"
+     fi
++    LDFLAGS="$LDFLAGS -Wl,-z,wxneeded"
++    MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
++    MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
+     ;;
+ 
+ esac
+@@ -1623,16 +1644,21 @@ dnl ====================================
+ dnl = Enable jemalloc
+ dnl ========================================================
+ 
+-case "${OS_TARGET}" in
+-Android|WINNT|Darwin)
++dnl In stand-alone builds we always only want to link executables against mozglue.
++if test "$JS_STANDALONE"; then
+   MOZ_GLUE_IN_PROGRAM=
+-  ;;
+-*)
+-  dnl On !Android !Windows !OSX, we only want to link executables against mozglue
+-  MOZ_GLUE_IN_PROGRAM=1
+-  AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
+-  ;;
+-esac
++else
++  case "${OS_TARGET}" in
++  Android|WINNT|Darwin)
++    MOZ_GLUE_IN_PROGRAM=
++    ;;
++  *)
++    dnl On !Android !Windows !OSX, we only want to link executables against mozglue
++    MOZ_GLUE_IN_PROGRAM=1
++    AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
++    ;;
++  esac
++fi
+ 
+ if test "$MOZ_MEMORY"; then
+   if test "x$MOZ_DEBUG" = "x1"; then
diff -r 9d4a14ae7c5d -r 9efedc9a4fd5 lang/spidermonkey52/patches/patch-mozglue_build_moz.build
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-mozglue_build_moz.build Wed May 16 11:36:36 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-mozglue_build_moz.build,v 1.1 2018/05/16 11:36:36 youri Exp $
+
+Fix for polkit and others.
+
+--- mozglue/build/moz.build.orig       2018-04-28 01:04:05.000000000 +0000
++++ mozglue/build/moz.build
+@@ -6,7 +6,7 @@
+ 
+ # Build mozglue as a shared lib on Windows, OSX and Android.
+ # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
+-if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
++if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']:
+     SharedLibrary('mozglue')
+ else:
+     Library('mozglue')
diff -r 9d4a14ae7c5d -r 9efedc9a4fd5 lang/spidermonkey52/patches/patch-python_mozbuild_mozbuild_backend_recursivemake.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-python_mozbuild_mozbuild_backend_recursivemake.py       Wed May 16 11:36:36 2018 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-python_mozbuild_mozbuild_backend_recursivemake.py,v 1.1 2018/05/16 11:36:36 youri Exp $
+
+Copy headers instead of symlinking.
+
+--- python/mozbuild/mozbuild/backend/recursivemake.py.orig     2018-04-28 01:04:06.000000000 +0000
++++ python/mozbuild/mozbuild/backend/recursivemake.py
+@@ -1307,11 +1307,11 @@ class RecursiveMakeBackend(CommonBackend
+                                 raise Exception("Wildcards are only supported in the filename part of "
+                                                 "srcdir-relative or absolute paths.")
+ 
+-                            install_manifest.add_pattern_symlink(basepath, wild, path)
++                            install_manifest.add_pattern_copy(basepath, wild, path)
+                         else:
+-                            install_manifest.add_pattern_symlink(f.srcdir, f, path)
++                            install_manifest.add_pattern_copy(f.srcdir, f, path)
+                     else:
+-                        install_manifest.add_symlink(f.full_path, dest)
++                        install_manifest.add_copy(f.full_path, dest)
+                 else:
+                     install_manifest.add_optional_exists(dest)
+                     backend_file.write('%s_FILES += %s\n' % (



Home | Main Index | Thread Index | Old Index