summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-04 23:35:29 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-04 23:35:29 +0300
commit2afa95a5719cc2ac083df7e6b911a36e0a3f21f3 (patch)
tree65f41812aa2478042858e4ad0e49efa2f3a58cea
parentcfaca6721d0dfcf2aa6559a25d9028723b997a18 (diff)
parent3b5049928a6c82ce72f99cf07ef40499f027160d (diff)
downloadspm-zlib_ng.tar.gz
spm-zlib_ng.tar.bz2
spm-zlib_ng.tar.xz
spm-zlib_ng.zip
Merge branch 'master' into zlib_ngzlib_ng
-rwxr-xr-x.ci/buildlib.sh21
-rwxr-xr-x.ci/copyfinal.sh12
-rwxr-xr-x.ci/copyspm.sh6
-rwxr-xr-x.ci/run.sh2
-rwxr-xr-x.ci/runretry.sh5
-rw-r--r--.gitlab-ci.yml8
-rw-r--r--packages/SDL.sh3
-rw-r--r--packages/SDL2.sh5
-rw-r--r--packages/SDL2_image.sh5
-rw-r--r--packages/SDL2_mixer.sh5
-rw-r--r--packages/SDL2_net.sh5
-rw-r--r--packages/SDL2_ttf.sh5
-rw-r--r--packages/SDL_gfx.sh4
-rw-r--r--packages/SDL_image.sh2
-rw-r--r--packages/SDL_mixer.sh2
-rw-r--r--packages/SDL_net.sh2
-rw-r--r--packages/SDL_ttf.sh2
-rw-r--r--packages/cmake.sh1
-rw-r--r--packages/curl.sh2
-rw-r--r--packages/freetype.sh12
-rw-r--r--packages/gcc.sh12
-rw-r--r--packages/gettext.sh11
-rw-r--r--packages/libpng.sh2
-rw-r--r--packages/libxml2.sh5
-rw-r--r--packages/libzip.sh12
-rw-r--r--packages/musl.sh9
-rw-r--r--packages/physfs.sh2
-rw-r--r--packages/physfs1.sh11
-rw-r--r--packages/pugixml.sh8
-rw-r--r--packages/python.sh10
-rw-r--r--packages/tinyxml2.sh9
-rw-r--r--packages/ustl.sh10
-rw-r--r--packages/virglrenderer.sh2
-rw-r--r--packages/zlib.sh2
-rw-r--r--packages/zlib_ng.sh2
-rwxr-xr-xscripts/buildonly.sh11
-rwxr-xr-xscripts/createenv.sh11
-rwxr-xr-xscripts/createenvs.sh5
-rw-r--r--scripts/include/common.sh123
-rwxr-xr-xscripts/updatesrcall.sh5
40 files changed, 338 insertions, 33 deletions
diff --git a/.ci/buildlib.sh b/.ci/buildlib.sh
index 18ece90..fa6481d 100755
--- a/.ci/buildlib.sh
+++ b/.ci/buildlib.sh
@@ -1,21 +1,8 @@
#!/bin/bash
-mkdir /usr/local/spm
-cp -r . /usr/local/spm
-export dir123=$(pwd)
-cd /usr/local/spm
-
-export installname="${1}_${2}"
-export envname="env"
export srcbranch="$2"
-./.ci/run.sh ./getsrc.sh "$1" || exit 1
-./.ci/run.sh ./build.sh "$1" || exit 1
-
-echo mkdir "${dir123}/bin/${installname}"
-mkdir "${dir123}/bin/${installname}"
+export envname="${1}_${2}"
-echo cp -r "/usr/local/spm/bin/${installname}" "${dir123}/bin/"
-cp -r "/usr/local/spm/bin/${installname}" "${dir123}/bin/"
-
-echo "cp ./env/runenv.sh ${dir123}/bin/${installname}/"
-cp "./env/runenv.sh" "${dir123}/bin/${installname}/" || exit 1
+cd /usr/local/spm || exit 1
+./.ci/runretry.sh ./getsrc.sh "$1" || exit 1
+./.ci/run.sh ./build.sh "$1" || exit 1
diff --git a/.ci/copyfinal.sh b/.ci/copyfinal.sh
new file mode 100755
index 0000000..0e1fa55
--- /dev/null
+++ b/.ci/copyfinal.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+echo mkdir -p "./bin/${installname}"
+mkdir -p "./bin/${installname}"
+
+echo cp -r "/usr/local/spm/bin/${installname}" "./bin/"
+cp -r "/usr/local/spm/bin/${installname}" "./bin/"
+
+echo "/usr/local/spm/env/*.sh ./bin/${installname}/"
+cp /usr/local/spm/env/*.sh "./bin/${installname}/" || exit 1
+echo "cp /usr/local/spm/env/run${installname}.sh ./bin/${installname}/runenv.sh"
+cp "/usr/local/spm/env/run${installname}.sh" "./bin/${installname}/runenv.sh" || exit 1
diff --git a/.ci/copyspm.sh b/.ci/copyspm.sh
new file mode 100755
index 0000000..6cdf1aa
--- /dev/null
+++ b/.ci/copyspm.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+mkdir /usr/local/spm
+cp -r . /usr/local/spm
+export dir123=$(pwd)
+cd /usr/local/spm
diff --git a/.ci/run.sh b/.ci/run.sh
index 89461de..1c2a6a4 100755
--- a/.ci/run.sh
+++ b/.ci/run.sh
@@ -1,5 +1,5 @@
#!/bin/bash
cd scripts
-../.ci/retry.sh $* || exit 1
+$* || exit 1
cd ..
diff --git a/.ci/runretry.sh b/.ci/runretry.sh
new file mode 100755
index 0000000..89461de
--- /dev/null
+++ b/.ci/runretry.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+cd scripts
+../.ci/retry.sh $* || exit 1
+cd ..
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a50ef3b..a3e2fb2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,7 +24,7 @@ test:commands1:
stage: test
script:
- ./.ci/install.sh git-core bash gcc g++ make autoconf automake autopoint gettext
- - ./.ci/run.sh ./getsrc.sh zlib
+ - ./.ci/runretry.sh ./getsrc.sh zlib
- ls src/zlib
- ./.ci/run.sh ./build.sh zlib
- ls bin/zlib
@@ -33,7 +33,7 @@ test:commands1:
- ./.ci/run.sh ./clean.sh zlib
- mkdir bin/zlib
- ./.ci/run.sh ./clean.sh zlib
- - ./.ci/run.sh ./updatesrc.sh zlib
+ - ./.ci/runretry.sh ./updatesrc.sh zlib
variables:
srcbranch: v1.2.10
<<: *job-artifacts
@@ -43,7 +43,7 @@ test:commands2:
script:
- ./.ci/install.sh git-core bash gcc g++ make autoconf automake autopoint gettext
zlib1g-dev libtool
- - ./.ci/run.sh ./getsrc.sh curl
+ - ./.ci/runretry.sh ./getsrc.sh curl
- ls src/curl
- ./.ci/run.sh ./build.sh curl
- ls bin/curl
@@ -52,7 +52,7 @@ test:commands2:
- ./.ci/run.sh ./clean.sh curl
- mkdir bin/curl
- ./.ci/run.sh ./clean.sh curl
- - ./.ci/run.sh ./updatesrc.sh curl
+ - ./.ci/runretry.sh ./updatesrc.sh curl
variables:
srcbranch: curl-7_51_0
<<: *job-artifacts
diff --git a/packages/SDL.sh b/packages/SDL.sh
index 4b47b5a..159562a 100644
--- a/packages/SDL.sh
+++ b/packages/SDL.sh
@@ -5,7 +5,10 @@ DEFAULT_BRANCH="SDL-1.2"
ENV_PATH="bin"
ENV_LD_LIBRARY_PATH="lib"
ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_LDFLAGS_PATH="lib"
ENV_MANPATH="share/man"
+ENV_ACLOCAL_PATH="share/aclocal"
+ENV_CPPFLAGS_PATH="include/SDL"
BUILD_TYPE="configure"
SRC_INIT_COMMAND="./autogen.sh"
diff --git a/packages/SDL2.sh b/packages/SDL2.sh
new file mode 100644
index 0000000..feb1a13
--- /dev/null
+++ b/packages/SDL2.sh
@@ -0,0 +1,5 @@
+include "SDL"
+
+DEFAULT_BRANCH="default"
+
+ENV_CPPFLAGS_PATH="include/SDL2"
diff --git a/packages/SDL2_image.sh b/packages/SDL2_image.sh
new file mode 100644
index 0000000..aaa0399
--- /dev/null
+++ b/packages/SDL2_image.sh
@@ -0,0 +1,5 @@
+include "SDL_image"
+
+DEFAULT_BRANCH="default"
+
+ENV_CPPFLAGS_PATH="include/SDL2"
diff --git a/packages/SDL2_mixer.sh b/packages/SDL2_mixer.sh
new file mode 100644
index 0000000..9168396
--- /dev/null
+++ b/packages/SDL2_mixer.sh
@@ -0,0 +1,5 @@
+include "SDL_mixer"
+
+DEFAULT_BRANCH="default"
+
+ENV_CPPFLAGS_PATH="include/SDL2"
diff --git a/packages/SDL2_net.sh b/packages/SDL2_net.sh
new file mode 100644
index 0000000..07fb011
--- /dev/null
+++ b/packages/SDL2_net.sh
@@ -0,0 +1,5 @@
+include "SDL_net"
+
+DEFAULT_BRANCH="default"
+
+ENV_CPPFLAGS_PATH="include/SDL2"
diff --git a/packages/SDL2_ttf.sh b/packages/SDL2_ttf.sh
new file mode 100644
index 0000000..386091a
--- /dev/null
+++ b/packages/SDL2_ttf.sh
@@ -0,0 +1,5 @@
+include "SDL_ttf"
+
+DEFAULT_BRANCH="default"
+
+ENV_CPPFLAGS_PATH="include/SDL2"
diff --git a/packages/SDL_gfx.sh b/packages/SDL_gfx.sh
index 0e44dc2..7e51d60 100644
--- a/packages/SDL_gfx.sh
+++ b/packages/SDL_gfx.sh
@@ -1,8 +1,10 @@
SRCURL=https://github.com/ferzkopp/SDL_gfx.git
-DEFAULT_BRANCH="SDL-1.2"
+DEFAULT_BRANCH="master"
ENV_LD_LIBRARY_PATH="lib"
ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_LDFLAGS_PATH="lib"
+ENV_CPPFLAGS_PATH="include/SDL"
BUILD_TYPE="configure"
SRC_INIT_COMMAND="./autogen.sh"
diff --git a/packages/SDL_image.sh b/packages/SDL_image.sh
index 0e8f8cc..22d2812 100644
--- a/packages/SDL_image.sh
+++ b/packages/SDL_image.sh
@@ -4,6 +4,8 @@ DEFAULT_BRANCH="SDL-1.2"
ENV_LD_LIBRARY_PATH="lib"
ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_LDFLAGS_PATH="lib"
+ENV_CPPFLAGS_PATH="include/SDL"
BUILD_TYPE="configure"
SRC_INIT_COMMAND="./autogen.sh"
diff --git a/packages/SDL_mixer.sh b/packages/SDL_mixer.sh
index 7f53d17..42e0efc 100644
--- a/packages/SDL_mixer.sh
+++ b/packages/SDL_mixer.sh
@@ -4,6 +4,8 @@ DEFAULT_BRANCH="SDL-1.2"
ENV_LD_LIBRARY_PATH="lib"
ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_LDFLAGS_PATH="lib"
+ENV_CPPFLAGS_PATH="include/SDL"
BUILD_TYPE="configure"
SRC_INIT_COMMAND="./autogen.sh"
diff --git a/packages/SDL_net.sh b/packages/SDL_net.sh
index 5b55d35..524fa02 100644
--- a/packages/SDL_net.sh
+++ b/packages/SDL_net.sh
@@ -4,6 +4,8 @@ DEFAULT_BRANCH="SDL-1.2"
ENV_LD_LIBRARY_PATH="lib"
ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_LDFLAGS_PATH="lib"
+ENV_CPPFLAGS_PATH="include/SDL"
BUILD_TYPE="configure"
SRC_INIT_COMMAND="./autogen.sh"
diff --git a/packages/SDL_ttf.sh b/packages/SDL_ttf.sh
index 4e3696b..392f425 100644
--- a/packages/SDL_ttf.sh
+++ b/packages/SDL_ttf.sh
@@ -4,6 +4,8 @@ DEFAULT_BRANCH="SDL-1.2"
ENV_LD_LIBRARY_PATH="lib"
ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_LDFLAGS_PATH="lib"
+ENV_CPPFLAGS_PATH="include/SDL"
BUILD_TYPE="configure"
SRC_INIT_COMMAND="./autogen.sh"
diff --git a/packages/cmake.sh b/packages/cmake.sh
index 9d43972..ef152e0 100644
--- a/packages/cmake.sh
+++ b/packages/cmake.sh
@@ -2,5 +2,6 @@ SRCURL=git://cmake.org/cmake.git
DEFAULT_BRANCH="v3.7.2"
ENV_PATH="bin"
+ENV_ACLOCAL_PATH="share/aclocal"
BUILD_TYPE="cmake"
diff --git a/packages/curl.sh b/packages/curl.sh
index 58ba51e..bc0c3a2 100644
--- a/packages/curl.sh
+++ b/packages/curl.sh
@@ -3,7 +3,9 @@ SRCURL=https://github.com/curl/curl.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"
ENABLE_SAME_DIR_BUILD="true"
diff --git a/packages/freetype.sh b/packages/freetype.sh
new file mode 100644
index 0000000..659cb60
--- /dev/null
+++ b/packages/freetype.sh
@@ -0,0 +1,12 @@
+SRCURL=git://git.sv.nongnu.org/freetype/freetype2.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_ACLOCAL_PATH="share/aclocal"
+ENV_CPPFLAGS_PATH="include"
+
+BUILD_TYPE="automake"
+SRC_INIT_COMMAND="./autogen.sh"
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/gettext.sh b/packages/gettext.sh
new file mode 100644
index 0000000..9c3b01c
--- /dev/null
+++ b/packages/gettext.sh
@@ -0,0 +1,11 @@
+SRCURL=git://git.savannah.gnu.org/gettext.git
+
+ENV_PATH="bin:lib:include:lib/gettext"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_LDFLAGS_PATH="lib"
+ENV_MANPATH="share/man"
+ENV_CPPFLAGS_PATH="include"
+ENV_ACLOCAL_PATH="share/aclocal"
+
+BUILD_TYPE="automake"
+SRC_INIT_COMMAND="./autogen.sh"
diff --git a/packages/libpng.sh b/packages/libpng.sh
index 9da9556..b4695f7 100644
--- a/packages/libpng.sh
+++ b/packages/libpng.sh
@@ -3,6 +3,8 @@ SRCURL=git://git.code.sf.net/p/libpng/code
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/libpngXX"
BUILD_TYPE="automake"
diff --git a/packages/libxml2.sh b/packages/libxml2.sh
index 0496bdf..b649b8f 100644
--- a/packages/libxml2.sh
+++ b/packages/libxml2.sh
@@ -3,7 +3,10 @@ SRCURL=git://git.gnome.org/libxml2
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_ACLOCAL_PATH="share/aclocal"
+ENV_CPPFLAGS_PATH="include/libxml2"
BUILD_TYPE="automake"
-CONFIGURE_FLAGS="--with-python-install-dir="${bindir}/lib/python""
+CONFIGURE_FLAGS="--without-python" \ No newline at end of file
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/musl.sh b/packages/musl.sh
new file mode 100644
index 0000000..3ee82b8
--- /dev/null
+++ b/packages/musl.sh
@@ -0,0 +1,9 @@
+SRCURL=git://git.musl-libc.org/musl
+DEFAULT_BRANCH="master"
+
+ENV_PATH="bin"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_LDFLAGS_PATH="lib"
+ENV_CPPFLAGS_PATH="include"
+
+BUILD_TYPE="configure"
diff --git a/packages/physfs.sh b/packages/physfs.sh
index 9addbb0..8bf51f6 100644
--- a/packages/physfs.sh
+++ b/packages/physfs.sh
@@ -5,5 +5,7 @@ DEFAULT_BRANCH="stable-2.0"
ENV_PATH="bin:lib:include"
ENV_LD_LIBRARY_PATH="lib"
ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_LDFLAGS_PATH="lib"
+ENV_CPPFLAGS_PATH="include"
BUILD_TYPE="cmake"
diff --git a/packages/physfs1.sh b/packages/physfs1.sh
new file mode 100644
index 0000000..5dc9a95
--- /dev/null
+++ b/packages/physfs1.sh
@@ -0,0 +1,11 @@
+SRCTYPE=hg
+SRCURL=https://hg.icculus.org/icculus/physfs/
+DEFAULT_BRANCH="stable-1.0"
+
+ENV_PATH="bin:lib:include"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_LDFLAGS_PATH="lib"
+ENV_CPPFLAGS_PATH="include"
+
+BUILD_TYPE="automake"
+SRC_INIT_COMMAND="./bootstrap"
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/packages/virglrenderer.sh b/packages/virglrenderer.sh
index 30eeabc..8c87c5b 100644
--- a/packages/virglrenderer.sh
+++ b/packages/virglrenderer.sh
@@ -3,7 +3,9 @@ SRCURL=git://people.freedesktop.org/~airlied/virglrenderer
ENV_PATH="bin"
ENV_LD_LIBRARY_PATH="lib"
ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_LDFLAGS_PATH="lib"
ENV_MANPATH="share/man"
+ENV_CPPFLAGS_PATH="include:include/virgl"
BUILD_TYPE="automake"
AUTORECONF_FLAGS="-v --install"
diff --git a/packages/zlib.sh b/packages/zlib.sh
index 5d30818..d3e4ade 100644
--- a/packages/zlib.sh
+++ b/packages/zlib.sh
@@ -4,7 +4,9 @@ DEFAULT_BRANCH="v1.2.11"
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"
ENABLE_SAME_DIR_BUILD="true"
diff --git a/packages/zlib_ng.sh b/packages/zlib_ng.sh
index 49af866..ad426ac 100644
--- a/packages/zlib_ng.sh
+++ b/packages/zlib_ng.sh
@@ -4,6 +4,8 @@ DEFAULT_BRANCH="develop"
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/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 0df1bba..382f8a5 100644
--- a/scripts/include/common.sh
+++ b/scripts/include/common.sh
@@ -78,11 +78,26 @@ function env_path {
check_error $?
}
+function env_aclocal_path {
+ echo "export ACLOCAL_PATH=${bindir}/$1:\$PATH" >>"${envfile}"
+ check_error $?
+}
+
function env_lib_library_path {
echo "export LD_LIBRARY_PATH=${bindir}/$1:\$LD_LIBRARY_PATH" >>"${envfile}"
check_error $?
}
+function env_ldflags_path {
+ echo "export LDFLAGS=${bindir}/$1 \$LDFLAGS" >>"${envfile}"
+ check_error $?
+}
+
+function env_cppflags_path {
+ echo "export CPPFLAGS=${bindir}/$1 \$CPPFLAGS" >>"${envfile}"
+ check_error $?
+}
+
function env_pkg_config_path {
echo "export PKG_CONFIG_PATH=${bindir}/$1:\$PKG_CONFIG_PATH" >>"${envfile}"
check_error $?
@@ -150,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 {
@@ -229,26 +254,52 @@ function run_switch_branch {
}
function repack_paths {
- if [[ "$1" == "" ]]; then
+ envvar="$1"
+ if [[ "$2" != "" ]]; then
+ envvar="$2"
+ fi
+ if [[ "$envvar" == "" ]]; then
return
fi
IFS=":"
packedpaths=""
- for var in $1
+ for var in $envvar
do
packedpaths="${packedpaths}${bindir}/$var:"
done
unset IFS
- echo "export $2=${packedpaths}\$$2" >>"${envfile}"
+ echo "export $3=\"${packedpaths}\$$3\"" >>"${envfile}"
+ check_error $?
+}
+
+function repack_flags {
+ envvar="$1"
+ if [[ "$2" != "" ]]; then
+ envvar="$2"
+ fi
+ if [[ "$envvar" == "" ]]; then
+ return
+ fi
+ IFS=":"
+ packedpaths=""
+ for var in $envvar
+ do
+ packedpaths="${packedpaths}${4}${bindir}/$var "
+ done
+ unset IFS
+ echo "export $3=\"${packedpaths}\$$3\"" >>"${envfile}"
check_error $?
}
function package_use {
echo "package_use"
- repack_paths "$ENV_PATH" "PATH"
- repack_paths "$ENV_LD_LIBRARY_PATH" "LD_LIBRARY_PATH"
- repack_paths "$ENV_PKG_CONFIG_PATH" "PKG_CONFIG_PATH"
- repack_paths "$ENV_MANPATH" "MANPATH"
+ repack_paths "$ENV_PATH" "$OVERRIDE_ENV_PATH" "PATH"
+ repack_paths "$ENV_LD_LIBRARY_PATH" "$OVERRIDE_ENV_LD_LIBRARY_PATH" "LD_LIBRARY_PATH"
+ repack_paths "$ENV_PKG_CONFIG_PATH" "$OVERRIDE_ENV_PKG_CONFIG_PATH" "PKG_CONFIG_PATH"
+ repack_paths "$ENV_MANPATH" "$OVERRIDE_ENV_MANPATH" "MANPATH"
+ repack_paths "$ENV_ACLOCAL_PATH" "$OVERRIDE_ENV_ACLOCAL_PATH" "ACLOCAL_PATH"
+ repack_flags "$ENV_LDFLAGS_PATH" "$OVERRIDE_ENV_LDFLAGS_PATH" "LDFLAGS" "-L"
+ repack_flags "$ENV_CPPFLAGS_PATH" "$OVERRIDE_ENV_CPPFLAGS_PATH" "CPPFLAGS" "-I"
}
function common_use_package {
@@ -266,6 +317,56 @@ 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 common_update_source_all {
+ cd ../src/
+ check_error $?
+ files="*"
+ for package in $files
+ do
+ cd ../scripts/
+ ./updatesrc.sh $package
+ check_error $?
+ done
+ unset files
+}
+
function package_get_source {
echo "package_get_source"
run_clone "${SRCURL}"
@@ -327,3 +428,7 @@ function package_build {
run_make
run_make_install
}
+
+function include {
+ source "./$1.sh"
+}
diff --git a/scripts/updatesrcall.sh b/scripts/updatesrcall.sh
new file mode 100755
index 0000000..6f42573
--- /dev/null
+++ b/scripts/updatesrcall.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+source ../scripts/include/common.sh
+
+common_update_source_all