summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 89d63732276cc64bb3fcb8c23698fbe1d833a28b (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
# Maintainer:
# Contributor: Jason Stryker <inbox at jasonstryker dot com>
# Contributor: AdriƠ Cereto i MassaguƩ <ssorgatem at gmail.com>

_pkgname="gallium-nine"
pkgname="$_pkgname-git"
pkgver=0.9.r8.g95e0da4
pkgrel=1
pkgdesc="Gallium Nine Standalone"
url="https://github.com/iXit/wine-nine-standalone"
license=('LGPL-2.1-or-later')
arch=('x86_64')

makedepends=(
  'git'
  'lib32-mesa'
  'meson'
  'wine'
)

provides=(
  "$_pkgname=${pkgver%%.r*}"
  "wine-nine=${pkgver%%.r*}"
)
conflicts=(
  "$_pkgname"
  "wine-nine"
)

_pkgsrc="ixit.gallium-nine"
source=("$_pkgsrc"::"git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgsrc"
  git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$_pkgsrc"

  ./bootstrap.sh --distro arch

  meson \
    --cross-file "tools/cross-wine64" \
    --buildtype "release" \
    --prefix "/" \
    --bindir bin \
    --libdir lib \
    "build64"

  ninja -C "build64"
  DESTDIR="$srcdir/fakeinstall" ninja -C build64 install

  meson \
    --cross-file "tools/cross-wine32" \
    --buildtype "release" \
    --prefix "/" \
    --bindir bin32 \
    --libdir lib32 \
    "build32"

  ninja -C "build32"
  DESTDIR="$srcdir/fakeinstall" ninja -C build32 install
}

package() {
  depends=('lib32-mesa' 'wine')

  install -m 755 -d "${pkgdir}"/usr/lib{,32}/wine/{x86_64-{unix,windows},i386-{unix,windows}}

  install -m 755 "${srcdir}/fakeinstall"/bin/ninewinecfg.exe.so "${pkgdir}"/usr/lib/wine/x86_64-unix/ninewinecfg.exe.so
  install -m 755 "${srcdir}/fakeinstall"/bin/ninewinecfg.exe.fake "${pkgdir}"/usr/lib/wine/x86_64-windows/ninewinecfg.exe

  install -m 755 "${srcdir}/fakeinstall"/bin32/ninewinecfg.exe.so "${pkgdir}"/usr/lib32/wine/i386-unix/ninewinecfg.exe.so
  install -m 755 "${srcdir}/fakeinstall"/bin32/ninewinecfg.exe.fake "${pkgdir}"/usr/lib32/wine/i386-windows/ninewinecfg.exe

  install -m 755 "${srcdir}/fakeinstall"/lib/d3d9-nine.dll.so "${pkgdir}"/usr/lib/wine/x86_64-unix/d3d9-nine.dll.so
  install -m 755 "${srcdir}/fakeinstall"/lib/d3d9-nine.dll.fake "${pkgdir}"/usr/lib/wine/x86_64-windows/d3d9-nine.dll

  install -m 755 "${srcdir}/fakeinstall"/lib32/d3d9-nine.dll.so "${pkgdir}"/usr/lib32/wine/i386-unix/d3d9-nine.dll.so
  install -m 755 "${srcdir}/fakeinstall"/lib32/d3d9-nine.dll.fake "${pkgdir}"/usr/lib32/wine/i386-windows/d3d9-nine.dll
}