void-packages/srcpkgs/yosys/patches/debian_patches_0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch
Đoàn Trần Công Danh ad877a7e29 srcpkgs/y*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

21 lines
770 B
Diff

From: Ruben Undheim <ruben.undheim@gmail.com>
Date: Fri, 27 Jul 2018 18:46:13 +0000
Subject: Fix adding of sys.path in yosys-smtbmc
---
backends/smt2/Makefile.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git backends/smt2/Makefile.inc backends/smt2/Makefile.inc
index 92941d4..2c0b7c6 100644
--- a/backends/smt2/Makefile.inc
+++ b/backends/smt2/Makefile.inc
@@ -22,7 +22,7 @@ else
TARGETS += yosys-smtbmc
yosys-smtbmc: backends/smt2/smtbmc.py
- $(P) sed 's|##yosys-sys-path##|sys.path += [os.path.dirname(os.path.realpath(__file__)) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' < $< > $@.new
+ $(P) sed 's|##yosys-sys-path##|sys.path += ["/usr/share/yosys"]|;' < $< > $@.new
$(Q) chmod +x $@.new
$(Q) mv $@.new $@
endif