app-crypt/gpgme: Sync with Gentoo

It's from Gentoo commit b0bf6bfb38512eaeccce1aed24ee3c80a2e911b0.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2025-10-13 07:06:19 +00:00 committed by Krzesimir Nowak
parent ace8bae8ea
commit 9308d859de
5 changed files with 93 additions and 209 deletions

View File

@ -1,4 +1,4 @@
DIST gpgme-1.24.3.tar.bz2 1892862 BLAKE2B ace04d4fc803f6ce96f850a46b4b383ebdcbfe51d55fbe2a5ced10451310553c15ee5a603d1e6ffb78a8de75461fafacc296fec3e4f38d4908171a095cab185f SHA512 3b5fc22a2f83576058ac14e744333f46df362b39f742d6c9e54a5a66828194a1312f5f365bdc15683e148821f5d591fa92a2daad83fc116f65dccf14e817ca48
DIST gpgme-1.24.3.tar.bz2.sig 238 BLAKE2B 5b8402b011899faae26bcba428e45a7bb7baf9b16e4c605cdae3d84dc1cbf52ccd524181ef0726e25075c42f9ccb72cd996707a2f96c04b7054cc9050270b586 SHA512 056b28b041dd83c86984e73c31403ea45d33db30c1b2b05e45b0cfb5bb723b25a0fa21ddee192c135cea5d93d934502085bc0fc94fa3c29858513e260c332948
DIST gpgme-2.0.0.tar.bz2 1383911 BLAKE2B 7053955f80f9a69c62d8b4bb6cc80ea259e6854857b340577c4a68fac1d34c0f2aff1dbbf88b503dd2b021c48d9fff67709593817f3b0e74f72df913d7e3de0d SHA512 ee58dc2a4273c740d5b9ef13cc655d5e600ddddd137fb85a781c31e8854829283b4ce241d7810a963d9a125d603213600f37e7d0c1ce3b3cf1b935e62cf60777 DIST gpgme-2.0.0.tar.bz2 1383911 BLAKE2B 7053955f80f9a69c62d8b4bb6cc80ea259e6854857b340577c4a68fac1d34c0f2aff1dbbf88b503dd2b021c48d9fff67709593817f3b0e74f72df913d7e3de0d SHA512 ee58dc2a4273c740d5b9ef13cc655d5e600ddddd137fb85a781c31e8854829283b4ce241d7810a963d9a125d603213600f37e7d0c1ce3b3cf1b935e62cf60777
DIST gpgme-2.0.0.tar.bz2.sig 119 BLAKE2B 3fe43a1047f8fba1fe793b5f501b9902067b3eea8d08713c4358d78b7c0c19b82e417251dbe602d04c2f945e46e0c5651bead5a2bf59dfc0861d1e9261893a98 SHA512 fc7b3cafd0e9d830c1709a086185047ecf118997feaa8896707917c420d12386c6e298116b457fea478c2e2f85fc9413ab3fa268a1798793377e4739419fde66 DIST gpgme-2.0.0.tar.bz2.sig 119 BLAKE2B 3fe43a1047f8fba1fe793b5f501b9902067b3eea8d08713c4358d78b7c0c19b82e417251dbe602d04c2f945e46e0c5651bead5a2bf59dfc0861d1e9261893a98 SHA512 fc7b3cafd0e9d830c1709a086185047ecf118997feaa8896707917c420d12386c6e298116b457fea478c2e2f85fc9413ab3fa268a1798793377e4739419fde66
DIST gpgme-2.0.1.tar.bz2 1392080 BLAKE2B b2dbc41abf6947b335307e5add09ff6104d3666998e2ae0efed518b5a0cfbced8a64b24b7567666fcf392bdb07ba01c1c2e4cb27a7b53569ce92f73661e5e1a4 SHA512 ad19169594b6048b11df9311080e179232ff03def08f377e7d7536a3a91e12f722cbae93e80364b73db013152b327bc3457ec9a9ddea9c660d74f389f6ab8837
DIST gpgme-2.0.1.tar.bz2.sig 147 BLAKE2B 3d2a6c19d052ba9885298bf90156cf43fda86b837902bf5ec74bb9bf2fdde693a2ef74fc533c0e8921fb6a24eafd5dac8bbfcd930aaf13656358e7db62333783 SHA512 53f45e0d61d3fca5965ecaf32fb8c0d75517d7267901da1f4facb664595d55713378161774415bbd5491f52d934944750478da8de9ddef0fec1d4702fac36100

View File

