From a1d917732e8f0d8251d4f34cc4194ecb90392b35 Mon Sep 17 00:00:00 2001 From: Yoshi Sugawara Date: Sun, 8 Sep 2019 07:09:21 -1000 Subject: [PATCH] (tvOS) support building for Apple TV --- libretro-build-tvos-arm64.sh | 17 +++++++++++++++++ libretro-config.sh | 17 +++++++++++++++++ recipes/apple/cores-ios-arm64-generic | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100755 libretro-build-tvos-arm64.sh diff --git a/libretro-build-tvos-arm64.sh b/libretro-build-tvos-arm64.sh new file mode 100755 index 00000000..a1fff4ec --- /dev/null +++ b/libretro-build-tvos-arm64.sh @@ -0,0 +1,17 @@ +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash + +SCRIPT="${0#./}" +BASE_DIR="${SCRIPT%/*}" +WORKDIR="$PWD" + +if [ "$BASE_DIR" = "$SCRIPT" ]; then + BASE_DIR="$WORKDIR" +else + if [[ "$0" != /* ]]; then + # Make the path absolute + BASE_DIR="$WORKDIR/$BASE_DIR" + fi +fi + +platform=tvos-arm64 ${BASE_DIR}/libretro-build.sh $@ diff --git a/libretro-config.sh b/libretro-config.sh index 3d9a3ed6..c63c4b22 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -272,6 +272,23 @@ case "$platform" in CXX11="clang++ -std=c++11 -stdlib=libc++ -arch arm64 -marm -miphoneos-version-min=8.0 -isysroot $IOSSDK" ;; + tvos-arm64) + DIST_DIR="tvos-arm64" + FORMAT_EXT=dylib + IOS=1 + ARCH=arm64 + FORMAT=_tvos + FORMAT_COMPILER_TARGET=tvos-arm64 + FORMAT_COMPILER_TARGET_ALT=tvos-arm64 + export IOSSDK=$(xcodebuild -version -sdk appletvos Path) + + # Use generic names rather than gcc/clang to better support both + CC="cc -arch arm64 -marm -mtvos-version-min=9.0 -isysroot $IOSSDK" + CXX="c++ -arch arm64 -marm -mtvos-version-min=9.0 -isysroot $IOSSDK" + CXX11="clang++ -std=c++11 -stdlib=libc++ -arch arm64 -marm -mtvos-version-min=9.0 -isysroot $IOSSDK" + ;; + + android-x86_64) FORMAT_ABI="x86_64" DIST_DIR="android/${FORMAT_ABI}" diff --git a/recipes/apple/cores-ios-arm64-generic b/recipes/apple/cores-ios-arm64-generic index 5edc61d7..4185d97a 100644 --- a/recipes/apple/cores-ios-arm64-generic +++ b/recipes/apple/cores-ios-arm64-generic @@ -9,7 +9,7 @@ cannonball libretro-cannonball https://github.com/libretro/cannonball.git master chailove libretro-chailove https://github.com/libretro/libretro-chailove.git master NO GENERIC Makefile . craft libretro-craft https://github.com/libretro/craft master NO GENERIC Makefile.libretro . crocods libretro-crocods https://github.com/libretro/libretro-crocods.git master YES GENERIC Makefile . -daphne libretro-daphne https://github.com/libretro/daphne.git master NO GENERIC Makefile . +daphne libretro-daphne https://github.com/libretro/daphne.git master YES GENERIC Makefile . desmume libretro-desmume https://github.com/libretro/desmume.git master YES GENERIC Makefile.libretro desmume/src/frontend/libretro desmume2015 libretro-desmume2015 https://github.com/libretro/desmume2015.git master NO GENERIC Makefile.libretro desmume dinothawr libretro-dinothawr https://github.com/libretro/Dinothawr.git master NO GENERIC Makefile .