# Maintainer: Alexandre Bouvier # Contributor: Maxime Gauduin _reponame=flycast _pkgname=libretro-$_reponame pkgname=$_pkgname-git pkgver=2.0.r223.g92fa4c04 pkgrel=1 pkgdesc="Sega Dreamcast/NAOMI/NAOMI 2/Atomiswave core (fork of reicast)" arch=('aarch64' 'armv7h' 'i486' 'i686' 'pentium4' 'x86_64') url="https://github.com/flyinghead/flycast" license=('GPL2') groups=('libretro') depends=('glslang>=11.13' 'libretro-core-info') makedepends=( 'cmake' 'git' 'glm' 'libchdr' 'libgl' 'libzip' 'miniupnpc' 'vulkan-headers>=1:1.3.236' 'vulkan-icd-loader' 'xbyak' 'xxhash' 'zlib' ) provides=("$_pkgname") conflicts=("$_pkgname") source=( "$_reponame::git+$url.git" 'VulkanMemoryAllocator::git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git' 'unbundle-libs.patch' ) b2sums=( 'SKIP' 'SKIP' '46548c4be0e6bdebaece4b3484fd6d05015a7cb07cef5054d25fe8df95ef1855eceea39ec3becd13e64e4753c7badcfb18a1b1f5eeedbb720f3c38c1cb0dc996' ) pkgver() { cd $_reponame git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { cd $_reponame git config submodule.core/deps/VulkanMemoryAllocator.url ../VulkanMemoryAllocator git -c protocol.file.allow=always submodule update patch -Np1 < ../unbundle-libs.patch rm -r core/deps/libretro-common/include/libchdr } build() { cmake -S $_reponame -B build \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_INSTALL_BINDIR=lib/libretro \ -DCMAKE_INSTALL_PREFIX=/usr \ -DLIBRETRO=ON \ -Wno-dev cmake --build build } package() { depends+=( 'libchdr.so' 'libGL.so' 'libminiupnpc.so' 'libxxhash.so' 'libzip.so' ) # shellcheck disable=SC2154 DESTDIR="$pkgdir" cmake --install build }