gnupg: Add version 1 (#23798)

From the gnupg.org website:

> GnuPG 1.4 is the old, single binary version which still support the
> unsafe PGP-2 keys. However, it lacks many modern features and will
> receive only important updates.

I'm starting to appreciate gpg1 more, because it is relocatable (gng2
has hard-coded paths to gpg-agent and other tools) and it does not
require gpg-agent at all.
This commit is contained in:
Harmen Stoppels 2021-10-04 14:29:41 +02:00 committed by GitHub
parent 50b1b654c9
commit e557730c96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,21 +28,30 @@ class Gnupg(AutotoolsPackage):
version('2.2.3', sha256='cbd37105d139f7aa74f92b6f65d136658682094b0e308666b820ae4b984084b4')
version('2.1.21', sha256='7aead8a8ba75b69866f583b6c747d91414d523bfdfbe9a8e0fe026b16ba427dd')
depends_on('npth@1.2:')
version('1.4.23', sha256='c9462f17e651b6507848c08c430c791287cd75491f8b5a8b50c6ed46b12678ba')
depends_on('libgpg-error@1.24:')
depends_on('npth@1.2:', when='@2:')
depends_on('libgpg-error@1.24:', when='@2:')
depends_on('libgpg-error@1.41:', when='@2.3:')
depends_on('libgcrypt@1.7.0:')
depends_on('libgcrypt@1.7.0:', when='@2:')
depends_on('libgcrypt@1.9.1:', when='@2.3:')
depends_on('libksba@1.3.4:')
depends_on('libassuan@2.4:', when='@:2.2.3')
depends_on('libksba@1.3.4:', when='@2.0.0:')
depends_on('libassuan@2.4:', when='@2.0.0:2.2.3')
depends_on('libassuan@2.5:', when='@2.2.15:')
depends_on('pinentry', type='run')
depends_on('iconv')
depends_on('pinentry', type='run', when='@2:')
depends_on('iconv', when='@2:')
depends_on('zlib')
depends_on('gawk', type='build', when='@:1')
# note: perl and curl are gnupg1 dependencies when keyserver support is
# requested, but we disable that.
# Getting some linking error.
conflicts('%gcc@10:', when='@:1')
@run_after('install')
def add_gpg2_symlink(self):
if self.spec.satisfies("@2.0:2"):
@ -50,25 +59,44 @@ def add_gpg2_symlink(self):
def configure_args(self):
args = [
'--disable-nls',
'--disable-bzip2',
'--disable-sqlite',
'--disable-ntbtls',
'--disable-gnutls',
'--disable-ldap',
'--disable-regex',
'--with-pinentry-pgm=' + self.spec['pinentry'].command.path,
'--with-libgpg-error-prefix=' + self.spec['libgpg-error'].prefix,
'--with-libgcrypt-prefix=' + self.spec['libgcrypt'].prefix,
'--with-libassuan-prefix=' + self.spec['libassuan'].prefix,
'--with-ksba-prefix=' + self.spec['libksba'].prefix,
'--with-npth-prefix=' + self.spec['npth'].prefix,
'--with-libiconv-prefix=' + self.spec['iconv'].prefix,
'--with-zlib=' + self.spec['zlib'].prefix,
'--without-tar',
'--without-libiconv-prefix',
'--without-readline',
]
if self.spec.satisfies("@2:"):
args.extend([
'--disable-sqlite',
'--disable-ntbtls',
'--disable-gnutls',
'--with-pinentry-pgm=' + self.spec['pinentry'].command.path,
'--with-libgpg-error-prefix=' + self.spec['libgpg-error'].prefix,
'--with-libgcrypt-prefix=' + self.spec['libgcrypt'].prefix,
'--with-libassuan-prefix=' + self.spec['libassuan'].prefix,
'--with-ksba-prefix=' + self.spec['libksba'].prefix,
'--with-npth-prefix=' + self.spec['npth'].prefix,
'--with-libiconv-prefix=' + self.spec['iconv'].prefix,
])
if self.spec.satisfies('@:1'):
args.extend([
'--disable-agent-support',
'--disable-card-support',
'--disable-photo-viewers',
'--disable-exec',
'--disable-keyserver-path',
'--disable-keyserver-helpers',
'--disable-gnupg-iconv',
'--disable-dns-srv',
'--disable-dns-cert',
'--disable-gnupg-iconv'
])
if self.run_tests:
args.append('--enable-all-tests')