summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 51abf0ea12f9c2de2e8a833e373b86bb8b29dd14 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Maintainer: Gustavo Alvarez Lopez <sl1pkn07@gmail.com>

pkgname=np2kai-git
pkgver=0.86.rev.22.145.g606fafa
pkgrel=1
pkgdesc="Neko Project II Kai, a PC-9801 emulator. (GIT version)"
arch=('x86_64')
url='http://domisan.sakura.ne.jp/article/np2kai/np2kai.html'
license=('MIT')
depends=('gtk2'
         'sdl2_mixer'
         'sdl2_ttf'
         )
makedepends=('cmake'
             'nasm'
             )
conflicts=('np2kai')
provides=('np2kai')
source=('git+https://github.com/AZO234/NP2kai.git'
        'git+https://github.com/aminosbh/sdl2-cmake-modules.git'
        )
sha256sums=('SKIP'
            'SKIP'
            )
options=('debug')

pkgver() {
  cd NP2kai
  _ver="$(cat np2ver.h | grep -m1 NP2VER_CORE | cut -d ' ' -f2,3 | cut -d '"' -f1)"
  echo "${_ver}.$(git describe --long --tags | tr - .)"
}

prepare() {
  cd NP2kai
    git config submodule.cmake/sdl2-cmake-modules.url "${srcdir}/sdl2-cmake-modules"
    git -c protocol.file.allow=always submodule update --init \
      cmake/sdl2-cmake-modules
}

build() {
  cd NP2kai

  cmake -S . -B build \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_MANDIR=/usr/share/man/man1 \
    -DBUILD_X=ON \
    -DBUILD_SDL=ON \
    -DBUILD_I286=ON \
    -DBUILD_HAXM=ON \
    -DUSE_X=ON \
    -DUSE_HAXM=OFF \
    -DUSE_SDL=OFF \
    -DUSE_SDL_MIXER=ON \
    -DUSE_SDL_TTF=ON \
    -DUSE_ASYNCCPU=ON \
    -DUSE_VST3SDK=OFF

  cmake --build build
}

package() {
  cd NP2kai
  DESTDIR="${pkgdir}" cmake --install build

  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}