void-packages/srcpkgs/gpgme/template
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

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

87 lines
2.3 KiB
Bash

# Template file for 'gpgme'
pkgname=gpgme
version=1.15.1
revision=1
build_style=gnu-configure
configure_args="--enable-fd-passing
--with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
--with-libassuan-prefix=$XBPS_CROSS_BASE/usr"
hostmakedepends="gnupg2 pkg-config qt5-host-tools qt5-qmake"
makedepends="libassuan-devel qt5-tools-devel"
depends="gnupg2"
short_desc="GnuPG Made Easy"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://www.gnupg.org/software/gpgme/index.html"
distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
configure_args+=" ac_cv_sys_file_offset_bits=no"
elif [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
CFLAGS="-D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1"
CXXFLAGS="${CFLAGS}"
fi
CXXFLAGS+=" -D_GLIBCXX_USE_C99_STDIO=1"
post_extract() {
vsed -i 's|GPG = gpg|GPG = gpg2|g' \
tests/gpg/Makefile.* tests/json/Makefile.* \
lang/qt/tests/Makefile.* lang/python/tests/Makefile.*
}
libgpgme_package() {
short_desc+=" - library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
gpgme-devel_package() {
depends="${makedepends/qt5-tools-devel/} libgpgme>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/lib/pkgconfig
vmove usr/bin/gpgme-config
vmove usr/include/gpgme.h
vmove usr/share
vmove usr/lib/libgpgme.so
}
}
gpgmepp_package() {
short_desc+=" - C++ library"
pkg_install() {
vmove usr/lib/libgpgmepp.so.*
}
}
gpgmepp-devel_package() {
depends="gpgme-devel>=${version}_${revision} gpgmepp>=${version}_${revision}"
short_desc+=" - C++ library development files"
pkg_install() {
vmove usr/include/gpgme++
vmove usr/lib/libgpgmepp.so
vmove usr/lib/cmake/Gpgmepp/GpgmeppConfig.cmake
vmove usr/lib/cmake/Gpgmepp/GpgmeppConfigVersion.cmake
}
}
gpgmeqt_package() {
short_desc+=" - Qt binding"
pkg_install() {
vmove usr/lib/libqgpgme.so.*
}
}
gpgmeqt-devel_package() {
depends="gpgme-devel>=${version}_${revision} gpgmeqt>=${version}_${revision}"
short_desc+=" - Qt binding development files"
pkg_install() {
vmove usr/include/QGpgME
vmove usr/include/qgpgme
vmove usr/lib/libqgpgme.so
vmove usr/lib/cmake/QGpgme
}
}