[packages/subversion] - added sh patch (adjust swig version checks for non-bash shells) - moved to ctypesgen 1.0.x

qboosh qboosh at pld-linux.org
Sat Jul 3 21:52:42 CEST 2021


commit 1aac8b6c99f6b91b324f27c9fe961550012ec59e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jul 3 21:55:52 2021 +0200

    - added sh patch (adjust swig version checks for non-bash shells)
    - moved to ctypesgen 1.0.x

 subversion-sh.patch | 16 ++++++++++++
 subversion.spec     | 73 ++++++++++++++++++++++++++++-------------------------
 2 files changed, 55 insertions(+), 34 deletions(-)
---
diff --git a/subversion.spec b/subversion.spec
index ddabf95..fd0e28f 100644
--- a/subversion.spec
+++ b/subversion.spec
@@ -1,3 +1,4 @@
+# TODO: python3 module (using swig >= 4.0.0) instead of python2
 #
 # Conditional build:
 %bcond_with	net_client_only		# build only net client
@@ -68,6 +69,7 @@ Patch1:		%{name}-DESTDIR.patch
 Patch2:		%{name}-ruby-datadir-path.patch
 Patch3:		%{name}-tests.patch
 Patch4:		x32-libdir.patch
+Patch5:		%{name}-sh.patch
 URL:		http://subversion.apache.org/
 %{?with_apache:BuildRequires:	apache-devel >= 2.4.14}
 BuildRequires:	apr-devel >= 1:1.4
@@ -94,7 +96,9 @@ BuildRequires:	libtool >= 2:2
 BuildRequires:	libutf8proc-devel >= 1.3.1-4
 BuildRequires:	lz4-devel
 BuildRequires:	pkgconfig
-%{?with_csvn:BuildRequires:	python-ctypesgen}
+BuildRequires:	python >= 1:2.7
+%{?with_csvn:BuildRequires:	python-ctypesgen >= 1.0.2}
+BuildRequires:	rpm-build >= 4.6
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.752
 BuildRequires:	sed >= 4.0
@@ -123,7 +127,7 @@ BuildRequires:	rpm-rubyprov
 BuildRequires:	ruby-devel >= 1:1.8.2
 BuildRequires:	ruby-irb
 BuildRequires:	ruby-rubygems
-BuildRequires:	swig-ruby >= 1.3.24
+BuildRequires:	swig-ruby >= 3.0.9
 %endif
 Requires:	%{name}-libs = %{version}-%{release}
 %requires_ge	sqlite3
@@ -451,45 +455,58 @@ uwierzytelniać się przy użyciu Portfela KDE.
 %patch2 -p0
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 sed -i -e 's#serf_prefix/lib#serf_prefix/%{_lib}#g' build/ac-macros/serf.m4
 
 sed -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \
-      tools/backup/hot-backup.py.in \
-      tools/examples/blame.py \
-      tools/examples/check-modified.py \
-      tools/examples/dumpprops.py \
-      tools/examples/get-location-segments.py \
-      tools/examples/getfile.py \
-      tools/examples/geturl.py \
-      tools/examples/putfile.py \
-      tools/examples/revplist.py \
-      tools/examples/svnlook.py \
-      tools/examples/svnshell.py \
-      tools/examples/walk-config-auth.py
+	tools/backup/hot-backup.py.in \
+	tools/examples/blame.py \
+	tools/examples/check-modified.py \
+	tools/examples/dumpprops.py \
+	tools/examples/get-location-segments.py \
+	tools/examples/getfile.py \
+	tools/examples/geturl.py \
+	tools/examples/putfile.py \
+	tools/examples/revplist.py \
+	tools/examples/svnlook.py \
+	tools/examples/svnshell.py \
+	tools/examples/walk-config-auth.py
 
 %build
 # disabled regeneration - subversion 1.6.13 is not ready for swig 2.0.x
 #%{__rm} subversion/bindings/swig/proxy/*.swg
 #cd subversion/bindings/swig && python "%{SOURCE5}" && cd ../../..
 chmod +x ./autogen.sh && ./autogen.sh
