Backports an upstream fix for a bug that caused the host compiler to be
used for linking even though the cross-compiler was specified in the
`CC` environment variable.
This didn't cause an issue for SERENITY_ARCH=i686 on Linux hosts,
because seeing that the host linker couldn't deal with i686 objects, the
configure script fell back to generating only a static library. On
x86-64, the host toolchain was able to deal with the object files, but
tried to link those to host libraries. On macOS hosts, nothing worked.
`fheroes2` is a recreation of HoMM2 game engine. This port is set with
`GET_HOMM2_DEMO=ON` for a free demo version to be automatically
downloaded and used, without requiring the user to provide game
resources from the original game.
Besides the provided patches, we set `CXXFLAGS="'-D_GNU_SOURCE'"` to
build the port, for SerenityOS' `LibC/endian.h` to provide required
endianness functions and constants.
**Considerations**:
* In-game custom cursor is not working, game logs show:
`Cursors are not currently supported` [0].
* Game is still unplayable, as it commonly raises a Kernel panic when
trying to start a new game (reported at SerenityOS/serenity#9401).
[0] ae3bc94772/src/events/SDL_mouse.c (L952)
`SDL2_mixer` needs `libmpg123` to support MP3 playback. By adding
it as a dependency, its compilation now outputs:
```
checking mpg123.h usability... yes
checking mpg123.h presence... yes
checking for mpg123.h... yes
checking for mpg123_replace_reader_handle in -lmpg123... yes
-- dynamic libmpg123 -> libmpg123.so.0
```
Sound output was tested with
[an implementation](https://gist.github.com/cdave1/10563386) found
online.
Add `libmpg123` port, for dependant projects to be able to use it.
This port doesn't include the entire `mpg123` project, just the
`libmpg123` library.
This required updating a bunch of patches which had conflicts
in the latest version.
New Patches:
- serenity: Add bogus O_NDELAY just to allow the port to compile
- serenity: Disable nice() stress workload as we do not implement it
- serenity: Disable prctl stressor on serenity
CMake defaults to the current directory if the source or build
directory is not specified. Harfbuzz builds into an alternate
directory so it fails. This change specifies the directory prior
to any additional parameters so the build can succeed with
cmake 3.18.4.