From 6114a47687bfc6068fc7000072bdb5a001b56215 Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 10 Feb 2014 12:01:19 +0000 Subject: Add patch from GnuTLS repository to fix build of assembler routines under Mac OS X. Crucial hint provided by Nikos Mavrogiannopoulos. --- security/gnutls/Makefile | 7 ++++--- security/gnutls/distinfo | 9 +++++--- security/gnutls/patches/patch-ae | 4 +++- security/gnutls/patches/patch-lib_Makefile.in | 6 ++++-- .../patch-lib_accelerated_x86_aes-cbc-x86-aesni.c | 18 ++++++++++++++++ .../patch-lib_accelerated_x86_aes-cbc-x86-ssse3.c | 18 ++++++++++++++++ .../gnutls/patches/patch-lib_accelerated_x86_x86.h | 24 ++++++++++++++++++++++ 7 files changed, 77 insertions(+), 9 deletions(-) create mode 100644 security/gnutls/patches/patch-lib_accelerated_x86_aes-cbc-x86-aesni.c create mode 100644 security/gnutls/patches/patch-lib_accelerated_x86_aes-cbc-x86-ssse3.c create mode 100644 security/gnutls/patches/patch-lib_accelerated_x86_x86.h (limited to 'security/gnutls') diff --git a/security/gnutls/Makefile b/security/gnutls/Makefile index 23867d1e3a5..104954d9471 100644 --- a/security/gnutls/Makefile +++ b/security/gnutls/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.141 2014/01/26 09:38:33 tron Exp $ +# $NetBSD: Makefile,v 1.142 2014/02/10 12:01:19 tron Exp $ DISTNAME= gnutls-3.2.9 +PKGREVISION= 1 CATEGORIES= security devel MASTER_SITES= ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/ EXTRACT_SUFX= .tar.xz @@ -41,8 +42,8 @@ EGDIR= ${PREFIX}/share/examples/gnutls .include "../../mk/bsd.prefs.mk" -# Assembler support is broken for Mac OS X and SunOS in 3.2.9. -.if ${OPSYS} == "Darwin" || ${OPSYS} == "SunOS" +# Assembler support is broken for SunOS in 3.2.9. +.if ${OPSYS} == "SunOS" CONFIGURE_ARGS+= --disable-hardware-acceleration .endif diff --git a/security/gnutls/distinfo b/security/gnutls/distinfo index 1f87093dcf7..db7cf185025 100644 --- a/security/gnutls/distinfo +++ b/security/gnutls/distinfo @@ -1,11 +1,14 @@ -$NetBSD: distinfo,v 1.102 2014/01/25 10:59:22 wiz Exp $ +$NetBSD: distinfo,v 1.103 2014/02/10 12:01:19 tron Exp $ SHA1 (gnutls-3.2.9.tar.xz) = 6644d1034c3880c3a52d4e1da344f2423a02dd6c RMD160 (gnutls-3.2.9.tar.xz) = fa434a751735a9c4a6af65d512c0bbab9245344b Size (gnutls-3.2.9.tar.xz) = 5134196 bytes -SHA1 (patch-ae) = 71fbbeb43ac1689fca6fec7f8348d8534c1dc38a +SHA1 (patch-ae) = b6402cc4a03f1b32792191518ed0c5596eb91c07 SHA1 (patch-gl_stdio.in.h) = b5802da2cccddd6fab73bd39c49f7d62bef58464 -SHA1 (patch-lib_Makefile.in) = 00cbff0bfaf8f5b8ec6db8dbe12d14a1cb3ffb9b +SHA1 (patch-lib_Makefile.in) = d395121b1b640aed76aff8033106c978e7ec4ce7 +SHA1 (patch-lib_accelerated_x86_aes-cbc-x86-aesni.c) = ec5e51a623f31025a864d15dc6386de9fc85807a +SHA1 (patch-lib_accelerated_x86_aes-cbc-x86-ssse3.c) = 45f4c04e008fb40aea4a04e0bd81c669c2d9f793 +SHA1 (patch-lib_accelerated_x86_x86.h) = d56fc79389d561bbd76da32f8f1ed778adb7768c SHA1 (patch-lib_nettle_rnd.c) = c0b0bd744e2370abd111f5418668bbf4dc0ea35d SHA1 (patch-src_libopts_autoopts_options.h) = 60be5b43f23ba5978759c1e245781da7f9125071 SHA1 (patch-src_libopts_compat_compat.h) = 2e0a1be460917b2d7a8f6bdac698dad405143013 diff --git a/security/gnutls/patches/patch-ae b/security/gnutls/patches/patch-ae index 00bc65d7f19..81668e4b8aa 100644 --- a/security/gnutls/patches/patch-ae +++ b/security/gnutls/patches/patch-ae @@ -1,4 +1,6 @@ -$NetBSD: patch-ae,v 1.4 2012/07/02 18:53:03 drochner Exp $ +$NetBSD: patch-ae,v 1.5 2014/02/10 12:01:20 tron Exp $ + +Fix build. --- guile/src/core.c.orig 2012-04-12 20:05:11.000000000 +0000 +++ guile/src/core.c diff --git a/security/gnutls/patches/patch-lib_Makefile.in b/security/gnutls/patches/patch-lib_Makefile.in index 36ce244b954..158edfc512e 100644 --- a/security/gnutls/patches/patch-lib_Makefile.in +++ b/security/gnutls/patches/patch-lib_Makefile.in @@ -1,4 +1,6 @@ -$NetBSD: patch-lib_Makefile.in,v 1.4 2013/11/29 22:55:29 wiz Exp $ +$NetBSD: patch-lib_Makefile.in,v 1.5 2014/02/10 12:01:20 tron Exp $ + +Correct path to locale files. --- lib/Makefile.in.orig 2013-11-23 10:09:55.000000000 +0000 +++ lib/Makefile.in @@ -16,7 +18,7 @@ $NetBSD: patch-lib_Makefile.in,v 1.4 2013/11/29 22:55:29 wiz Exp $ libdir = @libdir@ libexecdir = @libexecdir@ -localedir = $(datadir)/locale -+localedir = /usr/pkg/share/locale ++localedir = @prefix@/share/locale localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ diff --git a/security/gnutls/patches/patch-lib_accelerated_x86_aes-cbc-x86-aesni.c b/security/gnutls/patches/patch-lib_accelerated_x86_aes-cbc-x86-aesni.c new file mode 100644 index 00000000000..fc2c04931f4 --- /dev/null +++ b/security/gnutls/patches/patch-lib_accelerated_x86_aes-cbc-x86-aesni.c @@ -0,0 +1,18 @@ +$NetBSD: patch-lib_accelerated_x86_aes-cbc-x86-aesni.c,v 1.1 2014/02/10 12:01:20 tron Exp $ + +Fix build under Mac OS X when assembler code is enabled. +Patch taken from here: + +https://www.gitorious.org/gnutls/gnutls/commit/54768ca1cd9049bbd1c695696ef3c8595c6052db + +--- lib/accelerated/x86/aes-cbc-x86-aesni.c.orig 2014-01-01 17:14:59.000000000 +0000 ++++ lib/accelerated/x86/aes-cbc-x86-aesni.c 2014-02-10 11:31:27.000000000 +0000 +@@ -39,8 +39,6 @@ + int enc; + }; + +-unsigned int _gnutls_x86_cpuid_s[4]; +- + static int + aes_cipher_init(gnutls_cipher_algorithm_t algorithm, void **_ctx, int enc) + { diff --git a/security/gnutls/patches/patch-lib_accelerated_x86_aes-cbc-x86-ssse3.c b/security/gnutls/patches/patch-lib_accelerated_x86_aes-cbc-x86-ssse3.c new file mode 100644 index 00000000000..7641d9bae6b --- /dev/null +++ b/security/gnutls/patches/patch-lib_accelerated_x86_aes-cbc-x86-ssse3.c @@ -0,0 +1,18 @@ +$NetBSD: patch-lib_accelerated_x86_aes-cbc-x86-ssse3.c,v 1.1 2014/02/10 12:01:20 tron Exp $ + +Fix build under Mac OS X when assembler code is enabled. +Patch taken from here: + +https://www.gitorious.org/gnutls/gnutls/commit/54768ca1cd9049bbd1c695696ef3c8595c6052db + +--- lib/accelerated/x86/aes-cbc-x86-ssse3.c.orig 2014-01-01 17:14:59.000000000 +0000 ++++ lib/accelerated/x86/aes-cbc-x86-ssse3.c 2014-02-10 11:31:27.000000000 +0000 +@@ -39,8 +39,6 @@ + int enc; + }; + +-unsigned int _gnutls_x86_cpuid_s[4]; +- + static int + aes_cipher_init(gnutls_cipher_algorithm_t algorithm, void **_ctx, int enc) + { diff --git a/security/gnutls/patches/patch-lib_accelerated_x86_x86.h b/security/gnutls/patches/patch-lib_accelerated_x86_x86.h new file mode 100644 index 00000000000..e4f314213c1 --- /dev/null +++ b/security/gnutls/patches/patch-lib_accelerated_x86_x86.h @@ -0,0 +1,24 @@ +$NetBSD: patch-lib_accelerated_x86_x86.h,v 1.1 2014/02/10 12:01:20 tron Exp $ + +Fix build under Mac OS X when assembler code is enabled. +Patch taken from here: + +https://www.gitorious.org/gnutls/gnutls/commit/54768ca1cd9049bbd1c695696ef3c8595c6052db + +--- lib/accelerated/x86/x86.h.orig 2014-01-01 17:14:59.000000000 +0000 ++++ lib/accelerated/x86/x86.h 2014-02-10 11:31:27.000000000 +0000 +@@ -22,6 +22,8 @@ + + #include + ++extern unsigned int _gnutls_x86_cpuid_s[4]; ++ + #if defined(ASM_X86) + + void gnutls_cpuid(unsigned int func, unsigned int *ax, unsigned int *bx, +@@ -43,5 +45,4 @@ + (nettle_hash_digest_func *) digest_func \ + } + +- + #endif -- cgit v1.2.3