Hi,

An update to the latest odamex.

I managed to simplify the patches quite a bit.

Note that we have to use a bundled jsoncpp (see comment in Makefile).

Comments? OK?


Index: Makefile
===================================================================
RCS file: /cvs/ports/games/odamex/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- Makefile    9 Jun 2021 19:50:07 -0000       1.5
+++ Makefile    6 Aug 2021 09:11:20 -0000
@@ -2,10 +2,9 @@
 
 COMMENT =      online multiplayer doom
 
-V =            0.8.3
+V =            0.9.3
 DISTNAME =     odamex-src-${V}
 PKGNAME =      odamex-${V}
-REVISION =     0
 
 CATEGORIES =   games
 HOMEPAGE =     https://odamex.net/
@@ -15,10 +14,9 @@ MAINTAINER = Edd Barrett <e...@openbsd.or
 PERMIT_PACKAGE =       Yes
 
 WANTLIB += ${COMPILER_LIBCXX} ICE SDL2 SDL2_mixer SM X11 Xext
-WANTLIB += c execinfo m miniupnpc png portmidi wx_baseu-3.0 wx_baseu_net-3.0
-WANTLIB += wx_baseu_xml-3.0 wx_gtk3u_adv-3.0 wx_gtk3u_core-3.0
-WANTLIB += wx_gtk3u_html-3.0 wx_gtk3u_qa-3.0 wx_gtk3u_xrc-3.0
-WANTLIB += z
+WANTLIB += c curl execinfo m miniupnpc png portmidi wx_baseu-3.0
+WANTLIB += wx_baseu_net-3.0 wx_gtk3u_adv-3.0 wx_gtk3u_core-3.0
+WANTLIB += wx_gtk3u_xrc-3.0 z
 
 MASTER_SITES =         ${MASTER_SITE_SOURCEFORGE:=odamex/}
 EXTRACT_SUFX =         .tar.bz2
@@ -29,21 +27,20 @@ COMPILER =          base-clang ports-gcc base-gc
 
 MODULES =              devel/cmake
 
-CONFIGURE_ENV +=       CXXFLAGS="-I${LOCALBASE}/include 
-I${LOCALBASE}/include/miniupnpc" \
-                       LDFLAGS="-L${LOCALBASE}/lib"
+# Note that odamex won't build against the system libjsoncpp (doesn't build
+# with std=gnu++98), so we use the bundled one. Upstream notified.
+CONFIGURE_ENV +=       CXXFLAGS=-I${LOCALBASE}/include/miniupnpc \
+                       LDFLAGS=-L${LOCALBASE}/lib
 CONFIGURE_ARGS +=      -DNO_AG-ODALAUNCH_TARGET=YES
 
 LIB_DEPENDS =          x11/wxWidgets \
                        audio/portmidi \
                        graphics/png \
                        devel/sdl2-mixer \
-                       net/miniupnp/miniupnpc
+                       net/miniupnp/miniupnpc \
+                       net/curl
 
 NO_TEST =              Yes
