biology/hisat2: Add SIMDE support SIMDE enables SSE and other x86 intrinsics on other architectures Tested on ARM64, may work on other 64-bit platformsdiff -r1.10 -r1.11 pkgsrc/biology/hisat2/Makefile
(bacon)
@@ -1,33 +1,34 @@ | @@ -1,33 +1,34 @@ | |||
1 | # $NetBSD: Makefile,v 1.10 2022/12/28 15:27:16 bacon Exp $ | 1 | # $NetBSD: Makefile,v 1.11 2023/05/17 21:55:34 bacon Exp $ | |
2 | 2 | |||
3 | DISTNAME= hisat2-2.2.1 | 3 | DISTNAME= hisat2-2.2.1 | |
4 | PKGREVISION= 2 | 4 | PKGREVISION= 3 | |
5 | CATEGORIES= biology | 5 | CATEGORIES= biology | |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=DaehwanKimLab/} | 6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=DaehwanKimLab/} | |
7 | GITHUB_TAG= v${PKGVERSION_NOREV} | 7 | GITHUB_TAG= v${PKGVERSION_NOREV} | |
8 | 8 | |||
9 | OWNER= bacon@NetBSD.org | 9 | OWNER= bacon@NetBSD.org | |
10 | HOMEPAGE= https://ccb.jhu.edu/software/hisat2/index.shtml | 10 | HOMEPAGE= https://ccb.jhu.edu/software/hisat2/index.shtml | |
11 | COMMENT= Alignment program for mapping next-generation sequencing reads | 11 | COMMENT= Alignment program for mapping next-generation sequencing reads | |
12 | LICENSE= gnu-gpl-v3 | 12 | LICENSE= gnu-gpl-v3 | |
13 | 13 | |||
14 | # 64-bit code, some assembly language | 14 | # 64-bit code, some assembly language | |
15 | ONLY_FOR_PLATFORM= *-*-x86_64 | 15 | ONLY_FOR_PLATFORM= *-*-x86_64 *-*-aarch64 | |
16 | 16 | |||
17 | USE_LANGUAGES= c c++ | 17 | USE_LANGUAGES= c c++ | |
18 | USE_TOOLS+= bash gmake perl | 18 | USE_TOOLS+= bash gmake perl | |
19 | 19 | |||
20 | REPLACE_BASH= scripts/*.sh | 20 | REPLACE_BASH= scripts/*.sh | |
21 | REPLACE_PERL= hisat2 scripts/*.sh scripts/*.pl scripts/*.py | 21 | REPLACE_PERL= hisat2 scripts/*.sh scripts/*.pl scripts/*.py | |
22 | REPLACE_PYTHON= *.py scripts/*.py hisat2-build hisat2-inspect | 22 | REPLACE_PYTHON= *.py scripts/*.py hisat2-build hisat2-inspect | |
23 | 23 | |||
24 | PTHREAD_AUTO_VARS= yes | 24 | PTHREAD_AUTO_VARS= yes | |
25 | WRKSRC= ${WRKDIR}/hisat2-2.2.1 | 25 | WRKSRC= ${WRKDIR}/hisat2-2.2.1 | |
26 | 26 | |||
27 | # Unbreak #include <version> on case-insensitive file systems | 27 | # Unbreak #include <version> on case-insensitive file systems | |
28 | post-patch: | 28 | post-patch: | |
29 | ${MV} ${WRKSRC}/VERSION ${WRKSRC}/HISAT2_VERSION | 29 | ${MV} ${WRKSRC}/VERSION ${WRKSRC}/HISAT2_VERSION | |
30 | 30 | |||
31 | .include "../../devel/simde/buildlink3.mk" | |||
31 | .include "../../lang/python/application.mk" | 32 | .include "../../lang/python/application.mk" | |
32 | .include "../../mk/pthread.buildlink3.mk" | 33 | .include "../../mk/pthread.buildlink3.mk" | |
33 | .include "../../mk/bsd.pkg.mk" | 34 | .include "../../mk/bsd.pkg.mk" |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.2 2022/03/17 16:01:11 bacon Exp $ | 1 | @comment $NetBSD: PLIST,v 1.3 2023/05/17 21:55:34 bacon Exp $ | |
2 | bin/hisat2 | 2 | bin/hisat2 | |
3 | bin/hisat2-align-l | 3 | bin/hisat2-align-l | |
4 | bin/hisat2-align-s | 4 | bin/hisat2-align-s | |
5 | bin/hisat2-build | 5 | bin/hisat2-build | |
6 | bin/hisat2-build-l | 6 | bin/hisat2-build-l | |
7 | bin/hisat2-build-s | 7 | bin/hisat2-build-s | |
8 | bin/hisat2-inspect | 8 | bin/hisat2-inspect | |
9 | bin/hisat2-inspect-l | 9 | bin/hisat2-inspect-l | |
10 | bin/hisat2-inspect-s | 10 | bin/hisat2-inspect-s | |
11 | bin/hisat2-repeat | 11 | bin/hisat2-repeat | |
12 | libexec/hisat2/convert_quals.pl | 12 | libexec/hisat2/convert_quals.pl | |
13 | libexec/hisat2/extract_exons.py | 13 | libexec/hisat2/extract_exons.py | |
14 | libexec/hisat2/extract_splice_sites.py | 14 | libexec/hisat2/extract_splice_sites.py |
@@ -1,8 +1,10 @@ | @@ -1,8 +1,10 @@ | |||
1 | $NetBSD: distinfo,v 1.4 2022/03/17 16:01:11 bacon Exp $ | 1 | $NetBSD: distinfo,v 1.5 2023/05/17 21:55:34 bacon Exp $ | |
2 | 2 | |||
3 | BLAKE2s (hisat2-2.2.1.tar.gz) = 1cc424a10f1fcf25c70294bef3b21e67b07cebcb7b73e36c0176a2dfdec51bdb | 3 | BLAKE2s (hisat2-2.2.1.tar.gz) = 1cc424a10f1fcf25c70294bef3b21e67b07cebcb7b73e36c0176a2dfdec51bdb | |
4 | SHA512 (hisat2-2.2.1.tar.gz) = a5a688ad0ccfaf326b3ec6dc97206995306aa6f5b6e58223c2113adbca2745f1e8205b436fdf8e01f42da7a38718f9f3bf214b951fb5360d53247d99a0bdbf46 | 4 | SHA512 (hisat2-2.2.1.tar.gz) = a5a688ad0ccfaf326b3ec6dc97206995306aa6f5b6e58223c2113adbca2745f1e8205b436fdf8e01f42da7a38718f9f3bf214b951fb5360d53247d99a0bdbf46 | |
5 | Size (hisat2-2.2.1.tar.gz) = 6761242 bytes | 5 | Size (hisat2-2.2.1.tar.gz) = 6761242 bytes | |
6 | SHA1 (patch-Makefile) = 067b766ecebacd840db4a287bba25d2d2264b339 | 6 | SHA1 (patch-Makefile) = 067b766ecebacd840db4a287bba25d2d2264b339 | |
7 | SHA1 (patch-aligner__sw.h) = 628c14bfd6b26185eada73013175e35de2b38227 | |||
7 | SHA1 (patch-hisat2) = 6010f5fcc1e7dfcb383a4defc4e3d9f06322370d | 8 | SHA1 (patch-hisat2) = 6010f5fcc1e7dfcb383a4defc4e3d9f06322370d | |
8 | SHA1 (patch-processor__support.h) = 56d9cd4ba18e37879acba521a0f431fe2b4290af | 9 | SHA1 (patch-processor__support.h) = 56d9cd4ba18e37879acba521a0f431fe2b4290af | |
10 | SHA1 (patch-sse__util.h) = f0bbe72dfe3a2567e614683e3aecc10f3d6583ef |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: patch-Makefile,v 1.1 2022/03/17 16:01:12 bacon Exp $ | 1 | $NetBSD: patch-Makefile,v 1.2 2023/05/17 21:55:34 bacon Exp $ | |
2 | 2 | |||
3 | # Respect env | 3 | # Respect env | |
4 | 4 | |||
5 | --- Makefile.orig 2020-07-24 20:07:54.000000000 +0000 | 5 | --- Makefile.orig 2020-07-24 20:07:54.000000000 +0000 | |
6 | +++ Makefile | 6 | +++ Makefile | |
7 | @@ -23,9 +23,11 @@ | 7 | @@ -23,9 +23,11 @@ | |
8 | INC = | 8 | INC = | |
9 | GCC_PREFIX = $(shell dirname `which gcc`) | 9 | GCC_PREFIX = $(shell dirname `which gcc`) | |
10 | GCC_SUFFIX = | 10 | GCC_SUFFIX = | |
11 | -CC = $(GCC_PREFIX)/gcc$(GCC_SUFFIX) | 11 | -CC = $(GCC_PREFIX)/gcc$(GCC_SUFFIX) | |
12 | -CPP = $(GCC_PREFIX)/g++$(GCC_SUFFIX) | 12 | -CPP = $(GCC_PREFIX)/g++$(GCC_SUFFIX) | |
13 | -CXX = $(CPP) | 13 | -CXX = $(CPP) | |
14 | +CC ?= $(GCC_PREFIX)/gcc$(GCC_SUFFIX) | 14 | +CC ?= $(GCC_PREFIX)/gcc$(GCC_SUFFIX) |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: patch-processor__support.h,v 1.1 2022/03/17 16:01:12 bacon Exp $ | 1 | $NetBSD: patch-processor__support.h,v 1.2 2023/05/17 21:55:34 bacon Exp $ | |
2 | 2 | |||
3 | # Support non-x86 | 3 | # Support non-x86 | |
4 | 4 | |||
5 | --- processor_support.h.orig 2020-07-24 20:07:54 UTC | 5 | --- processor_support.h.orig 2020-07-24 20:07:54 UTC | |
6 | +++ processor_support.h | 6 | +++ processor_support.h | |
7 | @@ -12,7 +12,7 @@ | 7 | @@ -12,7 +12,7 @@ | |
8 | 8 | |||
9 | #if defined(__INTEL_COMPILER) | 9 | #if defined(__INTEL_COMPILER) | |
10 | # define USING_INTEL_COMPILER | 10 | # define USING_INTEL_COMPILER | |
11 | -#elif defined(__GNUC__) | 11 | -#elif defined(__GNUC__) | |
12 | +#elif defined(__GNUC__) && (defined(__amd64__) || defined(__i386__)) | 12 | +#elif defined(__GNUC__) && (defined(__amd64__) || defined(__i386__)) | |
13 | # define USING_GCC_COMPILER | 13 | # define USING_GCC_COMPILER | |
14 | # include <cpuid.h> | 14 | # include <cpuid.h> |
$NetBSD: patch-aligner__sw.h,v 1.1 2023/05/17 21:55:34 bacon Exp $
# Support non-x86
--- aligner_sw.h.orig 2020-07-24 20:07:54.000000000 +0000
+++ aligner_sw.h
@@ -66,11 +66,14 @@
#define INLINE_CUPS
+#define SIMDE_ENABLE_NATIVE_ALIASES
+
+#include <simde/x86/sse2.h>
#include <stdint.h>
#include <iostream>
#include <limits>
#include "threading.h"
-#include <emmintrin.h>
+// #include <emmintrin.h> // Replace this with simde when possible
#include "aligner_sw_common.h"
#include "aligner_sw_nuc.h"
#include "ds.h"
$NetBSD: patch-sse__util.h,v 1.1 2023/05/17 21:55:34 bacon Exp $
# Support non-x86
--- sse_util.h.orig 2020-07-24 20:07:54.000000000 +0000
+++ sse_util.h
@@ -20,11 +20,14 @@
#ifndef SSE_UTIL_H_
#define SSE_UTIL_H_
+#define SIMDE_ENABLE_NATIVE_ALIASES
+#include <simde/x86/sse2.h>
+
#include "assert_helpers.h"
#include "ds.h"
#include "limit.h"
#include <iostream>
-#include <emmintrin.h>
+// #include <emmintrin.h> // Replace with simde when possible
class EList_m128i {
public:
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: patch-hisat2,v 1.2 2022/03/17 16:01:12 bacon Exp $ | 1 | $NetBSD: patch-hisat2,v 1.3 2023/05/17 21:55:34 bacon Exp $ | |
2 | 2 | |||
3 | # Support BSD, etc. | 3 | # Support BSD, etc. | |
4 | 4 | |||
5 | --- hisat2.orig 2018-11-07 21:43:32 UTC | 5 | --- hisat2.orig 2018-11-07 21:43:32 UTC | |
6 | +++ hisat2 | 6 | +++ hisat2 | |
7 | @@ -45,7 +45,7 @@ while (-f $prog && -l $prog){ | 7 | @@ -45,7 +45,7 @@ while (-f $prog && -l $prog){ | |
8 | 8 | |||
9 | ($vol,$script_path,$prog) | 9 | ($vol,$script_path,$prog) | |
10 | = File::Spec->splitpath($prog); | 10 | = File::Spec->splitpath($prog); | |
11 | -my $os_is_nix = ($^O eq "linux") || ($^O eq "darwin"); | 11 | -my $os_is_nix = ($^O eq "linux") || ($^O eq "darwin"); | |
12 | +my $os_is_nix = ($^O ne "MSWin32") && ($^O ne "MSWin64"); | 12 | +my $os_is_nix = ($^O ne "MSWin32") && ($^O ne "MSWin64"); | |
13 | my $align_bin_s = $os_is_nix ? 'hisat2-align-s' : 'hisat2-align-s.exe'; | 13 | my $align_bin_s = $os_is_nix ? 'hisat2-align-s' : 'hisat2-align-s.exe'; | |
14 | my $build_bin = $os_is_nix ? 'hisat2-build' : 'hisat2-build.exe'; | 14 | my $build_bin = $os_is_nix ? 'hisat2-build' : 'hisat2-build.exe'; |