r-rmariadb: add mariadb library path (#21406)
This commit is contained in:
parent
f3f8a72bbd
commit
7020c86874
2 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index 6c0f43c..bd7f627 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -29,7 +29,7 @@ fi
|
||||||
|
if [ "$INCLUDE_DIR" ] || [ "$LIB_DIR" ]; then
|
||||||
|
echo "Found INCLUDE_DIR and/or LIB_DIR!"
|
||||||
|
PKG_CFLAGS="-I$INCLUDE_DIR $PKG_CFLAGS"
|
||||||
|
- PKG_LIBS="-L$LIB_DIR $PKG_LIBS"
|
||||||
|
+ PKG_LIBS="-L$LIB_DIR -Wl,-rpath,$LIB_DIR $PKG_LIBS"
|
||||||
|
elif [ "$PKGCONFIG_CFLAGS" ] || [ "$PKGCONFIG_LIBS" ]; then
|
||||||
|
echo "Found mysql_config/mariadb_config cflags and libs!"
|
||||||
|
PKG_CFLAGS=${PKGCONFIG_CFLAGS}
|
|
@ -29,3 +29,12 @@ class RRmariadb(RPackage):
|
||||||
depends_on('r-bh', type=('build', 'run'))
|
depends_on('r-bh', type=('build', 'run'))
|
||||||
depends_on('r-plogr', type=('build', 'run'))
|
depends_on('r-plogr', type=('build', 'run'))
|
||||||
depends_on('mariadb-client')
|
depends_on('mariadb-client')
|
||||||
|
|
||||||
|
patch('configure_add_rpath.patch')
|
||||||
|
|
||||||
|
def configure_vars(self):
|
||||||
|
lib_dir = self.spec['mariadb-client'].prefix.lib.mariadb
|
||||||
|
inc_dir = self.spec['mariadb-client'].prefix.include.mariadb
|
||||||
|
args = ['LIB_DIR={0}'.format(lib_dir),
|
||||||
|
'INCLUDE_DIR={0}'.format(inc_dir)]
|
||||||
|
return args
|
||||||
|
|
Loading…
Reference in a new issue