diff --git a/meson/release/install-cvmfs.sh b/meson/release/install-cvmfs.sh index efc8bd63..e33aaea9 100755 --- a/meson/release/install-cvmfs.sh +++ b/meson/release/install-cvmfs.sh @@ -45,13 +45,11 @@ fi buildDir=$1 installDir=$(realpath $2) testFile=$(realpath $3) -nativeFile=$sourceDir/meson/release/native/release.ini echo """ sourceDir = $sourceDir buildDir = $buildDir installDir = $installDir -testFile = $testFile -nativeFile = $nativeFile""" +testFile = $testFile""" [ ! -f "$testFile" ] && echo "ERROR: test file does not exist" >&2 && exit 1 print_dep_vars printf "\nProceed with installation? [y/N] " @@ -68,10 +66,17 @@ esac msg "meson setup" meson setup $buildDir $sourceDir \ - --native-file=$nativeFile \ --prefix=$installDir \ - -Drcdb:home=$RCDB_HOME \ - -Dtest_data_file=$testFile + -D buildtype=release \ + -D bind_fortran=true \ + -D bind_python=true \ + -D install_examples=true \ + -D z_install_envfile=false \ + -D z_require_root=true \ + -D rcdb:home=$RCDB_HOME \ + -D rcdb:use_mariadb=true \ + -D rcdb:use_sqlite=true \ + -D test_data_file=$testFile msg "meson install" meson install -C $buildDir msg "meson test" diff --git a/meson/release/native/release.ini b/meson/release/native/release.ini deleted file mode 100644 index fac0fc98..00000000 --- a/meson/release/native/release.ini +++ /dev/null @@ -1,10 +0,0 @@ -; options set for ifarm or cvmfs builds -[built-in options] -; core -buildtype = 'release' -; project options -bind_fortran = True -bind_python = True -install_examples = True -z_install_envfile = False -z_require_root = True diff --git a/subprojects/rcdb/meson.build b/subprojects/rcdb/meson.build index 4ab2ffaa..bb4d838b 100644 --- a/subprojects/rcdb/meson.build +++ b/subprojects/rcdb/meson.build @@ -18,23 +18,31 @@ else error(f'RCDB not found; set build option "rcdb:home" to the RCDB installation (e.g., to "$RCDB_HOME"); @require_message@') endif -# RCDB dependencies: a database management system (DBMS), mysql and/or sqlite +# RCDB dependencies: a database management system (DBMS), mariadb and/or sqlite dbms_args = [] dbms_deps = [] dbms_dict = { - 'mysql': [ 'mariadb', 'mysql', 'mysqlclient' ], # prioritizing mariadb, an open source fork of mysql - 'sqlite': [ 'sqlite3' ], + 'mariadb': { + 'use': get_option('use_mariadb'), + 'pkgs': [ 'mariadb', 'mysql', 'mysqlclient' ], # prioritizing mariadb, an open source fork of mysql + }, + 'sqlite': { + 'use': get_option('use_sqlite'), + 'pkgs': [ 'sqlite3' ], + }, } -foreach dbms, pkgs : dbms_dict - foreach pkg : pkgs - dep = dependency(pkg, required: false) - if dep.found() - dbms_deps += dep - dbms_args += { 'mysql': '-DRCDB_MYSQL', 'sqlite': '-DRCDB_SQLITE' }[dbms] - message(f'using @pkg@ for RCDB DBMS') - break - endif - endforeach +foreach dbms, info : dbms_dict + if info['use'] + foreach pkg : info['pkgs'] + dep = dependency(pkg, required: false) + if dep.found() + dbms_deps += dep + dbms_args += { 'mariadb': '-DRCDB_MYSQL', 'sqlite': '-DRCDB_SQLITE' }[dbms] + message(f'using @pkg@ for RCDB DBMS') + break + endif + endforeach + endif endforeach if dbms_deps.length() == 0 error('none of the DBMSs (' + ', '.join(dbms_dict.keys()) + ') were found, so RCDB will not be used in this build; ' + require_message) diff --git a/subprojects/rcdb/meson.options b/subprojects/rcdb/meson.options index beeaa745..c6fece42 100644 --- a/subprojects/rcdb/meson.options +++ b/subprojects/rcdb/meson.options @@ -1 +1,3 @@ -option('home', type: 'string', value: '', description: 'Location of RCDB installation; if empty, RCDB-dependent code will not be included') +option('home', type: 'string', value: '', description: 'Location of RCDB installation; if empty, RCDB-dependent code will not be included') +option('use_mariadb', type: 'boolean', value: true, description: 'Use mariadb or mysql, if found on the system; set this to false to disable support for this') +option('use_sqlite', type: 'boolean', value: true, description: 'Use sqlite, if found on the system; set this to false to disable support for this')