Bug 5292 - Initial FreeBSD support
Status: ASSIGNED
Alias: None
Product: iodoom3
Classification: Unclassified
Component: other
Version: unspecified
Hardware: PC FreeBSD
: P3 normal
Assignee: Zachary J. Slater
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2011-11-24 16:11 EST by Yamagi Burmeister
Modified: 2015-08-10 13:08:37 EDT
0 users

See Also:


Attachments
FreeBSD support for Doom 3 (35.47 KB, application/octet-stream)
2011-11-24 16:11 EST, Yamagi Burmeister
Initial FreeBSD support - Version 3 (37.44 KB, application/octet-stream)
2011-11-25 04:02 EST, Yamagi Burmeister
Version 4 of the FreeBSD support (14.20 KB, application/octet-stream)
2011-11-27 13:13 EST, Yamagi Burmeister
Initial FreeBSD support - Version 5 (16.12 KB, application/octet-stream)
2011-11-28 13:57 EST, Yamagi Burmeister
FreeBSD support - Version 6 (16.94 KB, application/octet-stream)
2011-11-29 04:46 EST, Yamagi Burmeister

Description Yamagi Burmeister 2011-11-24 16:11:14 EST
Created attachment 3009 [details]
FreeBSD support for Doom 3

This patch adds initial FreeBSD support to Doom 3. With this patch you can compile the game under FreeBSD/i386, start it and play the first level. I have not done any extensive testing, but at least it's a start...

What I've done:
- Add FreeBSD preprcessor macros
- Add FreeBSD to the scons build system
- Add the new plattform type "3" for FreeBSD (0 = Windows ; 1 = OS X ; 2 = Linux)

Problems:
- There are still calls to /proc. They don't harm but should be removed...
- There is no sound. I really don't know why, maybe a problem in sys/linux/sound.cpp. I'll take a deeper look into this problem next week.

What you need:
- lang/gcc46 from the ports. The base g++ crashes in renderer/Image_init.cpp[1]

REMEMBER: Since Doom 3 is not (yet) 64 bit clean it won't compile under FreeBSD/amd64!

1:
renderer/Image_init.cpp: In function 'void R_QuadraticImage(idImage*)':
renderer/Image_init.cpp:908: internal compiler error: in assign_386_stack_local, at config/i386/i386.c:13484
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
scons: *** [build/debug/core/renderer/Image_init.o] Error 1
scons: building terminated because of errors
Comment 1 Yamagi Burmeister 2011-11-25 04:01:20 EST
Just uploaded version 2 of my patch. The only change is:
- Working sound under FreeBSD. The problem was an unsupported ioctl.

Still missing is:
- Remove /proc dependencies. A said above they don't harm, but it's cleaner...
Comment 2 Yamagi Burmeister 2011-11-25 04:02:02 EST
Created attachment 3012 [details]
Initial FreeBSD support - Version 3
Comment 3 Yamagi Burmeister 2011-11-27 13:13:19 EST
Created attachment 3016 [details]
Version 4 of the FreeBSD support

Version 4 changes:
- Fix a sneaked in #define which broke the build
- Do not "retab" the SConstruct
Comment 4 Yamagi Burmeister 2011-11-28 13:57:43 EST
Created attachment 3018 [details]
Initial FreeBSD support - Version 5

This is the hopefully final version of the FreeBSD support patch:
- Remove /proc dependencies

With this Doom 3 should have full and unlimited support for native FreeBSD builds :)
Comment 5 Yamagi Burmeister 2011-11-29 04:46:58 EST
Created attachment 3020 [details]
FreeBSD support - Version 6

This is the sixth and hopefully really final version of the FreeBSD support.

Changes to version 5:
- Use the OS X codepath for determining the network interfaces. While the Linux codepath somewhat worked this one is cleaner.
Comment 6 Zachary J. Slater 2015-08-10 13:08:37 EDT
Sorry, we need to replace scons with something else before freebsd support can go in :(