Created
March 16, 2021 15:54
-
-
Save thatdutchguy/1b77bdb7337fe485d340d8b405c673fc to your computer and use it in GitHub Desktop.
Build Hatari emulator in SerenityOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- hatari-2.3.1/src/main.c 2020-12-26 13:39:26.000000000 -0800 | |
+++ hatari-2.3.1-patched/src/main.c 2021-03-15 15:28:26.201725394 -0700 | |
@@ -103,7 +103,7 @@ | |
struct tms fields; | |
if (!ticks_to_msec) | |
{ | |
- ticks_to_msec = sysconf(_SC_CLK_TCK); | |
+ ticks_to_msec = 100; // WAS: sysconf(_SC_CLK_TCK); | |
Log_Printf(LOG_INFO, "OS clock ticks / second: %d\n", ticks_to_msec); | |
/* Linux has 100Hz virtual clock so no accuracy loss there */ | |
ticks_to_msec = 1000UL / ticks_to_msec; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S bash ../.port_include.sh | |
port="hatari" | |
version="2.3.1" | |
files="https://git.tuxfamily.org/hatari/hatari.git/snapshot/hatari-${version}.tar.gz hatari-${version}.tar.gz" | |
useconfigure="true" | |
workdir="hatari-${version}" | |
depends="SDL2 zlib png" | |
_buildroot="${SERENITY_BUILD_DIR}/Root" | |
configure() { | |
run cmake \ | |
-DUSE_BOOST=0 \ | |
-DUSE_OPENGL=0 \ | |
-DCMAKE_TOOLCHAIN_FILE="${SERENITY_ROOT}/Toolchain/CMakeToolchain.txt" \ | |
-DSDL2_INCLUDE_DIR="${_buildroot}/usr/include/SDL2" \ | |
-DSDL2_LIBRARY="SDL2" \ | |
-DZLIB_INCLUDE_DIR="${_buildroot}/usr/local/include" \ | |
-DZLIB_LIBRARY="z" \ | |
-DMATH_INCLUDE_DIR="${_buildroot}/usr/include" \ | |
-DMATH_LIBRARY="${_buildroot}/usr/lib" \ | |
-DPNG_PNG_INCLUDE_DIR="${_buildroot}/usr/local/include" \ | |
-DPNG_LIBRARY="png" \ | |
-DCMAKE_EXE_LINKER_FLAGS="-lm -lpthread -lcore -lgfx -lgui" | |
} | |
install() { | |
run make install | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Display output seems slightly squashed for some reason: