Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #30 from seqeralabs/staden_io_lib
Browse files Browse the repository at this point in the history
Staden io lib
  • Loading branch information
pabloaledo authored Jul 31, 2023
2 parents 672e14b + 702be3c commit dc549af
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
5 changes: 5 additions & 0 deletions recipes/staden_io_lib/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

./configure --prefix=${PREFIX} --with-libdeflate=${PREFIX}
make
make install
22 changes: 22 additions & 0 deletions recipes/staden_io_lib/fixhwcap.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/htscodecs/htscodecs/rANS_static4x16pr.c b/htscodecs/htscodecs/rANS_static4x16pr.c
index 07ee54b..a2b4ac0 100644
--- a/htscodecs/htscodecs/rANS_static4x16pr.c
+++ b/htscodecs/htscodecs/rANS_static4x16pr.c
@@ -1018,7 +1018,7 @@ static inline int have_neon() {
#if defined(__linux__) && defined(__arm__)
return (getauxval(AT_HWCAP) & HWCAP_NEON) != 0;
#elif defined(__linux__) && defined(__aarch64__)
- return (getauxval(AT_HWCAP) & HWCAP_ASIMD) != 0;
+ return (getauxval(AT_HWCAP) & 2) != 0;
#elif defined(__APPLE__)
return 1;
#elif defined(__FreeBSD__) && defined(__arm__)
@@ -1028,7 +1028,7 @@ static inline int have_neon() {
#elif defined(__FreeBSD__) && defined(__aarch64__)
u_long cap;
if (elf_aux_info(AT_HWCAP, &cap, sizeof cap) != 0) return 0;
- return (cap & HWCAP_ASIMD) != 0;
+ return (cap & 2) != 0;
#elif defined(_WIN32)
return IsProcessorFeaturePresent(PF_ARM_V8_INSTRUCTIONS_AVAILABLE) != 0;
#else
46 changes: 46 additions & 0 deletions recipes/staden_io_lib/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{% set name = "staden_io_lib" %}
{% set version = "1.14.15" %}
{% set hash = "20814c4365e1e2fe6630fb11d0df370dec4c5688af3871de7f1cb0129671401e" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/jkbonfield/io_lib/releases/download/io_lib-1-14-15/io_lib-1.14.15.tar.gz
sha256: {{ hash }}
patches:
- fixhwcap.patch

build:
number: 7
skip: True # [osx]
run_exports:
- {{ pin_subpackage('staden_io_lib', max_pin='x.x') }}

requirements:
build:
- make
- {{ compiler('c') }}
host:
- bzip2
- zlib
- xz
- curl
- libdeflate
run:
- bzip2
- zlib
- xz
- curl
- libdeflate

test:
commands:
- "cram_size 2>&1 | grep 'Usage: cram_size'"

about:
home: https://github.com/jkbonfield/io_lib/
license: BSD
license_file: COPYRIGHT
summary: 'Staden io_lib is a library of file reading and writing code e.g. for SAM/BAM/CRAM'

0 comments on commit dc549af

Please sign in to comment.