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

33 lines
991 B
Bash

# Template file for 'bullet'
pkgname=bullet
version=3.17
revision=1
wrksrc="bullet3-${version}"
build_style=cmake
configure_args="-DBUILD_SHARED_LIBS=1 -DBUILD_BULLET2_DEMOS=1 -DBUILD_CPU_DEMOS=0
-DBUILD_UNIT_TESTS=1 -DBUILD_OPENGL3_DEMOS=1 -DBUILD_EXTRAS=1 -DINSTALL_EXTRA_LIBS=1
-DINSTALL_LIBS=1"
makedepends="glu-devel"
short_desc="3D Collision Detection and Rigid Body Dynamics Library"
maintainer="John <me@johnnynator.dev>"
license="Zlib"
homepage="http://www.bulletphysics.com/Bullet/"
distfiles="https://github.com/bulletphysics/bullet3/archive/${version}.tar.gz"
checksum=baa642c906576d4d98d041d0acb80d85dd6eff6e3c16a009b1abf1ccd2bc0a61
shlib_provides="libOpenGLWindow.so libgwen.so"
post_install() {
vlicense LICENSE.txt
}
bullet-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/libBullet*.so"
vmove "usr/lib/*.a"
vmove usr/lib/pkgconfig
vmove usr/lib/cmake
}
}