Drop libproxy-mozilla; one JS interpreter (webkit) is enough and there is

no official support upstream for the newer spidermonkey.

discussed with and ok landry@ jasper@
This commit is contained in:
ajacoutot 2014-03-25 11:18:46 +00:00
parent 6cb2d30b2c
commit a2dca99320
6 changed files with 8 additions and 109 deletions

View File

@ -1,24 +1,18 @@
# $OpenBSD: Makefile,v 1.41 2014/03/09 19:46:35 espie Exp $
# sync with ONLY_FOR_ARCHS in devel/spidermonkey
ONLY_FOR_ARCHS-mozilla= alpha amd64 i386 hppa mips64el mips64 powerpc sparc64
# $OpenBSD: Makefile,v 1.42 2014/03/25 11:18:46 ajacoutot Exp $
SHARED_ONLY= Yes
COMMENT-main= library handling all the details of proxy configuration
COMMENT-mozilla= pacrunner libproxy plugin for mozilla-based (gecko) browsers
COMMENT-webkit= pacrunner libproxy plugin for webkit-based browsers
VERSION= 0.4.11
DISTNAME= libproxy-${VERSION}
PKGNAME-main= libproxy-${VERSION}
PKGNAME-mozilla= libproxy-mozilla-${VERSION}
PKGNAME-webkit= libproxy-webkit-${VERSION}
REVISION-main= 3
REVISION-mozilla= 2
REVISION-webkit= 2
REVISION-webkit= 3
CATEGORIES= net
@ -38,12 +32,11 @@ MODULES= devel/cmake \
SUBST_VARS+= VERSION
# webkit = cyclic dependency: libproxy,-webkit -> webkit -> libsoup -> libproxy
# mozilla = devel/spidermonkey does not build on all arches
PSEUDO_FLAVORS= no_mozilla no_webkit bootstrap
FLAVOR?= no_mozilla no_webkit bootstrap
# cyclic dependency: libproxy,-webkit -> webkit -> gtk+3|libsoup -> glib2-networking -> libproxy
PSEUDO_FLAVORS= no_webkit bootstrap
FLAVOR?= no_webkit bootstrap
MULTI_PACKAGES= -main -mozilla -webkit
MULTI_PACKAGES= -main -webkit
BUILD_DEPENDS= lang/vala
@ -52,10 +45,6 @@ RUN_DEPENDS-main= ${MODGETTEXT_RUN_DEPENDS} \
LIB_DEPENDS-main= ${LIB_DEPENDS} \
devel/glib2
RUN_DEPENDS-mozilla= # empty
LIB_DEPENDS-mozilla= ${BUILD_PKGPATH}>=${VERSION} \
devel/spidermonkey>=17.0,<18.0
RUN_DEPENDS-webkit= ${MODGETTEXT_RUN_DEPENDS}
LIB_DEPENDS-webkit= STEM->=${VERSION}:${BUILD_PKGPATH}, \
www/webkit,gtk3
@ -65,8 +54,6 @@ cWANTLIB += m stdc++
WANTLIB-main += ${cWANTLIB} ${MODGETTEXT_WANTLIB}
WANTLIB-main += c gio-2.0 glib-2.0 gobject-2.0 perl pthread
WANTLIB-mozilla += ${cWANTLIB} mozjs-17.0 proxy
WANTLIB-webkit += ${cWANTLIB} ${MODGETTEXT_WANTLIB}
WANTLIB-webkit += glib-2.0 javascriptcoregtk-3.0 proxy
@ -80,15 +67,10 @@ CONFIGURE_ARGS= -DCMAKE_C_FLAGS="${CFLAGS}" \
-DWITH_KDE4:BOOL=OFF \
-DWITH_DOTNET:BOOL=OFF \
-DWITH_NM:BOOL=OFF \
-DWITH_MOZJS:BOOL=OFF \
-DBIPR:BOOL=OFF
.include <bsd.port.arch.mk>
.if ${BUILD_PACKAGES:M-mozilla}
CONFIGURE_ARGS += -DWITH_MOZJS:BOOL=ON
.else
CONFIGURE_ARGS += -DWITH_MOZJS:BOOL=OFF
.endif
.if ${BUILD_PACKAGES:M-webkit}
CONFIGURE_ARGS += -DWITH_WEBKIT3:BOOL=ON
.else

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-libproxy_cmake_modules_pacrunner_mozjs_cmk,v 1.1 2013/08/10 12:46:22 ajacoutot Exp $
Support for mozjs-17.0 (from Fedora).
https://bugs.freedesktop.org/show_bug.cgi?id=59830
https://bugzilla.gnome.org/show_bug.cgi?id=690982
--- libproxy/cmake/modules/pacrunner_mozjs.cmk.orig Mon Jun 20 12:31:41 2011
+++ libproxy/cmake/modules/pacrunner_mozjs.cmk Sat Aug 10 10:18:18 2013
@@ -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)

View File

@ -1,57 +0,0 @@
$OpenBSD: patch-libproxy_modules_pacrunner_mozjs_cpp,v 1.1 2013/08/10 12:46:23 ajacoutot Exp $
Support for mozjs-17.0 (from Fedora).
https://bugs.freedesktop.org/show_bug.cgi?id=59830
https://bugzilla.gnome.org/show_bug.cgi?id=690982
--- libproxy/modules/pacrunner_mozjs.cpp.orig Fri Mar 9 18:46:11 2012
+++ libproxy/modules/pacrunner_mozjs.cpp Sat Aug 10 10:18:18 2013
@@ -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 hostnam
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*
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 @@ class mozjs_pacrunner : public pacrunner { (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

View File

@ -1 +0,0 @@
WPAD/PAC script interpreter for gecko-based browsers using libproxy.

View File

@ -1 +1 @@
WPAD/PAC script interpreter for webkit-based browsers using libproxy.
WPAD/PAC JS interpreter for libproxy.

View File

@ -1,2 +0,0 @@
@comment $OpenBSD: PLIST-mozilla,v 1.3 2012/10/14 20:01:38 sthen Exp $
lib/libproxy/${VERSION}/modules/pacrunner_mozjs.so