pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/mozjs78 mozjs78: Fix configure where the readline...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/01d7be4f77d9
branches:  trunk
changeset: 443007:01d7be4f77d9
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat Dec 05 12:03:25 2020 +0000

description:
mozjs78: Fix configure where the readline library isn't builtin.

This commit also moves the location of WRKSRC so that no patches are
applied to files in parent directories of WRKSRC.

diffstat:

 lang/mozjs78/Makefile                                                    |  25 ++++--
 lang/mozjs78/distinfo                                                    |  21 ++--
 lang/mozjs78/patches/patch-.._.._build_moz.configure_rust.configure      |  17 ----
 lang/mozjs78/patches/patch-.._.._build_moz.configure_toolchain.configure |  15 ---
 lang/mozjs78/patches/patch-.._.._mfbt_tests_TestVariant.cpp              |  15 ---
 lang/mozjs78/patches/patch-build_moz.configure_rust.configure            |  17 ++++
 lang/mozjs78/patches/patch-build_moz.configure_toolchain.configure       |  15 +++
 lang/mozjs78/patches/patch-jit_AtomicOperations.h                        |  16 ----
 lang/mozjs78/patches/patch-jit_ProcessExecutableMemory.cpp               |  38 ----------
 lang/mozjs78/patches/patch-js_moz.configure                              |  15 +++
 lang/mozjs78/patches/patch-js_src_jit_AtomicOperations.h                 |  16 ++++
 lang/mozjs78/patches/patch-js_src_jit_ProcessExecutableMemory.cpp        |  38 ++++++++++
 lang/mozjs78/patches/patch-js_src_jsfriendapi.h                          |  14 +++
 lang/mozjs78/patches/patch-js_src_vm_ArrayBufferObject.cpp               |  24 ++++++
 lang/mozjs78/patches/patch-js_src_vm_JSONPrinter.cpp                     |  17 ++++
 lang/mozjs78/patches/patch-js_src_vm_JSONPrinter.h                       |  17 ++++
 lang/mozjs78/patches/patch-jsfriendapi.h                                 |  14 ---
 lang/mozjs78/patches/patch-mfbt_tests_TestVariant.cpp                    |  15 +++
 lang/mozjs78/patches/patch-vm_ArrayBufferObject.cpp                      |  24 ------
 lang/mozjs78/patches/patch-vm_JSONPrinter.cpp                            |  17 ----
 lang/mozjs78/patches/patch-vm_JSONPrinter.h                              |  17 ----
 21 files changed, 216 insertions(+), 191 deletions(-)

diffs (truncated from 526 to 300 lines):

diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/Makefile
--- a/lang/mozjs78/Makefile     Sat Dec 05 11:53:10 2020 +0000
+++ b/lang/mozjs78/Makefile     Sat Dec 05 12:03:25 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2020/11/29 00:28:39 gutteridge Exp $
+# $NetBSD: Makefile,v 1.10 2020/12/05 12:03:25 nia Exp $
 
 DISTNAME=      mozjs78_78.4.0.orig
 PKGNAME=       ${DISTNAME:S/_/-/:S/.orig//}
@@ -11,15 +11,17 @@
 COMMENT=       SpiderMonkey JavaScript library (78.x branch)
 LICENSE=       mpl-1.1
 
-WRKSRC=                ${WRKDIR}/firefox-${PKGVERSION_NOREV}/js/src
+WRKSRC=                ${WRKDIR}/firefox-${PKGVERSION_NOREV}
 USE_TOOLS+=    autoconf213 gmake perl pkg-config
 USE_LANGUAGES= c c++
 
 # "ERROR: Only GCC 7.1 or newer is supported"
 GCC_REQD+=     7
 
+CONFIGURE_DIRS=        js/src/build
+BUILD_DIRS=    js/src/build
+
 HAS_CONFIGURE=         yes
-CONFIGURE_DIRS=                build
 CONFIGURE_SCRIPT=      ../configure
 CONFIGURE_ARGS+=       --prefix=${PREFIX}
 CONFIGURE_ARGS+=       --disable-debug
@@ -47,17 +49,24 @@
 .include "../../devel/libatomic/buildlink3.mk"
 .endif
 
-PKGCONFIG_OVERRIDE+=   build/js.pc.in
-PKGCONFIG_OVERRIDE+=   ctypes/libffi/libffi.pc.in
+SUBST_CLASSES+=                conf
+SUBST_STAGE.conf=      pre-configure
+SUBST_MESSAGE.conf=    Set variables in configuration file.
+SUBST_FILES.conf+=     js/moz.configure
+SUBST_VARS.conf=       PREFIX
+
+PKGCONFIG_OVERRIDE+=   js/src/build/js.pc.in
+PKGCONFIG_OVERRIDE+=   js/src/ctypes/libffi/libffi.pc.in
 
 PYTHON_VERSIONS_INCOMPATIBLE=  27
 PYTHON_FOR_BUILD_ONLY=         tool
 TOOL_DEPENDS+=                 ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
 
 pre-configure:
-       cd ${WRKSRC} && autoconf-2.13 old-configure.in > old-configure \
-               && autoconf-2.13
-       mkdir ${WRKSRC}/build && touch ${WRKSRC}/build/old-configure.vars
+       cd ${WRKSRC}/js/src && \
+           autoconf-2.13 old-configure.in > old-configure && autoconf-2.13
+       ${MKDIR} ${WRKSRC}/js/src/build && \
+           ${TOUCH} ${WRKSRC}/js/src/build/old-configure.vars
 
 post-install:
        cd ${DESTDIR}${PREFIX}/lib && \
diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/distinfo
--- a/lang/mozjs78/distinfo     Sat Dec 05 11:53:10 2020 +0000
+++ b/lang/mozjs78/distinfo     Sat Dec 05 12:03:25 2020 +0000
@@ -1,15 +1,16 @@
-$NetBSD: distinfo,v 1.4 2020/11/28 11:02:15 nia Exp $
+$NetBSD: distinfo,v 1.5 2020/12/05 12:03:25 nia Exp $
 
 SHA1 (mozjs78_78.4.0.orig.tar.xz) = b2c1c241f70310d545f8a3c05b9c8c11676e56a8
 RMD160 (mozjs78_78.4.0.orig.tar.xz) = cef93b6116eff9f04beeaf3dda0a42cd811d0b18
 SHA512 (mozjs78_78.4.0.orig.tar.xz) = 05a0dd27cd8f330c69bf798f9025dd560e76a1a14628af4caeeae4f7573aef9371e19edb8a8e4cd28e92e189eb3a159b4ffedb1b1bd4b806e065de433cca6ffd
 Size (mozjs78_78.4.0.orig.tar.xz) = 58319040 bytes
-SHA1 (patch-.._.._build_moz.configure_rust.configure) = a40ef515b34781d703e9222e4c88746544556287
-SHA1 (patch-.._.._build_moz.configure_toolchain.configure) = 055312319a6a4e2916263baf318585b943c1ca20
-SHA1 (patch-.._.._mfbt_tests_TestVariant.cpp) = e2b1aa54059a8a64ecef2bcf2807f5d8d85a89d2
-SHA1 (patch-jit_AtomicOperations.h) = 5e3d51f209f94e9c1b33abe965cdf4289aab65d5
-SHA1 (patch-jit_ProcessExecutableMemory.cpp) = d65001c07cc9393db2dce6ff291e94d5dd76b86e
-SHA1 (patch-jsfriendapi.h) = c6eea8b37d44a4b0f9ca0a325e482d01ef2c6e0f
-SHA1 (patch-vm_ArrayBufferObject.cpp) = 931695e3e02ec1d6ed0f722be1059c48878cd117
-SHA1 (patch-vm_JSONPrinter.cpp) = c2483309516249d23d448e48bc91e20a0b150fba
-SHA1 (patch-vm_JSONPrinter.h) = fd720eba1d4593f70d932029f64284e17396d075
+SHA1 (patch-build_moz.configure_rust.configure) = 5124e8edc6b7ae319ed68d5d25a1e036b79f8a71
+SHA1 (patch-build_moz.configure_toolchain.configure) = 930ed1aec1da8c10c80d8f31dfc5acbf2db31c5f
+SHA1 (patch-js_moz.configure) = f3d762b293761e359ac7c389059aa228949a6f0b
+SHA1 (patch-js_src_jit_AtomicOperations.h) = 19eba50673f8138bbb09c0eaca63923cadbadd26
+SHA1 (patch-js_src_jit_ProcessExecutableMemory.cpp) = 84d629df0e7963755aa38ff9a1e29d60ed3adb4c
+SHA1 (patch-js_src_jsfriendapi.h) = f342a88182c1be0d3c0027c91ae94e1d4eac2542
+SHA1 (patch-js_src_vm_ArrayBufferObject.cpp) = 155f042eee3a8ff903622860e0a99af1ed776ad5
+SHA1 (patch-js_src_vm_JSONPrinter.cpp) = ff89dfe4e73223dda3d5d33e90e8c7bb3ffa3e0e
+SHA1 (patch-js_src_vm_JSONPrinter.h) = b9f67b29b16d7163aecc0ce9b6939c1308878a44
+SHA1 (patch-mfbt_tests_TestVariant.cpp) = 586fb67335b497ccadd3960025c44f8630f5476a
diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/patches/patch-.._.._build_moz.configure_rust.configure
--- a/lang/mozjs78/patches/patch-.._.._build_moz.configure_rust.configure       Sat Dec 05 11:53:10 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-$NetBSD: patch-.._.._build_moz.configure_rust.configure,v 1.1 2020/11/10 11:27:10 nia Exp $
-
-* Do not match rumprun toolchain for NetBSD,
-  narrowed should be one not two.
-
---- ../../build/moz.configure/rust.configure.orig      2020-09-25 09:22:51.000000000 +0000
-+++ ../../build/moz.configure/rust.configure
-@@ -337,7 +337,8 @@ def rust_triple_alias(host_or_target, ho
-             narrowed = [
-                 c for c in candidates
-                 if c.target.raw_os == host_or_target.raw_os and
--                   c.target.raw_cpu == host_or_target.raw_cpu
-+                   c.target.raw_cpu == host_or_target.raw_cpu and
-+                   not c.rust_target.endswith("-rumprun-netbsd")
-             ]
-             if len(narrowed) == 1:
-                 return narrowed[0].rust_target
diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/patches/patch-.._.._build_moz.configure_toolchain.configure
--- a/lang/mozjs78/patches/patch-.._.._build_moz.configure_toolchain.configure  Sat Dec 05 11:53:10 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-.._.._build_moz.configure_toolchain.configure,v 1.1 2020/11/10 11:27:10 nia Exp $
-
-Builds fine on MacOS with newer toolchain
-
---- ../../build/moz.configure/toolchain.configure.orig 2020-09-25 09:22:51.000000000 +0000
-+++ ../../build/moz.configure/toolchain.configure
-@@ -141,7 +141,7 @@ with only_when(host_is_osx | target_is_o
-     @imports(_from='biplist', _import='readPlist')
-     def macos_sdk(sdk, host):
-         sdk_min_version = Version('10.11')
--        sdk_max_version = Version('10.15.4')
-+        sdk_max_version = Version('10.15.6')
- 
-         if sdk:
-             sdk = sdk[0]
diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/patches/patch-.._.._mfbt_tests_TestVariant.cpp
--- a/lang/mozjs78/patches/patch-.._.._mfbt_tests_TestVariant.cpp       Sat Dec 05 11:53:10 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-.._.._mfbt_tests_TestVariant.cpp,v 1.1 2020/11/25 00:40:16 gutteridge Exp $
-
-Disable assertion that fails on 32-bit architectures.
-
---- ../../mfbt/tests/TestVariant.cpp.orig      2020-11-04 10:52:03.000000000 +0000
-+++ ../../mfbt/tests/TestVariant.cpp
-@@ -567,7 +567,7 @@ static void testMatchingLambdaWithIndex(
-   // would be no way to distinguish how each lambda is actually invoked because
-   // there is only one choice of call operator in each overload set.
-   auto desc = [](auto aIndex, auto& a) {
--    static_assert(sizeof(aIndex) < sizeof(size_t), "Expected small index type");
-+    //static_assert(sizeof(aIndex) < sizeof(size_t), "Expected small index type");
-     switch (sizeof(a)) {
-       case 1:
-         MOZ_RELEASE_ASSERT(aIndex == 0);
diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/patches/patch-build_moz.configure_rust.configure
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/mozjs78/patches/patch-build_moz.configure_rust.configure     Sat Dec 05 12:03:25 2020 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-build_moz.configure_rust.configure,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+* Do not match rumprun toolchain for NetBSD,
+  narrowed should be one not two.
+
+--- build/moz.configure/rust.configure.orig    2020-11-04 10:51:54.000000000 +0000
++++ build/moz.configure/rust.configure
+@@ -337,7 +337,8 @@ def rust_triple_alias(host_or_target, ho
+             narrowed = [
+                 c for c in candidates
+                 if c.target.raw_os == host_or_target.raw_os and
+-                   c.target.raw_cpu == host_or_target.raw_cpu
++                   c.target.raw_cpu == host_or_target.raw_cpu and
++                   not c.rust_target.endswith("-rumprun-netbsd")
+             ]
+             if len(narrowed) == 1:
+                 return narrowed[0].rust_target
diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/patches/patch-build_moz.configure_toolchain.configure
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/mozjs78/patches/patch-build_moz.configure_toolchain.configure        Sat Dec 05 12:03:25 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_moz.configure_toolchain.configure,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+Builds fine on MacOS with newer toolchain
+
+--- build/moz.configure/toolchain.configure.orig       2020-11-04 10:51:54.000000000 +0000
++++ build/moz.configure/toolchain.configure
+@@ -141,7 +141,7 @@ with only_when(host_is_osx | target_is_o
+     @imports(_from='biplist', _import='readPlist')
+     def macos_sdk(sdk, host):
+         sdk_min_version = Version('10.11')
+-        sdk_max_version = Version('10.15.4')
++        sdk_max_version = Version('10.15.6')
+ 
+         if sdk:
+             sdk = sdk[0]
diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/patches/patch-jit_AtomicOperations.h
--- a/lang/mozjs78/patches/patch-jit_AtomicOperations.h Sat Dec 05 11:53:10 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-jit_AtomicOperations.h,v 1.1 2020/11/28 10:54:55 nia Exp $
-
-C++ on NetBSD/powerpc doesn't predefine __ppc__, only __powerpc__.  Compensate.
-
---- jit/AtomicOperations.h.orig        2020-11-04 10:51:58.000000000 +0000
-+++ jit/AtomicOperations.h
-@@ -391,7 +391,8 @@ inline bool AtomicOperations::isLockfree
- #elif defined(__ppc__) || defined(__PPC__) || defined(__sparc__) ||     \
-     defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
-     defined(__PPC64LE__) || defined(__alpha__) || defined(__hppa__) ||  \
--    defined(__sh__) || defined(__s390__) || defined(__s390x__)
-+    defined(__sh__) || defined(__s390__) || defined(__s390x__) ||       \
-+    defined(__powerpc__)
- #  include "jit/shared/AtomicOperations-feeling-lucky.h"
- #else
- #  error "No AtomicOperations support provided for this platform"
diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/patches/patch-jit_ProcessExecutableMemory.cpp
--- a/lang/mozjs78/patches/patch-jit_ProcessExecutableMemory.cpp        Sat Dec 05 11:53:10 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-$NetBSD: patch-jit_ProcessExecutableMemory.cpp,v 1.1 2020/11/10 11:27:10 nia Exp $
-
-PaX MPROTECT safety for NetBSD.
-
---- jit/ProcessExecutableMemory.cpp.orig       2020-09-25 09:22:55.000000000 +0000
-+++ jit/ProcessExecutableMemory.cpp
-@@ -362,9 +362,16 @@ static void* ReserveProcessExecutableMem
-   // Note that randomAddr is just a hint: if the address is not available
-   // mmap will pick a different address.
-   void* randomAddr = ComputeRandomAllocationAddress();
-+#ifdef MPROTECT
-+  void* p = MozTaggedAnonymousMmap(randomAddr, bytes,
-+                                   PROT_MPROTECT(PROT_EXEC | PROT_WRITE | PROT_READ), 
-+                                   MAP_NORESERVE | MAP_PRIVATE | MAP_ANON, -1,
-+                                   0, "js-executable-memory");
-+#else
-   void* p = MozTaggedAnonymousMmap(randomAddr, bytes, PROT_NONE,
-                                    MAP_NORESERVE | MAP_PRIVATE | MAP_ANON, -1,
-                                    0, "js-executable-memory");
-+#endif
-   if (p == MAP_FAILED) {
-     return nullptr;
-   }
-@@ -409,8 +416,12 @@ static unsigned ProtectionSettingToFlags
- 
- static MOZ_MUST_USE bool CommitPages(void* addr, size_t bytes,
-                                      ProtectionSetting protection) {
--  void* p = MozTaggedAnonymousMmap(
--      addr, bytes, ProtectionSettingToFlags(protection),
-+  void* p = MozTaggedAnonymousMmap(addr, bytes,
-+#ifdef PROT_MPROTECT
-+      ProtectionSettingToFlags(protection) | PROT_MPROTECT(PROT_EXEC | PROT_WRITE | PROT_READ),
-+#else
-+      ProtectionSettingToFlags(protection),
-+#endif
-       MAP_FIXED | MAP_PRIVATE | MAP_ANON, -1, 0, "js-executable-memory");
-   if (p == MAP_FAILED) {
-     return false;
diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/patches/patch-js_moz.configure
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/mozjs78/patches/patch-js_moz.configure       Sat Dec 05 12:03:25 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-js_moz.configure,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+Check ${PREFIX} to allow use of non-builtin readlink libraries.
+
+--- js/moz.configure.orig      2020-11-04 10:51:54.000000000 +0000
++++ js/moz.configure
+@@ -696,7 +696,7 @@ def editline(js_shell, is_windows, compi
+ js_option('--enable-readline', help='Link js shell to system readline library',
+           when=editline)
+ 
+-has_readline = check_symbol('readline', flags=['-lreadline'], when='--enable-readline',
++has_readline = check_symbol('readline', flags=['-lreadline', '-L@PREFIX@/lib'], when='--enable-readline',
+                             onerror=lambda: die('No system readline library found'))
+ 
+ set_config('EDITLINE_LIBS', ['-lreadline'], when=has_readline)
diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/patches/patch-js_src_jit_AtomicOperations.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/mozjs78/patches/patch-js_src_jit_AtomicOperations.h  Sat Dec 05 12:03:25 2020 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-js_src_jit_AtomicOperations.h,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+C++ on NetBSD/powerpc doesn't predefine __ppc__, only __powerpc__.  Compensate.
+
+--- js/src/jit/AtomicOperations.h.orig 2020-11-04 10:51:58.000000000 +0000
++++ js/src/jit/AtomicOperations.h
+@@ -391,7 +391,8 @@ inline bool AtomicOperations::isLockfree
+ #elif defined(__ppc__) || defined(__PPC__) || defined(__sparc__) ||     \
+     defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
+     defined(__PPC64LE__) || defined(__alpha__) || defined(__hppa__) ||  \
+-    defined(__sh__) || defined(__s390__) || defined(__s390x__)
++    defined(__sh__) || defined(__s390__) || defined(__s390x__) ||       \
++    defined(__powerpc__)
+ #  include "jit/shared/AtomicOperations-feeling-lucky.h"
+ #else
+ #  error "No AtomicOperations support provided for this platform"
diff -r 6a912ae035f1 -r 01d7be4f77d9 lang/mozjs78/patches/patch-js_src_jit_ProcessExecutableMemory.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/mozjs78/patches/patch-js_src_jit_ProcessExecutableMemory.cpp Sat Dec 05 12:03:25 2020 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-js_src_jit_ProcessExecutableMemory.cpp,v 1.1 2020/12/05 12:03:26 nia Exp $
+
+PaX MPROTECT safety for NetBSD.
+
+--- js/src/jit/ProcessExecutableMemory.cpp.orig        2020-11-04 10:51:58.000000000 +0000
++++ js/src/jit/ProcessExecutableMemory.cpp
+@@ -362,9 +362,16 @@ static void* ReserveProcessExecutableMem



Home | Main Index | Thread Index | Old Index