aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2013-11-24 10:38:17 -0500
committerdsomero <xgizzmo@slackbuilds.org>2013-11-24 15:28:02 -0500
commit7bc7feac90a3966ebaea1b1ad87431764a560344 (patch)
treeea77c05f9c11a9a5bcd46a76899df878ed57e1f4
parent1637b2a07f2ec005075b191f5646f59f9bc756fc (diff)
academic/grass: Fix some bashisms.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
-rw-r--r--academic/grass/grass.SlackBuild29
1 files changed, 13 insertions, 16 deletions
diff --git a/academic/grass/grass.SlackBuild b/academic/grass/grass.SlackBuild
index d0066e508f24..970d32881e3a 100644
--- a/academic/grass/grass.SlackBuild
+++ b/academic/grass/grass.SlackBuild
@@ -70,33 +70,25 @@ find -L . \
-exec chmod 644 {} \;
# Option handling:
-# $WITHLIST has to be an array due to embedded spaces in the ffmpeg includes :-(
set -- $(echo $ENABLE | sed 's/,/ /g')
-withnum=0
-while [[ "$1" != "" ]]; do
+
+while [ "$1" != "" ]; do
case "$1"
in
blas | \
lapack | \
+ ffmpeg | \
sqlite )
- WITHLIST[$((withnum++))]="--with-$1"
+ WITHLIST="$WITHLIST --with-$1"
shift
;;
mysql | mariadb )
- WITHLIST[$((withnum++))]="--with-mysql"
- WITHLIST[$((withnum++))]="--with-mysql-includes=/usr/include/mysql"
+ WITHLIST="$WITHLIST --with-mysql"
+ WITHLIST="$WITHLIST --with-mysql-includes=/usr/include/mysql"
shift
;;
postgres | postgresql )
- WITHLIST[$((withnum++))]="--with-postgres"
- shift
- ;;
- ffmpeg )
- FFINCL="/usr/include/libavcodec /usr/include/libavdevice /usr/include/libavfilter \
- /usr/include/libavformat /usr/include/libavutil /usr/include/libpostproc \
- /usr/include/libswresample /usr/include/libswscale"
- WITHLIST[$((withnum++))]="--with-ffmpeg"
- WITHLIST[$((withnum++))]="--with-ffmpeg-includes=$FFINCL"
+ WITHLIST="$WITHLIST --with-postgres"
shift
;;
* )
@@ -112,6 +104,8 @@ else
fi
# geos now always enabled: it's an indirect hard dep (via gdal), and makes grass nicer :-)
+# ffmpeg includes are only parsed if ffmpeg is enabled so it is safe to pass them to configure.
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS -fpermissive" \
LDFLAGS="-ldl -lncurses" \
@@ -128,8 +122,11 @@ LDFLAGS="-ldl -lncurses" \
--with-wxwidgets \
--with-geos \
--enable-largefile \
- "${WITHLIST[@]}" \
+ $WITHLIST \
$BITNESS \
+ --with-ffmpeg-includes="/usr/include/libavcodec /usr/include/libavdevice \
+ /usr/include/libavfilter /usr/include/libavformat /usr/include/libavutil \
+ /usr/include/libpostproc /usr/include/libswresample /usr/include/libswscale" \
--build=$ARCH-slackware-linux \
--host=$ARCH-slackware-linux