aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuang Rui <vowstar@gmail.com>2022-08-29 04:28:00 +0800
committerHuang Rui <vowstar@gmail.com>2022-08-29 04:28:00 +0800
commit5e60b24573024a7649a269f7566a6acf61099157 (patch)
treed97e5ffd251a96e538af106fff35ec96d971e31e /sci-electronics
parentsci-electronics/bluespec: add eselect bluespec support (diff)
downloadguru-5e60b24573024a7649a269f7566a6acf61099157.tar.gz
guru-5e60b24573024a7649a269f7566a6acf61099157.tar.bz2
guru-5e60b24573024a7649a269f7566a6acf61099157.zip
sci-electronics/bluespec: add eselect support
Fix symbolic link problem Signed-off-by: Huang Rui <vowstar@gmail.com>
Diffstat (limited to 'sci-electronics')
-rw-r--r--sci-electronics/bluespec/bluespec-2022.01.ebuild10
-rw-r--r--sci-electronics/bluespec/bluespec-9999.ebuild25
2 files changed, 33 insertions, 2 deletions
diff --git a/sci-electronics/bluespec/bluespec-2022.01.ebuild b/sci-electronics/bluespec/bluespec-2022.01.ebuild
index 1726325a5..68cd0ea61 100644
--- a/sci-electronics/bluespec/bluespec-2022.01.ebuild
+++ b/sci-electronics/bluespec/bluespec-2022.01.ebuild
@@ -59,6 +59,7 @@ BDEPEND="
dev-texlive/texlive-latexrecommended
dev-texlive/texlive-plaingeneric
)
+ sys-apps/coreutils
sys-devel/autoconf
sys-devel/bison
sys-devel/flex
@@ -82,12 +83,10 @@ src_prepare() {
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") \
@@ -119,6 +118,13 @@ src_install() {
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}
diff --git a/sci-electronics/bluespec/bluespec-9999.ebuild b/sci-electronics/bluespec/bluespec-9999.ebuild
index 1ac42d567..9bec0c105 100644
--- a/sci-electronics/bluespec/bluespec-9999.ebuild
+++ b/sci-electronics/bluespec/bluespec-9999.ebuild
@@ -25,6 +25,7 @@ IUSE="doc test"
RESTRICT="!test? ( test )"
RDEPEND="
+ app-eselect/eselect-bluespec
dev-haskell/old-time:0=
dev-haskell/regex-compat:0=
dev-haskell/split:0=
@@ -58,6 +59,7 @@ BDEPEND="
dev-texlive/texlive-latexrecommended
dev-texlive/texlive-plaingeneric
)
+ sys-apps/coreutils
sys-devel/autoconf
sys-devel/bison
sys-devel/flex
@@ -103,6 +105,14 @@ src_test() {
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
@@ -110,7 +120,22 @@ src_install() {
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
+}