games-roguelike/dungeon-crawl-stone-soup: initial import of 0.17.1

This commit is contained in:
hasufell 2016-02-16 22:02:06 +01:00
parent 8ce2276139
commit da32b90b31
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
4 changed files with 251 additions and 0 deletions

View File

@ -2,6 +2,7 @@ dev-games
games-action
games-board
games-engines
games-roguelike
games-rpg
games-strategy
media-libs

View File

@ -0,0 +1,95 @@
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2
require gtk-icon-cache
MY_P="stone_soup-${PV}"
SUMMARY="Dungeon Crawl Stone Soup is a role-playing roguelike game of exploration and treasure-hunting in dungeons"
HOMEPAGE="http://crawl.develz.org/wordpress/"
DOWNLOADS="https://crawl.develz.org/release/stone_soup-${PV}-nodeps.tar.xz"
LICENCES="
GPL-2
BSD [[ note = [ mt19937ar.cc, MSVC/stdint.h ] ]]
BSD-2 [[ note = [ all contributions by Steve Noonan and Jesse Luehrs ] ]]
public-domain [[ note = [ most of tiles ] ]]
CC0-1.0 [[ note = [ most of tiles ] ]]
MIT [[ note = [ json.cc/json.h, some .js files in
webserver/static/scripts/contrib/ ] ]]
"
SLOT="0"
PLATFORMS="~amd64 ~x86"
MYOPTIONS="
(
ncurses [[ description = [ Enable for console (uses ncurses)
based build ] ]]
tiles [[ description = [ Enable for graphical (tiled) build ] ]]
) [[ number-selected = exactly-one ]]
"
RESTRICT="test"
DEPENDENCIES="
build+run:
dev-lang/lua:5.1
dev-db/sqlite:3
sys-libs/zlib
ncurses? ( sys-libs/ncurses )
tiles? (
fonts/dejavu
media-libs/freetype:2
media-libs/libpng:=
media-libs/SDL:2[X]
media-libs/SDL_image:2
x11-dri/glu
x11-dri/mesa
)
build:
dev-lang/perl
sys-devel/bison
sys-devel/flex
virtual/pkg-config
tiles? ( sys-libs/ncurses )
"
WORK=${WORKBASE}/${MY_P}/source
DEFAULT_SRC_PREPARE_PATCHES=(
-p2 "${FILES}"/${PNV}-respect-flags-and-compiler.patch
-p2 "${FILES}"/${PNV}-Use-pkg-config-for-linking-to-ncurses.patch
)
DEFAULT_SRC_COMPILE_PARAMS=(
USE_LUAJIT=
BUILD_LUA=
DATADIR="/usr/share/${PN}"
V=1
prefix="/usr"
SAVEDIR="~/.crawl"
CFOPTIMIZE="${CXXFLAGS}"
LDFLAGS="${LDFLAGS}"
AR="${AR}"
RANLIB="${RANLIB}"
CC="${CC}"
CXX="${CXX}"
PKGCONFIG="${PKG_CONFIG}"
STRIP=touch
)
src_compile() {
export HOSTCXX=${CXX}
emake "${DEFAULT_SRC_COMPILE_PARAMS[@]}" $(option tiles "TILES=y" "")
}
src_install() {
emake "${DEFAULT_SRC_COMPILE_PARAMS[@]}" \
$(option tiles "TILES=y" "") \
DESTDIR="${IMAGE}" \
prefix_fp="" \
bin_prefix="${IMAGE}/usr/$(exhost --target)/bin" \
install
# don't relocate docs, needed at runtime
rm -rf "${IMAGE}/usr/share/${PN}/docs/license"
}

View File

@ -0,0 +1,49 @@
From 88579f929f0fc777762de1ad0895264ad077e0ee Mon Sep 17 00:00:00 2001
From: hasufell <hasufell@gentoo.org>
Date: Mon, 27 Oct 2014 20:48:03 +0100
Subject: [PATCH 2/2] Use pkg-config for linking to ncurses
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=527034
---
source/Makefile | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/source/Makefile b/source/Makefile
index df51e70..2db2781 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -956,17 +956,15 @@ endif
# Your ncurses library may include Unicode support, and you may not have a
# separate libncursesw; this is the case on Mac OS/Darwin.
ifdef LIBNCURSES_IS_UNICODE
-NC_LIB = ncurses
-NC_INCLUDE = $(NC_PREFIX)/include/ncurses
+NC_LIBS = $(shell $(PKGCONFIG) --libs ncurses 2>/dev/null || echo "-L$(NC_PREFIX)/lib -lncurses")
+NC_CFLAGS = $(shell $(PKGCONFIG) --cflags ncurses 2>/dev/null || echo "-isystem $(NC_PREFIX)/include/ncurses")
else
-NC_LIB = ncursesw
-NC_INCLUDE = $(NC_PREFIX)/include/ncursesw
+NC_LIBS = $(shell $(PKGCONFIG) --libs ncursesw || echo "-L$(NC_PREFIX)/lib -lncursesw")
+NC_CFLAGS = $(shell $(PKGCONFIG) --cflags ncursesw 2>/dev/null || echo "-isystem $(NC_PREFIX)/include/ncursesw")
endif
-INCLUDES_L += -isystem $(NC_INCLUDE)
-
ifndef TILES
-LIBS += -L$(NC_PREFIX)/lib -l$(NC_LIB)
+LIBS += $(NC_LIBS)
endif
endif
@@ -1111,7 +1109,7 @@ CFLAGS := $(CFOPTIMIZE) $(CFOTHERS) $(CFWARN) $(CFLAGS)
else
CFLAGS := $(CFOPTIMIZE) $(CFOTHERS) $(CFWARN)
endif
-CFLAGS_L := $(CFOPTIMIZE_L) $(DEFINES_L) $(CFWARN_L) $(INCLUDES_L) $(CFOTHERS_L)
+CFLAGS_L := $(CFOPTIMIZE_L) $(DEFINES_L) $(CFWARN_L) $(INCLUDES_L) $(CFOTHERS_L) $(NC_CFLAGS)
ALL_CFLAGS := $(CFLAGS) $(CFLAGS_L)
YACC_CFLAGS := $(ALL_CFLAGS) -Wno-unused-function -Wno-sign-compare -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0
--
2.1.2

View File

@ -0,0 +1,106 @@
From aaa7cde91e4b086164f0c7f46569a34bfbb4e479 Mon Sep 17 00:00:00 2001
From: hasufell <hasufell@gentoo.org>
Date: Sun, 3 May 2015 15:05:43 +0200
Subject: [PATCH] Respect flags and compiler
---
Makefile | 5 ++---
rltiles/Makefile | 22 +++++++++++-----------
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/source/Makefile b/source/Makefile
index fed3373..9bb8406 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -105,7 +105,7 @@ include Makefile.obj
# Which C++ standard to support
STDFLAG = -std=c++11
-CFOTHERS := -pipe $(EXTERNAL_FLAGS)
+CFOTHERS := $(EXTERNAL_FLAGS)
CFWARN :=
CFWARN_L := -Wall -Wformat-security -Wundef
@@ -826,7 +826,6 @@ ifdef FULLDEBUG
DEFINES += -DFULLDEBUG
endif
ifdef DEBUG
-CFOTHERS := -ggdb $(CFOTHERS)
DEFINES += -DDEBUG
endif
ifndef NOWIZARD
@@ -1644,7 +1643,7 @@ ifdef ANDROID
# prove that tiles were generated properly
grep tile_info rltiles/*.cc| head
else
- +$(MAKE) -C $(RLTILES) all ARCH=$(ARCH) TILES=$(TILES)$(WEBTILES)
+ $(MAKE) -C $(RLTILES) all V=$(V) ARCH=$(ARCH) DEBUG=$(DEBUG) TILES=$(TILES)$(WEBTILES)
endif
$(TILEDEFSRCS) $(TILEDEFHDRS) $(ORIGTILEFILES): build-rltiles
diff --git a/source/rltiles/Makefile b/source/rltiles/Makefile
index 98e01ec..9b8b491 100644
--- a/source/rltiles/Makefile
+++ b/source/rltiles/Makefile
@@ -1,7 +1,7 @@
uname_S := $(shell uname -s)
ifneq (,$(findstring MINGW,$(uname_S)))
-LDFLAGS += -lmingw32
+LIBS += -lmingw32
endif
# Note: since generation of tiles is done on the host, we don't care about
@@ -10,7 +10,7 @@ endif
# Also, cross-compilation with no system libraries for host rather than target
# is not supported. If host=target, contribs are enough.
-CFLAGS := -O2 $(STDFLAG) -g -Wall -Wextra -Wno-parentheses -Wno-unused-parameter
+CXXFLAGS := $(STDFLAG) -Wall -Wextra -Wno-parentheses -Wno-unused-parameter
ifdef ANDROID
CXXFLAGS :=
@@ -27,24 +27,24 @@ ifdef TILES
PNG_LIB := ../contrib/install/$(ARCH)/lib/libpng.a ../contrib/install/$(ARCH)/lib/libz.a
endif
- CFLAGS += $(PNG_INCLUDE)
- LDFLAGS += $(PNG_LIB)
+ CXXFLAGS += $(PNG_INCLUDE)
+ LIBS += $(PNG_LIB)
- CFLAGS += -DUSE_TILE
+ CXXFLAGS += -DUSE_TILE
endif
ifdef DEBUG
-CFLAGS += -O0 -DDEBUG -ggdb
+CXXFLAGS += -O0 -DDEBUG -ggdb
endif
ifneq (,$(findstring MINGW,$(uname_S)))
-LDFLAGS += -lgdi32 -lwinmm -lole32 -loleaut32 -limm32 -lshell32 -lversion -luuid
+LIBS += -lgdi32 -lwinmm -lole32 -loleaut32 -limm32 -lshell32 -lversion -luuid
endif
ifeq ($(uname_S),Darwin)
-LDFLAGS += -framework AppKit -framework AudioUnit -framework CoreAudio -framework ForceFeedback -framework Carbon -framework IOKit -framework OpenGL
+LIBS += -framework AppKit -framework AudioUnit -framework CoreAudio -framework ForceFeedback -framework Carbon -framework IOKit -framework OpenGL
endif
ifeq ($(uname_S),Linux)
-LDFLAGS += -ldl -lpthread
+LIBS += -ldl -lpthread
endif
# Attempt to use a full compiler name, to make
@@ -130,9 +130,9 @@ clean:
distclean: clean
%.o: %.cc .cflags
- $(QUIET_HOSTCXX)$(HOSTCXX) $(CFLAGS) -MMD -c $< -o $@
+ $(QUIET_HOSTCXX)$(HOSTCXX) $(CXXFLAGS) -MMD -c $< -o $@
$(TILEGEN): $(OBJECTS)
- $(QUIET_HOSTLINK)$(HOSTCXX) $(OBJECTS) -o $@ $(LDFLAGS)
+ $(QUIET_HOSTLINK)$(HOSTCXX) $(CXXFLAGS) $(OBJECTS) -o $@ $(LDFLAGS) $(LIBS)
.PHONY: all clean distclean