From 5603d68326d2cf2339bb15a45ccd9804f7af3b29 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sun, 12 Feb 2023 23:05:30 +0800 Subject: [PATCH] Use duktape instead of webkitgtk as js engine --- libproxy.spec | 77 ++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 41 deletions(-) diff --git a/libproxy.spec b/libproxy.spec index c507eed..999faff 100644 --- a/libproxy.spec +++ b/libproxy.spec @@ -1,5 +1,6 @@ -%define anolis_release 1 -%{!?_with_bootstrap: %global bootstrap 0} +%define anolis_release 2 +# When we are bootstrapping, we drop some dependencies. +%bcond_with bootstrap Name: libproxy Version: 0.4.18 @@ -15,23 +16,17 @@ Source1: proxy.1 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.0) +# 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 @@ -41,7 +36,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 @@ -62,7 +57,7 @@ Requires: %{name} = %{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} @@ -79,7 +74,6 @@ Requires: %{name} = %{version}-%{release} %description gnome The %{name}-gnome package contains the %{name} plugin for gnome. - %package networkmanager Summary: Plugin for %{name} and networkmanager Requires: %{name} = %{version}-%{release} @@ -88,15 +82,16 @@ Requires: %{name} = %{version}-%{release} The %{name}-networkmanager package contains the %{name} plugin for networkmanager. -%package webkitgtk4 -Summary: Plugin for %{name} and webkitgtk3 -Requires: %{name} = %{version}-%{release} -Provides: %{name}-pac = %{version}-%{release} -Obsoletes: %{name}-mozjs <= %{version}-%{release} +%package duktape +Summary: Plugin for %{name} and duktape +Requires: %{name} = %{version}-%{release} +Provides: %{name}-pac = %{version}-%{release} +Obsoletes: %{name}-mozjs <= %{EVR} +Obsoletes: %{name}-webkitgtk4 <= %{EVR} -%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 @@ -106,10 +101,9 @@ Requires: pacrunner %description pacrunner The %{name}-pacrunner package contains the %{name} plugin for -PacRunner. +ConnMan's PacRunner. %endif - %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} @@ -121,28 +115,30 @@ developing applications that use %{name}. %prep %autosetup -p1 - %build export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS" -%{cmake} \ +%cmake \ -DMODULE_INSTALL_DIR=%{_libdir}/%{name}/%{version}/modules \ -DBIPR=OFF \ - -DWITH_KDE=OFF \ + -DWITH_GNOME=OFF \ -DWITH_MOZJS=OFF \ -DWITH_PERL=OFF \ -%if ! 0%{?bootstrap} - -DWITH_GNOME3=ON \ -DWITH_PYTHON2=OFF \ + -DWITH_WEBKIT=OFF \ + -DWITH_WEBKIT3=OFF \ + -DWITH_KDE=OFF \ +%if %{without bootstrap} + -DWITH_DUKTAPE=ON \ + -DWITH_GNOME3=ON \ -DWITH_PYTHON3=ON \ - -DWITH_WEBKIT3=ON \ %else - -DWITH_PYTHON2=OFF \ + -DWITH_DUKTAPE=OFF \ + -DWITH_GNOME3=OFF \ -DWITH_PYTHON3=OFF \ %endif - . + %{nil} %cmake_build - %install %cmake_install @@ -156,9 +152,6 @@ install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 %check %ctest -%ldconfig_scriptlets - - %files %license COPYING %{_libdir}/*.so.* @@ -173,7 +166,7 @@ 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}.* @@ -182,12 +175,11 @@ install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 %{_libdir}/%{name}/%{version}/modules/config_gnome3.so %{_libexecdir}/pxgsettings - %files networkmanager %{_libdir}/%{name}/%{version}/modules/network_networkmanager.so -%files webkitgtk4 -%{_libdir}/%{name}/%{version}/modules/pacrunner_webkit.so +%files duktape +%{_libdir}/%{name}/%{version}/modules/pacrunner_duktape.so %files pacrunner %{_libdir}/%{name}/%{version}/modules/config_pacrunner.so @@ -201,6 +193,9 @@ install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 %changelog +* Sun Feb 12 2023 Funda Wang - 0.4.18-2 +- Use duktape instead of webkitgtk as js engine + * Wed Sep 21 2022 mgb01105731 - 0.4.18-1 - update to 0.4.18 -- Gitee