Wed May 17 21:55:35 2023 UTC ()
biology/hisat2: Add SIMDE support

SIMDE enables SSE and other x86 intrinsics on other architectures
Tested on ARM64, may work on other 64-bit platforms


(bacon)
diff -r1.10 -r1.11 pkgsrc/biology/hisat2/Makefile
diff -r1.2 -r1.3 pkgsrc/biology/hisat2/PLIST
diff -r1.4 -r1.5 pkgsrc/biology/hisat2/distinfo
diff -r1.1 -r1.2 pkgsrc/biology/hisat2/patches/patch-Makefile
diff -r1.1 -r1.2 pkgsrc/biology/hisat2/patches/patch-processor__support.h
diff -r0 -r1.1 pkgsrc/biology/hisat2/patches/patch-aligner__sw.h
diff -r0 -r1.1 pkgsrc/biology/hisat2/patches/patch-sse__util.h
diff -r1.2 -r1.3 pkgsrc/biology/hisat2/patches/patch-hisat2

cvs diff -r1.10 -r1.11 pkgsrc/biology/hisat2/Makefile (expand / switch to unified diff)

--- pkgsrc/biology/hisat2/Makefile 2022/12/28 15:27:16 1.10
+++ pkgsrc/biology/hisat2/Makefile 2023/05/17 21:55:34 1.11
@@ -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
3DISTNAME= hisat2-2.2.1 3DISTNAME= hisat2-2.2.1
4PKGREVISION= 2 4PKGREVISION= 3
5CATEGORIES= biology 5CATEGORIES= biology
6MASTER_SITES= ${MASTER_SITE_GITHUB:=DaehwanKimLab/} 6MASTER_SITES= ${MASTER_SITE_GITHUB:=DaehwanKimLab/}
7GITHUB_TAG= v${PKGVERSION_NOREV} 7GITHUB_TAG= v${PKGVERSION_NOREV}
8 8
9OWNER= bacon@NetBSD.org 9OWNER= bacon@NetBSD.org
10HOMEPAGE= https://ccb.jhu.edu/software/hisat2/index.shtml 10HOMEPAGE= https://ccb.jhu.edu/software/hisat2/index.shtml
11COMMENT= Alignment program for mapping next-generation sequencing reads 11COMMENT= Alignment program for mapping next-generation sequencing reads
12LICENSE= gnu-gpl-v3 12LICENSE= gnu-gpl-v3
13 13
14# 64-bit code, some assembly language 14# 64-bit code, some assembly language
15ONLY_FOR_PLATFORM= *-*-x86_64 15ONLY_FOR_PLATFORM= *-*-x86_64 *-*-aarch64
16 16
17USE_LANGUAGES= c c++ 17USE_LANGUAGES= c c++
18USE_TOOLS+= bash gmake perl 18USE_TOOLS+= bash gmake perl
19 19
20REPLACE_BASH= scripts/*.sh 20REPLACE_BASH= scripts/*.sh
21REPLACE_PERL= hisat2 scripts/*.sh scripts/*.pl scripts/*.py 21REPLACE_PERL= hisat2 scripts/*.sh scripts/*.pl scripts/*.py
22REPLACE_PYTHON= *.py scripts/*.py hisat2-build hisat2-inspect 22REPLACE_PYTHON= *.py scripts/*.py hisat2-build hisat2-inspect
23 23
24PTHREAD_AUTO_VARS= yes 24PTHREAD_AUTO_VARS= yes
25WRKSRC= ${WRKDIR}/hisat2-2.2.1 25WRKSRC= ${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
28post-patch: 28post-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"

cvs diff -r1.2 -r1.3 pkgsrc/biology/hisat2/PLIST (expand / switch to unified diff)

--- pkgsrc/biology/hisat2/PLIST 2022/03/17 16:01:11 1.2
+++ pkgsrc/biology/hisat2/PLIST 2023/05/17 21:55:34 1.3
@@ -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 $
2bin/hisat2 2bin/hisat2
3bin/hisat2-align-l 3bin/hisat2-align-l
4bin/hisat2-align-s 4bin/hisat2-align-s
5bin/hisat2-build 5bin/hisat2-build
6bin/hisat2-build-l 6bin/hisat2-build-l
7bin/hisat2-build-s 7bin/hisat2-build-s
8bin/hisat2-inspect 8bin/hisat2-inspect
9bin/hisat2-inspect-l 9bin/hisat2-inspect-l
10bin/hisat2-inspect-s 10bin/hisat2-inspect-s
11bin/hisat2-repeat 11bin/hisat2-repeat
12libexec/hisat2/convert_quals.pl 12libexec/hisat2/convert_quals.pl
13libexec/hisat2/extract_exons.py 13libexec/hisat2/extract_exons.py
14libexec/hisat2/extract_splice_sites.py 14libexec/hisat2/extract_splice_sites.py

cvs diff -r1.4 -r1.5 pkgsrc/biology/hisat2/distinfo (expand / switch to unified diff)

--- pkgsrc/biology/hisat2/distinfo 2022/03/17 16:01:11 1.4
+++ pkgsrc/biology/hisat2/distinfo 2023/05/17 21:55:34 1.5
@@ -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
3BLAKE2s (hisat2-2.2.1.tar.gz) = 1cc424a10f1fcf25c70294bef3b21e67b07cebcb7b73e36c0176a2dfdec51bdb 3BLAKE2s (hisat2-2.2.1.tar.gz) = 1cc424a10f1fcf25c70294bef3b21e67b07cebcb7b73e36c0176a2dfdec51bdb
4SHA512 (hisat2-2.2.1.tar.gz) = a5a688ad0ccfaf326b3ec6dc97206995306aa6f5b6e58223c2113adbca2745f1e8205b436fdf8e01f42da7a38718f9f3bf214b951fb5360d53247d99a0bdbf46 4SHA512 (hisat2-2.2.1.tar.gz) = a5a688ad0ccfaf326b3ec6dc97206995306aa6f5b6e58223c2113adbca2745f1e8205b436fdf8e01f42da7a38718f9f3bf214b951fb5360d53247d99a0bdbf46
5Size (hisat2-2.2.1.tar.gz) = 6761242 bytes 5Size (hisat2-2.2.1.tar.gz) = 6761242 bytes
6SHA1 (patch-Makefile) = 067b766ecebacd840db4a287bba25d2d2264b339 6SHA1 (patch-Makefile) = 067b766ecebacd840db4a287bba25d2d2264b339
 7SHA1 (patch-aligner__sw.h) = 628c14bfd6b26185eada73013175e35de2b38227
7SHA1 (patch-hisat2) = 6010f5fcc1e7dfcb383a4defc4e3d9f06322370d 8SHA1 (patch-hisat2) = 6010f5fcc1e7dfcb383a4defc4e3d9f06322370d
8SHA1 (patch-processor__support.h) = 56d9cd4ba18e37879acba521a0f431fe2b4290af 9SHA1 (patch-processor__support.h) = 56d9cd4ba18e37879acba521a0f431fe2b4290af
 10SHA1 (patch-sse__util.h) = f0bbe72dfe3a2567e614683e3aecc10f3d6583ef

cvs diff -r1.1 -r1.2 pkgsrc/biology/hisat2/patches/patch-Makefile (expand / switch to unified diff)

--- pkgsrc/biology/hisat2/patches/patch-Makefile 2022/03/17 16:01:12 1.1
+++ pkgsrc/biology/hisat2/patches/patch-Makefile 2023/05/17 21:55:34 1.2
@@ -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)

cvs diff -r1.1 -r1.2 pkgsrc/biology/hisat2/patches/patch-processor__support.h (expand / switch to unified diff)

--- pkgsrc/biology/hisat2/patches/patch-processor__support.h 2022/03/17 16:01:12 1.1
+++ pkgsrc/biology/hisat2/patches/patch-processor__support.h 2023/05/17 21:55:34 1.2
@@ -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>

File Added: pkgsrc/biology/hisat2/patches/patch-aligner__sw.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"

File Added: pkgsrc/biology/hisat2/patches/patch-sse__util.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:

cvs diff -r1.2 -r1.3 pkgsrc/biology/hisat2/patches/patch-hisat2 (expand / switch to unified diff)

--- pkgsrc/biology/hisat2/patches/patch-hisat2 2022/03/17 16:01:12 1.2
+++ pkgsrc/biology/hisat2/patches/patch-hisat2 2023/05/17 21:55:34 1.3
@@ -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';