aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Demelier <markand@malikania.fr>2020-04-05 13:33:41 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-04-05 17:04:21 +0000
commitc11a151798094d4215e6ef9615ec1c605657b52d (patch)
treeac913278cd236d330899dc3081730d5641671522
parent7f4227f9e326b3697ddf0d324bc7a7fff719898d (diff)
downloadaports-c11a151798094d4215e6ef9615ec1c605657b52d.tar.gz
aports-c11a151798094d4215e6ef9615ec1c605657b52d.tar.bz2
aports-c11a151798094d4215e6ef9615ec1c605657b52d.tar.xz
testing/libretro-beetle-bsnes: new aport
https://github.com/libretro/beetle-bsnes-libretro standalone port of Mednafen bSNES to libretro
-rw-r--r--testing/libretro-beetle-bsnes/APKBUILD25
-rw-r--r--testing/libretro-beetle-bsnes/patch-musl.patch63
2 files changed, 88 insertions, 0 deletions
diff --git a/testing/libretro-beetle-bsnes/APKBUILD b/testing/libretro-beetle-bsnes/APKBUILD
new file mode 100644
index 0000000000..6bc9d385a7
--- /dev/null
+++ b/testing/libretro-beetle-bsnes/APKBUILD
@@ -0,0 +1,25 @@
+# Contributor: David Demelier <markand@malikania.fr>
+# Maintainer: David Demelier <markand@malikania.fr>
+pkgname=libretro-beetle-bsnes
+pkgver=0_git20191012
+pkgrel=0
+_commit="de22d8420ea606f1b2f72afd4dda34619cf2cc20"
+pkgdesc="standalone port of Mednafen bSNES to libretro"
+url="https://github.com/libretro/beetle-bsnes-libretro"
+arch="all"
+license="GPL-2.0-only"
+source="$pkgname-$_commit.tar.gz::https://github.com/libretro/beetle-bsnes-libretro/archive/$_commit.tar.gz
+ patch-musl.patch"
+builddir="$srcdir/beetle-bsnes-libretro-$_commit"
+options="!check" # No tests
+
+build() {
+ make
+}
+
+package() {
+ install -Dm644 mednafen_snes_libretro.so "$pkgdir"/usr/lib/libretro/mednafen_snes_libretro.so
+}
+
+sha512sums="176d55a1e0b8604d8f362e30566144d211b53db1a407838a252e78d94f709d1f646ca25724b70ffe6052cc04d7dd22ec22f8df25ba24479d8bf653e0e4f75488 libretro-beetle-bsnes-de22d8420ea606f1b2f72afd4dda34619cf2cc20.tar.gz
+1324ce8101bea75316a5cfac6b21e442c2762c798b9d1ab5de22bf39adf38b154b4ffe7a79d34d9c919ec384465fd61c140765da60295c1712f93532336fdcb5 patch-musl.patch"
diff --git a/testing/libretro-beetle-bsnes/patch-musl.patch b/testing/libretro-beetle-bsnes/patch-musl.patch
new file mode 100644
index 0000000000..ca15723947
--- /dev/null
+++ b/testing/libretro-beetle-bsnes/patch-musl.patch
@@ -0,0 +1,63 @@
+Upstream: not yet, need to find a proper patch.
+--- ./mednafen/snes/src/lib/nall/string/strl.hpp.orig 2020-04-05 13:30:05.865697614 +0200
++++ ./mednafen/snes/src/lib/nall/string/strl.hpp 2020-04-05 13:30:12.735686081 +0200
+@@ -1,48 +0,0 @@
+-#ifndef NALL_STRING_STRL_HPP
+-#define NALL_STRING_STRL_HPP
+-
+-//strlcpy, strlcat based on OpenBSD implementation by Todd C. Miller
+-
+-//return = strlen(src)
+-size_t strlcpy(char *dest, const char *src, size_t length) {
+- char *d = dest;
+- const char *s = src;
+- size_t n = length;
+-
+- if(n) {
+- while(--n && (*d++ = *s++)); //copy as many bytes as possible, or until null terminator reached
+- }
+-
+- if(!n) {
+- if(length) *d = 0;
+- while(*s++); //traverse rest of s, so that s - src == strlen(src)
+- }
+-
+- return (s - src - 1); //return length of copied string, sans null terminator
+-}
+-
+-//return = strlen(src) + min(length, strlen(dest))
+-size_t strlcat(char *dest, const char *src, size_t length) {
+- char *d = dest;
+- const char *s = src;
+- size_t n = length;
+-
+- while(n-- && *d) d++; //find end of dest
+- size_t dlength = d - dest;
+- n = length - dlength; //subtract length of dest from maximum string length
+-
+- if(!n) return dlength + strlen(s);
+-
+- while(*s) {
+- if(n != 1) {
+- *d++ = *s;
+- n--;
+- }
+- s++;
+- }
+- *d = 0;
+-
+- return dlength + (s - src); //return length of resulting string, sans null terminator
+-}
+-
+-#endif
+--- ./mednafen/snes/src/lib/nall/string/base.hpp.orig 2020-04-05 13:25:44.896135748 +0200
++++ ./mednafen/snes/src/lib/nall/string/base.hpp 2020-04-05 13:25:57.799447417 +0200
+@@ -34,8 +34,6 @@
+ inline bool match(const char *pattern, const char *str);
+ inline bool strint (const char *str, int &result);
+ inline bool strmath(const char *str, int &result);
+-inline size_t strlcpy(char *dest, const char *src, size_t length);
+-inline size_t strlcat(char *dest, const char *src, size_t length);
+ inline char* ltrim(char *str, const char *key = " ");
+ inline char* rtrim(char *str, const char *key = " ");
+ inline char* trim (char *str, const char *key = " ");