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.SlackBuild30
1 files changed, 18 insertions, 12 deletions
diff --git a/system/sdl-jstest/sdl-jstest.SlackBuild b/system/sdl-jstest/sdl-jstest.SlackBuild
index 80840f5df18d..c5a1e0ee7b5b 100644
--- a/system/sdl-jstest/sdl-jstest.SlackBuild
+++ b/system/sdl-jstest/sdl-jstest.SlackBuild
@@ -22,6 +22,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20180914 bkw:
+# - updated for latest git. upstream moved to gitlab.
+
# 20161017 bkw:
# - updated for latest git
# - redo no_sdl2.diff for new version
@@ -38,7 +41,7 @@
# if installed
PRGNAM=sdl-jstest
-VERSION=${VERSION:-20160824git}
+VERSION=${VERSION:-20180715_aafbdb1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -78,20 +81,19 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-# upstream made SDL2 required, let's undo that if SDL2 is missing.
-if ! pkg-config --exists sdl2; then
- patch -p1 < $CWD/no_sdl2.diff
-fi
+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"
+
+# search for this in system-wide install dir, not current dir.
+sed -i 's,gamecontrollerdb.txt",/usr/share/sdl-jstest/&,' sdl2-jstest.c
mkdir -p build
cd build
cmake \
+ -DBUILD_SDL2_JSTEST=$SDL2OPT \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -105,8 +107,12 @@ 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* $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