Build with mozjs60

This commit is contained in:
Kalev Lember 2019-02-08 10:28:25 +01:00
parent 29d06589cc
commit 7d3ae83f58
3 changed files with 54 additions and 2 deletions

View File

@ -99,3 +99,26 @@ index a70b2e9..ed07c69 100644
JSContext *jsctx; JSContext *jsctx;
JS::Heap<JSObject*> *jsglb; JS::Heap<JSObject*> *jsglb;
JSAutoCompartment *jsac; JSAutoCompartment *jsac;
From a9b052c6e30101fb0b702917f245a3e2a2f08366 Mon Sep 17 00:00:00 2001
From: Laurent Bigonville <bigon@bigon.be>
Date: Tue, 2 Oct 2018 10:22:56 +0200
Subject: [PATCH] Add call to JS::InitSelfHostedCode()
This is needed otherwise mozjs crashes
---
libproxy/modules/pacrunner_mozjs.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp
index ed07c69..38e7d46 100644
--- a/libproxy/modules/pacrunner_mozjs.cpp
+++ b/libproxy/modules/pacrunner_mozjs.cpp
@@ -118,6 +118,8 @@ class mozjs_pacrunner : public pacrunner {
// Initialize Javascript context
if (!(this->jsctx = JS_NewContext(1024 * 1024))) goto error;
{
+ if (!JS::InitSelfHostedCode(this->jsctx)) goto error;
+
JS::RootedValue rval(this->jsctx);
JS::CompartmentOptions compart_opts;

View File

@ -0,0 +1,23 @@
From 1600c6af7ed775d4ccbb239937acd92ef7162409 Mon Sep 17 00:00:00 2001
From: Laurent Bigonville <bigon@bigon.be>
Date: Sun, 9 Dec 2018 16:07:55 +0100
Subject: [PATCH] Build with mozjs 60 instead
This seems enough to make it work with mozjs 60
---
libproxy/cmake/modules/pacrunner_mozjs.cmk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libproxy/cmake/modules/pacrunner_mozjs.cmk b/libproxy/cmake/modules/pacrunner_mozjs.cmk
index 20857fb..871cc85 100644
--- a/libproxy/cmake/modules/pacrunner_mozjs.cmk
+++ b/libproxy/cmake/modules/pacrunner_mozjs.cmk
@@ -9,7 +9,7 @@ if(WIN32)
elseif(NOT APPLE)
option(WITH_MOZJS "Search for MOZJS package" ON)
if (WITH_MOZJS)
- pkg_search_module(MOZJS mozjs-52)
+ pkg_search_module(MOZJS mozjs-60)
if(MOZJS_FOUND)
include_directories(${MOZJS_INCLUDE_DIRS})
link_directories(${MOZJS_LIBRARY_DIRS})

View File

@ -4,7 +4,7 @@
Name: libproxy Name: libproxy
Version: 0.4.15 Version: 0.4.15
Release: 9%{?dist} Release: 10%{?dist}
Summary: A library handling all the details of proxy configuration Summary: A library handling all the details of proxy configuration
License: LGPLv2+ License: LGPLv2+
@ -17,7 +17,10 @@ Patch0: 0001-Add-config-module-for-querying-PacRunner-d-mon.patch
Patch1: libproxy-0.4.11-crash.patch Patch1: libproxy-0.4.11-crash.patch
Patch2: libproxy-0.4.15-python3738.patch Patch2: libproxy-0.4.15-python3738.patch
# https://github.com/libproxy/libproxy/pull/86 # https://github.com/libproxy/libproxy/pull/86
# https://github.com/libproxy/libproxy/pull/87
Patch3: libproxy-0.4.15-mozjs52.patch Patch3: libproxy-0.4.15-mozjs52.patch
# https://github.com/libproxy/libproxy/pull/95
Patch4: libproxy-0.4.15-mozjs60.patch
BuildRequires: cmake >= 2.6.0 BuildRequires: cmake >= 2.6.0
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -27,7 +30,7 @@ BuildRequires: libmodman-devel >= 2.0.1
# gnome # gnome
BuildRequires: pkgconfig(gio-2.0) >= 2.26 BuildRequires: pkgconfig(gio-2.0) >= 2.26
# mozjs # mozjs
BuildRequires: pkgconfig(mozjs-52) BuildRequires: pkgconfig(mozjs-60)
# NetworkManager # NetworkManager
BuildRequires: pkgconfig(libnm) BuildRequires: pkgconfig(libnm)
# pacrunner (and NetworkManager) # pacrunner (and NetworkManager)
@ -233,6 +236,9 @@ make test
%changelog %changelog
* Fri Feb 08 2019 Kalev Lember <klember@redhat.com> - 0.4.15-10
- Build with mozjs60
* Sun Aug 26 2018 Peter Robinson <pbrobinson@fedoraproject.org> 0.4.15-9 * Sun Aug 26 2018 Peter Robinson <pbrobinson@fedoraproject.org> 0.4.15-9
- Add patch and build against mozjs 52 - Add patch and build against mozjs 52