From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 37576158020 for ; Wed, 9 Nov 2022 09:25:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4F3BFE08AD; Wed, 9 Nov 2022 09:25:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0214DE08AD for ; Wed, 9 Nov 2022 09:25:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B19B8340A9F for ; Wed, 9 Nov 2022 09:25:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E7AC06FE for ; Wed, 9 Nov 2022 09:25:07 +0000 (UTC) From: "Anna Vyalkova" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anna Vyalkova" Message-ID: <1667979169.2946a0ea45c40df19cf06c128ebdba892df4404e.cybertailor@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/crystal-utils.eclass eclass/shards.eclass X-VCS-Directories: eclass/ X-VCS-Committer: cybertailor X-VCS-Committer-Name: Anna Vyalkova X-VCS-Revision: 2946a0ea45c40df19cf06c128ebdba892df4404e X-VCS-Branch: dev Date: Wed, 9 Nov 2022 09:25:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2735eefc-67c5-4eaa-896e-80b3aac7e7e6 X-Archives-Hash: baff4a7378a70dd97c59bbe6e4b6a695 commit: 2946a0ea45c40df19cf06c128ebdba892df4404e Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Wed Nov 9 07:32:49 2022 +0000 Commit: Anna Vyalkova sysrq in> CommitDate: Wed Nov 9 07:32:49 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2946a0ea crystal-utils.eclass: introduce mycrystalargs Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> eclass/crystal-utils.eclass | 19 +++++++++++++++++++ eclass/shards.eclass | 2 -- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass index cb67682a6..8f8df3cc3 100644 --- a/eclass/crystal-utils.eclass +++ b/eclass/crystal-utils.eclass @@ -61,7 +61,19 @@ _crystal_get_debug_opt() { # @DESCRIPTION: # Set Crystal environment variables to match user settings. # +# Passes arguments to Crystal by reading from an optionally pre-defined local +# mycrystalargs bash array. +# # Must be run or ecrystal/eshards will fail. +# +# @CODE +# src_configure() { +# local mycrystalargs=( +# -Dfoo +# ) +# crystal_configure +# } +# @CODE crystal_configure() { debug-print-function ${FUNCNAME} "${@}" @@ -69,6 +81,12 @@ crystal_configure() { export CRYSTAL_CACHE_DIR="${T}/crystal" export SHARDS_CACHE_PATH="${T}/shards" + [[ -z ${mycrystalargs} ]] && local -a mycrystalargs=() + local mycrystalargstype=$(declare -p mycrystalargs 2>&-) + if [[ "${mycrystalargstype}" != "declare -a mycrystalargs="* ]]; then + die "mycrystalargs must be declared as array" + fi + local args=( --link-flags="\"${LDFLAGS}\"" --release @@ -78,6 +96,7 @@ crystal_configure() { $(is-flagq -mcpu && echo "--mcpu=$(get-flag mcpu)") $(is-flagq -mcmodel && echo "--mcmodel=$(get-flag mcmodel)") # TODO: --mattr + "${mycrystalargs[@]}" ) export CRYSTAL_OPTS="${args[@]}" diff --git a/eclass/shards.eclass b/eclass/shards.eclass index 95fe26226..756fdf335 100644 --- a/eclass/shards.eclass +++ b/eclass/shards.eclass @@ -64,7 +64,6 @@ shards_src_configure() { } # @FUNCTION: shards_src_compile -# @USAGE: [...] # @DESCRIPTION: # General function for building packages using Shards. shards_src_compile() { @@ -73,7 +72,6 @@ shards_src_compile() { local build_args=( --threads=$(makeopts_jobs) --verbose - "${@}" ) if gshards-has-targets; then