summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7ead8d0e49eff65af3ca15074db70a2fb5e765ea (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
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=rpcs3-git
pkgver=0.0.5.r381.f38f61d11
pkgrel=1
pkgdesc='A Sony PlayStation 3 emulator'
arch=('x86_64')
url='https://github.com/RPCS3/rpcs3'
license=('GPL2')
depends=('alsa-lib' 'gcc-libs' 'glew' 'glibc' 'glu' 'libevdev' 'libgl' 'libice'
         'libpng' 'libpulse' 'libsm' 'libx11' 'libxext' 'llvm' 'openal'
         'qt5-base' 'qt5-declarative' 'vulkan-icd-loader' 'yaml-cpp' 'zlib'
         'libavcodec.so' 'libavformat.so' 'libavutil.so' 'libncursesw.so'
         'libswscale.so' 'libudev.so')
makedepends=('boost' 'cereal' 'cmake' 'ffmpeg' 'git'
             'vulkan-validation-layers')
provides=('rpcs3')
conflicts=('rpcs3')
options=('!emptydirs')
source=('git+https://github.com/RPCS3/rpcs3.git'
        'rpcs3-common::git+https://github.com/RPCS3/common.git'
        'rpcs3-hidapi::git+https://github.com/RPCS3/hidapi.git'
#        'rpcs3-llvm::git+https://github.com/RPCS3/llvm.git'
        'git+https://github.com/kobalicek/asmjit.git'
        'git+https://github.com/Microsoft/GSL.git'
        'git+https://github.com/KhronosGroup/glslang.git'
        'git+https://github.com/akrzemi1/Optional.git'
        'git+https://github.com/zeux/pugixml.git'
        'git+https://github.com/Cyan4973/xxHash.git')
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

pkgver() {
  cd rpcs3

  echo "$(git describe --tags | sed 's/^v//; s/-/.r/; s/-g/./')"
}

prepare() {
  pushd rpcs3

  git submodule init 3rdparty/{GSL,hidapi,Optional,pugixml,xxHash} asmjit Vulkan/glslang
  git config submodule.asmjit.url ../asmjit
  git config submodule.glslang.url ../glslang
  git config submodule.GSL.url ../GSL
  git config submodule.hidapi.url ../rpcs3-hidapi
  #git config submodule.llvm.url ../rpcs3-llvm
  git config submodule.Optional.url ../Optional
  git config submodule.pugixml.url ../pugixml
  git config submodule.xxHash ../xxHash
  git submodule update 3rdparty/{GSL,hidapi,Optional,pugixml,xxHash} asmjit Vulkan/glslang

  mkdir llvmlibs

  popd

  if [[ -d build ]]; then
    rm -rf build
  fi
  mkdir build
}

build() {
  cd build

  cmake ../rpcs3 \
    -DCMAKE_BUILD_TYPE='Release' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DCMAKE_EXE_LINKER_FLAGS='-ldl -lyaml-cpp' \
    -DCMAKE_SKIP_RPATH='ON' \
    -DUSE_SYSTEM_FFMPEG='ON' \
    -DUSE_SYSTEM_LIBPNG='ON' \
    -DBUILD_XXHSUM='OFF'
  make
}

package() {
  make DESTDIR="${pkgdir}" -C build install
}

# vim: ts=2 sw=2 et: