From 64f608749247b76a4240ec398d3e141970ae241e638ea35609a55d7d24a47015 Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Fri, 6 Apr 2018 13:47:12 +0000 Subject: [PATCH 1/2] Accepting request 593224 from home:badshah400:branches:science - Update to version 2.2.0: * Experimental support for modifying the expression tree directly from Python (see e.g. Fourier transforms). * Fix for integration by parts (gh#kpeeters/cadabra2#71) * Fix for incorrect conversion to sympy expressions. * Optionally build with support for Mathematica scalar backend; see map_mma. * Many bugfixes for expression display and sympy conversion. * Now using pybind instead of boost.python, in preparation for * Windows port, and to enable building against Anaconda. * Copy/paste of output cells added. * New simplify command, which simplifies the scalar parts of expressions, and can be switched to use either Sympy or Mathematica. * Fix to treat derivatives with respect to explicit coordinates as scalars in evaluate; see this Q&A post. * Fix for failure to flag errors for WeightInherit property. * Fixed: vary on single-term expressions * (gh#kpeeters/cadabra2#57) * Fixed: evaluate with dense factors and no 'values' property on indices (gh#kpeeters/cadabra2#68) - Rename and rebase cadabra2-2.1.7.patch to cadabra2-add-pthread-to-cxxflags.patch. - Add BuildRequires: libboost_date_time1_66_0-devel, new dependency with version 2.2.0. - All python bindings are now required to be installed in _datadir. - New binary cadabra2cadabra. OBS-URL: https://build.opensuse.org/request/show/593224 OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=19 --- 2.1.7.tar.gz | 3 --- 2.2.0.tar.gz | 3 +++ cadabra2-2.1.7.patch | 12 ---------- cadabra2-add-pthread-to-cxxflags.patch | 13 +++++++++++ cadabra2.changes | 32 ++++++++++++++++++++++++++ cadabra2.spec | 23 ++++++++---------- 6 files changed, 58 insertions(+), 28 deletions(-) delete mode 100644 2.1.7.tar.gz create mode 100644 2.2.0.tar.gz delete mode 100644 cadabra2-2.1.7.patch create mode 100644 cadabra2-add-pthread-to-cxxflags.patch diff --git a/2.1.7.tar.gz b/2.1.7.tar.gz deleted file mode 100644 index 92eec5a..0000000 --- a/2.1.7.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:95866f8af23ad7b166379b1db767484985a0ee87e75d5a8bc03d22708f705f1e -size 4595561 diff --git a/2.2.0.tar.gz b/2.2.0.tar.gz new file mode 100644 index 0000000..ff43a72 --- /dev/null +++ b/2.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e0a408ab8fa611091bc4d776dd44efd730c2651e02e62cfd0251bd1d6b96249 +size 23915602 diff --git a/cadabra2-2.1.7.patch b/cadabra2-2.1.7.patch deleted file mode 100644 index ca5220d..0000000 --- a/cadabra2-2.1.7.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-cadabra2-2.1.7/CMakeLists.txt ./CMakeLists.txt ---- ../orig-cadabra2-2.1.7/CMakeLists.txt 2017-11-19 20:27:27.000000000 +0100 -+++ ./CMakeLists.txt 2017-12-29 09:34:50.496366051 +0100 -@@ -202,7 +202,7 @@ - include(CPack) - - if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -pthread") - endif() - - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") diff --git a/cadabra2-add-pthread-to-cxxflags.patch b/cadabra2-add-pthread-to-cxxflags.patch new file mode 100644 index 0000000..b8d9d86 --- /dev/null +++ b/cadabra2-add-pthread-to-cxxflags.patch @@ -0,0 +1,13 @@ +Index: cadabra2-2.2.0/CMakeLists.txt +=================================================================== +--- cadabra2-2.2.0.orig/CMakeLists.txt ++++ cadabra2-2.2.0/CMakeLists.txt +@@ -80,7 +80,7 @@ debug_message("Initial compiler flags: $ + + # GCC + if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -Wno-unused-but-set-variable") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -Wno-unused-but-set-variable -pthread") + endif() + + # Clang diff --git a/cadabra2.changes b/cadabra2.changes index bc2da63..7d4b92a 100644 --- a/cadabra2.changes +++ b/cadabra2.changes @@ -1,3 +1,35 @@ +------------------------------------------------------------------- +Fri Mar 30 10:21:17 UTC 2018 - badshah400@gmail.com + +- Update to version 2.2.0: + * Experimental support for modifying the expression tree + directly from Python (see e.g. Fourier transforms). + * Fix for integration by parts (gh#kpeeters/cadabra2#71) + * Fix for incorrect conversion to sympy expressions. + * Optionally build with support for Mathematica scalar backend; + see map_mma. + * Many bugfixes for expression display and sympy conversion. + * Now using pybind instead of boost.python, in preparation for + * Windows port, and to enable building against Anaconda. + * Copy/paste of output cells added. + * New simplify command, which simplifies the scalar parts of + expressions, and can be switched to use either Sympy or + Mathematica. + * Fix to treat derivatives with respect to explicit coordinates + as scalars in evaluate; see this Q&A post. + * Fix for failure to flag errors for WeightInherit property. + * Fixed: vary on single-term expressions + * (gh#kpeeters/cadabra2#57) + * Fixed: evaluate with dense factors and no 'values' property on + indices (gh#kpeeters/cadabra2#68) +- Rename and rebase cadabra2-2.1.7.patch to + cadabra2-add-pthread-to-cxxflags.patch. +- Add BuildRequires: libboost_date_time1_66_0-devel, new + dependency with version 2.2.0. +- All python bindings are now required to be installed in + _datadir. +- New binary cadabra2cadabra. + ------------------------------------------------------------------- Fri Feb 2 21:21:57 UTC 2018 - stefan.bruens@rwth-aachen.de diff --git a/cadabra2.spec b/cadabra2.spec index 2c1f05f..37bf3a4 100644 --- a/cadabra2.spec +++ b/cadabra2.spec @@ -17,23 +17,24 @@ Name: cadabra2 -Version: 2.1.7 +Version: 2.2.0 Release: 0 Summary: A computer algebra system for solving problems in field theory -License: GPL-3.0+ +License: GPL-3.0-or-later Group: Productivity/Scientific/Math Url: http://cadabra.science/ Source0: https://github.com/kpeeters/cadabra2/archive/%{version}.tar.gz Source1: %{name}-rpmlintrc Source2: %{name}-gtk.appdata.xml # PATCH-FIX-OPENSUSE add -pthread to CMAKE_CXX_FLAGS (as adivised in https://github.com/potree/PotreeConverter/issues/136) kkaempf@suse.de -Patch1: cadabra2-2.1.7.patch +Patch1: cadabra2-add-pthread-to-cxxflags.patch BuildRequires: appstream-glib BuildRequires: cmake BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: gmp-devel BuildRequires: hicolor-icon-theme +BuildRequires: libboost_date_time1_66_0-devel BuildRequires: libuuid-devel BuildRequires: pcre-devel BuildRequires: pkgconfig @@ -199,6 +200,11 @@ install -D -m0644 %{S:2} %{buildroot}%{_datadir}/metainfo/%{name}-gtk.appdata.xm # Replace "/usr/bin/env python3" hashbang by "/usr/bin/python3" sed -E -i "s|^#!/usr/bin/env python3|#!/usr/bin/python3|" %{buildroot}%{_bindir}/cadabra2 +rm %{buildroot}%{_libexecdir}/*.a + +mkdir -p %{buildroot}%{_datadir}/texmf/tex/latex/cadabra2/ +ln %{buildroot}%{_datadir}/cadabra2/latex/* %{buildroot}%{_datadir}/texmf/tex/latex/cadabra2/ + %post # FIXME: ENABLE WHEN LATEX DOC BUILDING IS FIXED #%{_bindir}/texhash @@ -222,21 +228,12 @@ sed -E -i "s|^#!/usr/bin/env python3|#!/usr/bin/python3|" %{buildroot}%{_bindir} %files %defattr(-,root,root) %doc README.rst doc/license.txt +%{_bindir}/cadabra2cadabra %{_bindir}/cadabra-server %{_bindir}/%{name} %{_bindir}/%{name}python %{_bindir}/%{name}html -%if 0%{?suse_version} > 1320 -%{python3_sitearch}/cdb -%{python3_sitearch}/cadabra2.so -%{python3_sitearch}/cadabra2_defaults.py -%else -%{python_sitearch}/cdb -%{python_sitearch}/cadabra2.so -%{python_sitearch}/cadabra2_defaults.py -%endif %{_datadir}/%{name}/ -%{_libexecdir}/*.so %{_datadir}/texmf/tex/latex/cadabra2/ %files gui From f63424d1cf903ad5138ca5e6a84881d03eec27f72153bd701b835a3532cbc4ff Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Tue, 10 Apr 2018 07:23:20 +0000 Subject: [PATCH 2/2] Accepting request 594693 from home:badshah400:branches:science - BuildRequires: libboost_date_time-devel instead of BuildRequires: libboost_date_time1_66_0-devel, and only for openSUSE > 1320; boost-devel in its entirety is already required for older versions. - gcc-c++ >= 4.9 now required. OBS-URL: https://build.opensuse.org/request/show/594693 OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=20 --- cadabra2.changes | 9 +++++++++ cadabra2.spec | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cadabra2.changes b/cadabra2.changes index 7d4b92a..175eedf 100644 --- a/cadabra2.changes +++ b/cadabra2.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Apr 9 01:46:11 UTC 2018 - badshah400@gmail.com + +- BuildRequires: libboost_date_time-devel instead of + BuildRequires: libboost_date_time1_66_0-devel, and only for + openSUSE > 1320; boost-devel in its entirety is already required + for older versions. +- gcc-c++ >= 4.9 now required. + ------------------------------------------------------------------- Fri Mar 30 10:21:17 UTC 2018 - badshah400@gmail.com diff --git a/cadabra2.spec b/cadabra2.spec index 37bf3a4..ae1f82b 100644 --- a/cadabra2.spec +++ b/cadabra2.spec @@ -31,10 +31,9 @@ Patch1: cadabra2-add-pthread-to-cxxflags.patch BuildRequires: appstream-glib BuildRequires: cmake BuildRequires: doxygen -BuildRequires: gcc-c++ +BuildRequires: gcc-c++ >= 4.9 BuildRequires: gmp-devel BuildRequires: hicolor-icon-theme -BuildRequires: libboost_date_time1_66_0-devel BuildRequires: libuuid-devel BuildRequires: pcre-devel BuildRequires: pkgconfig @@ -77,6 +76,7 @@ Recommends: %{name}-doc Recommends: %{name}-examples BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} > 1320 +BuildRequires: libboost_date_time-devel BuildRequires: libboost_filesystem-devel BuildRequires: libboost_headers-devel BuildRequires: libboost_program_options-devel