summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-03 00:07:48 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-03 00:07:48 +0300
commit8dc0d6e175aeadb00def65f00f049445dabc738d (patch)
treead220782073fce7cf91983af9a57794bf64cf867
parent31ce259791affb84bd1bfc81bf64cd69edc80d1e (diff)
downloadspm-8dc0d6e175aeadb00def65f00f049445dabc738d.tar.gz
spm-8dc0d6e175aeadb00def65f00f049445dabc738d.tar.bz2
spm-8dc0d6e175aeadb00def65f00f049445dabc738d.tar.xz
spm-8dc0d6e175aeadb00def65f00f049445dabc738d.zip
Add support for CPPFLAGS in packages.
New function env_cppflags_path New variable ENV_CPPFLAGS_PATH
-rw-r--r--packages/SDL.sh1
-rw-r--r--packages/SDL_gfx.sh1
-rw-r--r--packages/SDL_image.sh1
-rw-r--r--packages/SDL_mixer.sh1
-rw-r--r--packages/SDL_net.sh1
-rw-r--r--packages/SDL_ttf.sh1
-rw-r--r--packages/curl.sh1
-rw-r--r--packages/libpng.sh1
-rw-r--r--packages/libxml2.sh1
-rw-r--r--packages/physfs.sh1
-rw-r--r--packages/virglrenderer.sh1
-rw-r--r--packages/zlib.sh1
-rw-r--r--packages/zlib_ng.sh1
-rw-r--r--scripts/include/common.sh8
14 files changed, 20 insertions, 1 deletions
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 {