@ -1,26 +0,0 @@
https://dev.gnupg.org/T6778
--- a/lang/python/tests/support.py
+++ b/lang/python/tests/support.py
@@ -46,13 +46,15 @@ def is_gpg_version(version):
def have_tofu_support(ctx, some_uid):
- keys = list(
- ctx.keylist(
- some_uid,
- mode=(gpg.constants.keylist.mode.LOCAL |
- gpg.constants.keylist.mode.WITH_TOFU)))
- return len(keys) > 0
-
+ try:
+ keys = list(
+ ctx.keylist(
+ some_uid,
+ mode=(gpg.constants.keylist.mode.LOCAL |
+ gpg.constants.keylist.mode.WITH_TOFU)))
+ return len(keys) > 0
+ except gpg.errors.GPGMEError:
+ return False
# Skip the Python tests for GnuPG < 2.1.12. Prior versions do not
# understand the command line flags that we assume exist. C.f. issue

View File

@ -1,180 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintainers should:
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
# (find the one for the current release then subscribe to it +
# any subsequent ones linked within so you're covered for a while.)
DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} )
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
# in-source builds are not supported:
# * https://dev.gnupg.org/T6313#166339
# * https://dev.gnupg.org/T6673#174545
inherit distutils-r1 libtool flag-o-matic out-of-source qmake-utils toolchain-funcs verify-sig
DESCRIPTION="GnuPG Made Easy is a library for making GnuPG easier to use"
HOMEPAGE="https://www.gnupg.org/related_software/gpgme"
SRC_URI="
mirror://gnupg/gpgme/${P}.tar.bz2
verify-sig? ( mirror://gnupg/gpgme/${P}.tar.bz2.sig )
"
LICENSE="GPL-2 LGPL-2.1"
# Please check ABI on each bump, even if SONAMEs didn't change: bug #833355
# Use e.g. app-portage/iwdevtools integration with dev-libs/libabigail's abidiff.
# Subslot: SONAME of each: <libgpgme.libgpgmepp.libqgpgme.FUDGE>
# Bump FUDGE if a release is made which breaks ABI without changing SONAME.
# (Reset to 0 if FUDGE != 0 if libgpgme/libgpgmepp/libqpggme change.)
SLOT="1/11.6.15.2"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="common-lisp static-libs +cxx python qt5 qt6 test"
RESTRICT="!test? ( test )"
REQUIRED_USE="
qt5? ( cxx )
qt6? ( cxx )
python? ( ${PYTHON_REQUIRED_USE} )
"
# - On each bump, update dep bounds on each version from configure.ac!
COMMON_DEPEND="
>=app-crypt/gnupg-2
>=dev-libs/libassuan-2.5.3:=
>=dev-libs/libgpg-error-1.46-r1:=
python? ( ${PYTHON_DEPS} )
qt5? ( dev-qt/qtcore:5 )
qt6? ( dev-qt/qtbase:6 )
"
DEPEND="${COMMON_DEPEND}
test? ( qt5? ( dev-qt/qttest:5 ) )
"
RDEPEND="${COMMON_DEPEND}
cxx? ( !>=dev-cpp/gpgmepp-2 )
python? ( !>dev-python/gpgmepy-1.9999 )
qt6? ( !>=dev-libs/qgpgme-2 )
"
#doc? ( app-text/doxygen[dot] )
BDEPEND="
python? (
${PYTHON_DEPS}
${DISTUTILS_DEPS}
dev-lang/swig
)
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
PATCHES=(
"${FILESDIR}"/${PN}-1.18.0-tests-start-stop-agent-use-command-v.patch
"${FILESDIR}"/${PN}-1.23.1-tests-gnupg-no-tofu.patch
)
src_prepare() {
default
elibtoolize
# bug #697456
addpredict /run/user/$(id -u)/gnupg
local MAX_WORKDIR=66
if use test && [[ "${#WORKDIR}" -gt "${MAX_WORKDIR}" ]]; then
eerror "Unable to run tests as WORKDIR='${WORKDIR}' is longer than ${MAX_WORKDIR} which causes failure!"
die "Could not run tests as requested with too-long WORKDIR."
fi
# Make best effort to allow longer PORTAGE_TMPDIR
# as usock limitation fails build/tests
ln -s "${P}" "${WORKDIR}/b" || die
S="${WORKDIR}/b"
}
my_src_configure() {
# bug #847955
append-lfs-flags
cd "${BUILD_DIR}" || die
local languages=(
$(usev common-lisp 'cl')
$(usev cxx 'cpp')
$(usev qt5 'qt5')
$(usev qt6 'qt6')
)
use qt5 && export MOC5="$(qt5_get_bindir)/moc"
use qt6 && export MOC6="$(qt6_get_libdir)/qt6/libexec/moc"
local myeconfargs=(
$(use test || echo "--disable-gpgconf-test --disable-gpg-test --disable-gpgsm-test --disable-g13-test")
--enable-languages="${languages[*]}"
$(use_enable static-libs static)
GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config"
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
if use python ; then
emake -C lang/python prepare
pushd lang/python > /dev/null || die
top_builddir="../.." srcdir="${S}/lang/python" CPP="$(tc-getCPP)" distutils-r1_src_configure
popd > /dev/null || die
fi
}
my_src_compile() {
cd "${BUILD_DIR}" || die
emake
if use python ; then
pushd lang/python > /dev/null || die
top_builddir="../.." srcdir="${S}/lang/python" CPP="$(tc-getCPP)" distutils-r1_src_compile
popd > /dev/null || die
fi
}
my_src_test() {
cd "${BUILD_DIR}" || die
emake check
if use python ; then
distutils-r1_src_test
fi
}
python_test() {
emake -C lang/python/tests check \
PYTHON=${EPYTHON} \
PYTHONS=${EPYTHON} \
TESTFLAGS="--python-libdir=${BUILD_DIR}/lib"
}
my_src_install() {
einstalldocs
cd "${BUILD_DIR}" || die
emake DESTDIR="${D}" install
if use python ; then
pushd lang/python > /dev/null || die
top_builddir="../.." srcdir="${S}/lang/python" CPP="$(tc-getCPP)" distutils-r1_src_install
popd > /dev/null || die
fi
find "${ED}" -type f -name '*.la' -delete || die
# Backward compatibility for gentoo
# (in the past, we had slots)
dodir /usr/include/gpgme
dosym -r /usr/include/gpgme.h /usr/include/gpgme/gpgme.h
}

View File

@ -27,7 +27,7 @@ LICENSE="GPL-2 LGPL-2.1"
# Please check ABI on each bump, even if SONAMEs didn't change: bug #833355 # Please check ABI on each bump, even if SONAMEs didn't change: bug #833355
# Subslot: SONAME of each: <libgpgme.FUDGE> # Subslot: SONAME of each: <libgpgme.FUDGE>
SLOT="1/45.0" SLOT="1/45.0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="common-lisp static-libs test" IUSE="common-lisp static-libs test"
RESTRICT="!test? ( test )" RESTRICT="!test? ( test )"

View File

@ -0,0 +1,90 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintainers should:
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
# (find the one for the current release then subscribe to it +
# any subsequent ones linked within so you're covered for a while.)
# out-of-source b/c in-source builds are not supported:
# * https://dev.gnupg.org/T6313#166339
# * https://dev.gnupg.org/T6673#174545
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
inherit libtool flag-o-matic out-of-source verify-sig
DESCRIPTION="GnuPG Made Easy is a library for making GnuPG easier to use"
HOMEPAGE="https://www.gnupg.org/related_software/gpgme"
SRC_URI="
mirror://gnupg/gpgme/${P}.tar.bz2
verify-sig? ( mirror://gnupg/gpgme/${P}.tar.bz2.sig )
"
LICENSE="GPL-2 LGPL-2.1"
# Please check ABI on each bump, even if SONAMEs didn't change: bug #833355
# Subslot: SONAME of each: <libgpgme.FUDGE>
SLOT="1/45.0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="common-lisp static-libs test"
RESTRICT="!test? ( test )"
RDEPEND="
>=app-crypt/gnupg-2
>=dev-libs/libassuan-2.5.3:=
>=dev-libs/libgpg-error-1.46-r1:=
"
DEPEND="${RDEPEND}"
#doc? ( app-text/doxygen[dot] )
BDEPEND="
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
PATCHES=(
"${FILESDIR}"/${PN}-1.18.0-tests-start-stop-agent-use-command-v.patch
)
src_prepare() {
default
elibtoolize
# bug #697456
addpredict /run/user/$(id -u)/gnupg
local MAX_WORKDIR=66
if use test && [[ "${#WORKDIR}" -gt "${MAX_WORKDIR}" ]]; then
eerror "Unable to run tests as WORKDIR='${WORKDIR}' is longer than ${MAX_WORKDIR} which causes failure!"
die "Could not run tests as requested with too-long WORKDIR."
fi
# Make best effort to allow longer PORTAGE_TMPDIR as usock limitation
# fails build/tests.
ln -s "${P}" "${WORKDIR}/b" || die
S="${WORKDIR}/b"
}
my_src_configure() {
# bug #847955
append-lfs-flags
local languages=(
$(usev common-lisp 'cl')
)
local myeconfargs=(
$(use test || echo "--disable-gpgconf-test --disable-gpg-test --disable-gpgsm-test --disable-g13-test")
--enable-languages="${languages[*]}"
$(use_enable static-libs static)
GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config"
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
my_src_install() {
emake DESTDIR="${D}" install
find "${ED}" -type f -name '*.la' -delete || die
}