Skip to content

Commit

Permalink
biology/canu: Fix build under clang 16
Browse files Browse the repository at this point in the history
Also add cpu_any.c to theoretically support any 64-bit CPU
Drop unused simde patches

Reported by:    pkg-fallout
  • Loading branch information
Jason W. Bacon authored and Jason W. Bacon committed Jul 20, 2023
1 parent 7a00a32 commit 2908335
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 25 deletions.
5 changes: 4 additions & 1 deletion biology/canu/Makefile
Original file line number Diff line number Diff line change
@@ -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}/
Expand Down Expand Up @@ -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>

Expand All @@ -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:
Expand Down
52 changes: 52 additions & 0 deletions biology/canu/files/cpuid_any.c
Original file line number Diff line number Diff line change
@@ -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;
}
12 changes: 0 additions & 12 deletions biology/canu/files/patch-utility_src_parasail_internal__sse.h

This file was deleted.

12 changes: 0 additions & 12 deletions biology/canu/files/patch-utility_src_utility_align-ssw.H

This file was deleted.

0 comments on commit 2908335

Please sign in to comment.