-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrules
executable file
·158 lines (130 loc) · 5.18 KB
/
rules
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
#!/usr/bin/make -f
# debian/rules for the Debian mesa package
# Copyright © 2006 Thierry Reding <[email protected]>
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/dpkg/pkg-info.mk
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
ifeq (,$(filter $(DEB_HOST_ARCH), armhf sh3 sh4))
buildflags = \
$(shell DEB_CFLAGS_MAINT_APPEND=-Wall DEB_CXXFLAGS_MAINT_APPEND=-Wall dpkg-buildflags --export=configure)
else
ifneq (,$(filter $(DEB_HOST_ARCH), armhf))
# Workaround for a variant of LP: #725126
buildflags = \
$(shell DEB_CFLAGS_MAINT_APPEND="-Wall -fno-optimize-sibling-calls" DEB_CXXFLAGS_MAINT_APPEND="-Wall -fno-optimize-sibling-calls" dpkg-buildflags --export=configure)
else
# Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143
buildflags = \
$(shell DEB_CFLAGS_MAINT_APPEND="-Wall -O1" DEB_CXXFLAGS_MAINT_APPEND="-Wall -O1" dpkg-buildflags --export=configure)
endif
endif
VULKAN_DRIVERS = swrast
DRI_DRIVERS =
ifneq (,$(filter $(DEB_HOST_ARCH), armhf arm64))
GALLIUM_DRIVERS = kmsro, lima, panfrost, swrast
else
GALLIUM_DRIVERS = i915, swrast, iris
endif
EGL_PLATFORMS = x11,wayland
confflags_DIRECT_RENDERING = -Dglx-direct=true
confflags_GBM = -Dgbm=true
confflags_DRI3 = -Ddri3=enabled
confflags_EGL = -Dplatforms="$(EGL_PLATFORMS)"
confflags_GALLIUM += -Dgallium-xa=false -Dllvm=enabled -Dgallium-vdpau=disabled -Dlmsensors=enabled -Dgallium-va=disabled -Dgallium-drivers="$(GALLIUM_DRIVERS)" -Dgallium-opencl=icd -Dgallium-nine=false
confflags_GLES = -Dgles1=disabled -Dgles2=enabled
confflags_OSMESA = -Dosmesa=true
confflags_VULKAN = -Dvulkan-device-select-layer=true -Dvulkan-overlay-layer=true
confflags_VALGRIND += -Dvalgrind=enabled
confflags += \
-Ddri-drivers="$(DRI_DRIVERS)" \
-Ddri-drivers-path=/usr/lib/$(DEB_HOST_MULTIARCH)/dri \
-Ddri-search-path='/usr/lib/$(DEB_HOST_MULTIARCH)/dri:\$$$${ORIGIN}/dri:/usr/lib/dri' \
-Dvulkan-drivers="$(VULKAN_DRIVERS)" \
-Dglvnd=true \
-Dshared-glapi=enabled \
-Dgallium-xvmc=disabled \
-Dgallium-omx=disabled \
-Db_ndebug=true \
$(confflags_DIRECT_RENDERING) \
$(confflags_GBM) \
$(confflags_DRI3) \
$(confflags_EGL) \
$(confflags_GALLIUM) \
$(confflags_GLES) \
$(confflags_OSMESA) \
$(confflags_VALGRIND) \
$(confflags_VULKAN)
override_dh_clean:
rm -rf .pc
rm -rf build
rm -rf configure bin/config.guess bin/config.sub config.h.in
rm -rf $$(find -name Makefile.in)
rm -rf bin/install-sh bin/ltmain.sh
for file in debian/*.in; do rm -f $${file%%.in}; done
rm -rf src/amd/compiler/__pycache__/ src/amd/registers/__pycache__
rm -rf src/amd/vulkan/*.pyc src/amd/vulkan/__pycache__/
rm -rf src/compiler/nir/*.pyc src/compiler/nir/__pycache__/
rm -rf src/egl/generate/*.pyc src/egl/generate/__pycache__/
rm -rf src/gallium/auxiliary/util/*.pyc src/gallium/auxiliary/util/__pycache__/
rm -rf src/intel/vulkan/*.pyc src/intel/vulkan/__pycache__/
rm -rf src/mapi/glapi/gen/*.pyc src/mapi/glapi/gen/__pycache__/ src/mapi/new/__pycache__/
rm -rf src/mesa/main/*.pyc src/mesa/main/__pycache__/
dh_clean
override_dh_auto_configure:
$(buildflags) dh_auto_configure -- \
$(confflags)
override_dh_auto_install:
dh_auto_install
for file in debian/*.in; \
do \
sed -e"s,\$${DEB_HOST_MULTIARCH},$(DEB_HOST_MULTIARCH),g" \
$${file} > $${file%%.in}; \
done
override_dh_auto_test:
allpkg = $(shell dh_listpackages -a)
override_dh_installchangelogs:
dh_installchangelogs -a
dh_installchangelogs -pmesa-common-dev
override_dh_install:
# purge .la files
find debian/tmp/ -name '*.la' -exec rm '{}' ';'
# Get rid of some files which aren't installed. Do not
# use -f to ensure we notice disappearing files:
rm debian/tmp/usr/lib/*/libglapi.so
rm debian/tmp/usr/lib/*/libEGL_mesa.so
rm debian/tmp/usr/lib/*/libGLX_mesa.so
# Copy the hardlinked *_dri.so correctly.
install -m755 -d debian/libgl1-mesa-dri/usr/lib/${DEB_HOST_MULTIARCH}/dri/
mv debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/dri/*_dri.so \
debian/libgl1-mesa-dri/usr/lib/${DEB_HOST_MULTIARCH}/dri/
ifneq ($(DEB_HOST_ARCH_OS), hurd)
# Copy the hardlinked vdpau drivers correctly.
install -m755 -d debian/mesa-vdpau-drivers/usr/lib/${DEB_HOST_MULTIARCH}/vdpau/
ifeq (,$(filter pkg.mesa.nolibva,$(DEB_BUILD_PROFILES)))
# Copy the hardlinked va drivers correctly.
install -m755 -d debian/mesa-va-drivers/usr/lib/${DEB_HOST_MULTIARCH}/dri/
endif
endif
dh_install -a
# Install bug control and script:
set -e; for p in $(allpkg); do \
install -d debian/$$p/usr/share/bug/$$p && \
install -m 644 debian/local/control debian/$$p/usr/share/bug/$$p && \
install -m 755 debian/local/script debian/$$p/usr/share/bug/$$p; \
done
override_dh_missing:
dh_missing --fail-missing
override_dh_makeshlibs:
dh_makeshlibs -a -- -c4
%:
dh $@ --with quilt \
--builddirectory=build/ \
--buildsystem=meson
# For maintainer use only, generate a tarball:
gentarball:
git archive --format=tar upstream-experimental --prefix=$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/ \
| gzip -9 > ../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz