mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] shaderc: new package
Date: Fri, 17 Jul 2020 08:11:59 +0200	[thread overview]
Message-ID: <20200717061159.GC27485@pengutronix.de> (raw)
In-Reply-To: <20200709101136.31029-1-p.zabel@pengutronix.de>

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

  reply	other threads:[~2020-07-17  6:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 10:11 Philipp Zabel
2020-07-17  6:11 ` Michael Olbrich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-07-08 13:21 Philipp Zabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200717061159.GC27485@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox