summaryrefslogtreecommitdiff
path: root/biology/vcflib
diff options
context:
space:
mode:
Diffstat (limited to 'biology/vcflib')
-rw-r--r--biology/vcflib/files/patch-src-zig-samples.zig31
-rw-r--r--biology/vcflib/pkg-plist2
2 files changed, 32 insertions, 1 deletions
diff --git a/biology/vcflib/files/patch-src-zig-samples.zig b/biology/vcflib/files/patch-src-zig-samples.zig
new file mode 100644
index 000000000000..e69584b175e0
--- /dev/null
+++ b/biology/vcflib/files/patch-src-zig-samples.zig
@@ -0,0 +1,31 @@
+diff --git src/zig/samples.zig src/zig/samples.zig
+index cb05a1f2..ccd5b149 100644
+--- src/zig/samples.zig
++++ src/zig/samples.zig
+@@ -28,7 +28,11 @@ const GENOTYPE_MISSING = -256;
+ fn split_samples(str: []const u8) *ArrayList([] const u8) {
+ var list = ArrayList([] const u8).init(allocator);
+ defer list.deinit();
+- var splits = std.mem.split(u8, str, " ");
++
++ var splits = if (@hasDecl(std.mem, "splitScalar"))
++ std.mem.splitScalar(u8, str, ' ')
++ else
++ std.mem.split(u8, str, ' ');
+ while (splits.next()) |chunk| {
+ list.append(chunk) catch |err| {
+ std.debug.print("out of memory {}\n", .{err});
+@@ -61,10 +65,10 @@ const Genotypes = struct {
+ fn to_num(str: []const u8) !ArrayList(i64) {
+ var list = ArrayList(i64).init(allocator);
+
+- var splits = if (is_phased(str))
+- std.mem.split(u8, str, "|")
++ var splits = if (@hasDecl(std.mem, "splitScalar"))
++ std.mem.splitScalar(u8, str, if (is_phased(str)) '|' else '/')
+ else
+- std.mem.split(u8, str, "/");
++ std.mem.split(u8, str, if (is_phased(str)) '|' else '/' );
+
+ while (splits.next()) |chunk| {
+ const i: i64 =
diff --git a/biology/vcflib/pkg-plist b/biology/vcflib/pkg-plist
index d5e562de28bf..b50497d0c267 100644
--- a/biology/vcflib/pkg-plist
+++ b/biology/vcflib/pkg-plist
@@ -159,7 +159,7 @@ include/vcflib/var.hpp
include/vcflib/vcf-c-api.h
include/vcflib/vcf-wfa.h
lib/libvcflib.a
-lib/pyvcflib%%PYTHON_EXT_SUFFIX%%.so
+lib/pyvcflib%%PYTHON_TAG%%.so
share/man/man1/abba-baba.1.gz
share/man/man1/bFst.1.gz
share/man/man1/dumpContigsFromHeader.1.gz