summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 66dfb0c680f7d13a5c1a6774cc72677cebe9eff1 (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
46
47
48
49
50
# Maintainer: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

_pkgname='desmume'
pkgname="$_pkgname-git"
_pkgver='0.9.11'
_lastrelease='ccbf85ed42e4350af415d56b1465e83614c85ef8'
pkgver=0.9.11.r1463.eab1fb95
pkgrel=1
pkgdesc="Nintendo DS emulator"
arch=('x86_64')
url="https://desmume.org/"
license=('GPL2')
provides=('desmume')
conflicts=('desmume')
depends=('glib2' 'sdl2' 'zlib' 'libgl' 'openal' 'gtk3' 'libpcap' 'libpng')
makedepends=('meson' 'pkg-config' 'desktop-file-utils' 'git')
source=("$_pkgname::git+https://github.com/TASVideos/desmume.git")
sha512sums=('SKIP')

optdepends=('agg: to enable the HUD, requires --enable-hud at build time')

pkgver() {
  cd $_pkgname
  echo "$_pkgver.r$(git rev-list --count $_lastrelease..HEAD).$(git rev-parse --short HEAD)"
}

prepare(){
  cd $_pkgname

  meson setup build \
        $_pkgname/src/frontend/posix \
        --prefix=/usr \
        --buildtype=release \
        --optimization=2 \
        --strip \
        -Dc_args='-minline-all-stringops -D_FORTIFY_SOURCE=2' \
        -Db_pie=true \
        -Dopenal=true \
        -Dwifi=true
}

build() {
  cd $_pkgname
  ninja -C build
}

package() {
  cd $_pkgname/build
  DESTDIR="$pkgdir" meson install
}