Skip to content

Commit

Permalink
games/simutrans: update 123-0-1 → 124-0
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed May 14, 2024
1 parent f86a608 commit 5eed65d
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 33 deletions.
23 changes: 5 additions & 18 deletions games/simutrans/Makefile
Original file line number Diff line number Diff line change
@@ -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}
Expand All @@ -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 \
Expand Down Expand Up @@ -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}

Expand Down
6 changes: 3 additions & 3 deletions games/simutrans/distinfo
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions games/simutrans/files/patch-cmake_SimutransInstall.cmake
Original file line number Diff line number Diff line change
@@ -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)
14 changes: 14 additions & 0 deletions games/simutrans/files/patch-src_simutrans_sys_simsys.cc
Original file line number Diff line number Diff line change
@@ -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

11 changes: 0 additions & 11 deletions games/simutrans/files/patch-sys_simsys.cc

This file was deleted.

1 change: 0 additions & 1 deletion games/simutrans/pkg-plist
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
bin/simutrans
libexec/simutrans
share/icons/hicolor/scalable/apps/simutrans.svg

0 comments on commit 5eed65d

Please sign in to comment.