diff options
author | B. Watson <yalhcru@gmail.com> | 2018-09-14 15:51:44 -0400 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2018-09-15 19:23:41 +0100 |
commit | d374cca50ca8f0de07581cc46d64741f154a940f (patch) | |
tree | cf5b81b46249d05e184d2352053eb2877b7f3dd5 /system | |
parent | d0a9c5fb70200a5557de32f6ed59715982884dc1 (diff) | |
download | slackbuilds-d374cca50ca8f0de07581cc46d64741f154a940f.tar.gz |
system/sdl-jstest: Updated for version 20180715_aafbdb1.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'system')
-rw-r--r-- | system/sdl-jstest/README | 2 | ||||
-rw-r--r-- | system/sdl-jstest/git2tarxz.sh | 50 | ||||
-rw-r--r-- | system/sdl-jstest/no_sdl2.diff | 52 | ||||
-rw-r--r-- | system/sdl-jstest/sdl-jstest.SlackBuild | 30 | ||||
-rw-r--r-- | system/sdl-jstest/sdl-jstest.info | 8 | ||||
-rw-r--r-- | system/sdl-jstest/slack-desc | 2 |
6 files changed, 75 insertions, 69 deletions
diff --git a/system/sdl-jstest/README b/system/sdl-jstest/README index bdbbc2369f..3e1a770d74 100644 --- a/system/sdl-jstest/README +++ b/system/sdl-jstest/README @@ -1,3 +1,5 @@ +sdl-jstest (SDL joystick test utility) + sdl-jstest is a simple program that lets you find out how many joysticks SDL detected on your system, how many axes, buttons, hats and balls they have each. It also lets you test the joysticks by diff --git a/system/sdl-jstest/git2tarxz.sh b/system/sdl-jstest/git2tarxz.sh new file mode 100644 index 0000000000..627abe3e96 --- /dev/null +++ b/system/sdl-jstest/git2tarxz.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +# Create source tarball from sdl-jstest git repo, with generated version +# number. Since the build expects to have the git log available (for +# embedding the git hash in --version output), don't rm -rf .git, +# but do use --depth 1 when cloning. + +# Note that this script doesn't need to be run as root. It does need to +# be able to write to the current directory it's run from. + +# Takes one optional argument, which is the commit or tag to create a +# tarball of. With no arg, HEAD is used. + +PRGNAM=sdl-jstest +CLONE_URL=https://gitlab.com/$PRGNAM/$PRGNAM.git + +set -e + +GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX ) +rm -rf $GITDIR +git clone --depth 1 $CLONE_URL $GITDIR + +CWD="$( pwd )" +cd $GITDIR + +if [ "$1" != "" ]; then + git reset --hard "$1" || exit 1 +fi + +git submodule update --init --recursive + +GIT_SHA=$( git rev-parse --short HEAD ) + +DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 ) + +VERSION=${DATE}_${GIT_SHA} + +mv .git .keep.git +find . -name .git\* -print0 | xargs -0 rm -rf +mv .keep.git .git +rm -rf .git/modules .git/hooks + +cd "$CWD" +rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz +mv $GITDIR $PRGNAM-$VERSION +tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION + +echo +echo "Created tarball: $PRGNAM-$VERSION.tar.xz" +echo "VERSION=$VERSION" diff --git a/system/sdl-jstest/no_sdl2.diff b/system/sdl-jstest/no_sdl2.diff deleted file mode 100644 index 5a008d15fa..0000000000 --- a/system/sdl-jstest/no_sdl2.diff +++ /dev/null @@ -1,52 +0,0 @@ -diff -Naur sdl-jstest-20160824git/CMakeLists.txt sdl-jstest-20160824git.patched/CMakeLists.txt ---- sdl-jstest-20160824git/CMakeLists.txt 2016-10-17 15:36:01.184523186 -0400 -+++ sdl-jstest-20160824git.patched/CMakeLists.txt 2016-10-17 15:44:48.393556770 -0400 -@@ -23,7 +23,6 @@ - find_package(SDL REQUIRED) - - find_package(PkgConfig REQUIRED) --pkg_search_module(SDL2 REQUIRED sdl2) - - find_program(DOCBOOK2XMAN docbook2x-man) - if(DOCBOOK2XMAN) -@@ -44,12 +43,6 @@ - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") - endif() - --link_directories(${SDL2_LIBRARY_DIRS}) --add_executable(sdl2-jstest sdl2-jstest.c) --target_link_libraries(sdl2-jstest ${SDL2_LIBRARIES} ${CURSES_LIBRARIES}) --target_include_directories(sdl2-jstest PUBLIC ${SDL2_INCLUDE_DIRS} ${CURSES_INCLUDE_DIR}) --target_compile_definitions(sdl2-jstest PUBLIC ${SDL2_CFLAGS_OTHER}) -- - add_executable(sdl-jstest sdl-jstest.c) - target_link_libraries(sdl-jstest ${SDL_LIBRARY} ${CURSES_LIBRARIES}) - target_include_directories(sdl-jstest PUBLIC ${SDL_INCLUDE_DIR} ${CURSES_INCLUDE_DIR}) -@@ -60,23 +53,17 @@ - COMMAND ${DOCBOOK2XMAN} ${CMAKE_CURRENT_SOURCE_DIR}/sdl-jstest.xml - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/sdl-jstest.xml - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) -- -- add_custom_command( -- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sdl2-jstest.1 -- COMMAND ${DOCBOOK2XMAN} ${CMAKE_CURRENT_SOURCE_DIR}/sdl2-jstest.xml -- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/sdl2-jstest.xml -- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - else() -- file(COPY sdl-jstest.1 sdl2-jstest.1 -+ file(COPY sdl-jstest.1 - DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - endif() - --add_custom_target(doc ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/sdl-jstest.1 ${CMAKE_CURRENT_BINARY_DIR}/sdl2-jstest.1) -+add_custom_target(doc ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/sdl-jstest.1) - --install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sdl-jstest.1 ${CMAKE_CURRENT_BINARY_DIR}/sdl2-jstest.1 -+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sdl-jstest.1 - DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) - --install(TARGETS sdl-jstest sdl2-jstest -+install(TARGETS sdl-jstest - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - - # EOF # diff --git a/system/sdl-jstest/sdl-jstest.SlackBuild b/system/sdl-jstest/sdl-jstest.SlackBuild index 80840f5df1..c5a1e0ee7b 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 diff --git a/system/sdl-jstest/sdl-jstest.info b/system/sdl-jstest/sdl-jstest.info index 22ae0d7dad..c70abad9ff 100644 --- a/system/sdl-jstest/sdl-jstest.info +++ b/system/sdl-jstest/sdl-jstest.info @@ -1,8 +1,8 @@ PRGNAM="sdl-jstest" -VERSION="20160824git" -HOMEPAGE="https://github.com/Grumbel/sdl-jstest" -DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/sdl-jstest-20160824git.tar.gz" -MD5SUM="a4f960c86567d4b1258d43a200c4550f" +VERSION="20180715_aafbdb1" +HOMEPAGE="https://gitlab.com/sdl-jstest/sdl-jstest" +DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/sdl-jstest-20180715_aafbdb1.tar.xz" +MD5SUM="68e335dec338030aedfdb07100bc18d8" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/system/sdl-jstest/slack-desc b/system/sdl-jstest/slack-desc index 7314bcb793..733c93ec6c 100644 --- a/system/sdl-jstest/slack-desc +++ b/system/sdl-jstest/slack-desc @@ -15,5 +15,5 @@ sdl-jstest: displaying the events they send or by displaying their current butto sdl-jstest: axis, hat or ball state. sdl-jstest is especially useful if you want sdl-jstest: to test your SDL Linux joystick configuration. sdl-jstest: -sdl-jstest: Homepage: https://github.com/Grumbel/sdl-jstest +sdl-jstest: sdl-jstest: |