Add dungeon crawl stone soup 0.14

This commit is contained in:
Florent Becker 2014-07-04 18:26:14 +02:00
parent 7acfec9e47
commit 826e96af0e
9 changed files with 157 additions and 0 deletions

@ -0,0 +1,24 @@
{ stdenv, fetchurl, sqlite, lua, which, zlib, pkgconfig, dejavu_fonts,
libpng, perl, SDL, SDL_image, ncurses, mesa}:
stdenv.mkDerivation rec {
name = "crawl-0.14.1";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/crawl-ref/Stone%20Soup/0.14.1/stone_soup-0.14.1-nodeps.tar.xz";
sha256 = "91726d0224b93ba26b5d4bd3762bc5aabe1f02974ea6c937be89dc6c6ab7a4dd";
};
patches = [ ./makefile_fonts.patch ./makefile_sqlite.patch
./makefile_rltiles.patch ./makefile_rltiles2.patch
./makefile_misc.patch ./makefile_prefix.patch
];
buildInputs = [stdenv pkgconfig lua zlib sqlite which libpng perl SDL
dejavu_fonts SDL_image ncurses mesa];
preBuild = "cd source";
makeFlags = "TILES=y";
inherit dejavu_fonts sqlite SDL_image SDL;
}

@ -0,0 +1,20 @@
--- old/source/Makefile 2013-11-28 01:03:54.000000000 +0000
+++ new/source/Makefile 2014-02-05 14:04:32.531838188 +0000
@@ -880,7 +880,7 @@
INSTALL_FONTS += $(PROPORTIONAL_FONT)
endif
else
- SYS_PROPORTIONAL_FONT = $(shell dir=/usr/share/fonts; [ -d $$dir ] && find $$dir -iname $(OUR_PROPORTIONAL_FONT)|head -n 1)
+ SYS_PROPORTIONAL_FONT = $(shell dir=${dejavu_fonts}/share/fonts; [ -d $$dir ] && find $$dir -iname $(OUR_PROPORTIONAL_FONT)|head -n 1)
ifeq (,$(SYS_PROPORTIONAL_FONT))
SYS_PROPORTIONAL_FONT = $(shell dir=/usr/local/share/fonts ; [ -d $$dir ] && find $$dir -iname $(OUR_PROPORTIONAL_FONT)|head -n 1)
endif
@@ -903,7 +903,7 @@
INSTALL_FONTS += $(MONOSPACED_FONT)
endif
else
- SYS_MONOSPACED_FONT = $(shell dir=/usr/share/fonts; [ -d $$dir ] && find $$dir -iname $(OUR_MONOSPACED_FONT)|head -n 1)
+ SYS_MONOSPACED_FONT = $(shell dir=${dejavu_fonts}/share/fonts; [ -d $$dir ] && find $$dir -iname $(OUR_MONOSPACED_FONT)|head -n 1)
ifeq (,$(SYS_MONOSPACED_FONT))
SYS_MONOSPACED_FONT = $(shell dir=/usr/local/share/fonts; [ -d $$dir ] && find $$dir -iname $(OUR_MONOSPACED_FONT)|head -n 1)
endif

@ -0,0 +1,39 @@
--- old/source/Makefile 2014-05-05 23:22:48.051952484 +0200
+++ new/source/Makefile 2014-05-05 23:20:46.576617833 +0200
@@ -71,6 +71,9 @@
GAME = crawl
+
+CFLAGS := $(NIX_CFLAGS_COMPILE)
+
# Disable GNU Make implicit rules and variables. Leaving them enabled will slow
# down MinGW and Cygwin builds by a very VERY noticeable degree. Besides, we have
# _explicit_ rules defined for everything. So we don't need them.
@@ -979,7 +983,7 @@
ifdef ANDROID
CFLAGS := $(CFOPTIMIZE) $(CFOTHERS) $(CFWARN) $(CFLAGS)
else
-CFLAGS := $(CFOPTIMIZE) $(CFOTHERS) $(CFWARN)
+CFLAGS := $(CFOPTIMIZE) $(CFOTHERS) $(CFWARN) $(CFLAGS)
endif
CFLAGS_L := $(CFOPTIMIZE_L) $(DEFINES_L) $(CFWARN_L) $(INCLUDES_L) $(CFOTHERS_L)
ALL_CFLAGS := $(CFLAGS) $(CFLAGS_L)
@@ -1392,7 +1396,7 @@
$(RM) -r $(DOXYGEN_HTML_GEN)
$(GAME): $(OBJECTS) $(EXTRA_OBJECTS) $(CONTRIB_LIBS) dat/dlua/tags.lua
- +$(QUIET_LINK)$(CXX) $(LDFLAGS) $(EXTRA_OBJECTS) $(OBJECTS) -o $(GAME) $(LIBS)
+ g++ $(LDFLAGS) $(EXTRA_OBJECTS) $(OBJECTS) -o $(GAME) $(LIBS)
debug: all
debug-lite: all
@@ -1492,7 +1496,7 @@
$(QUIET_GEN)util/gen-luatags.pl
mi-enum.h: mon-info.h util/gen-mi-enum
- $(QUIET_GEN)util/gen-mi-enum
+ perl util/gen-mi-enum
$(RLTILES)/dc-unrand.txt: art-data.h

