* [ptxdist] [PATCH v3 3/4] glslang: new package
2020-02-04 9:51 [ptxdist] [PATCH v3 1/4] vulkan-loader: version bump 1.2.131.0 -> 1.2.131.1 Philipp Zabel
2020-02-04 9:51 ` [ptxdist] [PATCH v3 2/4] spirv-tools: version bump 2019.5 -> 2020-01-14-g323a81fc5e30 Philipp Zabel
@ 2020-02-04 9:51 ` Philipp Zabel
2020-02-04 9:51 ` [ptxdist] [PATCH v3 4/4] vulkan-validationlayers: " Philipp Zabel
2 siblings, 0 replies; 4+ messages in thread
From: Philipp Zabel @ 2020-02-04 9:51 UTC (permalink / raw)
To: ptxdist
Add reference SPIR-V generator, required to build Vulkan validation
layers.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
Changes since v2:
- fixed targetinstall to use install_copy where appropriate
- added missing host-glslang
- updated to 2020-01-05-g4fc7a33910fb, marked as known good in
vulkan-validationlayers v1.1.131.
---
rules/glslang.in | 25 +++++++++++++
rules/glslang.make | 77 +++++++++++++++++++++++++++++++++++++++++
rules/host-glslang.in | 6 ++++
rules/host-glslang.make | 34 ++++++++++++++++++
4 files changed, 142 insertions(+)
create mode 100644 rules/glslang.in
create mode 100644 rules/glslang.make
create mode 100644 rules/host-glslang.in
create mode 100644 rules/host-glslang.make
diff --git a/rules/glslang.in b/rules/glslang.in
new file mode 100644
index 000000000000..c2a660243d31
--- /dev/null
+++ b/rules/glslang.in
@@ -0,0 +1,25 @@
+## SECTION=multimedia_libs
+
+menuconfig GLSLANG
+ tristate
+ prompt "glslang"
+ select HOST_CMAKE
+ help
+ Khronos-reference SPIR-V generator
+
+if GLSLANG
+
+config GLSLANG_TOOLS
+ bool
+ prompt "install tools"
+ help
+ Install glslangValidator and spirv-remap tools.
+
+config GLSLANG_LIBS
+ bool
+ prompt "install shared libraries"
+ help
+ Install libglslang, libHLSL, libSPIRV, and libSPVRemapper shared
+ libraries.
+
+endif
diff --git a/rules/glslang.make b/rules/glslang.make
new file mode 100644
index 000000000000..5d27fcb1c10e
--- /dev/null
+++ b/rules/glslang.make
@@ -0,0 +1,77 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Philipp Zabel <p.zabel@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GLSLANG) += glslang
+
+#
+# Paths and names
+#
+GLSLANG_VERSION := 2020-01-05-g4fc7a33910fb
+GLSLANG_MD5 := 1a2f2327ba83c393525a6d20844a6169
+GLSLANG := glslang-$(GLSLANG_VERSION)
+GLSLANG_SUFFIX := tar.gz
+GLSLANG_URL := https://github.com/KhronosGroup/glslang/archive/$(GLSLANG_VERSION).$(GLSLANG_SUFFIX)
+GLSLANG_SOURCE := $(SRCDIR)/$(GLSLANG).$(GLSLANG_SUFFIX)
+GLSLANG_DIR := $(BUILDDIR)/$(GLSLANG)
+GLSLANG_LICENSE := BSD-3-clause AND MIT AND Apple-MIT-License
+GLSLANG_LICENSE_FILES := file://LICENSE.txt;md5=918e668376010a04448a312fb37ae69b
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+GLSLANG_CONF_TOOL := cmake
+GLSLANG_CONF_OPT := \
+ $(CROSS_CMAKE_USR) \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DBUILD_SHARED_LIBS=ON \
+ -DBUILD_EXTERNAL=OFF \
+ -DSKIP_GLSLANG_INSTALL=OFF \
+ -DENABLE_SPVREMAPPER=ON \
+ -DENABLE_GLSLANG_BINARIES=ON \
+ -DENABLE_GLSLANG_WEB=OFF \
+ -DENABLE_GLSLANG_WEB_DEVEL=OFF \
+ -DENABLE_OPT=ON \
+ -DENABLE_PCH=ON \
+ -DENABLE_CTEST=OFF
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/glslang.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, glslang)
+ @$(call install_fixup, glslang, PRIORITY, optional)
+ @$(call install_fixup, glslang, SECTION, base)
+ @$(call install_fixup, glslang, AUTHOR, "Philipp Zabel <p.zabel@pengutronix.de>")
+ @$(call install_fixup, glslang, DESCRIPTION, Khronos-reference SPIR-V generator)
+
+ifdef GLSLANG_TOOLS
+ @$(call install_copy, glslang, 0, 0, 0755, -, /usr/bin/glslangValidator)
+ @$(call install_copy, glslang, 0, 0, 0755, -, /usr/bin/spirv-remap)
+endif
+
+ifdef GLSLANG_LIBS
+ @$(call install_lib, glslang, 0, 0, 0644, libglslang-default-resource-limits)
+ @$(call install_lib, glslang, 0, 0, 0644, libglslang)
+ @$(call install_lib, glslang, 0, 0, 0644, libHLSL)
+ @$(call install_lib, glslang, 0, 0, 0644, libSPIRV)
+ @$(call install_lib, glslang, 0, 0, 0644, libSPVRemapper)
+endif
+
+ @$(call install_finish, glslang)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/rules/host-glslang.in b/rules/host-glslang.in
new file mode 100644
index 000000000000..69f255572c2b
--- /dev/null
+++ b/rules/host-glslang.in
@@ -0,0 +1,6 @@
+## SECTION=hosttools_noprompt
+
+config HOST_GLSLANG
+ tristate
+ default y if ALLYES
+ select HOST_CMAKE
diff --git a/rules/host-glslang.make b/rules/host-glslang.make
new file mode 100644
index 000000000000..08a0e7590604
--- /dev/null
+++ b/rules/host-glslang.make
@@ -0,0 +1,34 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Philipp Zabel <p.zabel@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+HOST_PACKAGES-$(PTXCONF_HOST_GLSLANG) += host-glslang
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+HOST_GLSLANG_CONF_TOOL := cmake
+HOST_GLSLANG_CONF_OPT := \
+ $(HOST_CMAKE_OPT) \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DBUILD_EXTERNAL=OFF \
+ -DSKIP_GLSLANG_INSTALL=OFF \
+ -DENABLE_SPVREMAPPER=ON \
+ -DENABLE_GLSLANG_BINARIES=ON \
+ -DENABLE_GLSLANG_WEB=OFF \
+ -DENABLE_GLSLANG_WEB_DEVEL=OFF \
+ -DENABLE_OPT=ON \
+ -DENABLE_PCH=ON \
+ -DENABLE_CTEST=OFF
+
+# vim: syntax=make
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ptxdist] [PATCH v3 4/4] vulkan-validationlayers: new package
2020-02-04 9:51 [ptxdist] [PATCH v3 1/4] vulkan-loader: version bump 1.2.131.0 -> 1.2.131.1 Philipp Zabel
2020-02-04 9:51 ` [ptxdist] [PATCH v3 2/4] spirv-tools: version bump 2019.5 -> 2020-01-14-g323a81fc5e30 Philipp Zabel
2020-02-04 9:51 ` [ptxdist] [PATCH v3 3/4] glslang: new package Philipp Zabel
@ 2020-02-04 9:51 ` Philipp Zabel
2 siblings, 0 replies; 4+ messages in thread
From: Philipp Zabel @ 2020-02-04 9:51 UTC (permalink / raw)
To: ptxdist
Add Vulkan standard validation layer package.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
Changes since v2:
- version bump 1.1.130 -> 1.2.131.1
---
rules/vulkan-validationlayers.in | 22 ++++++++++
rules/vulkan-validationlayers.make | 66 ++++++++++++++++++++++++++++++
2 files changed, 88 insertions(+)
create mode 100644 rules/vulkan-validationlayers.in
create mode 100644 rules/vulkan-validationlayers.make
diff --git a/rules/vulkan-validationlayers.in b/rules/vulkan-validationlayers.in
new file mode 100644
index 000000000000..f7eb3e9f68b7
--- /dev/null
+++ b/rules/vulkan-validationlayers.in
@@ -0,0 +1,22 @@
+## SECTION=multimedia_libs
+
+config VULKAN_VALIDATIONLAYERS
+ tristate
+ prompt "vulkan-validationlayers"
+ select HOST_CMAKE
+ select HOST_GLSLANG
+ select VULKAN_LOADER
+ select GLSLANG if BUILDTIME
+ select SPIRV_TOOLS if BUILDTIME
+ select LIBXCB if VULKAN_VALIDATIONLAYERS_XCB
+ select WAYLAND if VULKAN_VALIDATIONLAYERS_WAYLAND
+ help
+ Vulkan Validation Layers
+
+config VULKAN_VALIDATIONLAYERS_XCB
+ bool
+ default y if VULKAN_LOADER_XCB
+
+config VULKAN_VALIDATIONLAYERS_WAYLAND
+ bool
+ default y if VULKAN_LOADER_WAYLAND
diff --git a/rules/vulkan-validationlayers.make b/rules/vulkan-validationlayers.make
new file mode 100644
index 000000000000..d19da0b84c3a
--- /dev/null
+++ b/rules/vulkan-validationlayers.make
@@ -0,0 +1,66 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Philipp Zabel <p.zabel@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_VULKAN_VALIDATIONLAYERS) += vulkan-validationlayers
+
+#
+# Paths and names
+#
+VULKAN_VALIDATIONLAYERS_VERSION := 1.2.131.1
+VULKAN_VALIDATIONLAYERS_MD5 := 359b7a2ed430c59a31fa20388508b120
+VULKAN_VALIDATIONLAYERS := vulkan-validationlayers-$(VULKAN_VALIDATIONLAYERS_VERSION)
+VULKAN_VALIDATIONLAYERS_SUFFIX := tar.gz
+VULKAN_VALIDATIONLAYERS_URL := https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/sdk-$(VULKAN_VALIDATIONLAYERS_VERSION).$(VULKAN_VALIDATIONLAYERS_SUFFIX)
+VULKAN_VALIDATIONLAYERS_SOURCE := $(SRCDIR)/$(VULKAN_VALIDATIONLAYERS).$(VULKAN_VALIDATIONLAYERS_SUFFIX)
+VULKAN_VALIDATIONLAYERS_DIR := $(BUILDDIR)/$(VULKAN_VALIDATIONLAYERS)
+VULKAN_VALIDATIONLAYERS_LICENSE := Apache-2.0
+VULKAN_VALIDATIONLAYERS_LICENSE_FILES := file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+VULKAN_VALIDATIONLAYERS_CONF_TOOL := cmake
+VULKAN_VALIDATIONLAYERS_CONF_OPT := \
+ $(CROSS_CMAKE_USR) \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DBUILD_LAYERS=ON \
+ -DBUILD_LAYER_SUPPORT_FILES=OFF \
+ -DBUILD_TESTS=OFF \
+ -DBUILD_WSI_WAYLAND_SUPPORT=$(call ptx/onoff, PTXCONF_VULKAN_VALIDATIONLAYERS_WAYLAND) \
+ -DBUILD_WSI_XCB_SUPPORT=$(call ptx/onoff, PTXCONF_VULKAN_VALIDATIONLAYERS_XCB) \
+ -DBUILD_WSI_XLIB_SUPPORT=OFF \
+ -DGLSLANG_INSTALL_DIR=$(PTXDIST_SYSROOT_HOST)/bin
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/vulkan-validationlayers.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, vulkan-validationlayers)
+ @$(call install_fixup, vulkan-validationlayers, PRIORITY, optional)
+ @$(call install_fixup, vulkan-validationlayers, SECTION, base)
+ @$(call install_fixup, vulkan-validationlayers, AUTHOR, "Philipp Zabel <p.zabel@pengutronix.de>")
+ @$(call install_fixup, vulkan-validationlayers, DESCRIPTION, Vulkan Validation Layers)
+
+ @$(call install_lib, vulkan-validationlayers, 0, 0, 0644, libVkLayer_khronos_validation)
+
+ @$(call install_copy, vulkan-validationlayers, 0, 0, 0644, -, /usr/share/vulkan/explicit_layer.d/VkLayer_khronos_validation.json)
+ @$(call install_copy, vulkan-validationlayers, 0, 0, 0644, -, /usr/share/vulkan/explicit_layer.d/VkLayer_standard_validation.json)
+
+ @$(call install_finish, vulkan-validationlayers)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread