-
Notifications
You must be signed in to change notification settings - Fork 2
/
PKGBUILD
82 lines (69 loc) · 2.84 KB
/
PKGBUILD
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
_pkgbase=imgoverlay
pkgbase=${_pkgbase}-git
pkgname=('imgoverlay-git' 'lib32-imgoverlay-git' 'imgoverlay-common-git')
pkgver=0.7.r3.gd31fd87
pkgrel=1
_vulkan_ver=1.2.142
url='https://github.com/nowrep/imgoverlay'
license=('MIT')
arch=('x86_64')
depends=('glslang' 'lib32-vulkan-icd-loader' 'vulkan-icd-loader' 'qt5-webengine')
makedepends=('gcc' 'meson' 'python' 'libx11' 'lib32-libx11' 'git' 'vulkan-headers')
source=(
"$_pkgbase::git+$url"
"crossfile.ini"
"Vulkan-Headers-${_vulkan_ver}.tar.gz::https://github.com/KhronosGroup/Vulkan-Headers/archive/v${_vulkan_ver}.tar.gz"
"https://wrapdb.mesonbuild.com/v2/vulkan-headers_${_vulkan_ver}-1/get_patch#/vulkan-headers-${_vulkan_ver}-1-wrap.zip"
)
sha512sums=(
'SKIP'
'42e64d292ce0cc1029ae6619fd47795b48d8bd10147be40844852ce37137c75fe596b520b8609ee6a25b7c8904f415581d5a1daf6835deb98f4af71bcf3a940d'
'f131b23cb270bfcd2cb0e69f21bfcbdbfa816692eabb371b2649315dd4309279e5a52fd9700e4291ff0985d25e49b253396ee2d4607e2cd90b96a693e97057e7'
'9c9c05a278f0675b1f3259645720088c82e017b095fdfb4498dbcf64bd019a3683f8f210a7ecc1f61526339aaa77730408eec26576f4bc8d2afd77f8bfc1539d'
)
pkgver() {
cd "$_pkgbase"
git describe --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}
prepare() {
cd "$srcdir/imgoverlay"
ln -sfv \
"$srcdir/vulkan-headers-${_vulkan_ver}-1-wrap.zip" \
"$srcdir/Vulkan-Headers-${_vulkan_ver}" \
subprojects/
}
build() {
arch-meson "$_pkgbase" build64 \
--libdir lib/imgoverlay/lib64 \
--prefix /usr \
-Dappend_libdir_imgoverlay=false
ninja -C build64
export CFLAGS="-m32 ${CFLAGS}"
export CXXFLAGS="-m32 ${CXXFLAGS}"
export LDFLAGS="-m32 ${LDFLAGS}"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig:${PKG_CONFIG_PATH_32}"
arch-meson "$_pkgbase" build32 \
--cross-file crossfile.ini \
--libdir lib/imgoverlay/lib32 \
--prefix /usr \
-Dappend_libdir_imgoverlay=false \
-Dbuild_client=false
ninja -C build32
}
package_imgoverlay-git() {
pkgdesc=' A Vulkan and OpenGL overlay rendering images from shared memory'
conflicts=('imgoverlay')
DESTDIR="$pkgdir" ninja -C build64 install
}
package_lib32-imgoverlay-git() {
pkgdesc=' A Vulkan and OpenGL overlay rendering images from shared memory (32-bit)'
conflicts=('lib32-imgoverlay')
DESTDIR="$pkgdir" ninja -C build32 install
}
package_imgoverlay-common-git() {
pkgdesc='A Vulkan and OpenGL overlay rendering images from shared memory'
conflicts=('imgoverlay-common')
install -Dm664 "$_pkgbase/bin/imgoverlay.conf" "$pkgdir/usr/share/doc/imgoverlay/imgoverlay.conf.example"
install -Dm664 "$_pkgbase/bin/imgoverlayclient.conf" "$pkgdir/usr/share/doc/imgoverlay/imgoverlayclient.conf.example"
install -Dm664 "$_pkgbase/LICENSE" "$pkgdir/usr/share/licenses/$_pkgbase/LICENSE"
}