summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9b82ab8187d28bd2614469b94567a5c2aceacfb9 (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
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=rpcs3-git
pkgver=0.0.3.r510.c1f08ce58
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' 'libpng'
         'libx11' 'openal' 'qt5-base' 'vulkan-icd-loader' 'yaml-cpp' 'zlib'
         'libavcodec.so' 'libavformat.so' 'libavutil.so' 'libncursesw.so'
         'libswresample.so' 'libswscale.so' 'libudev.so')
makedepends=('boost' 'cereal' 'cmake' 'git')
provides=('rpcs3')
conflicts=('rpcs3')
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#commit=ca39ce8'
        'rpcs3-pugixml::git+https://github.com/RPCS3/pugixml.git#commit=f205aaf'
        'git+https://github.com/kobalicek/asmjit.git#commit=1370fe6'
        'git+https://github.com/Microsoft/GSL.git#commit=fc5fce4'
        'git+https://github.com/KhronosGroup/glslang.git#commit=cf571f7'
        'git+https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.git#commit=85926a3'
        'git+https://github.com/akrzemi1/Optional.git#commit=f27e790')
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} asmjit Vulkan/{glslang,Vulkan-LoaderAndValidationLayers}
  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.Optional.url ../Optional
  git config submodule.pugixml.url ../rpcs3-pugixml
  git config submodule.Vulkan-LoaderAndValidationLayers ../Vulkan-LoaderAndValidationLayers
  git submodule update 3rdparty/{GSL,hidapi,Optional,pugixml} asmjit Vulkan/{glslang,Vulkan-LoaderAndValidationLayers}

  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'
  make
}

package() {
  cd build

  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et: