-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
182 lines (151 loc) · 6.41 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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# $Id: PKGBUILD 59539 2011-11-27 22:55:28Z lcarlier $
# Contributor: Jan de Groot <[email protected]>
# Contributor: Andreas Radke <[email protected]>
# Maintainer: Solomon Choina <[email protected]>
pkgbase=lib32-mesa-git
pkgname=('lib32-vulkan-mesa-layers-git' 'lib32-vulkan-intel-git' 'lib32-vulkan-radeon-git' 'lib32-mesa-git')
pkgdesc="mesa trunk (32-bit) (git version)"
epoch=1
pkgver=23.3.0_devel.177608.cb1c88d41f6
pkgrel=1
groups=('chaotic-mesa-git')
arch=('x86_64')
LLVM32_VERSION=$(pacman -Si lib32-llvm-libs | grep -Po '^Version +: ([^-]+)' | awk '{print $3}')
makedepends=('python-mako' 'lib32-libxml2' 'lib32-expat' 'lib32-libx11' 'lib32-libdrm' 'xorgproto'
'lib32-libxrandr' 'lib32-libxshmfence' 'lib32-libxxf86vm' 'lib32-libxdamage' 'gcc-multilib'
'lib32-libelf' 'lib32-llvm-git'
'lib32-systemd' 'lib32-libvdpau' 'lib32-libva' 'lib32-wayland' 'wayland-protocols' 'lib32-libglvnd'
'lib32-lm_sensors' 'lib32-clang-git'
'meson' 'glslang' 'valgrind' 'lib32-vulkan-icd-loader' 'lib32-libelf'
'lib32-zstd' 'git')
url="http://mesa3d.sourceforge.net"
license=('custom')
source=('mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git'
'llvm32.native'
'LICENSE')
sha256sums=('SKIP'
'3ea259740141b862e152e07c58f05cad539680541dc181a7233be0c93414e6fb'
'7fdc119cf53c8ca65396ea73f6d10af641ba41ea1dd2bd44a824726e01c8b3f2')
pkgver() {
cd ${srcdir}/mesa
read -r _ver <VERSION
echo ${_ver/-/_}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
build() {
export CC="gcc -m32"
export CXX="g++ -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
arch-meson mesa build \
--native-file llvm32.native \
--libdir=/usr/lib32 \
-D b_lto=false \
-D cpp_std=c++17 \
-D b_ndebug=true \
-D platforms=x11,wayland \
-D gallium-drivers=r300,r600,radeonsi,nouveau,iris,zink,virgl,svga,swrast,i915,crocus,asahi,panfrost,kmsro,lima \
-D vulkan-drivers=amd,intel,intel_hasvk \
-D vulkan-layers=device-select,intel-nullhw,overlay \
-D dri3=true \
-D egl=enabled \
-D gallium-extra-hud=true \
-D gallium-nine=true \
-D gallium-omx=disabled \
-D gallium-opencl=disabled \
-D gallium-va=enabled \
-D gallium-vdpau=enabled \
-D gallium-xa=true \
-D gbm=enabled \
-D gles1=disabled \
-D gles2=enabled \
-D glvnd=true \
-D glx=dri \
-D libunwind=disabled \
-D llvm=enabled \
-D lmsensors=enabled \
-D osmesa=true \
-D shared-glapi=enabled \
-D microsoft-clc=disabled \
-D valgrind=enabled \
-D zstd=true \
-D android-libbacktrace=disabled \
-D video-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc
# Print config
meson configure build
ninja -C build
# fake installation to be seperated into packages
# outside of fakeroot but mesa doesn't need to chown/mod
DESTDIR="${srcdir}/fakeinstall" ninja -C build install
}
_install() {
local src f dir
for src; do
f="${src#fakeinstall/}"
dir="${pkgdir}/${f%/*}"
install -m755 -d "${dir}"
mv -v "${src}" "${dir}/"
done
}
package_lib32-vulkan-mesa-layers-git() {
pkgdesc="Mesa's Vulkan overlay layers (32-bit) (git version)"
depends=('vulkan-mesa-layers-git')
conflicts=('lib32-vulkan-mesa-layer-git')
replaces=('lib32-vulkan-mesa-layer-git')
rm -rv fakeinstall/usr/share/vulkan/explicit_layer.d
rm -rv fakeinstall/usr/share/vulkan/implicit_layer.d
_install fakeinstall/usr/lib32/libVkLayer_*.so
rm -rv fakeinstall/usr/bin/mesa-overlay-control.py
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}
package_lib32-vulkan-intel-git() {
pkgdesc="Intel's Vulkan mesa driver (32-bit) (git version)"
depends=('vulkan-intel-git' 'lib32-gcc-libs' 'lib32-libgcrypt' 'lib32-wayland'
'lib32-libx11' 'lib32-libxshmfence')
optdepends=('lib32-vulkan-mesa-layer-git: a vulkan layer to display information using an overlay')
provides=('lib32-vulkan-intel' 'lib32-vulkan-driver')
conflicts=('lib32-vulkan-intel')
_install fakeinstall/usr/share/vulkan/icd.d/intel_icd*.json
_install fakeinstall/usr/lib32/libvulkan_intel.so
_install fakeinstall/usr/lib32/libvulkan_intel_hasvk.so
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}
package_lib32-vulkan-radeon-git() {
pkgdesc="Radeon's Vulkan mesa driver (32-bit) (git version)"
depends=('vulkan-radeon-git' 'lib32-libgcrypt' 'lib32-wayland' 'lib32-libx11'
'lib32-llvm-libs-git' 'lib32-libdrm' 'lib32-libelf' 'lib32-libxshmfence')
optdepends=('lib32-vulkan-mesa-layer-git: a vulkan layer to display information using an overlay')
provides=('lib32-vulkan-radeon' 'lib32-vulkan-driver')
conflicts=('lib32-vulkan-radeon')
_install fakeinstall/usr/share/vulkan/icd.d/radeon_icd*.json
_install fakeinstall/usr/lib32/libvulkan_radeon.so
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}
package_lib32-mesa-git() {
pkgdesc="an open-source implementation of the OpenGL specification (32-bit) (git version)"
depends=('lib32-libdrm' 'lib32-libxxf86vm' 'lib32-libxdamage' 'lib32-systemd' 'lib32-libelf' 'lib32-libxshmfence' 'lib32-llvm-libs-git'
'lib32-wayland' 'lib32-lm_sensors' 'lib32-libglvnd' 'mesa-git')
optdepends=('opengl-man-pages: for the OpenGL API man pages')
provides=('lib32-mesa' 'lib32-libva-mesa-driver' 'lib32-mesa-vdpau' 'lib32-mesa-libgl' 'lib32-opengl-driver')
conflicts=('lib32-mesa' 'lib32-libva-mesa-driver' 'lib32-mesa-vdpau' 'lib32-mesa-libgl')
# lib32-libva-mesa-driver
_install fakeinstall/usr/lib32/dri/*_drv_video.so
# lib32-mesa-vdpau
_install fakeinstall/usr/lib32/vdpau
# ati-dri, nouveau-dri, intel-dri, svga-dri, swrast
_install fakeinstall/usr/lib32/dri/*_dri.so
_install fakeinstall/usr/lib32/d3d
_install fakeinstall/usr/lib32/lib{gbm,glapi}.so*
_install fakeinstall/usr/lib32/libOSMesa.so*
_install fakeinstall/usr/lib32/libxatracker.so*
_install fakeinstall/usr/lib32/pkgconfig
# libglvnd support
_install fakeinstall/usr/lib32/libGLX_mesa.so*
_install fakeinstall/usr/lib32/libEGL_mesa.so*
# indirect rendering
ln -s /usr/lib32/libGLX_mesa.so.0 "${pkgdir}/usr/lib32/libGLX_indirect.so.0"
rm -rv fakeinstall/usr/share/drirc.d
rm -rv fakeinstall/usr/include
rm -rv fakeinstall/usr/share
# make sure there are no files left to install
find fakeinstall -depth -print0 | xargs -0 rmdir
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}