Skip to content
Commits on Source (2)
......@@ -2,6 +2,8 @@ sambamba (0.6.7-3) UNRELEASED; urgency=medium
* Point Vcs fields to salsa.debian.org
* Standards-Version: 4.2.1
* Fix normalize(weight) (applied patch from upstream)
Should close #907489 but it does not work - wait for new upstream release
-- Andreas Tille <tille@debian.org> Tue, 28 Aug 2018 20:07:55 +0200
......
From: Pjotr Prins <pjotr.public01@thebird.nl>
Origin: https://github.com/biod/sambamba/commit/cb170d641c21f5aabeb04cedab3ced5b7262d007
Date: Fri, 27 Jul 2018 23:28:29 +0000
Bug-Debian: https://bugs.debian.org/907489
Subject: [PATCH] Fixes normalize(weight)
/gnu/store/4snsi4vg06bdfi6qhdjfbhss16kvzxj7-ldc-1.10.0/include/d/std/numeric.d(1845):
Error: read-modify-write operations are not allowed for shared variables. Use core.atomic.atomicOp!"+="(s, e) instead.
---
Makefile | 2 +-
Makefile.guix | 6 +++---
sambamba/merge.d | 8 ++++++--
3 files changed, 10 insertions(+), 6 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
D_COMPILER=dmd
-D_FLAGS=--compiler=dmd -IBioD -IundeaD/src -g -d#-O -release -inline # -version=serial
+D_FLAGS=--compiler=dmd -I../BioD -IBioD -IundeaD/src -g -d#-O -release -inline # -version=serial
LDMD=ldmd2
STATIC_LIB_PATH=-Lhtslib -Llz4/lib
--- a/sambamba/merge.d
+++ b/sambamba/merge.d
@@ -1,6 +1,7 @@
/*
This file is part of Sambamba.
Copyright (C) 2012-2016 Artem Tarasov <lomereiter@gmail.com>
+ Copyright (C) 2012-2017 Pjotr Prins <pjotr.prins@thebird.nl>
Sambamba is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -403,8 +404,11 @@ int merge_main(string[] args) {
alias ReturnType!(BamReader.readsWithProgress!withoutOffsets) AlignmentRangePB;
auto alignmentranges_with_file_ids = new Tuple!(AlignmentRangePB, size_t)[files.length];
- auto weights = cast(shared)array(map!(pipe!(getSize, to!float))(filenames));
- normalize(cast()weights);
+ // auto weights = cast(shared)array(map!(pipe!(getSize, to!float))(filenames));
+ auto weights1 = array(map!(pipe!(getSize, to!float))(filenames));
+ normalize(weights1);
+ // auto weights = cast(shared)weights1;
+ immutable weights = cast(immutable)weights1;
foreach (i; 0 .. files.length) {
alignmentranges_with_file_ids[i] = tuple(
01_add_meson.patch
disable-assert.patch
03_fix_normalize.patch