From 0a3599e622713e1cc3ffcc47de4f6eba33b9c352 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 2 Feb 2017 17:08:01 +0300 Subject: Fix SDL_gfx default branch. --- packages/SDL_gfx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SDL_gfx.sh b/packages/SDL_gfx.sh index 0e44dc2..f454041 100644 --- a/packages/SDL_gfx.sh +++ b/packages/SDL_gfx.sh @@ -1,5 +1,5 @@ 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" -- cgit v1.2.3-70-g09d2 From f1855d38361f0c7c76e2bf063ed3243836afd1de Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 2 Feb 2017 18:26:28 +0300 Subject: Add support for ACLOCAL_PATH in packages. New function env_aclocal_path New variable ENV_ACLOCAL_PATH --- scripts/include/common.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/include/common.sh b/scripts/include/common.sh index 0df1bba..c61111f 100644 --- a/scripts/include/common.sh +++ b/scripts/include/common.sh @@ -78,6 +78,11 @@ 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 $? @@ -249,6 +254,7 @@ function package_use { 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_ACLOCAL_PATH" "ACLOCAL_PATH" } function common_use_package { -- cgit v1.2.3-70-g09d2 From ed915552cf9cb8b9c269b02ef79b0c3d1aab87cb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 2 Feb 2017 18:30:16 +0300 Subject: Add variable ENV_ACLOCAL_PATH into existing packages. --- packages/SDL.sh | 1 + packages/cmake.sh | 1 + packages/libxml2.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/SDL.sh b/packages/SDL.sh index 4b47b5a..23de6f6 100644 --- a/packages/SDL.sh +++ b/packages/SDL.sh @@ -6,6 +6,7 @@ ENV_PATH="bin" ENV_LD_LIBRARY_PATH="lib" ENV_PKG_CONFIG_PATH="lib/pkgconfig" ENV_MANPATH="share/man" +ENV_ACLOCAL_PATH="share/aclocal" 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/libxml2.sh b/packages/libxml2.sh index 0496bdf..40be7d6 100644 --- a/packages/libxml2.sh +++ b/packages/libxml2.sh @@ -4,6 +4,7 @@ ENV_PATH="bin:lib:include" ENV_LD_LIBRARY_PATH="lib" ENV_PKG_CONFIG_PATH="lib/pkgconfig" ENV_MANPATH="share/man" +ENV_ACLOCAL_PATH="share/aclocal" BUILD_TYPE="automake" CONFIGURE_FLAGS="--with-python-install-dir="${bindir}/lib/python"" -- cgit v1.2.3-70-g09d2 From 31ce259791affb84bd1bfc81bf64cd69edc80d1e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 2 Feb 2017 23:46:27 +0300 Subject: Add support for LDFLAGS in packages. New function env_ldflags_path New variable ENV_LDFLAGS_PATH --- packages/SDL.sh | 1 + packages/SDL_gfx.sh | 1 + packages/SDL_image.sh | 1 + packages/SDL_mixer.sh | 1 + packages/SDL_net.sh | 1 + packages/SDL_ttf.sh | 1 + packages/curl.sh | 1 + packages/libpng.sh | 1 + packages/libxml2.sh | 1 + packages/physfs.sh | 1 + packages/virglrenderer.sh | 1 + packages/zlib.sh | 1 + packages/zlib_ng.sh | 1 + scripts/include/common.sh | 23 ++++++++++++++++++++++- 14 files changed, 35 insertions(+), 1 deletion(-) diff --git a/packages/SDL.sh b/packages/SDL.sh index 23de6f6..49583c5 100644 --- a/packages/SDL.sh +++ b/packages/SDL.sh @@ -5,6 +5,7 @@ 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" diff --git a/packages/SDL_gfx.sh b/packages/SDL_gfx.sh index f454041..af718de 100644 --- a/packages/SDL_gfx.sh +++ b/packages/SDL_gfx.sh @@ -3,6 +3,7 @@ DEFAULT_BRANCH="master" ENV_LD_LIBRARY_PATH="lib" ENV_PKG_CONFIG_PATH="lib/pkgconfig" +ENV_LDFLAGS_PATH="lib" BUILD_TYPE="configure" SRC_INIT_COMMAND="./autogen.sh" diff --git a/packages/SDL_image.sh b/packages/SDL_image.sh index 0e8f8cc..9a9c255 100644 --- a/packages/SDL_image.sh +++ b/packages/SDL_image.sh @@ -4,6 +4,7 @@ DEFAULT_BRANCH="SDL-1.2" ENV_LD_LIBRARY_PATH="lib" ENV_PKG_CONFIG_PATH="lib/pkgconfig" +ENV_LDFLAGS_PATH="lib" BUILD_TYPE="configure" SRC_INIT_COMMAND="./autogen.sh" diff --git a/packages/SDL_mixer.sh b/packages/SDL_mixer.sh index 7f53d17..44850f3 100644 --- a/packages/SDL_mixer.sh +++ b/packages/SDL_mixer.sh @@ -4,6 +4,7 @@ DEFAULT_BRANCH="SDL-1.2" ENV_LD_LIBRARY_PATH="lib" ENV_PKG_CONFIG_PATH="lib/pkgconfig" +ENV_LDFLAGS_PATH="lib" BUILD_TYPE="configure" SRC_INIT_COMMAND="./autogen.sh" diff --git a/packages/SDL_net.sh b/packages/SDL_net.sh index 5b55d35..123d479 100644 --- a/packages/SDL_net.sh +++ b/packages/SDL_net.sh @@ -4,6 +4,7 @@ DEFAULT_BRANCH="SDL-1.2" ENV_LD_LIBRARY_PATH="lib" ENV_PKG_CONFIG_PATH="lib/pkgconfig" +ENV_LDFLAGS_PATH="lib" BUILD_TYPE="configure" SRC_INIT_COMMAND="./autogen.sh" diff --git a/packages/SDL_ttf.sh b/packages/SDL_ttf.sh index 4e3696b..66d71b3 100644 --- a/packages/SDL_ttf.sh +++ b/packages/SDL_ttf.sh @@ -4,6 +4,7 @@ DEFAULT_BRANCH="SDL-1.2" ENV_LD_LIBRARY_PATH="lib" ENV_PKG_CONFIG_PATH="lib/pkgconfig" +ENV_LDFLAGS_PATH="lib" BUILD_TYPE="configure" SRC_INIT_COMMAND="./autogen.sh" diff --git a/packages/curl.sh b/packages/curl.sh index 58ba51e..812ac51 100644 --- a/packages/curl.sh +++ b/packages/curl.sh @@ -3,6 +3,7 @@ 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" ENABLE_SAME_DIR_BUILD="true" diff --git a/packages/libpng.sh b/packages/libpng.sh index 9da9556..0ef8750 100644 --- a/packages/libpng.sh +++ b/packages/libpng.sh @@ -3,6 +3,7 @@ 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" BUILD_TYPE="automake" diff --git a/packages/libxml2.sh b/packages/libxml2.sh index 40be7d6..2001e19 100644 --- a/packages/libxml2.sh +++ b/packages/libxml2.sh @@ -3,6 +3,7 @@ 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" diff --git a/packages/physfs.sh b/packages/physfs.sh index 9addbb0..fedb9de 100644 --- a/packages/physfs.sh +++ b/packages/physfs.sh @@ -5,5 +5,6 @@ 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" BUILD_TYPE="cmake" diff --git a/packages/virglrenderer.sh b/packages/virglrenderer.sh index 30eeabc..581e2cd 100644 --- a/packages/virglrenderer.sh +++ b/packages/virglrenderer.sh @@ -3,6 +3,7 @@ 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" BUILD_TYPE="automake" diff --git a/packages/zlib.sh b/packages/zlib.sh index 5d30818..a95d832 100644 --- a/packages/zlib.sh +++ b/packages/zlib.sh @@ -4,6 +4,7 @@ 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" ENABLE_SAME_DIR_BUILD="true" diff --git a/packages/zlib_ng.sh b/packages/zlib_ng.sh index 49af866..04d1d71 100644 --- a/packages/zlib_ng.sh +++ b/packages/zlib_ng.sh @@ -4,6 +4,7 @@ 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" BUILD_TYPE="configure" diff --git a/scripts/include/common.sh b/scripts/include/common.sh index c61111f..3df470a 100644 --- a/scripts/include/common.sh +++ b/scripts/include/common.sh @@ -88,6 +88,11 @@ function env_lib_library_path { check_error $? } +function env_ldflags_path { + echo "export LDFLAGS=${bindir}/$1 \$LDFLAGS" >>"${envfile}" + check_error $? +} + function env_pkg_config_path { echo "export PKG_CONFIG_PATH=${bindir}/$1:\$PKG_CONFIG_PATH" >>"${envfile}" check_error $? @@ -244,7 +249,22 @@ function repack_paths { packedpaths="${packedpaths}${bindir}/$var:" done unset IFS - echo "export $2=${packedpaths}\$$2" >>"${envfile}" + echo "export $2=\"${packedpaths}\$$2\"" >>"${envfile}" + check_error $? +} + +function repack_flags { + if [[ "$1" == "" ]]; then + return + fi + IFS=":" + packedpaths="" + for var in $1 + do + packedpaths="${3}${packedpaths}${bindir}/$var " + done + unset IFS + echo "export $2=\"${packedpaths}\$$2\"" >>"${envfile}" check_error $? } @@ -255,6 +275,7 @@ function package_use { repack_paths "$ENV_PKG_CONFIG_PATH" "PKG_CONFIG_PATH" repack_paths "$ENV_MANPATH" "MANPATH" repack_paths "$ENV_ACLOCAL_PATH" "ACLOCAL_PATH" + repack_flags "$ENV_LDFLAGS_PATH" "LDFLAGS" "-L" } function common_use_package { -- cgit v1.2.3-70-g09d2 From 8dc0d6e175aeadb00def65f00f049445dabc738d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Feb 2017 00:07:48 +0300 Subject: Add support for CPPFLAGS in packages. New function env_cppflags_path New variable ENV_CPPFLAGS_PATH --- packages/SDL.sh | 1 + packages/SDL_gfx.sh | 1 + packages/SDL_image.sh | 1 + packages/SDL_mixer.sh | 1 + packages/SDL_net.sh | 1 + packages/SDL_ttf.sh | 1 + packages/curl.sh | 1 + packages/libpng.sh | 1 + packages/libxml2.sh | 1 + packages/physfs.sh | 1 + packages/virglrenderer.sh | 1 + packages/zlib.sh | 1 + packages/zlib_ng.sh | 1 + scripts/include/common.sh | 8 +++++++- 14 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/SDL.sh b/packages/SDL.sh index 49583c5..159562a 100644 --- a/packages/SDL.sh +++ b/packages/SDL.sh @@ -8,6 +8,7 @@ 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/SDL_gfx.sh b/packages/SDL_gfx.sh index af718de..7e51d60 100644 --- a/packages/SDL_gfx.sh +++ b/packages/SDL_gfx.sh @@ -4,6 +4,7 @@ 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 9a9c255..22d2812 100644 --- a/packages/SDL_image.sh +++ b/packages/SDL_image.sh @@ -5,6 +5,7 @@ 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 44850f3..42e0efc 100644 --- a/packages/SDL_mixer.sh +++ b/packages/SDL_mixer.sh @@ -5,6 +5,7 @@ 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 123d479..524fa02 100644 --- a/packages/SDL_net.sh +++ b/packages/SDL_net.sh @@ -5,6 +5,7 @@ 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 66d71b3..392f425 100644 --- a/packages/SDL_ttf.sh +++ b/packages/SDL_ttf.sh @@ -5,6 +5,7 @@ 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/curl.sh b/packages/curl.sh index 812ac51..bc0c3a2 100644 --- a/packages/curl.sh +++ b/packages/curl.sh @@ -5,6 +5,7 @@ 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/libpng.sh b/packages/libpng.sh index 0ef8750..b4695f7 100644 --- a/packages/libpng.sh +++ b/packages/libpng.sh @@ -5,5 +5,6 @@ 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 2001e19..894e58b 100644 --- a/packages/libxml2.sh +++ b/packages/libxml2.sh @@ -6,6 +6,7 @@ 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"" diff --git a/packages/physfs.sh b/packages/physfs.sh index fedb9de..8bf51f6 100644 --- a/packages/physfs.sh +++ b/packages/physfs.sh @@ -6,5 +6,6 @@ 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/virglrenderer.sh b/packages/virglrenderer.sh index 581e2cd..8c87c5b 100644 --- a/packages/virglrenderer.sh +++ b/packages/virglrenderer.sh @@ -5,6 +5,7 @@ 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 a95d832..d3e4ade 100644 --- a/packages/zlib.sh +++ b/packages/zlib.sh @@ -6,6 +6,7 @@ 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 04d1d71..ad426ac 100644 --- a/packages/zlib_ng.sh +++ b/packages/zlib_ng.sh @@ -6,5 +6,6 @@ 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/include/common.sh b/scripts/include/common.sh index 3df470a..d57879b 100644 --- a/scripts/include/common.sh +++ b/scripts/include/common.sh @@ -93,6 +93,11 @@ function env_ldflags_path { 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 $? @@ -261,7 +266,7 @@ function repack_flags { packedpaths="" for var in $1 do - packedpaths="${3}${packedpaths}${bindir}/$var " + packedpaths="${packedpaths}${3}${bindir}/$var " done unset IFS echo "export $2=\"${packedpaths}\$$2\"" >>"${envfile}" @@ -276,6 +281,7 @@ function package_use { repack_paths "$ENV_MANPATH" "MANPATH" repack_paths "$ENV_ACLOCAL_PATH" "ACLOCAL_PATH" repack_flags "$ENV_LDFLAGS_PATH" "LDFLAGS" "-L" + repack_flags "$ENV_CPPFLAGS_PATH" "CPPFLAGS" "-I" } function common_use_package { -- cgit v1.2.3-70-g09d2 From ab41e5f152db6a087feab02da111a4f6dcb5c7ea Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Feb 2017 04:21:46 +0300 Subject: Update ci scripts for support mulyple libs to build and pack in one dir. --- .ci/buildlib.sh | 21 ++++----------------- .ci/copyfinal.sh | 12 ++++++++++++ .ci/copyspm.sh | 6 ++++++ .ci/run.sh | 2 +- .ci/runretry.sh | 5 +++++ .gitlab-ci.yml | 8 ++++---- 6 files changed, 32 insertions(+), 22 deletions(-) create mode 100755 .ci/copyfinal.sh create mode 100755 .ci/copyspm.sh create mode 100755 .ci/runretry.sh 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..562a735 --- /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}/bin/" +cp /usr/local/spm/env/*.sh "./bin/${installname}/bin/" || exit 1 +echo "cp /usr/local/spm/env/run${installname}.sh ./bin/${installname}/bin/runenv.sh" +cp "/usr/local/spm/env/run${installname}.sh" "./bin/${installname}/bin/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 0d7d915..dde9e7e 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 -- cgit v1.2.3-70-g09d2 From 5de4a5d0a68dbf80c718bacd4baac2ff25682f1c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Feb 2017 05:14:45 +0300 Subject: Fix copy env files in ci script copyfinal.sh --- .ci/copyfinal.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/copyfinal.sh b/.ci/copyfinal.sh index 562a735..0e1fa55 100755 --- a/.ci/copyfinal.sh +++ b/.ci/copyfinal.sh @@ -6,7 +6,7 @@ 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}/bin/" -cp /usr/local/spm/env/*.sh "./bin/${installname}/bin/" || exit 1 -echo "cp /usr/local/spm/env/run${installname}.sh ./bin/${installname}/bin/runenv.sh" -cp "/usr/local/spm/env/run${installname}.sh" "./bin/${installname}/bin/runenv.sh" || exit 1 +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 -- cgit v1.2.3-70-g09d2 From 8465039bb6a4f2e8886d17f61d7343892c5b9b45 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Feb 2017 19:23:59 +0300 Subject: Add freetype package. --- packages/freetype.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 packages/freetype.sh 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" -- cgit v1.2.3-70-g09d2 From b6c965589911ab9ef671d692612b0df9cf97b1fb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Feb 2017 21:38:19 +0300 Subject: Add support for script variables for override package path variabled. New variables: OVERRIDE_ENV_NAME Example: OVERRIDE_ENV_MANPATH="/dir" --- scripts/include/common.sh | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/scripts/include/common.sh b/scripts/include/common.sh index d57879b..6c2a7e7 100644 --- a/scripts/include/common.sh +++ b/scripts/include/common.sh @@ -244,44 +244,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 { - 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}${3}${bindir}/$var " + packedpaths="${packedpaths}${4}${bindir}/$var " done unset IFS - echo "export $2=\"${packedpaths}\$$2\"" >>"${envfile}" + 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_ACLOCAL_PATH" "ACLOCAL_PATH" - repack_flags "$ENV_LDFLAGS_PATH" "LDFLAGS" "-L" - repack_flags "$ENV_CPPFLAGS_PATH" "CPPFLAGS" "-I" + 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 { -- cgit v1.2.3-70-g09d2 From 6471091f99c78563e785f8740dcab0dc87825ee4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Feb 2017 21:46:19 +0300 Subject: Add support for include command in packages. for include other package definition. --- scripts/include/common.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/include/common.sh b/scripts/include/common.sh index 6c2a7e7..e54922b 100644 --- a/scripts/include/common.sh +++ b/scripts/include/common.sh @@ -368,3 +368,7 @@ function package_build { run_make run_make_install } + +function include { + source "./$1.sh" +} -- cgit v1.2.3-70-g09d2 From 3560a75367079de74aa34d2a58fdaf417e892ef4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Feb 2017 21:49:51 +0300 Subject: Add SDL2 packages based on SDL packages. --- packages/SDL2.sh | 5 +++++ packages/SDL2_image.h | 5 +++++ packages/SDL2_mixer.sh | 5 +++++ packages/SDL2_net.sh | 5 +++++ packages/SDL2_ttf.sh | 5 +++++ 5 files changed, 25 insertions(+) create mode 100644 packages/SDL2.sh create mode 100644 packages/SDL2_image.h create mode 100644 packages/SDL2_mixer.sh create mode 100644 packages/SDL2_net.sh create mode 100644 packages/SDL2_ttf.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.h b/packages/SDL2_image.h new file mode 100644 index 0000000..aaa0399 --- /dev/null +++ b/packages/SDL2_image.h @@ -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" -- cgit v1.2.3-70-g09d2 From 9b9fe1fd0d14a862f107617f844812d7833a0eb0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Feb 2017 22:47:18 +0300 Subject: Fix typo in package name (SDL2_image) --- packages/SDL2_image.h | 5 ----- packages/SDL2_image.sh | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 packages/SDL2_image.h create mode 100644 packages/SDL2_image.sh diff --git a/packages/SDL2_image.h b/packages/SDL2_image.h deleted file mode 100644 index aaa0399..0000000 --- a/packages/SDL2_image.h +++ /dev/null @@ -1,5 +0,0 @@ -include "SDL_image" - -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" -- cgit v1.2.3-70-g09d2 From eb4b914cd5148789bfcdeae86a7fc06f2c100342 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 5 Feb 2017 04:25:36 +0300 Subject: Add musl package. --- packages/musl.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 packages/musl.sh 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" -- cgit v1.2.3-70-g09d2 From f5166c48d66a290dd8461ea1d2d2b5cac6b3f966 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Feb 2017 11:29:33 +0300 Subject: Disable python libs in libxml2 package. --- packages/libxml2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/libxml2.sh b/packages/libxml2.sh index 894e58b..b649b8f 100644 --- a/packages/libxml2.sh +++ b/packages/libxml2.sh @@ -9,4 +9,4 @@ 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 -- cgit v1.2.3-70-g09d2 From 4c2d4aa8560bd2226957b437b9cf3af80434dc44 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Feb 2017 16:34:51 +0300 Subject: Add package physfs1. --- packages/physfs1.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 packages/physfs1.sh 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" -- cgit v1.2.3-70-g09d2 From eca2e3e1ff782793bdfd4c339995bb714bdc5613 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 7 Feb 2017 03:22:58 +0300 Subject: Add gettext package. --- packages/gettext.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 packages/gettext.sh 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" -- cgit v1.2.3-70-g09d2 From bff9c4ebee5b03bb7a9fc09e1c4a1d722849e52f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 7 Feb 2017 18:37:08 +0300 Subject: Add pugixml package. --- packages/pugixml.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 packages/pugixml.sh 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" -- cgit v1.2.3-70-g09d2 From 8a29451260cb6fea479af6d1f8efadaa51b191a9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 7 Feb 2017 18:58:56 +0300 Subject: Add tinyxml2 package. --- packages/tinyxml2.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 packages/tinyxml2.sh 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" -- cgit v1.2.3-70-g09d2 From 8b903a56377c08a4707b29f33b033985160df907 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 12 Feb 2017 20:34:41 +0300 Subject: Add libzip package. --- packages/libzip.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 packages/libzip.sh 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" -- cgit v1.2.3-70-g09d2 From 69b5d20e8f31f5e0097b20137d993a19eb2936aa Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 13 Feb 2017 03:58:34 +0300 Subject: Add python package (cpython) --- packages/python.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 packages/python.sh 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" -- cgit v1.2.3-70-g09d2 From cbb68a99b5c02c5601fb9e6c135d1b4e7764068d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 17 Feb 2017 14:40:31 +0300 Subject: Add support for environment variable jobs. It set jobs number for make. If jobs unset, it autodetected based on number of cpu cores. --- scripts/include/common.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/include/common.sh b/scripts/include/common.sh index e54922b..e348e5d 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 { -- cgit v1.2.3-70-g09d2 From 1528b12272f6188677eadd9ace5bd1c994f326a9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 17 Feb 2017 14:41:36 +0300 Subject: Add gcc package. --- packages/gcc.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 packages/gcc.sh diff --git a/packages/gcc.sh b/packages/gcc.sh new file mode 100644 index 0000000..af03647 --- /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" +ENV_LD_LIBRARY_PATH="lib:lib64:lib32" -- cgit v1.2.3-70-g09d2 From 26963774ad4028ed7ccf8316b44f5d3c42ff7706 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 17 Feb 2017 18:36:55 +0300 Subject: Add script buildonly.sh for build without environment file creation. --- scripts/buildonly.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/buildonly.sh 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 -- cgit v1.2.3-70-g09d2 From da4686d2cab1914719643f6a0d7e53adf7e2666c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 17 Feb 2017 18:41:48 +0300 Subject: Add script createenv.sh for create environment file. --- scripts/createenv.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/createenv.sh 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 -- cgit v1.2.3-70-g09d2 From 4f66c6c7df447be0a2bfc404c2371ef206a8fdc9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 17 Feb 2017 19:08:28 +0300 Subject: Add script for create environment file from more than one package. New script name: createenvs.sh envname package1 [package2 ...] Example: ./createenvs.sh sdl1 SDL SDL_image SDL_ttf SDL_net SDL_gfx SDL_mixer --- scripts/createenvs.sh | 5 +++++ scripts/include/common.sh | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100755 scripts/createenvs.sh 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 e348e5d..e7e8f8c 100644 --- a/scripts/include/common.sh +++ b/scripts/include/common.sh @@ -317,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}" -- cgit v1.2.3-70-g09d2 From d5599a0a6c9b0f53765c894a2f1bbf8880f44d07 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 17 Feb 2017 19:12:55 +0300 Subject: Add package ustl. --- packages/ustl.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 packages/ustl.sh 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" -- cgit v1.2.3-70-g09d2 From 59b1bb420f2a713e8efa96fd1edba44f37676f94 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 17 Feb 2017 19:56:20 +0300 Subject: Disable multilib in gcc package. --- packages/gcc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gcc.sh b/packages/gcc.sh index af03647..f1f59cb 100644 --- a/packages/gcc.sh +++ b/packages/gcc.sh @@ -8,5 +8,5 @@ ENV_MANPATH="share/man" BUILD_TYPE="automake" -CONFIGURE_FLAGS="--enable-languages=c,c++,lto" +CONFIGURE_FLAGS="--enable-languages=c,c++,lto --disable-multilib" ENV_LD_LIBRARY_PATH="lib:lib64:lib32" -- cgit v1.2.3-70-g09d2 From 3b5049928a6c82ce72f99cf07ef40499f027160d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 19 Feb 2017 03:15:27 +0300 Subject: Add script for update all downloaded sources. New script: updatesrcall.sh --- scripts/include/common.sh | 13 +++++++++++++ scripts/updatesrcall.sh | 5 +++++ 2 files changed, 18 insertions(+) create mode 100755 scripts/updatesrcall.sh diff --git a/scripts/include/common.sh b/scripts/include/common.sh index e7e8f8c..382f8a5 100644 --- a/scripts/include/common.sh +++ b/scripts/include/common.sh @@ -354,6 +354,19 @@ function common_use_packages { 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}" 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 -- cgit v1.2.3-70-g09d2