crawl: 0.18.1 -> 0.19.1

This commit is contained in:
Nikolay Amiantov 2016-11-23 18:04:18 +03:00
parent d9fba1d0a3
commit 7e1d5eb17d
2 changed files with 35 additions and 39 deletions

View File

@ -1,6 +1,6 @@
diff -ru3 crawl-ref-0.18.1-src-old/crawl-ref/source/Makefile crawl-ref-0.18.1-src/crawl-ref/source/Makefile diff -ru3 crawl-ref-0.19.1-src-old/crawl-ref/source/Makefile crawl-ref-0.19.1-src/crawl-ref/source/Makefile
--- crawl-ref-0.18.1-src-old/crawl-ref/source/Makefile 1970-01-01 03:00:01.000000000 +0300 --- crawl-ref-0.19.1-src-old/crawl-ref/source/Makefile 1970-01-01 03:00:01.000000000 +0300
+++ crawl-ref-0.18.1-src/crawl-ref/source/Makefile 2016-09-04 17:25:54.310929928 +0300 +++ crawl-ref-0.19.1-src/crawl-ref/source/Makefile 2016-11-23 15:37:15.303077886 +0300
@@ -285,7 +285,7 @@ @@ -285,7 +285,7 @@
LIBZ := contrib/install/$(ARCH)/lib/libz.a LIBZ := contrib/install/$(ARCH)/lib/libz.a
@ -10,27 +10,22 @@ diff -ru3 crawl-ref-0.18.1-src-old/crawl-ref/source/Makefile crawl-ref-0.18.1-sr
else else
# This is totally wrong, works only with some old-style setups, and # This is totally wrong, works only with some old-style setups, and
# on some architectures of Debian/new FHS multiarch -- excluding, for # on some architectures of Debian/new FHS multiarch -- excluding, for
@@ -957,9 +957,9 @@ diff -ru3 crawl-ref-0.19.1-src-old/crawl-ref/source/util/find_font crawl-ref-0.19.1-src/crawl-ref/source/util/find_font
SYS_PROPORTIONAL_FONT = $(shell { name=$(OUR_PROPORTIONAL_FONT);\ --- crawl-ref-0.19.1-src-old/crawl-ref/source/util/find_font 1970-01-01 03:00:01.000000000 +0300
{\ +++ crawl-ref-0.19.1-src/crawl-ref/source/util/find_font 2016-11-23 15:39:04.044031141 +0300
fc-list | sed 's/: .*//' | grep -Fi "/$$name";\ @@ -1,6 +1,6 @@
- for dir in /usr/share/fonts /usr/local/share/fonts /usr/*/lib/X11/fonts;\ #! /bin/sh
+ for dir in ${dejavu_fonts}/share/fonts;\
do [ -d $$dir ] && echo $$dir; done;\ -FONTDIRS="/usr/share/fonts /usr/local/share/fonts /usr/*/lib/X11/fonts"
- } | xargs -I% find % -type f -iname $$name -print | head -n1; } 2>/dev/null) +FONTDIRS="${fontsPath}/share/fonts"
+ } | xargs -I% find -L % -type f -iname $$name -print | head -n1; } 2>/dev/null)
ifneq (,$(SYS_PROPORTIONAL_FONT)) name=$1
ifeq (,$(COPY_FONTS)) [ "$name" ] || { echo "Usage: $0 <fontname.ttf>" >&2; exit 100; }
DEFINES += -DPROPORTIONAL_FONT=\"$(SYS_PROPORTIONAL_FONT)\" @@ -11,6 +11,6 @@
@@ -982,9 +982,9 @@ for dir in $FONTDIRS; do
SYS_MONOSPACED_FONT = $(shell { name=$(OUR_MONOSPACED_FONT);\ [ -d "$dir" ] && echo "$dir"
{\ done
fc-list | sed 's/: .*//' | grep -Fi "/$$name";\ - } | xargs -I% find % \( -type f -o -type l \) -iname "$name" -print \
- for dir in /usr/share/fonts /usr/local/share/fonts /usr/*/lib/X11/fonts;\ + } | xargs -I% find -L % \( -type f -o -type l \) -iname "$name" -print \
+ for dir in ${dejavu_fonts}/share/fonts;\ | head -n1
do [ -d $$dir ] && echo $$dir; done;\ } 2>/dev/null
- } | xargs -I% find % -type f -iname $$name -print | head -n1; } 2>/dev/null)
+ } | xargs -I% find -L % -type f -iname $$name -print | head -n1; } 2>/dev/null)
ifneq (,$(SYS_MONOSPACED_FONT))
ifeq (,$(COPY_FONTS))
DEFINES += -DMONOSPACED_FONT=\"$(SYS_MONOSPACED_FONT)\"

View File

@ -1,27 +1,26 @@
{ stdenv, fetchFromGitHub, which, sqlite, lua5_1, perl, zlib, pkgconfig, ncurses { stdenv, lib, fetchFromGitHub, which, sqlite, lua5_1, perl, zlib, pkgconfig, ncurses
, dejavu_fonts, libpng, SDL2, SDL2_image, mesa, freetype, pngcrush , dejavu_fonts, libpng, SDL2, SDL2_image, mesa, freetype, pngcrush, advancecomp
, tileMode ? false , tileMode ? false
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "crawl-${version}" + (if tileMode then "-tiles" else ""); name = "crawl-${version}${lib.optionalString tileMode "-tiles"}";
version = "0.18.1"; version = "0.19.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "crawl-ref"; owner = "crawl-ref";
repo = "crawl-ref"; repo = "crawl-ref";
rev = version; rev = version;
sha256 = "1cg5mxhx0lfhadls6n8avcpkjx08nqf1y085li97zqxl3gjaj64j"; sha256 = "02iklz5q5h7h27gw86ws8wk5gz1fg86jclkar05nd7zxxgiwsk96";
}; };
patches = [ ./crawl_purify.patch ]; patches = [ ./crawl_purify.patch ];
nativeBuildInputs = [ pkgconfig which perl pngcrush ]; nativeBuildInputs = [ pkgconfig which perl pngcrush advancecomp ];
# Still unstable with luajit # Still unstable with luajit
buildInputs = [ lua5_1 zlib sqlite ncurses ] buildInputs = [ lua5_1 zlib sqlite ncurses ]
++ stdenv.lib.optionals tileMode ++ lib.optionals tileMode [ libpng SDL2 SDL2_image freetype mesa ];
[ libpng SDL2 SDL2_image freetype mesa ];
preBuild = '' preBuild = ''
cd crawl-ref/source cd crawl-ref/source
@ -33,11 +32,13 @@ stdenv.mkDerivation rec {
rm -rf contrib rm -rf contrib
''; '';
makeFlags = [ "prefix=$(out)" "FORCE_CC=gcc" "FORCE_CXX=g++" "HOSTCXX=g++" fontsPath = lib.optionalString tileMode dejavu_fonts;
"SAVEDIR=~/.crawl" "sqlite=${sqlite.dev}" ]
++ stdenv.lib.optionals tileMode [ "TILES=y" "dejavu_fonts=${dejavu_fonts}" ];
postInstall = if tileMode then "mv $out/bin/crawl $out/bin/crawl-tiles" else ""; makeFlags = [ "prefix=$(out)" "FORCE_CC=gcc" "FORCE_CXX=g++" "HOSTCXX=g++"
"SAVEDIR=~/.crawl" "sqlite=${sqlite.dev}"
] ++ lib.optional tileMode "TILES=y";
postInstall = lib.optionalString tileMode "mv $out/bin/crawl $out/bin/crawl-tiles";
enableParallelBuilding = true; enableParallelBuilding = true;