void-packages/srcpkgs/libretro-mupen64plus-rpi/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

36 lines
1.1 KiB
Bash

# Template file for 'libretro-mupen64plus-rpi'
pkgname=libretro-mupen64plus-rpi
version=20190611
revision=1
archs="armv6l* armv7l*"
_gitrev=e64ef9d9f214e32341fb7cd9633260fbb44b2326
wrksrc="mupen64plus-libretro-${_gitrev}"
hostmakedepends="pkg-config unzip"
makedepends="rpi-userland-devel zlib-devel"
short_desc="Libretro port of Mupen64 Plus"
maintainer="q66 <daniel@octaforge.org>"
license="GPL-3.0-or-later"
homepage="http://www.libretro.com/"
distfiles="https://github.com/libretro/mupen64plus-libretro/archive/${_gitrev}.tar.gz"
checksum=947abfb1d5ff34d6b22fecfb2df02bd3759fde3f4a0e5d238f65ec7e97d964d4
conflicts="ĺibretro-mupen64plus>=0"
CFLAGS="-fcommon"
do_build() {
local _args="ARCH=arm"
case "$XBPS_TARGET_MACHINE" in
armv6*) _args+=" platform=rpi";;
armv7*) _args+=" platform=rpi2";;
esac
install -d /opt/vc/lib
sed -i "s|-L/opt/vc/lib|-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-R /opt/vc/lib|g" Makefile
sed -i 's|/opt/vc/include|${XBPS_CROSS_BASE}/opt/vc/include|g' Makefile
make CC=$CC ${_args} ${makejobs}
}
do_install() {
vinstall mupen64plus_libretro.so 755 usr/lib/libretro
}