[beast: 28/41] BUILD: configure.ac: support --with-pkgroot for /opt/beast-<version>/ builds



commit 86a7a33603c01178f550d854234634af97828510
Author: Tim Janik <timj gnu org>
Date:   Wed Jun 14 17:59:01 2017 +0200

    BUILD: configure.ac: support --with-pkgroot for /opt/beast-<version>/ builds
    
    Signed-off-by: Tim Janik <timj gnu org>

 configure.ac     |    8 +++++---
 misc/make-deb.sh |    2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c843cdd..b8ed1ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,6 +68,7 @@ AC_SUBST(LT_VERSION_INFO)
 
 # == Argument parsing ==
 AC_ARG_ENABLE(debug, [  --enable-debug=[no/min/yes/asan/tsan/lsan/ubsan] turn on debugging, 
default=minimum],,enable_debug=min)
+AC_ARG_WITH(pkgroot, [  --with-pkgroot[[=DIR]]    create package installation directory inside 
DIR],,with_pkgroot=no)
 # package library defaults
 enable_static=no ; enable_shared=yes
 
@@ -90,9 +91,10 @@ bseincludedir="\${beastdir}/include"
 # Provide directories for C++ and move Beast packagedir into libdir if under /usr
 bak_prefix="$prefix"; bak_exec_prefix="$exec_prefix"
 test "x$prefix" != xNONE || prefix="$ac_default_prefix" ; test "x$exec_prefix" != xNONE || 
exec_prefix="$prefix"
-case `eval echo "${exec_prefix}"` in
-  /usr|/usr/local)     beastdir="$libdir/beast-$MAJOR-$MINOR" ;;
-  *)                   beastdir="\${exec_prefix}/beast-$MAJOR-$MINOR" ;;
+case "$with_pkgroot" in
+  no)                  beastdir="$libdir/beast-$MAJOR-$MINOR" ;;
+  */*)                 beastdir="$with_pkgroot/beast-$MAJOR-$MINOR" ;;
+  *)                   AC_MSG_ERROR([invalid pkgroot path: $with_pkgroot]) ;;
 esac
 bak_libdir="$libdir"
 bak_bseincludedir="$bseincludedir"; bak_beastdir="$beastdir"
diff --git a/misc/make-deb.sh b/misc/make-deb.sh
index 3e2d909..9e86df9 100755
--- a/misc/make-deb.sh
+++ b/misc/make-deb.sh
@@ -88,7 +88,7 @@ if $REBUILD ; then
     R=https://github.com/tim-janik/rapicorn.git
     R=../rapicorn/.git/
     git_clone $R rapicorn c013464a64a606fe2165f15396fb96f342d27eb1 # 17.0.0~rc1
-    PREFIX="$BEASTDIR" build_checked rapicorn ./autogen.sh
+    PREFIX="$BEASTDIR" build_checked rapicorn ./autogen.sh --with-pkgroot=/opt
 
     # clone/update and build beast
     R=https://github.com/tim-janik/beast.git


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]