```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 ```
29 lines
695 B
Bash
29 lines
695 B
Bash
# Template file for 'cdecl'
|
|
pkgname=cdecl
|
|
version=2.5
|
|
revision=6
|
|
wrksrc="${pkgname}-blocks-${version}"
|
|
build_style=gnu-makefile
|
|
make_build_args="-e"
|
|
hostmakedepends="flex"
|
|
makedepends="readline-devel"
|
|
short_desc="Compose C and C++ type declarations"
|
|
maintainer="beefcurtains <beefcurtains@voidlinux.org>"
|
|
license="Public Domain"
|
|
homepage="http://cdecl.org/"
|
|
distfiles="${homepage}files/${wrksrc}.tar.gz"
|
|
checksum=9ee6402be7e4f5bb5e6ee60c6b9ea3862935bf070e6cecd0ab0842305406f3ac
|
|
CFLAGS="-DUSE_READLINE"
|
|
|
|
pre_build() {
|
|
flex -l -o cdlex.c cdlex.l
|
|
sed -i 's/getline/cdgetline/' cdecl.c
|
|
export LIBS="$LDFLAGS -lreadline"
|
|
}
|
|
|
|
do_install() {
|
|
vbin c++decl
|
|
vbin cdecl
|
|
vman cdecl.1
|
|
vman c++decl.1
|
|
}
|