diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2022-05-17 14:43:57 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2022-05-18 18:54:10 +0000 |
commit | 973414029d3442683b314739d3b4df5153b04394 (patch) | |
tree | 845bcecc0f40e7ceada2c55318404cc7d340dc6e /games/devilutionX/files | |
parent | 755720c7b8a1841175271d6c3184e667f4882cef (diff) | |
download | ports-973414029d3442683b314739d3b4df5153b04394.tar.gz ports-973414029d3442683b314739d3b4df5153b04394.zip |
games/devilutionX: update to 1.4
- Update to 1.4
- Drop dependency on font, no longer needed
- Drop unnecessary .desktop file patches (also upstream PR exists)
- Install from the port (instead of patching CMakeLists.txt), to be
more explicit and flexible
- Convert to pkg-plist as there are more files now
- The new version tries to fetch dependencies from the net, for some
depenencies this is unconditional. Fetch these properly with
GH_TUPLE and place in a directory where CMake expectes them.
- Upstream code expects patch component in the version, so add an extra
.0 to VERSION_NUM. This should not break on (future) X.Y.Z versions
as the component will move to micropatch position and will be ignored
- BINARY_RELEASE option is gone
- Untie DEBUG (engine debug bode) from WITH_DEBUG knob (build debug
binary), these are orthogonal
- Properly support optional depends; zerotier is the only one
broken as it conflicts with system header (see
https://github.com/diasurgical/devilutionX/issues/4585)
- Install devilutionx (own) data file
- Since it's not versioned, use a little hack to add a tag to the
filename to avoid clashes on the future updates; this seemed less
evil than introducing DIST_SUBDIR
- Use two-level datadir to be consistent with ~/.local/share path
- Update pkg-message (Diablo data file doesn't have to be lowercase,
works either way)
PR: 264064
Approved by: eduardo@FreeBSD.org (maintainer)
Diffstat (limited to 'games/devilutionX/files')
-rw-r--r-- | games/devilutionX/files/patch-CMakeLists.txt | 20 | ||||
-rw-r--r-- | games/devilutionX/files/patch-Packaging_fedora_devilutionx.desktop | 17 | ||||
-rw-r--r-- | games/devilutionX/files/patch-Source_engine_random.cpp | 14 | ||||
-rw-r--r-- | games/devilutionX/files/patch-Source_init.cpp | 11 | ||||
-rw-r--r-- | games/devilutionX/files/patch-Source_sound.h | 14 |
5 files changed, 47 insertions, 29 deletions
diff --git a/games/devilutionX/files/patch-CMakeLists.txt b/games/devilutionX/files/patch-CMakeLists.txt index 94b22747cbe4..0d51936652a8 100644 --- a/games/devilutionX/files/patch-CMakeLists.txt +++ b/games/devilutionX/files/patch-CMakeLists.txt @@ -1,14 +1,10 @@ ---- CMakeLists.txt.orig 2021-04-08 06:20:26 UTC +--- CMakeLists.txt.orig 2022-04-25 02:21:41 UTC +++ CMakeLists.txt -@@ -873,6 +873,11 @@ if(CPACK) - set(CPACK_GENERATOR "DragNDrop") - endif() +@@ -156,7 +156,6 @@ if(NONET) + set(PACKET_ENCRYPTION OFF) + endif() -+install(TARGETS devilutionx DESTINATION ${CMAKE_INSTALL_BINDIR}) -+install(FILES Packaging/fedora/devilutionx.desktop DESTINATION ${CMAKE_INSTALL_SHAREDIR}/applications) -+install(FILES Packaging/resources/icon.png DESTINATION ${CMAKE_INSTALL_SHAREDIR}/icons/hicolor/512x512/apps RENAME devilutionx.png) -+install(FILES Packaging/resources/icon_solid.png DESTINATION ${CMAKE_INSTALL_SHAREDIR}/icons/hicolor/512x512/apps RENAME devilutionx_solid.png) -+ - set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) +-find_program(CCACHE_PROGRAM ccache) + if(CCACHE_PROGRAM) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") + endif() diff --git a/games/devilutionX/files/patch-Packaging_fedora_devilutionx.desktop b/games/devilutionX/files/patch-Packaging_fedora_devilutionx.desktop deleted file mode 100644 index 46627d9440d7..000000000000 --- a/games/devilutionX/files/patch-Packaging_fedora_devilutionx.desktop +++ /dev/null @@ -1,17 +0,0 @@ ---- Packaging/fedora/devilutionx.desktop.orig 2021-04-06 05:51:05 UTC -+++ Packaging/fedora/devilutionx.desktop -@@ -1,10 +1,10 @@ - [Desktop Entry] - Name=DevilutionX - GenericName=DevilutionX --Comment=Play Diablo I on Linux --Comment[da]=Spil Diablo I på Linux --Comment[hr]=Igrajte Diablo I na Linuxu --Comment[it]=Gioca a Diablo I su Linux -+Comment=Play Diablo -+Comment[da]=Spil Diablo I -+Comment[hr]=Igrajte Diablo I -+Comment[it]=Gioca a Diablo I - Exec=devilutionx --diablo - Icon=devilutionx - Terminal=false diff --git a/games/devilutionX/files/patch-Source_engine_random.cpp b/games/devilutionX/files/patch-Source_engine_random.cpp new file mode 100644 index 000000000000..ac57d195923f --- /dev/null +++ b/games/devilutionX/files/patch-Source_engine_random.cpp @@ -0,0 +1,14 @@ +https://github.com/diasurgical/devilutionX/pull/4588 + +--- Source/engine/random.cpp.orig 2022-04-25 02:21:41 UTC ++++ Source/engine/random.cpp +@@ -29,7 +29,8 @@ uint32_t GetLCGEngineState() + + int32_t GetRndSeed() + { +- return abs(static_cast<int32_t>(sglGameSeed)); ++ const int32_t seed = static_cast<int32_t>(sglGameSeed); ++ return seed == -2147483648 ? -2147483648 : abs(seed); + } + + int32_t AdvanceRndSeed() diff --git a/games/devilutionX/files/patch-Source_init.cpp b/games/devilutionX/files/patch-Source_init.cpp new file mode 100644 index 000000000000..96130a70054a --- /dev/null +++ b/games/devilutionX/files/patch-Source_init.cpp @@ -0,0 +1,11 @@ +--- Source/init.cpp.orig 2022-04-25 02:21:41 UTC ++++ Source/init.cpp +@@ -90,7 +90,7 @@ std::vector<std::string> GetMPQSearchPaths() + if (paths[0] == paths[1]) + paths.pop_back(); + +-#if defined(__linux__) && !defined(__ANDROID__) ++#if (defined(__linux__) && !defined(__ANDROID__)) || defined(__FreeBSD__) + paths.emplace_back("/usr/share/diasurgical/devilutionx/"); + paths.emplace_back("/usr/local/share/diasurgical/devilutionx/"); + #elif defined(__3DS__) || defined(__SWITCH__) diff --git a/games/devilutionX/files/patch-Source_sound.h b/games/devilutionX/files/patch-Source_sound.h new file mode 100644 index 000000000000..c392962bd8dc --- /dev/null +++ b/games/devilutionX/files/patch-Source_sound.h @@ -0,0 +1,14 @@ +--- Source/sound.h.orig 2022-05-17 15:57:06 UTC ++++ Source/sound.h +@@ -60,7 +60,11 @@ struct TSnd { + }; + + extern bool gbSndInited; ++#ifndef NOSOUND + extern _music_id sgnMusicTrack; ++#else ++inline const _music_id sgnMusicTrack = NUM_MUSIC; ++#endif + + void ClearDuplicateSounds(); + void snd_stop_snd(TSnd *pSnd); |