Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/gnutls CentOS 6's /usr/bin/as is too old to b...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ed49b1de14ce
branches:  trunk
changeset: 437348:ed49b1de14ce
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Fri Aug 21 14:06:12 2020 +0000

description:
CentOS 6's /usr/bin/as is too old to build the ssse3 hardware
acceleration code. If we're x86_64, and the assembler is GNU, and the
version is too old, disable hardware acceleration. Other non-working
combinations can be added as they're discovered. No functional change
intended to any platforms where this previously built, but since it's
hard to be sure of that, I'm bumping PKGREVISION.

Alternatively, we could build with gas from devel/binutils when needed.
multimedia/libvpx says it does this (for similar reasons), but I
couldn't get that to work here, and am suspicious whether it still
works there.

diffstat:

 security/gnutls/Makefile |  31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)

diffs (47 lines):

diff -r 0201809eb82b -r ed49b1de14ce security/gnutls/Makefile
--- a/security/gnutls/Makefile  Fri Aug 21 12:43:39 2020 +0000
+++ b/security/gnutls/Makefile  Fri Aug 21 14:06:12 2020 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.214 2020/06/09 09:53:11 nia Exp $
+# $NetBSD: Makefile,v 1.215 2020/08/21 14:06:12 schmonz Exp $
 
 DISTNAME=      gnutls-3.6.14
+PKGREVISION=   1
 CATEGORIES=    security devel
 MASTER_SITES=  https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/
 EXTRACT_SUFX=  .tar.xz
@@ -64,6 +65,34 @@
 
 INSTALLATION_DIRS=     ${EGDIR} include/gnutls
 
+.include "../../mk/bsd.prefs.mk"
+
+.if ${MACHINE_ARCH} == "x86_64"
+GNUTLS_GAS_VERSION!=   \
+       ( env LC_ALL=C as --version 2>&1 | ${GREP} 'GNU assembler version' | ${AWK} '{print $$4}') 2>/dev/null || ${ECHO} 0
+.  if ${GNUTLS_GAS_VERSION} != 0
+GNUTLS_GAS_NEW_ENOUGH= no
+# for ssse3, >=2.22
+# better to BUILD_DEPENDS on binutils's gas
+GNUTLS_GAS_ACCEPTABLE_PATTERNS=        \
+       2.2[2-9]                \
+       2.2[2-9].*              \
+       2.2[2-9]-[0-9]*.*       \
+       2.[3-9][0-9]            \
+       2.[3-9][0-9].*          \
+       2.[3-9][0-9]-[0-9]*.*   \
+       [3-9]*.*
+.    for gas_pattern in ${GNUTLS_GAS_ACCEPTABLE_PATTERNS}
+.      if !empty(GNUTLS_GAS_VERSION:M${gas_pattern})
+GNUTLS_GAS_NEW_ENOUGH= yes
+.      endif
+.    endfor
+.    if !empty(GNUTLS_GAS_NEW_ENOUGH:M[nN][oO])
+CONFIGURE_ARGS+=       --disable-hardware-acceleration
+.    endif
+.  endif
+.endif
+
 post-install:
        cd ${WRKSRC}/doc/examples && ${INSTALL_DATA} *.c ${DESTDIR}${EGDIR}
 



Home | Main Index | Thread Index | Old Index