void-packages/srcpkgs/PrusaSlicer/template
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-Z]*: 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

29 lines
1.1 KiB
Bash

# Template file for 'PrusaSlicer'
pkgname=PrusaSlicer
version=2.3.0
revision=1
wrksrc="PrusaSlicer-version_${version}"
build_style=cmake
build_helper="qemu"
configure_args="-DSLIC3R_WX_STABLE=1 -DSLIC3R_FHS=1 -DSLIC3R_GTK=3"
hostmakedepends="pkg-config"
makedepends=" boost-devel cereal cgal-devel dbus-devel eigen glew-devel
glu-devel gmpxx-devel gtest-devel gtk+3-devel libcurl-devel libglib-devel
libpng-devel nlopt-devel openvdb-devel tbb-devel wxWidgets-devel
wxWidgets-gtk3-devel"
short_desc="G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)"
maintainer="Jasper Chan <jasperchan515@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://www.prusa3d.com/prusaslicer/"
distfiles="https://github.com/prusa3d/Prusaslicer/archive/version_${version}.tar.gz"
checksum=cd3bac5e29b5441fc4690f28cd7b1064e97dc00207bbdc88f7bd7832308d6ca5
nocross="https://build.voidlinux.org/builders/armv7l_builder/builds/25230/steps/shell_3/logs/stdio"
Slic3rPE_package() {
build_style=meta
depends="${sourcepkg}>=${version}_${revision}"
}
post_install() {
vinstall ${FILESDIR}/prusa-slicer.desktop 644 usr/share/applications
}