cdogs-sdl: update to 0.6.0.

This commit is contained in:
Enno Boland 2016-03-15 15:21:22 +01:00
parent 87aef0f8fb
commit cbdf59e7b1
4 changed files with 68 additions and 33 deletions

View File

@ -0,0 +1,11 @@
--- CMakeLists.txt.orig 2016-03-13 20:55:53.906485652 +0100
+++ CMakeLists.txt 2016-03-13 20:56:22.320483526 +0100
@@ -177,7 +177,7 @@ if(APPLE)
USE_SOURCE_PERMISSIONS)
else()
install(
- PROGRAMS src/cdogs-sdl${EXE_EXTENSION} src/cdogs-sdl-editor${EXE_EXTENSION}
+ PROGRAMS build/src/cdogs-sdl${EXE_EXTENSION} build/src/cdogs-sdl-editor${EXE_EXTENSION}
DESTINATION ${INSTALL_PREFIX}/bin)
endif()

View File

@ -0,0 +1,25 @@
--- src/cdogs/utils.c.orig 2016-03-06 09:56:53.000000000 +0100
+++ src/cdogs/utils.c 2016-03-15 13:52:14.404949301 +0100
@@ -308,12 +308,17 @@ void GetDataFilePath(char *buf, const ch
{
char relbuf[CDOGS_PATH_MAX];
char cwd[CDOGS_PATH_MAX];
- if (CDogsGetCWD(cwd) == NULL)
- {
- fprintf(stderr, "Error getting CWD; %s\n", strerror(errno));
- strcpy(cwd, "");
+ if(CDOGS_DATA_DIR[0] == '/') {
+ sprintf(relbuf, "%s%s", CDOGS_DATA_DIR, path);
+ }
+ else {
+ if (CDogsGetCWD(cwd) == NULL)
+ {
+ fprintf(stderr, "Error getting CWD; %s\n", strerror(errno));
+ strcpy(cwd, "");
+ }
+ sprintf(relbuf, "%s/%s%s", cwd, CDOGS_DATA_DIR, path);
}
- sprintf(relbuf, "%s/%s%s", cwd, CDOGS_DATA_DIR, path);
RealPath(relbuf, buf);
}

View File

@ -0,0 +1,22 @@
--- src/cdogs/yajl_utils.h.orig 2016-03-15 08:17:24.508938965 +0100
+++ src/cdogs/yajl_utils.h 2016-03-15 08:18:21.256934718 +0100
@@ -28,7 +28,7 @@
#include <stdbool.h>
#include "vector.h"
-#include "yajl/api/yajl_tree.h"
+#include <yajl/yajl_tree.h>
yajl_val YAJLReadFile(const char *filename);
--- src/cdogs/CMakeLists.txt 2016-03-15 08:35:00.996859895 +0100
+++ src/cdogs/CMakeLists.txt.orig 2016-03-15 08:34:55.824860282 +0100
@@ -210,7 +210,7 @@ add_library(cdogs STATIC
target_link_libraries(cdogs
json
SDL_joystickbuttonnames
- yajl_s
+ yajl
${SDL2_LIBRARY}
${SDL2_IMAGE_LIBRARIES}
${SDL2_MIXER_LIBRARIES}

View File

@ -1,49 +1,26 @@
# Template file for 'cdogs' # Template file for 'cdogs'
pkgname=cdogs-sdl pkgname=cdogs-sdl
version=0.5.8 version=0.6.0
revision=2 revision=1
build_style=cmake build_style=cmake
_hqxrev=2a8a05854ad2147425d0b55a3c40e81c368c97fd _hqxrev=2a8a05854ad2147425d0b55a3c40e81c368c97fd
_tinydirrev=53aab97d6a11d70d669ce9c36d0d90ec6937c33d _tinydirrev=53aab97d6a11d70d669ce9c36d0d90ec6937c33d
hostmakedepends="cmake" hostmakedepends="cmake"
makedepends="physfs-devel SDL-devel SDL_mixer-devel SDL_image-devel SDL_net-devel" makedepends="physfs-devel SDL2-devel SDL2_mixer-devel SDL2_image-devel SDL2_net-devel yajl-devel"
short_desc="A classic overhead run-and-gun game" short_desc="A classic overhead run-and-gun game"
maintainer="Enno Boland <gottox@voidlinux.eu>" maintainer="Enno Boland <gottox@voidlinux.eu>"
homepage="http://cxong.github.io/cdogs-sdl/" homepage="http://cxong.github.io/cdogs-sdl/"
license="GPL2" license="GPL2"
distfiles="https://github.com/cxong/cdogs-sdl/archive/$version.tar.gz distfiles="https://github.com/cxong/cdogs-sdl/archive/$version.tar.gz"
https://github.com/cxong/tinydir/archive/$_tinydirrev.tar.gz checksum="ac7c6ca6275bd4de16078d417b77fcc3bec0ea5555b342d8a3901da397736fa6"
https://github.com/cxong/hqx/archive/$_hqxrev.tar.gz"
checksum="08e1f47b43c229ce0d20a32c9e287abc9f47cdc658ac38726a414083256401d3
2d71972034d570ac506dee5909cfac72c1870734228a61b266e354f2d9acf277
fca25adefd14af3584dcf0e48c69647aa46a924ddbfcb75ec6053528f1bd80bc"
lib32disabled=yes lib32disabled=yes
configure_args="-DCDOGS_DATA_DIR=/usr/share/cdogs/"
post_extract() {
rmdir ${XBPS_BUILDDIR}/$pkgname-$version/src/cdogs/hqx
ln -sf ${XBPS_BUILDDIR}/hqx-$_hqxrev \
${XBPS_BUILDDIR}/$pkgname-$version/src/cdogs/hqx
rmdir ${XBPS_BUILDDIR}/$pkgname-$version/src/tinydir
ln -sf ${XBPS_BUILDDIR}/tinydir-$_tinydirrev \
${XBPS_BUILDDIR}/$pkgname-$version/src/tinydir
}
pre_configure() { pre_configure() {
# disable tests # Install data to /usr/share/cdogs/ instead of cwd.
sed -i "/add_subdirectory(tests)/d" src/CMakeLists.txt sed -i '/^set(INSTALL_PREFIX/ s#.*#set(INSTALL_PREFIX "/usr/share/cdogs/")#' CMakeLists.txt
# Do not build shipped yajl.
# fix the broken build system and build sed -i '/add_subdirectory(yajl)/d' src/cdogs/CMakeLists.txt
sed -i \
-e "s/add_definitions(-Winline -Werror)/add_definitions(-Winline)/" \
-e "/PROGRAMS /s#src/#build/\0#g" \
-e "/FILES /s#build/linux/#build/\0#g" \
-e "s#\(SET(CMAKE_INSTALL_PREFIX\) .*#\1 /usr/share/cdogs)#" \
-e "s#\(set(CDOGS_DATA_DIR\) .*#\1 /usr/share/cdogs/)#" \
CMakeLists.txt
# workaround bug
ln -rs build build/build
} }
post_install() { post_install() {