From 7417b32a9b0106daa0e9f182dad3dcdeb93d26ce Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Thu, 28 Jun 2018 16:26:25 +0100 Subject: [PATCH] Narrow swig-disabling to just Python bindings. --- subversion.spec | 65 ++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 36 deletions(-) diff --git a/subversion.spec b/subversion.spec index 74bed82..a9ed3dd 100644 --- a/subversion.spec +++ b/subversion.spec @@ -5,9 +5,7 @@ %bcond_with python3 %bcond_without bdb %bcond_without tests -# Note that '--without swig' only suppresses generation of subpackages -# with swig bindings, it is still used during the build process. -%bcond_without swig +%bcond_without pyswig %ifarch %{power64} s390x %global with_java 0 @@ -29,15 +27,17 @@ %if %{with python2} %global svn_python_sitearch %{python2_sitearch} %global svn_python %{__python2} +%global svn_python_br python2-devel %else %global svn_python_sitearch %{python3_sitearch} %global svn_python %{__python3} +%global svn_python_br python3-devel %endif Summary: A Modern Concurrent Version Control System Name: subversion Version: 1.10.0 -Release: 6%{?dist} +Release: 7%{?dist} License: ASL 2.0 Group: Development/Tools URL: https://subversion.apache.org/ @@ -61,6 +61,7 @@ BuildRequires: swig >= 1.3.24, gettext %if %{with bdb} BuildRequires: libdb-devel >= 4.1.25 %endif +BuildRequires: %{svn_python_br} BuildRequires: apr-devel >= 1.3.0, apr-util-devel >= 1.3.0 BuildRequires: libserf-devel >= 1.3.0, cyrus-sasl-devel BuildRequires: sqlite-devel >= 3.4.0, file-devel, systemd-units @@ -99,27 +100,27 @@ Conflicts: libserf%{?_isa} < 1.3.0 The subversion-libs package includes the essential shared libraries used by the Subversion version control tools. -%if %{with python2} +%if %{with python2} && %{with pyswig} %package -n python2-subversion %{?python_provide:%python_provide python2-subversion} # Remove before F30 Provides: %{name}-python = %{version}-%{release} Provides: %{name}-python%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python < %{version}-%{release} -BuildRequires: python2, python2-devel +BuildRequires: python2-devel Group: Development/Libraries Summary: Python bindings for Subversion Version Control system %description -n python2-subversion The python2-subversion package includes the Python 2.x bindings to the Subversion libraries. -%else - +%endif +%if %{with python3} && %{with pyswig} %package -n python3-subversion %{?python_provide:%python_provide python3-subversion} Group: Development/Libraries Summary: Python bindings for Subversion Version Control system -BuildRequires: python3, python3-devel +BuildRequires: python3-devel %description -n python3-subversion The python3-subversion package includes the Python 3.x bindings to the @@ -169,7 +170,6 @@ BuildRequires: httpd-devel >= 2.0.45 The mod_dav_svn package allows access to a Subversion repository using HTTP, via the Apache httpd server. -%if %{with swig} %package perl Group: Development/Libraries Summary: Perl bindings to the Subversion libraries @@ -180,7 +180,6 @@ Requires: subversion%{?_isa} = %{version}-%{release} %description perl This package includes the Perl bindings to the Subversion libraries. -%endif %if %{with_java} %package javahl @@ -255,12 +254,7 @@ export CC=gcc CXX=g++ JAVA_HOME=%{jdk_path} %configure --with-apr=%{_prefix} --with-apr-util=%{_prefix} \ --disable-debug \ -%if %{with swig} - --with-swig \ -%else - --without-swig \ -%endif - --with-serf=%{_prefix} \ + --with-swig --with-serf=%{_prefix} \ --with-ruby-sitedir=%{ruby_vendorarchdir} \ --with-ruby-test-verbose=verbose \ --with-apxs=%{_httpd_apxs} --disable-mod-activation \ @@ -282,10 +276,10 @@ export CC=gcc CXX=g++ JAVA_HOME=%{jdk_path} %endif || (cat config.log; exit 1) make %{?_smp_mflags} all tools -%if %{with swig} +%if %{with pyswig} make swig-py swig-py-lib %{swigdirs} -make swig-pl swig-pl-lib swig-rb swig-rb-lib %endif +make swig-pl swig-pl-lib swig-rb swig-rb-lib %if %{with_java} # javahl-javah does not parallel-make with javahl #make javahl-java javahl-javah @@ -294,12 +288,12 @@ make javahl %install make install DESTDIR=$RPM_BUILD_ROOT -%if %{with swig} -make install-swig-py install-swig-pl-lib install-swig-rb \ - DESTDIR=$RPM_BUILD_ROOT %{swigdirs} +%if %{with pyswig} +make install-swig-py %{swigdirs} DESTDIR=$RPM_BUILD_ROOT +%endif +make install-swig-pl-lib install-swig-rb DESTDIR=$RPM_BUILD_ROOT make pure_vendor_install -C subversion/bindings/swig/perl/native \ PERL_INSTALL_ROOT=$RPM_BUILD_ROOT -%endif %if %{with_java} make install-javahl-java install-javahl-lib javahl_javadir=%{_javadir} DESTDIR=$RPM_BUILD_ROOT %endif @@ -329,7 +323,6 @@ rm -rf ${RPM_BUILD_ROOT}%{_includedir}/subversion-*/*.txt \ # since nothing should ever link against them directly. rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsvn_auth_*.so -%if %{with swig} # remove stuff produced with Perl modules find $RPM_BUILD_ROOT -type f \ -a \( -name .packlist -o \( -name '*.bs' -a -empty \) \) \ @@ -344,7 +337,6 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsvn_swig_*.{so,la,a} # Remove unnecessary ruby libraries rm -f ${RPM_BUILD_ROOT}%{ruby_vendorarchdir}/svn/ext/*.*a -%endif # Trim what goes in docdir rm -rvf tools/*/*.in tools/hook-scripts/mailer/tests @@ -426,9 +418,13 @@ if ! make check CLEANUP=yes; then cat fails.log exit 1 fi -%if %{with swig} -if ! make check-swig-pl check-swig-py check-swig-rb CLEANUP=yes; then - : Swig testing failure. +if ! make check-swig-pl check-swig-rb; then + : Swig test failure. + exit 1 +fi +%if %{with pyswig} +if ! make check-swig-py; then + : Python swig test failure. exit 1 fi %endif @@ -451,7 +447,6 @@ make check-javahl %postun libs -p /sbin/ldconfig -%if %{with swig} %post perl -p /sbin/ldconfig %postun perl -p /sbin/ldconfig @@ -459,7 +454,6 @@ make check-javahl %post ruby -p /sbin/ldconfig %postun ruby -p /sbin/ldconfig -%endif %if %{with_java} %post javahl -p /sbin/ldconfig @@ -491,10 +485,8 @@ make check-javahl %{!?_licensedir:%global license %%doc} %license LICENSE NOTICE %{_libdir}/libsvn*.so.* -%if %{with swig} %exclude %{_libdir}/libsvn_swig_perl* %exclude %{_libdir}/libsvn_swig_ruby* -%endif %if %{with_java} %{_libdir}/libsvnjavahl-*.so %endif @@ -503,13 +495,13 @@ make check-javahl %endif %exclude %{_libdir}/libsvn_auth_gnome* -%if %{with python2} && %{with swig} +%if %{with python2} && %{with pyswig} %files -n python2-subversion %{python2_sitearch}/svn %{python2_sitearch}/libsvn %endif -%if %{with python3} && %{with swig} +%if %{with python3} && %{with pyswig} %files -n python3-subversion %{python3_sitearch}/svn %{python3_sitearch}/libsvn @@ -538,7 +530,6 @@ make check-javahl %doc example.conf %endif -%if %{with swig} %files perl %{perl_vendorarch}/auto/SVN %{perl_vendorarch}/SVN @@ -548,7 +539,6 @@ make check-javahl %files ruby %{_libdir}/libsvn_swig_ruby* %{ruby_vendorarchdir}/svn -%endif %if %{with_java} %files javahl @@ -556,6 +546,9 @@ make check-javahl %endif %changelog +* Thu Jun 28 2018 Joe Orton - 1.10.0-7 +- switch build conditional to disable only python bindings + * Thu May 3 2018 Joe Orton - 1.10.0-6 - really disable Berkeley DB support if required by bcond - add build conditional to disable swig binding subpackages