From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] ghdl: broken if no backend available
Date: Sat, 30 Jan 2021 01:37:16 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28311@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 578 bytes --]
There is a new pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages ghdl
https://github.com/void-linux/void-packages/pull/28311
ghdl: broken if no backend available
While we're at it, let xbps-src figure out which subpackages will be
built. I don't like `unset`.
---
@q66 feel free to revert the `subpackages` calculation part. Beside my dislike to unset, I think conditional definition of subpackages can reduce one warning :-p
A patch file from https://github.com/void-linux/void-packages/pull/28311.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ghdl-28311.patch --]
[-- Type: text/x-diff, Size: 2580 bytes --]
From f270aecbfc0f43739b2b6e0fb4b1989c15f2be57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sat, 30 Jan 2021 07:23:24 +0700
Subject: [PATCH] ghdl: broken if no backend available
While we're at it, let xbps-src figure out which subpackages will be
built. I don't like `unset`.
---
srcpkgs/ghdl/template | 53 ++++++++++++++++++++++---------------------
1 file changed, 27 insertions(+), 26 deletions(-)
diff --git a/srcpkgs/ghdl/template b/srcpkgs/ghdl/template
index 4229ca3d563..1a72f0812f3 100644
--- a/srcpkgs/ghdl/template
+++ b/srcpkgs/ghdl/template
@@ -20,18 +20,23 @@ checksum=3008616201cc3b0b596872e4ad59d8bc36e6ee3ff798bdce066828fbdad041e4
nocross=yes
patch_args="-Np1"
+if [ "$build_option_mcode" ]; then
+ depends="ghdl-mcode>=${version}_${revision}"
+elif [ "$build_option_llvm" ]; then
+ depends="ghdl-llvm>=${version}_${revision}"
+elif [ "$build_options_default" ]; then
+ # We don't want to see the broken message on the first pass.
+ # On the second pass, when build_options_default is set
+ # and no build_options have been set, mark broken.
+ broken="need a backend"
+fi
+
build_options="llvm mcode"
build_options_default="llvm"
desc_option_llvm="Build the portable LLVM backend"
desc_option_mcode="Build the x86-only mcode backend"
-if [ "$build_option_mcode" ]; then
- depends=" ghdl-mcode>=${version}_${revision}"
-elif [ "$build_option_llvm" ]; then
- depends=" ghdl-llvm>=${version}_${revision}"
-fi
-
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*)
build_options_default+=" mcode"
@@ -42,15 +47,7 @@ case "$XBPS_TARGET_MACHINE" in
fi
esac
-# get around xbps-src's broken 2-pass option eval
-unset subpackages
-
-if [ "$build_option_mcode" ]; then
- subpackages+=" ghdl-mcode"
-fi
-
if [ "$build_option_llvm" ]; then
- subpackages+=" ghdl-llvm"
makedepends+=" llvm11"
fi
@@ -123,18 +120,22 @@ do_check() {
done
}
-ghdl-mcode_package() {
- short_desc+=" - mcode backend"
- pkg_install() {
- vmove usr/bin/ghdl-mcode
- vmove usr/lib/ghdl/mcode
+if [ "$build_option_mcode" ]; then
+ ghdl-mcode_package() {
+ short_desc+=" - mcode backend"
+ pkg_install() {
+ vmove usr/bin/ghdl-mcode
+ vmove usr/lib/ghdl/mcode
+ }
}
-}
+fi
-ghdl-llvm_package() {
- short_desc+=" - LLVM backend"
- pkg_install() {
- vmove usr/bin/ghdl-llvm
- vmove usr/lib/ghdl/llvm
+if [ "$build_option_llvm" ]; then
+ ghdl-llvm_package() {
+ short_desc+=" - LLVM backend"
+ pkg_install() {
+ vmove usr/bin/ghdl-llvm
+ vmove usr/lib/ghdl/llvm
+ }
}
-}
+fi
next reply other threads:[~2021-01-30 0:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-30 0:37 sgn [this message]
2021-01-30 1:32 ` q66
2021-01-30 1:32 ` [PR PATCH] [Closed]: " q66
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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28311@inbox.vuxu.org \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/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;
as well as URLs for NNTP newsgroup(s).