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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 97EF013835C for ; Wed, 6 Jan 2021 09:15:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6685CE08D3; Wed, 6 Jan 2021 09:15:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 389CCE08D3 for ; Wed, 6 Jan 2021 09:15:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 13F4834121D for ; Wed, 6 Jan 2021 09:15:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B98DE48D for ; Wed, 6 Jan 2021 09:15:38 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1609880266.b37093aa8d6edbdb34092ecc7dd0f06c5e97e5e5.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: sci-electronics/bsc/files/, sci-electronics/bsc/ X-VCS-Repository: repo/proj/guru X-VCS-Files: sci-electronics/bsc/bsc-9999.ebuild sci-electronics/bsc/files/bsc-9999-fix-libdir.patch X-VCS-Directories: sci-electronics/bsc/files/ sci-electronics/bsc/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: b37093aa8d6edbdb34092ecc7dd0f06c5e97e5e5 X-VCS-Branch: master Date: Wed, 6 Jan 2021 09:15:38 +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: 2c7ca3aa-bb27-4d34-84cc-96c11fdb3055 X-Archives-Hash: 0723eec2613ba759b7356c3c5333ab97 commit: b37093aa8d6edbdb34092ecc7dd0f06c5e97e5e5 Author: Huang Rui gmail com> AuthorDate: Tue Jan 5 20:57:46 2021 +0000 Commit: Andrew Ammerlaan riseup net> CommitDate: Tue Jan 5 20:57:46 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b37093aa sci-electronics/bsc: add DOC, and patch Fix libdir problem, move it from lib to lib64 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Huang Rui gmail.com> sci-electronics/bsc/bsc-9999.ebuild | 16 +- .../bsc/files/bsc-9999-fix-libdir.patch | 247 +++++++++++++++++++++ 2 files changed, 261 insertions(+), 2 deletions(-) diff --git a/sci-electronics/bsc/bsc-9999.ebuild b/sci-electronics/bsc/bsc-9999.ebuild index d76b4f5f..6feedbbe 100644 --- a/sci-electronics/bsc/bsc-9999.ebuild +++ b/sci-electronics/bsc/bsc-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -DESCRIPTION="Bluespec High Level Hardware Design Language" +DESCRIPTION="Bluespec high level hardware design language compiler" HOMEPAGE="https://github.com/B-Lang-org/bsc" if [[ ${PV} == "9999" ]] ; then @@ -16,6 +16,8 @@ fi LICENSE="BSD GPL-3+ MIT" SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" RDEPEND=" dev-haskell/old-time:0= @@ -38,6 +40,16 @@ BDEPEND=" sys-devel/flex " +PATCHES=( + "${FILESDIR}"/${PN}-9999-fix-libdir.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="${D}" install + emake PREFIX="${ED%/}"/usr LIBDIR="${ED%/}"/usr/$(get_libdir) install + einstalldocs } diff --git a/sci-electronics/bsc/files/bsc-9999-fix-libdir.patch b/sci-electronics/bsc/files/bsc-9999-fix-libdir.patch new file mode 100644 index 00000000..4bf42184 --- /dev/null +++ b/sci-electronics/bsc/files/bsc-9999-fix-libdir.patch @@ -0,0 +1,247 @@ +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..dda30ac 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 +@@ -390,6 +392,7 @@ $(BINDIR)/core/%: % + $(BINDIR)/%: wrapper.sh $(BINDIR)/core/% + mkdir -p -m 755 $(BINDIR) + $(INSTALL) -m 755 wrapper.sh $(BINDIR)/$(@F) ++ cat $(BINDIR)/$(@F) | $(SED) -e "s:^LIBDIR=.*$$:LIBDIR=\"$(abspath $(LIBDIR))\":g" > $(BINDIR)/$(@F) + + .PHONY: install-bsc + install-bsc: $(addprefix $(BINDIR)/,$(BSCEXES)) +diff --git a/src/comp/wrapper.sh b/src/comp/wrapper.sh +index 656e9a0..fa1a052 100755 +--- a/src/comp/wrapper.sh ++++ b/src/comp/wrapper.sh +@@ -5,9 +5,22 @@ + 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 ++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