summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f7a8d9cc0c948df50b3cbacc41d90bd15be7f4ac (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
68
69
70
71
72
73
74
75
76
# Maintainer: Fabio 'Lolix' Loli <lolix@disroot.org> -> https://github.com/FabioLolix
# Contributor: Michael DeGuzis <mdeguzis@gmail.com>

pkgname=play-emu
pkgver=0.69
pkgrel=1
pkgdesc="Play! is an experimental Playstation 2 emulator."
arch=(x86_64)
url="https://purei.org/"
license=(MIT)
depends=(qt6-base openal glew

         # namcap implicit depends
         hicolor-icon-theme sqlite libglvnd bzip2 curl openssl libevdev glibc icu zlib)
makedepends=(git cmake ninja nlohmann-json vulkan-icd-loader)
optdepends=('vulkan-driver: packaged vulkan driver')
source=("${pkgname%-git}::git+https://github.com/jpd002/Play-.git#tag=${pkgver}"
        "git+https://github.com/jpd002/Play-Dependencies.git"
        "git+https://github.com/jpd002/Play--Framework.git"
        "git+https://github.com/jpd002/Play--CodeGen.git"
        "git+https://github.com/jpd002/Nuanceur.git"
        "play-emu-libchdr::git+https://github.com/jpd002/libchdr.git"
        "git+https://github.com/jpd002/AltKit.git"
        "git+https://github.com/rs/SDWebImage.git"
        "git+https://github.com/gulrak/filesystem.git"
        "git+https://github.com/facebook/zstd.git"
        "git+https://github.com/Cyan4973/xxHash.git")
sha256sums=('06bcb6928939e703364de09581b4634c31847bbb7782cb0dbfccab123b90125c'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

prepare () {
  cd "play-emu"
  git submodule init
  git config 'submodule.deps/Dependencies.url' "${srcdir}/Play-Dependencies"
  git config 'submodule.deps/Framework.url' "${srcdir}/Play--Framework"
  git config 'submodule.deps/CodeGen.url' "${srcdir}/Play--CodeGen"
  git config 'submodule.deps/Nuanceur.url' "${srcdir}/Nuanceur"
  git config 'submodule.deps/libchdr.url' "${srcdir}/play-emu-libchdr"
  git config 'submodule.deps/AltKit.url' "${srcdir}/AltKit"
  git -c protocol.file.allow=always submodule update

  cd deps/Dependencies
  git submodule init
  git config 'submodule.SDWebImage.url' "${srcdir}/SDWebImage"
  git config 'submodule.ghc_filesystem.url' "${srcdir}/filesystem"
  git config 'submodule.zstd.url' "${srcdir}/zstd"
  git config 'submodule.xxHash.url' "${srcdir}/xxHash"
  git -c protocol.file.allow=always submodule update
}

build() {
  local _flags=(
    -DWITH_SYSTEM_ZLIB=ON
  )

  cmake -B build -S "play-emu" -Wno-dev \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    "${_flags[@]}"

  cmake --build build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build
  install -D play-emu/License.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
}