void-packages/srcpkgs/smpeg2/template
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

39 lines
1 KiB
Bash

# Template file for 'smpeg2'
pkgname=smpeg2
version=2.0.0
revision=5
build_style=gnu-configure
makedepends="SDL2-devel"
short_desc="SDL2 MPEG Player Library"
maintainer="rogi <rogi@skylittlesystem.org>"
license="LGPL-2.1-or-later"
homepage="https://icculus.org/smpeg/"
distfiles="https://www.libsdl.org/projects/smpeg/release/smpeg2-${version}.tar.gz"
checksum=979a65b211744a44fa641a9b6e4d64e64a12ff703ae776bafe3c4c4cd85494b3
# Package build options
build_options="rpi"
case "$XBPS_TARGET_MACHINE" in
# Enable OpenGL/ES on rpi platforms
armv[67]*) build_options_default="rpi" ;;
esac
if [ "$build_option_rpi" ]; then
# Use Videocore IV on Raspberry Pi
makedepends+=" rpi-userland-devel"
LDFLAGS="-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-rpath=/opt/vc/lib -lbcm_host"
fi
smpeg2-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin/smpeg2-config
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/share/aclocal
}
}