[jhbuild] 3.24, 3.26: Remove NSPR dependency from mozjs



commit 05625da0bbba7b0d62364c21507781fd1ff9e0f1
Author: Philip Chimento <philip chimento gmail com>
Date:   Fri May 12 22:17:40 2017 -0700

    3.24, 3.26: Remove NSPR dependency from mozjs
    
    We compile mozjs with --enable-posix-nspr-emulation, meaning the
    dependency on NSPR can be dropped. However, it's still required in the
    pkg-config file, so in practice it would still be linked if present, and
    error out if not present.

 modulesets/gnome-suites-core-deps-3.24.modules |    1 +
 modulesets/gnome-suites-core-deps-3.26.modules |    2 +
 patches/mozjs38-remove-nspr-dep.patch          |   25 ++++++++++++++++++++++++
 patches/mozjs45-remove-nspr-dep.patch          |   25 ++++++++++++++++++++++++
 4 files changed, 53 insertions(+), 0 deletions(-)
---
diff --git a/modulesets/gnome-suites-core-deps-3.24.modules b/modulesets/gnome-suites-core-deps-3.24.modules
index 5d640fc..6527c00 100644
--- a/modulesets/gnome-suites-core-deps-3.24.modules
+++ b/modulesets/gnome-suites-core-deps-3.24.modules
@@ -1574,6 +1574,7 @@
       <patch file="mozjs38-copy-headers.patch" strip="1"/>
       <patch file="mozjs38-add-bracket.patch" strip="1"/>
       <patch file="mozjs38-1269317.patch" strip="1"/>
+      <patch file="mozjs38-remove-nspr-dep.patch" strip="1"/>
     </branch>
     <dependencies>
       <dep package="libffi"/>
diff --git a/modulesets/gnome-suites-core-deps-3.26.modules b/modulesets/gnome-suites-core-deps-3.26.modules
index b3bb5f4..b76da4e 100644
--- a/modulesets/gnome-suites-core-deps-3.26.modules
+++ b/modulesets/gnome-suites-core-deps-3.26.modules
@@ -1570,6 +1570,7 @@
       <patch file="mozjs38-copy-headers.patch" strip="1"/>
       <patch file="mozjs38-add-bracket.patch" strip="1"/>
       <patch file="mozjs38-1269317.patch" strip="1"/>
+      <patch file="mozjs38-remove-nspr-dep.patch" strip="1"/>
     </branch>
     <dependencies>
       <dep package="libffi"/>
@@ -1592,6 +1593,7 @@
       <patch file="mozjs45-1269317.patch" strip="1"/>
       <patch file="mozjs45-functions-visibility.patch" strip="1"/>
       <patch file="mozjs45-1176787-disable-mozglue.patch" strip="1"/>
+      <patch file="mozjs45-remove-nspr-dep.patch" strip="1"/>
     </branch>
     <dependencies>
       <dep package="libffi"/>
diff --git a/patches/mozjs38-remove-nspr-dep.patch b/patches/mozjs38-remove-nspr-dep.patch
new file mode 100644
index 0000000..9e9f4ac
--- /dev/null
+++ b/patches/mozjs38-remove-nspr-dep.patch
@@ -0,0 +1,25 @@
+Removes the dependency on NSPR from the pkg-config file in the case where
+SpiderMonkey was configured with --enable-posix-nspr-emulation.
+
+--- a/build/autoconf/nspr-build.m4     2017-04-24 21:52:45.000000000 -0700
++++ b/build/autoconf/nspr-build.m4     2017-04-24 21:53:42.000000000 -0700
+@@ -186,6 +186,8 @@
+                 ,
+                 AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT]))
+     CFLAGS=$_SAVE_CFLAGS
++elif test -n "$JS_POSIX_NSPR"; then
++    NSPR_PKGCONF_CHECK=
+ fi
+ AC_SUBST(NSPR_PKGCONF_CHECK)
+ 
+--- a/js/src/configure 2017-04-24 22:18:01.000000000 -0700
++++ b/js/src/configure 2017-04-24 22:18:30.000000000 -0700
+@@ -12494,6 +12494,8 @@
+ fi
+ rm -f conftest*
+     CFLAGS=$_SAVE_CFLAGS
++elif test -n "$JS_POSIX_NSPR"; then
++    NSPR_PKGCONF_CHECK=
+ fi
+ 
+ 
diff --git a/patches/mozjs45-remove-nspr-dep.patch b/patches/mozjs45-remove-nspr-dep.patch
new file mode 100644
index 0000000..c9828f8
--- /dev/null
+++ b/patches/mozjs45-remove-nspr-dep.patch
@@ -0,0 +1,25 @@
+Removes the dependency on NSPR from the pkg-config file in the case where
+SpiderMonkey was configured with --enable-posix-nspr-emulation.
+
+--- a/build/autoconf/nspr-build.m4     2017-04-24 21:52:45.000000000 -0700
++++ b/build/autoconf/nspr-build.m4     2017-04-24 21:53:42.000000000 -0700
+@@ -181,6 +181,8 @@
+                 ,
+                 AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT]))
+     CFLAGS=$_SAVE_CFLAGS
++elif test -n "$JS_POSIX_NSPR"; then
++    NSPR_PKGCONF_CHECK=
+ fi
+ AC_SUBST(NSPR_PKGCONF_CHECK)
+ 
+--- a/js/src/configure  2017-04-24 22:18:01.000000000 -0700
++++ b/js/src/configure  2017-04-24 22:18:30.000000000 -0700
+@@ -12863,6 +12863,8 @@
+ fi
+ rm -f conftest*
+     CFLAGS=$_SAVE_CFLAGS
++elif test -n "$JS_POSIX_NSPR"; then
++    NSPR_PKGCONF_CHECK=
+ fi
+ 
+ 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]