Opened 17 years ago

Closed 17 years ago

Last modified 6 years ago

#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)

scummvm_beos.patch (5.2 KB ) - added by SF/begasus 17 years ago.
BeOS port for scummvm
hashmap.h_beos_error (3.7 KB ) - added by SF/begasus 17 years ago.
hashmap.h problems in BeOS port
scummvm_beos.2.patch (3.0 KB ) - added by SF/begasus 17 years ago.
beos patch nr2
hashmap-friend.patch (421 bytes ) - added by fingolfin 17 years ago.
scummvm_beos.3.patch (1.4 KB ) - added by SF/begasus 17 years ago.
beos patch nr3
scummvm_beos.4.patch (1.4 KB ) - added by SF/begasus 17 years ago.
beos patch nr3

Download all attachments as: .zip

Change History (30)

by SF/begasus, 17 years ago

Attachment: scummvm_beos.patch added

BeOS port for scummvm

comment:1 by bluegr, 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

by SF/begasus, 17 years ago

Attachment: hashmap.h_beos_error added

hashmap.h problems in BeOS port

comment:2 by SF/begasus, 17 years ago

Problems with hashmap (current version)

File Added: hashmap.h_beos_error

comment:3 by fingolfin, 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:4 by fingolfin, 17 years ago

Oh and this is not a bug report, moving to patches

comment:5 by fingolfin, 17 years ago

Component: --Unset--

comment:6 by fingolfin, 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:7 by sev-, 17 years ago

It did. The updated patch will follow tonight

comment:8 by bluegr, 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 fingolfin, 17 years ago

Maybe... since nobody ever reported those MSVC problems, I have no way of telling.

by SF/begasus, 17 years ago

Attachment: scummvm_beos.2.patch added

beos patch nr2

comment:10 by SF/begasus, 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 fingolfin, 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 SF/begasus, 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 fingolfin, 17 years ago

Attachment: hashmap-friend.patch added

comment:13 by fingolfin, 17 years ago

Owner: set to fingolfin

comment:14 by fingolfin, 17 years ago

Does the attached patch for hashmap.h make any difference ? File Added: hashmap-friend.patch

comment:15 by fingolfin, 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 bluegr, 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)

by SF/begasus, 17 years ago

Attachment: scummvm_beos.3.patch added

beos patch nr3

comment:17 by SF/begasus, 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

by SF/begasus, 17 years ago

Attachment: scummvm_beos.4.patch added

beos patch nr3

comment:18 by SF/begasus, 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 sev-, 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 sev-, 17 years ago

Owner: changed from fingolfin to sev-

comment:21 by fingolfin, 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:22 by sev-, 17 years ago

done.

comment:23 by jvprat, 17 years ago

Status: newclosed

comment:24 by digitall, 6 years ago

Component: Port: BeOS
Note: See TracTickets for help on using tickets.