diff --git a/games/openttd/Makefile b/games/openttd/Makefile index 4c78f3a2bb26..2c8767d76450 100644 --- a/games/openttd/Makefile +++ b/games/openttd/Makefile @@ -1,65 +1,53 @@ 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 COMMENT= Open source clone of Microprose Transport Tycoon Deluxe WWW= https://www.openttd.org/ 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 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} SERVER_CMAKE_ON= -DOPTION_DEDICATED:BOOL=ON SERVER_LIB_DEPENDS_OFF= libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libicui18n.so:devel/icu \ libicu-le-hb.so:devel/icu-le-hb \ libiculx.so:devel/icu-lx SERVER_VARS= USE_RC_SUBR=${PORTNAME} -.include - -.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} do-test: @cd ${TEST_WRKSRC} && ctest -C ${CMAKE_BUILD_TYPE} ${_MAKE_JOBS} .include diff --git a/games/openttd/distinfo b/games/openttd/distinfo index 2b588f925aa5..c3828606cb3b 100644 --- a/games/openttd/distinfo +++ b/games/openttd/distinfo @@ -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 diff --git a/games/openttd/files/patch-CMakeLists.txt b/games/openttd/files/patch-CMakeLists.txt index 24881ccc445a..d6e569721c72 100644 --- a/games/openttd/files/patch-CMakeLists.txt +++ b/games/openttd/files/patch-CMakeLists.txt @@ -1,22 +1,28 @@ ---- 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) find_package(Fluidsynth) +endif() 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) + if(WITH_FLUIDSYNTH) link_package(Fluidsynth) + endif() link_package(SDL) link_package(SDL2 TARGET SDL2::SDL2) link_package(Allegro)