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

38 lines
1.2 KiB
Bash

# Template file for 'VeraCrypt'
pkgname=VeraCrypt
version=1.24
revision=1
_realversion="${version}-Update2"
wrksrc="${pkgname}-${pkgname}_${_realversion}"
build_wrksrc=src
build_style=gnu-makefile
make_build_args="WX_CONFIG=wx-config-gtk3"
make_use_env=1
hostmakedepends="pkg-config yasm unzip"
makedepends="fuse-devel wxWidgets-gtk3-devel"
short_desc="Disk encryption with strong security based on TrueCrypt"
maintainer="Gustavo Heinz <gustavoheinz95@gmail.com>"
license="Apache-2.0, custom:TrueCrypt-3.0"
homepage="https://www.veracrypt.fr"
distfiles="https://www.veracrypt.fr/code/VeraCrypt/snapshot/VeraCrypt-VeraCrypt_${_realversion}.tar.gz"
checksum=cbdecffdfc258dccca6de1b79759e673dee3329280849b10d8253e802d45b41e
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) ;;
*) make_build_args+=' NOASM=1' ;;
esac
if [ "$CROSS_BUILD" ]; then
make_build_args+=' NOTEST=1'
fi
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
broken="Error: TestFailed at VeraCrypt::TestCipher:181"
fi
do_install() {
vbin Main/veracrypt
vlicense License.txt
vinstall Setup/Linux/veracrypt.desktop 644 usr/share/applications/
vinstall Resources/Icons/VeraCrypt-256x256.xpm 644 usr/share/pixmaps/ veracrypt.xpm
}