aboutsummaryrefslogtreecommitdiff
path: root/system/sdl-jstest/sdl-jstest.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/sdl-jstest/sdl-jstest.SlackBuild')
-rw-r--r--system/sdl-jstest/sdl-jstest.SlackBuild42
1 files changed, 20 insertions, 22 deletions
diff --git a/system/sdl-jstest/sdl-jstest.SlackBuild b/system/sdl-jstest/sdl-jstest.SlackBuild
index f3861cd72e..9b81e4cd7b 100644
--- a/system/sdl-jstest/sdl-jstest.SlackBuild
+++ b/system/sdl-jstest/sdl-jstest.SlackBuild
@@ -22,6 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20250113 bkw:
+# - updated for latest git. upstream moved again, to github.
+# - remove check for missing SDL2, since we always have it.
+# - upstream has tags now, include in VERSION. I didn't use a tagged
+# release because there are a couple of bugfixes in later git that
+# look important (62124aa, 6f027d, 558c962, b770814 at least).
+
# 20180914 bkw:
# - updated for latest git. upstream moved to gitlab.
@@ -43,7 +50,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=sdl-jstest
-VERSION=${VERSION:-20180715_aafbdb1}
+VERSION=${VERSION:-0.2.2+20240331_60f6e62}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -67,16 +74,12 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
set -e
@@ -85,28 +88,26 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
- \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-
-# cmake doesn't autodetect when SDL2 is missing, help it out.
-pkg-config --exists sdl2 && SDL2OPT="ON" || SDL2OPT="OFF"
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
-# search for this in system-wide install dir, not current dir.
-sed -i 's,gamecontrollerdb.txt",/usr/share/sdl-jstest/&,' sdl2-jstest.c
+# 20250113 bkw: fix typo in --help message.
+sed -i '/printf/s,programm,program,g' src/*.c
+# 20250113 bkw: new WARNINGS and WERROR options default to off, but
+# set them to off explicitly in case upstream changes their mind later.
mkdir -p build
cd build
cmake \
- -DBUILD_SDL2_JSTEST=$SDL2OPT \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DWARNINGS=OFF \
+ -DWERROR=OFF \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_MANDIR=/usr/man \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DMAN_INSTALL_DIR=/usr/man \
-DCMAKE_BUILD_TYPE=Release ..
make
make install/strip DESTDIR=$PKG
@@ -114,16 +115,13 @@ cd ..
gzip $PKG/usr/man/man1/*.1
-# upstream doesn't (yet?) install this:
-mkdir -p $PKG/usr/share/$PRGNAM
-cat gamecontrollerdb.txt > $PKG/usr/share/$PRGNAM/gamecontrollerdb.txt
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README* LICENSE* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE