Package vulkan: Specfile

  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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
Name: vulkan
Version: 1.3.277
Release: alt0.p10.1
Summary: Khronos group Vulkan API SDK

Group: System/Libraries
License: Apache-2.0
Url: http://www.khronos.org/

# https://github.com/KhronosGroup/Vulkan-Loader
Source0: vulkan-loader.tar
# https://github.com/KhronosGroup/Vulkan-Tools
Source1: vulkan-tools.tar
# https://github.com/KhronosGroup/Vulkan-ValidationLayers
Source2: vulkan-layers.tar

BuildRequires: bison chrpath
BuildRequires(pre): cmake gcc-c++
BuildRequires: libImageMagick-devel libpciaccess-devel libsystemd-devel
BuildRequires: python3-devel libxcb-devel libXau-devel libXdmcp-devel libX11-devel libXrandr-devel
BuildRequires: wayland-devel libwayland-server-devel libwayland-client-devel libwayland-cursor-devel libwayland-egl-devel
# strict requires due internal dependency
BuildRequires: vulkan-headers = %version
BuildRequires: vulkan-registry = %version
BuildRequires: glslang-devel = 14.0.0
BuildRequires: libspirv-tools-devel >= 2023.6
BuildRequires: spirv-headers >= 1.5.5-alt11
# -layers need it
BuildRequires: vulkan-utility-libraries-devel = %version librobin-hood-hashing-devel
# -tools need it
BuildRequires: wayland-protocols vulkan-volk-devel >= 1.3.275

# textrel due asm optimisation in loader code
%ifarch i586
%set_verify_elf_method textrel=relaxed
%endif

%description
Vulkan is a new generation graphics and compute API that provides
high-efficiency, cross-platform access to modern GPUs used in a wide
variety of devices from PCs and consoles to mobile phones and embedded
platforms.

This package contains the reference ICD loader and API validation layer for
Vulkan.

%package -n lib%{name}1
Summary: Vulkan loader libraries
Group: System/Libraries
Requires: vulkan-filesystem = %EVR
Provides: %name = %EVR
Obsoletes: %name

%description -n lib%{name}1
Vulkan is a new generation graphics and compute API that provides
high-efficiency, cross-platform access to modern GPUs used in a wide
variety of devices from PCs and consoles to mobile phones and embedded
platforms.

This package contains the reference ICD loader for Vulkan.

%package validation-layers
Summary: Vulkan API validation layers
Group: Development/C++
Requires: lib%{name}1 = %version-%release

%description validation-layers
Vulkan API validation layer for developers.

%package -n lib%name-devel
Summary: Vulkan development package
Group: Development/C++
Requires: lib%{name}1 = %EVR, %{name}-headers = %version, %{name}-registry = %version
Provides: %name-devel = %EVR
Obsoletes: %name-devel

%description -n lib%name-devel
Development headers for Vulkan applications.

%package filesystem
Summary: Vulkan filesystem package
Group: System/Base
BuildArch: noarch

%description filesystem
Filesystem for Vulkan API.

%package tools
Summary: Vulkan tools and utilities
Group: System/X11
Requires: lib%{name}1 = %EVR
Obsoletes: %name-demos

%description tools
Tools and utilities that can assist development by enabling developers to
verify their applications correct use of the Vulkan API.

%prep
%setup -n %name-loader -b0 -b1 -b2
pushd ../vulkan-layers
# sigh inttypes
sed -i 's/inttypes.h/cinttypes/' layers/*.{cpp,h}
popd

%build
%add_optflags -pthread
for dir in loader layers; do
pushd %_builddir/vulkan-"$dir"
%cmake \
	   -DCMAKE_BUILD_TYPE=RelWithDebInfo \
	   -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
	   -DSPIRV_TOOLS_SEARCH_PATH=%_libdir \
	   -DSPIRV_TOOLS_OPT_SEARCH_PATH=%_libdir \
	   -DVULKAN_HEADERS_INSTALL_DIR=%_prefix \
	   -DGLSLANG_INSTALL_DIR=%_prefix \
	   -DSPIRV_HEADERS_INSTALL_DIR=%_prefix \
	   -DCMAKE_PREFIX_PATH=%buildroot%_datadir/cmake \
	   -DROBIN_HOOD_HASHING_INCLUDE_DIR=%_includedir
%cmake_build
%cmakeinstall_std
popd
done

# end finally -tools
pushd %_builddir/vulkan-tools
%cmake \
	   -DCMAKE_PREFIX_PATH=%buildroot%prefix \
	   -DGLSLANG_INSTALL_DIR=%_prefix
%cmake_build
%cmakeinstall_std
popd

%install
# do it again
for dir in layers loader tools; do
pushd %_builddir/vulkan-"$dir"
%cmakeinstall_std
popd
done
mkdir -p %buildroot%_sysconfdir/vulkan/explicit_layer.d
mkdir -p %buildroot%_datadir/vulkan/{explicit,implicit}_layer.d/ ||:
mkdir -p %buildroot%_datadir/vulkan/icd.d ||:

# remove RPATH
chrpath -d %buildroot%_bindir/{vulkaninfo,vkcubepp}

# remove static libs to make LTO checks happy
rm -rf %buildroot%_libdir/*.a ||:

%files tools
%_bindir/*

%files -n lib%{name}1
%doc README.md LICENSE.txt
%_libdir/libvulkan.so.1*

%files -n lib%name-devel
%_libdir/libvulkan.so
%_pkgconfigdir/vulkan.pc
%dir %_libdir/cmake/VulkanLoader
%_libdir/cmake/VulkanLoader/*.cmake

%files validation-layers
%_datadir/vulkan/explicit_layer.d/*.json
%_libdir/libVkLayer*.so

%files filesystem
%dir %_sysconfdir/vulkan
%dir %_sysconfdir/vulkan/explicit_layer.d
%dir %_datadir/vulkan
%dir %_datadir/vulkan/icd.d
%dir %_datadir/vulkan/explicit_layer.d
%dir %_datadir/vulkan/implicit_layer.d

%changelog
* Mon Mar 11 2024 Sergey V Turchin <zerg@altlinux.org> 1.3.277-alt0.p10.1
- build for p10

* Thu Mar 07 2024 L.A. Kostis <lakostis@altlinux.ru> 1.3.277-alt1
- BR:
  + Bump version requires.
  + Added new libraries as result moving -headers/-registry
    to separate package.
  + tools: added volk.
- Updated to sdk-1.3.277:
  + vulkan-loader: Updated to 5102718a3.
  + vulkan-tools: Updated to 3af5fdabd.
  + vulkan-layers: Updated to 555a7ec8a.

* Thu Feb 29 2024 Sergey V Turchin <zerg@altlinux.org> 1.3.268-alt0.p10.1
- build for p10

* Mon Nov 13 2023 L.A. Kostis <lakostis@altlinux.ru> 1.3.268-alt1
- BR:
  + Bump version requires
  + Added new libraries as result of splitting -layers.
- Updated to sdk-1.3.268:
  + vulkan-utility-libraries: Updated to c9ca4ac62.
  + vulkan-layers: Updated to 3c64adb4e.
  + vulkan-tools: Updated to 1532001f7.
  + vulkan-loader: Updated to f4c838e2e.
  + vulkan-headers: Updated to 7b3466a1f.

* Wed Oct 04 2023 Nazarov Denis <nenderus@altlinux.org> 1.3.261.1-alt0.p10.1
- Build for branch p10

* Sun Sep 17 2023 L.A. Kostis <lakostis@altlinux.ru> 1.3.261.1-alt1
- Bump BR.
- Updated to sdk-1.3.261.1:
  + vulkan-tools: Updated to a7da7027c.
  + vulkan-loader: Updated to afdd025ea.
  + vulkan-layers: Updated to 628cd310b.
  + vulkan-headers: Updated to 85c2334e9.

* Wed Sep 06 2023 Nazarov Denis <nenderus@altlinux.org> 1.3.250-alt0.p10.1
- Build for branch p10
  
* Thu May 25 2023 L.A. Kostis <lakostis@altlinux.ru> 1.3.250-alt1
- Bump BR.
- Updated to sdk-1.3.250:
  + vulkan-layers: Updated to 658e97b6e.
  + vulkan-tools: Updated to 695887a99.
  + vulkan-loader: Updated to f372068d0.
  + vulkan-headers: Updated to 9e61870ec.

* Thu Mar 23 2023 L.A. Kostis <lakostis@altlinux.ru> 1.3.243-alt1
- Bump BR.
- Updated to sdk-1.3.243:
  + vulkan-layers: Updated to 81cb9ef1f.
  + vulkan-tools: Updated to f196c8d3c.
  + vulkan-loader: Updated to 22407d780.
  + vulkan-headers: Updated to 65ad768d8.
- .spec:
  + cleanup obsoleted macros.
  + make separate pkg for registry.

* Fri Mar 03 2023 L.A. Kostis <lakostis@altlinux.ru> 1.3.239-alt1
- Bump BR.
- Updated to sdk-1.3.239:
  + vulkan-layers: Updated to sdk-1.3.239.
  + vulkan-headers: Updated to v1.3.239.
  + vulkan-loader: Updated to v1.3.239.
  + vulkan-tools: Updated to v1.3.239.

* Fri Dec 16 2022 Sergey V Turchin <zerg@altlinux.org> 1.3.236-alt0.1
- fix link with pthreads
  
* Tue Dec 13 2022 L.A. Kostis <lakostis@altlinux.ru> 1.3.236-alt1
- Bump BR.
- .spec: remove WERROR flag (it's disabled by default now).
- Updated to sdk-1.3.236:
  + vulkan-tools: Updated to ce45337c5.
  + vulkan-loader: Updated to ba92c4cd8.
  + vulkan-layers: Updated to 4f5ce69d1.
  + vulkan-headers: Updated to b75e5a02b.

* Fri Dec 09 2022 Ivan A. Melnikov <iv@altlinux.org> 1.3.231-alt2.1
- NMU: spec: Fix nbsp in previous release to really disable Werror.

* Thu Dec 08 2022 L.A. Kostis <lakostis@altlinux.ru> 1.3.231-alt2
- Disable Werror (as upstream did in 91b97cf42b44a0f01545f719c2c015b00a34e5b2).

* Sun Oct 16 2022 Michael Shigorin <mike@altlinux.org> 1.3.231-alt1.1
- E2K: ftbfs workaround (ilyakurdyukov@; -Wno-error).

* Sat Oct 15 2022 L.A. Kostis <lakostis@altlinux.ru> 1.3.231-alt1
- Bump BR.
- Updated to sdk-1.3.231:
  + vulkan-layers: Updated to sdk-1.3.231.
  + vulkan-headers: Updated to v1.3.231.
  + vulkan-loader: Updated to v1.3.231.
  + vulkan-tools: Updated to v1.3.231.

* Sun Apr 10 2022 L.A. Kostis <lakostis@altlinux.ru> 1.3.211-alt1
- Updated to sdk-1.3.211:
  + vulkan-layers: Updated to 5e090d28c.

* Tue Nov 16 2021 L.A. Kostis <lakostis@altlinux.ru> 1.2.196-alt2
- Rebuild w/ updated glslang and spirv-tools.

* Wed Nov 03 2021 L.A. Kostis <lakostis@altlinux.ru> 1.2.196-alt1
- Updated to v1.2.196.
- Bump BR.

* Mon Aug 30 2021 L.A. Kostis <lakostis@altlinux.ru> 1.2.182-alt1.1
- validation-layers: remove static libraries (fix LTO compile).

* Sun Jun 27 2021 L.A. Kostis <lakostis@altlinux.ru> 1.2.182-alt1
- Updated to 1.2.182.

* Mon Jun 14 2021 L.A. Kostis <lakostis@altlinux.ru> 1.2.176-alt1
- Updated to 1.2.176.
- BR: add librobin dependency.
- Add vk_video headers.

* Tue Sep 08 2020 L.A. Kostis <lakostis@altlinux.ru> 1.2.152-alt1
- Updated to v1.2.152.

* Tue Jul 14 2020 L.A. Kostis <lakostis@altlinux.ru> 1.2.141-alt1.1
- Applied fix for e2k (by @mike):
  + E2K: ftbfs workaround (selective -Wno-error).

* Fri Jun 05 2020 L.A. Kostis <lakostis@altlinux.ru> 1.2.141-alt1
- Updated to v1.2.141.
- Update buildrequires.

* Thu Aug 29 2019 L.A. Kostis <lakostis@altlinux.ru> 1.1.121-alt1.1
- Fix python3 requires.

* Thu Aug 29 2019 L.A. Kostis <lakostis@altlinux.ru> 1.1.121-alt1
- Updated to v1.1.121.
- .spec: relocate some dirs from -validation-layers to -filesystem.

* Mon May 06 2019 L.A. Kostis <lakostis@altlinux.ru> 1.1.107-alt1
- Updated to v1.1.107:
  + vulkan-headers v1.1.107.
  + vulkan-loader v1.1.107.
  + vulkan-tools v1.1.107.
  + vulkan-validation-layers v1.1.106.

* Fri May 03 2019 L.A. Kostis <lakostis@altlinux.ru> 1.1.101-alt3
- Relax glslang/libspirv-tools requires.

* Thu May 02 2019 L.A. Kostis <lakostis@altlinux.ru> 1.1.101-alt2
- Rebuild w/ system glslang and spirv-tools.

* Tue Mar 05 2019 L.A. Kostis <lakostis@altlinux.ru> 1.1.101-alt1
- Updated to SDK 1.1.101:
  + spirv-tools GIT 5994ae2a0.
  + spirv-headers GIT 79b6681aa.
  + vulkan-headers GIT 8e2c4cd55.
  + vulkan-loader GIT 3d7d8dc83.
  + vulkan-tools GIT 18ac58d9c.

* Wed Jan 02 2019 L.A. Kostis <lakostis@altlinux.ru> 1.1.96-alt1
- Updated to SDK 1.1.96:
  - headers v1.1.96
  - loader GIT 15e3d18ce
  - layers GIT b458d8622
  - tools GIT 9d4727c6a
- Rewrote .spec for new code infrastructure:
  - simplify build flags
  - demos->tools
  - added registry to -devel
  - added extra headers and libs for -layers
  - enable optimisation for glslang.

* Fri Mar 16 2018 L.A. Kostis <lakostis@altlinux.ru> 1.1.70-alt1
- Updated to vulkan sdk-1.1.70.

* Mon Mar 12 2018 L.A. Kostis <lakostis@altlinux.ru> 1.0.68-alt0.1
- Updated to vulkan sdk-1.0.68:
  + glslang 2651cca.
  + spirv-tools 9e19fc0.
  + spirv-headers ce30920.

* Sun Oct 08 2017 L.A. Kostis <lakostis@altlinux.ru> 1.0.61-alt0.2
- i586: Don't check for textrel due asm optimization in loader code.

* Sat Oct 07 2017 L.A. Kostis <lakostis@altlinux.ru> 1.0.61-alt0.1
- Updated to vulkan sdk-1.0.61:
  + glslang 3a21c88.
  + spirv-tools 7e2d26c.
  + spirv-headers 2bb92e6.

* Wed Jun 07 2017 L.A. Kostis <lakostis@altlinux.ru> 1.0.51-alt0.2.115665a
- Fix Obsoletes.
- libvulkan->libvulkan1 in accordance with ALT Shared Libs Policy.

* Wed Jun 07 2017 L.A. Kostis <lakostis@altlinux.ru> 1.0.51-alt0.1.115665a
- Bumped to vulkan sdk GIT 115665a:
  + glslang 136b1e2.
  + spirv-tools e7aff80.
  + spirv-headers 63e1062.

* Tue Jun 06 2017 L.A. Kostis <lakostis@altlinux.ru> 1.0.42-alt0.2
- .spec re-write:
  + sync with Fedora packaging.
  + remove rpath from vk (patch taken from debian.org).
  + split libvulkan and validation layers.
  + move demos to separate package (as for Mesa).

* Sun Mar 19 2017 L.A. Kostis <lakostis@altlinux.ru> 1.0.42-alt0.1
- Updated to vulkan sdk-1.0.42:
  + glslang dfbdd9.
  + spirv-tools c3caa5.
  + spirv-headers f61848.
- SPIRV-Tools: use python3 by default.

* Wed Dec 28 2016 L.A. Kostis <lakostis@altlinux.ru> 1.0.37-alt0.3
- .spec: use cmake macros instead of ugly hacks.

* Mon Dec 26 2016 L.A. Kostis <lakostis@altlinux.ru> 1.0.37-alt0.2
- Updated builreq: added wayland.

* Mon Dec 26 2016 L.A. Kostis <lakostis@altlinux.ru> 1.0.37-alt0.1
- Updated to vulkan sdk-1.0.37:
  + glslang 6a60c2.
  + spirv-tools 945e9f.
  + spirv-headers c470b6.

* Sat Oct 01 2016 L.A. Kostis <lakostis@altlinux.ru> 1.0.26-alt0.1
- First build for ALTLinux.

* Tue Feb 16 2016 Adam Jackson <ajax@redhat.com> - 1.0.3-2
- Update loader to not build cube or tri. Drop bundled LunarGLASS and llvm
  since they're only needed for those demos.

* Tue Feb 16 2016 Adam Jackson <ajax@redhat.com> - 1.0.3-1
- Initial packaging