-
Notifications
You must be signed in to change notification settings - Fork 727
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
d495a73
commit df8938e
Showing
8 changed files
with
6,231 additions
and
3,889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
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 | ||
|
||
SOUND_DESC= Sound support (SDL UI only) | ||
UI_DESC= User Interface | ||
|
||
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 | ||
|
||
.include <bsd.port.pre.mk> | ||
|
||
.if ${CHOSEN_COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 36 | ||
CXXFLAGS+= -Wno-inconsistent-missing-override | ||
.endif | ||
SHEBANG_FILES= lang/*.sh | ||
bash_CMD= /bin/sh | ||
|
||
CMAKE_OFF= BACKTRACE TESTS | ||
CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_Git | ||
|
||
.if ${FLAVOR} == tiles | ||
|
||
USES+= pkgconfig sdl | ||
USE_SDL= image2 mixer2 ttf2 | ||
CMAKE_ARGS+= -DLOCALIZE=OFF \ | ||
-DSOUND=1 \ | ||
-DTILES=1 | ||
PLIST_SUB+= CURSES="@comment " \ | ||
TILES="" | ||
|
||
.else | ||
|
||
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 | ||
|
||
post-patch-NLS-off: | ||
@${REINPLACE_CMD} -e \ | ||
'/LOCALE_DIR/s|^|#|' \ | ||
${WRKSRC}/Makefile | ||
@${REINPLACE_CMD} -e 's|%%DISTVERSION%%|${DISTVERSION}|' ${WRKSRC}/src/version.cmake | ||
|
||
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
Oops, something went wrong.