diff --git a/biology/canu/Makefile b/biology/canu/Makefile index 56ebc0779e5e..72a628226299 100644 --- a/biology/canu/Makefile +++ b/biology/canu/Makefile @@ -1,57 +1,66 @@ PORTNAME= canu -DISTVERSION= 2.1 -PORTREVISION= 1 -CATEGORIES= biology java perl5 +DISTVERSION= 2.2 +CATEGORIES= wip biology java perl5 # Github auto-generated tarballs lack submodules -MASTER_SITES= https://github.com/marbl/canu/releases/download/v2.1/ +MASTER_SITES= https://github.com/marbl/canu/releases/download/v${DISTVERSION}/ MAINTAINER= jwb@FreeBSD.org COMMENT= Single molecule sequence assembler LICENSE= GPLv2 LICENSE_FILE= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/README.license.GPL -BROKEN_powerpc64= fails to build: utgcns/libboost/boost/smart_ptr/detail/sp_counted_impl.hpp:81:5: error: 'get_deleter' declared as a 'virtual' field -NOT_FOR_ARCHS= armv6 armv7 i386 powerpc -NOT_FOR_ARCHS_REASON= __int128 is not supported on this target +NOT_FOR_ARCHS= armv6 armv7 i386 mips powerpc powerpcspe +NOT_FOR_ARCHS_REASON= Requires 64-bit processor LIB_DEPENDS= libboost_regex.so:devel/boost-libs RUN_DEPENDS= gnuplot:math/gnuplot -USES= compiler:c++11-lang gmake localbase perl5 +USES= compiler:c++11-lang gmake localbase perl5 tar:xz USE_JAVA= yes JAVA_RUN= yes JAVA_VERSION= 1.8+ 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 +.include + +# Parasail should be unbundled, but that would be a project because it's +# currently woven into the canu code +post-extract: +.if ${ARCH} == "aarch64" + ${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 +.endif + pre-configure: @${REINPLACE_CMD} \ -e 's|-O4||g' \ -e 's|-funroll-loops||g' \ -e 's|-fexpensive-optimizations||g' \ ${WRKSRC}/Makefile @${REINPLACE_CMD} \ -e 's|RealBin/../lib/site_perl|RealBin/../${SITE_PERL_REL}/canu|g' \ ${WRKSRC}/pipelines/canu.pl # Upstream does not want to use lib/perl5/site_perl post-build: @${MKDIR} ${WRKSRC}/build/lib/perl5 ${MV} ${WRKSRC}/build/lib/site_perl ${WRKSRC}/build/lib/perl5 do-install: @${MKDIR} ${STAGEDIR}${PREFIX} (cd ${WRKSRC}/build && ${COPYTREE_BIN} bin ${STAGEDIR}${PREFIX}) # STRIP_CMD fails without this under poudriere @${CHMOD} u+w ${STAGEDIR}${PREFIX}/bin/* @${STRIP_CMD} \ `file ${STAGEDIR}${PREFIX}/bin/* | ${GREP} ELF | cut -d : -f 1` (cd ${WRKSRC}/build && \ ${COPYTREE_SHARE} "lib share" ${STAGEDIR}${PREFIX}) -.include +.include diff --git a/biology/canu/distinfo b/biology/canu/distinfo index 0ddec4d01a04..eace34089e15 100644 --- a/biology/canu/distinfo +++ b/biology/canu/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1599584712 -SHA256 (canu-2.1.tar.gz) = 73c70d2d6326bdaf471549f2d1eb7a1bf1e0fbf45cdc4a830bd6ce9fe3f3c231 -SIZE (canu-2.1.tar.gz) = 3313120 +TIMESTAMP = 1639774550 +SHA256 (canu-2.2.tar.xz) = e4d0c7b82149114f442ccd39e18f7fe2061c63b28d53700ad896e022b73b7404 +SIZE (canu-2.2.tar.xz) = 2400192 diff --git a/biology/canu/files/cpuid_arm.c b/biology/canu/files/cpuid_arm.c new file mode 100644 index 000000000000..3b35be06c087 --- /dev/null +++ b/biology/canu/files/cpuid_arm.c @@ -0,0 +1,57 @@ +/** + * @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() +{ +#if HAVE_NEON + return 1; +#else + return 0; +#endif +} + diff --git a/biology/canu/files/cpuid_ppc.c b/biology/canu/files/cpuid_ppc.c new file mode 100644 index 000000000000..4a832a90a32c --- /dev/null +++ b/biology/canu/files/cpuid_ppc.c @@ -0,0 +1,57 @@ +/** + * @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() +{ +#if HAVE_ALTIVEC + return 1; +#else + return 0; +#endif +} + +int parasail_can_use_neon() +{ + return 0; +} + diff --git a/biology/canu/files/patch-utgcns_libboost_boost_smart__ptr_detail_shared__count.hpp b/biology/canu/files/patch-utgcns_libboost_boost_smart__ptr_detail_shared__count.hpp new file mode 100644 index 000000000000..554c97a04af9 --- /dev/null +++ b/biology/canu/files/patch-utgcns_libboost_boost_smart__ptr_detail_shared__count.hpp @@ -0,0 +1,10 @@ +--- utgcns/libboost/boost/smart_ptr/detail/shared_count.hpp.orig 2021-12-18 13:01:24 UTC ++++ utgcns/libboost/boost/smart_ptr/detail/shared_count.hpp +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/biology/canu/files/patch-utility_src_parasail_internal__sse.h b/biology/canu/files/patch-utility_src_parasail_internal__sse.h new file mode 100644 index 000000000000..ea03b5ab917c --- /dev/null +++ b/biology/canu/files/patch-utility_src_parasail_internal__sse.h @@ -0,0 +1,12 @@ +--- 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 + +-#include ++#define SIMDE_ENABLE_NATIVE_ALIASES ++#include + + #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 new file mode 100644 index 000000000000..8da82c2d106a --- /dev/null +++ b/biology/canu/files/patch-utility_src_utility_align-ssw.H @@ -0,0 +1,12 @@ +--- 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 + #include + #include +-#include ++#define SIMDE_ENABLE_NATIVE_ALIASES ++#include + + + #define MAPSTR "MIDNSHP=X" diff --git a/biology/canu/files/patch-utility_src_utility_files.H b/biology/canu/files/patch-utility_src_utility_files.H new file mode 100644 index 000000000000..3e72cbe4942b --- /dev/null +++ b/biology/canu/files/patch-utility_src_utility_files.H @@ -0,0 +1,11 @@ +--- utility/src/utility/files.H.orig 2021-12-17 20:57:15 UTC ++++ utility/src/utility/files.H +@@ -22,7 +22,7 @@ + + #include "types.H" + #include +- ++#include + + // Provides a safe and reliable mechanism for reading / writing + // binary data. diff --git a/biology/canu/files/patch-utility_src_utility_system.H b/biology/canu/files/patch-utility_src_utility_system.H new file mode 100644 index 000000000000..339c577b992d --- /dev/null +++ b/biology/canu/files/patch-utility_src_utility_system.H @@ -0,0 +1,11 @@ +--- utility/src/utility/system.H.orig 2021-12-17 20:57:47 UTC ++++ utility/src/utility/system.H +@@ -23,7 +23,7 @@ + #include "types.H" + + #include +- ++#include + + + double getTime(void); diff --git a/biology/canu/files/patch-utility_src_utility_types.H b/biology/canu/files/patch-utility_src_utility_types.H new file mode 100644 index 000000000000..e53536e09c8f --- /dev/null +++ b/biology/canu/files/patch-utility_src_utility_types.H @@ -0,0 +1,11 @@ +--- utility/src/utility/types.H.orig 2021-12-17 20:58:13 UTC ++++ utility/src/utility/types.H +@@ -55,7 +55,7 @@ + #include + + #include +-#include ++#include + + #include + #include diff --git a/biology/canu/pkg-plist b/biology/canu/pkg-plist index e3d2f84d51de..d76d4279c35e 100644 --- a/biology/canu/pkg-plist +++ b/biology/canu/pkg-plist @@ -1,77 +1,78 @@ bin/alignGFA bin/bogart -bin/bogus bin/canu bin/canu-time bin/canu.defaults bin/correctOverlaps bin/draw-tig bin/dumpBlob bin/edalign bin/errorEstimate bin/falconsense bin/filterCorrectionLayouts bin/filterCorrectionOverlaps bin/findErrors bin/findErrors-Dump bin/fixErrors bin/generateCorrectionLayouts bin/layoutReads bin/loadCorrectedReads bin/loadErates bin/loadTrimmedReads bin/mergeRanges bin/meryl bin/mhapConvert bin/mmapConvert bin/ovStoreBucketizer bin/ovStoreBuild bin/ovStoreConfig bin/ovStoreDump bin/ovStoreIndexer bin/ovStoreSorter bin/ovStoreStats bin/overlapAlign +bin/overlapCheck bin/overlapConvert bin/overlapImport bin/overlapInCore bin/overlapInCorePartition bin/overlapPair bin/prefixEditDistance-matchLimitGenerate bin/splitHaplotype bin/splitReads bin/sqStoreCreate bin/sqStoreDumpFASTQ bin/sqStoreDumpMetaData bin/tgStoreCompress bin/tgStoreDump bin/tgStoreLoad bin/tgTigDisplay bin/trimReads bin/utgcns lib/libcanu.a %%SITE_PERL%%/canu/Configure.pm %%SITE_PERL%%/canu/Consensus.pm %%SITE_PERL%%/canu/CorrectReads.pm %%SITE_PERL%%/canu/Defaults.pm %%SITE_PERL%%/canu/Execution.pm %%SITE_PERL%%/canu/Grid.pm %%SITE_PERL%%/canu/Grid_Cloud.pm %%SITE_PERL%%/canu/Grid_DNANexus.pm %%SITE_PERL%%/canu/Grid_LSF.pm +%%SITE_PERL%%/canu/Grid_Local.pm %%SITE_PERL%%/canu/Grid_PBSTorque.pm %%SITE_PERL%%/canu/Grid_SGE.pm %%SITE_PERL%%/canu/Grid_Slurm.pm %%SITE_PERL%%/canu/HaplotypeReads.pm %%SITE_PERL%%/canu/Meryl.pm %%SITE_PERL%%/canu/Output.pm %%SITE_PERL%%/canu/OverlapBasedTrimming.pm %%SITE_PERL%%/canu/OverlapErrorAdjustment.pm %%SITE_PERL%%/canu/OverlapInCore.pm %%SITE_PERL%%/canu/OverlapMMap.pm %%SITE_PERL%%/canu/OverlapMhap.pm %%SITE_PERL%%/canu/OverlapStore.pm %%SITE_PERL%%/canu/Report.pm %%SITE_PERL%%/canu/SequenceStore.pm %%SITE_PERL%%/canu/Unitig.pm %%JAVAJARDIR%%/mhap-2.1.3.jar