fix qt5's prl file and fix libproxy dependency

This commit is contained in:
Weng Xuetian 2016-06-21 05:59:49 +01:00
parent 993bae30a3
commit f80f876bf1
35 changed files with 175 additions and 51 deletions

View File

@ -0,0 +1,90 @@
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

View File

@ -1,36 +1,29 @@
# maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
pkgname=libproxy
pkgver=0.4.11
pkgrel=2
pkgver=0.4.12
pkgrel=1
pkgdesc="A library that provides automatic proxy configuration management"
arch=('x86_64')
license=('LGPL')
depends=('gcc-libs')
depends=('gcc-libs' 'js17')
optdepends=('networkmanager: NetworkManager configuration module'
'perl: Perl bindings'
'python2: Python bindings'
'js17: PAC proxy support - Mozilla based pacrunner')
makedepends=('cmake' 'networkmanager' 'python2' 'perl' 'js17')
url="http://libproxy.googlecode.com"
source=(http://libproxy.googlecode.com/files/${pkgname}-${pkgver}.tar.gz
'python2: Python bindings')
makedepends=('cmake' 'networkmanager' 'python2' 'perl')
url="http://libproxy.github.io/libproxy/"
source=(https://github.com/libproxy/libproxy/archive/${pkgver}.tar.gz
0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch
libproxy-0.4.11-crash.patch
libproxy-0.4.11-fdleak.patch
dont_segfault_on_exit.patch)
md5sums=('3cd1ae2a4abecf44b3f24d6639d2cd84'
libproxy-0.4.11-crash.patch)
md5sums=('258d89cc052e0a3c09aa1f42d7f93045'
'16cb8ad1292f04279108a80f36434c7b'
'a45f2195c164a48639e963e8341f5d93'
'6302b995c570e42691007f3b09953a59'
'0a4980304ee93764162dbdbd0eb5e519')
'a45f2195c164a48639e963e8341f5d93')
prepare() {
mkdir build
cd $pkgname-$pkgver
patch -Np1 -i ../0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch
patch -Np1 -i ../libproxy-0.4.11-crash.patch
patch -Np1 -i ../libproxy-0.4.11-fdleak.patch
patch -Np1 -i ../dont_segfault_on_exit.patch
}
build() {

View File

@ -0,0 +1,41 @@
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);
}

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-3d
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-canvas3d
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-charts
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-connectivity
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-datavis3d
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-declarative-render2d
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-declarative
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-doc
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('any')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-examples
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('any')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-gamepad
pkgver=${QSubVersion}
pkgrel=1
pkgrel=2
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-graphicaleffects
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-imageformats
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-location
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-multimedia
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-quickcontrols
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-quickcontrols2
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-script
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -3,7 +3,7 @@ source ../qt5.conf
pkgname=qt5-scxml
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-sensors
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-serialbus
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-serialport
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-svg
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-tools
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-translations
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-virtualkeyboard
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-wayland
pkgver=${QSubVersion}
pkgrel=1
pkgrel=2
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')
@ -27,7 +27,7 @@ build() {
#qmake-qt5 ../$(getPkgName ${pkgname})/src/plugins
cd $(getPkgName ${pkgname})
qmake-qt5 . QMAKE_LIBS_PRIVATE+="-lQt5DBus -ldl"
qmake-qt5 .
make
}

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-webchannel
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-webengine
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -3,7 +3,7 @@ source ../qt5.conf
pkgname=qt5-websockets
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-x11extras
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -2,7 +2,7 @@ source ../qt5.conf
pkgname=qt5-xmlpatterns
pkgver=${QSubVersion}
pkgrel=2
pkgrel=3
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')

View File

@ -28,7 +28,7 @@ qt5-graphicaleffects
qt5-translations
qt5-imageformats
qt5-datavis3d
#qt5-gamepad
qt5-gamepad
qt5-x11extras
qt5-sensors
qt5-multimedia
@ -39,7 +39,7 @@ qt5-doc
qt5-examples
qt5-virtualkeyboard
qt5-scxml
#qt5-wayland
qt5-wayland
qt5-webchannel
qt5-3d
qt5-webengine