void-packages/srcpkgs/waifu2x-converter-cpp/template
Đoàn Trần Công Danh 04b9978a29 srcpkgs/w*: convert patches to -Np1
* wine is kept at -Np0

```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

32 lines
937 B
Bash

# Template file for 'waifu2x-converter-cpp'
pkgname=waifu2x-converter-cpp
version=5.2.4
revision=1
build_style=cmake
configure_args="-DINSTALL_MODELS=ON"
hostmakedepends="pkg-config"
makedepends="libopencv-devel opencl2-headers"
short_desc="Image upscaling using deep convolutional neural networks"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="MIT"
homepage="https://github.com/DeadSix27/waifu2x-converter-cpp"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=e10bd5c64015553d1340988cf886aa51ed3cf4108f1a3ba864b3ea818426de7d
# silly workaround to prevent vector/bool/etc from being defined
case "$XBPS_TARGET_MACHINE" in
ppc*) CXXFLAGS+=" -D__APPLE_ALTIVEC__";;
esac
CXXFLAGS+=" -DCL_TARGET_OPENCL_VERSION=220"
pre_configure() {
# conv is a generator built with add_executable
# build it before so it is built with the correct
# toolchain
cc -o build/conv conv.c
}
post_install() {
vlicense LICENSE
}