void-packages/srcpkgs/yosys/template
Đ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

42 lines
1 KiB
Bash

# Template file for 'yosys'
pkgname=yosys
# Remember to correct _gitrev on updating
_gitrev=1979e0b
version=0.9
revision=3
wrksrc=${pkgname}-${pkgname}-${version}
build_style=gnu-makefile
make_use_env=yes
hostmakedepends="python3 bison flex pkg-config tcl"
makedepends="tcl-devel readline-devel libffi-devel"
depends="graphviz xdot berkeley-abc"
short_desc="Verilog RTL Synthesis Suite"
maintainer="Jasper Chan <jasperchan515@gmail.com>"
license="ISC, MIT"
homepage="http://www.clifford.at/yosys/about.html"
distfiles="https://github.com/cliffordwolf/yosys/archive/yosys-${version}.tar.gz"
checksum=f2e31371f9cf1b36cb4f57b23fd6eb849adc7d935dcf49f3c905aa5136382c2f
post_patch() {
vsed -i -e 's,-I[$](PREFIX)/include,,' \
-e '/CXX = gcc/d' \
-e '/LD = gcc/d' \
-e "s/^GIT_REV :=.*/GIT_REV := $_gitrev/" \
Makefile
}
do_configure() {
cat <<-EOF >Makefile.conf
ABCEXTERNAL := abc
CONFIG := gcc
LD := $CC
PREFIX := /usr
PRETTY := 0
TCL_INCLUDE := $XBPS_CROSS_BASE/usr/include
EOF
}
post_install() {
vlicense COPYING
vlicense libs/minisat/LICENSE
}