diff options
author | schmonz <schmonz@pkgsrc.org> | 2020-08-21 14:06:12 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2020-08-21 14:06:12 +0000 |
commit | 3625706f5dd965c974b63ed6a33bc9184493cea0 (patch) | |
tree | d052aac83fd356631e880d78649d33ea02bb4a76 /security | |
parent | eafd0cac20ccabee7cd5646fca6149784e408f2e (diff) | |
download | pkgsrc-3625706f5dd965c974b63ed6a33bc9184493cea0.tar.gz |
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 (limited to 'security')
-rw-r--r-- | security/gnutls/Makefile | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/security/gnutls/Makefile b/security/gnutls/Makefile index dbe9911274b..3c553bebe43 100644 --- a/security/gnutls/Makefile +++ b/security/gnutls/Makefile @@ -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} |