e2a21ccfd6
```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 ```
42 lines
1 KiB
Bash
42 lines
1 KiB
Bash
# Template file for 'zinnia'
|
|
pkgname=zinnia
|
|
version=0.06
|
|
revision=1
|
|
build_style=gnu-configure
|
|
hostmakedepends="libtool pkg-config"
|
|
makedepends="libtool pkg-config"
|
|
short_desc="OCR system for hand-written input"
|
|
maintainer="Matthias von Faber <mvf@gmx.eu>"
|
|
license="BSD-2-Clause"
|
|
homepage="https://taku910.github.io/zinnia/"
|
|
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}/${version}/${pkgname}-${version}.tar.gz"
|
|
checksum=ece3af93f937282971634fd81d3e997f848e8cfa958220e26a4564ca064ac20b
|
|
|
|
post_install() {
|
|
vlicense COPYING
|
|
}
|
|
|
|
libzinnia_package() {
|
|
short_desc+=" - runtime library"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so.*"
|
|
}
|
|
}
|
|
|
|
pre_build() {
|
|
# Force flags from environment
|
|
sed -i -e 's|^CFLAGS\b|#CFLAGS|' \
|
|
-e 's|^CXXFLAGS\b|#CXXFLAGS|' \
|
|
-e 's|^LDFLAGS\b|#LDFLAGS|' Makefile
|
|
}
|
|
|
|
libzinnia-devel_package() {
|
|
depends="lib${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|