summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 74fe5059d917b8a7b3ced87aed09adcc62fd0c48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: Alexandre Bouvier <contact@amb.tf>
# Contributor: Oliver Jaksch <arch-aur at com-in dot de>
_pkgname=libretro-neocd
pkgname=$_pkgname-git
pkgver=r145.2070f52
pkgrel=1
pkgdesc="SNK Neo Geo CD core"
arch=('aarch64' 'armv7h' 'i486' 'i686' 'pentium4' 'x86_64')
url="https://github.com/libretro/neocd_libretro"
license=('LGPL3')
groups=('libretro')
depends=('gcc-libs' 'glibc' 'libretro-core-info' 'zlib')
makedepends=('git' 'libchdr' 'libvorbis')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=(
	"$_pkgname::git+$url.git"
	'unbundle-libs.patch'
)
b2sums=(
	'SKIP'
	'de8c8053444f1dff288ee28f2e28eeee99900b5e90d03598f8b4ebf993707ee27c65ca7b8854abcac06ab356987b90586de9277d774a3557b0641fe995fe036c'
)

pkgver() {
	cd $_pkgname
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd $_pkgname
	mv deps/{libchdr/include/dr_libs,}
	patch -Np1 < ../unbundle-libs.patch
	sed -i 's/-Ofast//' Makefile
}

build() {
	make -C $_pkgname
}

package() {
	depends+=('libchdr.so' 'libvorbisfile.so')
	# shellcheck disable=SC2154
	install -D -t "$pkgdir"/usr/lib/libretro $_pkgname/neocd_libretro.so
}