games/openttd: update OpenTTD to the latest version 13.4
- By popular demand, prefer SDL 2.x by default but leave the option to use the previous stable version - Drop incomplete work-around for strange Clang bug added in commit f2488f960dc8: the problem is not specific to PowerPC but versions 13.1 and later no longer trigger it (pending investigation) PR: 272428, 272623 Reported by: portscout, pkg-fallout Clang bug: https://github.com/llvm/llvm-project/issues/49093
This commit is contained in:
parent
e9676a4ef9
commit
b274c8918b
|
@ -1,8 +1,7 @@
|
|||
PORTNAME= openttd
|
||||
DISTVERSION= 13.0
|
||||
PORTREVISION= 2
|
||||
DISTVERSION= 13.4
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= https://proxy.binaries.openttd.org/openttd-releases/${DISTVERSION}/
|
||||
MASTER_SITES= https://cdn.openttd.org/openttd-releases/${DISTVERSION}/
|
||||
DISTNAME= ${PORTNAME}-${DISTVERSION}-source
|
||||
|
||||
MAINTAINER= danfe@FreeBSD.org
|
||||
|
@ -14,13 +13,13 @@ LICENSE= GPLv2
|
|||
LIB_DEPENDS= libpng.so:graphics/png \
|
||||
liblzo2.so:archivers/lzo2
|
||||
|
||||
USES= cmake cpe pkgconfig tar:xz
|
||||
USES= cmake compiler:c++17-lang cpe pkgconfig tar:xz
|
||||
CMAKE_ARGS= -DCMAKE_INSTALL_BINDIR:PATH=bin \
|
||||
-DCMAKE_INSTALL_DATADIR:PATH=share
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
|
||||
|
||||
OPTIONS_DEFINE= DOCS FLUIDSYNTH SAVE_PASSWORDS SERVER
|
||||
OPTIONS_DEFINE= DOCS FLUIDSYNTH SAVE_PASSWORDS SDL1 SERVER
|
||||
SERVER_PREVENTS= FLUIDSYNTH
|
||||
|
||||
FLUIDSYNTH_LIB_DEPENDS= libfluidsynth.so:audio/fluidsynth
|
||||
|
@ -29,6 +28,11 @@ FLUIDSYNTH_CMAKE_ON= -DWITH_FLUIDSYNTH:BOOL=ON
|
|||
SAVE_PASSWORDS_DESC= Save passwords between server restarts
|
||||
SAVE_PASSWORDS_EXTRA_PATCHES= ${FILESDIR}/extra-patch-save-passwords
|
||||
|
||||
SDL1_DESC= Use SDL v1.2 instead of v2 for GUI
|
||||
SDL1_VARS= _SDL_VERSION=sdl
|
||||
SDL1_CMAKE_OFF= -DWITH_SDL2:BOOL=ON
|
||||
SDL1_VARS_OFF= _SDL_VERSION=sdl2
|
||||
|
||||
SERVER_DESC= Build dedicated server only (no GUI)
|
||||
SERVER_USES_OFF= gnome sdl
|
||||
SERVER_USE_OFF= SDL=${_SDL_VERSION}
|
||||
|
@ -40,22 +44,6 @@ SERVER_LIB_DEPENDS_OFF= libfontconfig.so:x11-fonts/fontconfig \
|
|||
libiculx.so:devel/icu-lx
|
||||
SERVER_VARS= USE_RC_SUBR=${PORTNAME}
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${ARCH:Mpowerpc*} && ${OSVERSION} > 1400078
|
||||
USES+= llvm:min=16
|
||||
CC= clang${LLVM_VERSION}
|
||||
CXX= clang++${LLVM_VERSION}
|
||||
.else
|
||||
USES+= compiler:c++17-lang
|
||||
.endif
|
||||
|
||||
.if exists(${LOCALBASE}/lib/libSDL2.so)
|
||||
_SDL_VERSION= sdl2
|
||||
.else
|
||||
_SDL_VERSION= sdl
|
||||
.endif
|
||||
|
||||
post-install-SERVER-on:
|
||||
@${REINPLACE_CMD} -E '/\.desktop|icons|pixmaps/d' ${TMPPLIST}
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1675619840
|
||||
SHA256 (openttd-13.0-source.tar.xz) = 339df8e0e0827087c83afe78f8efc6a73b0a3d8a950a0b53137ce6e8aad7ab67
|
||||
SIZE (openttd-13.0-source.tar.xz) = 7422316
|
||||
TIMESTAMP = 1708509717
|
||||
SHA256 (openttd-13.4-source.tar.xz) = 2a1deba01bfe58e2188879f450c3fa4f3819271ab49bf348dd66545f040d146f
|
||||
SIZE (openttd-13.4-source.tar.xz) = 7428012
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
--- CMakeLists.txt.orig 2022-04-02 10:38:20 UTC
|
||||
--- CMakeLists.txt.orig 2023-07-29 23:01:44 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -133,7 +133,9 @@ if(NOT OPTION_DEDICATED)
|
||||
if(NOT SDL2_FOUND)
|
||||
@@ -129,11 +129,14 @@ if(NOT OPTION_DEDICATED)
|
||||
find_package(Allegro)
|
||||
if(NOT APPLE)
|
||||
find_package(Freetype)
|
||||
+if(WITH_SDL2)
|
||||
find_package(SDL2)
|
||||
- if(NOT SDL2_FOUND)
|
||||
+else()
|
||||
find_package(SDL)
|
||||
endif()
|
||||
+if(WITH_FLUIDSYNTH)
|
||||
|
@ -10,7 +16,7 @@
|
|||
find_package(Fontconfig)
|
||||
find_package(ICU OPTIONAL_COMPONENTS i18n lx)
|
||||
endif()
|
||||
@@ -260,7 +262,9 @@ link_package(LIBLZMA TARGET LibLZMA::LibLZMA ENCOURAGE
|
||||
@@ -260,7 +263,9 @@ link_package(LIBLZMA TARGET LibLZMA::LibLZMA ENCOURAGE
|
||||
link_package(LZO)
|
||||
|
||||
if(NOT OPTION_DEDICATED)
|
||||
|
|
Loading…
Reference in New Issue