void-packages/srcpkgs/libgme/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

31 lines
921 B
Bash

# Template file for 'libgme'
pkgname=libgme
version=0.6.3
revision=1
wrksrc="game-music-emu-${version}"
build_style=cmake
configure_args="-DENABLE_UBSAN=OFF"
makedepends="zlib-devel SDL2-devel"
short_desc="Video game music file emulation/playback library"
maintainer="Pierre Allegraud <pierre.allegraud@crans.org>"
license="LGPL-2.1-or-later"
homepage="https://bitbucket.org/mpyne/game-music-emu/wiki/Home"
distfiles="https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-${version}.tar.xz"
checksum=aba34e53ef0ec6a34b58b84e28bf8cfbccee6585cebca25333604c35db3e051d
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
CXXFLAGS="-DMSB_FIRST=1"
fi
if [ "$XBPS_TARGET_ENDIAN" = "le" ]; then
CXXFLAGS="-DLSB_FIRST=1"
fi
libgme-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
vmove usr/lib/pkgconfig
}
}