Gentoo Archives: gentoo-commits

From: Ronny Gutbrod <gentoo@××××××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: sci-electronics/bluespec/
Date: Thu, 08 Sep 2022 01:46:46
Message-Id: 1662519092.d658fb754a1fb6508dcc929d4ea6373a0195cd89.tastytea@gentoo
1 commit: d658fb754a1fb6508dcc929d4ea6373a0195cd89
2 Author: Huang Rui <vowstar <AT> gmail <DOT> com>
3 AuthorDate: Wed Sep 7 02:47:40 2022 +0000
4 Commit: Ronny Gutbrod <gentoo <AT> tastytea <DOT> de>
5 CommitDate: Wed Sep 7 02:51:32 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d658fb75
7
8 sci-electronics/bluespec: fix 868765, 868768, 868936
9
10 Add missing RDEPEND app-shells/tcsh
11 Fix calls commands that do not exist: csh
12 Fix does not respect LDFLAGS
13 Fix test hang due to missing of csh
14
15 Closes: https://bugs.gentoo.org/868765
16 Closes: https://bugs.gentoo.org/868768
17 Closes: https://bugs.gentoo.org/868936
18 Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
19
20 .../bluespec/bluespec-2022.01-r1.ebuild | 145 +++++++++++++++++++++
21 1 file changed, 145 insertions(+)
22
23 diff --git a/sci-electronics/bluespec/bluespec-2022.01-r1.ebuild b/sci-electronics/bluespec/bluespec-2022.01-r1.ebuild
24 new file mode 100644
25 index 000000000..143d64e79
26 --- /dev/null
27 +++ b/sci-electronics/bluespec/bluespec-2022.01-r1.ebuild
28 @@ -0,0 +1,145 @@
29 +# Copyright 1999-2022 Gentoo Authors
30 +# Distributed under the terms of the GNU General Public License v2
31 +
32 +EAPI=8
33 +
34 +DESCRIPTION="Toolchain for the Bluespec Hardware Definition Language"
35 +HOMEPAGE="https://github.com/B-Lang-org/bsc"
36 +
37 +if [[ ${PV} == "9999" ]] ; then
38 + EGIT_REPO_URI="https://github.com/B-Lang-org/bsc.git"
39 + inherit git-r3
40 +else
41 + SRC_URI="
42 + https://github.com/B-Lang-org/bsc/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
43 + https://github.com/SRI-CSL/yices2/archive/refs/tags/Yices-2.6.4.tar.gz -> yices-2.6.4.tar.gz
44 + "
45 + S="${WORKDIR}/bsc-${PV}"
46 + S_YICES="${WORKDIR}/yices2-Yices-2.6.4"
47 + KEYWORDS="~amd64 ~x86"
48 +fi
49 +
50 +LICENSE="BSD GPL-3+ MIT"
51 +SLOT="${PV}"
52 +IUSE="doc test"
53 +RESTRICT="!test? ( test )"
54 +
55 +RDEPEND="
56 + app-eselect/eselect-bluespec
57 + app-shells/tcsh
58 + dev-haskell/old-time:0=
59 + dev-haskell/regex-compat:0=
60 + dev-haskell/split:0=
61 + dev-haskell/syb:0=
62 + dev-lang/tcl
63 +"
64 +
65 +DEPEND="
66 + ${RDEPEND}
67 + test? (
68 + dev-util/dejagnu
69 + sci-electronics/iverilog
70 + sci-electronics/systemc
71 + sys-process/time
72 + )
73 +"
74 +
75 +BDEPEND="
76 + dev-haskell/cabal:0=
77 + dev-lang/ghc:0=
78 + dev-lang/perl
79 + dev-util/gperf
80 + doc? (
81 + dev-ruby/asciidoctor
82 + dev-ruby/asciidoctor-pdf
83 + dev-texlive/texlive-bibtexextra
84 + dev-texlive/texlive-fontsextra
85 + dev-texlive/texlive-fontutils
86 + dev-texlive/texlive-latex
87 + dev-texlive/texlive-latexextra
88 + dev-texlive/texlive-latexrecommended
89 + dev-texlive/texlive-plaingeneric
90 + )
91 + sys-apps/coreutils
92 + sys-devel/autoconf
93 + sys-devel/bison
94 + sys-devel/flex
95 + virtual/pkgconfig
96 +"
97 +
98 +PATCHES=(
99 + "${FILESDIR}"/${PN}-2022.01-libstp-stub-makefile.patch
100 +)
101 +
102 +# Do not complain about CFLAGS etc since we don't use them
103 +QA_FLAGS_IGNORED="
104 + usr/share/bsc/bsc-${PV}/bin/core/.*
105 + usr/share/bsc/bsc-${PV}/lib/SAT/.*
106 + usr/share/bsc/bsc-${PV}/lib/VPI/.*
107 +"
108 +
109 +src_prepare() {
110 + if [[ ${PV} != "9999" ]] ; then
111 + rm -r "${S}"/src/vendor/yices/v2.6/yices2 || die
112 + ln -s "${S_YICES}" "${S}"/src/vendor/yices/v2.6/yices2 || die
113 + fi
114 +
115 + default
116 +}
117 +
118 +src_compile() {
119 + # NO_DEPS_CHECKS=1: skip the subrepo check (this deriviation uses yices.src instead of the subrepo)
120 + # LDCONFIG=ldconfig: https://github.com/B-Lang-org/bsc/pull/43
121 + # STP_STUB=1: https://github.com/B-Lang-org/bsc/pull/278
122 + emake \
123 + "NO_DEPS_CHECKS=1" \
124 + "LDCONFIG=ldconfig" \
125 + "STP_STUB=1" \
126 + $(usex doc "" "NOASCIIDOCTOR=1") \
127 + $(usex doc "install-doc" "") \
128 + $(usex doc "install-release" "") \
129 + install-src \
130 + $(usex doc "release" "")
131 + emake -C src/comp \
132 + install-extra
133 +}
134 +
135 +src_test() {
136 + emake check-smoke
137 + emake -C testsuite check
138 +}
139 +
140 +# Call eselect vi update with --if-unset
141 +# to respect user's choice
142 +eselect_bluespec_update() {
143 + ebegin "Calling eselect bluespec update"
144 + eselect bluespec update --if-unset
145 + eend $?
146 +}
147 +
148 +src_install() {
149 + # From https://github.com/B-Lang-org/bsc/blob/main/INSTALL.md,
150 + # upstream recommend placing the inst directory at
151 + # the path /usr/share/bsc/bsc-<VERSION> for multi-version.
152 + local INSTALL_PATH=/usr/share/bsc/bsc-"${PV}"
153 + local ED_INSTALL_PATH="${ED}${INSTALL_PATH}"
154 + mkdir -p "${ED_INSTALL_PATH}" || die
155 + local f
156 + for f in "${S}"/inst/bin/*; do
157 + if [[ ! -d "${f}" ]] ; then
158 + local b=$(basename ${f})
159 + sed -i "s|ABSNAME=.*\$|ABSNAME=\$(readlink -f -- \"\$0\")|g" "${f}" || die
160 + fi
161 + done
162 + cp -dr --preserve=mode,timestamp "${S}"/inst/* "${ED_INSTALL_PATH}"/ || die
163 + insinto "${INSTALL_PATH}"/vimfiles
164 + doins -r "${S}"/util/vim/{ftdetect,indent,syntax}
165 +}
166 +
167 +pkg_postinst() {
168 + eselect_bluespec_update
169 +}
170 +
171 +pkg_postrm() {
172 + eselect_bluespec_update
173 +}