summaryrefslogtreecommitdiff
path: root/extra/source/fltk/fltk.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'extra/source/fltk/fltk.SlackBuild')
-rwxr-xr-xextra/source/fltk/fltk.SlackBuild18
1 files changed, 13 insertions, 5 deletions
diff --git a/extra/source/fltk/fltk.SlackBuild b/extra/source/fltk/fltk.SlackBuild
index bad81b3c..76d0aa5b 100755
--- a/extra/source/fltk/fltk.SlackBuild
+++ b/extra/source/fltk/fltk.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2015, 2018, 2021 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=fltk
-VERSION=$(basename $(echo $PKGNAM-*.tar.lz | cut -f 2- -d -) -source.tar.lz)
+SRCNAM=fltk-release
+VERSION=${VERSION:-$(echo $SRCNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
@@ -80,9 +81,9 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-${VERSION}-source.tar.lz || exit 1
-cd $PKGNAM-$VERSION || exit 1
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-${VERSION}.tar.lz || exit 1
+cd $SRCNAM-$VERSION || exit 1
zcat $CWD/fltk.fltk-config.in.diff.gz | patch -p1 --verbose || exit 1
@@ -94,6 +95,13 @@ find . \
-exec chmod 644 {} \+
# Configure:
+if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
+fi
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \