summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Devir2018-01-07 15:02:49 +1000
committerKyle Devir2018-01-07 15:02:49 +1000
commit91770282b038041e350b29fd1f30dfc998aeaec3 (patch)
tree47e5649e9442a009241fa7fb1799b5e22f04cd0d
downloadaur-91770282b038041e350b29fd1f30dfc998aeaec3.tar.gz
v106 libretro-higan
-rw-r--r--.SRCINFO38
-rw-r--r--PKGBUILD49
-rwxr-xr-xhigan-flags.patch49
-rw-r--r--higan-paths.patch26
-rw-r--r--libretro.patch11
5 files changed, 173 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..4c50a6e2f6c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,38 @@
+pkgbase = libretro-higan
+ pkgdesc = Nintendo multi-system emulator
+ pkgver = 106
+ pkgrel = 1
+ url = http://byuu.org/
+ arch = x86_64
+ license = GPL3
+ makedepends = mesa
+ depends = alsa-lib
+ depends = cairo
+ depends = gcc-libs
+ depends = gdk-pixbuf2
+ depends = glib2
+ depends = glibc
+ depends = gtk2
+ depends = gtksourceview2
+ depends = libao
+ depends = libgl
+ depends = libpulse
+ depends = libx11
+ depends = libxext
+ depends = libxv
+ depends = openal
+ depends = pango
+ depends = sdl
+ depends = libudev.so
+ provides = libretro-higan
+ source = git+https://gitlab.com/higan/higan.git#commit=886f6dcf42fa11656e0df82bad8fd5cfe6ac1035
+ source = higan-flags.patch
+ source = higan-paths.patch
+ source = libretro.patch
+ sha256sums = SKIP
+ sha256sums = 6cff6f9570de186bdfa4620d3a2b6e315118b6f6be45b35f3346995865f1718e
+ sha256sums = 6d0bf69e00c9ea5c5155b52b5ee59c253f2bacbc64f044826f53d4d6ae175c68
+ sha256sums = 369fcf3e284b09e0ead3fa6c18c85240f656a42505f08c63da7cb636b9779160
+
+pkgname = libretro-higan
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..4f06337cb2e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id$
+# Maintainer: QuartzDragon <kyle[dot]devir[at]mykolab[dot]com>
+
+pkgname=libretro-higan
+_pkgname=higan
+_repo=https://gitlab.com/higan/higan.git
+_commit=886f6dcf42fa11656e0df82bad8fd5cfe6ac1035 # v106 on libretro branch
+pkgver=106
+pkgrel=1
+pkgdesc='Nintendo multi-system emulator'
+arch=('x86_64')
+url='http://byuu.org/'
+license=('GPL3')
+depends=('alsa-lib' 'cairo' 'gcc-libs' 'gdk-pixbuf2' 'glib2' 'glibc' 'gtk2'
+ 'gtksourceview2' 'libao' 'libgl' 'libpulse' 'libx11' 'libxext' 'libxv'
+ 'openal' 'pango' 'sdl'
+ 'libudev.so')
+makedepends=('mesa')
+provides=('libretro-higan')
+source=("git+${_repo}#commit=${_commit}"
+ 'higan-flags.patch'
+ 'higan-paths.patch'
+ 'libretro.patch')
+sha256sums=('SKIP'
+ '6cff6f9570de186bdfa4620d3a2b6e315118b6f6be45b35f3346995865f1718e'
+ '6d0bf69e00c9ea5c5155b52b5ee59c253f2bacbc64f044826f53d4d6ae175c68'
+ '369fcf3e284b09e0ead3fa6c18c85240f656a42505f08c63da7cb636b9779160')
+
+prepare() {
+ cd ${srcdir}/${_pkgname}
+
+ patch -Np1 -i ../higan-flags.patch
+ patch -Np1 -i ../higan-paths.patch
+ patch -Np1 -i ../libretro.patch
+}
+
+build() {
+ cd ${srcdir}/${_pkgname}
+
+ make -C higan target=libretro
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}
+
+ install -Dm 755 higan/out/higan_sfc_libretro.so -t "${pkgdir}"/usr/lib/libretro/
+}
+
+# vim: ts=2 sw=2 et:
diff --git a/higan-flags.patch b/higan-flags.patch
new file mode 100755
index 00000000000..aaca8d0e2f9
--- /dev/null
+++ b/higan-flags.patch
@@ -0,0 +1,49 @@
+diff -rupN higan_v106-source.orig/higan/GNUmakefile higan_v106-source/higan/GNUmakefile
+--- higan_v106-source.orig/higan/GNUmakefile 2017-12-27 23:12:21.263872763 +0100
++++ higan_v106-source/higan/GNUmakefile 2017-12-27 23:12:30.243627883 +0100
+@@ -1,4 +1,4 @@
+-build := optimize
++build := release
+ include ../nall/GNUmakefile
+
+ binary := application
+@@ -26,7 +26,6 @@ else ifneq ($(filter $(platform),linux b
+ flags += -fopenmp
+ link += -fopenmp
+ ifeq ($(binary),application)
+- flags += -march=native
+ link += -Wl,-export-dynamic
+ link += -lX11 -lXext
+ else ifeq ($(binary),library)
+diff -rupN higan_v106-source.orig/icarus/GNUmakefile higan_v106-source/icarus/GNUmakefile
+--- higan_v106-source.orig/icarus/GNUmakefile 2017-12-27 23:12:21.280538976 +0100
++++ higan_v106-source/icarus/GNUmakefile 2017-12-27 23:12:30.243627883 +0100
+@@ -1,4 +1,4 @@
+-build := optimize
++build := release
+ include ../nall/GNUmakefile
+ include ../hiro/GNUmakefile
+
+diff -rupN higan_v106-source.orig/nall/GNUmakefile higan_v106-source/nall/GNUmakefile
+--- higan_v106-source.orig/nall/GNUmakefile 2017-12-27 23:12:21.283872217 +0100
++++ higan_v106-source/nall/GNUmakefile 2017-12-27 23:12:44.326577547 +0100
+@@ -40,8 +40,8 @@ cflags := -x c -std=c11
+ objcflags := -x objective-c -std=c11
+ cppflags := -x c++ -std=c++14
+ objcppflags := -x objective-c++ -std=c++14
+-flags :=
+-link :=
++flags := $(CXXFLAGS)
++link := $(LDFLAGS)
+
+ # compiler detection
+ ifeq ($(compiler),)
+@@ -120,7 +120,7 @@ ifeq ($(threaded),true)
+ endif
+
+ # paths
+-prefix := $(HOME)/.local
++prefix := /usr
+
+ # function rwildcard(directory, pattern)
+ rwildcard = \
diff --git a/higan-paths.patch b/higan-paths.patch
new file mode 100644
index 00000000000..dcb3eaf89d2
--- /dev/null
+++ b/higan-paths.patch
@@ -0,0 +1,26 @@
+diff -rupN higan_v106-source.orig/higan/target-tomoko/tomoko.cpp higan_v106-source/higan/target-tomoko/tomoko.cpp
+--- higan_v106-source.orig/higan/target-tomoko/tomoko.cpp 2017-12-27 23:48:31.103245742 +0100
++++ higan_v106-source/higan/target-tomoko/tomoko.cpp 2017-12-27 23:49:19.728586352 +0100
+@@ -11,6 +11,9 @@ auto locate(string name) -> string {
+ 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};
+ }
+diff -rupN higan_v106-source.orig/icarus/icarus.cpp higan_v106-source/icarus/icarus.cpp
+--- higan_v106-source.orig/icarus/icarus.cpp 2017-12-27 23:48:31.109912227 +0100
++++ higan_v106-source/icarus/icarus.cpp 2017-12-27 23:49:02.672384569 +0100
+@@ -11,6 +11,9 @@ auto locate(string name) -> string {
+ location = {Path::config(), "icarus/", name};
+ if(inode::exists(location)) return location;
+
++ location = {Path::shared(), "icarus/", name};
++ if(inode::exists(location)) return location;
++
+ directory::create({Path::local(), "icarus/"});
+ return {Path::local(), "icarus/", name};
+ }
diff --git a/libretro.patch b/libretro.patch
new file mode 100644
index 00000000000..1ec43c3e90a
--- /dev/null
+++ b/libretro.patch
@@ -0,0 +1,11 @@
+--- higan/higan/GNUmakefile 2018-01-07 14:39:56.761733792 +1000
++++ higan/higan/GNUmakefile-patch 2018-01-07 14:42:16.026978876 +1000
+@@ -1,7 +1,7 @@
+ build := release
+ include ../nall/GNUmakefile
+
+-binary := application
++binary := library
+ target := tomoko
+ objects := libco emulator audio video resource
+