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

36 lines
981 B
Bash

# Template file for 'openjpeg2'
pkgname=openjpeg2
version=2.4.0
revision=2
wrksrc="openjpeg-${version}"
build_style=cmake
configure_args="-DCMAKE_BUILD_TYPE=None"
makedepends="libpng-devel lcms2-devel tiff-devel"
short_desc="Open-source JPEG 2000 codec written in C language (Version 2)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-2-Clause"
homepage="http://www.openjpeg.org/"
distfiles="https://github.com/uclouvain/openjpeg/archive/v${version}.tar.gz"
checksum=8702ba68b442657f11aaeb2b338443ca8d5fb95b0d845757968a7be31ef7f16d
post_install() {
vlicense LICENSE
}
libopenjpeg2-devel_package() {
short_desc+=" - development files"
depends="libopenjpeg2>=${version}_${revision} ${sourcepkg}-${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove "usr/lib/openjpeg-2.*"
vmove "usr/lib/*.a"
vmove usr/lib/pkgconfig
}
}
libopenjpeg2_package() {
short_desc+=" - library files"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}