Download raw body.
update for games/openomf
Hi,
Looks like we fell behind for a while on this port. I prepared the
attached diff that updates it to the release 0.8.4. Among the
changes[1] are rollback netcode since 0.8.0 which is the state of the
art for fighting games played over internet, as far as I know about the
topic. There is also experimental netplay spectator mode since 0.8.2.
Portswise, I switched this to github via DIST_TUPLE for ease of updates
rather than rolling tarballs to self-host.
Of note, the SHA256 hash in the README doesn't match the freeware file
(anymore). I haven't touched this, but maybe pointing to the upstream
wiki[2] to follow their instructions would be more durable?
ok to update?
[1] https://github.com/omf2097/openomf/releases
[2] https://www.omf2097.com/wiki/doku.php?id=download
Index: Makefile
===================================================================
RCS file: /cvs/ports/games/openomf/Makefile,v
diff -u -p -r1.8 Makefile
--- Makefile 28 Jan 2025 11:22:02 -0000 1.8
+++ Makefile 16 Sep 2025 19:15:41 -0000
@@ -1,6 +1,9 @@
COMMENT = free remake of One Must Fall 2097 game engine
-DISTNAME = openomf-0.6.5.2
-REVISION = 0
+
+V = 0.8.4
+PKGNAME = openomf-${V}
+DIST_TUPLE += github omf2097 openomf ${V} .
+
CATEGORIES = games x11
HOMEPAGE = https://www.openomf.org/
@@ -9,10 +12,8 @@ MAINTAINER = Brian Callahan <bcallah@ope
# MIT
PERMIT_PACKAGE = Yes
-WANTLIB += SDL2 argtable2 c confuse enet intl m openal png xmp
-WANTLIB += z
-
-SITES = https://mirrors.nycbug.org/pub/distfiles/
+WANTLIB += SDL2 SDL2_mixer c confuse enet epoxy m miniupnpc
+WANTLIB += natpmp opusfile png pthread xmp z
# C11
COMPILER = base-clang ports-gcc
@@ -21,12 +22,13 @@ COMPILER_LANGS = c
MODULES = devel/cmake
LIB_DEPENDS = audio/libxmp \
- audio/openal \
- devel/argtable \
+ audio/opusfile \
devel/libconfuse \
- devel/sdl2 \
+ devel/sdl2-mixer \
graphics/png \
- net/enet
+ net/enet \
+ net/miniupnp/libnatpmp \
+ net/miniupnp/miniupnpc
NO_TEST = Yes
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/openomf/distinfo,v
diff -u -p -r1.2 distinfo
--- distinfo 10 May 2019 06:20:18 -0000 1.2
+++ distinfo 16 Sep 2025 19:15:41 -0000
@@ -1,2 +1,2 @@
-SHA256 (openomf-0.6.5.2.tar.gz) = weiWhJXQacBs9u6pfA6eQMoREh0NR8Bk1yZsDLeZ8VU=
-SIZE (openomf-0.6.5.2.tar.gz) = 369944
+SHA256 (omf2097-openomf-0.8.4.tar.gz) = u8zwuWXalpvnBSdU3yrY+YAKYZ/PrWk1bSTbgX8Rhv8=
+SIZE (omf2097-openomf-0.8.4.tar.gz) = 816107
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/games/openomf/patches/patch-CMakeLists_txt,v
diff -u -p -r1.3 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 11 Mar 2022 19:04:46 -0000 1.3
+++ patches/patch-CMakeLists_txt 16 Sep 2025 19:15:41 -0000
@@ -1,22 +1,30 @@
Install to a better location.
+Remove hardcoded optimization flags.
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
-@@ -174,7 +174,7 @@ include_directories(${COREINCS})
+@@ -86,9 +86,9 @@ if(MSVC)
+ else()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wformat -pedantic -Wvla")
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb -Werror -fno-omit-frame-pointer")
+- set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O2 -fno-omit-frame-pointer -DNDEBUG")
+- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -DNDEBUG")
+- set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -Os -DNDEBUG")
++ set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -fno-omit-frame-pointer -DNDEBUG")
++ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG")
++ set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -DNDEBUG")
+ endif()
- # Build core sources first as an object library
- # this can then be reused in tests and main executable to speed things up
--add_library(openomf_core OBJECT ${OPENOMF_SRC})
-+add_library(openomf_core STATIC ${OPENOMF_SRC})
- set(CORELIBS openomf_core ${CORELIBS})
-
- # Build the game binary
-@@ -263,6 +263,6 @@ install(TARGETS openomf
- COMPONENT Binaries
- )
- install(FILES resources/openomf.bk resources/openomf_icon.png
-- DESTINATION share/games/openomf/
-+ DESTINATION share/openomf/
- COMPONENT Data
- )
+ # Enable AddressSanitizer if requested
+@@ -478,8 +478,8 @@ else()
+ # On unixy systems, follow standard.
+ install(TARGETS openomf RUNTIME DESTINATION bin COMPONENT Binaries)
+ install(FILES ${DOC_FILES} resources/openomf.bk resources/gamecontrollerdb/gamecontrollerdb.txt resources/icons/openomf.png
+- DESTINATION share/games/openomf/
++ DESTINATION share/openomf/
+ COMPONENT Data
+ )
+- install(DIRECTORY shaders/ DESTINATION share/games/openomf/shaders COMPONENT Data)
++ install(DIRECTORY shaders/ DESTINATION share/openomf/shaders COMPONENT Data)
+ endif()
Index: patches/patch-cmake-scripts_BuildLanguages_cmake
===================================================================
RCS file: patches/patch-cmake-scripts_BuildLanguages_cmake
diff -N patches/patch-cmake-scripts_BuildLanguages_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-cmake-scripts_BuildLanguages_cmake 16 Sep 2025 19:15:41 -0000
@@ -0,0 +1,12 @@
+Index: cmake-scripts/BuildLanguages.cmake
+--- cmake-scripts/BuildLanguages.cmake.orig
++++ cmake-scripts/BuildLanguages.cmake
+@@ -12,7 +12,7 @@ set(OPENOMF_LANGS DANISH)
+ if(WIN32)
+ set(LANGUAGE_INSTALL_PATH "openomf/resources/")
+ else()
+- set(LANGUAGE_INSTALL_PATH "share/games/openomf/")
++ set(LANGUAGE_INSTALL_PATH "share/openomf/")
+ endif()
+
+ # generate custom target info
Index: patches/patch-src_game_gui_menu_c
===================================================================
RCS file: patches/patch-src_game_gui_menu_c
diff -N patches/patch-src_game_gui_menu_c
--- patches/patch-src_game_gui_menu_c 11 Mar 2022 19:04:46 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-https://github.com/omf2097/openomf/issues/351
-
-Index: src/game/gui/menu.c
---- src/game/gui/menu.c.orig
-+++ src/game/gui/menu.c
-@@ -158,7 +158,7 @@ static int menu_action(component *mc, int action) {
- // Update selected component
- c = sizer_get(mc, m->selected);
-
-- } while(component_is_disabled(c));
-+ } while(component_is_disabled(c) && c->supports_disable);
- // Play menu sound
- sound_play(19, 0.5f, 0.0f, 2.0f);
- component_select(c, 1);
Index: patches/patch-src_resources_pathmanager_c
===================================================================
RCS file: /cvs/ports/games/openomf/patches/patch-src_resources_pathmanager_c,v
diff -u -p -r1.2 patch-src_resources_pathmanager_c
--- patches/patch-src_resources_pathmanager_c 11 Mar 2022 19:04:46 -0000 1.2
+++ patches/patch-src_resources_pathmanager_c 16 Sep 2025 19:15:41 -0000
@@ -3,21 +3,19 @@ Reconfigure game asset search paths.
Index: src/resources/pathmanager.c
--- src/resources/pathmanager.c.orig
+++ src/resources/pathmanager.c
-@@ -91,7 +91,7 @@ int pm_init() {
+@@ -126,12 +126,12 @@ int pm_init(void) {
+ local_path_build(RESOURCE_PATH, bin_base_dir, "resources\\");
+ local_path_build(SHADER_PATH, bin_base_dir, "shaders\\");
+ m_ok = 1;
+- } else if(strcmp(SDL_GetPlatform(), "Linux") == 0) {
++ } else if(strcmp(SDL_GetPlatform(), "Linux") == 0 || strcmp(SDL_GetPlatform(), "OpenBSD") == 0) {
// on linux, the resources will be in ../share/games/openomf, relative to the binary
// so if openomf is installed to /usr/local/bin,
// the resources will be in /usr/local/share/games/openomf
- local_path_build(RESOURCE_PATH, bin_base_dir, "../share/games/openomf/");
+- local_path_build(SHADER_PATH, bin_base_dir, "../share/games/openomf/shaders/");
+ local_path_build(RESOURCE_PATH, bin_base_dir, "../share/openomf/");
- local_path_build(PLUGIN_PATH, bin_base_dir, "../lib/openomf/");
++ local_path_build(SHADER_PATH, bin_base_dir, "../share/openomf/shaders/");
m_ok = 1;
- } else if(!strcasecmp(SDL_GetPlatform(), "Mac OS X")) {
-@@ -112,7 +112,7 @@ int pm_init() {
- local_path_build(RESOURCE_PATH, "resources\\", "");
- local_path_build(PLUGIN_PATH, "plugins\\", "");
- } else {
-- local_path_build(RESOURCE_PATH, "resources/", "");
-+ local_path_build(RESOURCE_PATH, "", "");
- local_path_build(PLUGIN_PATH, "plugins/", "");
- }
- }
+ } else if(strcmp(SDL_GetPlatform(), "Mac OS X") == 0) {
+ // on OSX, GetBasePath returns the 'Resources' directory
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/openomf/pkg/PLIST,v
diff -u -p -r1.4 PLIST
--- pkg/PLIST 11 Mar 2022 19:04:46 -0000 1.4
+++ pkg/PLIST 16 Sep 2025 19:15:41 -0000
@@ -1,5 +1,19 @@
@bin bin/openomf
share/doc/pkg-readmes/${PKGSTEM}
share/openomf/
+share/openomf/DANISH.LNG
+share/openomf/DANISH.LNG2
+share/openomf/ENGLISH.DAT2
+share/openomf/GERMAN.DAT2
+share/openomf/LICENSE
+share/openomf/LICENSE.argtable3
+share/openomf/LICENSE.gamecontrollerdb
+share/openomf/README.md
+share/openomf/gamecontrollerdb.txt
share/openomf/openomf.bk
-share/openomf/openomf_icon.png
+share/openomf/openomf.png
+share/openomf/shaders/
+share/openomf/shaders/palette.frag
+share/openomf/shaders/palette.vert
+share/openomf/shaders/rgba.frag
+share/openomf/shaders/rgba.vert
update for games/openomf