#8789 closed patch
BeOS port for scummvm
Reported by: | SF/begasus | Owned by: | sev- |
---|---|---|---|
Priority: | normal | Component: | Port: BeOS |
Version: | Keywords: | ||
Cc: | Game: |
Description
Here is a list of things that I did to be able to compile the BeOS port (BONE systems due to linking to libbind and libsocket)
remove -lm from ./configure file + add a script for beos in configure beos*) DEFINES="$DEFINES -DUNINX -DSYSTEM_NOT_SUPPORTING_D_TYPE -DSCUMMVM_USE_LONG_ING" LIBS="$LIBS -lsocket -lbind" ;;
DSCUMMVM_USE_LONG_INT doesn't work yet so we manualy edit config.h to match the system typedefs (see bellow)
LDFLAGS=-L/boot/home/config/lib/ prefix=/boot/apps/Games/ScummVM
conflicting typedef for uint32 in config.h change "typedef unsigned int uint32" to "typedef unsigned long uint32" and "typedef int uint32" to "typedef long int32"
problems with hashmap.h and ConstIterator and _arr etc replace hashmap.h (partly) with a previous working version (snapshot 20071230)
add BeOS to #if defined (PALM_OS) || defenid __BEOS__ (hashmap.h)
disable lure,saga build due to problems
Ticket imported from: #1880781. Ticket imported from: patches/894.
Attachments (6)
Change History (30)
by , 17 years ago
Attachment: | scummvm_beos.patch added |
---|
comment:1 by , 17 years ago
I've talked with begasus on #scummvm. He helped me make some commits to the the SAGA engine, which have fixed the SAGA related errors he had under BeOS
comment:2 by , 17 years ago
Problems with hashmap (current version)
File Added: hashmap.h_beos_error
comment:3 by , 17 years ago
Thanks. However, in the current form, this patch is in no way suitable for SVN.
E.g. Just removing "-lm" from configure checks like that is not OK, as it might break other ports again. And reverting hashmap.h is no option either ;-). But I'll take a look at those errors, thanks.
SCUMMVM_USE_LONG_INT works very well on various systems. But it's only intended for those which do not use config.h to define the types. What you really need to do is to override the value of "type_4_byte" to be "long" in the configure script (there are various examples for this in it, just search).
comment:5 by , 17 years ago
Component: | --Unset-- |
---|
comment:6 by , 17 years ago
I made a small tweak to hashmap.h in trunk -- this might solve your problem with it, please give it a try :)
comment:8 by , 17 years ago
(Sorry if this is a bit off-topic here) Perhaps this hashmap change will fix compilation errors for earlier versions of MSVC as well :)
comment:9 by , 17 years ago
Maybe... since nobody ever reported those MSVC problems, I have no way of telling.
comment:10 by , 17 years ago
New BeOS patch, with the changes done in hashmap.h in the trunk version it's now compiling (just need to add a defined for beos - see patch file).
Added a beos script in configure that takes care of all other matters. Added a line to check for -lm also, so it doesn't break other platform calls for it that deppend on the math lib, adding that could also solve problems that other systems have in regards of a missing libm (beos holds it in libroot that is linked by default so doesn't need to be added) not using -lm should only take another line in the other platforms host_os script.
Running configure should be done with LDFLAGS in front and a prefix for nasm --with-nasm-prefix= after that make is the only thing that is need to build ;)
So all in all a small patch only affecting two files. Thanks for all the guys in the #scummvm and #haiku (thanks mmu_man for giving me the clue about -lm) channel at freenode.
Greetings Luc Schrijvers aka Begasus File Added: scummvm_beos.patch
comment:11 by , 17 years ago
Much better now!
The line + LDFLAGS="$LDFLAGS" is not needed and can be removed, though.
Also, I still would like to know why -#if defined (PALMOS_MODE) +#if defined (PALMOS_MODE) || defined (__BEOS__)
is needed in hashmap.h. What errors do you get when you do not use this change? Please attach them to this report, maybe we can come up with a proper fix for this.
Finally, it seems you are patching not against trunk, but rather against the 0.11.x branch (?) -- please make sure your patch also work with the trunk.
comment:12 by , 17 years ago
Much better now!
The line + LDFLAGS="$LDFLAGS" is not needed and can be removed, though.
Right! checked and not needed ;)
Also, I still would like to know why -#if defined (PALMOS_MODE) +#if defined (PALMOS_MODE) || defined (__BEOS__)
Seems I was replying mail to the mailinglist instead of answering here Reasonf for the extra defined is that _arr and arrsize are declared as private http://paste.lisp.org/display/54927 maybe you could find a fix for it ... for now adding the defined is working. ;)
by , 17 years ago
Attachment: | hashmap-friend.patch added |
---|
comment:13 by , 17 years ago
Owner: | set to |
---|
comment:14 by , 17 years ago
Does the attached patch for hashmap.h make any difference ? File Added: hashmap-friend.patch
comment:15 by , 17 years ago
PS: Judging from the warnings you get, you are not using latest SVN. I recommend that you update to the latest trunk version and that you make your patch against that.
comment:16 by , 17 years ago
Hm, perhaps fingolfin's patch will suffice to remove the "public:" bit for PalmOS as well
(note: begasus said the problems he had with hashmap are gone now with fingolfin's patch)
comment:17 by , 17 years ago
As thebluegr already reported the problems with the previous patch you posted here fixed the problem so there's no need for the extra define in hashmap.h now. So only the configure file needs a patch (see attachment)that's even smaller then I thought it would be ;)
All in all great work done by all !!
Trunk tree builds with the patch.
Greetings Luc Schrijvers aka Begasus File Added: scummvm_beos.patch
comment:18 by , 17 years ago
As thebluegr already reported the problems with the previous patch you posted here fixed the problem so there's no need for the extra define in hashmap.h now. So only the configure file needs a patch (see attachment)that's even smaller then I thought it would be ;)
All in all great work done by all !!
Trunk tree builds with the patch.
Greetings Luc Schrijvers aka Begasus File Added: scummvm_beos.patch
comment:19 by , 17 years ago
Excellent! I committed both to trunk and branch-0-11-0.
Now, please, make a fresh checkout and try to compile both branches.
comment:20 by , 17 years ago
Owner: | changed from | to
---|
comment:21 by , 17 years ago
Actually, you did not commit my changes to hashmap.h, so I somewhat doubt Begasus will be able to compile from trunk... ;)
comment:23 by , 17 years ago
Status: | new → closed |
---|
comment:24 by , 6 years ago
Component: | → Port: BeOS |
---|
BeOS port for scummvm