# Maintainer: Gustavo Alvarez Lopez 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" }