-%{__libtoolize}
+#{__libtoolize}
 %configure \
+	--disable-mod-activation \
+	--disable-runtime-module-search \
+	--with-apr=%{_bindir}/apr-1-config \
+	--with-apr-util=%{_bindir}/apu-1-config \
 	--with-editor=vi \
+	--with-serf=%{_prefix} \
 	--with-zlib=%{_libdir} \
-	--disable-runtime-module-search \
-	--disable-mod-activation \
+%if %{with apache}
+	--with-apache-libexecdir="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
+	--with-apxs=%{_sbindir}/apxs \
+%else
+	--without-apxs \
+%endif
 %if %{with db}
 	--with-berkeley-db="db.h:%{_includedir}:%{_libdir}:db" \
 	%{?with_db6:--enable-bdb6} \
 %else
 	--without-berkeley-db \
 %endif
-%if %{with apache}
-	--with-apache-libexecdir="$(%{_sbindir}/apxs -q LIBEXECDIR)" \
-	--with-apxs=%{_sbindir}/apxs \
-%else
-	--without-apxs \
+%if %{with csvn}
+	--with-ctypesgen=%{_bindir}/ctypesgen-2 \
+%endif
+%if %{with gnome}
+	--with-gnome-keyring \
+%endif
+%if %{with kwallet}
+	--with-kwallet \
 %endif
 %if %{without swig}
 	--without-swig \
@@ -504,9 +521,6 @@ chmod +x ./autogen.sh && ./autogen.sh
 %else
 	ac_cv_path_RUBY=none \
 %endif
-%if %{with csvn}
-	--with-ctypesgen=%{_bindir}/ctypesgen.py \
-%endif
 %if %{with java}
 	--enable-javahl \
 	--with-jdk="%{java_home}" \
@@ -514,15 +528,6 @@ chmod +x ./autogen.sh && ./autogen.sh
 %else
 	--disable-javahl \
 %endif
-	--with-serf=%{_prefix} \
-	--with-apr=%{_bindir}/apr-1-config \
-	--with-apr-util=%{_bindir}/apu-1-config \
-%if %{with kwallet}
-	--with-kwallet \
-%endif
-%if %{with gnome}
-	--with-gnome-keyring
-%endif
 
 %{__make} -j1
 
diff --git a/subversion-sh.patch b/subversion-sh.patch
new file mode 100644
index 0000000..b1fbac6
--- /dev/null
+++ b/subversion-sh.patch
@@ -0,0 +1,16 @@
+--- subversion-1.14.1/build/ac-macros/swig.m4.orig	2020-06-27 06:00:12.000000000 +0200
++++ subversion-1.14.1/build/ac-macros/swig.m4	2021-07-03 19:46:27.049456656 +0200
+@@ -83,11 +83,11 @@ AC_DEFUN(SVN_FIND_SWIG,
+     # the minor is zero padded to two places,
+     # and the patch level is zero padded to three places.
+     # e.g. 1.3.24 becomes 103024
+-    SWIG_VERSION="`echo \"$SWIG_VERSION_RAW\" | \
++    SWIG_VERSION="$(echo "$SWIG_VERSION_RAW" | \
+                   $SED -e 's/[[^0-9\.]].*$//' \
+                       -e 's/\.\([[0-9]]\)$/.0\1/' \
+                       -e 's/\.\([[0-9]][[0-9]]\)$/.0\1/' \
+-                      -e 's/\.\([[0-9]]\)\./0\1/; s/\.//g;'`"
++                      -e 's/\.\([[0-9]]\)\./0\1/; s/\.//g;')"
+     AC_MSG_RESULT([$SWIG_VERSION_RAW])
+     # If you change the required swig version number, don't forget to update:
+     #   subversion/bindings/swig/INSTALL
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/subversion.git/commitdiff/1aac8b6c99f6b91b324f27c9fe961550012ec59e



More information about the pld-cvs-commit mailing list