void-packages/srcpkgs/bumblebee/template
Đoàn Trần Công Danh c6ce65d3d0 srcpkgs/b*: 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

41 lines
1.2 KiB
Bash

# Template file for 'bumblebee'
pkgname=bumblebee
version=3.2.1
revision=8
archs="i686 x86_64"
build_style=gnu-configure
configure_args="
CONF_DRIVER_MODULE_NVIDIA=nvidia
CONF_LDPATH_NVIDIA=/usr/lib
CONF_MODPATH_NVIDIA=/usr/lib/nvidia/xorg,/usr/lib/xorg/modules
--with-udev-rules=/usr/lib/udev/rules.d/
--without-pidfile"
conf_files="
/etc/bumblebee/bumblebee.conf
/etc/bumblebee/xorg.conf.nouveau
/etc/bumblebee/xorg.conf.nvidia"
hostmakedepends="automake autoconf-archive pkg-config help2man"
makedepends="VirtualGL-devel glib-devel MesaLib-devel libkmod-devel"
depends="VirtualGL"
short_desc="NVIDIA Optimus support for Linux through VirtualGL"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="http://www.bumblebee-project.org/"
distfiles="http://www.bumblebee-project.org/${pkgname}-${version}.tar.gz"
checksum=1018703b07e2f607a4641249d69478ce076ae5a1e9dd6cff5694d394fa7ee30e
system_groups="bumblebee"
CFLAGS="-fcommon"
pre_configure() {
autoreconf -fi
}
post_install() {
vsv bumblebeed
# Make bash_completion work
vmkdir usr/share/bash-completion/completions
mv -v ${DESTDIR}/etc/bash_completion.d/bumblebee \
${DESTDIR}/usr/share/bash-completion/completions/optirun
}