void-packages/srcpkgs/perl-Text-BibTeX/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```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

36 lines
1.2 KiB
Bash

# Template file for 'perl-Text-BibTeX'
pkgname=perl-Text-BibTeX
version=0.88
revision=2
wrksrc="${pkgname/perl-/}-${version}"
build_style=perl-ModuleBuild
hostmakedepends="perl-ExtUtils-LibBuilder perl-Config-AutoConf"
makedepends="perl perl-Capture-Tiny"
depends="${makedepends}"
short_desc="Text::BibTeX - interface to read and parse BibTeX files"
maintainer="svenper <svenper@tuta.io>"
license="Artistic-1.0-Perl, GPL-1.0-or-later"
homepage="https://metacpan.org/release/Text-BibTeX/"
distfiles="${CPAN_SITE}/Text/${pkgname/perl-/}-${version}.tar.gz"
checksum=b014586e68bdbcafb0a2cfa0401eb0a04ea5de8c4d5bc36dd0f7faeab6acf42c
if [ "$CROSS_BUILD" ]; then
_perlprefix=${XBPS_STATEDIR}/perlprefix-${XBPS_TARGET_MACHINE}
export PERL5LIB=$_perlprefix
do_build() {
mkdir -p $_perlprefix
cp "$XBPS_CROSS_BASE/usr/lib/perl5/core_perl/Config"*.p? $_perlprefix
cp "$XBPS_CROSS_BASE/usr/lib/perl5/core_perl/Errno.pm" $_perlprefix
sed -i -e "s;archlibexp => '\(.*\)';archlibexp => '${XBPS_CROSS_BASE}\1';" \
${_perlprefix}/Config.pm
sed -i -e "s;^archlibexp='\(.*\)';archlibexp='${XBPS_CROSS_BASE}\1';" \
${_perlprefix}/Config_heavy.pl
LD="$CC" ./Build ${make_build_args}
}
fi
do_install() {
LD="$CC" ./Build ${make_install_args} install
}