Skip to content

Commit 18ef4de

Browse files
committed
Add games/rbdoom3bfg
1 parent cecf717 commit 18ef4de

27 files changed

+1007
-0
lines changed

FINISHED

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,5 @@ devel/tokei ready to import (lcheylus)
136136
devel/scc ready to import (lcheylus)
137137
games/runelite sent to ports@ 2023-02-09 (limero)
138138
games/serioussam ready for import, sent to ports@ (tx00100xt)
139+
games/rbdoom3bfg ready for import, sent to ports@ (tx00100xt)
139140
games/recoil-rts ready for import, sent to ports@ (thfr)

games/rbdoom3bfg/Makefile

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
COMMENT= Doom 3 BFG Edition source port with updated Vulkan renderer
2+
3+
N= rbdoom3bfg
4+
V= 1.4.0
5+
P= RBDOOM-3-BFG
6+
7+
DIST_TUPLE = github RobertBeckebans ${P} v${V} .
8+
PKGNAME = ${N}-${V}
9+
10+
CATEGORIES= games
11+
12+
HOMEPAGE= https://www.moddb.com/mods/rbdoom-3-bfg
13+
14+
MAINTAINER= Alexander Pavlov <[email protected]>
15+
16+
17+
GLSL_V = bcf6a2430e99e8fc24f9f266e99316905e6d5134
18+
SITES.glslang = https://github.com/KhronosGroup/glslang/archive/
19+
20+
DISTFILES.glslang = ${N}-glslang-${GLSL_V}{${GLSL_V}}${EXTRACT_SUFX}
21+
22+
# GPL-3 - Main Code
23+
# BSD - msinttypes, TinyEXR, OpenEXR
24+
# BSD-1 - Mesa
25+
# BSD-2 - Base64, binpack2d, SSAO, SSGI
26+
# CC0-1.0 - Replacement Textures
27+
# MIT - ImGui, stb
28+
# RSA - MD4
29+
# ZLIB - Minizip, CRC32i irrxml, mikktspace
30+
# public-domain - MD5, stb
31+
# GPL-2 - timidity
32+
# LGPL-2 - timidity
33+
# Artistic - timidity
34+
PERMIT_PACKAGE= Yes
35+
36+
WRKDIST= ${WRKDIR}/${P}-${V}/neo
37+
38+
WANTLIB += ${COMPILER_LIBCXX} SDL2 c m pthread png
39+
WANTLIB += ${COMPILER_LIBCXX} jpeg openal z vulkan
40+
41+
MODULES = devel/cmake
42+
43+
# c++17
44+
COMPILER = base-clang ports-gcc
45+
46+
CONFIGURE_ARGS += -DUSE_INTRINSICS_SSE=ON -DSDL2=ON
47+
CONFIGURE_ARGS += -DUSE_SYSTEM_ZLIB=ON -DUSE_SYSTEM_LIBPNG=ON
48+
CONFIGURE_ARGS += -DUSE_SYSTEM_LIBJPEG=ON -DUSE_SYSTEM_LIBGLEW=ON
49+
CONFIGURE_ARGS += -DUSE_SYSTEM_RAPIDJSON=ON -DUSE_VULKAN=ON
50+
CONFIGURE_ARGS += -DUSE_PRECOMPILED_HEADERS=OFF
51+
CONFIGURE_ARGS += -DCMAKE_BUILD_TYPE=Release -DSDL2=ON
52+
CONFIGURE_ARGS += -DSPIRV_SHADERC=OFF -DFFMPEG=ON
53+
CONFIGURE_ARGS += -DCMAKE_SKIP_RPATH=ON
54+
55+
BUILD_DEPENDS = devel/ninja \
56+
graphics/glslang \
57+
graphics/spirv-tools \
58+
audio/openal \
59+
graphics/ffmpeg \
60+
devel/sdl2 \
61+
graphics/vulkan-headers \
62+
graphics/png \
63+
graphics/glew \
64+
graphics/jpeg \
65+
textproc/rapidjson
66+
67+
LIB_DEPENDS = graphics/glslang \
68+
audio/openal \
69+
graphics/ffmpeg \
70+
devel/sdl2 \
71+
graphics/png \
72+
graphics/glew \
73+
graphics/jpeg \
74+
textproc/rapidjson \
75+
graphics/vulkan-loader
76+
77+
RUN_DEPENDS = devel/desktop-file-utils \
78+
x11/gtk+4,-guic
79+
80+
NO_TEST = Yes
81+
82+
post-install:
83+
${INSTALL_PROGRAM} ${WRKDIR}/build-${MACHINE_ARCH}/${N} \
84+
${PREFIX}/bin/${N}
85+
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/${N}
86+
${INSTALL_DATA} ${WRKDIR}/${P}-${V}/README.md \
87+
${PREFIX}/share/doc/${N}
88+
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}
89+
cp -R ${WRKDIR}/${P}-${V}/base ${PREFIX}/share/${N}
90+
${INSTALL_DATA_DIR} ${PREFIX}/share/applications
91+
cp -R ${FILESDIR}/${N}.desktop \
92+
${PREFIX}/share/applications
93+
${INSTALL_DATA_DIR} \
94+
${PREFIX}/share/icons/hicolor/128x128/apps
95+
cp -R ${FILESDIR}/${N}.png \
96+
${PREFIX}/share/icons/hicolor/128x128/apps
97+
${INSTALL_MAN} ${FILESDIR}/${N}.6 \
98+
${PREFIX}/man/man6/${N}.6
99+
100+
101+
.include <bsd.port.mk>

