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

30 lines
1 KiB
Bash

# Template file for 'ogmtools'
pkgname=ogmtools
version=1.5
revision=5
build_style=gnu-configure
configure_args="--disable-oggtest --disable-vorbistest --with-dvdread
--with-dvdread-includes=${XBPS_CROSS_BASE}/usr
--with-dvdread-libs=${XBPS_CROSS_BASE}/usr/lib"
hostmakedepends="automake libtool pkg-config"
makedepends="libvorbis-devel libdvdread-devel"
short_desc="Tools for information,extractions or creation of OGG media streams"
maintainer="Martin Riese <grauehaare@gmx.de>"
license="GPL-2.0-only"
homepage="http://www.bunkus.org/videotools/ogmtools/"
distfiles="http://www.bunkus.org/videotools/ogmtools/ogmtools-${version}.tar.bz2"
checksum=c8d61d1dbceb981dc7399c1a85e43b509fd3d071fb8d3ca89ea9385e6e40fdea
CFLAGS="-I./avilib"
CXXFLAGS="${CFLAGS}"
pre_configure() {
mv configure.{in,ac}
autoreconf -if
if [ "$CROSS_BUILD" ]; then
# Fix unneeded error when cross compiling
sed -i configure \
-e '/.*test "$cross_compiling" = yes &&/d' \
-e '/.*as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5/d'
fi
}