```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 'jbig2dec'
|
|
# Rebuild and test mupdf for updates, it refuses to start when versions are unmatched
|
|
pkgname=jbig2dec
|
|
version=0.19
|
|
revision=2
|
|
build_style=gnu-configure
|
|
hostmakedepends="automake libtool"
|
|
makedepends="libpng-devel"
|
|
checkdepends="python3"
|
|
short_desc="Decoder implementation of the JBIG2 image compression format"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="AGPL-3.0-or-later"
|
|
homepage="https://www.jbig2dec.com"
|
|
distfiles="https://github.com/ArtifexSoftware/jbig2dec/archive/${version}.tar.gz"
|
|
checksum=e81b787ad0b147a437a52d9ce7de1a8f429655e8aa030383b6b2dd8919373717
|
|
|
|
pre_configure() {
|
|
sed -i '$ d' autogen.sh
|
|
./autogen.sh
|
|
}
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
}
|
|
|
|
jbig2dec-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="libjbig2dec>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|
|
|
|
libjbig2dec_package() {
|
|
short_desc+=" - runtime library"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so.*"
|
|
}
|
|
}
|