void-packages/srcpkgs/allegro5/template
Đoàn Trần Công Danh ae69000001 srcpkgs/a*: convert patches to -Np1
* arduino and antiword 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

33 lines
1.1 KiB
Bash

# Template file for 'allegro5'
pkgname=allegro5
version=5.2.6.0
revision=1
wrksrc="allegro-${version}"
build_style=cmake
configure_args="-DWANT_DOCS=1 -DWANT_PHYSFS=1"
hostmakedepends="pkg-config"
makedepends="zlib-devel alsa-lib-devel jack-devel libXpm-devel libXxf86vm-devel
libXxf86dga-devel libXcursor-devel libvorbis-devel libpng-devel glu-devel
libjpeg-turbo-devel libtheora-devel freetype-devel libflac-devel physfs-devel
libopenal-devel gtk+-devel opus-devel opusfile-devel"
depends="virtual?libGL"
short_desc="Portable library mainly aimed at video game and multimedia programming"
maintainer="Diogo Leal <diogo@diogoleal.com>"
license="Allegro License (MIT alike)"
homepage="https://liballeg.org/"
distfiles="https://github.com/liballeg/allegro5/releases/download/${version}/allegro-${version}.tar.gz"
checksum=5de8189ec051e1865f359654f86ec68e2a12a94edd00ad06d1106caa5ff27763
post_install() {
vlicense LICENSE.txt
}
allegro5-devel_package() {
short_desc+=" - development files"
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}