From 5fe0c8fce39d17af392de7d5112d93a5a2ef80a5 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Feb 17 2015 22:02:28 +0000 Subject: Remove old swig files and use separate dir for docs Add a workaround which prevents a crash in ruby tests. Instead of simply disabling the ruby bindings, I'm leaving them enabled to see if there are further problems. If they are really unusable, they can be disabled later. Parallel tests should finally work. --- diff --git a/libsbml.spec b/libsbml.spec index 18f62d1..672831d 100644 --- a/libsbml.spec +++ b/libsbml.spec @@ -202,6 +202,11 @@ sed -i -r 's|(#!/usr/bin/env python) +#.*|#!%{__python2}|' docs/src/filters/doc- # Delete bundled minizip rm -v src/sbml/compress/{crypt.h,ioapi.*,iowin32.*,unzip.*,zip.*} +grep -e 'This file was automatically generated by SWIG' -r . -l|xargs rm + +mkdir build-docs +cp -a $(/bin/ls -1|grep -v build-docs) build-docs/ + %build mkdir build2 build pushd build2 @@ -268,10 +273,9 @@ pushd ../build -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -Wno-dev \ .. -# Parallel compilation of java bindings fails -make +make %{?_smp_mflags} -pushd .. +pushd ../build-docs %configure --disable-static \ %if %{with doc} --with-doxygen \ @@ -281,6 +285,7 @@ pushd .. %endif --enable-layout --enable-comp --enable-fbc --enable-qual %if %{with doc} +cp ../build/src/bindings/python/libsbml-doxygen.py src/bindings/python/ make %{?_smp_mflags} docs %endif make %{?_smp_mflags} libsbml.pc @@ -308,10 +313,10 @@ rm -rf %{buildroot}%{_libdir}/R/library/%{rpkg}/R.css %endif %if %{with doc} -make install-docs DESTDIR=%{buildroot} +make -C build-docs install-docs DESTDIR=%{buildroot} mv %{buildroot}%{_pkgdocdir}-%{version} %{buildroot}%{_pkgdocdir} %endif -make install-pc DESTDIR=%{buildroot} +make -C build-docs install-pc DESTDIR=%{buildroot} %if %{with ruby} install -Dm0644 src/bindings/ruby/README.txt %{buildroot}%{_pkgdocdir}/README-ruby.txt @@ -320,9 +325,15 @@ install -Dm0644 src/bindings/ruby/README.txt %{buildroot}%{_pkgdocdir}/README-ru %if %{with check} %check %if %{with python} -make -C build2 check CTEST_OUTPUT_ON_FAILURE=TRUE -%endif -make -C build check CTEST_OUTPUT_ON_FAILURE=TRUE +pushd build2 +ctest -V %{?_smp_mflags} +popd +%endif +pushd build +# https://sourceforge.net/p/sbml/libsbml/399/ +sed -i '3i GC.disable' src/bindings/ruby/test/test.rb +ctest -V %{?_smp_mflags} +popd %endif %post -p /sbin/ldconfig