Update to 0.4.12
This commit is contained in:
parent
79e6289cc1
commit
5c277ecddb
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/libproxy-0.*.tar.gz
|
||||
/0.4.12.tar.gz
|
||||
|
@ -1,90 +0,0 @@
|
||||
From cccc44ce0c8a251d987d0d83f05e93d31aa659d7 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Mon, 3 Jun 2013 17:09:25 -0400
|
||||
Subject: [PATCH] pacrunner_mozjs: Also support mozjs-17.0
|
||||
|
||||
GNOME 3.10 is moving to hard require mozjs-17.0, so we should support
|
||||
it too. See also:
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=59830
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=690982
|
||||
---
|
||||
libproxy/cmake/modules/pacrunner_mozjs.cmk | 8 +++++++-
|
||||
libproxy/modules/pacrunner_mozjs.cpp | 16 +++++++++++++---
|
||||
2 files changed, 20 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libproxy/cmake/modules/pacrunner_mozjs.cmk b/libproxy/cmake/modules/pacrunner_mozjs.cmk
|
||||
index 21072db..49856a6 100644
|
||||
--- a/libproxy/cmake/modules/pacrunner_mozjs.cmk
|
||||
+++ b/libproxy/cmake/modules/pacrunner_mozjs.cmk
|
||||
@@ -14,7 +14,13 @@ elseif(NOT APPLE)
|
||||
include_directories(${MOZJS_INCLUDE_DIRS})
|
||||
link_directories(${MOZJS_LIBRARY_DIRS})
|
||||
else()
|
||||
- set(MOZJS_FOUND 0)
|
||||
+ pkg_search_module(MOZJS mozjs-17.0)
|
||||
+ if(MOZJS_FOUND)
|
||||
+ include_directories(${MOZJS_INCLUDE_DIRS})
|
||||
+ link_directories(${MOZJS_LIBRARY_DIRS})
|
||||
+ else()
|
||||
+ set(MOZJS_FOUND 0)
|
||||
+ endif()
|
||||
endif()
|
||||
else()
|
||||
set(MOZJS_FOUND 0)
|
||||
diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp
|
||||
index abb4b9d..f5e678c 100644
|
||||
--- a/libproxy/modules/pacrunner_mozjs.cpp
|
||||
+++ b/libproxy/modules/pacrunner_mozjs.cpp
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <cstring> // ?
|
||||
#include <unistd.h> // gethostname
|
||||
+#include <stdint.h>
|
||||
|
||||
#include "../extension_pacrunner.hpp"
|
||||
using namespace libproxy;
|
||||
@@ -76,12 +77,12 @@ static JSBool dnsResolve_(JSContext *cx, jsval hostname, jsval *vp) {
|
||||
return true;
|
||||
}
|
||||
|
||||
-static JSBool dnsResolve(JSContext *cx, uintN /*argc*/, jsval *vp) {
|
||||
+static JSBool dnsResolve(JSContext *cx, uint32_t /*argc*/, jsval *vp) {
|
||||
jsval *argv = JS_ARGV(cx, vp);
|
||||
return dnsResolve_(cx, argv[0], vp);
|
||||
}
|
||||
|
||||
-static JSBool myIpAddress(JSContext *cx, uintN /*argc*/, jsval *vp) {
|
||||
+static JSBool myIpAddress(JSContext *cx, uint32_t /*argc*/, jsval *vp) {
|
||||
char *hostname = (char *) JS_malloc(cx, 1024);
|
||||
if (!gethostname(hostname, 1023)) {
|
||||
JSString *myhost = JS_NewStringCopyN(cx, hostname, strlen(hostname));
|
||||
@@ -98,7 +99,12 @@ static JSBool myIpAddress(JSContext *cx, uintN /*argc*/, jsval *vp) {
|
||||
static JSClass cls = {
|
||||
"global", JSCLASS_GLOBAL_FLAGS,
|
||||
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
|
||||
- JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
|
||||
+ JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub,
|
||||
+#if JS_VERSION == 186
|
||||
+ NULL,
|
||||
+#else
|
||||
+ JS_FinalizeStub,
|
||||
+#endif
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
@@ -117,7 +123,11 @@ public:
|
||||
//JS_SetOptions(this->jsctx, JSOPTION_VAROBJFIX);
|
||||
//JS_SetVersion(this->jsctx, JSVERSION_LATEST);
|
||||
//JS_SetErrorReporter(cx, reportError);
|
||||
+#if JS_VERSION == 186
|
||||
+ if (!(this->jsglb = JS_NewGlobalObject(this->jsctx, &cls, NULL))) goto error;
|
||||
+#else
|
||||
if (!(this->jsglb = JS_NewCompartmentAndGlobalObject(this->jsctx, &cls, NULL))) goto error;
|
||||
+#endif
|
||||
if (!JS_InitStandardClasses(this->jsctx, this->jsglb)) goto error;
|
||||
|
||||
// Define Javascript functions
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -up libproxy-0.4.10/libproxy/cmake/modules/pacrunner_mozjs.cmk.orig libproxy-0.4.10/libproxy/cmake/modules/pacrunner_mozjs.cmk
|
||||
--- libproxy-0.4.10/libproxy/cmake/modules/pacrunner_mozjs.cmk.orig 2012-10-02 16:20:40.000000000 +0200
|
||||
+++ libproxy-0.4.10/libproxy/cmake/modules/pacrunner_mozjs.cmk 2012-10-17 00:36:43.645579472 +0200
|
||||
@@ -9,7 +9,7 @@ if(WIN32)
|
||||
elseif(NOT APPLE)
|
||||
option(WITH_MOZJS "Search for MOZJS package" ON)
|
||||
if (WITH_MOZJS)
|
||||
- pkg_search_module(MOZJS mozjs185>=1.8.5)
|
||||
+ pkg_search_module(MOZJS mozjs185)
|
||||
if(MOZJS_FOUND)
|
||||
include_directories(${MOZJS_INCLUDE_DIRS})
|
||||
link_directories(${MOZJS_LIBRARY_DIRS})
|
@ -1,41 +0,0 @@
|
||||
diff -up libproxy-0.4.11/libproxy/extension_pacrunner.cpp.crash libproxy-0.4.11/libproxy/extension_pacrunner.cpp
|
||||
--- libproxy-0.4.11/libproxy/extension_pacrunner.cpp.crash 2010-07-29 08:14:59.000000000 -0400
|
||||
+++ libproxy-0.4.11/libproxy/extension_pacrunner.cpp 2013-11-11 15:23:56.987266457 -0500
|
||||
@@ -22,20 +22,10 @@ using namespace libproxy;
|
||||
|
||||
pacrunner::pacrunner(string, const url&) {}
|
||||
|
||||
-pacrunner_extension::pacrunner_extension() {
|
||||
- this->pr = NULL;
|
||||
-}
|
||||
+pacrunner_extension::pacrunner_extension() {}
|
||||
|
||||
-pacrunner_extension::~pacrunner_extension() {
|
||||
- if (this->pr) delete this->pr;
|
||||
-}
|
||||
+pacrunner_extension::~pacrunner_extension() {}
|
||||
|
||||
pacrunner* pacrunner_extension::get(string pac, const url& pacurl) throw (bad_alloc) {
|
||||
- if (this->pr) {
|
||||
- if (this->last == pac)
|
||||
- return this->pr;
|
||||
- delete this->pr;
|
||||
- }
|
||||
-
|
||||
- return this->pr = this->create(pac, pacurl);
|
||||
+ return this->create(pac, pacurl);
|
||||
}
|
||||
diff -up libproxy-0.4.11/libproxy/proxy.cpp.crash libproxy-0.4.11/libproxy/proxy.cpp
|
||||
--- libproxy-0.4.11/libproxy/proxy.cpp.crash 2013-11-11 15:25:27.309271353 -0500
|
||||
+++ libproxy-0.4.11/libproxy/proxy.cpp 2013-11-11 15:25:31.569271584 -0500
|
||||
@@ -416,7 +416,9 @@ void proxy_factory::run_pac(url &realurl
|
||||
|
||||
/* Run the PAC, but only try one PACRunner */
|
||||
if (debug) cerr << "Using pacrunner: " << typeid(*pacrunners[0]).name() << endl;
|
||||
- string pacresp = pacrunners[0]->get(this->pac, this->pacurl->to_string())->run(realurl);
|
||||
+ pacrunner* runner = pacrunners[0]->get(this->pac, this->pacurl->to_string());
|
||||
+ string pacresp = runner->run(realurl);
|
||||
+ delete runner;
|
||||
if (debug) cerr << "Pacrunner returned: " << pacresp << endl;
|
||||
format_pac_response(pacresp, response);
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
diff -up libproxy-0.4.11/libproxy/url.cpp.fdleak libproxy-0.4.11/libproxy/url.cpp
|
||||
--- libproxy-0.4.11/libproxy/url.cpp.fdleak 2013-09-19 08:45:48.718145364 -0400
|
||||
+++ libproxy-0.4.11/libproxy/url.cpp 2013-09-19 08:46:31.374147676 -0400
|
||||
@@ -403,6 +403,7 @@ char* url::get_pac() {
|
||||
buffer = NULL;
|
||||
}
|
||||
}
|
||||
+ close (sock);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
@@ -495,7 +496,7 @@ char* url::get_pac() {
|
||||
}
|
||||
|
||||
// Clean up
|
||||
- shutdown(sock, SHUT_RDWR);
|
||||
+ close(sock);
|
||||
return buffer;
|
||||
}
|
||||
|
@ -12,21 +12,16 @@
|
||||
%endif
|
||||
|
||||
Name: libproxy
|
||||
Version: 0.4.11
|
||||
Release: 13%{?svn}%{?dist}
|
||||
Version: 0.4.12
|
||||
Release: 1%{?dist}
|
||||
Summary: A library handling all the details of proxy configuration
|
||||
|
||||
Group: System Environment/Libraries
|
||||
License: LGPLv2+
|
||||
URL: http://code.google.com/p/libproxy/
|
||||
|
||||
Source0: http://libproxy.googlecode.com/files/libproxy-%{version}%{?svn}.tar.gz
|
||||
Patch0: libproxy-0.4.10-mozjs.patch
|
||||
Patch1: 0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch
|
||||
URL: https://libproxy.github.io/libproxy/
|
||||
Source0: https://github.com/libproxy/%{name}/archive/%{version}.tar.gz
|
||||
# http://code.google.com/p/libproxy/issues/detail?id=152
|
||||
Patch2: 0001-Add-config-module-for-querying-PacRunner-d-mon.patch
|
||||
Patch3: libproxy-0.4.11-fdleak.patch
|
||||
Patch4: libproxy-0.4.11-crash.patch
|
||||
Patch0: 0001-Add-config-module-for-querying-PacRunner-d-mon.patch
|
||||
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: libmodman-devel >= 2.0.1
|
||||
@ -38,7 +33,7 @@ BuildRequires: GConf2-devel
|
||||
BuildRequires: libXmu-devel
|
||||
}
|
||||
# mozjs
|
||||
%{?_with_mozjs:BuildRequires: mozjs17-devel}
|
||||
%{?_with_mozjs:BuildRequires: pkgconfig(mozjs185)}
|
||||
# NetworkManager
|
||||
%{?_with_networkmanager:
|
||||
BuildRequires: NetworkManager-devel
|
||||
@ -49,7 +44,7 @@ BuildRequires: dbus-devel
|
||||
# webkit (gtk3)
|
||||
%{?_with_webkitgtk3:BuildRequires: webkitgtk3-devel}
|
||||
# kde
|
||||
%{?_with_kde:BuildRequires: kdelibs-devel}
|
||||
%{?_with_kde:BuildRequires: /usr/bin/kreadconfig5}
|
||||
# pacrunner
|
||||
%{?_with_pacrunner:BuildRequires: dbus-devel}
|
||||
|
||||
@ -114,6 +109,7 @@ The %{name}-gnome package contains the %{name} plugin for gnome.
|
||||
Summary: Plugin for %{name} and kde
|
||||
Group: System Environment/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: /usr/bin/kreadconfig5
|
||||
|
||||
%description kde
|
||||
The %{name}-kde package contains the %{name} plugin for kde.
|
||||
@ -190,11 +186,7 @@ developing applications that use %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .orig
|
||||
%patch1 -p1 -b .orig
|
||||
%patch2 -p1 -b .orig
|
||||
%patch3 -p1 -b .fdleak
|
||||
%patch4 -p1 -b .crash
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%{cmake} \
|
||||
@ -255,7 +247,7 @@ make test
|
||||
%{?_with_kde:
|
||||
%files kde
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/%{name}/%{version}/modules/config_kde4.so
|
||||
%{_libdir}/%{name}/%{version}/modules/config_kde.so
|
||||
}
|
||||
|
||||
%{?_with_mozjs:
|
||||
@ -297,6 +289,9 @@ make test
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Feb 29 2016 David King <amigadave@amigadave.com> - 0.4.12-1
|
||||
- Update to 0.4.12
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.11-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user