public inbox for gentoo-musl@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-musl] [PATCH] app-crypt/gnupg-2.0.28: add missing headers for musl
@ 2016-05-29  2:30 Laine Gholson
  2016-05-29  2:52 ` Felix Janda
  0 siblings, 1 reply; 3+ messages in thread
From: Laine Gholson @ 2016-05-29  2:30 UTC (permalink / raw
  To: gentoo-musl

[-- Attachment #1: Type: text/plain, Size: 63 bytes --]

Patch attached

(this is where patches should be sent, right?)

[-- Attachment #2: gnupg-musl.patch --]
[-- Type: text/x-patch, Size: 12698 bytes --]

diff --git a/app-crypt/gnupg/Manifest b/app-crypt/gnupg/Manifest
new file mode 100644
index 0000000..fc6ca30
--- /dev/null
+++ b/app-crypt/gnupg/Manifest
@@ -0,0 +1,5 @@
+AUX gnupg-2.0.17-gpgsm-gencert.patch 1121 SHA256 fa8369a4466b3cce54215a348940422f46f4d359f9e9b3c7029a1138870888df SHA512 ecde032b205cc16c33ff21ded55b93e74058cd804d68e4a0738ac70d54b5b388b6f709d21719a5e418c662b7ee74bc4aef7a0c59de106e2d4bd06b7bc1a11138 WHIRLPOOL 5dc4d3de29290e8e274a0f4fef871cea7f49553846254d819ca776000978a72c694212559d9ad03312f94f71f406de4641c0575188d340017a7937b01753b8a0
+AUX gnupg-2.0.28-watchgnupg-musl.patch 292 SHA256 0494bd0f095aa8faeddb1a338e2a458e1fc70554502f5e8cfbdd7443d86e6e66 SHA512 7b507433fd6fb1027777afeda8c8a4cbc0cc2e0579a30c7f580b02ed2dc4520d10a35fddb26a0b6709a6cb1ea85c30e1a876229314f9d0774788d73dcf0a84d6 WHIRLPOOL 04c21a28f8e12e5d65af0b99e8f40d9dba47da4bfca280ee42ffadefebd91a1c538d6321fffa7a725feed8766b9ec208d662d361632eb3da759e2175b85f3334
+DIST gnupg-2.0.28.tar.bz2 4435779 SHA256 ce092ee4ab58fd19b9fb34a460c07b06c348f4360dd5dd4886d041eb521a534c SHA512 7e786fe0648d5ea453f9c7524fec4bd7d5eec26d28f723acf3cb2f7ec9c400c339f0926a179411876c3f8e08b06942dcec643dc930caf58239bbd4932f4bd3c1 WHIRLPOOL ccf7427e54a545914e89677618055a114b4c9dc4db48669a2fc726fced98475df4ed27c93bd180f1250d147111ee663c736cdf4e1d8afdc40ed967cdffd0eb66
+EBUILD gnupg-2.0.28.ebuild 4909 SHA256 3f5699654a05bc0fe3be0af07155c6eba9ebf9628cb4c4907d6a761569ab7c92 SHA512 01bd151c18c96fc6ec08d9dc9cf7e8eb140e605a5a3949625f7f08eb49932e4f133cb1825a195fbe9fe7c02cc4d157b6387d7932cc87fee8df259917ee957ee5 WHIRLPOOL 4478a4d43f9e77cf12824a4b33f8b6e7adf5d98699ded13d79a4f4885318b03317bd58272055eb12783f098935616f155f9c473c52f75f3a7cb10a163c856474
+MISC metadata.xml 1085 SHA256 e71443e75b3f30d21e58ef2345e8accfa41a77ded9aa7e468d2f9cf86391aec6 SHA512 a1b9cff9cc07fb260a0f62c281ae2480bb5cc3e8aef2f3ddf8f320a77563abcaf3fedc61532928415307e2913c06b28c466c044cb56841247e73d25e800f0904 WHIRLPOOL b6fb597f66154504cc7d39813c37b7a67bf8ff31fc497bee71e61867e101c09a410010b8291e958415c7b79663679af1bce1677db3d512d432502efaa4976f9d
diff --git a/app-crypt/gnupg/files/gnupg-2.0.17-gpgsm-gencert.patch b/app-crypt/gnupg/files/gnupg-2.0.17-gpgsm-gencert.patch
new file mode 100644
index 0000000..9506f81
--- /dev/null
+++ b/app-crypt/gnupg/files/gnupg-2.0.17-gpgsm-gencert.patch
@@ -0,0 +1,34 @@
+From c34486a64c223bcbfbb57d9abcf107d684b815b6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Sun, 17 Apr 2011 01:34:39 +0200
+Subject: [PATCH] gpgsm-gencert.sh: make sure not to abort after creating temp
+ file.
+
+https://bugs.g10code.com/gnupg/issue1466
+
+---
+ tools/gpgsm-gencert.sh |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tools/gpgsm-gencert.sh b/tools/gpgsm-gencert.sh
+index b209c8e..e7c812f 100755
+--- a/tools/gpgsm-gencert.sh
++++ b/tools/gpgsm-gencert.sh
+@@ -178,10 +178,10 @@ Key-Length: $KEY_LENGTH
+ Key-Usage: $KEY_USAGE
+ Name-DN: $NAME
+ EOF
+-[ -n "$KEY_GRIP" ] && echo "Key-Grip: $KEY_GRIP"
+-[ -n "$EMAIL_ADDRESSES" ] && echo "$EMAIL_ADDRESSES"
+-[ -n "$DNS_ADDRESSES" ] && echo "$DNS_ADDRESSES"
+-[ -n "$URI_ADDRESSES" ] && echo "$URI_ADDRESSES"
++[ -n "$KEY_GRIP" ] && echo "Key-Grip: $KEY_GRIP" || true
++[ -n "$EMAIL_ADDRESSES" ] && echo "$EMAIL_ADDRESSES" || true
++[ -n "$DNS_ADDRESSES" ] && echo "$DNS_ADDRESSES" || true
++[ -n "$URI_ADDRESSES" ] && echo "$URI_ADDRESSES" || true
+ ) > "$file_parameter"
+ 
+ 
+-- 
+1.7.5.rc1
+
diff --git a/app-crypt/gnupg/files/gnupg-2.0.28-watchgnupg-musl.patch b/app-crypt/gnupg/files/gnupg-2.0.28-watchgnupg-musl.patch
new file mode 100644
index 0000000..754d322
--- /dev/null
+++ b/app-crypt/gnupg/files/gnupg-2.0.28-watchgnupg-musl.patch
@@ -0,0 +1,10 @@
+--- a/tools/watchgnupg.c	2016-05-24 08:30:02.101562215 -0500
++++ b/tools/watchgnupg.c	2016-05-24 08:29:56.561562216 -0500
+@@ -29,6 +29,7 @@
+ #include <assert.h>
+ #include <unistd.h>
+ #include <sys/socket.h>
++#include <sys/select.h>
+ #include <sys/un.h>
+ #include <fcntl.h>
+ #include <time.h>
diff --git a/app-crypt/gnupg/gnupg-2.0.28.ebuild b/app-crypt/gnupg/gnupg-2.0.28.ebuild
new file mode 100644
index 0000000..06a65b0
--- /dev/null
+++ b/app-crypt/gnupg/gnupg-2.0.28.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="The GNU Privacy Guard, a GPL pgp replacement"
+HOMEPAGE="http://www.gnupg.org/"
+SRC_URI="mirror://gnupg/gnupg/${P}.tar.bz2"
+# SRC_URI="ftp://ftp.gnupg.org/gcrypt/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~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 mta readline static selinux smartcard tools usb"
+
+COMMON_DEPEND_LIBS="
+	>=dev-libs/libassuan-2
+	>=dev-libs/libgcrypt-1.5:0=
+	>=dev-libs/libgpg-error-1.11
+	>=dev-libs/libksba-1.0.7
+	>=dev-libs/pth-1.3.7
+	>=net-misc/curl-7.10
+	sys-libs/zlib
+	bzip2? ( app-arch/bzip2 )
+	readline? ( sys-libs/readline )
+	smartcard? ( usb? ( virtual/libusb:0 ) )
+	ldap? ( net-nds/openldap )"
+COMMON_DEPEND_BINS="app-crypt/pinentry"
+
+# Existence of executables is checked during configuration.
+DEPEND="${COMMON_DEPEND_LIBS}
+	${COMMON_DEPEND_BINS}
+	static? (
+		>=dev-libs/libassuan-2[static-libs]
+		>=dev-libs/libgcrypt-1.4:0=[static-libs]
+		>=dev-libs/libgpg-error-1.11[static-libs]
+		>=dev-libs/libksba-1.0.7[static-libs]
+		>=dev-libs/pth-1.3.7[static-libs]
+		>=net-misc/curl-7.10[static-libs]
+		sys-libs/zlib[static-libs]
+		bzip2? ( app-arch/bzip2[static-libs] )
+	)
+	nls? ( sys-devel/gettext )
+	doc? ( sys-apps/texinfo )"
+
+RDEPEND="!static? ( ${COMMON_DEPEND_LIBS} )
+	${COMMON_DEPEND_BINS}
+	mta? ( virtual/mta )
+	!<=app-crypt/gnupg-2.0.1
+	selinux? ( sec-policy/selinux-gpg )
+	nls? ( virtual/libintl )"
+
+REQUIRED_USE="smartcard? ( !static )"
+
+src_prepare() {
+	epatch "${FILESDIR}/${PN}-2.0.17-gpgsm-gencert.patch"
+	epatch "${FILESDIR}/${PN}-2.0.28-watchgnupg-musl.patch"
+	epatch_user
+}
+
+src_configure() {
+	local myconf=()
+
+	# 'USE=static' support was requested:
+	# gnupg1: bug #29299
+	# gnupg2: bug #159623
+	use static && append-ldflags -static
+
+	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 \
+		--docdir="${EPREFIX}/usr/share/doc/${PF}" \
+		--enable-gpg \
+		--enable-gpgsm \
+		--enable-agent \
+		--enable-large-secmem \
+		--without-adns \
+		"${myconf[@]}" \
+		$(use_enable bzip2) \
+		$(use_enable nls) \
+		$(use_enable mta mailto) \
+		$(use_enable ldap) \
+		$(use_with readline) \
+		CC_FOR_BUILD="$(tc-getBUILD_CC)"
+}
+
+src_compile() {
+	default
+
+	if use doc; then
+		cd doc
+		emake html
+	fi
+}
+
+src_install() {
+	default
+
+	use tools && dobin tools/{convert-from-106,gpg-check-pattern} \
+		tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys,make-dns-cert}
+
+	emake DESTDIR="${D}" -f doc/Makefile uninstall-nobase_dist_docDATA
+	rm "${ED}"/usr/share/gnupg/help* || die
+
+	dodoc ChangeLog NEWS README THANKS TODO VERSION doc/FAQ doc/DETAILS \
+		doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER doc/help*
+
+	dosym gpg2 /usr/bin/gpg
+	dosym gpgv2 /usr/bin/gpgv
+	dosym gpg2keys_hkp /usr/libexec/gpgkeys_hkp
+	dosym gpg2keys_finger /usr/libexec/gpgkeys_finger
+	dosym gpg2keys_curl /usr/libexec/gpgkeys_curl
+	if use ldap; then
+		dosym gpg2keys_ldap /usr/libexec/gpgkeys_ldap
+	fi
+	echo ".so man1/gpg2.1" > "${ED}"/usr/share/man/man1/gpg.1
+	echo ".so man1/gpgv2.1" > "${ED}"/usr/share/man/man1/gpgv.1
+
+	dodir /etc/env.d
+	echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg
+
+	if use doc; then
+		dohtml doc/gnupg.html/* doc/*.png
+	fi
+}
+
+pkg_postinst() {
+	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"
+	elog "the right viewer."
+	elog
+
+	if use smartcard; then
+		elog "To use your OpenPGP smartcard (or token) with GnuPG you need one of"
+		use usb && elog " - a CCID-compatible reader, used directly through libusb;"
+		elog " - sys-apps/pcsc-lite and a compatible reader device;"
+		elog " - dev-libs/openct and a compatible reader device;"
+		elog " - a reader device and drivers exporting either PC/SC or CT-API interfaces."
+		elog ""
+		elog "General hint: you probably want to try installing sys-apps/pcsc-lite and"
+		elog "app-crypt/ccid first."
+	fi
+
+	ewarn "Please remember to restart gpg-agent if a different version"
+	ewarn "of the agent is currently used. If you are unsure of the gpg"
+	ewarn "agent you are using please run 'killall gpg-agent',"
+	ewarn "and to start a fresh daemon just run 'gpg-agent --daemon'."
+}
diff --git a/app-crypt/gnupg/metadata.xml b/app-crypt/gnupg/metadata.xml
new file mode 100644
index 0000000..04058e5
--- /dev/null
+++ b/app-crypt/gnupg/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <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 of First use trust model; requires
+      <pkg>dev-db/sqlite</pkg>.
+    </flag>
+    <flag name="tools">
+      Install extra tools.
+    </flag>
+  </use>
+</pkgmetadata>
diff --git a/sys-apps/attr/attr-2.4.47-r99.ebuild b/sys-apps/attr/attr-2.4.47-r99.ebuild
new file mode 100644
index 0000000..fe84163
--- /dev/null
+++ b/sys-apps/attr/attr-2.4.47-r99.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs multilib-minimal
+
+DESCRIPTION="Extended attributes tools"
+HOMEPAGE="http://savannah.nongnu.org/projects/attr"
+SRC_URI="mirror://nongnu/${PN}/${P}.src.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc x86"
+IUSE="nls static-libs"
+
+DEPEND="nls? ( sys-devel/gettext )
+	sys-devel/autoconf"
+RDEPEND="abi_x86_32? (
+		!<=app-emulation/emul-linux-x86-baselibs-20130224-r9
+		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+	)"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-2.4.46-ifdef_cplusplus.patch
+	sed -i \
+		-e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
+		-e '/HAVE_ZIPPED_MANPAGES/s:=.*:=false:' \
+		include/builddefs.in \
+		|| die
+	strip-linguas -u po
+	multilib_copy_sources # https://savannah.nongnu.org/bugs/index.php?39736
+}
+
+multilib_src_configure() {
+	unset PLATFORM #184564
+	export OPTIMIZER=${CFLAGS}
+	export DEBUG=-DNDEBUG
+
+	econf \
+		$(use_enable nls gettext) \
+		--enable-shared $(use_enable static-libs static) \
+		--libexecdir="${EPREFIX}"/usr/$(get_libdir) \
+		--bindir="${EPREFIX}"/bin
+}
+
+multilib_src_compile() {
+	emake $(multilib_is_native_abi || echo TOOL_SUBDIRS=)
+}
+
+multilib_src_install() {
+	emake \
+		$(multilib_is_native_abi || echo TOOL_SUBDIRS=) \
+		DIST_ROOT="${D}" \
+		install install-lib install-dev
+
+	if multilib_is_native_abi; then
+		# we install attr into /bin, so we need the shared lib with it
+		gen_usr_ldscript -a attr
+		# the man-pages packages provides the man2 files
+		# note: man-pages are installed by TOOL_SUBDIRS
+		rm -r "${ED}"/usr/share/man/man2 || die
+	fi
+}
+
+multilib_src_install_all() {
+	use static-libs || prune_libtool_files --all
+	einstalldocs
+}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [gentoo-musl] [PATCH] app-crypt/gnupg-2.0.28: add missing headers for musl
  2016-05-29  2:30 [gentoo-musl] [PATCH] app-crypt/gnupg-2.0.28: add missing headers for musl Laine Gholson
@ 2016-05-29  2:52 ` Felix Janda
  2016-05-29  3:07   ` Laine Gholson
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Janda @ 2016-05-29  2:52 UTC (permalink / raw
  To: Laine Gholson; +Cc: gentoo-musl

Laine Gholson wrote:
> Patch attached

Thanks for the patch.

Please remove the unintentional changes to sys-apps/attr.


There is a similar patch at

http://git.alpinelinux.org/cgit/aports/tree/main/gnupg/0001-Include-sys-select.h-for-FD_SETSIZE.patch

Do you know whether upstream is notified (and this is maybe already
fixed there)?

Felix


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-musl] [PATCH] app-crypt/gnupg-2.0.28: add missing headers for musl
  2016-05-29  2:52 ` Felix Janda
