# Contributor: David Demelier <markand@malikania.fr>
# Maintainer: David Demelier <markand@malikania.fr>
pkgname=libretro-neocd
pkgver=0_git20220325
pkgrel=1
_commit="327aeceecdf71c8a0c0af3d6dc53686c94fe44ad"
pkgdesc="libretro core for neocd"
url="https://github.com/libretro/neocd_libretro"
arch="all"
license="LGPL-3.0-only"
makedepends="minizip-dev libogg-dev libvorbis-dev zlib-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/libretro/neocd_libretro/archive/$_commit.tar.gz
	patch-unbundle.patch
	fix-build-error.patch"
builddir="$srcdir/neocd_libretro-$_commit"
options="!check" # No tests

build() {
	rm -rf deps/libogg deps/libvorbis deps/libchdr/deps/zlib*
	make -j1
}

package() {
	install -Dm644 neocd_libretro.so "$pkgdir"/usr/lib/libretro/neocd_libretro.so
}

sha512sums="
12c4a848aac6e5ea91deeec64e68e4f9c54181047c53322f0fc912100a61318e99b2939d33d0b94ef8c4bad5dd537cadf875a1d8cc6c5e069b7b3cba1c49d573  libretro-neocd-327aeceecdf71c8a0c0af3d6dc53686c94fe44ad.tar.gz
bc689c7c686f917dbaff889ddef761a89d2f552ca0905f0c9c554e3d4c8117fc4a972a3dc1322699f0ff558db7a71b6206a383a34ca3739d8ca82a5c11d81da8  patch-unbundle.patch
12411b1fb8df42521b06677f5fbdcdaffbb5ccafebcf6c2fa6a8bf3e4e2eb91e4581469a23f0777b351fb80f8eb3855900d9eead681607f8ee97539b77e14616  fix-build-error.patch
"
