From 851198b1093d7fa1ca65650da57fc3f9ecbd570f Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Dec 06 2023 22:08:24 +0000 Subject: Version 5.20.2 ... (rhbz#2252916) --- diff --git a/libsbml.spec b/libsbml.spec index 23ace6f..e7e17d9 100644 --- a/libsbml.spec +++ b/libsbml.spec @@ -34,13 +34,12 @@ Obsoletes: libsbml-sharp < 0:5.18.0-20 %global _docdir_fmt %{name} Name: libsbml -Version: 5.19.0 +Version: 5.20.2 Release: %autorelease Summary: Systems Biology Markup Language library License: LGPL-2.1-or-later URL: https://sbml.org/Software/libSBML -Source0: https://sourceforge.net/projects/sbml/files/%{name}/%{version}/stable/libSBML-%{version}-core-plus-packages-src.tar.gz -Source1: https://sourceforge.net/projects/sbml/files/%{name}/%{version}/stable/libSBML-%{version}-render-src.zip +Source: https://github.com/sbmlteam/libsbml/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz # https://bugzilla.redhat.com/show_bug.cgi?id=1632190 Patch0: %{name}-use-system-minizip-cmake.patch @@ -211,34 +210,35 @@ This package contains %{summary}. %endif %prep -%autosetup -n libSBML-%{version}-Source -p1 -unzip -n %{SOURCE1} - -sed -r -i s/DOXYGEN_MAX_VERSION=1.8.11/DOXYGEN_MAX_VERSION=2.0.0/ configure +%autosetup -p1 %if %{with python} -find . -type f -name '*.py' -exec %{__python3} %{_rpmconfigdir}/redhat/pathfix.py -pn -i "%{__python3}" {} \; -python3 -m lib2to3 -f print -w docs/src/filters/ -python3 -m lib2to3 -f next -w docs +find . -type f -name '*.py' -exec %{python3} %{_rpmconfigdir}/redhat/pathfix.py -pn -i "%{python3}" {} \; %endif -grep -e 'This file was automatically generated by SWIG' -r . -l|xargs rm +grep -e 'This file was automatically generated by SWIG' -r -l . | xargs --no-run-if-empty rm -v %if %{with doc} mkdir build-docs cp -a $(ls -1|grep -v build-docs) build-docs/ %endif +sed -r -i 's|(set\(PERL_PACKAGE_INSTALL_DIR.*/perl5)/site_perl.*\)|\1/vendor_perl)|' src/bindings/perl/CMakeLists.txt +sed -r -i 's|(set\(RUBY_PACKAGE_INSTALL_DIR.*/ruby)/site_ruby.*\)|\1/vendor_ruby)|' src/bindings/ruby/CMakeLists.txt + %build mkdir -p build -%{set_build_flags} + +# silence some warnings which are only relevant to upstream developers +export CXXFLAGS="$CXXFLAGS -Wno-overloaded-virtual -Wno-unused-variable -Wno-unused-but-set-variable -Wno-switch" + %cmake3 -B build -DENABLE_{LAYOUT,QUAL,COMP,FBC,RENDER,GROUPS,MULTI}=ON \ -DCSHARP_COMPILER:FILEPATH=%{_bindir}/mcs \ %if %{with python} -DWITH_PYTHON:BOOL=ON \ -DPYTHON_INCLUDE_DIR:PATH=%{_includedir}/python%{python3_version}$(python3-config --abiflags) \ -DPYTHON_LIBRARY:FILEPATH=%{_libdir}/libpython%{python3_version}$(python3-config --abiflags).so \ - -DPYTHON_EXECUTABLE:FILEPATH=%{__python3} \ + -DPYTHON_EXECUTABLE:FILEPATH=%{python3} \ -DPYTHON_USE_DYNAMIC_LOOKUP:BOOL=ON \ %endif %if %{with perl} @@ -297,7 +297,7 @@ pushd build-docs --with-doxygen \ %endif %if %{with python} - --with-python --with-python-interpreter=%{__python3} \ + --with-python --with-python-interpreter=%{python3} \ %endif --enable-layout --enable-comp --enable-fbc --enable-qual @@ -339,6 +339,9 @@ mv %{buildroot}%{_pkgdocdir}-%{version} %{buildroot}%{_pkgdocdir} install -Dm0644 src/bindings/ruby/README.txt %{buildroot}%{_pkgdocdir}/README-ruby.txt %endif +# WTF? +rm -fv %buildroot/%{_datadir}/cmake/Modules/Find{BZ2,LIBXML,ZLIB}.cmake + %if %{with check} %check pushd build @@ -361,6 +364,7 @@ popd %{_libdir}/*.so %{_libdir}/libsbml-static.a %{_libdir}/cmake/sbml-*.cmake +%{_datadir}/cmake/Modules/FindLIBSBML.cmake %{_libdir}/pkgconfig/%{name}.pc %if %{with python}