-
-pre-build:
-       ${SUBST_CMD} ${WRKSRC}/CMakeLists.txt
-       ${SUBST_CMD} ${WRKSRC}/server/CMakeLists.txt
 
 EXAMPLES_DIR = ${PREFIX}/share/examples/odamex
 post-install:
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/odamex/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo    5 Oct 2020 21:07:37 -0000       1.1.1.1
+++ distinfo    22 Jul 2021 19:27:31 -0000
@@ -1,2 +1,2 @@
-SHA256 (odamex-src-0.8.3.tar.bz2) = 
3M/SMwPXQlCLvs8SQIpVVTkGc5GSzfPy1tXi8HWP+eY=
-SIZE (odamex-src-0.8.3.tar.bz2) = 8532510
+SHA256 (odamex-src-0.9.3.tar.bz2) = 
F6zs/8orYLbJ+mvxpLfNihll6LFT9dhlz5xYs2RMvG4=
+SIZE (odamex-src-0.9.3.tar.bz2) = 6658459
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: patches/patch-CMakeLists_txt
diff -N patches/patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt        5 Oct 2020 21:07:37 -0000       1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-$OpenBSD: patch-CMakeLists_txt,v 1.1.1.1 2020/10/05 21:07:37 edd Exp $
-
-INSTALL_PREFIX needs to be set to find executables and wads.
-
-Don't use the bundled miniupnpc.
-
-Index: CMakeLists.txt
---- CMakeLists.txt.orig
-+++ CMakeLists.txt
-@@ -10,6 +10,7 @@ set(CMAKE_INSTALL_BINDIR "bin")
- set(CMAKE_INSTALL_DATADIR "share")
- include(GNUInstallDirs OPTIONAL)
- 
-+add_definitions(-DINSTALL_PREFIX="${PREFIX}")
- add_definitions(-DINSTALL_BINDIR="${CMAKE_INSTALL_BINDIR}")
- add_definitions(-DINSTALL_DATADIR="${CMAKE_INSTALL_DATADIR}")
- 
-@@ -149,16 +150,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/module
- # git describe
- include(GetGitRevisionDescription)
- git_describe(GIT_DESCRIBE --tags --always)
--
--# MiniUPnPc
--if (USE_MINIUPNP)
--  set(UPNPC_BUILD_STATIC ON CACHE INTERNAL "" FORCE)
--  set(UPNPC_BUILD_SHARED OFF CACHE INTERNAL "" FORCE)
--  set(UPNPC_BUILD_TESTS OFF CACHE INTERNAL "" FORCE)
--  set(UPNPC_INSTALL OFF CACHE INTERNAL "" FORCE)
--  mark_as_advanced(FORCE UPNPC_INSTALL)
--  add_subdirectory(libraries/libminiupnpc)
--endif()
- 
- # Subdirectories for Odamex projects
- if(BUILD_CLIENT)
Index: patches/patch-client_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/games/odamex/patches/patch-client_CMakeLists_txt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-client_CMakeLists_txt
--- patches/patch-client_CMakeLists_txt 5 Oct 2020 21:07:37 -0000       1.1.1.1
+++ patches/patch-client_CMakeLists_txt 22 Jul 2021 19:55:12 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-client_CMakeLists_txt,v 
 Index: client/CMakeLists.txt
 --- client/CMakeLists.txt.orig
 +++ client/CMakeLists.txt
-@@ -234,7 +234,7 @@ if(SDL_VERSION)
+@@ -220,7 +220,7 @@ if(TARGET SDL2::SDL2 OR TARGET SDL::SDL)
    endif()
  
    if(UNIX AND NOT APPLE)
