summaryrefslogtreecommitdiffstats
path: root/pkgs/games/crawl
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2015-03-29 05:03:54 +0300
committerNikolay Amiantov <ab@fmap.me>2015-03-29 13:05:27 +0300
commitac900ac7fb6e87c371436f247579b8fcef9e055a (patch)
tree56d3d70edda6bd9499633c27c279a90d47af97fb /pkgs/games/crawl
parentb366cb56d8c5f87d5d47b981459679f16174ce28 (diff)
crawl: update
Diffstat (limited to 'pkgs/games/crawl')
-rw-r--r--pkgs/games/crawl/crawl_purify.patch31
-rw-r--r--pkgs/games/crawl/default.nix17
-rw-r--r--pkgs/games/crawl/makefile_fonts.patch20
-rw-r--r--pkgs/games/crawl/makefile_sqlite.patch11
4 files changed, 41 insertions, 38 deletions
diff --git a/pkgs/games/crawl/crawl_purify.patch b/pkgs/games/crawl/crawl_purify.patch
new file mode 100644
index 000000000000..0e2d335adac2
--- /dev/null
+++ b/pkgs/games/crawl/crawl_purify.patch
@@ -0,0 +1,31 @@
+diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile
+index b7e2fbf..5ff23db 100644
+--- a/crawl-ref/source/Makefile
++++ b/crawl-ref/source/Makefile
+@@ -273,7 +273,7 @@ endif
+ 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
+@@ -943,7 +943,7 @@ else
+ SYS_PROPORTIONAL_FONT = $(shell { name=$(OUR_PROPORTIONAL_FONT);\
+ {\
+ fc-list | sed 's/: .*//' | grep -Fi "/$$name";\
+- for dir in /usr/share/fonts /usr/local/share/fonts /usr/*/lib/X11/fonts;\
++ for dir in ${dejavu_fonts}/share/fonts;\
+ do [ -d $$dir ] && echo $$dir; done;\
+ } | xargs -I% find % -type f -iname $$name -print | head -n1; } 2>/dev/null)
+ ifneq (,$(SYS_PROPORTIONAL_FONT))
+@@ -968,7 +968,7 @@ else
+ SYS_MONOSPACED_FONT = $(shell { name=$(OUR_MONOSPACED_FONT);\
+ {\
+ fc-list | sed 's/: .*//' | grep -Fi "/$$name";\
+- for dir in /usr/share/fonts /usr/local/share/fonts /usr/*/lib/X11/fonts;\
++ for dir in ${dejavu_fonts}/share/fonts;\
+ do [ -d $$dir ] && echo $$dir; done;\
+ } | xargs -I% find % -type f -iname $$name -print | head -n1; } 2>/dev/null)
+ ifneq (,$(SYS_MONOSPACED_FONT))
diff --git a/pkgs/games/crawl/default.nix b/pkgs/games/crawl/default.nix
index 7f971150c675..7b153eab869a 100644
--- a/pkgs/games/crawl/default.nix
+++ b/pkgs/games/crawl/default.nix
@@ -1,18 +1,20 @@
-{ stdenv, fetchurl, which, sqlite, lua5_1, perl, zlib, pkgconfig, ncurses
+{ stdenv, fetchFromGitHub, which, sqlite, lua5_1, perl, zlib, pkgconfig, ncurses
, dejavu_fonts, libpng, SDL, SDL_image, mesa, freetype
, tileMode ? true
}:
-let version = "0.15.2";
+let version = "0.16.1";
in
stdenv.mkDerivation rec {
name = "crawl-${version}" + (if tileMode then "-tiles" else "");
- src = fetchurl {
- url = "mirror://sourceforge/crawl-ref/Stone%20Soup/${version}/stone_soup-${version}-nodeps.tar.xz";
- sha256 = "1qi1g8w0sxmwrv96hnay20gpwp1xn2xcq1cw9iwn1yq112484fp9";
+ src = fetchFromGitHub {
+ owner = "crawl-ref";
+ repo = "crawl-ref";
+ rev = version;
+ sha256 = "0gciqaij05qr5bwkk5mblvk5k0p6bzjd58czk1b6x5xx5qcp6mmh";
};
- patches = [ ./makefile_fonts.patch ./makefile_sqlite.patch ];
+ patches = [ ./crawl_purify.patch ];
nativeBuildInputs = [ pkgconfig which perl ];
@@ -22,7 +24,8 @@ stdenv.mkDerivation rec {
[ libpng SDL SDL_image freetype mesa ];
preBuild = ''
- cd source
+ cd crawl-ref/source
+ echo "${version}" > util/release_ver
# Related to issue #1963
sed -i 's/-fuse-ld=gold//g' Makefile
for i in util/*.pl; do
diff --git a/pkgs/games/crawl/makefile_fonts.patch b/pkgs/games/crawl/makefile_fonts.patch
deleted file mode 100644
index 6c73407b65cd..000000000000
--- a/pkgs/games/crawl/makefile_fonts.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- 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
diff --git a/pkgs/games/crawl/makefile_sqlite.patch b/pkgs/games/crawl/makefile_sqlite.patch
deleted file mode 100644
index fbcb925d6088..000000000000
--- a/pkgs/games/crawl/makefile_sqlite.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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