summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/gcc.sh12
-rw-r--r--packages/libzip.sh12
-rw-r--r--packages/pugixml.sh8
-rw-r--r--packages/python.sh10
-rw-r--r--packages/tinyxml2.sh9
-rw-r--r--packages/ustl.sh10
-rwxr-xr-xscripts/buildonly.sh11
-rwxr-xr-xscripts/createenv.sh11
-rwxr-xr-xscripts/createenvs.sh5
-rw-r--r--scripts/include/common.sh51
10 files changed, 137 insertions, 2 deletions
diff --git a/packages/gcc.sh b/packages/gcc.sh
new file mode 100644
index 0000000..f1f59cb
--- /dev/null
+++ b/packages/gcc.sh
@@ -0,0 +1,12 @@
+# original url
+SRCURL=git://gcc.gnu.org/git/gcc.git
+# mirror
+#SRCURL=https://gitlab.com/4144/gcc.git
+
+ENV_PATH="bin"
+ENV_MANPATH="share/man"
+
+BUILD_TYPE="automake"
+
+CONFIGURE_FLAGS="--enable-languages=c,c++,lto --disable-multilib"
+ENV_LD_LIBRARY_PATH="lib:lib64:lib32"
diff --git a/packages/libzip.sh b/packages/libzip.sh
new file mode 100644
index 0000000..6e514db
--- /dev/null
+++ b/packages/libzip.sh
@@ -0,0 +1,12 @@
+SRCTYPE=hg
+SRCURL=http://hg.nih.at/libzip/
+DEFAULT_BRANCH="default"
+
+ENV_PATH="bin:lib:include"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_LDFLAGS_PATH="lib"
+ENV_MANPATH="share/man"
+ENV_CPPFLAGS_PATH="include:lib/libzip/include"
+
+BUILD_TYPE="automake"
diff --git a/packages/pugixml.sh b/packages/pugixml.sh
new file mode 100644
index 0000000..7f71d80
--- /dev/null
+++ b/packages/pugixml.sh
@@ -0,0 +1,8 @@
+SRCURL=https://github.com/zeux/pugixml.git
+
+ENV_PATH="lib:include"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_LDFLAGS_PATH="lib"
+ENV_CPPFLAGS_PATH="include"
+
+BUILD_TYPE="cmake"
diff --git a/packages/python.sh b/packages/python.sh
new file mode 100644
index 0000000..b32f778
--- /dev/null
+++ b/packages/python.sh
@@ -0,0 +1,10 @@
+SRCURL=https://github.com/python/cpython.git
+
+ENV_PATH="bin:lib:include"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_LDFLAGS_PATH="lib"
+ENV_MANPATH="share/man"
+ENV_CPPFLAGS_PATH="include"
+
+BUILD_TYPE="configure"
diff --git a/packages/tinyxml2.sh b/packages/tinyxml2.sh
new file mode 100644
index 0000000..a7f4e0c
--- /dev/null
+++ b/packages/tinyxml2.sh
@@ -0,0 +1,9 @@
+SRCURL=https://github.com/leethomason/tinyxml2.git
+
+ENV_PATH="lib:include"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_LDFLAGS_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_CPPFLAGS_PATH="include"
+
+BUILD_TYPE="cmake"
diff --git a/packages/ustl.sh b/packages/ustl.sh
new file mode 100644
index 0000000..ad58c42
--- /dev/null
+++ b/packages/ustl.sh
@@ -0,0 +1,10 @@
+SRCURL=https://github.com/msharov/ustl.git
+DEFAULT_BRANCH="master"
+
+ENV_LD_LIBRARY_PATH="lib"
+ENV_LDFLAGS_PATH="lib"
+ENV_CPPFLAGS_PATH="include"
+
+BUILD_TYPE="configure"
+
+ENABLE_SAME_DIR_BUILD="true"
diff --git a/scripts/buildonly.sh b/scripts/buildonly.sh
new file mode 100755
index 0000000..5a45ab8
--- /dev/null
+++ b/scripts/buildonly.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+export package=$1
+source ../scripts/include/common.sh
+
+common_package_init
+
+common_build_init
+
+common_run_package
+package_build
diff --git a/scripts/createenv.sh b/scripts/createenv.sh
new file mode 100755
index 0000000..476a9f9
--- /dev/null
+++ b/scripts/createenv.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+export package=$1
+source ../scripts/include/common.sh
+
+common_package_init
+
+common_build_init
+
+common_run_package
+common_use_package
diff --git a/scripts/createenvs.sh b/scripts/createenvs.sh
new file mode 100755
index 0000000..a5fba23
--- /dev/null
+++ b/scripts/createenvs.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+source ../scripts/include/common.sh
+
+common_use_packages $*
diff --git a/scripts/include/common.sh b/scripts/include/common.sh
index e54922b..e7e8f8c 100644
--- a/scripts/include/common.sh
+++ b/scripts/include/common.sh
@@ -165,9 +165,19 @@ function run_cmake {
}
function run_make {
- echo "make"
- make
+ if [[ "${jobs}" == "" ]]; then
+ if [ -f "/proc/cpuinfo" ]; then
+ jobs="$(cat /proc/cpuinfo|grep processor|wc -l)"
+ else
+ jobs="1"
+ fi
+ fi
+ j=" -j${jobs}"
+
+ echo "make$j"
+ make$j
check_error $?
+ unset j
}
function run_make_install {
@@ -307,6 +317,43 @@ function common_use_package {
check_error $?
}
+function common_use_packages {
+ cd "${scriptsdir}"
+ check_error $?
+
+ export envname="$1"
+ export installname0="${installname}"
+ export envfile="../env/run${envname}.sh"
+ echo "#!/bin/bash" >"${envfile}"
+ check_error $?
+ echo "" >>"${envfile}"
+ shift
+ names="$*"
+ IFS=" "
+ for package in $names
+ do
+ export installname="${installname0}"
+ unset ENV_PATH
+ unset ENV_LD_LIBRARY_PATH
+ unset ENV_PKG_CONFIG_PATH
+ unset ENV_MANPATH
+ unset ENV_ACLOCAL_PATH
+ unset ENV_LDFLAGS_PATH
+ unset ENV_CPPFLAGS_PATH
+
+ common_package_init
+ common_build_init
+ common_run_package
+ package_use
+ check_error $?
+ done
+ unset IFS
+ echo "\$*" >>"${envfile}"
+ check_error $?
+ chmod 0755 "${envfile}"
+ check_error $?
+}
+
function package_get_source {
echo "package_get_source"
run_clone "${SRCURL}"