From 08dbceff69594a8d3003b33e3334c544cdec764b Mon Sep 17 00:00:00 2001 From: "Francisco Blas Izquierdo Riera (klondike)" Date: Sun, 12 Oct 2014 20:56:50 +0200 Subject: Multilib gnutls --- net-libs/gnutls/ChangeLog | 12 ++ net-libs/gnutls/Manifest | 5 + ...3-gl-tests-getaddrinfo-skip-if-no-network.patch | 30 ++++ net-libs/gnutls/gnutls-3.2.18-r1.ebuild | 164 +++++++++++++++++++++ net-libs/gnutls/metadata.xml | 17 +++ 5 files changed, 228 insertions(+) create mode 100644 net-libs/gnutls/ChangeLog create mode 100644 net-libs/gnutls/Manifest create mode 100644 net-libs/gnutls/files/gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch create mode 100644 net-libs/gnutls/gnutls-3.2.18-r1.ebuild create mode 100644 net-libs/gnutls/metadata.xml diff --git a/net-libs/gnutls/ChangeLog b/net-libs/gnutls/ChangeLog new file mode 100644 index 0000000..192574d --- /dev/null +++ b/net-libs/gnutls/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for net-libs/gnutls +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*gnutls-3.2.18-r1 (12 Oct 2014) + + 12 Oct 2014; Francisco Blas Izquierdo Riera (klondike) + +gnutls-3.2.18-r1.ebuild, + +files/gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch, + +metadata.xml: + Add multilib support to gnutls-3.2.18 + diff --git a/net-libs/gnutls/Manifest b/net-libs/gnutls/Manifest new file mode 100644 index 0000000..f8ae845 --- /dev/null +++ b/net-libs/gnutls/Manifest @@ -0,0 +1,5 @@ +AUX gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch 1146 SHA256 0644a00f75987f8a8906ec536b4b29967c24ae22ece8dfee074af3f85be566b5 SHA512 ea3062f90ace33a6229fe10f9a1fb492e84905dce0231309d2c105386c45a151d99c140c66158435ebe4781defc5a536775f4d68b3552208885636e5ed4b7223 WHIRLPOOL ee131aa7709e717cf5e893d5073dbc7eeec569e2a6e48094534dcf8f0d3d17b8a4f75da0a2c91ed2d70e37ef4429d7759dffce4948fd508dcbc0e081a8d98aa0 +DIST gnutls-3.2.18.tar.xz 5154476 SHA256 4762afab5e1b9e829c5f53d2b00cd5e41d43fa6d035efcf239e3fe0459134d45 SHA512 fc364be7997d31e1a1855d871b4a9564ee5a3e9c2900839f9c32fcc656e67c916ef634508bc0363b8b3f0cba131c97596509f838c1e9b3ac2b56b224eee43908 WHIRLPOOL 6da2bcfca5755a7fd3ce922b3bbeb21a44c2fc5446b342361577a4eb216ae01867cbf49d01fe44a75ca850dbf960c481e5f122f37669ea404e5213fc8b0e5491 +EBUILD gnutls-3.2.18-r1.ebuild 4646 SHA256 169a49af818b73e8600f7ad6bc44d22ff1da130be74564750aee0b1b3a063b85 SHA512 138ac7150419ca8f13cdeb4024b1d819c39f700acf2c8b9c0255999750ef4de36324460f5bf26a87a50071db33958cc0c46e426035b0e14e0838b253956bbc0d WHIRLPOOL 91107d65cdbadb0d48e3154a7ec2828dd5be483fa6e90141f337053d76c9acc5a0dd7dbcfe9fe4535176d4a2a6fb9803dd469c25861a630454efd68e09bc4793 +MISC ChangeLog 363 SHA256 d9662f8ae41e9c90e2158204e8f16ce3628425207fd2c5d0b4bdc9d7c8c3c79d SHA512 6c031b9f916af6c4fda0257326da442ac5b965f85bd44a9fe308c96ef8f653c994505c31cfa1c1049039dfec7235ec6402b476bac873db62b96ed2cfa2ac1fba WHIRLPOOL 83e2f0542d5e7ff58cd7953b37f700e67fad281f7afccc1792971fb8b135600841a84294774e366c56e6f94a4644da9f99c90a768580cd8b2596226aef85f680 +MISC metadata.xml 602 SHA256 012fd9efe65e066caeec2f884c07e49945aadf42bb9400ad88d29059ca32ca51 SHA512 de57f4e463b2e7af3e104ece18eed4f150d1424a64821192d2efd950c3d83fac1f077906c8d2afc5700d6682ea97b39a62679ee91a3ac0706dbe6f589c0b7e63 WHIRLPOOL d5ea2c038b61acb2f7429ef37b7e41cf8a8f41843a390b4a9bb406a136d5f811eae0c5eec154c0fbdd0c8e1f186f17525b4d306be4af69b8d0e91ed185c3037d diff --git a/net-libs/gnutls/files/gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch b/net-libs/gnutls/files/gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch new file mode 100644 index 0000000..6d04ccb --- /dev/null +++ b/net-libs/gnutls/files/gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch @@ -0,0 +1,30 @@ +From 4b3252d59ef2d73118e2de6743ba58e2cbafa008 Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev +Date: Sat, 8 Mar 2014 22:13:51 +0200 +Subject: [PATCH] tests: getaddrinfo: skip if no network + +When running tests under network sandbox, there is no connectivity to +the DNS, in this case function returns system error and ECONNREFUSED +this should result in skipping test. + +Signed-off-by: Alon Bar-Lev +--- + tests/test-getaddrinfo.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gl/tests/test-getaddrinfo.c b/gl/tests/test-getaddrinfo.c +index acf9cd6..b155410 100644 +--- a/gl/tests/test-getaddrinfo.c ++++ b/gl/tests/test-getaddrinfo.c +@@ -85,7 +85,7 @@ simple (char const *host, char const *service) + /* EAI_AGAIN is returned if no network is available. Don't fail + the test merely because someone is down the country on their + in-law's farm. */ +- if (res == EAI_AGAIN) ++ if (res == EAI_AGAIN || (res == EAI_SYSTEM && err == ECONNREFUSED)) + { + skip++; + fprintf (stderr, "skipping getaddrinfo test: no network?\n"); +-- +1.8.3.2 + diff --git a/net-libs/gnutls/gnutls-3.2.18-r1.ebuild b/net-libs/gnutls/gnutls-3.2.18-r1.ebuild new file mode 100644 index 0000000..2d1be50 --- /dev/null +++ b/net-libs/gnutls/gnutls-3.2.18-r1.ebuild @@ -0,0 +1,164 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit autotools libtool eutils multilib-minimal versionator + +DESCRIPTION="A TLS 1.2 and SSL 3.0 implementation for the GNU project" +HOMEPAGE="http://www.gnutls.org/" +SRC_URI="mirror://gnupg/gnutls/v$(get_version_component_range 1-2)/${P}.tar.xz" + +# LGPL-3 for libgnutls library and GPL-3 for libgnutls-extra library. +# soon to be relicensed as LGPL-2.1 unless heartbeat extension enabled. +LICENSE="GPL-3 LGPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" +IUSE_LINGUAS=" en cs de fi fr it ms nl pl sv uk vi zh_CN" +IUSE="+cxx +crywrap dane doc examples guile nls pkcs11 static-libs test zlib ${IUSE_LINGUAS// / linguas_}" +# heartbeat support is not disabled until re-licensing happens fullyf + +# NOTICE: sys-devel/autogen is required at runtime as we +# use system libopts +RDEPEND=">=dev-libs/libtasn1-2.14[${MULTILIB_USEDEP}] + >=dev-libs/nettle-2.7[gmp,${MULTILIB_USEDEP}] + dev-libs/gmp[${MULTILIB_USEDEP}] + sys-devel/autogen + crywrap? ( net-dns/libidn ) + dane? ( net-dns/unbound[${MULTILIB_USEDEP}] ) + guile? ( >=dev-scheme/guile-1.8[networking] ) + nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] ) + pkcs11? ( >=app-crypt/p11-kit-0.19.2[${MULTILIB_USEDEP}] ) + zlib? ( >=sys-libs/zlib-1.2.3.1[${MULTILIB_USEDEP}] ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20140508 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + )" +DEPEND="${RDEPEND} + >=sys-devel/automake-1.11.6 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] + doc? ( dev-util/gtk-doc ) + nls? ( sys-devel/gettext ) + test? ( app-misc/datefudge )" + +DOCS=( AUTHORS ChangeLog NEWS README THANKS doc/TODO ) + +S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)" + +src_prepare() { + # tests/suite directory is not distributed + sed -i \ + -e ':AC_CONFIG_FILES(\[tests/suite/Makefile\]):d' \ + -e '/^AM_INIT_AUTOMAKE/s/-Werror//' \ + configure.ac || die + + sed -i \ + -e 's/imagesdir = $(infodir)/imagesdir = $(htmldir)/' \ + doc/Makefile.am || die + + # force regeneration of autogen-ed files + local file + for file in $(grep -l AutoGen-ed src/*.c) ; do + rm src/$(basename ${file} .c).{c,h} || die + done + + epatch "${FILESDIR}/${PN}-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch" + + # support user patches + epatch_user + + eautoreconf + + # Use sane .so versioning on FreeBSD. + elibtoolize + + # bug 497472 + use cxx || epunt_cxx + + #Not copying the sources results in compilation errors by missing .c files + multilib_copy_sources +} + +multilib_src_configure() { + LINGUAS="${LINGUAS//en/en@boldquot en@quot}" + + # TPM needs to be tested before being enabled + # hardware-accell is disabled on OSX because the asm files force + # GNU-stack (as doesn't support that) and when that's removed ld + # complains about duplicate symbols + ECONF_SOURCE=${S} \ + econf \ + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ + --disable-valgrind-tests \ + --enable-heartbeat-support \ + $(use_enable cxx) \ + $(use_enable dane libdane) \ + $(multilib_native_use_enable doc gtk-doc) \ + $(multilib_native_use_enable doc gtk-doc-pdf) \ + $(multilib_native_use_enable guile) \ + $(multilib_native_use_enable crywrap) \ + $(use_enable nls) \ + $(use_enable static-libs static) \ + $(use_with pkcs11 p11-kit) \ + $(use_with zlib) \ + --without-tpm \ + $([[ ${CHOST} == *-darwin* ]] && echo --disable-hardware-acceleration) +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + + # symlink certtool for use in other ABIs + if use test; then + ln -s "${BUILD_DIR}"/src "${T}"/native-tools || die + fi + else + emake -C gl + emake -C lib + emake -C extra + use dane && emake -C libdane + fi +} + +multilib_src_test() { + if multilib_is_native_abi; then + # parallel testing often fails + emake -j1 check + else + # use native ABI tools + ln -s "${T}"/native-tools/{certtool,gnutls-{serv,cli}} \ + "${BUILD_DIR}"/src/ || die + + emake -C gl -j1 check + emake -C tests -j1 check + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" install + else + emake -C lib DESTDIR="${D}" install + emake -C extra DESTDIR="${D}" install + use dane && emake -C libdane DESTDIR="${D}" install + fi +} + +multilib_src_install_all() { + einstalldocs + prune_libtool_files --all + + dodoc doc/certtool.cfg + + if use doc; then + dodoc doc/gnutls.pdf + dohtml doc/gnutls.html + fi + + if use examples; then + docinto examples + dodoc doc/examples/*.c + fi +} diff --git a/net-libs/gnutls/metadata.xml b/net-libs/gnutls/metadata.xml new file mode 100644 index 0000000..d4fd787 --- /dev/null +++ b/net-libs/gnutls/metadata.xml @@ -0,0 +1,17 @@ + + + + crypto + + + Build the crywrap TLS proxy service + + + Build libgnutls-dane, implementing DNS-based Authentication of + Named Entities. Requires net-dns/unbound. + + + Add support for PKCS#11 through app-crypt/p11-kit + + + -- cgit v1.2.3-65-gdbad