From e858c055dfeb4a52944a3a7eef359a74bd633dc7 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Jul 20 2022 22:21:24 +0000 Subject: Replace WebKitGTK pacrunner backend with duktape --- diff --git a/libproxy.spec b/libproxy.spec index d30e1a2..95bd56d 100644 --- a/libproxy.spec +++ b/libproxy.spec @@ -1,10 +1,9 @@ # When we are bootstrapping, we drop some dependencies. -# Set this to 0 after bootstrapping. -%{!?_with_bootstrap: %global bootstrap 0} +%bcond_with bootstrap Name: libproxy Version: 0.4.18 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A library handling all the details of proxy configuration License: LGPLv2+ @@ -13,28 +12,20 @@ Source0: https://github.com/libproxy/%{name}/releases/download/%{version} # Taken from the Debian package. Source1: proxy.1 -Patch01: webkitdep.patch - BuildRequires: cmake >= 2.6.0 BuildRequires: gcc-c++ -%if ! 0%{?bootstrap} +%if %{without bootstrap} # gnome BuildRequires: pkgconfig(gio-2.0) >= 2.26 # NetworkManager BuildRequires: pkgconfig(libnm) -# pacrunner (and NetworkManager) +# ConnMan's pacrunner (and NetworkManager) BuildRequires: pkgconfig(dbus-1) -# webkit (gtk3) -BuildRequires: pkgconfig(javascriptcoregtk-4.1) +# for libproxy's duktape pacrunner +BuildRequires: pkgconfig(duktape) # Python BuildRequires: python3-devel -%else -# Obsoletes of disabled subpackages. -Provides: %{name}-mozjs = %{version}-%{release} -Obsoletes: %{name}-mozjs < %{version}-%{release} -Provides: %{name}-webkitgtk4 = %{version}-%{release} -Obsoletes: %{name}-webkitgtk4 < %{version}-%{release} %endif @@ -44,7 +35,7 @@ libproxy offers the following features: * extremely small core footprint (< 35K) * no external dependencies within libproxy core (libproxy plugins may have dependencies) - * only 3 functions in the stable external API + * only 4 functions in the stable external API * dynamic adjustment to changing network topology * a standard way of dealing with proxy settings across all scenarios * a sublime sense of joy and accomplishment @@ -57,7 +48,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description bin The %{name}-bin package contains the proxy binary for %{name} -%if ! 0%{?bootstrap} +%if %{without bootstrap} %package -n python3-%{name} Summary: Binding for %{name} and python3 Requires: %{name} = %{version}-%{release} @@ -92,15 +83,16 @@ Requires: %{name}%{?_isa} = %{version}-%{release} The %{name}-networkmanager package contains the %{name} plugin for networkmanager. -%package webkitgtk4 -Summary: Plugin for %{name} and webkitgtk3 +%package duktape +Summary: Plugin for %{name} and duktape Requires: %{name}%{?_isa} = %{version}-%{release} Provides: %{name}-pac = %{version}-%{release} Obsoletes: %{name}-mozjs <= %{version}-%{release} +Obsoletes: %{name}-webkitgtk4 <= %{version}-%{release} -%description webkitgtk4 -The %{name}-webkitgtk4 package contains the %{name} plugin for -webkitgtk3. +%description duktape +The %{name}-duktape package contains the %{name} plugin for +duktape. %package pacrunner Summary: Plugin for %{name} and PacRunner @@ -110,7 +102,7 @@ Requires: pacrunner %description pacrunner The %{name}-pacrunner package contains the %{name} plugin for -PacRunner. +ConnMan's PacRunner. %endif @@ -131,22 +123,28 @@ export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS" %cmake \ -DMODULE_INSTALL_DIR=%{_libdir}/%{name}/%{version}/modules \ -DBIPR=OFF \ + -DWITH_GNOME=OFF \ + -DWITH_MOZJS=OFF \ + -DWITH_PERL=OFF \ + -DWITH_PYTHON2=OFF \ + -DWITH_WEBKIT=OFF \ + -DWITH_WEBKIT3=OFF \ +%if %{without bootstrap} + -DWITH_DUKTAPE=ON \ + -DWITH_GNOME3=ON \ + -DWITH_PYTHON3=ON \ %if 0%{?fedora} -DWITH_KDE=ON \ %else -DWITH_KDE=OFF \ %endif - -DWITH_MOZJS=OFF \ - -DWITH_PERL=OFF \ -%if ! 0%{?bootstrap} - -DWITH_GNOME3=ON \ - -DWITH_PYTHON2=OFF \ - -DWITH_PYTHON3=ON \ - -DWITH_WEBKIT3=ON %else - -DWITH_PYTHON2=OFF \ - -DWITH_PYTHON3=OFF + -DWITH_DUKTAPE=OFF \ + -DWITH_KDE=OFF \ + -DWITH_GNOME3=OFF \ + -DWITH_PYTHON3=OFF \ %endif + %{nil} %cmake_build @@ -178,11 +176,14 @@ install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 %{_bindir}/proxy %{_mandir}/man1/proxy.1* -%if ! 0%{?bootstrap} +%if %{without bootstrap} %files -n python3-%{name} %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{name}.* +%files duktape +%{_libdir}/%{name}/%{version}/modules/pacrunner_duktape.so + %files gnome %{_libdir}/%{name}/%{version}/modules/config_gnome3.so %{_libexecdir}/pxgsettings @@ -195,9 +196,6 @@ install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 %files networkmanager %{_libdir}/%{name}/%{version}/modules/network_networkmanager.so -%files webkitgtk4 -%{_libdir}/%{name}/%{version}/modules/pacrunner_webkit.so - %files pacrunner %{_libdir}/%{name}/%{version}/modules/config_pacrunner.so %endif @@ -210,6 +208,9 @@ install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 %changelog +* Wed Jul 20 2022 Michael Catanzaro - 0.4.18-3 +- Replace WebKitGTK pacrunner backend with duktape + * Tue Jul 19 2022 Milan Crha - 0.4.18-2 - Change WebKitGTK API dependency to 4.1 (using libsoup3) diff --git a/webkitdep.patch b/webkitdep.patch deleted file mode 100644 index 7c1c8b1..0000000 --- a/webkitdep.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up libproxy-0.4.18/libproxy/cmake/modules/pacrunner_webkit.cmk.1 libproxy-0.4.18/libproxy/cmake/modules/pacrunner_webkit.cmk ---- libproxy-0.4.18/libproxy/cmake/modules/pacrunner_webkit.cmk.1 2022-07-19 15:50:24.029762425 +0200 -+++ libproxy-0.4.18/libproxy/cmake/modules/pacrunner_webkit.cmk 2022-07-19 15:50:27.977762571 +0200 -@@ -13,11 +13,14 @@ elseif(APPLE) - endif() - else() - if(WITH_WEBKIT3) -- px_check_modules(WEBKIT "javascriptcoregtk-4.0") -+ px_check_modules(WEBKIT "javascriptcoregtk-4.1") - if(NOT WEBKIT_LIBRARIES) -- px_check_modules(WEBKIT "javascriptcoregtk-3.0 >= 1.5.0") -+ px_check_modules(WEBKIT "javascriptcoregtk-4.0") - if(NOT WEBKIT_LIBRARIES) -- px_check_modules(WEBKIT "webkitgtk-3.0 < 1.5.0") -+ px_check_modules(WEBKIT "javascriptcoregtk-3.0 >= 1.5.0") -+ if(NOT WEBKIT_LIBRARIES) -+ px_check_modules(WEBKIT "webkitgtk-3.0 < 1.5.0") -+ endif(NOT WEBKIT_LIBRARIES) - endif(NOT WEBKIT_LIBRARIES) - endif(NOT WEBKIT_LIBRARIES) - else(WITH_WEBKIT)