- Update to 0.6.0

PR:		145525
Submitted by:	Tobias Rehbein <tobias.rehbein@web.de> (maintainer)
This commit is contained in:
Dmitry Marakasov 2010-05-14 14:12:48 +00:00
parent 3afe5913a1
commit 9c50b1e5e8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=254316
10 changed files with 358 additions and 483 deletions

View file

@ -6,85 +6,86 @@
#
PORTNAME= stonesoup
PORTVERSION= 0.5.2
PORTREVISION= 1
PORTVERSION= 0.6.0
CATEGORIES= games
MASTER_SITES= SF/crawl-ref/Stone%20Soup/${PORTVERSION}
DISTNAME= stone_soup-${PORTVERSION}-src
EXTRACT_SUFX= .tbz2
DISTNAME= stone_soup-${PORTVERSION}-nodeps
MAINTAINER= tobias.rehbein@web.de
COMMENT= Dungeon Crawl Stone Soup - a fun, free rogue-like game
LIB_DEPENDS= sqlite3:${PORTSDIR}/databases/sqlite3
RUN_DEPENDS= gtar:${PORTSDIR}/archivers/gtar
USE_BZIP2= yes
USE_BISON= build
USE_GMAKE= yes
USE_LUA= 5.1
USE_PERL5_BUILD= yes
MAKE_JOBS_SAFE= yes
SAVEDIR?= /var/games/${PORTNAME}
WRKSRC= ${WRKDIR}/${DISTNAME}/source/
WRKSRC= ${WRKDIR}/stone_soup-${PORTVERSION}/source/
SUB_FILES= README.FreeBSD
PLIST_SUB= SAVEDIR="${SAVEDIR}"
FETCH_ARGS?= -pRr
OPTIONS= SDL "SDL support (tiles interface)" off \
SOUND "Sound support" off \
LUA_BINDINGS "LUA bindings for user scripts" on \
UNICODE "Unicode glyphs (UTF-8)" off
UNICODE "Unicode glyphs (UTF-8)" off \
WIZARD "Wizard mode" off
MAKE_ARGS= "FREEBSD=yes"
MAKEFILE= makefile
MAKE_ARGS= FREEBSD_PORT=yes
MAKE_ARGS+= prefix=${PREFIX} SAVEDIR=${SAVEDIR} DATADIR=${DATADIR}
.include <bsd.port.options.mk>
.if defined(WITH_SDL)
MAKEFILE= makefile_tiles.unix
MAKE_JOBS_UNSAFE= yes
.if defined(VERBOSE)
MAKE_ARGS+= V=yes
.endif
.if defined(WITH_WIZARD)
MAKE_ARGS+= wizard
.endif
.if defined(WITHOUT_SDL)
PLIST_SUB+= SDL="@comment "
.else
MAKE_ARGS+= TILES=y
PLIST_SUB+= SDL=""
USE_SDL= image
PKGNAMESUFFIX= -sdl
BUILD_DEPENDS+= pkg-config:${PORTSDIR}/devel/pkg-config
LIB_DEPENDS+= png.6:${PORTSDIR}/graphics/png \
freetype:${PORTSDIR}/print/freetype2
.else
MAKEFILE= makefile.unix
MAKE_JOBS_SAFE= yes
PLIST_SUB+= SDL="@comment "
USE_SDL= sdl image
.endif
.if defined(WITH_SOUND)
RUN_DEPENDS+= sox:${PORTSDIR}/audio/sox
.endif #WITH_SOUND
.endif
.if defined(WITHOUT_LUA_BINDINGS)
MAKE_ARGS+= NO_LUA_BINDINGS=yes
.endif
.if defined(WITH_UNICODE)
MAKE_ARGS+= USE_UNICODE=yes
.endif
post-patch:
@${REINPLACE_CMD} -e "s,%%DATADIR%%,${DATADIR}/," ${WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -e "s,%%SAVEDIR%%,${SAVEDIR}," ${WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE}," ${WRKSRC}/${MAKEFILE}
.if defined(WITHOUT_LUA_BINDINGS)
@${REINPLACE_CMD} -e "s,-DCLUA_BINDINGS,," ${WRKSRC}/${MAKEFILE}
.endif
.if defined(WITH_UNICODE)
@${REINPLACE_CMD} -e "s,%%UNICODE%%,y," ${WRKSRC}/${MAKEFILE}
.else
@${REINPLACE_CMD} -e "s,%%UNICODE%%,n," ${WRKSRC}/${MAKEFILE}
.endif
.if defined(WITH_SOUND)
@${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE}," ${WRKSRC}/AppHdr.h
@${REINPLACE_CMD} -e "s,%%SOUND%%,," ${WRKSRC}/AppHdr.h
.else
@${REINPLACE_CMD} -e "s,%%SOUND%%,// ," ${WRKSRC}/AppHdr.h
.endif
.if defined(WITH_SDL)
@${REINPLACE_CMD} -e "s,%%DATADIR%%,${DATADIR}," ${WRKSRC}/tilesdl.cc
.endif
pre-build:
@cd ${WRKSRC} && ${GMAKE} depend
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
.for doc in CREDITS.txt README.txt licence.txt
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/${doc} ${DOCSDIR}
.endfor
${INSTALL_DATA} ${WRKDIR}/README.FreeBSD ${DOCSDIR}
.endif
.if !defined(NOPORTEXAMPLES)

View file

@ -1,3 +1,3 @@
MD5 (stone_soup-0.5.2-src.tbz2) = 48aca99f320b70c880363ddaca7da89a
SHA256 (stone_soup-0.5.2-src.tbz2) = e943892da5da28cff9dc4117480d6fe48d25c03cb600696426ca9178aa2ae7c8
SIZE (stone_soup-0.5.2-src.tbz2) = 4683454
MD5 (stone_soup-0.6.0-nodeps.tar.bz2) = 866e315470a592572e7ce8a7214c7615
SHA256 (stone_soup-0.6.0-nodeps.tar.bz2) = f05ba17b64f3f669da3fb4185ed2e1425bd6a2fa8375fa4671807c67b2e4f8ff
SIZE (stone_soup-0.6.0-nodeps.tar.bz2) = 4597191

View file

@ -1,6 +1,6 @@
--- ./AppHdr.h.orig 2009-10-06 20:44:04.000000000 +0200
+++ ./AppHdr.h 2009-10-15 18:40:29.000000000 +0200
@@ -151,7 +151,7 @@
--- ./AppHdr.h.orig 2010-03-27 00:43:25.000000000 +0100
+++ ./AppHdr.h 2010-04-18 13:17:52.000000000 +0200
@@ -157,7 +157,7 @@
// setuid or setgid. Filenames passed to this command *are not
// validated in any way*.
//
@ -9,3 +9,14 @@
// For cases when the game will be played on terms that don't support the
// curses "bold == lighter" 16 colour mode. -- bwr
@@ -457,8 +457,8 @@
#ifndef SAVE_PACKAGE_NONE
#ifdef USE_TAR
#define PACKAGE_SUFFIX ".tar.gz"
- #define SAVE_PACKAGE_CMD "tar"
- #define LOAD_UNPACKAGE_CMD "tar -zxf %s"PACKAGE_SUFFIX" -C %s"
+ #define SAVE_PACKAGE_CMD "gtar"
+ #define LOAD_UNPACKAGE_CMD "gtar -zxf %s"PACKAGE_SUFFIX" -C %s"
#define UNPACK_SPECIFIC_FILE_CMD LOAD_UNPACKAGE_CMD " %s"
#else
#ifdef USE_ZIP

View file

@ -0,0 +1,169 @@
--- ./makefile.orig 2010-03-27 00:43:25.000000000 +0100
+++ ./makefile 2010-04-18 13:18:41.000000000 +0200
@@ -44,7 +44,7 @@
# ask for a package with convenience libraries instead -- we'll try to provide
# them somewhere in the near future.
-GAME = crawl
+GAME = stonesoup
#
# Compiler Flags
@@ -82,19 +82,31 @@
endif # USE_ICC
+ifndef FREEBSD_PORT
CFOTHERS := -fno-strict-aliasing -pipe $(EXTERNAL_FLAGS)
CFOTHERS_L := -fsigned-char
CFWARN := -Wall
DEFINES := $(EXTERNAL_DEFINES)
+else
+NO_AUTO_OPT = YesPlease
+
+CFOTHERS := $(CFLAGS)
+CFOTHERS_L := -fsigned-char
+CFWARN :=
+
+DEFINES := $(EXTERNAL_DEFINES)
+endif
#
# The GCC and GXX variables are set later.
#
AR = ar
RANLIB = ranlib
+ifndef FREEBSD_PORT
CC = $(GCC)
CXX = $(GXX)
+endif
RM = rm -f
COPY = cp
COPY_R = cp -r
@@ -268,9 +280,10 @@
# Permissions to set on the save directory.
MCHMOD_SAVEDIR := 775
+MCHMOD_LOGS := 664
# The user:group to install the game as.
-INSTALL_UGRP := games:games
+INSTALL_UGRP := root:games
chroot_prefix :=
prefix :=
@@ -386,25 +399,34 @@
endif
endif
-ifndef BUILD_LUA
- ifneq (,$(wildcard /usr/include/lua5.1))
- INCLUDES_L += -I/usr/include/lua5.1
- LIBS += -llua5.1
- else
- ifneq (,$(wildcard /usr/include/lua.h))
- LIBS += -llua
+ifndef FREEBSD_PORT
+ ifndef BUILD_LUA
+ ifneq (,$(wildcard /usr/include/lua5.1))
+ INCLUDES_L += -I/usr/include/lua5.1
+ LIBS += -llua5.1
else
- BUILD_LUA = yes
+ ifneq (,$(wildcard /usr/include/lua.h))
+ LIBS += -llua
+ else
+ BUILD_LUA = yes
+ endif
endif
endif
-endif
-
-ifndef BUILD_SQLITE
- ifneq ($(shell grep -q sqlite3_prepare_v2 /usr/include/sqlite3.h 2>/dev/null && echo yes),yes)
- BUILD_SQLITE = yes
- else
- LIBS += -lsqlite3
+
+ ifndef BUILD_SQLITE
+ ifneq ($(shell grep -q sqlite3_prepare_v2 /usr/include/sqlite3.h 2>/dev/null && echo yes),yes)
+ BUILD_SQLITE = yes
+ else
+ LIBS += -lsqlite3
+ endif
endif
+else
+ INCLUDES_L += -I${LOCALBASE}/include/
+ INCLUDES_L += -I${LOCALBASE}/include/lua51
+ LIBS += -L${LOCALBASE}/lib/
+ LIBS += -L${LOCALBASE}/lib/lua51
+ LIBS += -llua-5.1
+ LIBS += -lsqlite3
endif
RLTILES = rltiles
@@ -476,11 +498,13 @@
endif # TILES
+ifndef FREEBSD_PORT
ifeq ($(GCC_GTE_4_3_0),1)
CFWARN_L += -Wno-array-bounds
endif
CFWARN_L += -Wno-parentheses -Wwrite-strings -Wshadow -pedantic -D_FORTIFY_SOURCE=0
+endif
CFOTHERS_L = $(EXTERNAL_FLAGS_L) $(EXTRA_FLAGS) $(DEFINES) $(SDL_CFLAGS)
ifndef NO_LUA_BINDINGS
@@ -519,6 +543,7 @@
NO_OPTIMIZE=YesPlease
endif
+ifndef FREEBSD_PORT
ifdef FULLDEBUG
DEFINES += -DFULLDEBUG
endif
@@ -544,6 +569,11 @@
CFWARN_L += -Wno-uninitialized
endif
endif
+else # ifdef FREEBSD_PORT
+ifdef WIZARD
+DEFINES += -DWIZARD
+endif
+endif # FREEBSD_PORT
ifneq ($(strip $(chroot_prefix)),)
USE_CHROOT=YesPlease
@@ -756,7 +786,7 @@
SRC_VERSION := $(shell git describe --tags --long 2>/dev/null || cat util/release_ver)
# when making release builds, use just the bare tag
-SRC_VERSION_SHORT := $(shell git describe --tags 2>/dev/null)
+SRC_VERSION_SHORT := $(shell git describe --tags 2>/dev/null || cat util/release_ver)
ifneq (,$(SRC_VERSION_SHORT))
ifeq (,$(findstring -,$(SRC_VERSION_SHORT)))
SRC_VERSION := $(SRC_VERSION_SHORT)
@@ -907,9 +937,11 @@
$(COPY) dat/tiles/VeraMono.ttf $(datadir_fp)/dat/tiles/
endif
endif
+ifndef FREEBSD_PORT
ifeq ($(USE_DGAMELAUNCH),)
$(CHOWN) -R $(INSTALL_UGRP) $(datadir_fp) || true
endif
+endif
ifneq ($(SAVEDIR),)
mkdir -p $(savedir_fp)/saves
ifneq ($(patsubst /var/%,%,$(savedir_fp)),$(savedir_fp))
@@ -924,6 +956,8 @@
$(CHOWN) -R $(INSTALL_UGRP) $(savedir_fp) || true
$(CHMOD) $(MCHMOD_SAVEDIR) $(savedir_fp) || true
$(CHMOD) $(MCHMOD_SAVEDIR) $(savedir_fp)/saves || true
+ $(CHMOD) $(MCHMOD_LOGS) $(savedir_fp)/saves/logfile || true
+ $(CHMOD) $(MCHMOD_LOGS) $(savedir_fp)/saves/scores || true
$(CHMOD) $(MCHMOD_SAVEDIR) $(savedir_fp)/morgue || true
endif
endif

View file

@ -1,136 +0,0 @@
--- ./makefile.unix.orig 2009-10-06 20:44:04.000000000 +0200
+++ ./makefile.unix 2009-10-15 18:40:29.000000000 +0200
@@ -4,7 +4,7 @@
# Modified for Crawl Reference by $Author$ on $Date$
#
-GAME = crawl
+GAME = stonesoup
# this file contains a list of the libraries.
# it will make a variable called OBJECTS that contains all the libraries
@@ -12,7 +12,9 @@
OBJECTS += libunix.o crash-u.o
+ifndef FREEBSD
CXX = g++
+endif
DELETE = rm -f
COPY = cp
OS_TYPE = UNIX
@@ -21,7 +23,7 @@
# Change this to y (case-sensitive!) if you want to use Unicode glyphs
# in the map, and you have libncursesw available.
-UNICODE_GLYPHS = n
+UNICODE_GLYPHS = %%UNICODE%%
# If you're using UNICODE_GLYPHS=y, and have a preferred Unicode
# (UTF-8) locale you want Crawl to use, you can set it here. The
@@ -39,16 +41,16 @@
MCHMOD_SAVEDIR := 775
# The user:group to install the game as.
-INSTALL_UGRP := games:games
+INSTALL_UGRP := root:games
-INSTALLDIR := /usr/games/crawl
+INSTALLDIR := %%PREFIX%%/bin
# If you're installing Crawl for multiple users, you *must* set this to a
# valid path before building Crawl. This is not necessary if you are building
# Crawl for a single user.
-# SAVEDIR := /usr/games/crawl/saves/
-# DATADIR := /usr/games/crawl/data/
+SAVEDIR := %%SAVEDIR%%
+DATADIR := %%DATADIR%%
LEX := flex
YACC := bison -y
@@ -70,16 +72,20 @@
INCLUDES := $(INCLUDES) -Iutil -I. -I$(LUASRC) $(EXTRA_INCLUDES)
+ifndef FREEBSD
CFWARN := -Wall -Wno-parentheses -Wwrite-strings -Wshadow -pedantic
+endif
CFOTHERS := -fsigned-char -D$(OS_TYPE) $(EXTRA_FLAGS) -DCLUA_BINDINGS
+ifndef FREEBSD
ifneq ($(HURRY),y)
ifneq ($(DEBUG_CRAWL),y)
CFWARN += -Wuninitialized
CFOTHERS += -O2
endif
endif
+endif
ifneq ($(strip $(SAVEDIR)),)
CFOTHERS += '-DSAVE_DIR_PATH="$(strip $(SAVEDIR))"'
@@ -117,8 +123,8 @@
LIBCURS = ncurses
endif
-CFLAGS := $(INCLUDES) $(CFWARN) $(CFOTHERS)
-YCFLAGS := $(INCLUDES) $(CFOTHERS)
+LOCAL_CFLAGS := $(INCLUDES) $(CXXFLAGS) $(CFOTHERS)
+YCFLAGS := $(INCLUDES) $(CXXFLAGS) $(CFOTHERS)
UTIL = util/
@@ -160,7 +166,7 @@
rm -f $(DEPENDENCY_MKF).tmp
@for i in $^; do \
echo "Updating dependencies for $$i"; \
- $(CXX) -MM $(CFLAGS) $$i >>$(DEPENDENCY_MKF).tmp 2>/dev/null; \
+ $(CXX) -MM $(LOCAL_CFLAGS) $$i >>$(DEPENDENCY_MKF).tmp 2>/dev/null; \
done
mv -f $(DEPENDENCY_MKF).tmp $(DEPENDENCY_MKF)
@@ -257,17 +263,17 @@
$(DELETE) $(DEPENDENCY_MKF)
$(GAME): $(GAME_DEPENDS)
- ${CXX} ${LDFLAGS} $(CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)
+ ${CXX} ${LDFLAGS} $(LOCAL_CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)
.PHONY : debug
debug: $(GAME)
profile: $(GAME_DEPENDS)
- ${CXX} -g -p ${LDFLAGS} $(CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)
+ ${CXX} -g -p ${LDFLAGS} $(LOCAL_CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)
.cc.o:
- ${CXX} ${CFLAGS} -c $<
+ ${CXX} ${LOCAL_CFLAGS} -c $<
# [ds] Note we don't use the standard CFLAGS here; that's intentional, most
# flex/bison combos I've tried don't produce code that passes the warnings
@@ -280,14 +286,22 @@
$(LUASRC)$(LUALIBA):
echo Building Lua...
+ifdef FREEBSD
+ cd $(LUASRC) && $(MAKE) FREEBSD=yes crawl_unix
+else
cd $(LUASRC) && $(MAKE) crawl_unix
+endif
#############################################################################
# Build SQLite
$(FSQLLIBA):
echo Building SQLite
+ifdef FREEBSD
+ cd $(SQLSRC) && $(MAKE) FREEBSD=yes
+else
cd $(SQLSRC) && $(MAKE)
+endif
#############################################################################
# Packaging a source tarball for release

View file

@ -1,170 +0,0 @@
--- ./makefile_tiles.unix.orig 2009-10-06 20:44:04.000000000 +0200
+++ ./makefile_tiles.unix 2009-10-15 18:40:29.000000000 +0200
@@ -4,7 +4,7 @@
# Modified for Crawl Reference by $Author: dshaligram $ on $Date: 2007-06-24T16:27:58.475101Z $
#
-GAME = crawl
+GAME = stonesoup
# this file contains a list of the libraries.
# it will make a variable called OBJECTS that contains all the libraries
@@ -15,7 +15,9 @@
SDL_CFLAGS := $(shell sdl-config --cflags)
SDL_LDFLAGS := $(shell sdl-config --libs) -lSDLmain
+ifndef FREEBSD
CXX = g++
+endif
DELETE = rm -f
COPY = cp
OS_TYPE = UNIX
@@ -25,7 +27,7 @@
# Change this to y if you want to use Unicode glyphs in the map, and you have
# libncursesw available.
-UNICODE_GLYPHS = n
+UNICODE_GLYPHS = %%UNICODE%%
ifeq ($(strip $(OSX)),y)
PNG_INCLUDE := -I/sw/include
@@ -41,7 +43,7 @@
else
PNG_INCLUDE :=
PNG_LIB :=
-FREETYPE_INCLUDE := -I/usr/include/freetype2
+FREETYPE_INCLUDE := -I%%LOCALBASE%%/include/freetype2
endif
# If you have lex and yacc, set DOYACC to y (lowercase y).
@@ -54,16 +56,16 @@
MCHMOD_SAVEDIR := 775
# The user:group to install the game as.
-INSTALL_UGRP := games:games
+INSTALL_UGRP := root:games
-INSTALLDIR := /usr/games/crawl
+INSTALLDIR := %%PREFIX%%/bin
# If you're installing Crawl for multiple users, you *must* set this to a
# valid path before building Crawl. This is not necessary if you are building
# Crawl for a single user.
-# SAVEDIR := /usr/games/crawl/saves/
-# DATADIR := /usr/games/crawl/data/
+SAVEDIR := %%SAVEDIR%%
+DATADIR := %%DATADIR%%
LEX := flex
YACC := bison -y
@@ -105,10 +107,13 @@
INCLUDES := $(INCLUDES) -Iutil -I. -I$(LUASRC) $(EXTRA_INCLUDES) $(PNG_INCLUDE) $(FREETYPE_INCLUDE)
+ifndef FREEBSD
CFWARN := -Wall -Wwrite-strings -Wshadow -pedantic -Wno-parentheses
+endif
CFOTHERS := -fsigned-char -D$(OS_TYPE) $(EXTRA_FLAGS) -DCLUA_BINDINGS
+ifndef FREEBSD
ifneq ($(HURRY),y)
ifneq ($(DEBUG_CRAWL),y)
CFWARN += -Wuninitialized
@@ -116,6 +121,8 @@
endif
endif
+endif
+
ifneq ($(strip $(SAVEDIR)),)
CFOTHERS += '-DSAVE_DIR_PATH="$(strip $(SAVEDIR))"'
endif
@@ -124,8 +131,8 @@
CFOTHERS += '-DDATA_DIR_PATH="$(strip $(DATADIR))"'
endif
-CFLAGS := $(INCLUDES) $(CFWARN) $(CFOTHERS) $(SDL_CFLAGS)
-YCFLAGS := $(INCLUDES) $(CFOTHERS)
+LOCAL_CFLAGS := $(INCLUDES) $(CXXFLAGS) $(CFWARN) $(CFOTHERS) $(SDL_CFLAGS)
+YCFLAGS := $(INCLUDES) $(CXXFLAGS) $(CFOTHERS)
UTIL = util/
@@ -167,7 +174,7 @@
rm -f $(DEPENDENCY_MKF).tmp
@for i in $^; do \
echo "Updating dependencies for $$i"; \
- $(CXX) -MM $(CFLAGS) $$i >>$(DEPENDENCY_MKF).tmp 2>/dev/null; \
+ $(CXX) -MM $(LOCAL_CFLAGS) $$i >>$(DEPENDENCY_MKF).tmp 2>/dev/null; \
done
mv -f $(DEPENDENCY_MKF).tmp $(DEPENDENCY_MKF)
@@ -210,7 +217,7 @@
ORIGTILEFILES = $(TILEFILES:%=$(RLTILES)/%)
makerltiles:
- cd $(RLTILES) && make -f makefile.unix all
+ cd $(RLTILES) && gmake -f makefile.unix all
$(TILEDEFSRCS): makerltiles
@@ -222,7 +229,7 @@
$(COPY) $< $@
clean-rltiles:
- cd $(RLTILES) && make -f makefile.unix distclean && cd ..
+ cd $(RLTILES) && gmake -f makefile.unix distclean && cd ..
##########################################################################
@@ -287,21 +294,21 @@
$(DELETE) $(DEPENDENCY_MKF)
$(GAME): $(GAME_DEPENDS)
- ${CXX} ${LDFLAGS} $(CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)
+ ${CXX} ${LDFLAGS} $(LOCAL_CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)
.PHONY : debug
debug: $(GAME)
profile: $(GAME_DEPENDS)
- ${CXX} -g -p ${LDFLAGS} $(CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)
+ ${CXX} -g -p ${LDFLAGS} $(LOCAL_CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)
%.o: %.cc $(TILEDEFHDRS)
- ${CXX} ${CFLAGS} -c $< -o $@
+ ${CXX} ${LOCAL_CFLAGS} -c $< -o $@
# STL is bad in debug. Always compile this file with optimizations.
tilebuf.o: tilebuf.cc $(TILEDEFHDRS)
- ${CXX} ${CFLAGS} -O2 -c $< -o $@
+ ${CXX} ${LOCAL_CFLAGS} -O2 -c $< -o $@
# [ds] Note we don't use the standard CFLAGS here; that's intentional, most
# flex/bison combos I've tried don't produce code that passes the warnings
@@ -314,14 +321,22 @@
$(LUASRC)$(LUALIBA):
echo Building Lua...
+ifdef FREEBSD
+ cd $(LUASRC) && $(MAKE) FREEBSD=yes crawl_unix
+else
cd $(LUASRC) && $(MAKE) crawl_unix
+endif
#############################################################################
# Build SQLite
$(FSQLLIBA):
echo Building SQLite
+ifdef FREEBSD
+ cd $(SQLSRC) && $(MAKE) FREEBSD=yes
+else
cd $(SQLSRC) && $(MAKE)
+endif
#############################################################################
# Packaging a source tarball for release

View file

@ -1,11 +0,0 @@
--- ./tilesdl.cc.orig 2009-10-15 18:41:56.000000000 +0200
+++ ./tilesdl.cc 2009-10-15 18:42:16.000000000 +0200
@@ -249,7 +249,7 @@
"dat/tiles/stone_soup_icon-32x32.png";
#endif
- SDL_Surface *icon = IMG_Load(datafile_path(icon_name).c_str());
+ SDL_Surface *icon = IMG_Load(datafile_path(icon_name, true, true).c_str());
if (!icon)
{
printf("Failed to load icon: %s\n", SDL_GetError());

View file

@ -1,13 +0,0 @@
--- ./util/lua/src/Makefile.orig 2009-10-06 20:44:04.000000000 +0200
+++ ./util/lua/src/Makefile 2009-10-15 18:40:29.000000000 +0200
@@ -9,8 +9,10 @@
# Your platform. See PLATS for possible values.
PLAT= none
+ifndef FREEBSD
CC= gcc
CFLAGS= -O2 -Wall $(MYCFLAGS)
+endif
AR= ar rcu
RANLIB= ranlib
RM= rm -f

View file

@ -1,18 +0,0 @@
--- ./util/sqlite/Makefile.orig 2009-10-06 20:44:04.000000000 +0200
+++ ./util/sqlite/Makefile 2009-10-15 18:40:29.000000000 +0200
@@ -4,12 +4,14 @@
LIBSQL = libsqlite3.a
AR = ar rcu
+ifndef FREEBSD
CC = gcc
+endif
RANLIB = ranlib
RM_F = rm -f
# Omit SQLite features we don't need.
-CFLAGS = -DSQLITE_OMIT_AUTHORIZATION \
+CFLAGS += -DSQLITE_OMIT_AUTHORIZATION \
-DSQLITE_OMIT_AUTOVACUUM \
-DSQLITE_OMIT_COMPLETE \
-DSQLITE_OMIT_BLOB_LITERAL \

View file

@ -1,37 +1,79 @@
bin/stonesoup
%%DATADIR%%/dat/lua/runrest.lua
%%DATADIR%%/dat/lua/trapwalk.lua
%%DATADIR%%/dat/lua/stash.lua
%%DATADIR%%/dat/lua/wield.lua
%%DATADIR%%/dat/lua/pickup.lua
%%DATADIR%%/dat/lua/kills.lua
%%DATADIR%%/dat/lua/gearset.lua
%%DATADIR%%/dat/clua/dungeon.lua
%%DATADIR%%/dat/des/variable/mini_features.des
%%DATADIR%%/dat/des/variable/entry.des
%%DATADIR%%/dat/des/variable/float.des
%%DATADIR%%/dat/des/variable/large.des
%%DATADIR%%/dat/des/variable/mini_monsters.des
%%DATADIR%%/dat/des/variable/altar.des
%%DATADIR%%/dat/des/variable/mini.des
%%DATADIR%%/dat/des/portals/bailey.des
%%DATADIR%%/dat/des/portals/trove.des
%%DATADIR%%/dat/des/portals/bazaar.des
%%DATADIR%%/dat/des/portals/sewer.des
%%DATADIR%%/dat/des/portals/ziggurat.des
%%DATADIR%%/dat/des/portals/ossuary.des
%%DATADIR%%/dat/des/portals/wizlab.des
%%DATADIR%%/dat/des/portals/icecave.des
%%DATADIR%%/dat/des/portals/volcano.des
%%DATADIR%%/dat/des/portals/lab.des
%%DATADIR%%/dat/des/builder/arena.des
%%DATADIR%%/dat/des/builder/uniques.des
%%DATADIR%%/dat/des/builder/dummy.des
%%DATADIR%%/dat/des/builder/didact.des
%%DATADIR%%/dat/des/builder/rooms.des
%%DATADIR%%/dat/des/builder/layout.des
%%DATADIR%%/dat/des/branches/elf.des
%%DATADIR%%/dat/des/branches/temple.des
%%DATADIR%%/dat/des/branches/tomb.des
%%DATADIR%%/dat/des/branches/zot.des
%%DATADIR%%/dat/des/branches/lair.des
%%DATADIR%%/dat/des/branches/shoals.des
%%DATADIR%%/dat/des/branches/vaults.des
%%DATADIR%%/dat/des/branches/crypt.des
%%DATADIR%%/dat/des/branches/blade.des
%%DATADIR%%/dat/des/branches/snake.des
%%DATADIR%%/dat/des/branches/hive.des
%%DATADIR%%/dat/des/branches/hells.des
%%DATADIR%%/dat/des/branches/pan.des
%%DATADIR%%/dat/des/branches/slime.des
%%DATADIR%%/dat/des/branches/swamp.des
%%DATADIR%%/dat/des/branches/orc.des
%%DATADIR%%/dat/des/guide.txt
%%DATADIR%%/dat/clua/debug.lua
%%DATADIR%%/dat/clua/util.lua
%%DATADIR%%/dat/clua/userbase.lua
%%DATADIR%%/dat/clua/test.lua
%%DATADIR%%/dat/clua/sanity.lua
%%DATADIR%%/dat/clua/point.lua
%%DATADIR%%/dat/clua/macro.lua
%%DATADIR%%/dat/clua/luamark.lua
%%DATADIR%%/dat/clua/loadmaps.lua
%%DATADIR%%/dat/clua/lm_trove.lua
%%DATADIR%%/dat/clua/lm_trig.lua
%%DATADIR%%/dat/clua/lm_toll.lua
%%DATADIR%%/dat/clua/lm_tmsg.lua
%%DATADIR%%/dat/clua/lm_timed.lua
%%DATADIR%%/dat/clua/lm_props.lua
%%DATADIR%%/dat/clua/lm_pdesc.lua
%%DATADIR%%/dat/clua/lm_mslav.lua
%%DATADIR%%/dat/clua/lm_monst.lua
%%DATADIR%%/dat/clua/lm_mon_prop.lua
%%DATADIR%%/dat/clua/lm_fog.lua
%%DATADIR%%/dat/clua/lm_flags.lua
%%DATADIR%%/dat/clua/lm_door.lua
%%DATADIR%%/dat/clua/lm_1way.lua
%%DATADIR%%/dat/clua/iter.lua
%%DATADIR%%/dat/clua/init.lua
%%DATADIR%%/dat/clua/dungeon.lua
%%DATADIR%%/dat/clua/ziggurat.lua
%%DATADIR%%/dat/descript/ability.txt
%%DATADIR%%/dat/descript/spells.txt
%%DATADIR%%/dat/descript/skills.txt
%%DATADIR%%/dat/descript/monsters.txt
%%DATADIR%%/dat/descript/items.txt
%%DATADIR%%/dat/descript/gods.txt
%%DATADIR%%/dat/descript/features.txt
%%DATADIR%%/dat/descript/cards.txt
%%DATADIR%%/dat/descript/branches.txt
%%DATADIR%%/dat/descript/unident.txt
%%DATADIR%%/dat/lua/autofight.lua
%%DATADIR%%/dat/lua/trapwalk.lua
%%DATADIR%%/dat/lua/stash.lua
%%DATADIR%%/dat/lua/runrest.lua
%%DATADIR%%/dat/lua/pickup.lua
%%DATADIR%%/dat/lua/kills.lua
%%DATADIR%%/dat/lua/gearset.lua
%%DATADIR%%/dat/lua/wield.lua
%%DATADIR%%/dat/database/FAQ.txt
%%DATADIR%%/dat/database/shout.txt
%%DATADIR%%/dat/database/randname.txt
@ -48,91 +90,91 @@ bin/stonesoup
%%DATADIR%%/dat/database/help.txt
%%DATADIR%%/dat/database/godspeak.txt
%%DATADIR%%/dat/database/wpnnoise.txt
%%DATADIR%%/dat/altar.des
%%DATADIR%%/dat/ziggurat.des
%%DATADIR%%/dat/vaults.des
%%DATADIR%%/dat/temple.des
%%DATADIR%%/dat/sewer.des
%%DATADIR%%/dat/rooms.des
%%DATADIR%%/dat/pan.des
%%DATADIR%%/dat/orc.des
%%DATADIR%%/dat/minitomb.des
%%DATADIR%%/dat/mini.des
%%DATADIR%%/dat/layout.des
%%DATADIR%%/dat/large.des
%%DATADIR%%/dat/lair.des
%%DATADIR%%/dat/lab.des
%%DATADIR%%/dat/icecave.des
%%DATADIR%%/dat/hive.des
%%DATADIR%%/dat/hells.des
%%DATADIR%%/dat/float.des
%%DATADIR%%/dat/entry.des
%%DATADIR%%/dat/elf.des
%%DATADIR%%/dat/dummy.des
%%DATADIR%%/dat/didact.des
%%DATADIR%%/dat/crypt.des
%%DATADIR%%/dat/bazaar.des
%%DATADIR%%/dat/arena.des
%%DATADIR%%/dat/zot.des
%%SDL%%%%DATADIR%%/dat/tiles/Vera.ttf
%%SDL%%%%DATADIR%%/dat/tiles/stone_soup_icon-win32.png
%%SDL%%%%DATADIR%%/dat/tiles/stone_soup_icon-32x32.png
%%SDL%%%%DATADIR%%/dat/tiles/player.png
%%SDL%%%%DATADIR%%/dat/tiles/main.png
%%SDL%%%%DATADIR%%/dat/tiles/dngn.png
%%SDL%%%%DATADIR%%/dat/tiles/VeraMono.ttf
%%SDL%%%%DATADIR%%/dat/tiles/title.png
%%DATADIR%%/dat/descript/ability.txt
%%DATADIR%%/dat/descript/spells.txt
%%DATADIR%%/dat/descript/skills.txt
%%DATADIR%%/dat/descript/monsters.txt
%%DATADIR%%/dat/descript/items.txt
%%DATADIR%%/dat/descript/gods.txt
%%DATADIR%%/dat/descript/features.txt
%%DATADIR%%/dat/descript/cards.txt
%%DATADIR%%/dat/descript/branches.txt
%%DATADIR%%/dat/descript/unident.txt
%%DATADIR%%/docs/develop/levels/triggerables.txt
%%DATADIR%%/docs/develop/levels/syntax.txt
%%DATADIR%%/docs/develop/levels/introduction.txt
%%DATADIR%%/docs/develop/levels/advanced.txt
%%DATADIR%%/docs/develop/IRC.txt
%%DATADIR%%/docs/develop/testing.txt
%%DATADIR%%/docs/develop/save_compatibility.txt
%%DATADIR%%/docs/develop/release.txt
%%DATADIR%%/docs/develop/process.txt
%%DATADIR%%/docs/develop/patch_guide.txt
%%DATADIR%%/docs/develop/monster_speech.txt
%%DATADIR%%/docs/develop/coding_conventions.txt
%%DATADIR%%/docs/develop/tiles_creation.txt
%%DATADIR%%/docs/license/pcre_license.txt
%%DATADIR%%/docs/license/mt19937.txt
%%DATADIR%%/docs/license/lualicense.txt
%%DATADIR%%/docs/license/libpng-LICENSE.txt
%%DATADIR%%/docs/license/lgpl.txt
%%DATADIR%%/docs/034_changes.txt
%%DATADIR%%/docs/ssh_guide.txt
%%DATADIR%%/docs/quickstart.txt
%%DATADIR%%/docs/options_guide.txt
%%DATADIR%%/docs/macros_guide.txt
%%DATADIR%%/docs/keybind.txt
%%DATADIR%%/docs/key_changes.txt
%%DATADIR%%/docs/crawl_manual.txt
%%DATADIR%%/docs/changelog.txt
%%DATADIR%%/docs/arena.txt
%%DATADIR%%/docs/aptitudes.txt
%%DATADIR%%/docs/tiles_help.txt
%%DATADIR%%/settings/034_command_keys.txt
%%DATADIR%%/settings/tiles_options.txt
%%DATADIR%%/settings/standard_colours.txt
%%DATADIR%%/settings/no_vi_command_keys.txt
%%DATADIR%%/settings/messages.txt
%%DATADIR%%/settings/menu_colours.txt
%%DATADIR%%/settings/init.txt
%%DATADIR%%/settings/food_colouring.txt
%%DATADIR%%/settings/dvorak_command_keys.txt
%%DATADIR%%/settings/dolls.txt
%%DATADIR%%/settings/autopickup_exceptions.txt
%%DATADIR%%/settings/052_monster_glyphs.txt
%%DATADIR%%/settings/034_monster_glyphs.txt
%%DATADIR%%/settings/travel_stoppers.txt
%%DATADIR%%/docs/034_changes.txt
%%DATADIR%%/docs/ssh_guide.txt
%%DATADIR%%/docs/quickstart.txt
%%DATADIR%%/docs/pcre_license.txt
%%DATADIR%%/docs/patch_guide.txt
%%DATADIR%%/docs/options_guide.txt
%%DATADIR%%/docs/mt19937.txt
%%DATADIR%%/docs/monster_speech.txt
%%DATADIR%%/docs/macros_guide.txt
%%DATADIR%%/docs/lualicense.txt
%%DATADIR%%/docs/lgpl.txt
%%DATADIR%%/docs/level_design.txt
%%DATADIR%%/docs/keybind.txt
%%DATADIR%%/docs/key_changes.txt
%%DATADIR%%/docs/crawl_manual.txt
%%DATADIR%%/docs/crawl-0.5.1-options.txt
%%DATADIR%%/docs/crawl-0.5.0-options.txt
%%DATADIR%%/docs/coding_conventions.txt
%%DATADIR%%/docs/arena.txt
%%DATADIR%%/docs/changelog.txt
%%DATADIR%%/docs/aptitudes.txt
%%DATADIR%%/docs/tiles_help.txt
%%DATADIR%%/docs/libpng-LICENSE.txt
%%DATADIR%%/docs/tiles_creation.txt
@exec chown -R root:games %D/%%DATADIR%%
@exec install -d -o root -g games -m 775 %%SAVEDIR%%
%%PORTDOCS%%%%DOCSDIR%%/CREDITS.txt
%%PORTDOCS%%%%DOCSDIR%%/README.txt
%%PORTDOCS%%%%DOCSDIR%%/licence.txt
%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sample.crawlrc
@dirrm %%DATADIR%%/dat/lua
@dirrm %%DATADIR%%/dat/clua
@dirrm %%DATADIR%%/dat/descript
@dirrm %%DATADIR%%/dat/database
%%SDL%%%%DATADIR%%/dat/tiles/player.png
%%SDL%%%%DATADIR%%/dat/tiles/stone_soup_icon-win32.png
%%SDL%%%%DATADIR%%/dat/tiles/stone_soup_icon-32x32.png
%%SDL%%%%DATADIR%%/dat/tiles/title.png
%%SDL%%%%DATADIR%%/dat/tiles/main.png
%%SDL%%%%DATADIR%%/dat/tiles/gui.png
%%SDL%%%%DATADIR%%/dat/tiles/dngn.png
%%SDL%%%%DATADIR%%/dat/tiles/Vera.ttf
%%SDL%%%%DATADIR%%/dat/tiles/VeraMono.ttf
%%SDL%%@dirrm %%DATADIR%%/dat/tiles
@dirrm %%DATADIR%%/dat/des/variable
@dirrm %%DATADIR%%/dat/des/portals
@dirrm %%DATADIR%%/dat/des/builder
@dirrm %%DATADIR%%/dat/des/branches
@dirrm %%DATADIR%%/dat/des
@dirrm %%DATADIR%%/dat/clua
@dirrm %%DATADIR%%/dat/lua
@dirrm %%DATADIR%%/dat/database
@dirrm %%DATADIR%%/dat/descript
@dirrm %%DATADIR%%/dat
@dirrm %%DATADIR%%/settings
@dirrm %%DATADIR%%/docs/develop/levels
@dirrm %%DATADIR%%/docs/develop
@dirrm %%DATADIR%%/docs/license
@dirrm %%DATADIR%%/docs
@dirrm %%DATADIR%%/settings
@dirrm %%DATADIR%%/
@unexec rmdir %%SAVEDIR%% >/dev/null 2>&1 || echo 'stonesoup save-game directory (%%SAVEDIR%%) not removed due to existing save games. If you are permanently removing this port, you should do a ``rm -rf %%SAVEDIR%%``.' | fmt
%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD
%%PORTDOCS%%@dirrm %%DOCSDIR%%/
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sample.crawlrc
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/
@exec install -d -o root -g games -m 775 %%SAVEDIR%%/saves %%SAVEDIR%%/morgue
@exec touch %%SAVEDIR%%/saves/logfile %%SAVEDIR%%/saves/scores
@exec chmod 664 %%SAVEDIR%%/saves/logfile %%SAVEDIR%%/saves/scores
@unexec rmdir %%SAVEDIR%% >/dev/null 2>&1 || echo 'stonesoup save-game directory (%%SAVEDIR%%) not removed due to existing save games. If you are permanently removing this port, you should do a ``rm -rf %%SAVEDIR%%``.' | fmt