sci-libs/cantera: 3.0, mv libcantera_python3_XY.so to /usr/lib*/cantera

Change installation path of libcantera_python3_XY.so plugin
from "/usr/$(get_libdir)" to "/usr/$(get_libdir)/cantera" directory
and add new direcotry to RPATH to properly working of dlopen()
to load plugin from C++ user's code.

Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/32595
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sergey Torokhov
2023-10-27 03:30:39 +01:00
committed by Sam James
parent 68ad0f3285
commit 16eaba9bc5
2 changed files with 14 additions and 2 deletions
+2 -2
View File
@@ -63,8 +63,6 @@ DEPEND="
)
"
QA_SONAME="usr/lib.*/libcantera_python3.*.so" # intended for dlopen()
PATCHES=(
"${FILESDIR}/${P}_env.patch"
)
@@ -98,6 +96,8 @@ src_configure() {
system_blas_lapack=$(usex lapack y n)
env_vars="all"
extra_inc_dirs="/usr/include/eigen3"
use_rpath_linkage="yes"
extra_lib_dirs="/usr/$(get_libdir)/${PN}"
)
use hdf5 && scons_vars+=( system_highfive="y" )
use lapack && scons_vars+=( blas_lapack_libs="lapack,blas" )
@@ -23,3 +23,15 @@ diff -Naur a/SConstruct b/SConstruct
# Print values of all build options:
# the (updated) "cantera.conf" combines all options that were specified by the user
diff -Naur a/src/SConscript b/src/SConscript
--- a/src/SConscript
+++ b/src/SConscript
@@ -89,7 +89,7 @@
shim = pyenv.SharedObject("extensions/pythonShim.cpp")
pylibname = f"../lib/cantera_python{pyenv['py_version_short'].replace('.', '_')}"
lib = build(pyenv.SharedLibrary(pylibname, shim, SPAWN=get_spawn(pyenv)))
- install("$inst_shlibdir", lib)
+ install("$inst_shlibdir/cantera", lib)
# build the Cantera static library