New package: higan-106

Closes: #11618 [via git-merge-pr]
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
John 2018-02-13 17:51:46 +01:00 committed by Jürgen Buchmüller
parent 85acf4366e
commit eb07b4bb6a
3 changed files with 106 additions and 0 deletions

View file

@ -0,0 +1,24 @@
Description: Makefile fixes
* Remove -march=native build flag.
- This will cause gcc to use all instruction subsets
available on the build machine, meaning that the program
will not work on computers where they are not available.
- Also the flag is not supported on many architectures
(armhf, s390, s390x, powerpc, ia64, ...).
* Linking with dl is also required on kfreebsd.
Author: Tobias Hansen <thansen@debian.org>
--- higan/GNUmakefile
+++ higan/GNUmakefile
@@ -26,9 +26,8 @@
flags += -fopenmp
link += -fopenmp
ifeq ($(binary),application)
- flags += -march=native
link += -Wl,-export-dynamic
- link += -lX11 -lXext
+ link += -lX11 -lXext -ldl
else ifeq ($(binary),library)
flags += -fPIC
link += -shared

View file

@ -0,0 +1,16 @@
Description: Use sharedpath() when locating files
To find files that are in /usr/share/higan.
Author: Tobias Hansen <thansen@debian.org>
--- higan/target-tomoko/tomoko.cpp
+++ higan/target-tomoko/tomoko.cpp
@@ -11,6 +11,9 @@
location = {Path::config(), "higan/", name};
if(inode::exists(location)) return location;
+ location = {Path::shared(), "higan/", name};
+ if(inode::exists(location)) return location;
+
directory::create({Path::local(), "higan/"});
return {Path::local(), "higan/", name};
}

66
srcpkgs/higan/template Normal file
View file

@ -0,0 +1,66 @@
# Template file for 'higan'
pkgname=higan
version=106
revision=1
wrksrc="higan_v${version}-source"
build_style=gnu-makefile
build_wrksrc=higan
make_build_args='compiler=${CXX}'
make_install_args="prefix=${DESTDIR}/usr"
hostmakedepends="p7zip pkg-config SDL-devel"
makedepends="gtk+-devel gtksourceview2-devel libgomp-devel
$(vopt_if sdl SDL-devel)
$(vopt_if opengl MesaLib-devel) $(vopt_if xv libXv-devel)
$(vopt_if ao libao-devel) $(vopt_if alsa alsa-lib-devel)
$(vopt_if openal libopenal-devel) $(vopt_if pulseaudio pulseaudio-devel)"
short_desc="Multi-system emulator (SNES/Game Boy/Mega Drive/PC Engine/WonderSwan)"
maintainer="John <johnz@posteo.net>"
license="GPL-3"
homepage="https://byuu.org/emulation/higan/"
distfiles="https://download.byuu.org/higan_v${version}-source.7z"
checksum=6564f91f232040c46c052de763dc139e94005e0f2376959fdacbb6ccd3fd6d18
build_options="icarus pulseaudio alsa oss openal ao sdl xv opengl udev"
build_options_default="icarus pulseaudio alsa oss openal ao sdl xv opengl udev"
desc_option_ao="Enable support for cross-platform audio"
desc_option_icarus="Enable the icarus binary"
desc_option_openal="Enable support for 3D audio"
desc_option_opengl="Enable support for OpenGL"
desc_option_oss="Enable support for OSS"
desc_option_udev="Enable support for udev"
desc_option_xv="Enable support for Xv"
disable_module() {
echo Disabling: "$1"
sed -i \
-e "s|$1\b||" \
"${wrksrc}"/higan/target-tomoko/GNUmakefile
}
do_configure() {
$(vopt_if pulseaudio '' 'disable_module audio.pulseaudio')
$(vopt_if pulseaudio '' 'disable_module audio.pulseaudiosimple')
$(vopt_if alsa '' 'disable_module audio.alsa')
$(vopt_if oss '' 'disable_module audio.oss')
$(vopt_if openal '' 'disable_module audio.openal')
$(vopt_if ao '' 'disable_module audio.ao')
$(vopt_if sdl '' 'disable_module video.sdl')
$(vopt_if xv '' 'disable_module video.xvideo')
$(vopt_if opengl '' 'disable_module video.glx')
$(vopt_if sdl '' 'disable_module input.sdl')
$(vopt_if udev '' 'disable_module input.udev')
}
if [ "$build_option_icarus" ];then
post_build() {
cd $wrksrc/icarus
make ${makejobs} ${make_build_args}
}
post_install() {
cd $wrksrc/icarus
make STRIP=true ${make_install_args} install
}
fi