VVVVVV just had its source code opened up on GitHub. Seeing as no one has seemingly tried to compile it on Haiku, I tried doing it myself here. It needs libsdl2_devel and sdl2_mixer_devel, along with their dependencies.
Building it on x86_64 is successful after adding a few defined(__HAIKU__) in some of the source files, however the compile fails at linking with this:
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: libphysfs-static.a(physfs.c.o): in function `calculateBaseDir':
physfs.c:(.text+0x1efc): undefined reference to `__PHYSFS_platformCalcBaseDir'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: libphysfs-static.a(physfs.c.o): in function `PHYSFS_init':
physfs.c:(.text+0x20dd): undefined reference to `__PHYSFS_platformInit'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: libphysfs-static.a(physfs.c.o): in function `doDeinit':
physfs.c:(.text+0x273f): undefined reference to `__PHYSFS_platformDeinit'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: libphysfs-static.a(physfs.c.o): in function `PHYSFS_getCdRomDirs':
physfs.c:(.text+0x2f3f): undefined reference to `__PHYSFS_platformDetectAvailableCDs'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: libphysfs-static.a(physfs.c.o): relocation R_X86_64_PC32 against undefined hidden symbol `__PHYSFS_platformDetectAvailableCDs' can not be used when making a shared object
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
CMakeFiles/VVVVVV.dir/build.make:551: recipe for target 'VVVVVV' failed
make[2]: *** [VVVVVV] Error 1
CMakeFiles/Makefile2:137: recipe for target 'CMakeFiles/VVVVVV.dir/all' failed
make[1]: *** [CMakeFiles/VVVVVV.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
If there’s anyone who could help with this, it’d be greatly appreciated.
I see that the program uses the built-in version of physfs.
I think it is necessary to configure (or patch) to use system physfs library (from haikuports).
Wouldn’t that mean Haiku support can’t be merged into mainline @3dEyes? I think any support can only be merged if it can work with the static libraries included.
Another thing that should be addressed, does the game’s custom license of not allowing commercial use prevent it from being packaged up and put into Haiku’s repos?
Haiku allows to use the common licenses for packages, but it also allows to use custom license too (so one can just copy the original license into the package).
Haiku is non-commercial use, thus there should be no problem with packaging.
Yes, you put a own license file into your package folder in the license Folder and this one are add it the system license finde during installation. But it need to be a diffent one (name) as current in the system
I use Haiku x86_64, but what’s the difference? This will work on a 32 bit systems also.
Also, what changes were made to get it to use the system library?
desktop_version/CMakeLists.txt:
remove “…/third_party/physfs” line from INCLUDE_DIRECTORIES
remove “ADD_LIBRARY(physfs-static STATIC ${PFS_SRC} ${PFSP_SRC})” line
change physfs-static to physfs in “TARGET_LINK_LIBRARIES(VVVVVV physfs-static tinyxml-static lodepng-static)” line
After working with one of the maintainers of VVVVVV (flibitijibibo), the game can now be built from master using the static PhysicsFS library:
If a package for it will be built, should it use upstream or a modified fork that uses the system’s PhysicsFS library (as a dependency)?
Addendum: I’ve also sent an email to Terry Cavanagh (game creator), asking if a license exception can be made for Haiku that will allow us to distribute the game data along with the code itself. Will update back when he responds.
Read through the wiki home page and then click the link that says A Gentle Introduction to HaikuPorter #1
You can also look at the already existing recipes for reference ofc.