sci-libs/cantera: 2.4.0-r1. Update/merge cantera_* patches
authorband-a-prend <torokhov-s-a@yandex.ru>
Wed, 17 Jul 2019 15:46:08 +0000 (18:46 +0300)
committerMichał Górny <mgorny@gentoo.org>
Fri, 19 Jul 2019 16:44:57 +0000 (18:44 +0200)
Update "libdirname" patch with upstream [1] and merge it with "env" patch.

[1] https://github.com/Cantera/cantera/pull/661

Signed-off-by: Sergey Torokhov <torokhov_s_a@mail.ru>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
sci-libs/cantera/cantera-2.4.0-r1.ebuild
sci-libs/cantera/files/cantera_2.4.0_env.patch

index cd7dafba1b50a12578e3541ef29555a3c9f3befc..99d4566ae1e13d6b63900dc3a4ee93c8195055fb 100644 (file)
@@ -46,7 +46,6 @@ DEPEND="
 "
 
 PATCHES=(
-       "${FILESDIR}/${PN}_${PV}_libdirname_variable.patch"
        "${FILESDIR}/${PN}_${PV}_env.patch"
        )
 
index bc018a53f8982a7aa41c0aa49c09046f234eaabf..8b0926f7b9164efd64028cc8e090a99dc9cc7bda 100644 (file)
@@ -1,6 +1,6 @@
 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
++++ new/SConstruct     2019-07-17 15:50:06.000000000 +0300
 @@ -189,7 +189,7 @@
      toolchain = ['default']
  
@@ -10,7 +10,22 @@ diff -Nur old/cantera-2.4.0/SConstruct new/cantera-2.4.0/SConstruct
                    toolchain=toolchain,
                    **extraEnvArgs)
  
-@@ -727,11 +727,8 @@
+@@ -327,6 +327,14 @@
+         'prefix',
+         'Set this to the directory where Cantera should be installed.',
+         defaults.prefix, PathVariable.PathAccept),
++    PathVariable(
++        'libdirname',
++        """Set this to the directory where Cantera libraries should be installed.
++           Some distributions (e.g. Fedora/RHEL) use 'lib64' instead of 'lib' on 64-bit systems
++           or could use some other library directory name instead of 'lib' depends
++           on architecture and profile (e.g. Gentoo 'libx32' on x32 profile).
++           If user didn't set 'libdirname' configuration variable set it to default value 'lib'""",
++        'lib', PathVariable.PathAccept),
+     EnumVariable(
+         'python_package',
+         """If you plan to work in Python, then you need the ``full`` Cantera Python
+@@ -723,10 +731,7 @@
  env['cantera_pure_version'] = '.'.join(str(x) for x in ctversion.version)
  env['cantera_short_version'] = '.'.join(str(x) for x in ctversion.version[:2])
  
@@ -22,8 +37,7 @@ diff -Nur old/cantera-2.4.0/SConstruct new/cantera-2.4.0/SConstruct
  
  # Print values of all build options:
  print("Configuration variables read from 'cantera.conf' and command line:")
- for line in open('cantera.conf'):
-@@ -1062,7 +1062,7 @@
+@@ -1061,7 +1066,7 @@
  
      # Ignore the minor version, e.g. 2.4.x -> 2.4
      env['sundials_version'] = '.'.join(sundials_version.split('.')[:2])
@@ -32,9 +46,22 @@ diff -Nur old/cantera-2.4.0/SConstruct new/cantera-2.4.0/SConstruct
          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)
+@@ -1465,12 +1470,6 @@
+ # *** Set additional configuration variables ***
+ # **********************************************
+-# Some distributions (e.g. Fedora/RHEL) use 'lib64' instead of 'lib' on 64-bit systems
+-if any(name.startswith('/usr/lib64/python') for name in sys.path):
+-    env['libdirname'] = 'lib64'
+-else:
+-    env['libdirname'] = 'lib'
+-
+ # On Debian-based systems, need to special-case installation to
+ # /usr/local because of dist-packages vs site-packages
+ env['debian'] = any(name.endswith('dist-packages') for name in sys.path)
 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
++++ new/test_problems/SConscript       2019-07-17 15:41:35.000000000 +0300
 @@ -282,7 +282,7 @@
  CompileAndTest('VPsilane_test', 'VPsilane_test', 'VPsilane_test', 'output_blessed.txt')