summaryrefslogtreecommitdiff
path: root/system/sdl-jstest
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2015-09-15 03:04:31 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-09-19 19:49:19 +0700
commit046891b9c8af71a825fb572c8eae52c0eb301059 (patch)
treedd0030f19702682bd1d8d65d07126bee8684e149 /system/sdl-jstest
parent79e3b1f4747a1758884d82ebf52cfcc144e3767b (diff)
downloadslackbuilds-046891b9c8af71a825fb572c8eae52c0eb301059.tar.gz
system/sdl-jstest: Updated for version 20150806git.
Diffstat (limited to 'system/sdl-jstest')
-rw-r--r--system/sdl-jstest/no_sdl2.diff50
-rw-r--r--system/sdl-jstest/sdl-jstest.SlackBuild45
-rw-r--r--system/sdl-jstest/sdl-jstest.info6
3 files changed, 80 insertions, 21 deletions
diff --git a/system/sdl-jstest/no_sdl2.diff b/system/sdl-jstest/no_sdl2.diff
new file mode 100644
index 0000000000..51738bfc40
--- /dev/null
+++ b/system/sdl-jstest/no_sdl2.diff
@@ -0,0 +1,50 @@
+diff -Naur sdl-jstest-20150806git/CMakeLists.txt sdl-jstest-20150806git.patched/CMakeLists.txt
+--- sdl-jstest-20150806git/CMakeLists.txt 2015-09-15 02:46:06.000000000 -0400
++++ sdl-jstest-20150806git.patched/CMakeLists.txt 2015-09-15 02:55:53.000000000 -0400
+@@ -22,7 +22,6 @@
+ find_package(SDL REQUIRED)
+
+ find_package(PkgConfig REQUIRED)
+-pkg_search_module(SDL2 REQUIRED sdl2)
+
+ find_program(DOCBOOK2XMAN docbook2x-man)
+ if(DOCBOOK2XMAN)
+@@ -43,11 +42,6 @@
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+ endif()
+
+-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})
+@@ -59,22 +53,17 @@
+ 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 69acb531b0..44b125913f 100644
--- a/system/sdl-jstest/sdl-jstest.SlackBuild
+++ b/system/sdl-jstest/sdl-jstest.SlackBuild
@@ -22,13 +22,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20150915 bkw:
+# - updated for *almost* the latest git: ceef74 is "Allow building with
+# old CMake 2.8". The next commit after that, 7b7923, reverts it so
+# CMake 3 is required, which we don't have on Slack 14.1.
+# - script needed reworking since upstream switched to cmake.
+
# 20140828 bkw:
# - updated for latest git
# - upstream now supports both sdl1 and sdl2, build for sdl2 only
# if installed
PRGNAM=sdl-jstest
-VERSION=${VERSION:-20140814git}
+VERSION=${VERSION:-20150806git}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -61,9 +67,6 @@ fi
set -e
-# if SDL2 is available, this will be built too.
-PRGNAM2=sdl2-jstest
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -77,23 +80,29 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-TARGETS="$PRGNAM $PRGNAM.1"
-pkg-config --exists sdl2 && TARGETS="$TARGETS $PRGNAM2 $PRGNAM2.1"
-
-make $TARGETS CC="gcc $SLKCFLAGS"
-
-PKGBIN=$PKG/usr/bin/
-mkdir -p $PKGBIN
-install -s -m0755 $PRGNAM $PKGBIN
-[ -e sdl2-jstest ] && install -s -m0755 $PRGNAM2 $PKGBIN
+# 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
-PKGMAN1=$PKG/usr/man/man1
-mkdir -p $PKGMAN1
-gzip -9c $PRGNAM.1 > $PKGMAN1/$PRGNAM.1.gz
-[ -e sdl2-jstest ] && gzip -9c $PRGNAM2.1 > $PKGMAN1/$PRGNAM2.1.gz
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$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
+cd ..
+
+gzip $PKG/usr/man/man1/*.1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README* $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 b4db7d7de7..984430aee2 100644
--- a/system/sdl-jstest/sdl-jstest.info
+++ b/system/sdl-jstest/sdl-jstest.info
@@ -1,8 +1,8 @@
PRGNAM="sdl-jstest"
-VERSION="20140814git"
+VERSION="20150806git"
HOMEPAGE="https://github.com/Grumbel/sdl-jstest"
-DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/sdl-jstest-20140814git.tar.gz"
-MD5SUM="af6d7f8325bef39924e680690f9de4d1"
+DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/sdl-jstest-20150806git.tar.gz"
+MD5SUM="d15b2a51e02daa8cfe042f659054199f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""