summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 513cd6a490f2982f4d8578e09b53108b9f30cf19 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Maintainer: Daurnimator <quae@daurnimator.com>
# Contributor: Jens Staal <staal1978@gmail.com>

## Known issue: cmake uses absolute paths which result in binaries containing
## build root via __FILE__ macro

pkgname=('arcan'
         'arcan-acfgfs'
         'arcan-aclip'
         'arcan-aloadimage'
         'arcan-leddec'
         'arcan-ltui'
         'arcan-shmmon'
         'arcan-vrbridge')
pkgver=0.5.5
pkgrel=2
pkgdesc='Game Engine meets a Display Server meets a Multimedia Framework'
arch=('x86_64')
url='https://arcan-fe.com'
license=('GPL' 'LGPL' 'BSD')
makedepends=('cmake'
             'fuse3'
             'libvncserver'
             'lua51' # Doesn't compile against LuaJIT 2.1 due to deprecated ref API usage
             # TODO: vrbridge wants openhmd
             'ruby')
source=("$pkgname-$pkgver.tar.gz::https://github.com/letoram/arcan/archive/$pkgver.tar.gz")
sha256sums=('578ed860a99a02cf1cf963efac830eb8af08093e4322832b2be6554d8c922ff2')

build() {
  cd "$pkgbase-$pkgver"

  # Build docs
  ## Needs to happen before cmake runs
  ruby -C doc -Ku docgen.rb mangen

  # Build main library/application
  mkdir -p build
  env -C build cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DDISABLE_JIT=ON \
    -DLUA_INCLUDE_DIR=/usr/include/lua5.1 \
    -DDISTR_TAG=arch \
    -DENGINE_BUILDTAG="$pkgver" \
    -DDISABLE_HIJACK=OFF \
    -DVIDEO_PLATFORM=sdl \
    ../src
  make -C build

  # Build misc utils
  ## waybridge is disabled on VIDEO_PLATFORM=sdl
  ## leddec and ltui are missing install rules, so build with install RPATH
  for tool in acfgfs aclip aloadimage leddec ltui shmmon vrbridge; do
    mkdir -p "build-$tool"
    env -C "build-$tool" cmake \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DARCAN_SHMIF_INCLUDE_DIR=../src/shmif \
      -DARCAN_SHMIF_LIBRARY=../build/shmif/libarcan_shmif.so \
      -DARCAN_SHMIF_EXT_LIBRARY=../build/shmif/libarcan_shmif_ext.so \
      -DARCAN_TUI_INCLUDE_DIR=../src/shmif \
      -DARCAN_TUI_LIBRARY=../build/shmif/libarcan_tui.so \
      -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
      "../src/tools/$tool"
    make -C "build-$tool"
  done
}

package_arcan() {
  depends=('apr'
           'harfbuzz-icu'
           'libvncserver'
           'lua51'
           'openal'
           'sdl'
           'vlc')

  cd "$pkgbase-$pkgver"

  make -C build DESTDIR="$pkgdir" install
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

package_arcan-acfgfs() {
  pkgdesc='Arcan virtual filesystem for working with the format that durden (and others) provide over a domain socket'
  depends=('fuse3')

  cd "$pkgbase-$pkgver"

  make -C build-acfgfs DESTDIR="$pkgdir" install
}

package_arcan-aclip() {
  pkgdesc='Arcan clipboard integration, similarly to how "xclip" works for Xorg'
  depends=('arcan')

  cd "$pkgbase-$pkgver"

  make -C build-aclip DESTDIR="$pkgdir" install
}

package_arcan-aloadimage() {
  pkgdesc='Arcan sandboxed image loader, supporting multi-process privilege separation, playlists and so on - similar to xloadimage'
  depends=('arcan')

  cd "$pkgbase-$pkgver"

  make -C build-aloadimage DESTDIR="$pkgdir" install
}

package_arcan-shmmon() {
  pkgdesc='Simple shmif- debugging aid for Arcan'
  depends=('arcan')

  cd "$pkgbase-$pkgver"

  make -C build-shmmon DESTDIR="$pkgdir" install
}

package_arcan-vrbridge() {
  pkgdesc='Aggregates samples from VR related SDKs and binds into a single avatar in a way that integrates with the core engine VR path'
  depends=('arcan')

  cd "$pkgbase-$pkgver"

  make -C build-vrbridge DESTDIR="$pkgdir" install
}

package_arcan-leddec() {
  pkgdesc='A simple skeleton that can be used for interfacing with custom LED controllers using Arcan'
  depends=('arcan')

  cd "$pkgbase-$pkgver"

  install -Dm755 build-leddec/leddec "$pkgdir/usr/bin/arcan_leddec"
}

package_arcan-ltui() {
  pkgdesc='A patched version of the Lua interactive CLI that loads in the shmif-tui (text-user interfaces)'
  depends=('arcan')

  cd "$pkgbase-$pkgver"

  install -Dm755 build-ltui/ltui "$pkgdir/usr/bin/arcan_ltui"
}