@ -0,0 +1,11 @@
--- old/source/Makefile 2014-05-06 08:52:24.752163702 +0200
+++ new/source/Makefile 2014-05-06 09:08:01.992018819 +0200
@@ -344,7 +344,7 @@
endif
chroot_prefix :=
-prefix :=
+prefix := $(out)
ifeq ($(patsubst %/local,%,$(patsubst %/,%,$(prefix))),/usr)
FHS := yes

@ -0,0 +1,21 @@
--- old/source/rltiles/Makefile 2014-04-17 10:17:31.596400123 +0000
+++ new/source/rltiles/Makefile 2014-04-17 14:36:07.263108690 +0000
@@ -20,7 +20,8 @@
ifdef TILES
ifndef CONTRIB_SDL
- SDL_CFLAGS := $(shell sdl-config --cflags 2> /dev/null || echo "-I../contrib/install/$(ARCH)/include/SDL")
+ SDL_CFLAGS := $(shell sdl-config --cflags 2> /dev/null)
+ SDL_IMG_CFLAGS := $(shell pkg-config --cflags-only-I SDL_image 2> /dev/null)
SDL_LDFLAGS := $(shell sdl-config --libs 2> /dev/null && echo "-lSDL_image" || echo "../contrib/install/$(ARCH)/lib/libSDL.a ../contrib/install/$(ARCH)/lib/libSDLmain.a ../contrib/install/$(ARCH)/lib/libSDL_image.a")
else
SDL_CFLAGS := -I../contrib/install/$(ARCH)/include/SDL
@@ -35,7 +36,7 @@
PNG_LIB := ../contrib/install/$(ARCH)/lib/libpng.a ../contrib/install/$(ARCH)/lib/libz.a
endif
- CFLAGS += $(SDL_CFLAGS) $(PNG_INCLUDE)
+ CFLAGS += $(SDL_CFLAGS) $(SDL_IMG_CFLAGS) $(PNG_INCLUDE) -I$(SDL_image)/include -I$(SDL)/include
LDFLAGS += $(SDL_LDFLAGS) $(PNG_LIB)
CFLAGS += -DUSE_TILE

@ -0,0 +1,10 @@
--- old/source/rltiles/Makefile 2014-05-05 23:22:48.054952469 +0200
+++ new/source/rltiles/Makefile 2014-05-05 22:45:07.742667726 +0200
@@ -142,6 +128,6 @@
$(QUIET_HOSTCXX)$(HOSTCXX) $(CFLAGS) -MMD -c $< -o $@
$(TILEGEN): $(OBJECTS)
- $(QUIET_HOSTLINK)$(HOSTCXX) $(OBJECTS) -o $@ $(LDFLAGS)
+ g++ $(OBJECTS) -o $@ $(LDFLAGS)
.PHONY: all clean distclean

@ -0,0 +1,19 @@
--- old/source/Makefile 2014-04-14 13:00:22.331058910 +0000
+++ new/source/Makefile 2014-04-14 13:02:11.102204544 +0000
@@ -672,6 +672,7 @@
FREETYPE_LDFLAGS := $(shell $(PKGCONFIG) freetype2 --libs-only-L) $(shell $(PKGCONFIG) freetype2 --libs-only-l)
SDL_INCLUDE := $(shell $(PKGCONFIG) sdl --cflags-only-I)
+SDL_IMG_INCLUDE := $(shell $(PKGCONFIG) SDL_image --cflags-only-I)
SDL_CFLAGS := $(shell $(PKGCONFIG) sdl --cflags-only-other)
SDL_LDFLAGS := $(shell $(PKGCONFIG) sdl --libs-only-L) $(shell $(PKGCONFIG) sdl --libs-only-l)
@@ -694,7 +695,7 @@
endif
DEFINES_L += $(PNG_CFLAGS) $(FREETYPE_CFLAGS) $(SDL_CFLAGS)
-INCLUDES_L += $(PNG_INCLUDE) $(FREETYPE_INCLUDE) $(SDL_INCLUDE)
+INCLUDES_L += $(PNG_INCLUDE) $(FREETYPE_INCLUDE) $(SDL_INCLUDE) $(SDL_IMG_INCLUDE)
endif # TILES

@ -0,0 +1,11 @@
--- old/source/Makefile 2014-04-14 12:46:35.401956673 +0000
+++ new/source/Makefile 2014-04-14 12:47:12.757006254 +0000
@@ -259,7 +259,7 @@
LIBZ := contrib/install/$(ARCH)/lib/libz.a
ifndef CROSSHOST
- SQLITE_INCLUDE_DIR := /usr/include
+ SQLITE_INCLUDE_DIR := ${sqlite}/include
else
# This is totally wrong, works only with some old-style setups, and
# on some architectures of Debian/new FHS multiarch -- excluding, for

@ -611,6 +611,8 @@ let
cv = callPackage ../tools/misc/cv { };
crawl = callPackage ../games/crawl { lua = lua5; };
ditaa = callPackage ../tools/graphics/ditaa { };
direnv = callPackage ../tools/misc/direnv { };