diff options
author | band-a-prend <torokhov-s-a@yandex.ru> | 2019-06-22 01:15:41 +0300 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-07-19 18:44:53 +0200 |
commit | a42c6b73ab2089813e77380fe5f5dce4b665eacc (patch) | |
tree | 4520bfe12715e189a91ada8546946fcfd95aebdb /sci-libs/cantera | |
parent | sci-libs/cantera: 2.4.0-r1. Restrict RDEPEND <sci-libs/sundials-3.2.0:0= (diff) | |
download | gentoo-a42c6b73ab2089813e77380fe5f5dce4b665eacc.tar.gz gentoo-a42c6b73ab2089813e77380fe5f5dce4b665eacc.tar.bz2 gentoo-a42c6b73ab2089813e77380fe5f5dce4b665eacc.zip |
sci-libs/cantera: 2.4.0-r1. Enable build with sci-libs/sundials-3.2.x
This patch moves early applied 'sed' patches from src_prepare() to external
patch-file and allows to build Cantera 2.4.0 with sci-libs/sundials-3.2.x
since this version of Sundials is compatible with Sundials 3.1
and doesn't require to rebuild Cantera after it's upgrade from Sundials 3.1
to Sundials 3.2.
It was tested that Cantera successfuly build with Sundials-3.2.1
(that not in portage tree yet) and internal tests passed after "ebuild compile"
with Sundials 3.1.2 and "ebuild test" phase after intallation
of the Sundials 3.2.1 into system.
Note that Cantera 2.4.0 isn't compatible with Sundials 4.y branch
so there is a restriction for RDEPEND sci-libs/sundials-4.0.0
Signed-off-by: Sergey Torokhov <torokhov_s_a@mail.ru>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sci-libs/cantera')
-rw-r--r-- | sci-libs/cantera/cantera-2.4.0-r1.ebuild | 15 | ||||
-rw-r--r-- | sci-libs/cantera/files/cantera_2.4.0_env.patch | 33 |
2 files changed, 38 insertions, 10 deletions
diff --git a/sci-libs/cantera/cantera-2.4.0-r1.ebuild b/sci-libs/cantera/cantera-2.4.0-r1.ebuild index 235d20b70bfe..707f5670106b 100644 --- a/sci-libs/cantera/cantera-2.4.0-r1.ebuild +++ b/sci-libs/cantera/cantera-2.4.0-r1.ebuild @@ -29,7 +29,7 @@ RDEPEND=" python? ( dev-python/numpy[${PYTHON_USEDEP}] ) - <sci-libs/sundials-3.2.0:0= + <sci-libs/sundials-4.0.0:0= " DEPEND=" @@ -45,21 +45,16 @@ DEPEND=" ) " -PATCHES=( "${FILESDIR}/${PN}_${PV}_libdirname_variable.patch" ) +PATCHES=( + "${FILESDIR}/${PN}_${PV}_libdirname_variable.patch" + "${FILESDIR}/${PN}_${PV}_env.patch" + ) pkg_setup() { fortran-2_pkg_setup python-single-r1_pkg_setup } -src_prepare() { - default - # patch to work 'scons test' properly in case of set up 'renamed_shared_libraries="no"' option - sed -i "s/, libs=\['cantera_shared'\]//" "${S}"/test_problems/SConscript || die "failed to modify 'test_problems/SConscript'" - # patch env to pass CCACHE_DIR variable - 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'" -} - ## Full list of configuration options of Cantera is presented here: ## http://cantera.org/docs/sphinx/html/compiling/config-options.html diff --git a/sci-libs/cantera/files/cantera_2.4.0_env.patch b/sci-libs/cantera/files/cantera_2.4.0_env.patch new file mode 100644 index 000000000000..1be40dfe0446 --- /dev/null +++ b/sci-libs/cantera/files/cantera_2.4.0_env.patch @@ -0,0 +1,33 @@ +diff -Nur old/cantera-2.4.0/SConstruct new/cantera-2.4.0/SConstruct +--- old/SConstruct 2018-08-24 16:24:45.000000000 +0300 ++++ new/SConstruct 2019-06-22 00:18:41.000000000 +0300 +@@ -189,7 +189,7 @@ + toolchain = ['default'] + + env = Environment(tools=toolchain+['textfile', 'subst', 'recursiveInstall', 'wix', 'gch'], +- ENV={'PATH': os.environ['PATH']}, ++ ENV={'PATH': os.environ['PATH'], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')}, + toolchain=toolchain, + **extraEnvArgs) + +@@ -1061,7 +1061,7 @@ + + # Ignore the minor version, e.g. 2.4.x -> 2.4 + env['sundials_version'] = '.'.join(sundials_version.split('.')[:2]) +- if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1'): ++ if env['sundials_version'] not in ('2.4','2.5','2.6','2.7','3.0','3.1','3.2'): + print("""ERROR: Sundials version %r is not supported.""" % env['sundials_version']) + sys.exit(1) + print("""INFO: Using system installation of Sundials version %s.""" % sundials_version) +diff -Nur old/cantera-2.4.0/test_problems/SConscript new/cantera-2.4.0/test_problems/SConscript +--- old/test_problems/SConscript 2018-08-24 16:24:45.000000000 +0300 ++++ new/test_problems/SConscript 2019-06-22 00:13:29.000000000 +0300 +@@ -282,7 +282,7 @@ + CompileAndTest('VPsilane_test', 'VPsilane_test', 'VPsilane_test', 'output_blessed.txt') + + CompileAndTest('clib', 'clib_test', 'clib_test', 'output_blessed.txt', +- extensions=['^clib_test.c'], libs=['cantera_shared']) ++ extensions=['^clib_test.c']) + + # Force explicitly-named tests to run even if SCons thinks they're up to date + for command in COMMAND_LINE_TARGETS: |