mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-05 06:27:37 +00:00
games/cataclysm-dda{,-tiles}: Update to 0.G
- Switch to cmake build - Use flavors to build master/slave ports instead of options: WIP/TODO: remove slave port and do all flavor builds in master port. Looking for a way of run depends -tiles on -curses flavor (like slave port is doing) - Take maintainership ChangeLog: https://github.com/CleverRaven/Cataclysm-DDA/releases/tag/0.G
This commit is contained in:
parent
d495a73bf5
commit
df8938e2b9
@ -2,7 +2,8 @@ PKGNAMESUFFIX= -tiles
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../cataclysm-dda
|
||||
|
||||
OPTIONS_SLAVE= SDL SOUND
|
||||
FLAVORS= tiles
|
||||
FLAVOR= tiles
|
||||
|
||||
RUN_DEPENDS+= cataclysm-dda>0:games/cataclysm-dda
|
||||
|
||||
|
@ -1,95 +1,65 @@
|
||||
PORTNAME= cataclysm-dda
|
||||
DISTVERSION= 0.F
|
||||
DISTVERSION= 0.G
|
||||
PORTREVISION?= 0
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= games
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= eduardo@FreeBSD.org
|
||||
COMMENT= Roguelike set in a post-apocalyptic world
|
||||
WWW= https://cataclysmdda.org
|
||||
|
||||
LICENSE= CC-BY-SA-3.0
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
|
||||
|
||||
USES= alias compiler:c++14-lang gmake shebangfix
|
||||
SHEBANG_FILES= lang/*.sh
|
||||
bash_CMD= /bin/sh
|
||||
FLAVORS?= curses
|
||||
FLAVOR?= curses
|
||||
|
||||
USES= alias cmake compiler:c++14-lang shebangfix
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= CleverRaven
|
||||
GH_PROJECT= Cataclysm-DDA
|
||||
|
||||
MAKE_ARGS= CXX="${CXX}" LD="${CXX}" RELEASE=1 WARNINGS=-w USE_XDG_DIR=1 ASTYLE=0
|
||||
SHEBANG_FILES= lang/*.sh
|
||||
bash_CMD= /bin/sh
|
||||
|
||||
OPTIONS_DEFINE= NLS DATA DOCS SOUND
|
||||
OPTIONS_DEFAULT= NLS
|
||||
OPTIONS_SINGLE= UI
|
||||
OPTIONS_SINGLE_UI= NCURSES SDL
|
||||
OPTIONS_EXCLUDE:= ${OPTIONS_SINGLE_UI}
|
||||
OPTIONS_SLAVE?= DATA NCURSES
|
||||
OPTIONS_SUB= yes
|
||||
CMAKE_OFF= BACKTRACE TESTS
|
||||
CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_Git
|
||||
|
||||
SOUND_DESC= Sound support (SDL UI only)
|
||||
UI_DESC= User Interface
|
||||
.if ${FLAVOR} == tiles
|
||||
|
||||
NCURSES_USES= ncurses
|
||||
NCURSES_ALL_TARGET= cataclysm
|
||||
NLS_USES= gettext gettext-runtime iconv localbase
|
||||
NLS_MAKE_ARGS= LANGUAGES=all
|
||||
NLS_MAKE_ARGS_OFF= LOCALIZE=0
|
||||
NLS_ALL_TARGET= localization
|
||||
SDL_USES= pkgconfig sdl
|
||||
SDL_USE= SDL=image2,ttf2
|
||||
SDL_MAKE_ARGS= TILES=1
|
||||
SDL_ALL_TARGET= cataclysm-tiles
|
||||
SOUND_IMPLIES= SDL
|
||||
SOUND_USE= SDL=mixer2
|
||||
SOUND_MAKE_ARGS= SOUND=1
|
||||
USES+= pkgconfig sdl
|
||||
USE_SDL= image2 mixer2 ttf2
|
||||
CMAKE_ARGS+= -DLOCALIZE=OFF \
|
||||
-DSOUND=1 \
|
||||
-DTILES=1
|
||||
PLIST_SUB+= CURSES="@comment " \
|
||||
TILES=""
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.else
|
||||
|
||||
.if ${CHOSEN_COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 36
|
||||
CXXFLAGS+= -Wno-inconsistent-missing-override
|
||||
.endif
|
||||
USES+= ncurses
|
||||
CMAKE_ARGS+= -DCURSES_INCLUDE_PATH:STRING="${NCURSESINC}"
|
||||
|
||||
OPTIONS_DEFINE= DOCS NLS
|
||||
OPTIONS_SUB= yes
|
||||
NLS_USES= gettext-tools
|
||||
NLS_CMAKE_OFF= -DLOCALIZE=OFF
|
||||
PLIST_SUB+= CURSES="" \
|
||||
TILES="@comment "
|
||||
PORTDOCS= *
|
||||
|
||||
.if ${CHOSEN_COMPILER_TYPE} == gcc
|
||||
CPPFLAGS+= -DCATA_NO_CPP11_STRING_CONVERSIONS
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e \
|
||||
's|--mode=|-m | ; \
|
||||
s|--no-preserve=ownership|| ; \
|
||||
s|LDFLAGS += -lintl -liconv|LDFLAGS += -L${LOCALBASE}/lib -lintl| ; \
|
||||
s|-t ||' \
|
||||
${WRKSRC}/Makefile
|
||||
@${REINPLACE_CMD} -e \
|
||||
's|/usr/local/share/fonts|${LOCALBASE}/share/fonts|' \
|
||||
${WRKSRC}/src/sdltiles.cpp
|
||||
@${REINPLACE_CMD} -e 's|%%DISTVERSION%%|${DISTVERSION}|' ${WRKSRC}/src/version.cmake
|
||||
|
||||
post-patch-NLS-off:
|
||||
@${REINPLACE_CMD} -e \
|
||||
'/LOCALE_DIR/s|^|#|' \
|
||||
${WRKSRC}/Makefile
|
||||
post-install:
|
||||
${INSTALL_MAN} ${WRKSRC}/doc/cataclysm.6 ${STAGEDIR}${PREFIX}/share/man/man6
|
||||
${INSTALL_MAN} ${WRKSRC}/doc/cataclysm-tiles.6 ${STAGEDIR}${PREFIX}/share/man/man6
|
||||
|
||||
post-install-DOCS-on:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
@(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . \
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . \
|
||||
${STAGEDIR}${DOCSDIR})
|
||||
.if ${PORT_OPTIONS:MNCURSES}
|
||||
${INSTALL_MAN} ${STAGEDIR}${DOCSDIR}/cataclysm.6 \
|
||||
${STAGEDIR}${MANPREFIX}/share/man/man6
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MSDL}
|
||||
${INSTALL_MAN} ${STAGEDIR}${DOCSDIR}/cataclysm-tiles.6 \
|
||||
${STAGEDIR}${MANPREFIX}/share/man/man6
|
||||
.endif
|
||||
@${RM} ${STAGEDIR}${DOCSDIR}/cataclysm.6 ${STAGEDIR}${DOCSDIR}/cataclysm-tiles.6
|
||||
|
||||
post-install-NCURSES-on:
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cataclysm
|
||||
|
||||
post-install-SDL-on:
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cataclysm-tiles
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1625409296
|
||||
SHA256 (CleverRaven-Cataclysm-DDA-0.F_GH0.tar.gz) = f7c373cd2450353f99a5c3937a72ae745f5440531266d2d596e5bf798001ac57
|
||||
SIZE (CleverRaven-Cataclysm-DDA-0.F_GH0.tar.gz) = 88591910
|
||||
TIMESTAMP = 1692464788
|
||||
SHA256 (CleverRaven-Cataclysm-DDA-0.G_GH0.tar.gz) = e559d0d495b314ed39890920b222b4ae5067db183b5d39d4263700bfd66f36fb
|
||||
SIZE (CleverRaven-Cataclysm-DDA-0.G_GH0.tar.gz) = 157200161
|
||||
|
19
games/cataclysm-dda/files/patch-CMakeLists.txt
Normal file
19
games/cataclysm-dda/files/patch-CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
||||
--- CMakeLists.txt.orig 2023-03-01 00:53:47 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -437,7 +437,7 @@ endif()
|
||||
add_subdirectory(tools/clang-tidy-plugin)
|
||||
endif()
|
||||
|
||||
-install(DIRECTORY doc gfx
|
||||
+install(DIRECTORY gfx
|
||||
DESTINATION ${DATA_PREFIX}
|
||||
)
|
||||
|
||||
@@ -446,7 +446,6 @@ if (RELEASE)
|
||||
${CMAKE_SOURCE_DIR}/README.md
|
||||
${CMAKE_SOURCE_DIR}/LICENSE.txt
|
||||
${CMAKE_SOURCE_DIR}/LICENSE-OFL-Terminus-Font.txt
|
||||
- ${CMAKE_SOURCE_DIR}/VERSION.txt
|
||||
DESTINATION ${README_DIR})
|
||||
if (TILES)
|
||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/gfx DESTINATION ${DATA_PREFIX})
|
@ -1,18 +0,0 @@
|
||||
--- Makefile.orig 2021-07-03 05:00:06 UTC
|
||||
+++ Makefile
|
||||
@@ -1017,9 +1017,12 @@ install: version $(TARGET)
|
||||
cp -R --no-preserve=ownership data/help $(DATA_PREFIX)
|
||||
ifeq ($(TILES), 1)
|
||||
cp -R --no-preserve=ownership gfx $(DATA_PREFIX)
|
||||
- install -Dm755 -t $(SHARE_DIR)/applications/ data/xdg/org.cataclysmdda.CataclysmDDA.desktop
|
||||
- install -Dm644 -t $(SHARE_DIR)/metainfo/ data/xdg/org.cataclysmdda.CataclysmDDA.appdata.xml
|
||||
- install -Dm644 -t $(SHARE_DIR)/icons/hicolor/scalable/apps/ data/xdg/org.cataclysmdda.CataclysmDDA.svg
|
||||
+ mkdir -p $(SHARE_DIR)/applications/
|
||||
+ install -m 755 data/xdg/org.cataclysmdda.CataclysmDDA.desktop $(SHARE_DIR)/applications/
|
||||
+ mkdir -p $(SHARE_DIR)/metainfo/
|
||||
+ install -m 644 data/xdg/org.cataclysmdda.CataclysmDDA.appdata.xml $(SHARE_DIR)/metainfo/
|
||||
+ mkdir -p $(SHARE_DIR)/icons/hicolor/scalable/apps/
|
||||
+ install -m 644 data/xdg/org.cataclysmdda.CataclysmDDA.svg $(SHARE_DIR)/icons/hicolor/scalable/apps/
|
||||
endif
|
||||
ifeq ($(SOUND), 1)
|
||||
cp -R --no-preserve=ownership data/sound $(DATA_PREFIX)
|
@ -1,17 +0,0 @@
|
||||
--- src/sdl_font.cpp.orig 2021-07-03 05:00:06 UTC
|
||||
+++ src/sdl_font.cpp
|
||||
@@ -22,12 +22,12 @@ static int test_face_size( const std::string &f, int s
|
||||
{
|
||||
const TTF_Font_Ptr fnt( TTF_OpenFontIndex( f.c_str(), size, faceIndex ) );
|
||||
if( fnt ) {
|
||||
- char *style = TTF_FontFaceStyleName( fnt.get() );
|
||||
+ const char *style = TTF_FontFaceStyleName( fnt.get() );
|
||||
if( style != nullptr ) {
|
||||
int faces = TTF_FontFaces( fnt.get() );
|
||||
for( int i = faces - 1; i >= 0; i-- ) {
|
||||
const TTF_Font_Ptr tf( TTF_OpenFontIndex( f.c_str(), size, i ) );
|
||||
- char *ts = nullptr;
|
||||
+ const char *ts = nullptr;
|
||||
if( tf ) {
|
||||
if( nullptr != ( ts = TTF_FontFaceStyleName( tf.get() ) ) ) {
|
||||
if( 0 == strcasecmp( ts, style ) && TTF_FontHeight( tf.get() ) <= size ) {
|
11
games/cataclysm-dda/files/patch-src_version.cmake
Normal file
11
games/cataclysm-dda/files/patch-src_version.cmake
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/version.cmake.orig 2023-08-20 13:24:21 UTC
|
||||
+++ src/version.cmake
|
||||
@@ -6,7 +6,7 @@ ELSE(GIT_EXECUTABLE)
|
||||
)
|
||||
ELSE(GIT_EXECUTABLE)
|
||||
MESSAGE(WARNING "Git binary not found. Build version will be set to NULL. Install Git package or use -DGIT_BINARY to set path to git binary.")
|
||||
- SET (VERSION "NULL")
|
||||
+ SET (VERSION "%%DISTVERSION%%")
|
||||
ENDIF(GIT_EXECUTABLE)
|
||||
|
||||
CONFIGURE_FILE(${SRC} ${DST} @ONLY)
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user