mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-21 21:13:27 -04:00
sci-electronics/bluespec: bump to 2022.01
Signed-off-by: Huang Rui <vowstar@gmail.com>
This commit is contained in:
2
sci-electronics/bluespec/Manifest
Normal file
2
sci-electronics/bluespec/Manifest
Normal file
@@ -0,0 +1,2 @@
|
||||
DIST bluespec-2022.01.tar.gz 25576850 BLAKE2B c80dada5bdbc13bd8ff4205ff8b65384845548b61190dd0d3729d877be576b78acfd38857adf427321f9ba078bae2891640cf211e907ca2db679bd7a0d2bb536 SHA512 e6a1e0197d42ca402180735d1f2c41ab84b47eb8708d4ff49a9d509a928dec7cda88d06353faaebefcabacb734d6f7dd1cee1b6e1053010231c8ae508cb80789
|
||||
DIST yices-2.6.4.tar.gz 10186909 BLAKE2B 1c4b6297fd59924e9d99b9e17eb4b42e9bfbc24dcd56631beb9b72103c91578eb72b90cb9e228a5e9d489efc520a2e1d41185e9c3f4a8c43fc93f8dabba7414d SHA512 d8102c41fda0e200fd1336ae317b516d2797d10c187b8f7aecf0c9b08b4b487b90bef8c358099b2da51c0367326939f9610fd4e6d5a41a392cf1114bd04b8763
|
||||
@@ -1,70 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Bluespec high level hardware design language compiler"
|
||||
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
|
||||
EGIT_COMMIT="69dee0667e51108832b685511e9aa631cca1e83a"
|
||||
# Using SRC_URI here will failed because this repo uses git submodules.
|
||||
# SRC_URI="https://github.com/B-Lang-org/bsc/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
# S="${WORKDIR}/bsc-${EGIT_COMMIT}"
|
||||
# Waiting for https://github.com/B-Lang-org/bsc/issues/85
|
||||
EGIT_REPO_URI="https://github.com/B-Lang-org/bsc.git"
|
||||
# This inherit git-r3 will removed after upstream finished.
|
||||
inherit git-r3
|
||||
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="BSD GPL-3+ MIT"
|
||||
SLOT="0"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
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/systemc
|
||||
sys-process/time
|
||||
)
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
dev-haskell/cabal:0=
|
||||
dev-lang/ghc:0=
|
||||
dev-util/gperf
|
||||
sys-devel/autoconf
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0_pre20210106-fix-libdir.patch
|
||||
"${FILESDIR}"/${PN}-0_pre20210106-fix-wrapper.patch
|
||||
)
|
||||
|
||||
DOCS=( "README.md" "COPYING" )
|
||||
|
||||
# We don't want to run it because it will do install by default.
|
||||
src_compile() { :; }
|
||||
|
||||
src_install() {
|
||||
emake PREFIX="${ED%/}"/usr LIBDIR="${ED%/}"/usr/$(get_libdir) install
|
||||
emake -C src/comp PREFIX="${ED%/}"/usr LIBDIR="${ED%/}"/usr/$(get_libdir) install-extra
|
||||
einstalldocs
|
||||
}
|
||||
114
sci-electronics/bluespec/bluespec-2022.01.ebuild
Normal file
114
sci-electronics/bluespec/bluespec-2022.01.ebuild
Normal file
@@ -0,0 +1,114 @@
|
||||
# Copyright 1999-2022 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="
|
||||
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-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-devel/autoconf
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2022.01-libstp-stub-makefile.patch
|
||||
)
|
||||
|
||||
DOCS=( "README.md" "COPYING" )
|
||||
|
||||
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)
|
||||
# NOGIT=1: https://github.com/B-Lang-org/bsc/issues/12
|
||||
# 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" \
|
||||
"NOGIT=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
|
||||
}
|
||||
|
||||
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-<VERSION> for multi-version.
|
||||
local PREFIX="${ED}"/usr/share/bsc/bsc-"${PV}"
|
||||
mkdir -p "${PREFIX}" || die
|
||||
cp -dr --preserve=mode,timestamp "${S}"/inst/* "${PREFIX}"/ || die
|
||||
insinto "${PREFIX}"/vimfiles
|
||||
doins -r "${S}"/util/vim/{ftdetect,indent,syntax}
|
||||
}
|
||||
@@ -1,30 +1,27 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Bluespec high level hardware design language compiler"
|
||||
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/${PN}.git"
|
||||
EGIT_REPO_URI="https://github.com/B-Lang-org/bsc.git"
|
||||
inherit git-r3
|
||||
else
|
||||
EGIT_COMMIT="69dee0667e51108832b685511e9aa631cca1e83a"
|
||||
# Using SRC_URI here will failed because this repo uses git submodules.
|
||||
# SRC_URI="https://github.com/B-Lang-org/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
# S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
|
||||
# Waiting for https://github.com/B-Lang-org/bsc/issues/85
|
||||
EGIT_REPO_URI="https://github.com/B-Lang-org/${PN}.git"
|
||||
# This inherit git-r3 will removed after upstream finished.
|
||||
inherit git-r3
|
||||
|
||||
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="0"
|
||||
IUSE="test"
|
||||
SLOT="${PV}"
|
||||
IUSE="doc test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
@@ -39,6 +36,7 @@ DEPEND="
|
||||
${RDEPEND}
|
||||
test? (
|
||||
dev-util/dejagnu
|
||||
sci-electronics/iverilog
|
||||
sci-electronics/systemc
|
||||
sys-process/time
|
||||
)
|
||||
@@ -47,24 +45,70 @@ DEPEND="
|
||||
BDEPEND="
|
||||
dev-haskell/cabal:0=
|
||||
dev-lang/ghc:0=
|
||||
dev-lang/perl
|
||||
dev-util/gperf
|
||||
doc? (
|
||||
dev-ruby/asciidoctor
|
||||
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-devel/autoconf
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0_pre20210106-fix-libdir.patch
|
||||
"${FILESDIR}"/${PN}-0_pre20210106-fix-wrapper.patch
|
||||
"${FILESDIR}"/${PN}-2022.01-libstp-stub-makefile.patch
|
||||
)
|
||||
|
||||
DOCS=( "README.md" "COPYING" )
|
||||
|
||||
# We don't want to run it because it will do install by default.
|
||||
src_compile() { :; }
|
||||
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)
|
||||
# NOGIT=1: https://github.com/B-Lang-org/bsc/issues/12
|
||||
# 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" \
|
||||
"NOGIT=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
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake PREFIX="${ED%/}"/usr LIBDIR="${ED%/}"/usr/$(get_libdir) install
|
||||
emake -C src/comp PREFIX="${ED%/}"/usr LIBDIR="${ED%/}"/usr/$(get_libdir) install-extra
|
||||
einstalldocs
|
||||
# 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-<VERSION> for multi-version.
|
||||
local PREFIX="${ED}"/usr/share/bsc/bsc-"${PV}"
|
||||
mkdir -p "${PREFIX}" || die
|
||||
cp -dr --preserve=mode,timestamp "${S}"/inst/* "${PREFIX}"/ || die
|
||||
insinto "${PREFIX}"/vimfiles
|
||||
doins -r "${S}"/util/vim/{ftdetect,indent,syntax}
|
||||
}
|
||||
|
||||
@@ -1,250 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 4938b24..51e265b 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -3,6 +3,7 @@ TOP := $(PWD)
|
||||
|
||||
PREFIX ?= $(TOP)/inst
|
||||
BUILDDIR ?= $(TOP)/build
|
||||
+LIBDIR ?= $(PREFIX)/lib
|
||||
|
||||
.PHONY: all
|
||||
all: install
|
||||
@@ -21,7 +22,7 @@ rem_build:
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
- $(MAKE) -C src PREFIX=$(PREFIX) install
|
||||
+ $(MAKE) -C src PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) install
|
||||
|
||||
# In the future, this will be much more expansive, and run the actual test
|
||||
# suite once it's open sourced.
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 1daeb3a..b5a1146 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -4,6 +4,7 @@ TOP := $(PWD)/..
|
||||
include $(TOP)/platform.mk
|
||||
|
||||
PREFIX?=$(TOP)/inst
|
||||
+LIBDIR?=$(PREFIX)/lib
|
||||
|
||||
ifndef NO_DEPS_CHECKS
|
||||
CC_TOOLS=$(CC) $(CXX) $(LD)
|
||||
@@ -45,17 +46,17 @@ all: install
|
||||
|
||||
.PHONY: install clean full_clean
|
||||
install clean full_clean:
|
||||
- $(MAKE) -C vendor/stp PREFIX=$(PREFIX) $@
|
||||
- $(MAKE) -C vendor/yices PREFIX=$(PREFIX) $@
|
||||
- $(MAKE) -C vendor/htcl PREFIX=$(PREFIX) $@
|
||||
+ $(MAKE) -C vendor/stp PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
+ $(MAKE) -C vendor/yices PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
+ $(MAKE) -C vendor/htcl PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
# we need to build targets from here sequentially, as they operate in the same workspace
|
||||
- $(MAKE) -C comp -j1 PREFIX=$(PREFIX) $@
|
||||
- $(MAKE) -C Libraries PREFIX=$(PREFIX) $@
|
||||
- $(MAKE) -C exec PREFIX=$(PREFIX) $@
|
||||
- $(MAKE) -C VPI PREFIX=$(PREFIX) $@
|
||||
- $(MAKE) -C Verilog PREFIX=$(PREFIX) $@
|
||||
- $(MAKE) -C Verilog.Quartus PREFIX=$(PREFIX) $@
|
||||
- $(MAKE) -C Verilog.Vivado PREFIX=$(PREFIX) $@
|
||||
- $(MAKE) -C bluetcl PREFIX=$(PREFIX) $@
|
||||
- $(MAKE) -C bluesim PREFIX=$(PREFIX) $@
|
||||
+ $(MAKE) -C comp -j1 PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
+ $(MAKE) -C Libraries PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
+ $(MAKE) -C exec PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
+ $(MAKE) -C VPI PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
+ $(MAKE) -C Verilog PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
+ $(MAKE) -C Verilog.Quartus PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
+ $(MAKE) -C Verilog.Vivado PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
+ $(MAKE) -C bluetcl PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
+ $(MAKE) -C bluesim PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) $@
|
||||
|
||||
diff --git a/src/VPI/Makefile b/src/VPI/Makefile
|
||||
index 698037b..0070714 100644
|
||||
--- a/src/VPI/Makefile
|
||||
+++ b/src/VPI/Makefile
|
||||
@@ -6,7 +6,8 @@ include $(TOP)/platform.mk
|
||||
INSTALL ?= install
|
||||
|
||||
PREFIX?=$(TOP)/inst
|
||||
-INSTALLDIR=$(PREFIX)/lib/VPI
|
||||
+LIBDIR?=$(PREFIX)/lib
|
||||
+INSTALLDIR=$(LIBDIR)/VPI
|
||||
|
||||
.PHONY: all
|
||||
all: install
|
||||
diff --git a/src/Verilog/common.mk b/src/Verilog/common.mk
|
||||
index ef29190..06b3553 100644
|
||||
--- a/src/Verilog/common.mk
|
||||
+++ b/src/Verilog/common.mk
|
||||
@@ -14,7 +14,8 @@ INSTALL?=install -c
|
||||
RM = rm -f
|
||||
|
||||
PREFIX?=$(TOP)/inst
|
||||
-INSTALLDIR=$(PREFIX)/lib/$(INSTALL_NAME)
|
||||
+LIBDIR?=$(PREFIX)/lib
|
||||
+INSTALLDIR=$(LIBDIR)/$(INSTALL_NAME)
|
||||
|
||||
.PHONY: all
|
||||
all: test
|
||||
diff --git a/src/bluesim/Makefile b/src/bluesim/Makefile
|
||||
index 60f2fd9..3e66e5a 100644
|
||||
--- a/src/bluesim/Makefile
|
||||
+++ b/src/bluesim/Makefile
|
||||
@@ -4,7 +4,8 @@ TOP:=$(PWD)/../..
|
||||
INSTALL ?= install
|
||||
|
||||
PREFIX?=$(TOP)/inst
|
||||
-INSTALLDIR=$(PREFIX)/lib/Bluesim
|
||||
+LIBDIR?=$(PREFIX)/lib
|
||||
+INSTALLDIR=$(LIBDIR)/Bluesim
|
||||
|
||||
COMPDIR=$(TOP)/src/comp
|
||||
|
||||
diff --git a/src/bluetcl/Makefile b/src/bluetcl/Makefile
|
||||
index 80d6050..34d877b 100644
|
||||
--- a/src/bluetcl/Makefile
|
||||
+++ b/src/bluetcl/Makefile
|
||||
@@ -2,7 +2,8 @@ PWD:=$(shell pwd)
|
||||
TOP:=$(PWD)/../..
|
||||
|
||||
PREFIX?=$(TOP)/inst
|
||||
-INSTALLDIR = $(PREFIX)/lib/tcllib/bluespec
|
||||
+LIBDIR?=$(PREFIX)/lib
|
||||
+INSTALLDIR = $(LIBDIR)/tcllib/bluespec
|
||||
|
||||
FILES = \
|
||||
tclIndex \
|
||||
diff --git a/src/bluetcl/bluespec.tcl b/src/bluetcl/bluespec.tcl
|
||||
index 4ee8e86..e243531 100644
|
||||
--- a/src/bluetcl/bluespec.tcl
|
||||
+++ b/src/bluetcl/bluespec.tcl
|
||||
@@ -129,6 +129,7 @@ proc Bluetcl::initBluespec {} {
|
||||
utils::donothing
|
||||
lappend auto_path /usr/share
|
||||
lappend auto_path /usr/lib
|
||||
+lappend auto_path /usr/lib64
|
||||
|
||||
if { [catch Bluetcl::initBluespec err] } {
|
||||
puts "Error in initialization file bluespec.tcl: $err"
|
||||
diff --git a/src/comp/Makefile b/src/comp/Makefile
|
||||
index 58b81d7..6f113a2 100644
|
||||
--- a/src/comp/Makefile
|
||||
+++ b/src/comp/Makefile
|
||||
@@ -14,6 +14,7 @@ RM = rm -f
|
||||
LN = ln -sf
|
||||
|
||||
FIND = find
|
||||
+SED = sed
|
||||
|
||||
# -----
|
||||
# Options
|
||||
@@ -37,6 +38,7 @@ export NOUPDATEBUILDVERSION
|
||||
|
||||
# PREFIX is where things are installed
|
||||
PREFIX?=$(TOP)/inst
|
||||
+LIBDIR=$(PREFIX)/lib
|
||||
BINDIR=$(PREFIX)/bin
|
||||
|
||||
# Top-level of where intermediate GHC files are stored
|
||||
@@ -389,7 +391,8 @@ $(BINDIR)/core/%: %
|
||||
|
||||
$(BINDIR)/%: wrapper.sh $(BINDIR)/core/%
|
||||
mkdir -p -m 755 $(BINDIR)
|
||||
- $(INSTALL) -m 755 wrapper.sh $(BINDIR)/$(@F)
|
||||
+ $(SED) "s:^LIBDIR=.*$$:LIBDIR=\"$(abspath $(LIBDIR))\":g" wrapper.sh > $(BUILDDIR)/$(@F)
|
||||
+ $(INSTALL) -m 755 $(BUILDDIR)/$(@F) $(BINDIR)/$(@F)
|
||||
|
||||
.PHONY: install-bsc
|
||||
install-bsc: $(addprefix $(BINDIR)/,$(BSCEXES))
|
||||
diff --git a/src/comp/wrapper.sh b/src/comp/wrapper.sh
|
||||
index 656e9a0..1d5cf47 100755
|
||||
--- a/src/comp/wrapper.sh
|
||||
+++ b/src/comp/wrapper.sh
|
||||
@@ -5,9 +5,23 @@
|
||||
ABSNAME="$(cd "${0%/*}"; echo $PWD)/${0##*/}"
|
||||
SCRIPTNAME="${ABSNAME##*/}"
|
||||
BINDIR="${ABSNAME%/*}"
|
||||
+# LIBDIR will be replaced to user defined path after build
|
||||
+LIBDIR="${BINDIR}/../lib"
|
||||
+
|
||||
+# If missing LIBDIR, search one.
|
||||
+# This is unlikely to happen unless the user moves the file after installation.
|
||||
+if [ ! -d ${LIBDIR} ]; then
|
||||
+ LIBDIR="$(find ${BINDIR}/.. -maxdepth 10 -type d -name 'SAT' -print -quit)"
|
||||
+ if [ ! "x${LIBDIR}" = "x" ]; then
|
||||
+ LIBDIR="${LIBDIR}/.."
|
||||
+ else
|
||||
+ echo "Error Bluespec library path not found."
|
||||
+ exit 1;
|
||||
+ fi
|
||||
+fi
|
||||
|
||||
# Set BLUESPECDIR based on the location
|
||||
-BLUESPECDIR="$(cd ${BINDIR}/../lib; echo $PWD)"
|
||||
+BLUESPECDIR="$(cd ${LIBDIR}; echo $PWD)"
|
||||
export BLUESPECDIR
|
||||
|
||||
# Add the dynamically-linked SAT libraries to the load path
|
||||
diff --git a/src/exec/Makefile b/src/exec/Makefile
|
||||
index 9a16e22..02536cc 100644
|
||||
--- a/src/exec/Makefile
|
||||
+++ b/src/exec/Makefile
|
||||
@@ -4,7 +4,8 @@ TOP:=$(PWD)/../..
|
||||
INSTALL?= install
|
||||
|
||||
PREFIX?=$(TOP)/inst
|
||||
-INSTALLDIR=$(PREFIX)/lib/exec
|
||||
+LIBDIR?=$(PREFIX)/lib
|
||||
+INSTALLDIR=$(LIBDIR)/exec
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
diff --git a/src/vendor/stp/Makefile b/src/vendor/stp/Makefile
|
||||
index 092995d..a520184 100644
|
||||
--- a/src/vendor/stp/Makefile
|
||||
+++ b/src/vendor/stp/Makefile
|
||||
@@ -2,6 +2,7 @@ TOP=../../..
|
||||
include $(TOP)/platform.mk
|
||||
|
||||
PREFIX?=$(TOP)/inst
|
||||
+LIBDIR?=$(PREFIX)/lib
|
||||
|
||||
.PHONY: all install clean full_clean
|
||||
|
||||
@@ -22,8 +23,8 @@ all: install
|
||||
install:
|
||||
$(MAKE) -C $(SRC) install
|
||||
ln -fsn HaskellIfc include_hs
|
||||
- install -m 755 -d $(PREFIX)/lib/SAT
|
||||
- install -m 644 lib/$(SNAME) $(PREFIX)/lib/SAT
|
||||
+ install -m 755 -d $(LIBDIR)/SAT
|
||||
+ install -m 644 lib/$(SNAME) $(LIBDIR)/SAT
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(SRC) clean
|
||||
diff --git a/src/vendor/yices/Makefile b/src/vendor/yices/Makefile
|
||||
index b8dbdea..8d4776c 100644
|
||||
--- a/src/vendor/yices/Makefile
|
||||
+++ b/src/vendor/yices/Makefile
|
||||
@@ -2,6 +2,7 @@ TOP:=../../..
|
||||
include $(TOP)/platform.mk
|
||||
|
||||
PREFIX?=$(TOP)/inst
|
||||
+LIBDIR?=$(PREFIX)/lib
|
||||
|
||||
.PHONY: all clean full_clean install
|
||||
|
||||
@@ -22,8 +23,8 @@ install:
|
||||
ln -fsn $(VERSION)/include
|
||||
ln -fsn $(VERSION)/lib
|
||||
ln -fsn $(VERSION)/include_hs
|
||||
- install -m 755 -d $(PREFIX)/lib/SAT
|
||||
- install -m 644 lib/$(SNAME) $(PREFIX)/lib/SAT
|
||||
+ install -m 755 -d $(LIBDIR)/SAT
|
||||
+ install -m 644 lib/$(SNAME) $(LIBDIR)/SAT
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(VERSION) clean
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/src/comp/Makefile b/src/comp/Makefile
|
||||
index 6f113a2..5220c30 100644
|
||||
--- a/src/comp/Makefile
|
||||
+++ b/src/comp/Makefile
|
||||
@@ -391,7 +391,7 @@ $(BINDIR)/core/%: %
|
||||
|
||||
$(BINDIR)/%: wrapper.sh $(BINDIR)/core/%
|
||||
mkdir -p -m 755 $(BINDIR)
|
||||
- $(SED) "s:^LIBDIR=.*$$:LIBDIR=\"$(abspath $(LIBDIR))\":g" wrapper.sh > $(BUILDDIR)/$(@F)
|
||||
+ $(SED) "s:^LIBDIR=.*$$:LIBDIR=\"$$\{BINDIR\}/$(shell realpath --relative-to $(BINDIR) $(LIBDIR))\":g" wrapper.sh > $(BUILDDIR)/$(@F)
|
||||
$(INSTALL) -m 755 $(BUILDDIR)/$(@F) $(BINDIR)/$(@F)
|
||||
|
||||
.PHONY: install-bsc
|
||||
@@ -0,0 +1,38 @@
|
||||
From 1981ce3eb76c1a3fe977728959bde823156b8055 Mon Sep 17 00:00:00 2001
|
||||
From: Jack Cummings <jack@mudshark.org>
|
||||
Date: Thu, 12 Nov 2020 22:16:11 -0800
|
||||
Subject: [PATCH] tweak to b37ad3c; install libstp_stub.so when STP_STUB=1
|
||||
|
||||
---
|
||||
src/vendor/stp/Makefile | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/vendor/stp/Makefile b/src/vendor/stp/Makefile
|
||||
index 092995d7f..c1bbc2019 100644
|
||||
--- a/src/vendor/stp/Makefile
|
||||
+++ b/src/vendor/stp/Makefile
|
||||
@@ -9,12 +9,13 @@ ifeq ($(STP_STUB),)
|
||||
SRC = src
|
||||
else
|
||||
SRC = src_stub
|
||||
+SNAME += lib/libstp_stub.so
|
||||
endif
|
||||
|
||||
ifeq ($(OSTYPE), Darwin)
|
||||
-SNAME=libstp.dylib
|
||||
+SNAME = lib/libstp.dylib
|
||||
else
|
||||
-SNAME=libstp.so.1
|
||||
+SNAME += lib/libstp.so.1
|
||||
endif
|
||||
|
||||
all: install
|
||||
@@ -23,7 +24,7 @@ install:
|
||||
$(MAKE) -C $(SRC) install
|
||||
ln -fsn HaskellIfc include_hs
|
||||
install -m 755 -d $(PREFIX)/lib/SAT
|
||||
- install -m 644 lib/$(SNAME) $(PREFIX)/lib/SAT
|
||||
+ install -m 644 $(SNAME) $(PREFIX)/lib/SAT
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(SRC) clean
|
||||
@@ -9,9 +9,9 @@
|
||||
<remote-id type="github">B-Lang-org/bsc</remote-id>
|
||||
</upstream>
|
||||
<longdescription lang="en">
|
||||
This is a compiler, simulator, and associated tools for Bluespec High Level
|
||||
Hardware Design Language (HL-HDL), supporting the two optional syntaxes,
|
||||
BSV and BH. Language specifications and tutorials are available in the
|
||||
BSVlang repository.
|
||||
This is a compiler, simulator, and associated tools for Bluespec High Level
|
||||
Hardware Design Language (HL-HDL), supporting the two optional syntaxes,
|
||||
BSV and BH. Language specifications and tutorials are available in the
|
||||
BSVlang repository.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
||||
|
||||
Reference in New Issue
Block a user