Index: patches/patch-libraries_CMakeLists_txt
===================================================================
RCS file: patches/patch-libraries_CMakeLists_txt
diff -N patches/patch-libraries_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libraries_CMakeLists_txt      5 Aug 2021 20:33:05 -0000
@@ -0,0 +1,59 @@
+$OpenBSD$
+
+Don't use bundled miniupnpc.
+
+Index: libraries/CMakeLists.txt
+--- libraries/CMakeLists.txt.orig
++++ libraries/CMakeLists.txt
+@@ -225,51 +225,6 @@ if(BUILD_CLIENT)
+   endif()
+ endif()
+ 
+-### MiniUPnPc ###
+-
+-if(BUILD_SERVER)
+-  message(STATUS "Compiling MiniUPnPc...")
+-
+-  # Figure out the correct library path to attach to our imported target
+-  set(MINIUPNPC_INCLUDE_DIR
+-    "${CMAKE_CURRENT_BINARY_DIR}/local/include/miniupnpc")
+-  set(MINIUPNPC_LIBRARY
+-    "${CMAKE_CURRENT_BINARY_DIR}/local/lib/${libprefix}miniupnpc${libsuffix}")
+-
+-  # This must exist before the target is synthesized.
+-  file(MAKE_DIRECTORY ${MINIUPNPC_INCLUDE_DIR})
+-
+-  # Generate the build.
+-  execute_process(COMMAND "${CMAKE_COMMAND}"
+-    -S "${CMAKE_CURRENT_SOURCE_DIR}/libminiupnpc"
+-    -B "${CMAKE_CURRENT_BINARY_DIR}/libminiupnpc-build"
+-    -G "${CMAKE_GENERATOR}"
+-    -A "${CMAKE_GENERATOR_PLATFORM}"
+-    -T "${CMAKE_GENERATOR_TOOLSET}"
+-    "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
+-    "-DCMAKE_LINKER=${CMAKE_LINKER}"
+-    "-DCMAKE_RC_COMPILER=${CMAKE_RC_COMPILER}"
+-    "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
+-    "-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/local"
+-    "-DCMAKE_INSTALL_LIBDIR=lib" # Without this, CentOS installs into lib64
+-    "-DUPNPC_BUILD_SHARED=No"
+-    "-DUPNPC_BUILD_TESTS=No")
+-
+-  # Compile the library.
+-  execute_process(COMMAND "${CMAKE_COMMAND}"
+-    --build "${CMAKE_CURRENT_BINARY_DIR}/libminiupnpc-build"
+-    --config RelWithDebInfo --target install --parallel 
${PARALLEL_PROC_COUNT})
+-
+-  # Synthesize an imported target that can be linked against.
+-  add_library(upnpc-static STATIC IMPORTED GLOBAL)
+-  set_target_properties(upnpc-static PROPERTIES
+-    INTERFACE_INCLUDE_DIRECTORIES "${MINIUPNPC_INCLUDE_DIR}"
+-    IMPORTED_LOCATION ${MINIUPNPC_LIBRARY})
+-  if(WIN32)
+-    set_target_properties(upnpc-static PROPERTIES INTERFACE_LINK_LIBRARIES 
"ws2_32;iphlpapi")
+-  endif()
+-endif()
+-
+ ### SDL libraries ###
+ 
+ if(BUILD_CLIENT)
Index: patches/patch-odalaunch_CMakeLists_txt
===================================================================
RCS file: patches/patch-odalaunch_CMakeLists_txt
diff -N patches/patch-odalaunch_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-odalaunch_CMakeLists_txt      6 Aug 2021 08:49:14 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Make odalaunch find the odamex executable.
+
+Index: odalaunch/CMakeLists.txt
+--- odalaunch/CMakeLists.txt.orig
++++ odalaunch/CMakeLists.txt
+@@ -1,5 +1,8 @@
+ include(OdalaunchCopyLibs)
+ include(OdamexTargetSettings)
++
++add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
++
+ 
+ # API
+ set(API_DIR ../odalpapi)
Index: patches/patch-odalpapi_net_io_cpp
===================================================================
RCS file: /cvs/ports/games/odamex/patches/patch-odalpapi_net_io_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-odalpapi_net_io_cpp
--- patches/patch-odalpapi_net_io_cpp   5 Oct 2020 21:07:37 -0000       1.1.1.1
+++ patches/patch-odalpapi_net_io_cpp   6 Aug 2021 08:49:17 -0000
@@ -5,7 +5,7 @@ AI_ALL isn't defined on OpenBSD.
 Index: odalpapi/net_io.cpp
 --- odalpapi/net_io.cpp.orig
 +++ odalpapi/net_io.cpp
