summaryrefslogtreecommitdiff
path: root/app-crypt/gnupg
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/gnupg')
-rw-r--r--app-crypt/gnupg/Manifest6
-rw-r--r--app-crypt/gnupg/files/gnupg-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch33
-rw-r--r--app-crypt/gnupg/gnupg-1.4.21.ebuild114
-rw-r--r--app-crypt/gnupg/gnupg-2.2.8.ebuild130
-rw-r--r--app-crypt/gnupg/metadata.xml38
5 files changed, 321 insertions, 0 deletions
diff --git a/app-crypt/gnupg/Manifest b/app-crypt/gnupg/Manifest
new file mode 100644
index 000000000000..2e0abd6d2d02
--- /dev/null
+++ b/app-crypt/gnupg/Manifest
@@ -0,0 +1,6 @@
+AUX gnupg-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch 1048 BLAKE2B 36f37b74da309100191f4d8f9c27d08a1b00d2d30fbaf169dbb74ebbe42293357a4fb62332e286fe5725dcfdc30645a602dc2a51c51924b06215b68fd5235658 SHA512 fd12827150e96cd7979ea9611d64ed4ab9e6c61cfecdd697b8fb4d162f20985b734c2bfc365a921809b9029e86a85a9b36c10ec472b3dd49c25ea18f5aef56ce
+DIST gnupg-1.4.21.tar.bz2 3689305 BLAKE2B 0c26c9c3aeae2bf2eafa858bc3bd15cc2702bce12a8a90938565322c34e2eeb8e5432932f5c9344a76aa4528b66051141536c062d9923a79d12a0767421bb017 SHA512 619e0fbc10310c7e55d129027e2945791fe91a0884b1d6f53acb4b2e380d1c6e71d1a516a59876182c5c70a4227d44a74ceda018c343b5291fa9a5d6de77c984
+DIST gnupg-2.2.8.tar.bz2 6632465 BLAKE2B e13bdfb2b17f87dd2122da5a489318bfcefec26c0fbb65dc6a36034314985bbd405cb22cfaf9bffa4c7928657cbc63d363f16b77d00bf86737b73c73ffbce4f2 SHA512 24271ec2663b941ed5e72e2179b48ac73d5cd838292aa9d4954952b11713f4b466f30e6af632b22c9e7c284350e300a07046d41d0ab73dcbd1639b303cd09007
+EBUILD gnupg-1.4.21.ebuild 3345 BLAKE2B 611a2e3c8d3a47337a17891ce9df00d0aca121f827169ea1aec9cb8c44b3f38858e1c8d39d08985f71790127bbbe64b16f0293b368d8dc627700fc1cc31983d7 SHA512 14a708c00e98c76fa6ef1f2d878f84f63d8e110f85b35b9c40b6da80525af685df09ea83eb1dd1fce1fe3016b9e12a46c02c91f11ea78496c12301acbf04d257
+EBUILD gnupg-2.2.8.ebuild 3209 BLAKE2B 59e3d8e013e62af26653917e524a51ea1804dc77bbf164157ec85344f0df4655bd60c090487790820717bf3fc7864da76dc5edf5709d50446afbc1bb81bac737 SHA512 ebfc7525a171336c97b957102ec798f87f454296ce3f6904f8dad6e2f9a5b00c689663120c8eede207f520660ba2ee12c52065b6f65f788d8c29e5fd2b23ba50
+MISC metadata.xml 1198 BLAKE2B 745e725cf4c88e72dae88f6c2030ec755a79c449c68caaf0fbd1af6f996791500ae9490127cc50cc165180f754de1c71216e89fb899329c0b108810a866612cf SHA512 cd4ad4996e1c641bf8b6815a72f90427fa3c20864fe440157068ebb38300228e907ccf34fca2fd9ba821eeadee741c0cf8d8b09ce60c965f340e64c4fae3c069
diff --git a/app-crypt/gnupg/files/gnupg-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch b/app-crypt/gnupg/files/gnupg-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch
new file mode 100644
index 000000000000..dd75e3a5e96c
--- /dev/null
+++ b/app-crypt/gnupg/files/gnupg-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch
@@ -0,0 +1,33 @@
+From e3bdb7d17264b8d5bd9abab97c96d9c4a50e4f61 Mon Sep 17 00:00:00 2001
+From: Kristian Fiskerstrand <kf@sumptuouscapital.com>
+Date: Mon, 3 Apr 2017 23:44:56 +0300
+Subject: [PATCH] gpgscm: Use shorter socket path lengts to improve test
+ reliability
+
+--
+As socket lengths are normally restricted to 108 characters
+(UNIX_PATH_MAX variable in /usr/include/linux/un.h), using 42 characters
+by default easily results in errors.
+---
+ tests/gpgscm/tests.scm | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm
+index 592b36f..f54a387 100644
+--- a/tests/gpgscm/tests.scm
++++ b/tests/gpgscm/tests.scm
+@@ -273,9 +273,9 @@
+ (canonical-path (_mkdtemp (if (null? components)
+ (path-join
+ (get-temp-path)
+- (string-append "gpgscm-" (get-isotime) "-"
++ (string-append "gscm"
+ (basename-suffix *scriptname* ".scm")
+- "-XXXXXX"))
++ "XXXXXX"))
+ (apply path-join components)))))
+
+ ;; Make a temporary directory and remove it at interpreter shutdown.
+--
+2.10.2
+
diff --git a/app-crypt/gnupg/gnupg-1.4.21.ebuild b/app-crypt/gnupg/gnupg-1.4.21.ebuild
new file mode 100644
index 000000000000..d8cb5bc50c6c
--- /dev/null
+++ b/app-crypt/gnupg/gnupg-1.4.21.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+ECCVER="0.2.0"
+ECCVER_GNUPG="1.4.9"
+ECC_PATCH="${PN}-${ECCVER_GNUPG}-ecc${ECCVER}.diff"
+MY_P=${P/_/}
+
+DESCRIPTION="The GNU Privacy Guard, a GPL pgp replacement"
+HOMEPAGE="http://www.gnupg.org/"
+SRC_URI="mirror://gnupg/gnupg/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="bzip2 curl ldap mta nls readline selinux smartcard static usb zlib"
+
+COMMON_DEPEND="
+ ldap? ( net-nds/openldap )
+ bzip2? ( app-arch/bzip2 )
+ zlib? ( sys-libs/zlib )
+ curl? ( net-misc/curl )
+ mta? ( virtual/mta )
+ readline? ( sys-libs/readline:0= )
+ smartcard? ( =virtual/libusb-0* )
+ usb? ( =virtual/libusb-0* )"
+
+RDEPEND="!static? ( ${COMMON_DEPEND} )
+ selinux? ( sec-policy/selinux-gpg )
+ nls? ( virtual/libintl )"
+
+DEPEND="${COMMON_DEPEND}
+ dev-lang/perl
+ nls? ( sys-devel/gettext )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # bug#469388
+ sed -i -e 's/--batch --dearmor/--homedir . --batch --dearmor/' checks/Makefile.in
+
+ # Fix PIC definitions
+ sed -i -e 's:PIC:__PIC__:' mpi/i386/mpih-{add,sub}1.S intl/relocatable.c \
+ || die "sed PIC failed"
+ sed -i -e 's:if PIC:ifdef __PIC__:' mpi/sparc32v8/mpih-mul{1,2}.S || \
+ die "sed PIC failed"
+}
+
+src_configure() {
+ # Certain sparc32 machines seem to have trouble building correctly with
+ # -mcpu enabled. While this is not a gnupg problem, it is a temporary
+ # fix until the gcc problem can be tracked down.
+ if [ "${ARCH}" == "sparc" ] && [ "${PROFILE_ARCH}" == "sparc" ]; then
+ filter-flags -mcpu=supersparc -mcpu=v8 -mcpu=v7
+ fi
+
+ # 'USE=static' support was requested in #29299
+ use static && append-ldflags -static
+
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable ldap) \
+ $(use_enable mta mailto) \
+ --enable-hkp \
+ --enable-finger \
+ $(use_with !zlib included-zlib) \
+ $(use_with curl libcurl /usr) \
+ $(use_enable nls) \
+ $(use_enable bzip2) \
+ $(use_enable smartcard card-support) \
+ $(use_enable selinux selinux-support) \
+ --without-capabilities \
+ $(use_with readline) \
+ $(use_with usb libusb /usr) \
+ --enable-static-rnd=linux \
+ --libexecdir="${EPREFIX}/usr/libexec" \
+ --enable-noexecstack \
+ CC_FOR_BUILD=$(tc-getBUILD_CC) \
+ ${myconf}
+}
+
+src_install() {
+ default
+
+ # keep the documentation in /usr/share/doc/...
+ rm -rf "${ED}usr/share/gnupg/FAQ" "${ED}usr/share/gnupg/faq.html" || die
+
+ dodoc AUTHORS BUGS ChangeLog NEWS PROJECTS README THANKS \
+ TODO VERSION doc/{FAQ,HACKING,DETAILS,OpenPGP}
+
+ exeinto /usr/libexec/gnupg
+ doexe tools/make-dns-cert
+}
+
+pkg_postinst() {
+ ewarn "If you are using a non-Linux system, or a kernel older than 2.6.9,"
+ ewarn "you MUST make the gpg binary setuid."
+ echo
+# if use !bindist && use ecc; then
+# ewarn
+# ewarn "The elliptical curves patch is experimental"
+# ewarn "Further info available at http://alumnes.eps.udl.es/%7Ed4372211/index.en.html"
+# fi
+ elog
+ elog "See https://wiki.gentoo.org/wiki/GnuPG for documentation on gnupg"
+ elog
+ elog "If you wish to view images emerge:"
+ elog "media-gfx/xloadimage, media-gfx/xli or any other viewer"
+ elog "Remember to use photo-viewer option in configuration file to activate the right viewer"
+}
diff --git a/app-crypt/gnupg/gnupg-2.2.8.ebuild b/app-crypt/gnupg/gnupg-2.2.8.ebuild
new file mode 100644
index 000000000000..a7cb03c7e859
--- /dev/null
+++ b/app-crypt/gnupg/gnupg-2.2.8.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit systemd toolchain-funcs
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
+HOMEPAGE="http://www.gnupg.org/"
+SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl tofu tools usb wks-server"
+
+COMMON_DEPEND_LIBS="
+ >=dev-libs/npth-1.2
+ >=dev-libs/libassuan-2.5.0
+ >=dev-libs/libgcrypt-1.7.3
+ >=dev-libs/libgpg-error-1.28
+ >=dev-libs/libksba-1.3.4
+ >=net-misc/curl-7.10
+ ssl? ( >=net-libs/gnutls-3.0:0= )
+ sys-libs/zlib
+ ldap? ( net-nds/openldap )
+ bzip2? ( app-arch/bzip2 )
+ readline? ( sys-libs/readline:0= )
+ smartcard? ( usb? ( virtual/libusb:0 ) )
+ tofu? ( >=dev-db/sqlite-3.7 )
+ virtual/mta
+ "
+COMMON_DEPEND_BINS="app-crypt/pinentry
+ !app-crypt/dirmngr"
+
+# Existence of executables is checked during configuration.
+DEPEND="${COMMON_DEPEND_LIBS}
+ ${COMMON_DEPEND_BINS}
+ nls? ( sys-devel/gettext )
+ doc? ( sys-apps/texinfo )"
+
+RDEPEND="${COMMON_DEPEND_LIBS}
+ ${COMMON_DEPEND_BINS}
+ selinux? ( sec-policy/selinux-gpg )
+ nls? ( virtual/libintl )"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=(
+ ChangeLog NEWS README THANKS TODO VERSION
+ doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
+)
+
+src_configure() {
+ local myconf=()
+
+ if use smartcard; then
+ myconf+=(
+ --enable-scdaemon
+ $(use_enable usb ccid-driver)
+ )
+ else
+ myconf+=( --disable-scdaemon )
+ fi
+
+ if use elibc_SunOS || use elibc_AIX; then
+ myconf+=( --disable-symcryptrun )
+ else
+ myconf+=( --enable-symcryptrun )
+ fi
+
+ # glib fails and picks up clang's internal stdint.h causing weird errors
+ [[ ${CC} == *clang ]] && \
+ export gl_cv_absolute_stdint_h=/usr/include/stdint.h
+
+ econf \
+ "${myconf[@]}" \
+ $(use_enable bzip2) \
+ $(use_enable ssl gnutls) \
+ $(use_enable nls) \
+ $(use_enable tofu) \
+ $(use_enable wks-server wks-tools) \
+ $(use_with ldap) \
+ $(use_with readline) \
+ --enable-gpg \
+ --enable-gpgsm \
+ --enable-large-secmem \
+ --enable-all-tests \
+ CC_FOR_BUILD="$(tc-getBUILD_CC)"
+}
+
+src_compile() {
+ default
+
+ use doc && emake -C doc html
+}
+
+src_test() {
+ #Bug: 638574
+ use tofu && export TESTFLAGS=--parallel
+ default
+}
+
+src_install() {
+ default
+
+ use tools &&
+ dobin \
+ tools/{convert-from-106,gpg-check-pattern} \
+ tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys} \
+ tools/make-dns-cert
+
+ dosym gpg /usr/bin/gpg2
+ dosym gpgv /usr/bin/gpgv2
+ echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
+ echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
+
+ dodir /etc/env.d
+ echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
+
+ use doc && dodoc doc/gnupg.html/* doc/*.png
+
+ systemd_douserunit doc/examples/systemd-user/*.{service,socket}
+}
diff --git a/app-crypt/gnupg/metadata.xml b/app-crypt/gnupg/metadata.xml
new file mode 100644
index 000000000000..d9ae4079527c
--- /dev/null
+++ b/app-crypt/gnupg/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>k_f@gentoo.org</email>
+ <name>Kristian Fiskerstrand</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>crypto@gentoo.org</email>
+ <name>Crypto</name>
+ </maintainer>
+ <longdescription>
+ GnuPG is a complete and free implementation of the OpenPGP standard as
+ defined by RFC4880.
+ </longdescription>
+ <use>
+ <flag name="smartcard">
+ Build scdaemon software. Enables usage of OpenPGP cards. For
+ other type of smartcards, try <pkg>app-crypt/gnupg-pkcs11-scd</pkg>.
+ Bring in <pkg>dev-libs/libusb</pkg> as a dependency; enable scdaemon.
+ </flag>
+ <flag name="usb">
+ Build direct CCID access for scdaemon; requires <pkg>dev-libs/libusb</pkg>.
+ </flag>
+ <flag name="mta">
+ Build mta support using <pkg>virtual/mta</pkg>.
+ </flag>
+ <flag name="tofu">
+ Enable support for Trust on First use trust model; requires <pkg>dev-db/sqlite</pkg>.
+ </flag>
+ <flag name="tools">
+ Install extra tools (including gpgsplit and gpg-zip).
+ </flag>
+ <flag name="wks-server">
+ Install the wks-server
+ </flag>
+ </use>
+</pkgmetadata>