From 01e60764fabf1fa3bad44a02b32101ad7a0a0c75 Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Sat, 26 Oct 2019 18:05:05 -0400 Subject: [PATCH] add macemu-git --- srcpkgs/macemu-git/files/90-sheepshaver.conf | 2 + srcpkgs/macemu-git/files/dkms.conf | 5 ++ srcpkgs/macemu-git/files/sheep_net.conf | 1 + srcpkgs/macemu-git/template | 72 ++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 srcpkgs/macemu-git/files/90-sheepshaver.conf create mode 100644 srcpkgs/macemu-git/files/dkms.conf create mode 100644 srcpkgs/macemu-git/files/sheep_net.conf create mode 100644 srcpkgs/macemu-git/template diff --git a/srcpkgs/macemu-git/files/90-sheepshaver.conf b/srcpkgs/macemu-git/files/90-sheepshaver.conf new file mode 100644 index 0000000..3de9227 --- /dev/null +++ b/srcpkgs/macemu-git/files/90-sheepshaver.conf @@ -0,0 +1,2 @@ +# Required kernel parameter for native addressing +vm.mmap_min_addr=0 diff --git a/srcpkgs/macemu-git/files/dkms.conf b/srcpkgs/macemu-git/files/dkms.conf new file mode 100644 index 0000000..5481a4a --- /dev/null +++ b/srcpkgs/macemu-git/files/dkms.conf @@ -0,0 +1,5 @@ +PACKAGE_NAME="sheepnet" +PACKAGE_VERSION="@VERSION@" +AUTOINSTALL=yes +BUILT_MODULE_NAME="sheep_net" +DEST_MODULE_LOCATION="/kernel/net" diff --git a/srcpkgs/macemu-git/files/sheep_net.conf b/srcpkgs/macemu-git/files/sheep_net.conf new file mode 100644 index 0000000..db3b686 --- /dev/null +++ b/srcpkgs/macemu-git/files/sheep_net.conf @@ -0,0 +1 @@ +sheep_net diff --git a/srcpkgs/macemu-git/template b/srcpkgs/macemu-git/template new file mode 100644 index 0000000..825f9c2 --- /dev/null +++ b/srcpkgs/macemu-git/template @@ -0,0 +1,72 @@ +# Template file for 'macemu-git' +pkgname=macemu-git +version=20190405 +revision=2 +_git_hash=01052ca89d22882c870b84c5498cd0ee9a843b6b +wrksrc="macemu-${_git_hash}" +hostmakedepends="make automake libtool pkg-config" +makedepends="gtk+-devel SDL-devel vde2-devel dkms" +short_desc="Basilisk II and SheepShaver Macintosh emulators" +maintainer="Alison Watson " +license="GPL-2.0-or-later" +homepage="https://github.com/cebix/macemu" +distfiles="https://github.com/cebix/macemu/archive/${_git_hash}.tar.gz>${pkgname}-${version}.tar.gz" +checksum=65aa7c4f7b6bcf1f83b2c44589fcdeded10104a14532fa98ad2b04b31827a599 +archs="i686* x86_64*" +dkms_modules="sheepnet ${version}" +_dkms_name="sheepnet-${version}" +nopie=yes + +do_configure() { + cd "${wrksrc}"/BasiliskII/src/Unix + ./autogen.sh \ + --prefix=/usr \ + --enable-sdl-video \ + --enable-sdl-audio \ + --enable-jit-compiler \ + --with-bincue \ + --with-vdeplug + + cd "${wrksrc}"/SheepShaver/src/Unix + ./autogen.sh \ + --prefix=/usr \ + --enable-addressing=direct \ + --enable-standalone-gui \ + --enable-sdl-video \ + --enable-sdl-audio \ + --enable-tuntap \ + --with-bincue \ + --with-vdeplug +} + +do_build() { + cd "${wrksrc}"/BasiliskII/src/Unix; make DESTDIR="${DESTDIR}" -j1 + cd "${wrksrc}"/SheepShaver/src/Unix; make DESTDIR="${DESTDIR}" -j1 + + cp -rL Linux/NetDriver _netdriver +} + +do_install() { + cd "${wrksrc}"/BasiliskII/src/Unix + make DESTDIR="${DESTDIR}" install + + cd "${wrksrc}"/SheepShaver/src/Unix + make DESTDIR="${DESTDIR}" install + + cd ../.. + + vmkdir usr/share/doc + vmkdir usr/src + + vcopy doc/Linux usr/share/doc/SheepShaver + vcopy src/Unix/_netdriver usr/src/"${_dkms_name}" + + vinstall "${FILESDIR}"/90-sheepshaver.conf 644 usr/lib/sysctl.d/ + vinstall "${FILESDIR}"/dkms.conf 644 usr/src/"${_dkms_name}"/ + + vsed -i "${PKGDESTDIR}"/usr/src/${_dkms_name}/dkms.conf \ + -e "s/@VERSION@/${version}-${revision}/" + + vmkdir usr/lib/modules-load.d + vinstall "${FILESDIR}"/sheep_net.conf 644 usr/lib/modules-load.d/ +}