From 5eed65d4e88438cf14b85e0463cf6aa622471aec Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Mon, 6 May 2024 18:17:46 +0300 Subject: [PATCH] =?UTF-8?q?games/simutrans:=20update=20123-0-1=20=E2=86=92?= =?UTF-8?q?=20124-0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- games/simutrans/Makefile | 23 ++++--------------- games/simutrans/distinfo | 6 ++--- .../files/patch-cmake_SimutransInstall.cmake | 22 ++++++++++++++++++ .../files/patch-src_simutrans_sys_simsys.cc | 14 +++++++++++ games/simutrans/files/patch-sys_simsys.cc | 11 --------- games/simutrans/pkg-plist | 1 - 6 files changed, 44 insertions(+), 33 deletions(-) create mode 100644 games/simutrans/files/patch-cmake_SimutransInstall.cmake create mode 100644 games/simutrans/files/patch-src_simutrans_sys_simsys.cc delete mode 100644 games/simutrans/files/patch-sys_simsys.cc diff --git a/games/simutrans/Makefile b/games/simutrans/Makefile index 78d4520da023..caf20830ab31 100644 --- a/games/simutrans/Makefile +++ b/games/simutrans/Makefile @@ -1,6 +1,5 @@ PORTNAME= simutrans -DISTVERSION= 123-0-1 -PORTREVISION= 1 +DISTVERSION= 124-0 CATEGORIES= games MASTER_SITES= SF/simutrans/simutrans/${DISTVERSION} DISTNAME= simutrans-src-${DISTVERSION} @@ -18,16 +17,14 @@ LIB_DEPENDS= libpng.so:graphics/png \ libfreetype.so:print/freetype2 \ libzstd.so:archivers/zstd -USES= cmake compiler:c++11-lib pkgconfig sdl zip +USES= cmake compiler:c++14-lang pkgconfig sdl zip USE_SDL= sdl2 - CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_CCache \ CMAKE_DISABLE_FIND_PACKAGE_Git \ CMAKE_DISABLE_FIND_PACKAGE_Subversion +CMAKE_ARGS= -DSIMUTRANS_USE_REVISION=1 -NO_WRKSUBDIR= yes - -SUB_FILES= simutrans +WRKSRC= ${WRKDIR}/simutrans-Nightly PORTDATA= * PORTDOCS= change_request.txt \ @@ -59,17 +56,7 @@ FLUIDSYNTH_DESC= Enable FluidSynth for MIDI playback FLUIDSYNTH_LIB_DEPENDS= libfluidsynth.so:audio/fluidsynth FLUIDSYNTH_CMAKE_BOOL= SIMUTRANS_USE_FLUIDSYNTH_MIDI -do-install: - @cd ${WRKSRC}/simutrans && ${COPYTREE_SHARE} \ - "ai config font music script text themes" ${STAGEDIR}${DATADIR} - ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/simutrans/simutrans \ - ${STAGEDIR}${PREFIX}/libexec/simutrans - ${INSTALL_SCRIPT} ${WRKDIR}/simutrans ${STAGEDIR}${PREFIX}/bin - @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps - ${INSTALL_DATA} ${WRKSRC}/simutrans.svg \ - ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/ - -do-install-DOCS-on: +post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC}/simutrans && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} diff --git a/games/simutrans/distinfo b/games/simutrans/distinfo index b72743356db1..ee65b86de16d 100644 --- a/games/simutrans/distinfo +++ b/games/simutrans/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1647349156 -SHA256 (simutrans-src-123-0-1.zip) = 8deb38c8de41fb5558640cdd4b9b161c38de92c077b3e506f74c34f93214f469 -SIZE (simutrans-src-123-0-1.zip) = 4771334 +TIMESTAMP = 1715001460 +SHA256 (simutrans-src-124-0.zip) = e72f51929fb6277875018de3744fc419c078b1b8ceaecb4a24a5ffcf49abb222 +SIZE (simutrans-src-124-0.zip) = 5464505 diff --git a/games/simutrans/files/patch-cmake_SimutransInstall.cmake b/games/simutrans/files/patch-cmake_SimutransInstall.cmake new file mode 100644 index 000000000000..be6f9b1dcde7 --- /dev/null +++ b/games/simutrans/files/patch-cmake_SimutransInstall.cmake @@ -0,0 +1,22 @@ +--- cmake/SimutransInstall.cmake.orig 2024-05-04 14:27:27 UTC ++++ cmake/SimutransInstall.cmake +@@ -36,19 +36,12 @@ else () + # MSVC has no variable on the install target path at execution time, which is why we expand the directories at creation time! + install(CODE "execute_process(COMMAND powershell -ExecutionPolicy Bypass -File ${CMAKE_SOURCE_DIR}/tools/get_lang_files.ps1 WORKING_DIRECTORY ${SIMUTRANS_OUTPUT_DIR}/${SIMUTRANS_BASE_DIR}/..)") + else () +- install(CODE "execute_process(COMMAND sh ${CMAKE_SOURCE_DIR}/tools/get_lang_files.sh WORKING_DIRECTORY ${SIMUTRANS_OUTPUT_DIR}/${SIMUTRANS_BASE_DIR}/.. )") + endif () + + # + # Pak installer + # + if (NOT WIN32) +- install(FILES "${CMAKE_SOURCE_DIR}/tools/get_pak.sh" DESTINATION "${SIMUTRANS_BASE_DIR}" +- PERMISSIONS +- OWNER_READ OWNER_WRITE OWNER_EXECUTE +- GROUP_READ GROUP_EXECUTE +- WORLD_READ WORLD_EXECUTE +- ) + else () + # NSIS must be installed manually in the path with the right addons + if(MINGW) diff --git a/games/simutrans/files/patch-src_simutrans_sys_simsys.cc b/games/simutrans/files/patch-src_simutrans_sys_simsys.cc new file mode 100644 index 000000000000..ac91496e836c --- /dev/null +++ b/games/simutrans/files/patch-src_simutrans_sys_simsys.cc @@ -0,0 +1,14 @@ +--- src/simutrans/sys/simsys.cc.orig 2024-05-04 14:27:27 UTC ++++ src/simutrans/sys/simsys.cc +@@ -526,9 +526,9 @@ char const *dr_query_homedir() + } + #else + if( getenv("XDG_DATA_HOME") == NULL ) { +- sprintf(buffer, "%s/simutrans", getenv("HOME")); ++ sprintf(buffer, "%s/.simutrans", getenv("HOME")); + } else { +- sprintf(buffer, "%s/simutrans", getenv("XDG_DATA_HOME")); ++ sprintf(buffer, "%s/.simutrans", getenv("XDG_DATA_HOME")); + } + #endif + diff --git a/games/simutrans/files/patch-sys_simsys.cc b/games/simutrans/files/patch-sys_simsys.cc deleted file mode 100644 index be3822e9a858..000000000000 --- a/games/simutrans/files/patch-sys_simsys.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- sys/simsys.cc.orig 2022-01-28 11:17:50 UTC -+++ sys/simsys.cc -@@ -395,7 +395,7 @@ char const *dr_query_homedir() - #elif defined __ANDROID__ - tstrncpy(buffer,SDL_GetPrefPath("Simutrans Team","simutrans"),lengthof(buffer)); - #else -- sprintf(buffer, "%s/simutrans", getenv("HOME")); -+ sprintf(buffer, "%s/.simutrans", getenv("HOME")); - #endif - - // create directory and subdirectories diff --git a/games/simutrans/pkg-plist b/games/simutrans/pkg-plist index 04bcdf5a1140..18b9387086af 100644 --- a/games/simutrans/pkg-plist +++ b/games/simutrans/pkg-plist @@ -1,3 +1,2 @@ bin/simutrans -libexec/simutrans share/icons/hicolor/scalable/apps/simutrans.svg