Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jul 2023 11:22:19 GMT
From:      "Jason W. Bacon" <jwb@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 290833541264 - main - biology/canu: Fix build under clang 16
Message-ID:  <202307201122.36KBMJbN006025@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jwb:

URL: https://cgit.FreeBSD.org/ports/commit/?id=290833541264e265124451053d402f61e2313504

commit 290833541264e265124451053d402f61e2313504
Author:     Jason W. Bacon <jwb@FreeBSD.org>
AuthorDate: 2023-07-20 11:20:39 +0000
Commit:     Jason W. Bacon <jwb@FreeBSD.org>
CommitDate: 2023-07-20 11:20:39 +0000

    biology/canu: Fix build under clang 16
    
    Also add cpu_any.c to theoretically support any 64-bit CPU
    Drop unused simde patches
    
    Reported by:    pkg-fallout
---
 biology/canu/Makefile                              |  5 ++-
 biology/canu/files/cpuid_any.c                     | 52 ++++++++++++++++++++++
 .../patch-utility_src_parasail_internal__sse.h     | 12 -----
 .../files/patch-utility_src_utility_align-ssw.H    | 12 -----
 4 files changed, 56 insertions(+), 25 deletions(-)

diff --git a/biology/canu/Makefile b/biology/canu/Makefile
index 868d364ced15..d9b670ebf467 100644
--- a/biology/canu/Makefile
+++ b/biology/canu/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=		canu
 DISTVERSION=		2.2
-PORTREVISION=	2
+PORTREVISION=		3
 CATEGORIES=		biology java perl5
 # Github auto-generated tarballs lack submodules
 MASTER_SITES=		https://github.com/marbl/canu/releases/download/v${DISTVERSION}/
@@ -28,6 +28,7 @@ WRKSRC_SUBDIR=	src
 # Upstream Makefile compiles directly into ${DESTDIR}${PREFIX} rather than
 # using a separate install target.
 MAKE_ENV=	DESTDIR=${WRKSRC} CANU_BUILD_ENV=ports
+CXXFLAGS+=	-std=c++14
 
 .include <bsd.port.pre.mk>
 
@@ -38,6 +39,8 @@ post-extract:
 	${CP} ${FILESDIR}/cpuid_arm.c ${WRKSRC}/utility/src/parasail/cpuid.c
 .elif ${ARCH} == "powerpc64" || ${ARCH} == "powerpc64le"
 	${CP} ${FILESDIR}/cpuid_ppc.c ${WRKSRC}/utility/src/parasail/cpuid.c
+.elif ${ARCH} != "amd64"
+	${CP} ${FILESDIR}/cpuid_any.c ${WRKSRC}/utility/src/parasail/cpuid.c
 .endif
 
 pre-configure:
diff --git a/biology/canu/files/cpuid_any.c b/biology/canu/files/cpuid_any.c
new file mode 100644
index 000000000000..be03bd4a479b
--- /dev/null
+++ b/biology/canu/files/cpuid_any.c
@@ -0,0 +1,52 @@
+/**
+ * @file
+ *
+ * @author jeffrey.daily@gmail.com
+ *
+ * Copyright (c) 2015 Battelle Memorial Institute.
+ *
+ * For non-intel platforms, stub out the intel feature tests.
+ */
+#include "config.h"
+
+#include "parasail/cpuid.h"
+
+int parasail_can_use_avx512vbmi()
+{
+    return 0;
+}
+
+int parasail_can_use_avx512bw()
+{
+    return 0;
+}
+
+int parasail_can_use_avx512f()
+{
+    return 0;
+}
+
+int parasail_can_use_avx2()
+{
+    return 0;
+}
+
+int parasail_can_use_sse41()
+{
+    return 0;
+}
+
+int parasail_can_use_sse2()
+{
+    return 0;
+}
+
+int parasail_can_use_altivec()
+{
+    return 0;
+}
+
+int parasail_can_use_neon()
+{
+    return 0;
+}
diff --git a/biology/canu/files/patch-utility_src_parasail_internal__sse.h b/biology/canu/files/patch-utility_src_parasail_internal__sse.h
deleted file mode 100644
index ea03b5ab917c..000000000000
--- a/biology/canu/files/patch-utility_src_parasail_internal__sse.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- utility/src/parasail/internal_sse.h.orig	2021-12-17 22:10:09 UTC
-+++ utility/src/parasail/internal_sse.h
-@@ -10,7 +10,8 @@
- 
- #include <stdint.h>
- 
--#include <emmintrin.h>
-+#define SIMDE_ENABLE_NATIVE_ALIASES
-+#include <simde.h>
- 
- #include "parasail.h"
- 
diff --git a/biology/canu/files/patch-utility_src_utility_align-ssw.H b/biology/canu/files/patch-utility_src_utility_align-ssw.H
deleted file mode 100644
index 8da82c2d106a..000000000000
--- a/biology/canu/files/patch-utility_src_utility_align-ssw.H
+++ /dev/null
@@ -1,12 +0,0 @@
---- utility/src/utility/align-ssw.H.orig	2021-12-17 22:12:23 UTC
-+++ utility/src/utility/align-ssw.H
-@@ -33,7 +33,8 @@
- #include <stdio.h>
- #include <stdint.h>
- #include <string.h>
--#include <emmintrin.h>
-+#define SIMDE_ENABLE_NATIVE_ALIASES
-+#include <simde.h.h>
- 
- 
- #define MAPSTR "MIDNSHP=X"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307201122.36KBMJbN006025>