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

58 lines
1.9 KiB
Bash

# Template file for 'libffado'
pkgname=libffado
version=2.4.4
revision=3
build_style=scons
make_build_args="PREFIX=/usr MANDIR=/usr/share/man
UDEVDIR=/usr/lib/udev/rules.d CUSTOM_ENV=1 BUILD_TESTS=0
ENABLE_OPTIMIZATIONS=0 DEBUG=0 PYTHON_INTERPRETER=/usr/bin/python3
DETECT_USERSPACE_ENV=0 PYPKGDIR=/${py3_sitelib}
DIST_TARGET=none DETECT_USERSPACE_ENV=0"
make_install_args="$make_build_args WILL_DEAL_WITH_XDG_MYSELF=1"
hostmakedepends="pkg-config xdg-utils python3-PyQt5-devel-tools which"
makedepends="libxml++-devel libdbus-c++-devel libsigc++-devel libconfig++-devel
jack-devel libavc1394-devel libiec61883-devel libraw1394-devel alsa-lib-devel
python3-PyQt5-dbus"
depends="libffado-python"
short_desc="Library for accessing BeBoB IEEE1394 devices"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="GPL-2.0-only, GPL-3.0-only"
homepage="http://www.ffado.org"
distfiles="http://www.ffado.org/files/libffado-${version}.tgz"
checksum=a47178cdc8c0c91e91edbaabe23d19ca12a752cbcf81c27314adb27cc00d60f0
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" argp-standalone" ;;
esac
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl) # Requires argp functions
vsed -i 's;-lffado";-lffado -largp";' support/tools/SConscript
vsed -i 's;-lpthread";-lpthread -largp";' support/firmware/SConscript
vsed -i 's;"pthread";"pthread", "argp";' support/dbus/SConscript
esac
}
post_install() {
vinstall support/xdg/ffado.org-ffadomixer.desktop 644 usr/share/applications ffadomixer.desktop
vinstall support/xdg/hi64-apps-ffado.png 644 usr/share/pixmaps ffado.png
}
libffado-python_package() {
depends="python3-PyQt5-dbus python3-dbus"
short_desc+=" - python3 bindings"
pkg_install() {
vmove ${py3_sitelib}
}
}
libffado-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}