aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Demelier <markand@malikania.fr>2021-05-14 23:46:57 +0200
committerLeo <thinkabit.ukim@gmail.com>2021-05-15 12:23:43 +0000
commitb9fb9c00ebee8c242c9d782a9e9626f95274cc49 (patch)
tree2eea9976c90a2b64dff06e9d201381d27cc3e0bc
parent2df6a5347a8ed4305de0fd489ba03ad8edf8e3de (diff)
downloadaports-b9fb9c00ebee8c242c9d782a9e9626f95274cc49.tar.gz
aports-b9fb9c00ebee8c242c9d782a9e9626f95274cc49.tar.bz2
aports-b9fb9c00ebee8c242c9d782a9e9626f95274cc49.tar.xz
testing/libretro-flycast: new aport
-rw-r--r--testing/libretro-flycast/APKBUILD44
-rw-r--r--testing/libretro-flycast/patch-unbundle.patch160
2 files changed, 204 insertions, 0 deletions
diff --git a/testing/libretro-flycast/APKBUILD b/testing/libretro-flycast/APKBUILD
new file mode 100644
index 0000000000..4a383cf883
--- /dev/null
+++ b/testing/libretro-flycast/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: David Demelier <markand@malikania.fr>
+# Maintainer: David Demelier <markand@malikania.fr>
+pkgname=libretro-flycast
+pkgver=0_git20210506
+pkgrel=0
+_commit="6f27e7121d2b9f2c084d18219a9e439c403a1b89"
+pkgdesc="libretro core for flycast"
+url="https://github.com/libretro/flycast"
+arch="x86_64 aarch64"
+license="GPL-2.0-only"
+makedepends="libzip-dev mesa-dev miniupnpc-dev zlib-dev"
+source="$pkgname-$_commit.tar.gz::https://github.com/libretro/flycast/archive/$_commit.tar.gz
+ patch-unbundle.patch
+ "
+builddir="$srcdir/flycast-$_commit"
+options="!check" # No tests
+
+case $CARCH in
+aarch64)
+ _args="WITH_DYNAREC=arm64 HOST_CPU_FLAGS=-DTARGET_LINUX_ARMv8" ;;
+arm*)
+ _args="WITH_DYNAREC=arm" ;;
+esac
+
+if [ "$CARCH" != "x86" ]; then
+ _args="$_args HAVE_GENERIC_JIT=0 HAVE_VULKAN=0"
+fi
+
+build() {
+ rm -rf core/deps/libzip
+ rm -rf core/deps/miniupnpc
+ rm -rf core/deps/zlib
+ make $_args \
+ HAVE_LTCG=0 \
+ SYSTEM_LIBZIP=1 \
+ SYSTEM_ZLIB=1
+}
+
+package() {
+ install -Dm644 flycast_libretro.so "$pkgdir"/usr/lib/libretro/flycast_libretro.so
+}
+
+sha512sums="6f58502440035df11f37ba4b5e579fd458c16bb3db56d5bb5ba85b80ed67ac9361508bd4ee52d279ea06a860dcb02aaa0d92221b000d51f968f01da2c7aa99f1 libretro-flycast-6f27e7121d2b9f2c084d18219a9e439c403a1b89.tar.gz
+98edf29148cf990de8ce1c1a15548e122ce30944645d9b92715fe3c86e021439fdeea1dabacbcbff46de211b5c2875bfc330d5a602f59498bbe745708a3d1e15 patch-unbundle.patch"
diff --git a/testing/libretro-flycast/patch-unbundle.patch b/testing/libretro-flycast/patch-unbundle.patch
new file mode 100644
index 0000000000..4f6cf85bfa
--- /dev/null
+++ b/testing/libretro-flycast/patch-unbundle.patch
@@ -0,0 +1,160 @@
+--- flycast-6f27e7121d2b9f2c084d18219a9e439c403a1b89/core/hw/maple/maple_devs.cpp.orig
++++ flycast-6f27e7121d2b9f2c084d18219a9e439c403a1b89/core/hw/maple/maple_devs.cpp
+@@ -8,7 +8,7 @@
+ #include <math.h>
+ #include <time.h>
+
+-#include "deps/zlib/zlib.h"
++#include <zlib.h>
+ #include "deps/xxhash/xxhash.h"
+
+ #define LOGJVS(...) DEBUG_LOG(JVS, __VA_ARGS__)
+--- flycast-6f27e7121d2b9f2c084d18219a9e439c403a1b89/core/archive/ZipArchive.h.orig
++++ flycast-6f27e7121d2b9f2c084d18219a9e439c403a1b89/core/archive/ZipArchive.h
+@@ -22,7 +22,7 @@
+ #ifndef CORE_ARCHIVE_ZIPARCHIVE_H_
+ #define CORE_ARCHIVE_ZIPARCHIVE_H_
+ #include "archive.h"
+-#include "deps/libzip/zip.h"
++#include <zip.h>
+
+ class ZipArchive : public Archive
+ {
+--- flycast-6f27e7121d2b9f2c084d18219a9e439c403a1b89/core/network/miniupnp.cpp.orig
++++ flycast-6f27e7121d2b9f2c084d18219a9e439c403a1b89/core/network/miniupnp.cpp
+@@ -16,8 +16,8 @@
+ You should have received a copy of the GNU General Public License
+ along with Flycast. If not, see <https://www.gnu.org/licenses/>.
+ */
+-#include <miniupnpc.h>
+-#include <upnpcommands.h>
++#include <miniupnpc/miniupnpc.h>
++#include <miniupnpc/upnpcommands.h>
+ #include "types.h"
+ #include "miniupnp.h"
+
+--- flycast-6f27e7121d2b9f2c084d18219a9e439c403a1b89/Makefile.common.orig
++++ flycast-6f27e7121d2b9f2c084d18219a9e439c403a1b89/Makefile.common
+@@ -9,6 +9,7 @@
+ -I$(LIBRETRO_COMM_DIR)/include \
+ -I$(DEPS_DIR)/vixl \
+ -I$(DEPS_DIR)/stb
++LIBS += -lminiupnpc
+
+ SOURCES_C ?=
+ SOURCES_CXX := \
+@@ -169,62 +170,6 @@
+ $(DEPS_DIR)/libchdr/src/libchdr_flac.c \
+ $(DEPS_DIR)/libchdr/src/libchdr_huffman.c \
+
+-LIBZIP_SOURCES_C = \
+- $(DEPS_DIR)/libzip/mkstemp.c \
+- $(DEPS_DIR)/libzip/zip_add.c \
+- $(DEPS_DIR)/libzip/zip_add_dir.c \
+- $(DEPS_DIR)/libzip/zip_close.c \
+- $(DEPS_DIR)/libzip/zip_delete.c \
+- $(DEPS_DIR)/libzip/zip_dirent.c \
+- $(DEPS_DIR)/libzip/zip_entry_free.c \
+- $(DEPS_DIR)/libzip/zip_entry_new.c \
+- $(DEPS_DIR)/libzip/zip_error.c \
+- $(DEPS_DIR)/libzip/zip_error_clear.c \
+- $(DEPS_DIR)/libzip/zip_error_get.c \
+- $(DEPS_DIR)/libzip/zip_error_get_sys_type.c \
+- $(DEPS_DIR)/libzip/zip_error_strerror.c \
+- $(DEPS_DIR)/libzip/zip_error_to_str.c \
+- $(DEPS_DIR)/libzip/zip_err_str.c \
+- $(DEPS_DIR)/libzip/zip_fclose.c \
+- $(DEPS_DIR)/libzip/zip_file_error_clear.c \
+- $(DEPS_DIR)/libzip/zip_file_error_get.c \
+- $(DEPS_DIR)/libzip/zip_file_get_offset.c \
+- $(DEPS_DIR)/libzip/zip_filerange_crc.c \
+- $(DEPS_DIR)/libzip/zip_file_strerror.c \
+- $(DEPS_DIR)/libzip/zip_fopen.c \
+- $(DEPS_DIR)/libzip/zip_fopen_index.c \
+- $(DEPS_DIR)/libzip/zip_fread.c \
+- $(DEPS_DIR)/libzip/zip_free.c \
+- $(DEPS_DIR)/libzip/zip_get_archive_comment.c \
+- $(DEPS_DIR)/libzip/zip_get_archive_flag.c \
+- $(DEPS_DIR)/libzip/zip_get_file_comment.c \
+- $(DEPS_DIR)/libzip/zip_get_name.c \
+- $(DEPS_DIR)/libzip/zip_get_num_files.c \
+- $(DEPS_DIR)/libzip/zip_memdup.c \
+- $(DEPS_DIR)/libzip/zip_name_locate.c \
+- $(DEPS_DIR)/libzip/zip_new.c \
+- $(DEPS_DIR)/libzip/zip_open.c \
+- $(DEPS_DIR)/libzip/zip_rename.c \
+- $(DEPS_DIR)/libzip/zip_replace.c \
+- $(DEPS_DIR)/libzip/zip_set_archive_comment.c \
+- $(DEPS_DIR)/libzip/zip_set_archive_flag.c \
+- $(DEPS_DIR)/libzip/zip_set_file_comment.c \
+- $(DEPS_DIR)/libzip/zip_set_name.c \
+- $(DEPS_DIR)/libzip/zip_source_buffer.c \
+- $(DEPS_DIR)/libzip/zip_source_file.c \
+- $(DEPS_DIR)/libzip/zip_source_filep.c \
+- $(DEPS_DIR)/libzip/zip_source_free.c \
+- $(DEPS_DIR)/libzip/zip_source_function.c \
+- $(DEPS_DIR)/libzip/zip_source_zip.c \
+- $(DEPS_DIR)/libzip/zip_stat.c \
+- $(DEPS_DIR)/libzip/zip_stat_index.c \
+- $(DEPS_DIR)/libzip/zip_stat_init.c \
+- $(DEPS_DIR)/libzip/zip_strerror.c \
+- $(DEPS_DIR)/libzip/zip_unchange_all.c \
+- $(DEPS_DIR)/libzip/zip_unchange_archive.c \
+- $(DEPS_DIR)/libzip/zip_unchange.c \
+- $(DEPS_DIR)/libzip/zip_unchange_data.c
+-
+ PICOTCP_INCFLAGS = \
+ -I$(DEPS_DIR)/picotcp/include \
+ -I$(DEPS_DIR)/picotcp/modules
+@@ -256,18 +201,6 @@
+
+ XXHASH_SOURCES_C = $(DEPS_DIR)/xxhash/xxhash.c
+
+-ZLIB_SOURCES_C = \
+- $(DEPS_DIR)/zlib/deflate.c \
+- $(DEPS_DIR)/zlib/uncompr.c \
+- $(DEPS_DIR)/zlib/zutil.c \
+- $(DEPS_DIR)/zlib/inffast.c \
+- $(DEPS_DIR)/zlib/crc32.c \
+- $(DEPS_DIR)/zlib/inflate.c \
+- $(DEPS_DIR)/zlib/infback.c \
+- $(DEPS_DIR)/zlib/inftrees.c \
+- $(DEPS_DIR)/zlib/trees.c \
+- $(DEPS_DIR)/zlib/adler32.c
+-
+ SOURCES_ASM :=
+
+ ifeq ($(SYSTEM_LIBZIP), 1)
+@@ -298,7 +231,6 @@
+ endif
+
+ ifeq ($(ENABLE_MODEM), 1)
+- INCFLAGS += -I$(CORE_DIR)/core/deps/miniupnpc
+ SOURCES_CXX += $(CORE_DIR)/core/hw/modem/dns.cpp \
+ $(CORE_DIR)/core/hw/modem/modem.cpp \
+ $(CORE_DIR)/core/hw/bba/bba.cpp \
+@@ -306,23 +238,7 @@
+ $(CORE_DIR)/core/network/picoppp.cpp \
+ $(CORE_DIR)/core/network/miniupnp.cpp
+
+- SOURCES_C += \
+- $(CORE_DIR)/core/deps/miniupnpc/addr_is_reserved.c \
+- $(CORE_DIR)/core/deps/miniupnpc/igd_desc_parse.c \
+- $(CORE_DIR)/core/deps/miniupnpc/upnpreplyparse.c \
+- $(CORE_DIR)/core/deps/miniupnpc/upnpcommands.c \
+- $(CORE_DIR)/core/deps/miniupnpc/upnperrors.c \
+- $(CORE_DIR)/core/deps/miniupnpc/connecthostport.c \
+- $(CORE_DIR)/core/deps/miniupnpc/portlistingparse.c \
+- $(CORE_DIR)/core/deps/miniupnpc/receivedata.c \
+- $(CORE_DIR)/core/deps/miniupnpc/upnpdev.c \
+- $(CORE_DIR)/core/deps/miniupnpc/minissdpc.c \
+- $(CORE_DIR)/core/deps/miniupnpc/miniwget.c \
+- $(CORE_DIR)/core/deps/miniupnpc/miniupnpc.c \
+- $(CORE_DIR)/core/deps/miniupnpc/minixml.c \
+- $(CORE_DIR)/core/deps/miniupnpc/minisoap.c
+-
+- CORE_DEFINES += -DENABLE_MODEM -DMINIUPNP_STATICLIB
++ CORE_DEFINES += -DENABLE_MODEM
+ endif
+
+ ifeq ($(HAVE_GL), 1)