games/rbdoom3bfg/distinfo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
SHA256 (RobertBeckebans-RBDOOM-3-BFG-v1.4.0.tar.gz) = a+Nde3uyKyKTeDwxjEDdxvGSyTdrVgdeG380cBaZ27E=
2+
SHA256 (rbdoom3bfg-glslang-bcf6a2430e99e8fc24f9f266e99316905e6d5134.tar.gz) = o+YEOXrbIiQXjT60Ceq4uME6lqQkMkg9SYEFyQgow4A=
3+
SIZE (RobertBeckebans-RBDOOM-3-BFG-v1.4.0.tar.gz) = 12676150
4+
SIZE (rbdoom3bfg-glslang-bcf6a2430e99e8fc24f9f266e99316905e6d5134.tar.gz) = 3188787
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
.TH rbdoom3bfg 6 "October 20, 2014" "" ""
2+
3+
.SH NAME
4+
rbdoom3bfg \- Robert Beckeban's Doom 3 BFG Edition
5+
6+
.SH SYNOPSIS
7+
.B rbdoom3bfg
8+
.RI [ options ]
9+
.br
10+
11+
.SH DESCRIPTION
12+
.B rbdoom3bfg
13+
is a port of the id-soft released GPL'ed version of the Doom 3 BFG-Edition engine.
14+
It targets Linux support, 64-bit support and source code cleanup.
15+
.PP
16+
The goal of RBDoom3BFG is to bring Doom 3 BFG with the help of SDL to all suitable platforms. Bugs
17+
present in the original DOOM 3 will be fixed (when identified) without altering
18+
the original game-play.
19+
.PP
20+
21+
.SH OPTIONS
22+
23+
The game can be tweaked using some console commands which usually also can be passed using
24+
the commandline.
25+
26+
Below, for any values named
27+
.I
28+
boolean
29+
a "0" means disable and "1" enable.
30+
31+
Note that some values might be stored in the user's profile and are persistent over restarts.
32+
33+
.TP
34+
\fB+set fs_game \fImodDirectoryName\fP
35+
Defines the mod directory to be used. Best used with \fB+set fs_resourceLoadPriority\fP.
36+
37+
.TP
38+
\fB+set fs_resourceLoadPriority \fIvalue\fP
39+
When
40+
.I value
41+
is
42+
.B 0
43+
set priority the mod's content over the game's one.
44+
45+
.TP
46+
\fB+set com_allowconsole \fIboolean\fR
47+
Allow (default) or disallow console access.
48+
49+
.TP
50+
\fB+set com_showFPS \fIvalue\fR
51+
show frames rendered per second.
52+
Use this value:
53+
\fB 0 \fP to turn off (default),
54+
\fB 1 \fP default bfg values,
55+
\fB 2 \fP only show FPS (classic view)
56+
57+
.TP
58+
\fB+set com_speeds \fIboolean\fR
59+
Show engine timings. Default is off.q
60+
61+
.TP
62+
\fB+set com_forceGenericSIMD \fIboolean\fR
63+
Force the use of generic platform independent SIMD code. Default is off.
64+
65+
66+
.SH NOTES
67+
68+
To actually play Doom3 BFG Edition, you need a copy of the (non-free) game data. Please see
69+
/usr/share/doc/rbdoom3bfg/README.txt.gz for details.
70+
71+
.SH AUTHORS
72+
73+
This manpage was written by Tobias Frost <[email protected]> and is licensed under the GPL-2 or at your option any later version.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Desktop Entry]
2+
Name=RBDoom3BFG Vulkan
3+
Comment=A modernization effort of DOOM-3-BFG
4+
Exec=rbdoom3bfg
5+
Terminal=false
6+
Type=Application
7+
Categories=Game;
8+
Icon=rbdoom3bfg
24.5 KB
Loading
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
Index: CMakeLists.txt
2+
--- CMakeLists.txt
3+
+++ CMakeLists.txt
4+
@@ -1,12 +1,14 @@
5+
cmake_minimum_required(VERSION 3.2)
6+
7+
-project(RBDoom3BFG)
8+
+project(rbdoom3bfg)
9+
10+
+include_directories(/usr/X11R6/include)
11+
+
12+
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
13+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
14+
if(CMAKE_MAJOR_VERSION EQUAL 3 AND CMAKE_MINOR_VERSION GREATER_EQUAL 6)
15+
# set MSVC startup project
16+
- set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT RBDoom3BFG)
17+
+ set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT rbdoom3bfg)
18+
endif()
19+
20+
option(STANDALONE
21+
@@ -141,15 +143,15 @@
22+
add_definitions(-Werror=format-security)
23+
add_definitions(-Werror=format)
24+
25+
- # Compiler check (needs -std=c++11 flag)
26+
+ # Compiler check (needs -std=c++14 flag)
27+
include(CheckCXXCompilerFlag)
28+
- CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
29+
- if(COMPILER_SUPPORTS_CXX11)
30+
- set(CMAKE_CXX_STANDARD 11)
31+
+ CHECK_CXX_COMPILER_FLAG("-std=c++17" COMPILER_SUPPORTS_CXX17)
32+
+ if(COMPILER_SUPPORTS_CXX17)
33+
+ set(CMAKE_CXX_STANDARD 17)
34+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
35+
set(CMAKE_CXX_EXTENSIONS OFF)
36+
else()
37+
- message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
38+
+ message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++17 support. Please use a different C++ compiler.")
39+
endif()
40+
41+
if(CPU_TYPE)
42+
@@ -178,7 +180,7 @@
43+
# add clang-specific settings for warnings (the second one make sure clang doesn't complain
44+
# about unknown -W flags, like -Wno-unused-but-set-variable)
45+
# SRS - Add -Wno-deprecated-register and -Wno-expansion-to-defined to list of warning settings
46+
- add_definitions(-Wno-local-type-template-args -Wno-unknown-warning-option -Wno-inline-new-delete -Wno-switch-enum -Wno-deprecated-register -Wno-expansion-to-defined)
47+
+ add_definitions(-Wno-dev -Wno-deprecated-declarations -Wno-local-type-template-args -Wno-unknown-warning-option -Wno-inline-new-delete -Wno-switch-enum -Wno-deprecated-register -Wno-expansion-to-defined)
48+
endif()
49+
50+
if(NOT CMAKE_CROSSCOMPILING AND ONATIVE)
51+
@@ -385,6 +385,9 @@ if(USE_VULKAN)
52+
endif()
53+
54+
else()
55+
+ find_package(glslang)
56+
+ find_package(SPIRV-Tools REQUIRED)
57+
+ if(NOT (${glslang_FOUND} AND ${SPIRV-Tools_FOUND}))
58+
# override Glslang build options
59+
60+
# options required by November 2018 release
61+
@@ -408,6 +411,7 @@ if(USE_VULKAN)
62+
include_directories(${GLSLANG_DIR})
63+
64+
#link_directories($ENV{VULKAN_SDK}/Lib)
65+
+ endif()
66+
endif()
67+
68+
# Use FindVulkan module added with CMAKE 3.7
69+
@@ -1648,10 +1648,10 @@
70+
71+
list(APPEND RBDOOM3_SOURCES ${WIN32_RESOURCES})
72+
73+
- add_executable(RBDoom3BFG WIN32 ${RBDOOM3_INCLUDES} ${RBDOOM3_SOURCES})
74+
+ add_executable(rbdoom3bfg WIN32 ${RBDOOM3_INCLUDES} ${RBDOOM3_SOURCES})
75+
76+
- add_dependencies(RBDoom3BFG idlib)
77+
- target_link_libraries(RBDoom3BFG
78+
+ add_dependencies(rbdoom3bfg idlib)
79+
+ target_link_libraries(rbdoom3bfg
80+
idlib
81+
${DirectX_LIBRARIES}
82+
dbghelp
83+
@@ -1672,15 +1672,15 @@
84+
85+
# set MSVC default debug directory on executable
86+
if(CMAKE_MAJOR_VERSION EQUAL 3 AND CMAKE_MINOR_VERSION GREATER_EQUAL 8)
87+
- set_target_properties(RBDoom3BFG PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/..")
88+
+ set_target_properties(rbdoom3bfg PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/..")
89+
endif()
90+
91+
#CMAKE_BINARY_DIR
92+
if(CMAKE_CL_64)
93+
- install(TARGETS RBDoom3BFG
94+
+ install(TARGETS rbdoom3bfg
95+
RUNTIME DESTINATION .)
96+
else()
97+
- install(TARGETS RBDoom3BFG
98+
+ install(TARGETS rbdoom3bfg
99+
RUNTIME DESTINATION .)
100+
endif()
101+
102+
@@ -1809,13 +1809,13 @@
103+
SEPARATE_ARGUMENTS(_compiler_FLAGS)
104+
105+
if(USE_PRECOMPILED_HEADERS)
106+
- # we need to recreate the precompiled header for RBDoom3BFG
107+
+ # we need to recreate the precompiled header for rbdoom3bfg
108+
# (i.e. can't use the one created for idlib before)
109+
# because some definitions (e.g. -D__IDLIB__ -D__DOOM_DLL__) differ
110+
add_custom_target(precomp_header_rbdoom3bfg ALL
111+
COMMAND ${CMAKE_CXX_COMPILER} ${_compiler_FLAGS} -x c++-header idlib/precompiled.h -o idlib/precompiled.h.gch
112+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
113+
- COMMENT "Creating idlib/precompiled.h.gch for RBDoom3BFG"
114+
+ COMMENT "Creating idlib/precompiled.h.gch for rbdoom3bfg"
115+
)
116+
endif()
117+
118+
@@ -1839,14 +1839,14 @@
119+
add_dependencies(precomp_header_rbdoom3bfg idlib)
120+
endif()
121+
122+
- add_executable(RBDoom3BFG WIN32 ${RBDOOM3_SOURCES})
123+
+ add_executable(rbdoom3bfg WIN32 ${RBDOOM3_SOURCES})
124+
125+
if (USE_PRECOMPILED_HEADERS)
126+
# make sure precompiled header is created before executable is compiled
127+
- add_dependencies(RBDoom3BFG precomp_header_rbdoom3bfg)
128+
+ add_dependencies(rbdoom3bfg precomp_header_rbdoom3bfg)
129+
130+
# make sure precompiled header is deleted after executable is compiled
131+
- add_dependencies(rm_precomp_header RBDoom3BFG)
132+
+ add_dependencies(rm_precomp_header rbdoom3bfg)
133+
endif()
134+
135+
if(NOT WIN32)
136+
@@ -1854,7 +1854,7 @@
137+
set(RT_LIBRARY rt)
138+
endif()
139+
140+
- target_link_libraries(RBDoom3BFG
141+
+ target_link_libraries(rbdoom3bfg
142+
idlib
143+
${Vulkan_LIBRARIES}
144+
${OPENGL_LIBRARIES}
145+
@@ -1863,7 +1865,7 @@
146+
${Vulkan_LIBRARIES}
147+
${OPENGL_LIBRARIES}
148+
pthread
149+
- ${RT_LIBRARY}
150+
+ #${RT_LIBRARY}
151+
${SDLx_LIBRARY}
152+
${OPENAL_LIBRARY}
153+
${FFMPEG_LIBRARIES}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Index: idlib/DataQueue.h
2+
--- idlib/DataQueue.h
3+
+++ idlib/DataQueue.h
4+
@@ -109,8 +109,11 @@ bool idDataQueue< maxItems, maxBuffer >:
5+
item.dataOffset = dataLength;
6+
memcpy( data + dataLength, b1, b1Len );
7+
dataLength += b1Len;
8+
- memcpy( data + dataLength, b2, b2Len );
9+
- dataLength += b2Len;
10+
+ if( b2 != NULL )
11+
+ {
12+
+ memcpy( data + dataLength, b2, b2Len );
13+
+ dataLength += b2Len;
14+
+ }
15+
return true;
16+
}
17+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Index: idlib/math/Simd.cpp
2+
--- idlib/math/Simd.cpp Sun Mar 6 13:28:12 2022
3+
+++ idlib/math/Simd.cpp Sun May 11 22:06:49 2025
4+
@@ -61,7 +61,7 @@
5+
*/
6+
void idSIMD::InitProcessor( const char* module, bool forceGeneric )
7+
{
8+
- cpuid_t cpuid;
9+
+ doom3_cpuid_t cpuid;
10+
idSIMDProcessor* newProcessor;
11+
12+
cpuid = idLib::sys->GetProcessorId();
13+
@@ -1384,7 +1384,7 @@
14+
15+
if( idStr::Length( args.Argv( 1 ) ) != 0 )
16+
{
17+
- cpuid_t cpuid = idLib::sys->GetProcessorId();
18+
+ doom3_cpuid_t cpuid = idLib::sys->GetProcessorId();
19+
idStr argString = args.Args();
20+
21+
argString.Replace( " ", "" );

0 commit comments

Comments
 (0)