Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/, sci-libs/cantera/files/
Date: Fri, 19 Jul 2019 16:45:09
Message-Id: 1563554693.a42c6b73ab2089813e77380fe5f5dce4b665eacc.mgorny@gentoo
1 commit: a42c6b73ab2089813e77380fe5f5dce4b665eacc
2 Author: band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
3 AuthorDate: Fri Jun 21 22:15:41 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 19 16:44:53 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a42c6b73
7
8 sci-libs/cantera: 2.4.0-r1. Enable build with sci-libs/sundials-3.2.x
9
10 This patch moves early applied 'sed' patches from src_prepare() to external
11 patch-file and allows to build Cantera 2.4.0 with sci-libs/sundials-3.2.x
12 since this version of Sundials is compatible with Sundials 3.1
13 and doesn't require to rebuild Cantera after it's upgrade from Sundials 3.1
14 to Sundials 3.2.
15
16 It was tested that Cantera successfuly build with Sundials-3.2.1
17 (that not in portage tree yet) and internal tests passed after "ebuild compile"
18 with Sundials 3.1.2 and "ebuild test" phase after intallation
19 of the Sundials 3.2.1 into system.
20
21 Note that Cantera 2.4.0 isn't compatible with Sundials 4.y branch
22 so there is a restriction for RDEPEND sci-libs/sundials-4.0.0
23
24 Signed-off-by: Sergey Torokhov <torokhov_s_a <AT> mail.ru>
25 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
26
27 sci-libs/cantera/cantera-2.4.0-r1.ebuild | 15 ++++--------
28 sci-libs/cantera/files/cantera_2.4.0_env.patch | 33 ++++++++++++++++++++++++++
29 2 files changed, 38 insertions(+), 10 deletions(-)
30
31 diff --git a/sci-libs/cantera/cantera-2.4.0-r1.ebuild b/sci-libs/cantera/cantera-2.4.0-r1.ebuild
32 index 235d20b70bf..707f5670106 100644
33 --- a/sci-libs/cantera/cantera-2.4.0-r1.ebuild
34 +++ b/sci-libs/cantera/cantera-2.4.0-r1.ebuild
35 @@ -29,7 +29,7 @@ RDEPEND="
36 python? (
37 dev-python/numpy[${PYTHON_USEDEP}]
38 )
39 - <sci-libs/sundials-3.2.0:0=
40 + <sci-libs/sundials-4.0.0:0=
41 "
42
43 DEPEND="
44 @@ -45,21 +45,16 @@ DEPEND="
45 )
46 "
47
48 -PATCHES=( "${FILESDIR}/${PN}_${PV}_libdirname_variable.patch" )
49 +PATCHES=(
50 + "${FILESDIR}/${PN}_${PV}_libdirname_variable.patch"
51 + "${FILESDIR}/${PN}_${PV}_env.patch"
52 + )
53
54 pkg_setup() {
55 fortran-2_pkg_setup
56 python-single-r1_pkg_setup
57 }
58
59 -src_prepare() {
60 - default
61 - # patch to work 'scons test' properly in case of set up 'renamed_shared_libraries="no"' option
62 - sed -i "s/, libs=\['cantera_shared'\]//" "${S}"/test_problems/SConscript || die "failed to modify 'test_problems/SConscript'"
63 - # patch env to pass CCACHE_DIR variable
64 - sed -i "s/ENV={'PATH': os.environ\['PATH'\]}/ENV={'PATH': os.environ\['PATH'\], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')}/" "${S}"/SConstruct || die "failed to modify 'SConstruct'"
65 -}
66 -
67 ## Full list of configuration options of Cantera is presented here:
68 ## http://cantera.org/docs/sphinx/html/compiling/config-options.html
69
70
71 diff --git a/sci-libs/cantera/files/cantera_2.4.0_env.patch b/sci-libs/cantera/files/cantera_2.4.0_env.patch
72 new file mode 100644
73 index 00000000000..1be40dfe044
74 --- /dev/null
75 +++ b/sci-libs/cantera/files/cantera_2.4.0_env.patch
76 @@ -0,0 +1,33 @@
77 +diff -Nur old/cantera-2.4.0/SConstruct new/cantera-2.4.0/SConstruct
78 +--- old/SConstruct 2018-08-24 16:24:45.000000000 +0300
79 ++++ new/SConstruct 2019-06-22 00:18:41.000000000 +0300
80 +@@ -189,7 +189,7 @@
81 + toolchain = ['default']
82 +
83 + env = Environment(tools=toolchain+['textfile', 'subst', 'recursiveInstall', 'wix', 'gch'],
84 +- ENV={'PATH': os.environ['PATH']},
85 ++ ENV={'PATH': os.environ['PATH'], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')},
86 + toolchain=toolchain,
87 + **extraEnvArgs)
88 +
89 +@@ -1061,7 +1061,7 @@
90 +
91 + # Ignore the minor version, e.g. 2.4.x -> 2.4
92 + env['sundials_version'] = '.'.join(sundials_version.split('.')[:2])
93 +- if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1'):
94 ++ if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2'):
95 + print("""ERROR: Sundials version %r is not supported.""" % env['sundials_version'])
96 + sys.exit(1)
97 + print("""INFO: Using system installation of Sundials version %s.""" % sundials_version)
98 +diff -Nur old/cantera-2.4.0/test_problems/SConscript new/cantera-2.4.0/test_problems/SConscript
99 +--- old/test_problems/SConscript 2018-08-24 16:24:45.000000000 +0300
100 ++++ new/test_problems/SConscript 2019-06-22 00:13:29.000000000 +0300
101 +@@ -282,7 +282,7 @@
102 + CompileAndTest('VPsilane_test', 'VPsilane_test', 'VPsilane_test', 'output_blessed.txt')
103 +
104 + CompileAndTest('clib', 'clib_test', 'clib_test', 'output_blessed.txt',
105 +- extensions=['^clib_test.c'], libs=['cantera_shared'])
106 ++ extensions=['^clib_test.c'])
107 +
108 + # Force explicitly-named tests to run even if SCons thinks they're up to date
109 + for command in COMMAND_LINE_TARGETS: