From 67a30d798979bea36f88f2cc7929636b4e7ad43d Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Thu, 4 Mar 2021 18:42:52 +0000 Subject: [PATCH] New port: emulators/aranym: Atari Running on Any Machine --- emulators/Makefile | 1 + emulators/aranym/Makefile | 31 ++++++++++++++++++ emulators/aranym/distinfo | 3 ++ .../aranym/files/patch-src_natfeat_hostfs.cpp | 27 ++++++++++++++++ .../files/patch-src_uae__cpu_fpu_mathlib.h | 17 ++++++++++ emulators/aranym/pkg-descr | 8 +++++ emulators/aranym/pkg-plist | 32 +++++++++++++++++++ 7 files changed, 119 insertions(+) create mode 100644 emulators/aranym/Makefile create mode 100644 emulators/aranym/distinfo create mode 100644 emulators/aranym/files/patch-src_natfeat_hostfs.cpp create mode 100644 emulators/aranym/files/patch-src_uae__cpu_fpu_mathlib.h create mode 100644 emulators/aranym/pkg-descr create mode 100644 emulators/aranym/pkg-plist diff --git a/emulators/Makefile b/emulators/Makefile index 72d198cff7c2..9c2a8b32f678 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -10,6 +10,7 @@ SUBDIR += almostti SUBDIR += anese SUBDIR += aqemu + SUBDIR += aranym SUBDIR += atari800 SUBDIR += bfe SUBDIR += bochs diff --git a/emulators/aranym/Makefile b/emulators/aranym/Makefile new file mode 100644 index 000000000000..b7900f253d47 --- /dev/null +++ b/emulators/aranym/Makefile @@ -0,0 +1,31 @@ +# $FreeBSD$ + +PORTNAME= aranym +DISTVERSION= 1.1.0 +CATEGORIES= emulators +MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${DISTVERSION}/ +DISTNAME= ${PORTNAME}_${DISTVERSION}.orig + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Atari Running on Any Machine + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= openjpeg>0:graphics/openjpeg \ + sdl-config:devel/sdl12 +RUN_DEPENDS= bash:shells/bash + +USES= gmake perl5 pkgconfig gl localbase:ldflags sdl shebangfix xorg +USE_GL= gl +USE_SDL= sdl2 image2 +USE_XORG= x11 + +SHEBANG_FILES= tools/arabridge + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= -disable-nat-debug --disable-nat-debug --enable-nfjpeg + +WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} + +.include diff --git a/emulators/aranym/distinfo b/emulators/aranym/distinfo new file mode 100644 index 000000000000..79014bf24062 --- /dev/null +++ b/emulators/aranym/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1614883282 +SHA256 (aranym_1.1.0.orig.tar.gz) = a8f2fcb24254754c0ced74a4de77f7d168eb7aa603ac2585d25abb51002f47cc +SIZE (aranym_1.1.0.orig.tar.gz) = 3785612 diff --git a/emulators/aranym/files/patch-src_natfeat_hostfs.cpp b/emulators/aranym/files/patch-src_natfeat_hostfs.cpp new file mode 100644 index 000000000000..47a78e9447c2 --- /dev/null +++ b/emulators/aranym/files/patch-src_natfeat_hostfs.cpp @@ -0,0 +1,27 @@ +- backport of patch to fix https://github.com/aranym/aranym/issues/77 + +--- src/natfeat/hostfs.cpp.orig 2019-04-14 14:11:29 UTC ++++ src/natfeat/hostfs.cpp +@@ -2872,7 +2872,22 @@ int32 HostFs::xfs_native_init( int16 devnum, memptr mo + * for drivers that are not running under mint, + * report our current timezone (in the filesys.res1 field) + */ ++#if defined(__FreeBSD__) || 1 ++ /* ++ * FreeBSD does not have that global variable. ++ * Maybe others, too. ++ */ ++ { ++ time_t t; ++ int32_t offset; ++ ++ t = time(0); ++ offset = -gmtoff(t); ++ WriteInt32(filesys + 136, offset); ++ } ++#else + WriteInt32(filesys + 136, timezone); ++#endif + + int16 dnum = -1; + size_t len = strlen( fmountPoint ); diff --git a/emulators/aranym/files/patch-src_uae__cpu_fpu_mathlib.h b/emulators/aranym/files/patch-src_uae__cpu_fpu_mathlib.h new file mode 100644 index 000000000000..d488a143abdf --- /dev/null +++ b/emulators/aranym/files/patch-src_uae__cpu_fpu_mathlib.h @@ -0,0 +1,17 @@ +- https://github.com/aranym/aranym/issues/78 + +--- src/uae_cpu/fpu/mathlib.h.orig 2021-03-04 01:34:57 UTC ++++ src/uae_cpu/fpu/mathlib.h +@@ -756,7 +756,11 @@ PRIVATE inline uae_u32 FFPU get_quotient_sign(fpu_regi + # define fp_pow pow + #endif + #ifndef fp_pow10 +-# define fp_pow10 pow10 ++# if !defined(__FreeBSD__) ++# define fp_pow10 pow10 ++# else ++# define fp_pow10(x) pow(10,x) ++# endif + #endif + #ifndef fp_pow2 + # ifdef HAVE_POW2 diff --git a/emulators/aranym/pkg-descr b/emulators/aranym/pkg-descr new file mode 100644 index 000000000000..87296c6077bb --- /dev/null +++ b/emulators/aranym/pkg-descr @@ -0,0 +1,8 @@ +ARAnyM is a multiplatform virtual machine (a software layer, or an emulator) for +running Atari ST/TT/Falcon operating systems and applications on almost any +hardware with many host operating systems. The reason for writing ARAnyM is to +provide Atari power users with faster and better machines. The ultimate goal is +to create a new platform where TOS/GEM applications could continue to live +forever. + +WWW: https://aranym.github.io diff --git a/emulators/aranym/pkg-plist b/emulators/aranym/pkg-plist new file mode 100644 index 000000000000..0dac8ab1b356 --- /dev/null +++ b/emulators/aranym/pkg-plist @@ -0,0 +1,32 @@ +bin/aranym +man/man1/aranym-jit.1.gz +man/man1/aranym-mmu.1.gz +man/man1/aranym.1.gz +share/applications/aranym-jit.desktop +share/applications/aranym-mmu.desktop +share/applications/aranym.desktop +%%DATADIR%%/arabridge +%%DATADIR%%/atari/hostfs/README +%%DATADIR%%/atari/hostfs/bdconfig.sys +%%DATADIR%%/atari/mmusetup.cnf +%%DATADIR%%/atari/network/README +%%DATADIR%%/atari/network/eth0-config.sh +%%DATADIR%%/atari/newdesk.inf +%%DATADIR%%/atari/nfosmesa/README +%%DATADIR%%/atari/sound/README +%%DATADIR%%/atari/tools/README +%%DATADIR%%/atari/tools/pc101us.kbd.bz2 +%%DATADIR%%/floppy.sh +%%DATADIR%%/logo.bmp +%%DATADIR%%/wm_icon.bmp +share/icons/hicolor/32x32/apps/aranym-jit.png +share/icons/hicolor/32x32/apps/aranym-mmu.png +share/icons/hicolor/32x32/apps/aranym.png +share/icons/hicolor/48x48/apps/aranym-jit.png +share/icons/hicolor/48x48/apps/aranym-mmu.png +share/icons/hicolor/48x48/apps/aranym.png +share/pixmaps/aranym-jit.png +share/pixmaps/aranym-mmu.png +share/pixmaps/aranym.png +@dir %%DATADIR%%/atari/nfcdrom +@dir %%DATADIR%%/atari/nfjpeg