pkgsrc-Changes archive

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

CVS commit: pkgsrc/security/gnutls



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Fri Aug 21 14:06:12 UTC 2020

Modified Files:
        pkgsrc/security/gnutls: Makefile

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 pkgsrc/security/gnutls/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/gnutls/Makefile
diff -u pkgsrc/security/gnutls/Makefile:1.214 pkgsrc/security/gnutls/Makefile:1.215
--- pkgsrc/security/gnutls/Makefile:1.214       Tue Jun  9 09:53:11 2020
+++ pkgsrc/security/gnutls/Makefile     Fri Aug 21 14:06:12 2020
@@ -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 @@ EGDIR=               ${PREFIX}/share/examples/gnutls
 
 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