@ 2016-05-29  3:07   ` Laine Gholson
  0 siblings, 0 replies; 3+ messages in thread
From: Laine Gholson @ 2016-05-29  3:07 UTC (permalink / raw
  To: Felix Janda; +Cc: gentoo-musl

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

> Please remove the unintentional changes to sys-apps/attr.
Whoops, I guess I used `git reset` wrong.

> There is a similar patch at
>
> http://git.alpinelinux.org/cgit/aports/tree/main/gnupg/0001-Include-sys-select.h-for-FD_SETSIZE.patch
>
> Do you know whether upstream is notified (and this is maybe already
> fixed there)?
I wasn't even aware of that patch.

On Sat, May 28, 2016 at 9:52 PM, Felix Janda <felix.janda@posteo.de> wrote:
> Laine Gholson wrote:
>> Patch attached
>
> Thanks for the patch.
>
> Please remove the unintentional changes to sys-apps/attr.
>
>
> There is a similar patch at
>
> http://git.alpinelinux.org/cgit/aports/tree/main/gnupg/0001-Include-sys-select.h-for-FD_SETSIZE.patch
>
> Do you know whether upstream is notified (and this is maybe already
> fixed there)?
>
> Felix

[-- Attachment #2: gnupg-musl.patch --]
[-- Type: text/x-patch, Size: 10655 bytes --]

diff --git a/app-crypt/gnupg/Manifest b/app-crypt/gnupg/Manifest
new file mode 100644
index 0000000..fc6ca30
--- /dev/null
+++ b/app-crypt/gnupg/Manifest
@@ -0,0 +1,5 @@
+AUX gnupg-2.0.17-gpgsm-gencert.patch 1121 SHA256 fa8369a4466b3cce54215a348940422f46f4d359f9e9b3c7029a1138870888df SHA512 ecde032b205cc16c33ff21ded55b93e74058cd804d68e4a0738ac70d54b5b388b6f709d21719a5e418c662b7ee74bc4aef7a0c59de106e2d4bd06b7bc1a11138 WHIRLPOOL 5dc4d3de29290e8e274a0f4fef871cea7f49553846254d819ca776000978a72c694212559d9ad03312f94f71f406de4641c0575188d340017a7937b01753b8a0
+AUX gnupg-2.0.28-watchgnupg-musl.patch 292 SHA256 0494bd0f095aa8faeddb1a338e2a458e1fc70554502f5e8cfbdd7443d86e6e66 SHA512 7b507433fd6fb1027777afeda8c8a4cbc0cc2e0579a30c7f580b02ed2dc4520d10a35fddb26a0b6709a6cb1ea85c30e1a876229314f9d0774788d73dcf0a84d6 WHIRLPOOL 04c21a28f8e12e5d65af0b99e8f40d9dba47da4bfca280ee42ffadefebd91a1c538d6321fffa7a725feed8766b9ec208d662d361632eb3da759e2175b85f3334
+DIST gnupg-2.0.28.tar.bz2 4435779 SHA256 ce092ee4ab58fd19b9fb34a460c07b06c348f4360dd5dd4886d041eb521a534c SHA512 7e786fe0648d5ea453f9c7524fec4bd7d5eec26d28f723acf3cb2f7ec9c400c339f0926a179411876c3f8e08b06942dcec643dc930caf58239bbd4932f4bd3c1 WHIRLPOOL ccf7427e54a545914e89677618055a114b4c9dc4db48669a2fc726fced98475df4ed27c93bd180f1250d147111ee663c736cdf4e1d8afdc40ed967cdffd0eb66
+EBUILD gnupg-2.0.28.ebuild 4909 SHA256 3f5699654a05bc0fe3be0af07155c6eba9ebf9628cb4c4907d6a761569ab7c92 SHA512 01bd151c18c96fc6ec08d9dc9cf7e8eb140e605a5a3949625f7f08eb49932e4f133cb1825a195fbe9fe7c02cc4d157b6387d7932cc87fee8df259917ee957ee5 WHIRLPOOL 4478a4d43f9e77cf12824a4b33f8b6e7adf5d98699ded13d79a4f4885318b03317bd58272055eb12783f098935616f155f9c473c52f75f3a7cb10a163c856474
+MISC metadata.xml 1085 SHA256 e71443e75b3f30d21e58ef2345e8accfa41a77ded9aa7e468d2f9cf86391aec6 SHA512 a1b9cff9cc07fb260a0f62c281ae2480bb5cc3e8aef2f3ddf8f320a77563abcaf3fedc61532928415307e2913c06b28c466c044cb56841247e73d25e800f0904 WHIRLPOOL b6fb597f66154504cc7d39813c37b7a67bf8ff31fc497bee71e61867e101c09a410010b8291e958415c7b79663679af1bce1677db3d512d432502efaa4976f9d
diff --git a/app-crypt/gnupg/files/gnupg-2.0.17-gpgsm-gencert.patch b/app-crypt/gnupg/files/gnupg-2.0.17-gpgsm-gencert.patch
new file mode 100644
index 0000000..9506f81
--- /dev/null
+++ b/app-crypt/gnupg/files/gnupg-2.0.17-gpgsm-gencert.patch
@@ -0,0 +1,34 @@
+From c34486a64c223bcbfbb57d9abcf107d684b815b6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Sun, 17 Apr 2011 01:34:39 +0200
+Subject: [PATCH] gpgsm-gencert.sh: make sure not to abort after creating temp
+ file.
+
+https://bugs.g10code.com/gnupg/issue1466
+
+---
+ tools/gpgsm-gencert.sh |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tools/gpgsm-gencert.sh b/tools/gpgsm-gencert.sh
+index b209c8e..e7c812f 100755
+--- a/tools/gpgsm-gencert.sh
++++ b/tools/gpgsm-gencert.sh
+@@ -178,10 +178,10 @@ Key-Length: $KEY_LENGTH
+ Key-Usage: $KEY_USAGE
+ Name-DN: $NAME
+ EOF
+-[ -n "$KEY_GRIP" ] && echo "Key-Grip: $KEY_GRIP"
+-[ -n "$EMAIL_ADDRESSES" ] && echo "$EMAIL_ADDRESSES"
+-[ -n "$DNS_ADDRESSES" ] && echo "$DNS_ADDRESSES"
+-[ -n "$URI_ADDRESSES" ] && echo "$URI_ADDRESSES"
++[ -n "$KEY_GRIP" ] && echo "Key-Grip: $KEY_GRIP" || true
++[ -n "$EMAIL_ADDRESSES" ] && echo "$EMAIL_ADDRESSES" || true
++[ -n "$DNS_ADDRESSES" ] && echo "$DNS_ADDRESSES" || true
++[ -n "$URI_ADDRESSES" ] && echo "$URI_ADDRESSES" || true
+ ) > "$file_parameter"
+ 
+ 
+-- 
+1.7.5.rc1
+
diff --git a/app-crypt/gnupg/files/gnupg-2.0.28-watchgnupg-musl.patch b/app-crypt/gnupg/files/gnupg-2.0.28-watchgnupg-musl.patch
new file mode 100644
index 0000000..754d322
--- /dev/null
+++ b/app-crypt/gnupg/files/gnupg-2.0.28-watchgnupg-musl.patch
@@ -0,0 +1,10 @@
+--- a/tools/watchgnupg.c	2016-05-24 08:30:02.101562215 -0500
++++ b/tools/watchgnupg.c	2016-05-24 08:29:56.561562216 -0500
+@@ -29,6 +29,7 @@
+ #include <assert.h>
+ #include <unistd.h>
+ #include <sys/socket.h>
++#include <sys/select.h>
+ #include <sys/un.h>
+ #include <fcntl.h>
+ #include <time.h>
diff --git a/app-crypt/gnupg/gnupg-2.0.28.ebuild b/app-crypt/gnupg/gnupg-2.0.28.ebuild
new file mode 100644
index 0000000..06a65b0
--- /dev/null
+++ b/app-crypt/gnupg/gnupg-2.0.28.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="The GNU Privacy Guard, a GPL pgp replacement"
+HOMEPAGE="http://www.gnupg.org/"
+SRC_URI="mirror://gnupg/gnupg/${P}.tar.bz2"
+# SRC_URI="ftp://ftp.gnupg.org/gcrypt/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~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 mta readline static selinux smartcard tools usb"
+
+COMMON_DEPEND_LIBS="
+	>=dev-libs/libassuan-2
+	>=dev-libs/libgcrypt-1.5:0=
+	>=dev-libs/libgpg-error-1.11
+	>=dev-libs/libksba-1.0.7
+	>=dev-libs/pth-1.3.7
+	>=net-misc/curl-7.10
+	sys-libs/zlib
+	bzip2? ( app-arch/bzip2 )
+	readline? ( sys-libs/readline )
+	smartcard? ( usb? ( virtual/libusb:0 ) )
+	ldap? ( net-nds/openldap )"
+COMMON_DEPEND_BINS="app-crypt/pinentry"
+
+# Existence of executables is checked during configuration.
+DEPEND="${COMMON_DEPEND_LIBS}
+	${COMMON_DEPEND_BINS}
+	static? (
+		>=dev-libs/libassuan-2[static-libs]
+		>=dev-libs/libgcrypt-1.4:0=[static-libs]
+		>=dev-libs/libgpg-error-1.11[static-libs]
+		>=dev-libs/libksba-1.0.7[static-libs]
+		>=dev-libs/pth-1.3.7[static-libs]
+		>=net-misc/curl-7.10[static-libs]
+		sys-libs/zlib[static-libs]
+		bzip2? ( app-arch/bzip2[static-libs] )
+	)
+	nls? ( sys-devel/gettext )
+	doc? ( sys-apps/texinfo )"
+
+RDEPEND="!static? ( ${COMMON_DEPEND_LIBS} )
+	${COMMON_DEPEND_BINS}
+	mta? ( virtual/mta )
+	!<=app-crypt/gnupg-2.0.1
+	selinux? ( sec-policy/selinux-gpg )
+	nls? ( virtual/libintl )"
+
+REQUIRED_USE="smartcard? ( !static )"
+
+src_prepare() {
+	epatch "${FILESDIR}/${PN}-2.0.17-gpgsm-gencert.patch"
+	epatch "${FILESDIR}/${PN}-2.0.28-watchgnupg-musl.patch"
+	epatch_user
+}
+
+src_configure() {
+	local myconf=()
+
+	# 'USE=static' support was requested:
+	# gnupg1: bug #29299
+	# gnupg2: bug #159623
+	use static && append-ldflags -static
+
+	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 \
+		--docdir="${EPREFIX}/usr/share/doc/${PF}" \
+		--enable-gpg \
+		--enable-gpgsm \
+		--enable-agent \
+		--enable-large-secmem \
+		--without-adns \
+		"${myconf[@]}" \
+		$(use_enable bzip2) \
+		$(use_enable nls) \
+		$(use_enable mta mailto) \
+		$(use_enable ldap) \
+		$(use_with readline) \
+		CC_FOR_BUILD="$(tc-getBUILD_CC)"
+}
+
+src_compile() {
+	default
+
+	if use doc; then
+		cd doc
+		emake html
+	fi
+}
+
+src_install() {
+	default
+
+	use tools && dobin tools/{convert-from-106,gpg-check-pattern} \
+		tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys,make-dns-cert}
+
+	emake DESTDIR="${D}" -f doc/Makefile uninstall-nobase_dist_docDATA
+	rm "${ED}"/usr/share/gnupg/help* || die
+
+	dodoc ChangeLog NEWS README THANKS TODO VERSION doc/FAQ doc/DETAILS \
+		doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER doc/help*
+
+	dosym gpg2 /usr/bin/gpg
+	dosym gpgv2 /usr/bin/gpgv
+	dosym gpg2keys_hkp /usr/libexec/gpgkeys_hkp
+	dosym gpg2keys_finger /usr/libexec/gpgkeys_finger
+	dosym gpg2keys_curl /usr/libexec/gpgkeys_curl
+	if use ldap; then
+		dosym gpg2keys_ldap /usr/libexec/gpgkeys_ldap
+	fi
+	echo ".so man1/gpg2.1" > "${ED}"/usr/share/man/man1/gpg.1
+	echo ".so man1/gpgv2.1" > "${ED}"/usr/share/man/man1/gpgv.1
+
+	dodir /etc/env.d
+	echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg
+
+	if use doc; then
+		dohtml doc/gnupg.html/* doc/*.png
+	fi
+}
+
+pkg_postinst() {
+	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"
+	elog "the right viewer."
+	elog
+
+	if use smartcard; then
+		elog "To use your OpenPGP smartcard (or token) with GnuPG you need one of"
+		use usb && elog " - a CCID-compatible reader, used directly through libusb;"
+		elog " - sys-apps/pcsc-lite and a compatible reader device;"
+		elog " - dev-libs/openct and a compatible reader device;"
+		elog " - a reader device and drivers exporting either PC/SC or CT-API interfaces."
+		elog ""
+		elog "General hint: you probably want to try installing sys-apps/pcsc-lite and"
+		elog "app-crypt/ccid first."
+	fi
+
+	ewarn "Please remember to restart gpg-agent if a different version"
+	ewarn "of the agent is currently used. If you are unsure of the gpg"
+	ewarn "agent you are using please run 'killall gpg-agent',"
+	ewarn "and to start a fresh daemon just run 'gpg-agent --daemon'."
+}
diff --git a/app-crypt/gnupg/metadata.xml b/app-crypt/gnupg/metadata.xml
new file mode 100644
index 0000000..04058e5
--- /dev/null
+++ b/app-crypt/gnupg/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <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 of First use trust model; requires
+      <pkg>dev-db/sqlite</pkg>.
+    </flag>
+    <flag name="tools">
+      Install extra tools.
+    </flag>
+  </use>
+</pkgmetadata>

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-29  3:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-29  2:30 [gentoo-musl] [PATCH] app-crypt/gnupg-2.0.28: add missing headers for musl Laine Gholson
2016-05-29  2:52 ` Felix Janda
2016-05-29  3:07   ` Laine Gholson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox