mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] shaderc: new package
@ 2020-07-08 13:21 Philipp Zabel
  0 siblings, 0 replies; 3+ messages in thread
From: Philipp Zabel @ 2020-07-08 13:21 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 rules/host-shaderc.in   |   7 +++
 rules/host-shaderc.make |  65 +++++++++++++++++++++++
 rules/shaderc.in        |  41 ++++++++++++++
 rules/shaderc.make      | 115 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 228 insertions(+)
 create mode 100644 rules/host-shaderc.in
 create mode 100644 rules/host-shaderc.make
 create mode 100644 rules/shaderc.in
 create mode 100644 rules/shaderc.make

diff --git a/rules/host-shaderc.in b/rules/host-shaderc.in
new file mode 100644
index 000000000000..2619ae5da8ce
--- /dev/null
+++ b/rules/host-shaderc.in
@@ -0,0 +1,7 @@
+## SECTION=hosttools_noprompt
+
+config HOST_SHADERC
+	tristate
+	default y if ALLYES
+	select HOST_CMAKE
+	select HOST_SYSTEM_PYTHON3
diff --git a/rules/host-shaderc.make b/rules/host-shaderc.make
new file mode 100644
index 000000000000..0ee834d1bab3
--- /dev/null
+++ b/rules/host-shaderc.make
@@ -0,0 +1,65 @@
+# -*-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_SHADERC) += host-shaderc
+
+HOST_SHADERC_GLSLANG_MD5		:= $(SHADERC_GLSLANG_MD5)
+HOST_SHADERC_GLSLANG_URL		:= $(SHADERC_GLSLANG_URL)
+HOST_SHADERC_GLSLANG_SOURCE		:= $(SHADERC_GLSLANG_SOURCE)
+HOST_SHADERC_GLSLANG_DIR		:= $(HOST_SHADERC_DIR)/third_party/glslang
+
+HOST_SHADERC_SPIRV_TOOLS_MD5		= $(SHADERC_SPIRV_TOOLS_MD5)
+HOST_SHADERC_SPIRV_TOOLS_URL		= $(SHADERC_SPIRV_TOOLS_URL)
+HOST_SHADERC_SPIRV_TOOLS_SOURCE		= $(SHADERC_SPIRV_TOOLS_SOURCE)
+HOST_SHADERC_SPIRV_TOOLS_DIR		= $(HOST_SHADERC_DIR)/third_party/spirv-tools
+
+HOST_SHADERC_SPIRV_HEADERS_MD5		= $(SHADERC_SPIRV_HEADERS_MD5)
+HOST_SHADERC_SPIRV_HEADERS_URL		= $(SHADERC_SPIRV_HEADERS_URL)
+HOST_SHADERC_SPIRV_HEADERS_SOURCE	= $(SHADERC_SPIRV_HEADERS_SOURCE)
+HOST_SHADERC_SPIRV_HEADERS_DIR		= $(HOST_SHADERC_DIR)/third_party/spirv-tools/external/spirv-headers
+
+HOST_SHADERC_SOURCES			= \
+	$(HOST_SHADERC_SOURCE) \
+	$(HOST_SHADERC_GLSLANG_SOURCE) \
+	$(HOST_SHADERC_SPIRV_TOOLS_SOURCE) \
+	$(HOST_SHADERC_SPIRV_HEADERS_SOURCE)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-shaderc.extract:
+	@$(call targetinfo)
+	@$(call clean, $(HOST_SHADERC_DIR))
+	@$(call extract, HOST_SHADERC)
+	@$(call extract, HOST_SHADERC_GLSLANG)
+	@$(call extract, HOST_SHADERC_SPIRV_TOOLS)
+	@$(call extract, HOST_SHADERC_SPIRV_HEADERS)
+	@$(call patchin, HOST_SHADERC)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+HOST_SHADERC_CONF_TOOL	:= cmake
+HOST_SHADERC_CONF_OPT	:= \
+	$(HOST_CMAKE_OPT) \
+	-DCMAKE_BUILD_TYPE=Release \
+	-DCMAKE_INSTALL_LIBDIR=/usr/lib \
+	-DSHADERC_ENABLE_SPVC=OFF \
+	-DSHADERC_SKIP_INSTALL=OFF \
+	-DSHADERC_SKIP_TESTS=ON \
+	-DSHADERC_SPVC_ENABLE_DIRECT_LOGGING=OFF \
+	-DSHADERC_SPVC_DISABLE_CONTEXT_LOGGING=OFF \
+	-DSHADERC_ENABLE_WERROR_COMPILE=ON
+
+# vim: syntax=make
diff --git a/rules/shaderc.in b/rules/shaderc.in
new file mode 100644
index 000000000000..ccb3bc538032
--- /dev/null
+++ b/rules/shaderc.in
@@ -0,0 +1,41 @@
+## SECTION=multimedia_libs
+
+menuconfig SHADERC
+	tristate
+	prompt "shaderc"
+	select HOST_CMAKE
+	select HOST_SYSTEM_PYTHON3
+	help
+	  A collection of tools, libraries and tests for shader compilation.
+
+if SHADERC
+
+config SHADERC_GLSLC
+	bool
+	prompt "install glslc"
+	help
+	  Install glslc tool.
+
+config SHADERC_SPVC
+	bool
+	# requires SPIRV-Cross
+	depends on BROKEN
+	prompt "install spvc"
+	help
+	  Install spvc tool.
+
+config SHADERC_LIBSHADERC
+	bool
+	prompt "install libshaderc"
+	help
+	  Install libshaderc shared library.
+
+config SHADERC_LIBSHADERC_SPVC
+	bool
+	# requires SPIRV-Cross
+	depends on BROKEN
+	prompt "install libshaderc_spvc"
+	help
+	  Install libshaderc_spvc shared library.
+
+endif
diff --git a/rules/shaderc.make b/rules/shaderc.make
new file mode 100644
index 000000000000..42335e369406
--- /dev/null
+++ b/rules/shaderc.make
@@ -0,0 +1,115 @@
+# -*-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_SHADERC) += shaderc
+
+#
+# Paths and names
+#
+SHADERC_VERSION			:= v2020.1
+SHADERC_MD5			:= d12155e2e15a3717a9e71468b844a9ce
+SHADERC				:= shaderc-$(SHADERC_VERSION)
+SHADERC_SUFFIX			:= tar.gz
+SHADERC_URL			:= \
+	https://github.com/google/shaderc/archive/$(SHADERC_VERSION).$(SHADERC_SUFFIX)
+SHADERC_SOURCE			:= $(SRCDIR)/$(SHADERC).$(SHADERC_SUFFIX)
+SHADERC_DIR			:= $(BUILDDIR)/$(SHADERC)
+SHADERC_LICENSE			:= Apache-2.0 AND BSD-3-clause AND MIT AND Apple-MIT-License
+SHADERC_LICENSE_FILES		:= \
+	file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
+	file://third_party/glslang/LICENSE.txt;md5=918e668376010a04448a312fb37ae69b \
+	file://third_party/spirv-tools/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57
+
+SHADERC_GLSLANG_MD5		= $(GLSLANG_MD5)
+SHADERC_GLSLANG_URL		= $(GLSLANG_URL)
+SHADERC_GLSLANG_SOURCE		= $(GLSLANG_SOURCE)
+SHADERC_GLSLANG_DIR		= $(SHADERC_DIR)/third_party/glslang
+
+SHADERC_SPIRV_TOOLS_MD5		= $(SPIRV_TOOLS_MD5)
+SHADERC_SPIRV_TOOLS_URL		= $(SPIRV_TOOLS_URL)
+SHADERC_SPIRV_TOOLS_SOURCE	= $(SPIRV_TOOLS_SOURCE)
+SHADERC_SPIRV_TOOLS_DIR		= $(SHADERC_DIR)/third_party/spirv-tools
+
+SHADERC_SPIRV_HEADERS_MD5	= $(SPIRV_HEADERS_MD5)
+SHADERC_SPIRV_HEADERS_URL	= $(SPIRV_HEADERS_URL)
+SHADERC_SPIRV_HEADERS_SOURCE	= $(SPIRV_HEADERS_SOURCE)
+SHADERC_SPIRV_HEADERS_DIR	= $(SHADERC_DIR)/third_party/spirv-tools/external/spirv-headers
+
+SHADERC_SOURCES			= \
+	$(SHADERC_SOURCE) \
+	$(SHADERC_GLSLANG_SOURCE) \
+	$(SHADERC_SPIRV_TOOLS_SOURCE) \
+	$(SHADERC_SPIRV_HEADERS_SOURCE)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/shaderc.extract:
+	@$(call targetinfo)
+	@$(call clean, $(SHADERC_DIR))
+	@$(call extract, SHADERC)
+	@$(call extract, SHADERC_GLSLANG)
+	@$(call extract, SHADERC_SPIRV_TOOLS)
+	@$(call extract, SHADERC_SPIRV_HEADERS)
+	@$(call patchin, SHADERC)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SHADERC_CONF_TOOL	:= cmake
+SHADERC_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR) \
+	-DCMAKE_BUILD_TYPE=Release \
+	-DCMAKE_INSTALL_LIBDIR=/usr/lib \
+	-DSHADERC_ENABLE_SPVC=$(call ptx/onoff, PTXCONF_SHADERC_LIBS) \
+	-DSHADERC_SKIP_INSTALL=OFF \
+	-DSHADERC_SKIP_TESTS=ON \
+	-DSHADERC_SPVC_ENABLE_DIRECT_LOGGING=OFF \
+	-DSHADERC_SPVC_DISABLE_CONTEXT_LOGGING=OFF \
+	-DSHADERC_ENABLE_WERROR_COMPILE=ON
+
+#	-DSHADERC_ENABLE_SHARED_CRT=OFF
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/shaderc.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, shaderc)
+	@$(call install_fixup, shaderc, PRIORITY, optional)
+	@$(call install_fixup, shaderc, SECTION, base)
+	@$(call install_fixup, shaderc, AUTHOR, "Philipp Zabel <p.zabel@pengutronix.de>")
+	@$(call install_fixup, shaderc, DESCRIPTION, A collection of tools, libraries and tests for shader compilation)
+
+ifdef SHADERC_GLSLC
+	@$(call install_copy, shaderc, 0, 0, 0755, -, /usr/bin/glslc)
+endif
+ifdef SHADERC_SPVC
+	@$(call install_copy, shaderc, 0, 0, 0755, -, /usr/bin/spvc)
+endif
+
+ifdef SHADERC_LIBSHADERC
+	@$(call install_lib, shaderc, 0, 0, 0644, libshaderc)
+endif
+ifdef SHADERC_LIBSHADERC_SPVC
+	@$(call install_lib, shaderc, 0, 0, 0644, libshaderc_spvc)
+endif
+
+	@$(call install_finish, shaderc)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] shaderc: new package
  2020-07-09 10:11 Philipp Zabel
@ 2020-07-17  6:11 ` Michael Olbrich
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2020-07-17  6:11 UTC (permalink / raw)
  To: ptxdist

On Thu, Jul 09, 2020 at 12:11:36PM +0200, Philipp Zabel wrote:
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
>  rules/host-shaderc.in   |   7 +++
>  rules/host-shaderc.make |  65 +++++++++++++++++++++++
>  rules/shaderc.in        |  41 ++++++++++++++
>  rules/shaderc.make      | 115 ++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 228 insertions(+)
>  create mode 100644 rules/host-shaderc.in
>  create mode 100644 rules/host-shaderc.make
>  create mode 100644 rules/shaderc.in
>  create mode 100644 rules/shaderc.make
> 
> diff --git a/rules/host-shaderc.in b/rules/host-shaderc.in
> new file mode 100644
> index 000000000000..2619ae5da8ce
> --- /dev/null
> +++ b/rules/host-shaderc.in
> @@ -0,0 +1,7 @@
> +## SECTION=hosttools_noprompt
> +
> +config HOST_SHADERC
> +	tristate
> +	default y if ALLYES
> +	select HOST_CMAKE
> +	select HOST_SYSTEM_PYTHON3
> diff --git a/rules/host-shaderc.make b/rules/host-shaderc.make
> new file mode 100644
> index 000000000000..0ee834d1bab3
> --- /dev/null
> +++ b/rules/host-shaderc.make
> @@ -0,0 +1,65 @@
> +# -*-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_SHADERC) += host-shaderc
> +
> +HOST_SHADERC_GLSLANG_MD5		:= $(SHADERC_GLSLANG_MD5)
> +HOST_SHADERC_GLSLANG_URL		:= $(SHADERC_GLSLANG_URL)
> +HOST_SHADERC_GLSLANG_SOURCE		:= $(SHADERC_GLSLANG_SOURCE)
> +HOST_SHADERC_GLSLANG_DIR		:= $(HOST_SHADERC_DIR)/third_party/glslang
> +
> +HOST_SHADERC_SPIRV_TOOLS_MD5		= $(SHADERC_SPIRV_TOOLS_MD5)
> +HOST_SHADERC_SPIRV_TOOLS_URL		= $(SHADERC_SPIRV_TOOLS_URL)
> +HOST_SHADERC_SPIRV_TOOLS_SOURCE		= $(SHADERC_SPIRV_TOOLS_SOURCE)
> +HOST_SHADERC_SPIRV_TOOLS_DIR		= $(HOST_SHADERC_DIR)/third_party/spirv-tools
> +
> +HOST_SHADERC_SPIRV_HEADERS_MD5		= $(SHADERC_SPIRV_HEADERS_MD5)
> +HOST_SHADERC_SPIRV_HEADERS_URL		= $(SHADERC_SPIRV_HEADERS_URL)
> +HOST_SHADERC_SPIRV_HEADERS_SOURCE	= $(SHADERC_SPIRV_HEADERS_SOURCE)
> +HOST_SHADERC_SPIRV_HEADERS_DIR		= $(HOST_SHADERC_DIR)/third_party/spirv-tools/external/spirv-headers
> +
> +HOST_SHADERC_SOURCES			= \
> +	$(HOST_SHADERC_SOURCE) \
> +	$(HOST_SHADERC_GLSLANG_SOURCE) \
> +	$(HOST_SHADERC_SPIRV_TOOLS_SOURCE) \
> +	$(HOST_SHADERC_SPIRV_HEADERS_SOURCE)
> +
> +# ----------------------------------------------------------------------------
> +# Extract
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/host-shaderc.extract:
> +	@$(call targetinfo)
> +	@$(call clean, $(HOST_SHADERC_DIR))
> +	@$(call extract, HOST_SHADERC)
> +	@$(call extract, HOST_SHADERC_GLSLANG)
> +	@$(call extract, HOST_SHADERC_SPIRV_TOOLS)
> +	@$(call extract, HOST_SHADERC_SPIRV_HEADERS)
> +	@$(call patchin, HOST_SHADERC)
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +HOST_SHADERC_CONF_TOOL	:= cmake
> +HOST_SHADERC_CONF_OPT	:= \
> +	$(HOST_CMAKE_OPT) \
> +	-DCMAKE_BUILD_TYPE=Release \
> +	-DCMAKE_INSTALL_LIBDIR=/usr/lib \
> +	-DSHADERC_ENABLE_SPVC=OFF \
> +	-DSHADERC_SKIP_INSTALL=OFF \
> +	-DSHADERC_SKIP_TESTS=ON \
> +	-DSHADERC_SPVC_ENABLE_DIRECT_LOGGING=OFF \
> +	-DSHADERC_SPVC_DISABLE_CONTEXT_LOGGING=OFF \
> +	-DSHADERC_ENABLE_WERROR_COMPILE=ON
> +
> +# vim: syntax=make
> diff --git a/rules/shaderc.in b/rules/shaderc.in
> new file mode 100644
> index 000000000000..ccb3bc538032
> --- /dev/null
> +++ b/rules/shaderc.in
> @@ -0,0 +1,41 @@
> +## SECTION=multimedia_libs
> +
> +menuconfig SHADERC
> +	tristate
> +	prompt "shaderc"
> +	select HOST_CMAKE
> +	select HOST_SYSTEM_PYTHON3
> +	help
> +	  A collection of tools, libraries and tests for shader compilation.
> +
> +if SHADERC
> +
> +config SHADERC_GLSLC
> +	bool
> +	prompt "install glslc"
> +	help
> +	  Install glslc tool.
> +
> +config SHADERC_SPVC
> +	bool
> +	# requires SPIRV-Cross
> +	depends on BROKEN
> +	prompt "install spvc"
> +	help
> +	  Install spvc tool.
> +
> +config SHADERC_LIBSHADERC
> +	bool
> +	prompt "install libshaderc"
> +	help
> +	  Install libshaderc shared library.
> +
> +config SHADERC_LIBSHADERC_SPVC
> +	bool
> +	# requires SPIRV-Cross
> +	depends on BROKEN
> +	prompt "install libshaderc_spvc"
> +	help
> +	  Install libshaderc_spvc shared library.
> +
> +endif
> diff --git a/rules/shaderc.make b/rules/shaderc.make
> new file mode 100644
> index 000000000000..786fe74385b6
> --- /dev/null
> +++ b/rules/shaderc.make
> @@ -0,0 +1,115 @@
> +# -*-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_SHADERC) += shaderc
> +
> +#
> +# Paths and names
> +#
> +SHADERC_VERSION			:= v2020.1
> +SHADERC_MD5			:= d12155e2e15a3717a9e71468b844a9ce
> +SHADERC				:= shaderc-$(SHADERC_VERSION)
> +SHADERC_SUFFIX			:= tar.gz
> +SHADERC_URL			:= \
> +	https://github.com/google/shaderc/archive/$(SHADERC_VERSION).$(SHADERC_SUFFIX)
> +SHADERC_SOURCE			:= $(SRCDIR)/$(SHADERC).$(SHADERC_SUFFIX)
> +SHADERC_DIR			:= $(BUILDDIR)/$(SHADERC)
> +SHADERC_LICENSE			:= Apache-2.0 AND BSD-3-clause AND MIT AND Apple-MIT-License
> +SHADERC_LICENSE_FILES		:= \
> +	file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
> +	file://third_party/glslang/LICENSE.txt;md5=918e668376010a04448a312fb37ae69b \
> +	file://third_party/spirv-tools/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57
> +
> +SHADERC_GLSLANG_MD5		= $(GLSLANG_MD5)
> +SHADERC_GLSLANG_URL		= $(GLSLANG_URL)
> +SHADERC_GLSLANG_SOURCE		= $(GLSLANG_SOURCE)
> +SHADERC_GLSLANG_DIR		= $(SHADERC_DIR)/third_party/glslang
> +
> +SHADERC_SPIRV_TOOLS_MD5		= $(SPIRV_TOOLS_MD5)
> +SHADERC_SPIRV_TOOLS_URL		= $(SPIRV_TOOLS_URL)
> +SHADERC_SPIRV_TOOLS_SOURCE	= $(SPIRV_TOOLS_SOURCE)
> +SHADERC_SPIRV_TOOLS_DIR		= $(SHADERC_DIR)/third_party/spirv-tools
> +
> +SHADERC_SPIRV_HEADERS_MD5	= $(SPIRV_HEADERS_MD5)
> +SHADERC_SPIRV_HEADERS_URL	= $(SPIRV_HEADERS_URL)
> +SHADERC_SPIRV_HEADERS_SOURCE	= $(SPIRV_HEADERS_SOURCE)
> +SHADERC_SPIRV_HEADERS_DIR	= $(SHADERC_DIR)/third_party/spirv-tools/external/spirv-headers
> +
> +SHADERC_SOURCES			= \
> +	$(SHADERC_SOURCE) \
> +	$(SHADERC_GLSLANG_SOURCE) \
> +	$(SHADERC_SPIRV_TOOLS_SOURCE) \
> +	$(SHADERC_SPIRV_HEADERS_SOURCE)
> +
> +# ----------------------------------------------------------------------------
> +# Extract
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/shaderc.extract:
> +	@$(call targetinfo)
> +	@$(call clean, $(SHADERC_DIR))
> +	@$(call extract, SHADERC)
> +	@$(call extract, SHADERC_GLSLANG)
> +	@$(call extract, SHADERC_SPIRV_TOOLS)
> +	@$(call extract, SHADERC_SPIRV_HEADERS)
> +	@$(call patchin, SHADERC)
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +SHADERC_CONF_TOOL	:= cmake
> +SHADERC_CONF_OPT	:= \
> +	$(CROSS_CMAKE_USR) \
> +	-DCMAKE_BUILD_TYPE=Release \
> +	-DCMAKE_INSTALL_LIBDIR=/usr/lib \
> +	-DSHADERC_ENABLE_SPVC=$(call ptx/onoff, PTXCONF_SHADERC_LIBS) \

PTXCONF_SHADERC_LIBS is not defined anywhere.

> +	-DSHADERC_SKIP_INSTALL=OFF \
> +	-DSHADERC_SKIP_TESTS=ON \
> +	-DSHADERC_SPVC_ENABLE_DIRECT_LOGGING=OFF \
> +	-DSHADERC_SPVC_DISABLE_CONTEXT_LOGGING=OFF \
> +	-DSHADERC_ENABLE_WERROR_COMPILE=ON
> +
> +#	-DSHADERC_ENABLE_SHARED_CRT=OFF
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/shaderc.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, shaderc)
> +	@$(call install_fixup, shaderc, PRIORITY, optional)
> +	@$(call install_fixup, shaderc, SECTION, base)
> +	@$(call install_fixup, shaderc, AUTHOR, "Philipp Zabel <p.zabel@pengutronix.de>")
> +	@$(call install_fixup, shaderc, DESCRIPTION, A collection of tools, libraries and tests for shader compilation)
> +
> +ifdef PTXCONF_SHADERC_GLSLC
> +	@$(call install_copy, shaderc, 0, 0, 0755, -, /usr/bin/glslc)
> +endif
> +ifdef PTXCONF_SHADERC_SPVC
> +	@$(call install_copy, shaderc, 0, 0, 0755, -, /usr/bin/spvc)
> +endif
> +
> +ifdef PTXCONF_SHADERC_LIBSHADERC
> +	@$(call install_lib, shaderc, 0, 0, 0644, libshaderc)
> +endif

Fails to install. Probably because of the issue above.

Michael

> +ifdef PTXCONF_SHADERC_LIBSHADERC_SPVC
> +	@$(call install_lib, shaderc, 0, 0, 0644, libshaderc_spvc)
> +endif
> +
> +	@$(call install_finish, shaderc)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ptxdist] [PATCH] shaderc: new package
@ 2020-07-09 10:11 Philipp Zabel
  2020-07-17  6:11 ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Zabel @ 2020-07-09 10:11 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 rules/host-shaderc.in   |   7 +++
 rules/host-shaderc.make |  65 +++++++++++++++++++++++
 rules/shaderc.in        |  41 ++++++++++++++
 rules/shaderc.make      | 115 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 228 insertions(+)
 create mode 100644 rules/host-shaderc.in
 create mode 100644 rules/host-shaderc.make
 create mode 100644 rules/shaderc.in
 create mode 100644 rules/shaderc.make

diff --git a/rules/host-shaderc.in b/rules/host-shaderc.in
new file mode 100644
index 000000000000..2619ae5da8ce
--- /dev/null
+++ b/rules/host-shaderc.in
@@ -0,0 +1,7 @@
+## SECTION=hosttools_noprompt
+
+config HOST_SHADERC
+	tristate
+	default y if ALLYES
+	select HOST_CMAKE
+	select HOST_SYSTEM_PYTHON3
diff --git a/rules/host-shaderc.make b/rules/host-shaderc.make
new file mode 100644
index 000000000000..0ee834d1bab3
--- /dev/null
+++ b/rules/host-shaderc.make
@@ -0,0 +1,65 @@
+# -*-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_SHADERC) += host-shaderc
+
+HOST_SHADERC_GLSLANG_MD5		:= $(SHADERC_GLSLANG_MD5)
+HOST_SHADERC_GLSLANG_URL		:= $(SHADERC_GLSLANG_URL)
+HOST_SHADERC_GLSLANG_SOURCE		:= $(SHADERC_GLSLANG_SOURCE)
+HOST_SHADERC_GLSLANG_DIR		:= $(HOST_SHADERC_DIR)/third_party/glslang
+
+HOST_SHADERC_SPIRV_TOOLS_MD5		= $(SHADERC_SPIRV_TOOLS_MD5)
+HOST_SHADERC_SPIRV_TOOLS_URL		= $(SHADERC_SPIRV_TOOLS_URL)
+HOST_SHADERC_SPIRV_TOOLS_SOURCE		= $(SHADERC_SPIRV_TOOLS_SOURCE)
+HOST_SHADERC_SPIRV_TOOLS_DIR		= $(HOST_SHADERC_DIR)/third_party/spirv-tools
+
+HOST_SHADERC_SPIRV_HEADERS_MD5		= $(SHADERC_SPIRV_HEADERS_MD5)
+HOST_SHADERC_SPIRV_HEADERS_URL		= $(SHADERC_SPIRV_HEADERS_URL)
+HOST_SHADERC_SPIRV_HEADERS_SOURCE	= $(SHADERC_SPIRV_HEADERS_SOURCE)
+HOST_SHADERC_SPIRV_HEADERS_DIR		= $(HOST_SHADERC_DIR)/third_party/spirv-tools/external/spirv-headers
+
+HOST_SHADERC_SOURCES			= \
+	$(HOST_SHADERC_SOURCE) \
+	$(HOST_SHADERC_GLSLANG_SOURCE) \
+	$(HOST_SHADERC_SPIRV_TOOLS_SOURCE) \
+	$(HOST_SHADERC_SPIRV_HEADERS_SOURCE)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-shaderc.extract:
+	@$(call targetinfo)
+	@$(call clean, $(HOST_SHADERC_DIR))
+	@$(call extract, HOST_SHADERC)
+	@$(call extract, HOST_SHADERC_GLSLANG)
+	@$(call extract, HOST_SHADERC_SPIRV_TOOLS)
+	@$(call extract, HOST_SHADERC_SPIRV_HEADERS)
+	@$(call patchin, HOST_SHADERC)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+HOST_SHADERC_CONF_TOOL	:= cmake
+HOST_SHADERC_CONF_OPT	:= \
+	$(HOST_CMAKE_OPT) \
+	-DCMAKE_BUILD_TYPE=Release \
+	-DCMAKE_INSTALL_LIBDIR=/usr/lib \
+	-DSHADERC_ENABLE_SPVC=OFF \
+	-DSHADERC_SKIP_INSTALL=OFF \
+	-DSHADERC_SKIP_TESTS=ON \
+	-DSHADERC_SPVC_ENABLE_DIRECT_LOGGING=OFF \
+	-DSHADERC_SPVC_DISABLE_CONTEXT_LOGGING=OFF \
+	-DSHADERC_ENABLE_WERROR_COMPILE=ON
+
+# vim: syntax=make
diff --git a/rules/shaderc.in b/rules/shaderc.in
new file mode 100644
index 000000000000..ccb3bc538032
--- /dev/null
+++ b/rules/shaderc.in
@@ -0,0 +1,41 @@
+## SECTION=multimedia_libs
+
+menuconfig SHADERC
+	tristate
+	prompt "shaderc"
+	select HOST_CMAKE
+	select HOST_SYSTEM_PYTHON3
+	help
+	  A collection of tools, libraries and tests for shader compilation.
+
+if SHADERC
+
+config SHADERC_GLSLC
+	bool
+	prompt "install glslc"
+	help
+	  Install glslc tool.
+
+config SHADERC_SPVC
+	bool
+	# requires SPIRV-Cross
+	depends on BROKEN
+	prompt "install spvc"
+	help
+	  Install spvc tool.
+
+config SHADERC_LIBSHADERC
+	bool
+	prompt "install libshaderc"
+	help
+	  Install libshaderc shared library.
+
+config SHADERC_LIBSHADERC_SPVC
+	bool
+	# requires SPIRV-Cross
+	depends on BROKEN
+	prompt "install libshaderc_spvc"
+	help
+	  Install libshaderc_spvc shared library.
+
+endif
diff --git a/rules/shaderc.make b/rules/shaderc.make
new file mode 100644
index 000000000000..786fe74385b6
--- /dev/null
+++ b/rules/shaderc.make
@@ -0,0 +1,115 @@
+# -*-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_SHADERC) += shaderc
+
+#
+# Paths and names
+#
+SHADERC_VERSION			:= v2020.1
+SHADERC_MD5			:= d12155e2e15a3717a9e71468b844a9ce
+SHADERC				:= shaderc-$(SHADERC_VERSION)
+SHADERC_SUFFIX			:= tar.gz
+SHADERC_URL			:= \
+	https://github.com/google/shaderc/archive/$(SHADERC_VERSION).$(SHADERC_SUFFIX)
+SHADERC_SOURCE			:= $(SRCDIR)/$(SHADERC).$(SHADERC_SUFFIX)
+SHADERC_DIR			:= $(BUILDDIR)/$(SHADERC)
+SHADERC_LICENSE			:= Apache-2.0 AND BSD-3-clause AND MIT AND Apple-MIT-License
+SHADERC_LICENSE_FILES		:= \
+	file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
+	file://third_party/glslang/LICENSE.txt;md5=918e668376010a04448a312fb37ae69b \
+	file://third_party/spirv-tools/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57
+
+SHADERC_GLSLANG_MD5		= $(GLSLANG_MD5)
+SHADERC_GLSLANG_URL		= $(GLSLANG_URL)
+SHADERC_GLSLANG_SOURCE		= $(GLSLANG_SOURCE)
+SHADERC_GLSLANG_DIR		= $(SHADERC_DIR)/third_party/glslang
+
+SHADERC_SPIRV_TOOLS_MD5		= $(SPIRV_TOOLS_MD5)
+SHADERC_SPIRV_TOOLS_URL		= $(SPIRV_TOOLS_URL)
+SHADERC_SPIRV_TOOLS_SOURCE	= $(SPIRV_TOOLS_SOURCE)
+SHADERC_SPIRV_TOOLS_DIR		= $(SHADERC_DIR)/third_party/spirv-tools
+
+SHADERC_SPIRV_HEADERS_MD5	= $(SPIRV_HEADERS_MD5)
+SHADERC_SPIRV_HEADERS_URL	= $(SPIRV_HEADERS_URL)
+SHADERC_SPIRV_HEADERS_SOURCE	= $(SPIRV_HEADERS_SOURCE)
+SHADERC_SPIRV_HEADERS_DIR	= $(SHADERC_DIR)/third_party/spirv-tools/external/spirv-headers
+
+SHADERC_SOURCES			= \
+	$(SHADERC_SOURCE) \
+	$(SHADERC_GLSLANG_SOURCE) \
+	$(SHADERC_SPIRV_TOOLS_SOURCE) \
+	$(SHADERC_SPIRV_HEADERS_SOURCE)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/shaderc.extract:
+	@$(call targetinfo)
+	@$(call clean, $(SHADERC_DIR))
+	@$(call extract, SHADERC)
+	@$(call extract, SHADERC_GLSLANG)
+	@$(call extract, SHADERC_SPIRV_TOOLS)
+	@$(call extract, SHADERC_SPIRV_HEADERS)
+	@$(call patchin, SHADERC)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SHADERC_CONF_TOOL	:= cmake
+SHADERC_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR) \
+	-DCMAKE_BUILD_TYPE=Release \
+	-DCMAKE_INSTALL_LIBDIR=/usr/lib \
+	-DSHADERC_ENABLE_SPVC=$(call ptx/onoff, PTXCONF_SHADERC_LIBS) \
+	-DSHADERC_SKIP_INSTALL=OFF \
+	-DSHADERC_SKIP_TESTS=ON \
+	-DSHADERC_SPVC_ENABLE_DIRECT_LOGGING=OFF \
+	-DSHADERC_SPVC_DISABLE_CONTEXT_LOGGING=OFF \
+	-DSHADERC_ENABLE_WERROR_COMPILE=ON
+
+#	-DSHADERC_ENABLE_SHARED_CRT=OFF
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/shaderc.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, shaderc)
+	@$(call install_fixup, shaderc, PRIORITY, optional)
+	@$(call install_fixup, shaderc, SECTION, base)
+	@$(call install_fixup, shaderc, AUTHOR, "Philipp Zabel <p.zabel@pengutronix.de>")
+	@$(call install_fixup, shaderc, DESCRIPTION, A collection of tools, libraries and tests for shader compilation)
+
+ifdef PTXCONF_SHADERC_GLSLC
+	@$(call install_copy, shaderc, 0, 0, 0755, -, /usr/bin/glslc)
+endif
+ifdef PTXCONF_SHADERC_SPVC
+	@$(call install_copy, shaderc, 0, 0, 0755, -, /usr/bin/spvc)
+endif
+
+ifdef PTXCONF_SHADERC_LIBSHADERC
+	@$(call install_lib, shaderc, 0, 0, 0644, libshaderc)
+endif
+ifdef PTXCONF_SHADERC_LIBSHADERC_SPVC
+	@$(call install_lib, shaderc, 0, 0, 0644, libshaderc_spvc)
+endif
+
+	@$(call install_finish, shaderc)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-17  6:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 13:21 [ptxdist] [PATCH] shaderc: new package Philipp Zabel
2020-07-09 10:11 Philipp Zabel
2020-07-17  6:11 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox