final changes to fix rust installation

This commit is contained in:
Cody P Schafer
2015-03-02 16:43:54 -05:00
parent 27b6aeb22c
commit aec0c0f007
2 changed files with 34 additions and 33 deletions
@@ -1,4 +1,4 @@
From f37052ffa86e16faa90d368129c4dcaf6f1a82e3 Mon Sep 17 00:00:00 2001 From c450a78a454be2848c896da3bba22ee209b053d2 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com> From: Cody P Schafer <dev@codyps.com>
Date: Mon, 2 Mar 2015 13:27:49 -0500 Date: Mon, 2 Mar 2015 13:27:49 -0500
Subject: [PATCH] add option to disable rewriting of install paths Subject: [PATCH] add option to disable rewriting of install paths
@@ -14,45 +14,45 @@ case:
1 file changed, 12 insertions(+), 9 deletions(-) 1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/install-template.sh b/install-template.sh diff --git a/install-template.sh b/install-template.sh
index 11bf392..9b9d75c 100644 index fea699b..caa9e24 100644
--- a/install-template.sh --- a/install-template.sh
+++ b/install-template.sh +++ b/install-template.sh
@@ -328,6 +328,7 @@ valopt prefix "/usr/local" "set installation prefix" @@ -605,16 +605,18 @@ install_components() {
valopt libdir "${CFG_DESTDIR}${CFG_PREFIX}/lib" "install libraries"
valopt mandir "${CFG_DESTDIR}${CFG_PREFIX}/share/man" "install man pages in PATH"
opt ldconfig 1 "run ldconfig after installation (Linux only)"
+opt rewrite-paths 1 "enable rewriting install paths for libdir & mandir"
if [ $HELP -eq 1 ]
then
@@ -624,16 +625,18 @@ for component in $COMPONENTS; do
# Decide the destination of the file # Decide the destination of the file
FILE_INSTALL_PATH="${CFG_DESTDIR}${CFG_PREFIX}/$FILE" local _file_install_path="$_dest_prefix/$_file"
- if echo "$FILE" | grep "^lib/" > /dev/null - if echo "$_file" | grep "^lib/" > /dev/null
- then - then
- f=`echo $FILE | sed 's/^lib\///'` - local _f="$(echo "$_file" | sed 's/^lib\///')"
- FILE_INSTALL_PATH="${CFG_LIBDIR}/$f" - _file_install_path="$CFG_LIBDIR/$_f"
- fi - fi
+ if [ -z "${CFG_DISABLE_REWRITE_PATHS}" ]; then + if [ -n "${CFG_REWRITE_PATHS-}" ]; then
+ if echo "$FILE" | grep "^lib/" > /dev/null + if echo "$_file" | grep "^lib/" > /dev/null
+ then + then
+ f=`echo $FILE | sed 's/^lib\///'` + local _f="$(echo "$_file" | sed 's/^lib\///')"
+ FILE_INSTALL_PATH="${CFG_LIBDIR}/$f" + _file_install_path="$CFG_LIBDIR/$_f"
+ fi + fi
- if echo "$FILE" | grep "^share/man/" > /dev/null - if echo "$_file" | grep "^share/man/" > /dev/null
- then - then
- f=`echo $FILE | sed 's/^share\/man\///'` - local _f="$(echo "$_file" | sed 's/^share\/man\///')"
- FILE_INSTALL_PATH="${CFG_MANDIR}/$f" - _file_install_path="$CFG_MANDIR/$_f"
+ if echo "$FILE" | grep "^share/man/" > /dev/null + if echo "$_file" | grep "^share/man/" > /dev/null
+ then + then
+ f=`echo $FILE | sed 's/^share\/man\///'` + local _f="$(echo "$_file" | sed 's/^share\/man\///')"
+ FILE_INSTALL_PATH="${CFG_MANDIR}/$f" + _file_install_path="$CFG_MANDIR/$_f"
+ fi + fi
fi fi
# Make sure there's a directory for it # Make sure there's a directory for it
@@ -794,6 +796,7 @@ valopt mandir "$CFG_DESTDIR_PREFIX/share/man" "install man pages in PATH"
opt ldconfig 1 "run ldconfig after installation (Linux only)"
opt verify 1 "obsolete"
flag verbose "run with verbose output"
+opt rewrite-paths 1 "enable rewriting install paths for libdir & mandir"
if [ $HELP -eq 1 ]
then
-- --
2.3.1 2.3.1
+1
View File
@@ -301,6 +301,7 @@ do_configure () {
"--disable-docs" \ "--disable-docs" \
"--disable-manage-submodules" \ "--disable-manage-submodules" \
"--disable-debug" \ "--disable-debug" \
"--disable-ldconfig" \
"--enable-optimize" \ "--enable-optimize" \
"--enable-optimize-cxx" \ "--enable-optimize-cxx" \
"--enable-optimize-llvm" \ "--enable-optimize-llvm" \