From e902cd2e029d04605c51c494019b33fe592a26ca0768e866a505b8cb27d237d1 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Wed, 27 Jul 2011 22:05:24 +0000 Subject: [PATCH] Accepting request 77223 from home:vuntz:branches:GNOME:Factory Stop using xulrunner OBS-URL: https://build.opensuse.org/request/show/77223 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libproxy?expand=0&rev=67 --- libproxy-mozjs185.patch | 31 +++++++++++++++++++++++++++++++ libproxy-plugins.changes | 14 ++++++++++++++ libproxy-plugins.spec | 34 ++++++++++++---------------------- libproxy.changes | 14 ++++++++++++++ libproxy.spec | 30 ++++++++++-------------------- 5 files changed, 81 insertions(+), 42 deletions(-) create mode 100644 libproxy-mozjs185.patch diff --git a/libproxy-mozjs185.patch b/libproxy-mozjs185.patch new file mode 100644 index 0000000..6b77824 --- /dev/null +++ b/libproxy-mozjs185.patch @@ -0,0 +1,31 @@ +Index: libproxy-0.4.7/libproxy/cmake/modules/pacrunner_mozjs.cmk +=================================================================== +--- libproxy-0.4.7.orig/libproxy/cmake/modules/pacrunner_mozjs.cmk ++++ libproxy-0.4.7/libproxy/cmake/modules/pacrunner_mozjs.cmk +@@ -7,19 +7,15 @@ if(WIN32) + include_directories("${MOZJS_INCLUDE_DIR}") + endif() + elseif(NOT APPLE) +- set(MOZJS_SEARCH_ORDER "mozilla-js;xulrunner-js;firefox-js;seamonkey-js" CACHE STRING "MozJS search order") + option(WITH_MOZJS "Search for MOZJS package" ON) + if (WITH_MOZJS) +- foreach(MOZJSLIB ${MOZJS_SEARCH_ORDER}) +- pkg_search_module(MOZJS ${MOZJSLIB}>=2.0b12) +- if(MOZJS_FOUND) +- include_directories(${MOZJS_INCLUDE_DIRS}) +- link_directories(${MOZJS_LIBRARY_DIRS}) +- break() +- else() +- set(MOZJS_FOUND 0) +- endif() +- endforeach() ++ pkg_search_module(MOZJS mozjs185>=1.8.5) ++ if(MOZJS_FOUND) ++ include_directories(${MOZJS_INCLUDE_DIRS}) ++ link_directories(${MOZJS_LIBRARY_DIRS}) ++ else() ++ set(MOZJS_FOUND 0) ++ endif() + else() + set(MOZJS_FOUND 0) + endif() diff --git a/libproxy-plugins.changes b/libproxy-plugins.changes index 9c1ee30..c2ad0d9 100644 --- a/libproxy-plugins.changes +++ b/libproxy-plugins.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Jul 27 14:53:34 CEST 2011 - vuntz@opensuse.org + +- Build against js instead of xulrunner: + + Add libproxy-mozjs185.patch: taken from upstream, detect + mozjs185 instead of xulrunner in the build system. + + Add pkgconfig(mozjs185) BuildRequires and remove + mozilla-xulrunner-devel BuildRequires. + + Change Supplements of libproxy1-pacrunner-mozjs to use + libmozjs185-1_0 instead of mozilla-xulrunner. +- Change Supplements of libproxy1-pacrunner-webkit to appropriately + use libjavascriptcoregtk-1_0-0/libjavascriptcoregtk-3_0-0 + (depending on %favor_gtk2) instead of libwebkitgtk-0. + ------------------------------------------------------------------- Mon Jun 20 18:26:49 UTC 2011 - dimstar@opensuse.org diff --git a/libproxy-plugins.spec b/libproxy-plugins.spec index 5022c71..40b73be 100644 --- a/libproxy-plugins.spec +++ b/libproxy-plugins.spec @@ -1,5 +1,5 @@ # -# spec file for package libproxy-plugins +# spec file for package libproxy # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -23,19 +23,6 @@ %define have_mono 0 %endif -%if 0%{?suse_version} > 1130 -%define xulrunner_ver 20 -%else -%if 0%{?suse_version} > 1120 -%define xulrunner_ver 192 -%else -%if 0%{?suse_version} > 1110 -%define xulrunner_ver 191 -%else -%define xulrunner_ver 190 -%endif -%endif -%endif Url: http://code.google.com/p/libproxy/ %define _name libproxy @@ -43,7 +30,7 @@ Name: libproxy-plugins Group: System/Libraries Summary: Libproxy provides consistent proxy configuration to applications Version: 0.4.7 -Release: 2 +Release: 3 %if 0%{?build_snapshot} %define _sourcename %{_name} %else @@ -55,6 +42,8 @@ Source98: update-from-svn.sh Source99: baselibs.conf # PATCH-FIX-UPSTREAM libproxy-javascriptcoregtk.patch dimstar@opensuse.org -- Fix build with javascriptcoregtk3, which got split out of webkitgtk3. Patch from upstream svn. Patch0: libproxy-javascriptcoregtk.patch +# PATCH-FIX-UPSTREAM libproxy-mozjs185.patch vuntz@opensuse.org -- Build with libmozjs185 instead of xulrunner. Patch from upstream svn. +Patch1: libproxy-mozjs185.patch License: GPLv2+ ; LGPLv2.1+ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake @@ -78,11 +67,7 @@ BuildRequires: pkgconfig(gio-2.0) >= 2.26 BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(webkitgtk-3.0) %endif -%if 0%{?suse_version} -BuildRequires: mozilla-xulrunner%{xulrunner_ver}-devel -%else -BuildRequires: xulrunner-devel -%endif +BuildRequires: pkgconfig(mozjs185) BuildRequires: NetworkManager-devel BuildRequires: libkde4-devel BuildRequires: libqt4-devel @@ -280,7 +265,7 @@ Summary: Libproxy module to support wpad/pac parsing via Mozilla JavaScri Group: System/Libraries Requires: libproxy1 = %{version} %if 0%{?suse_version} -Supplements: packageand(libproxy1:mozilla-xulrunner%{xulrunner_ver}) +Supplements: packageand(libproxy1:libmozjs185-1_0) %endif # A virtual symbol to identify that this is a pacrunner. Provides: libproxy1-pacrunner = %{version} @@ -296,7 +281,11 @@ Summary: Libproxy module to support WPAD/PAC parsing via WebKit JavaScrip Group: System/Libraries Requires: libproxy1 = %{version} %if 0%{?suse_version} -Supplements: packageand(libproxy1:libwebkitgtk-0) +%if 0%{?favor_gtk2} +Supplements: packageand(libproxy1:libjavascriptcoregtk-1_0-0) +%else +Supplements: packageand(libproxy1:libjavascriptcoregtk-3_0-0) +%endif %endif # A virtual symbol to identify that this is a pacrunner. Provides: libproxy1-pacrunner = %{version} @@ -323,6 +312,7 @@ about network configuration changes. %prep %setup -q -n %{_sourcename} %patch0 -p0 +%patch1 -p1 mkdir build %build diff --git a/libproxy.changes b/libproxy.changes index 9c1ee30..c2ad0d9 100644 --- a/libproxy.changes +++ b/libproxy.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Jul 27 14:53:34 CEST 2011 - vuntz@opensuse.org + +- Build against js instead of xulrunner: + + Add libproxy-mozjs185.patch: taken from upstream, detect + mozjs185 instead of xulrunner in the build system. + + Add pkgconfig(mozjs185) BuildRequires and remove + mozilla-xulrunner-devel BuildRequires. + + Change Supplements of libproxy1-pacrunner-mozjs to use + libmozjs185-1_0 instead of mozilla-xulrunner. +- Change Supplements of libproxy1-pacrunner-webkit to appropriately + use libjavascriptcoregtk-1_0-0/libjavascriptcoregtk-3_0-0 + (depending on %favor_gtk2) instead of libwebkitgtk-0. + ------------------------------------------------------------------- Mon Jun 20 18:26:49 UTC 2011 - dimstar@opensuse.org diff --git a/libproxy.spec b/libproxy.spec index 37077b6..a5a3784 100644 --- a/libproxy.spec +++ b/libproxy.spec @@ -23,19 +23,6 @@ %define have_mono 0 %endif -%if 0%{?suse_version} > 1130 -%define xulrunner_ver 20 -%else -%if 0%{?suse_version} > 1120 -%define xulrunner_ver 192 -%else -%if 0%{?suse_version} > 1110 -%define xulrunner_ver 191 -%else -%define xulrunner_ver 190 -%endif -%endif -%endif Url: http://code.google.com/p/libproxy/ %define _name libproxy @@ -55,6 +42,8 @@ Source98: update-from-svn.sh Source99: baselibs.conf # PATCH-FIX-UPSTREAM libproxy-javascriptcoregtk.patch dimstar@opensuse.org -- Fix build with javascriptcoregtk3, which got split out of webkitgtk3. Patch from upstream svn. Patch0: libproxy-javascriptcoregtk.patch +# PATCH-FIX-UPSTREAM libproxy-mozjs185.patch vuntz@opensuse.org -- Build with libmozjs185 instead of xulrunner. Patch from upstream svn. +Patch1: libproxy-mozjs185.patch License: GPLv2+ ; LGPLv2.1+ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake @@ -78,11 +67,7 @@ BuildRequires: pkgconfig(gio-2.0) >= 2.26 BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(webkitgtk-3.0) %endif -%if 0%{?suse_version} -BuildRequires: mozilla-xulrunner%{xulrunner_ver}-devel -%else -BuildRequires: xulrunner-devel -%endif +BuildRequires: pkgconfig(mozjs185) BuildRequires: NetworkManager-devel BuildRequires: libkde4-devel BuildRequires: libqt4-devel @@ -280,7 +265,7 @@ Summary: Libproxy module to support wpad/pac parsing via Mozilla JavaScri Group: System/Libraries Requires: libproxy1 = %{version} %if 0%{?suse_version} -Supplements: packageand(libproxy1:mozilla-xulrunner%{xulrunner_ver}) +Supplements: packageand(libproxy1:libmozjs185-1_0) %endif # A virtual symbol to identify that this is a pacrunner. Provides: libproxy1-pacrunner = %{version} @@ -296,7 +281,11 @@ Summary: Libproxy module to support WPAD/PAC parsing via WebKit JavaScrip Group: System/Libraries Requires: libproxy1 = %{version} %if 0%{?suse_version} -Supplements: packageand(libproxy1:libwebkitgtk-0) +%if 0%{?favor_gtk2} +Supplements: packageand(libproxy1:libjavascriptcoregtk-1_0-0) +%else +Supplements: packageand(libproxy1:libjavascriptcoregtk-3_0-0) +%endif %endif # A virtual symbol to identify that this is a pacrunner. Provides: libproxy1-pacrunner = %{version} @@ -323,6 +312,7 @@ about network configuration changes. %prep %setup -q -n %{_sourcename} %patch0 -p0 +%patch1 -p1 mkdir build %build