-@@ -182,7 +182,6 @@ void BufferedSocket::SetRemoteAddress(const string& Ad
+@@ -183,7 +183,6 @@ void BufferedSocket::SetRemoteAddress(const string& Ad
        addrinfo* result = NULL;
  
        memset(&hints, 0, sizeof(struct addrinfo));
Index: patches/patch-server_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/games/odamex/patches/patch-server_CMakeLists_txt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-server_CMakeLists_txt
--- patches/patch-server_CMakeLists_txt 5 Oct 2020 21:07:37 -0000       1.1.1.1
+++ patches/patch-server_CMakeLists_txt 6 Aug 2021 08:49:21 -0000
@@ -1,51 +1,18 @@
-$OpenBSD: patch-server_CMakeLists_txt,v 1.1.1.1 2020/10/05 21:07:37 edd Exp $
-
-Don't use the bundled miniupnpc.
+$OpenBSD$
 
 Index: server/CMakeLists.txt
 --- server/CMakeLists.txt.orig
 +++ server/CMakeLists.txt
-@@ -33,12 +33,6 @@ set(JSONCPP_DIR ../libraries/jsoncpp)
- file(GLOB JSONCPP_HEADERS ${JSONCPP_DIR}/json/*.h)
- set(JSONCPP_SOURCE ${JSONCPP_DIR}/jsoncpp.cpp)
- 
--# MiniUPnPc
--if (USE_MINIUPNP)
--  set(MINIUPNPC_DIR ../libraries/libminiupnpc)
--  set(MINIUPNPC_STATIC_LIBRARIES upnpc-static)
--endif()
--
- # git describe
- set_source_files_properties(${COMMON_DIR}/version.cpp PROPERTIES 
COMPILE_FLAGS -DGIT_DESCRIBE=\\"${GIT_DESCRIBE}\\")
- 
-@@ -59,7 +53,7 @@ include_directories(${JSONCPP_DIR} ${COMMON_DIR} ${SER
- 
- # Include miniupnpc if we want it
- if (USE_MINIUPNP)
--  include_directories(${MINIUPNPC_DIR})
-+  include_directories(${LOCALBASE}/include/miniupnpc)
- endif()
- 
- # Set up FHS installation path
-@@ -67,6 +61,8 @@ if(NOT APPLE AND NOT WIN32)
-   add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
- endif()
- 
-+link_directories(${LOCALBASE}/lib)
-+
- add_executable(odasrv
-   ${JSONCPP_SOURCE} ${JSONCPP_HEADERS}
-   ${COMMON_SOURCES} ${COMMON_HEADERS}
-@@ -74,7 +70,7 @@ add_executable(odasrv
-   ${SERVER_WIN32_HEADERS} ${SERVER_WIN32_RESOURCES})
+@@ -53,7 +55,7 @@ endif()
+ target_link_libraries(odasrv jsoncpp odamex-common)
  
- if (USE_MINIUPNP)
--  target_link_libraries(odasrv ${MINIUPNPC_STATIC_LIBRARIES})
+ if(USE_MINIUPNP)
+-  target_link_libraries(odasrv upnpc-static)
 +  target_link_libraries(odasrv miniupnpc)
  endif()
  
  if(WIN32)
-@@ -87,7 +83,7 @@ elseif(UNIX)
+@@ -66,7 +68,7 @@ elseif(UNIX)
  endif()
  
  if(UNIX AND NOT APPLE)
@@ -53,4 +20,4 @@ Index: server/CMakeLists.txt
 +  target_link_libraries(odasrv execinfo)
  endif()
  
- if(APPLE)
+ odamex_copy_wad(odasrv)
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/odamex/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   5 Oct 2020 21:07:37 -0000       1.1.1.1
+++ pkg/PLIST   5 Aug 2021 11:26:44 -0000
@@ -1,6 +1,5 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2020/10/05 21:07:37 edd Exp $
 @bin bin/odalaunch
-@bin bin/odamast
 @bin bin/odamex
 @bin bin/odasrv
 share/doc/pkg-readmes/${PKGSTEM}
@@ -9,6 +8,7 @@ share/examples/odamex/coop-doom.cfg
 share/examples/odamex/coop-masterlevels.cfg
 share/examples/odamex/coop-modern.cfg
 share/examples/odamex/coop-zdoom.cfg
+share/examples/odamex/ctf-attackdefend.cfg
 share/examples/odamex/ctf-doom.cfg
 share/examples/odamex/ctf-pub.cfg
 share/examples/odamex/ctf-wdl.cfg
@@ -20,6 +20,10 @@ share/examples/odamex/duel-ddl.cfg
 share/examples/odamex/duel-doom.cfg
 share/examples/odamex/duel-zddl.cfg
 share/examples/odamex/duel-zdoom.cfg
+share/examples/odamex/lms-2team.cfg
+share/examples/odamex/lms-3team.cfg
+share/examples/odamex/lms-ffa.cfg
+share/examples/odamex/survival-modern.cfg
 share/examples/odamex/tdm-doom.cfg
 share/examples/odamex/tdm-modern.cfg
 share/examples/odamex/tdm-zdoom.cfg

-- 
Best Regards
Edd Barrett

https://www.theunixzoo.co.uk

Reply via email to