summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 92a372b7cd1e305430ae33e2fe6fa0085454951d (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
# Maintainer: Stelios Tsampas <loathingkernel @at gmail .dot com>

pkgname=pcsxr-pgxp-git
pkgver=1.9.94.r1731.62467b86
pkgrel=2
pkgdesc='A Sony PlayStation (PSX) emulator based on the PCSX-df Project with Parallel/Precision Geometry Transform Pipeline'
arch=('x86_64')
url='https://ngemu.com/threads/pcsxr-pgxp.186369/'
license=('GPL')
depends=('ffmpeg' 'gtk3' 'libarchive' 'libcdio' 'libxv')
makedepends=('cmake' 'git' 'intltool' 'mesa' 'clang')
provides=('pcsxr' "${pkgname/%-git/}")
conflicts=('pcsxr' "${pkgname/%-git/}")
source=("${pkgname/%-git/}::git+https://github.com/iCatButler/pcsxr.git"
        'fix-pango.patch'
)
sha256sums=('SKIP'
            '91a34f3d7c9cd916afb4f14d5a15498c0d94637e792f6d3a31950204f50960c3'
)

pkgver() {
  cd "${pkgname/%-git/}"
  printf "1.9.94.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "${pkgname/%-git/}"
  if [[ -d build ]]; then
    rm -rf build
  fi
  mkdir build
  patch -p1 -i "$srcdir"/fix-pango.patch
}

build() {
  cd "${pkgname/%-git/}"/build

  export CC="clang -flto"
  export CXX="clang++ -flto"
  cmake .. \
    -DCMAKE_BUILD_TYPE='Release' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DCMAKE_INSTALL_LIBDIR='/usr/lib' \
    -DSND_BACKEND='sdl' \
    -DENABLE_CCDDA='ON' \
    -DUSE_LIBARCHIVE='ON' \
    -DUSE_LIBCDIO='ON'
  make
}

package() {
  cd "${pkgname/%-git/}"/build
  make DESTDIR="$pkgdir" install
}