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 393DE15A7D9 for ; Thu, 23 Mar 2023 14:05:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 23FE5E0827; Thu, 23 Mar 2023 14:05:00 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E2880E0827 for ; Thu, 23 Mar 2023 14:04:59 +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 993C9335D5E for ; Thu, 23 Mar 2023 14:04:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 14C3F901 for ; Thu, 23 Mar 2023 14:04:57 +0000 (UTC) From: "Rui Huang" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Rui Huang" Message-ID: <1679580149.ce39123429eacbd5fad33055bf9acd1fcf574f1e.vowstar@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: sci-electronics/bluespec/ X-VCS-Repository: repo/proj/guru X-VCS-Files: sci-electronics/bluespec/Manifest sci-electronics/bluespec/bluespec-2023.01.ebuild X-VCS-Directories: sci-electronics/bluespec/ X-VCS-Committer: vowstar X-VCS-Committer-Name: Rui Huang X-VCS-Revision: ce39123429eacbd5fad33055bf9acd1fcf574f1e X-VCS-Branch: dev Date: Thu, 23 Mar 2023 14:04:57 +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: 541cd491-b997-4173-aca5-9f805778afbf X-Archives-Hash: 139e50788101dec22aed6ca4d315d3c4 commit: ce39123429eacbd5fad33055bf9acd1fcf574f1e Author: Huang Rui gmail com> AuthorDate: Thu Mar 23 14:02:29 2023 +0000 Commit: Rui Huang gmail com> CommitDate: Thu Mar 23 14:02:29 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ce391234 sci-electronics/bluespec: add 2023.01 Signed-off-by: Huang Rui gmail.com> sci-electronics/bluespec/Manifest | 1 + sci-electronics/bluespec/bluespec-2023.01.ebuild | 145 +++++++++++++++++++++++ 2 files changed, 146 insertions(+) diff --git a/sci-electronics/bluespec/Manifest b/sci-electronics/bluespec/Manifest index 7849b0d80..b108e2ade 100644 --- a/sci-electronics/bluespec/Manifest +++ b/sci-electronics/bluespec/Manifest @@ -1,2 +1,3 @@ DIST bluespec-2022.01.tar.gz 25576850 BLAKE2B c80dada5bdbc13bd8ff4205ff8b65384845548b61190dd0d3729d877be576b78acfd38857adf427321f9ba078bae2891640cf211e907ca2db679bd7a0d2bb536 SHA512 e6a1e0197d42ca402180735d1f2c41ab84b47eb8708d4ff49a9d509a928dec7cda88d06353faaebefcabacb734d6f7dd1cee1b6e1053010231c8ae508cb80789 +DIST bluespec-2023.01.tar.gz 26431509 BLAKE2B 10cb153e3dfc6779e48ead139da53463ffd4610c389feee73b64ae74e65e411cb9408e324e76f5b56b1accbe012c79017f528d4daa2d575ae73b16f5cf9d4733 SHA512 704926ba3e9d04a3a12c5c77793151a68d650e5ce84c3d5e6a6b86187dea322cd0e0ba78a5fd840e2dbd3a01a7d27ca30b9648158056b2c96eb522722bdef302 DIST yices-2.6.4.tar.gz 10186909 BLAKE2B 1c4b6297fd59924e9d99b9e17eb4b42e9bfbc24dcd56631beb9b72103c91578eb72b90cb9e228a5e9d489efc520a2e1d41185e9c3f4a8c43fc93f8dabba7414d SHA512 d8102c41fda0e200fd1336ae317b516d2797d10c187b8f7aecf0c9b08b4b487b90bef8c358099b2da51c0367326939f9610fd4e6d5a41a392cf1114bd04b8763 diff --git a/sci-electronics/bluespec/bluespec-2023.01.ebuild b/sci-electronics/bluespec/bluespec-2023.01.ebuild new file mode 100644 index 000000000..8ca4d5b32 --- /dev/null +++ b/sci-electronics/bluespec/bluespec-2023.01.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Toolchain for the Bluespec Hardware Definition Language" +HOMEPAGE="https://github.com/B-Lang-org/bsc" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/B-Lang-org/bsc.git" + inherit git-r3 +else + SRC_URI=" + https://github.com/B-Lang-org/bsc/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/SRI-CSL/yices2/archive/refs/tags/Yices-2.6.4.tar.gz -> yices-2.6.4.tar.gz + " + S="${WORKDIR}/bsc-${PV}" + S_YICES="${WORKDIR}/yices2-Yices-2.6.4" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="BSD GPL-3+ MIT" +SLOT="${PV}" +IUSE="doc test" +RESTRICT="!test? ( test )" + +RDEPEND=" + app-eselect/eselect-bluespec + app-shells/tcsh + dev-haskell/old-time:0= + dev-haskell/regex-compat:0= + dev-haskell/split:0= + dev-haskell/syb:0= + dev-lang/tcl +" + +DEPEND=" + ${RDEPEND} + test? ( + dev-util/dejagnu + sci-electronics/iverilog + sci-electronics/systemc + sys-process/time + ) +" + +BDEPEND=" + dev-haskell/cabal:0= + dev-lang/ghc:0= + dev-lang/perl + dev-util/gperf + doc? ( + dev-ruby/asciidoctor + dev-ruby/asciidoctor-pdf + dev-texlive/texlive-bibtexextra + dev-texlive/texlive-fontsextra + dev-texlive/texlive-fontutils + dev-texlive/texlive-latex + dev-texlive/texlive-latexextra + dev-texlive/texlive-latexrecommended + dev-texlive/texlive-plaingeneric + ) + sys-apps/coreutils + sys-devel/autoconf + sys-devel/bison + sys-devel/flex + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-2022.01-libstp-stub-makefile.patch +) + +# Do not complain about CFLAGS etc since we don't use them +QA_FLAGS_IGNORED=" + usr/share/bsc/bsc-${PV}/bin/core/.* + usr/share/bsc/bsc-${PV}/lib/SAT/.* + usr/share/bsc/bsc-${PV}/lib/VPI/.* +" + +src_prepare() { + if [[ ${PV} != "9999" ]] ; then + rm -r "${S}"/src/vendor/yices/v2.6/yices2 || die + ln -s "${S_YICES}" "${S}"/src/vendor/yices/v2.6/yices2 || die + fi + + default +} + +src_compile() { + # NO_DEPS_CHECKS=1: skip the subrepo check (this deriviation uses yices.src instead of the subrepo) + # LDCONFIG=ldconfig: https://github.com/B-Lang-org/bsc/pull/43 + # STP_STUB=1: https://github.com/B-Lang-org/bsc/pull/278 + emake \ + "NO_DEPS_CHECKS=1" \ + "LDCONFIG=ldconfig" \ + "STP_STUB=1" \ + $(usex doc "" "NOASCIIDOCTOR=1") \ + $(usex doc "install-doc" "") \ + $(usex doc "install-release" "") \ + install-src \ + $(usex doc "release" "") + emake -C src/comp \ + install-extra +} + +src_test() { + emake check-smoke + emake -C testsuite check +} + +# Call eselect vi update with --if-unset +# to respect user's choice +eselect_bluespec_update() { + ebegin "Calling eselect bluespec update" + eselect bluespec update --if-unset + eend $? +} + +src_install() { + # From https://github.com/B-Lang-org/bsc/blob/main/INSTALL.md, + # upstream recommend placing the inst directory at + # the path /usr/share/bsc/bsc- for multi-version. + local INSTALL_PATH=/usr/share/bsc/bsc-"${PV}" + local ED_INSTALL_PATH="${ED}${INSTALL_PATH}" + mkdir -p "${ED_INSTALL_PATH}" || die + local f + for f in "${S}"/inst/bin/*; do + if [[ ! -d "${f}" ]] ; then + local b=$(basename ${f}) + sed -i "s|ABSNAME=.*\$|ABSNAME=\$(readlink -f -- \"\$0\")|g" "${f}" || die + fi + done + cp -dr --preserve=mode,timestamp "${S}"/inst/* "${ED_INSTALL_PATH}"/ || die + insinto "${INSTALL_PATH}"/vimfiles + doins -r "${S}"/util/vim/{ftdetect,indent,syntax} +} + +pkg_postinst() { + eselect_bluespec_update +} + +pkg_postrm() { + eselect_bluespec_update +}