void-packages/srcpkgs/allegro4/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

40 lines
1.2 KiB
Bash

# Template file for 'allegro4'
pkgname=allegro4
version=4.4.3.1
revision=2
wrksrc="allegro-${version}"
build_style=cmake
configure_args="-DWANT_DOCS=OFF"
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"
# libGL.so is dlopen()ed.
depends="virtual?libGL"
short_desc="Portable library mainly aimed at video game and multimedia programming"
maintainer="Orphaned <orphan@voidlinux.org>"
license="custom:Allegro"
homepage="http://alleg.sourceforge.net/"
homepage="https://liballeg.org"
distfiles="https://github.com/liballeg/allegro5/releases/download/${version}/allegro-${version}.tar.gz"
checksum=ec19dbc9a021244582b4819b3583ee594b50141f9fcf6944a4ed8069cbf8d4d4
pre_configure() {
if [ "$CROSS_BUILD" ]; then
configure_args+=" -C ${FILESDIR}/TryRunResults.cmake"
fi
}
post_install() {
vlicense docs/txt/license.txt
}
allegro4-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/bin/allegro-config
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}