public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-physics/reduze/, sci-physics/reduze/files/
@ 2017-06-02  7:04 David Seifert
  0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2017-06-02  7:04 UTC (permalink / raw
  To: gentoo-commits

commit:     8aeb28a1a899987c2556491da2fe2eaff6a141a8
Author:     Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Sun May 28 22:16:54 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Jun  2 06:58:37 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8aeb28a1

sci-physics/reduze: Fix building with GCC-6

Bug: https://bugs.gentoo.org/show_bug.cgi?id=594900
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4796

 sci-physics/reduze/files/reduze-2.0.9-gcc6.patch | 58 ++++++++++++++++++++++++
 sci-physics/reduze/files/reduze-2.1-gcc6.patch   | 29 ++++++++++++
 sci-physics/reduze/reduze-2.0.9.ebuild           |  4 +-
 sci-physics/reduze/reduze-2.1.ebuild             |  4 +-
 4 files changed, 93 insertions(+), 2 deletions(-)

diff --git a/sci-physics/reduze/files/reduze-2.0.9-gcc6.patch b/sci-physics/reduze/files/reduze-2.0.9-gcc6.patch
new file mode 100644
index 00000000000..9864163cdec
--- /dev/null
+++ b/sci-physics/reduze/files/reduze-2.0.9-gcc6.patch
@@ -0,0 +1,58 @@
+--- a/reduze/amplitude.cpp
++++ b/reduze/amplitude.cpp
+@@ -782,7 +782,7 @@
+ 
+ 	ex resultLeadingNc = result;
+ 	for (exset::const_iterator it = found.begin(); it != found.end(); ++it) {
+-		VERIFY(is_a<function>(*it) && ex_to<function>(*it).get_name() == "Color");
++		VERIFY(is_a<GiNaC::function>(*it) && ex_to<GiNaC::function>(*it).get_name() == "Color");
+ 		VERIFY(is_a<lst>(it->op(0)));
+ 		ex res(1);
+ 		for (size_t i = 0; i < it->op(0).nops(); ++i)
+@@ -823,7 +823,7 @@
+ 	timer.restart();
+ 	exmap m;
+ 	for (exset::const_iterator it = found.begin(); it != found.end(); ++it) {
+-		VERIFY(is_a<function>(*it) && ex_to<function>(*it).get_name() == "Lorentz");
++		VERIFY(is_a<GiNaC::function>(*it) && ex_to<GiNaC::function>(*it).get_name() == "Lorentz");
+ 		VERIFY(is_a<lst>(it->op(0)));
+ 
+ 		ex res(1);
+--- a/reduze/files.cpp
++++ b/reduze/files.cpp
+@@ -420,7 +420,7 @@
+ 			get_filename_sectormappings(m.integralfamily()->name());
+ 	ofstream file(file_name.c_str());
+ 	if (!file)
+-		ABORT("Can't write to " << file);
++		ABORT("Can't write to " << file_name);
+ 	os << YAML::BeginMap << YAML::Key << "sectormappings" << YAML::Value;
+ 	os << m << YAML::EndMap;
+ 	file << os.c_str();
+@@ -617,7 +617,7 @@
+ 
+ bool is_readable_file(const string& filename) {
+ 	ifstream is(filename.c_str());
+-	bool ok = is;
++	bool ok = !is.fail();
+ 	is.close();
+ 	return ok;
+ }
+--- a/reduze/sectormappings.cpp
++++ b/reduze/sectormappings.cpp
+@@ -757,13 +757,13 @@
+ 	const Node& z_node = node["zero_sectors"];
+ 	for (Iterator n = z_node.begin(); n != z_node.end(); ++n)
+ 		for (Iterator s = n.second().begin(); s != n.second().end(); ++s)
+-			m.zero_sectors_.insert(*s);
++			m.zero_sectors_.insert((const int) *s);
+ 
+ 	if (node.FindValue("sectors_without_graph")) {
+ 		const Node& ng_node = node["sectors_without_graph"];
+ 		for (Iterator n = ng_node.begin(); n != ng_node.end(); ++n)
+ 			for (Iterator s = n.second().begin(); s != n.second().end(); ++s)
+-				m.sectors_without_graph_.insert(*s);
++				m.sectors_without_graph_.insert((const int) *s);
+ 	}
+ 
+ 	const Node& rel_node = node["sector_relations"];

diff --git a/sci-physics/reduze/files/reduze-2.1-gcc6.patch b/sci-physics/reduze/files/reduze-2.1-gcc6.patch
new file mode 100644
index 00000000000..3b347ef413c
--- /dev/null
+++ b/sci-physics/reduze/files/reduze-2.1-gcc6.patch
@@ -0,0 +1,29 @@
+--- a/reduze/files.cpp
++++ b/reduze/files.cpp
+@@ -723,7 +723,7 @@
+ 	string file_name_tmp = file_name + ".tmp";
+ 	ofstream file(file_name_tmp.c_str());
+ 	if (!file)
+-		ABORT("Can't write to " << file);
++		ABORT("Can't write to " << file_name_tmp);
+ 	Emitter os;
+ 	os << BeginMap;
+ 	os << Key << "crossings" << Value;
+@@ -752,7 +752,7 @@
+ 	string file_name_tmp = file_name + ".tmp";
+ 	ofstream file(file_name_tmp.c_str());
+ 	if (!file)
+-		ABORT("Can't write to " << file);
++		ABORT("Can't write to " << file_name_tmp);
+ 	os << YAML::BeginMap << YAML::Key << "sectormappings" << YAML::Value;
+ 	os << m << YAML::EndMap;
+ 	file << os.c_str();
+@@ -1036,7 +1036,7 @@
+ 
+ bool is_readable_file(const string& filename) {
+ 	ifstream is(filename.c_str());
+-	bool ok = is;
++	bool ok = !is.fail();
+ 	is.close();
+ 	return ok && !is_readable_directory(filename);
+ }

diff --git a/sci-physics/reduze/reduze-2.0.9.ebuild b/sci-physics/reduze/reduze-2.0.9.ebuild
index 1055762ebeb..3c0713e8e16 100644
--- a/sci-physics/reduze/reduze-2.0.9.ebuild
+++ b/sci-physics/reduze/reduze-2.0.9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -25,6 +25,8 @@ DEPEND="${RDEPEND}
 DOCS=( ChangeLog README )
 
 src_prepare() {
+	epatch "${FILESDIR}"/${P}-gcc6.patch
+
 	# gentoo doc directory
 	sed -i \
 		-e "s:share/reduze:share/doc/${PF}:g" \

diff --git a/sci-physics/reduze/reduze-2.1.ebuild b/sci-physics/reduze/reduze-2.1.ebuild
index 9e78238cc71..ad6f52292b4 100644
--- a/sci-physics/reduze/reduze-2.1.ebuild
+++ b/sci-physics/reduze/reduze-2.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -22,6 +22,8 @@ DEPEND="${RDEPEND}
 	virtual/pkgconfig
 	doc? ( app-doc/doxygen )"
 
+PATCHES=( "${FILESDIR}"/${P}-gcc6.patch )
+
 src_prepare() {
 	cmake-utils_src_prepare
 	# gentoo doc directory


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-physics/reduze/, sci-physics/reduze/files/
@ 2021-03-07 18:53 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2021-03-07 18:53 UTC (permalink / raw
  To: gentoo-commits

commit:     03fe719f4dc20c6978c34fc58368d0efdbeb5133
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  7 17:30:58 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Mar  7 18:53:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03fe719f

sci-physics/reduze: 2.4 version bump, EAPI-7 bump, cmake.eclass

Use GNUInstallDirs.

Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sci-physics/reduze/Manifest                     |  1 +
 sci-physics/reduze/files/reduze-2.2-db.patch    |  6 +-
 sci-physics/reduze/files/reduze-2.4-cmake.patch | 81 +++++++++++++++++++++++++
 sci-physics/reduze/reduze-2.4.ebuild            | 58 ++++++++++++++++++
 4 files changed, 143 insertions(+), 3 deletions(-)

diff --git a/sci-physics/reduze/Manifest b/sci-physics/reduze/Manifest
index b83b647d5cd..d1d42971bae 100644
--- a/sci-physics/reduze/Manifest
+++ b/sci-physics/reduze/Manifest
@@ -1 +1,2 @@
 DIST reduze-2.2.tar.gz 669858 BLAKE2B 52c48f5547055087dc2969fe5a7a42281519cf1d9a454a675ea54741f3d5912cd9b135816994241fa206585038d683ba5a3849308ff0403f1d3507ec9b77fe00 SHA512 ca4ed6f754fc75511b0916e8c2eea26a69e0e30c604a714af76995038a8e11dc3b129157bf1a170e639ea0fc39f9f5102bba4ad503874f044ac91855d9a95dab
+DIST reduze-2.4.tar.gz 671780 BLAKE2B f401c9b50df0801b0b3305a8b77c3fd3f82b7f36419f4b76a28994c4db1f1a267dc40f91b42ee11ec5c911f6fab0a39eaf9f5cb2e099aa08e6489cea05760795 SHA512 06d5fbd371a4c5e88b6b77ddab5231438dae288c58122a6060e09c525deecf013b664a016d916b10e29373cefbc1f13af708a0a71a1f8da4204a63074424f6c1

diff --git a/sci-physics/reduze/files/reduze-2.2-db.patch b/sci-physics/reduze/files/reduze-2.2-db.patch
index 671cd5565e0..a43de911be7 100644
--- a/sci-physics/reduze/files/reduze-2.2-db.patch
+++ b/sci-physics/reduze/files/reduze-2.2-db.patch
@@ -1,6 +1,6 @@
-diff -r -U2 reduze-2.2.orig/reduze/CMakeLists.txt reduze-2.2/reduze/CMakeLists.txt
---- reduze-2.2.orig/reduze/CMakeLists.txt	2017-11-17 14:11:58.000000000 +0700
-+++ reduze-2.2/reduze/CMakeLists.txt	2017-12-19 20:27:17.508528174 +0700
+diff -r -U2 a/reduze/CMakeLists.txt b/reduze/CMakeLists.txt
+--- a/reduze/CMakeLists.txt	2017-11-17 14:11:58.000000000 +0700
++++ b/reduze/CMakeLists.txt	2017-12-19 20:27:17.508528174 +0700
 @@ -84,9 +84,8 @@
  	message (STATUS "Building with Berkeley DB support")
  	find_path(DB_INCLUDE_PATH NAMES dbstl_common.h

diff --git a/sci-physics/reduze/files/reduze-2.4-cmake.patch b/sci-physics/reduze/files/reduze-2.4-cmake.patch
new file mode 100644
index 00000000000..d45af23374b
--- /dev/null
+++ b/sci-physics/reduze/files/reduze-2.4-cmake.patch
@@ -0,0 +1,81 @@
+From a64b26c6e5c6c49e5842280a8690ec0d31832ce8 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 7 Mar 2021 18:20:11 +0100
+Subject: [PATCH] Use GNUInstallDirs, add ENABLE_EXAMPLES option
+
+---
+ CMakeLists.txt                  | 17 +++++++++++------
+ reduze/CMakeLists.txt           |  2 +-
+ tools/reduze1to2/CMakeLists.txt |  2 +-
+ 3 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e6207bd..a0cab4b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,11 +29,10 @@
+ # - 'make package_source' creates the source tarball
+ # - 'make doc'            creates the source code documentation using Doxygen
+ 
+-message (STATUS "Configuring package Reduze")
+-cmake_minimum_required (VERSION 2.6)
++cmake_minimum_required (VERSION 2.8.12)
+ 
+ project (Reduze)
+-list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
++set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
+ include (GetGitRevisionDescription)
+ #git_describe_new (GIT_TAG)
+ git_describe(GIT_TAG)
+@@ -76,6 +75,9 @@ if (NOT HAVE_TUTORIAL_PDF)
+    message (FATAL_ERROR "File ${TUTORIAL_PDF} not found")
+ endif (NOT HAVE_TUTORIAL_PDF)
+ 
++include(GNUInstallDirs)
++
++option (ENABLE_EXAMPLES "Install tools, examples" ON)
+ 
+ # include configured file with git tag in source package
+ # NOTE1: make sure to build before pack (make; make package_source) !
+@@ -89,9 +91,12 @@ add_subdirectory ("reduze")
+ add_subdirectory ("tools/reduze1to2")
+ add_subdirectory ("check")
+ add_subdirectory ("doc/code")
+-install (FILES "doc/tutorial/reduze2-tutorial.pdf" DESTINATION share/reduze/tutorial)
+-install (FILES "tools/reduze-mma.m" DESTINATION share/reduze/tools)
+-install (DIRECTORY "example" DESTINATION share/reduze PATTERN ".git" EXCLUDE)
++install (FILES "doc/tutorial/reduze2-tutorial.pdf" DESTINATION ${CMAKE_INSTALL_DOCDIR})
++
++if (ENABLE_EXAMPLES)
++  install (FILES "tools/reduze-mma.m" DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
++  install (DIRECTORY "example" DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples PATTERN ".git" EXCLUDE)
++endif ()
+ 
+ include (CPack)
+ 
+diff --git a/reduze/CMakeLists.txt b/reduze/CMakeLists.txt
+index b296081..a76c307 100644
+--- a/reduze/CMakeLists.txt
++++ b/reduze/CMakeLists.txt
+@@ -201,5 +201,5 @@ target_link_libraries (reduze yaml-cpp)
+ # installation
+ #------------------------------------------------------------------------------
+ 
+-install (TARGETS reduze DESTINATION bin)
++install (TARGETS reduze DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+diff --git a/tools/reduze1to2/CMakeLists.txt b/tools/reduze1to2/CMakeLists.txt
+index d1d4bd5..4822910 100644
+--- a/tools/reduze1to2/CMakeLists.txt
++++ b/tools/reduze1to2/CMakeLists.txt
+@@ -9,6 +9,6 @@ add_executable (reduze1to2 ${reduze1to2_SOURCES})
+ 
+ set (CMAKE_CXX_FLAGS "-Wall -pedantic -Wno-long-long")
+ 
+-install (TARGETS reduze1to2 DESTINATION bin)
++install (TARGETS reduze1to2 DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+ message (STATUS "Added build target 'reduze1to2'")
+-- 
+2.30.1
+

diff --git a/sci-physics/reduze/reduze-2.4.ebuild b/sci-physics/reduze/reduze-2.4.ebuild
new file mode 100644
index 00000000000..c7ea66e3ee5
--- /dev/null
+++ b/sci-physics/reduze/reduze-2.4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Program for reducing Feynman integrals"
+HOMEPAGE="https://reduze.hepforge.org/"
+SRC_URI="https://reduze.hepforge.org/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="berkdb doc examples mpi"
+
+RDEPEND="
+	>=sci-mathematics/ginac-1.4.1
+	berkdb? ( sys-libs/db:6.0[cxx] )
+	mpi? ( virtual/mpi )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-cmake.patch
+	"${FILESDIR}"/${PN}-2.2-db.patch
+)
+
+# remove bundled yaml-cpp
+# no: it does not build. is it patched?
+# sed -i -e '/add_subdirectory ("yaml")/d' CMakeLists.txt || die
+
+src_configure() {
+	local mycmakeargs=(
+		-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON # no thanks
+		-DUSE_HASH_TABLE=ON
+		-DUSE_DATABASE=$(usex berkdb)
+		-DENABLE_EXAMPLES=$(usex examples)
+		-DUSE_MPI=$(usex mpi)
+	)
+	cmake_src_configure
+}
+
+src_compile() {
+	cmake_src_compile all $(usev doc)
+}
+
+src_test() {
+	cmake_build check
+	use mpi && cmake_build check_mpi
+}
+
+src_install() {
+	use doc && local HTML_DOCS+=( "${BUILD_DIR}"/doc/code/html/. )
+	cmake_src_install
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-physics/reduze/, sci-physics/reduze/files/
@ 2023-01-10  3:47 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2023-01-10  3:47 UTC (permalink / raw
  To: gentoo-commits

commit:     de13f46f79478ea73c229a0dd5122a6cb83d8ab1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  9 14:31:15 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 10 03:46:52 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de13f46f

sci-physics/reduze: switch to sys-libs/db:5.3

This version has a more permissive licence and reduze was the only consumer
left of 6.0. Dropping it will allow us to remove db:6.0. Sadly, reduze
does not build with 4.8, which is the main bdb version.

Signed-off-by: Sam James <sam <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/29032
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-physics/reduze/files/reduze-2.2-db.patch                 |  2 +-
 .../reduze/{reduze-2.4.ebuild => reduze-2.4-r1.ebuild}       | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/sci-physics/reduze/files/reduze-2.2-db.patch b/sci-physics/reduze/files/reduze-2.2-db.patch
index a43de911be7a..92c7e46d3cdf 100644
--- a/sci-physics/reduze/files/reduze-2.2-db.patch
+++ b/sci-physics/reduze/files/reduze-2.2-db.patch
@@ -6,7 +6,7 @@ diff -r -U2 a/reduze/CMakeLists.txt b/reduze/CMakeLists.txt
  	find_path(DB_INCLUDE_PATH NAMES dbstl_common.h
 -	          PATHS /usr/local/include/db4 /usr/local/include
 -	                /usr/include/db4 /usr/include)
-+	          PATHS /usr/include/db6.0)
++	          PATHS /usr/include/db5.3)
      # we also need db.h but just assume its in the same directory
  	find_library(DB_LIBRARY NAMES db_stl
 -	             PATHS /usr/lib /usr/local/lib)

diff --git a/sci-physics/reduze/reduze-2.4.ebuild b/sci-physics/reduze/reduze-2.4-r1.ebuild
similarity index 89%
rename from sci-physics/reduze/reduze-2.4.ebuild
rename to sci-physics/reduze/reduze-2.4-r1.ebuild
index c7ea66e3ee54..218b666b890d 100644
--- a/sci-physics/reduze/reduze-2.4.ebuild
+++ b/sci-physics/reduze/reduze-2.4-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit cmake
 
@@ -16,12 +16,14 @@ IUSE="berkdb doc examples mpi"
 
 RDEPEND="
 	>=sci-mathematics/ginac-1.4.1
-	berkdb? ( sys-libs/db:6.0[cxx] )
-	mpi? ( virtual/mpi )"
+	berkdb? ( sys-libs/db:5.3=[cxx] )
+	mpi? ( virtual/mpi )
+"
 DEPEND="${RDEPEND}"
 BDEPEND="
 	virtual/pkgconfig
-	doc? ( app-doc/doxygen )"
+	doc? ( app-doc/doxygen )
+"
 
 PATCHES=(
 	"${FILESDIR}"/${P}-cmake.patch


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-10  3:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-10  3:47 [gentoo-commits] repo/gentoo:master commit in: sci-physics/reduze/, sci-physics/reduze/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2021-03-07 18:53 Andreas Sturmlechner
2017-06-02  7:04 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox