summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-26 05:45:40 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-26 05:45:40 +0300
commit848c817b17c87e9151d6a884711838b23760021d (patch)
tree3c7a3bf18d39a93719cc2f92ad94d10551daf7cb
parent80c12650750c8f81bbde1588700361715524d7cc (diff)
downloadspm-848c817b17c87e9151d6a884711838b23760021d.tar.gz
spm-848c817b17c87e9151d6a884711838b23760021d.tar.bz2
spm-848c817b17c87e9151d6a884711838b23760021d.tar.xz
spm-848c817b17c87e9151d6a884711838b23760021d.zip
Add support in source tree compilation.
Some projects like curl look like cant be build outside of source tree. Update curl package.
-rwxr-xr-xpackages/curl.sh3
-rw-r--r--scripts/include/common.sh7
2 files changed, 10 insertions, 0 deletions
diff --git a/packages/curl.sh b/packages/curl.sh
index 1d6385d..327c575 100755
--- a/packages/curl.sh
+++ b/packages/curl.sh
@@ -3,6 +3,9 @@
function package_build {
run_git_switch_branch master
+ # this need because out of source tree compilation is broken
+ run_enable_same_dir_build
+
run_autoreconf -i
run_configure
diff --git a/scripts/include/common.sh b/scripts/include/common.sh
index e286f5d..27c1767 100644
--- a/scripts/include/common.sh
+++ b/scripts/include/common.sh
@@ -116,6 +116,13 @@ function run_autoreconf {
check_error $?
}
+function run_enable_same_dir_build {
+ echo "copy sources from $srcdir to ${builddir}"
+ cp -r "$srcdir" "${builddir}/.."
+ export srcdir="$builddir"
+ echo "change src dir to $srcdir"
+}
+
function run_configure {
cd "${builddir}"
check_error $?