1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-19 08:13:21 +00:00

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
This commit is contained in:
Jason W. Bacon 2023-07-20 06:20:39 -05:00
parent 7a00a32eb6
commit 2908335412
4 changed files with 56 additions and 25 deletions

View File

@ -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:

View File

@ -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;
}

View File

@ -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"

View File

@ -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"