void-packages/srcpkgs/zip/template
Đoàn Trần Công Danh e2a21ccfd6 srcpkgs/z*: 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

21 lines
692 B
Bash

# Template file for 'zip'
pkgname=zip
version=3.0
revision=6
wrksrc="zip30"
short_desc="Create/update ZIP files compatible with pkzip"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Info-ZIP"
homepage="http://infozip.sf.net/"
distfiles="${SOURCEFORGE_SITE}/infozip/zip30.tar.gz"
checksum=f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369
do_build() {
sed -e "s|generic CC=gcc CPP=\"gcc -E\"|zips CC=$CC CPP=\"$CPP -E\" CFLAGS=\"-DLARGE_FILE_SUPPORT $CFLAGS \${CFLAGS_NOOPT}\" LFLAGS2=\"$LDFLAGS\"|g" -i unix/Makefile
make CC=$CC CPP=$CPP -f unix/Makefile generic_gcc
}
do_install() {
make PREFIX=/usr DESTDIR=${DESTDIR} -f unix/Makefile install
vlicense LICENSE
}