diff --git a/srcpkgs/Cataclysm-DDA-data b/srcpkgs/Cataclysm-DDA-data new file mode 120000 index 00000000000..b0eb39be3df --- /dev/null +++ b/srcpkgs/Cataclysm-DDA-data @@ -0,0 +1 @@ +Cataclysm-DDA/ \ No newline at end of file diff --git a/srcpkgs/Cataclysm-DDA-tiles b/srcpkgs/Cataclysm-DDA-tiles new file mode 120000 index 00000000000..b0eb39be3df --- /dev/null +++ b/srcpkgs/Cataclysm-DDA-tiles @@ -0,0 +1 @@ +Cataclysm-DDA/ \ No newline at end of file diff --git a/srcpkgs/Cataclysm-DDA-tiles-data b/srcpkgs/Cataclysm-DDA-tiles-data new file mode 120000 index 00000000000..b0eb39be3df --- /dev/null +++ b/srcpkgs/Cataclysm-DDA-tiles-data @@ -0,0 +1 @@ +Cataclysm-DDA/ \ No newline at end of file diff --git a/srcpkgs/Cataclysm-DDA/patches/cxx.patch b/srcpkgs/Cataclysm-DDA/patches/cxx.patch new file mode 100644 index 00000000000..4570c15564e --- /dev/null +++ b/srcpkgs/Cataclysm-DDA/patches/cxx.patch @@ -0,0 +1,11 @@ +--- Makefile 2018-05-09 11:54:14.784015950 +0200 ++++ - 2018-05-09 12:20:16.912784456 +0200 +@@ -412,7 +412,7 @@ + @ + + $(TARGET): $(ODIR) $(DDIR) $(OBJS) +- $(LD) $(W32FLAGS) -o $(TARGET) $(DEFINES) \ ++ $(CXX) $(W32FLAGS) -o $(TARGET) $(DEFINES) \ + $(OBJS) $(LDFLAGS) + + .PHONY: version json-verify diff --git a/srcpkgs/Cataclysm-DDA/patches/execinfo.patch b/srcpkgs/Cataclysm-DDA/patches/execinfo.patch new file mode 100644 index 00000000000..ebb7c4ada8d --- /dev/null +++ b/srcpkgs/Cataclysm-DDA/patches/execinfo.patch @@ -0,0 +1,20 @@ +--- src/debug.cpp 2015-03-09 06:25:34.000000000 +0100 ++++ - 2018-05-09 13:16:45.359758459 +0200 +@@ -14,7 +14,7 @@ + #include + #endif + +-#if !(defined _WIN32 || defined WINDOWS || defined __CYGWIN__) ++#if !(defined _WIN32 || defined WINDOWS || defined __CYGWIN__) && defined(__GLIBC__) + #include + #include + #endif +@@ -309,7 +309,7 @@ + debugFile.file << ": "; + + // Backtrace on error. +-#if !(defined _WIN32 || defined WINDOWS || defined __CYGWIN__) ++#if !(defined _WIN32 || defined WINDOWS || defined __CYGWIN__) && defined(__GLIBC__) + if( lev == D_ERROR ) { + int count = backtrace( tracePtrs, TRACE_SIZE ); + char **funcNames = backtrace_symbols( tracePtrs, count ); diff --git a/srcpkgs/Cataclysm-DDA/patches/install.patch b/srcpkgs/Cataclysm-DDA/patches/install.patch new file mode 100644 index 00000000000..293fe4f1868 --- /dev/null +++ b/srcpkgs/Cataclysm-DDA/patches/install.patch @@ -0,0 +1,52 @@ +--- Makefile 2018-05-09 12:22:50.994990401 +0200 ++++ - 2018-05-09 12:45:12.744048126 +0200 +@@ -476,30 +476,30 @@ + BIN_PREFIX=$(PREFIX)/bin + LOCALE_DIR=$(PREFIX)/share/locale + install: version $(TARGET) +- mkdir -p $(DATA_PREFIX) +- mkdir -p $(BIN_PREFIX) +- install --mode=755 $(TARGET) $(BIN_PREFIX) +- cp -R --no-preserve=ownership data/font $(DATA_PREFIX) +- cp -R --no-preserve=ownership data/json $(DATA_PREFIX) +- cp -R --no-preserve=ownership data/mods $(DATA_PREFIX) +- cp -R --no-preserve=ownership data/names $(DATA_PREFIX) +- cp -R --no-preserve=ownership data/raw $(DATA_PREFIX) +- cp -R --no-preserve=ownership data/recycling $(DATA_PREFIX) +- cp -R --no-preserve=ownership data/motd $(DATA_PREFIX) +- cp -R --no-preserve=ownership data/credits $(DATA_PREFIX) +- cp -R --no-preserve=ownership data/title $(DATA_PREFIX) ++ mkdir -p $(DESTDIR)$(DATA_PREFIX) ++ mkdir -p $(DESTDIR)$(BIN_PREFIX) ++ install --mode=755 $(TARGET) $(DESTDIR)$(BIN_PREFIX) ++ cp -R --no-preserve=ownership data/font $(DESTDIR)$(DATA_PREFIX) ++ cp -R --no-preserve=ownership data/json $(DESTDIR)$(DATA_PREFIX) ++ cp -R --no-preserve=ownership data/mods $(DESTDIR)$(DATA_PREFIX) ++ cp -R --no-preserve=ownership data/names $(DESTDIR)$(DATA_PREFIX) ++ cp -R --no-preserve=ownership data/raw $(DESTDIR)$(DATA_PREFIX) ++ cp -R --no-preserve=ownership data/recycling $(DESTDIR)$(DATA_PREFIX) ++ cp -R --no-preserve=ownership data/motd $(DESTDIR)$(DATA_PREFIX) ++ cp -R --no-preserve=ownership data/credits $(DESTDIR)$(DATA_PREFIX) ++ cp -R --no-preserve=ownership data/title $(DESTDIR)$(DATA_PREFIX) + ifdef TILES +- cp -R --no-preserve=ownership gfx $(DATA_PREFIX) ++ cp -R --no-preserve=ownership gfx $(DESTDIR)$(DATA_PREFIX) + endif + ifdef LUA +- mkdir -p $(DATA_PREFIX)/lua +- install --mode=644 lua/autoexec.lua $(DATA_PREFIX)/lua +- install --mode=644 lua/class_definitions.lua $(DATA_PREFIX)/lua ++ mkdir -p $(DESTDIR)$(DATA_PREFIX)/lua ++ install --mode=644 lua/autoexec.lua $(DESTDIR)$(DATA_PREFIX)/lua ++ install --mode=644 lua/class_definitions.lua $(DESTDIR)$(DATA_PREFIX)/lua + endif + install --mode=644 data/changelog.txt data/cataicon.ico data/fontdata.json \ +- README.txt LICENSE.txt -t $(DATA_PREFIX) +- mkdir -p $(LOCALE_DIR) +- LOCALE_DIR=$(LOCALE_DIR) lang/compile_mo.sh ++ README.txt LICENSE.txt -t $(DESTDIR)$(DATA_PREFIX) ++ mkdir -p $(DESTDIR)$(LOCALE_DIR) ++ LOCALE_DIR=$(DESTDIR)$(LOCALE_DIR) lang/compile_mo.sh + endif + + ifeq ($(TARGETSYSTEM), CYGWIN) diff --git a/srcpkgs/Cataclysm-DDA/patches/werror.patch b/srcpkgs/Cataclysm-DDA/patches/werror.patch new file mode 100644 index 00000000000..babf5ed78a7 --- /dev/null +++ b/srcpkgs/Cataclysm-DDA/patches/werror.patch @@ -0,0 +1,10 @@ +--- Makefile 2015-03-09 06:25:34.000000000 +0100 ++++ - 2018-05-09 11:54:13.335211524 +0200 +@@ -49,7 +49,6 @@ + # we don't check in code with new warnings, but we also have to disable some classes of warnings + # for now as we get rid of them. In non-release builds we want to show all the warnings, + # even the ones we're allowing in release builds so they're visible to developers. +-RELEASE_FLAGS = -Werror + WARNINGS = -Wall -Wextra + # Uncomment below to disable warnings + #WARNINGS = -w diff --git a/srcpkgs/Cataclysm-DDA/template b/srcpkgs/Cataclysm-DDA/template new file mode 100644 index 00000000000..6be54bcb623 --- /dev/null +++ b/srcpkgs/Cataclysm-DDA/template @@ -0,0 +1,64 @@ +# Template file for 'Cataclysm-DDA' +pkgname=Cataclysm-DDA +version=0.C +revision=1 +build_style=gnu-makefile +make_build_args="PREFIX=/usr RELEASE=1 TILES=1 SOUND=1 USE_HOME_DIR=1" +make_install_args="TILES=1 SOUND=1 USE_HOME_DIR=1" +make_use_env=yes +hostmakedepends="pkg-config" +makedepends="SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel freetype-devel + gettext-devel lua-devel" +depends="Cataclysm-DDA-data" +short_desc="Turn-based survival game set in a post-apocalyptic world" +maintainer="John " +license="CC-BY-SA-3.0, CC-BY-3.0" +homepage="https://cataclysmdda.org/" +distfiles="https://github.com/CleverRaven/Cataclysm-DDA/archive/${version}.tar.gz" +checksum=69e947824626fffb505ca4ec44187ec94bba32c1e5957ba5c771b3445f958af6 + +if [ "$CROSS_BUILD" ];then + _cross_args="TARGETSYSTEM=LINUX CROSS=${XBPS_CROSS_TRIPLET}-" + make_build_args+=" $_cross_args" + make_install_args+=" $_cross_args" +fi + +post_build() { + make ${makejobs} ${_cross_args} ${_no_tiles_args} +} + +do_check() { + : #needs tap++.h +} + +post_install() { + make PREFIX=/usr DESTDIR=${DESTDIR} ${_cross_args} ${_no_tiles_args} install +} + +Cataclysm-DDA-tiles_package() { + short_desc+=" - SDL tiles version" + depends="Cataclysm-DDA-data Cataclysm-DDA-tiles-data" + pkg_install() { + vmove usr/bin/cataclysm-tiles + } +} + +Cataclysm-DDA-tiles-data_package() { + short_desc+=" - tiles data files" + noarch=yes + pkg_install() { + vmove usr/share/cataclysm-dda/gfx + } +} + +Cataclysm-DDA-data_package() { + short_desc+=" - data files" + noarch=yes + pkg_install() { + vmove usr/share/locale + for _i in json credits font mods motd names raw recycling title \ + changelog.txt LICENSE.txt README.txt cataicon.ico fontdata.json;do + vmove usr/share/cataclysm-dda/$_i + done + } +} diff --git a/srcpkgs/Cataclysm-DDA/update b/srcpkgs/Cataclysm-DDA/update new file mode 100644 index 00000000000..376af7fbb5c --- /dev/null +++ b/srcpkgs/Cataclysm-DDA/update @@ -0,0 +1 @@ +ignore="*"