aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 d0066e508f243..970d32881e3a0 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