Enable "show" functionality.

From Alessandro De Laurenzis (maintainer); thanks!
This commit is contained in:
bentley 2019-04-30 07:21:58 +00:00
parent 42b40502de
commit 8843e66511
2 changed files with 18 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.5 2019/04/28 22:35:40 naddy Exp $
# $OpenBSD: Makefile,v 1.6 2019/04/30 07:21:58 bentley Exp $
COMMENT = framework for Verilog RTL synthesis
@ -6,7 +6,7 @@ GH_ACCOUNT = YosysHQ
GH_PROJECT = yosys
GH_TAGNAME = yosys-0.8
DISTNAME = ${GH_TAGNAME}
REVISION = 1
REVISION = 2
CATEGORIES = cad
@ -31,6 +31,7 @@ BUILD_DEPENDS = devel/bison \
RUN_DEPENDS = cad/abc \
math/graphviz \
graphics/xdot \
shells/bash
LIB_DEPENDS = ${MODTCL_LIB_DEPENDS} \
@ -58,7 +59,7 @@ FAKE_FLAGS = PREFIX="${TRUEPREFIX}"
do-configure:
@${SUBST_CMD} ${WRKSRC}/kernel/yosys.cc
@cd ${WRKBUILD} && exec ${MAKE_PROGRAM} config-gcc
@cd ${WRKBUILD} && exec env -i ${MAKE_ENV} ${MAKE_PROGRAM} config-gcc
post-install:
${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-passes_cmds_show_cc,v 1.1 2019/04/30 07:21:58 bentley Exp $
Index: passes/cmds/show.cc
--- passes/cmds/show.cc.orig
+++ passes/cmds/show.cc
@@ -847,7 +847,7 @@ struct ShowPass : public Pass {
log_cmd_error("Shell command failed!\n");
} else
if (format.empty()) {
- std::string cmd = stringf("{ test -f '%s.pid' && fuser -s '%s.pid'; } || ( echo $$ >&3; exec xdot '%s'; ) 3> '%s.pid' &", dot_file.c_str(), dot_file.c_str(), dot_file.c_str(), dot_file.c_str());
+ std::string cmd = stringf("test -f '%s.pid' -a -n \"`fuser '%s.pid' 2>/dev/null`\" || ( echo $$ >&3; exec xdot '%s'; ) 3> '%s.pid' &", dot_file.c_str(), dot_file.c_str(), dot_file.c_str(), dot_file.c_str());
log("Exec: %s\n", cmd.c_str());
if (run_command(cmd) != 0)
log_cmd_error("Shell command failed!\n");