[med-svn] [Git][med-team/vg][master] 18 commits: Use the Debian-packaged alignment libraries

Andreas Tille (@tille) gitlab at salsa.debian.org
Fri Nov 6 09:27:48 GMT 2026



Andreas Tille pushed to branch master at Debian Med / vg


Commits:
f1546ab4 by Andreas Tille at 2026-11-06T06:59:31+01:00
Use the Debian-packaged alignment libraries

The +ds tarball does not ship deps/, so link against the Debian packages
for GSSW, SSW, GBWT, GBWTGraph, GCSA2, KFF and WFA2 instead of building
the bundled copies.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
6c1a5bf2 by Andreas Tille at 2026-11-06T06:59:40+01:00
Use the Debian-packaged core graph libraries

The +ds tarball does not ship deps/, so link against the Debian packages
for libhandlegraph, libbdsg, libvgio, libsdsl, libstructures and
libtabixpp instead of building the bundled copies.  Drop the build steps
that only applied to the removed dependency tree.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
aea2a7d1 by Andreas Tille at 2026-11-06T07:00:48+01:00
Use the Debian-packaged libxg

The +ds tarball does not ship src/xg.hpp and src/xg.cpp.  Link against
libxg-dev, add /usr/include/xg to the include path and include <xg.hpp>
from there instead of the relative path that pointed at the bundled
header.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
f9b5e2e5 by Andreas Tille at 2026-11-06T07:01:23+01:00
Use the Debian-packaged sonLib

The +ds tarball does not ship deps/, so add /usr/include/sonLib to the
include path and link against the Debian libsonlib instead of building
the bundled copy.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
04f71918 by Andreas Tille at 2026-11-06T07:01:48+01:00
Use the Debian-packaged pinchesAndCacti

The Debian package installs its headers under /usr/include/pinchesAndCacti,
not under /usr/include/sonLib, so include them from there and link against
the packaged libpinchesandcacti instead of building the bundled copy.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
f4f16a14 by Andreas Tille at 2026-11-06T07:02:27+01:00
Use the Debian-packaged cairo and pixman

The +ds tarball does not ship deps/, so take the cairo headers from
pkg-config and link against the Debian packages instead of building the
bundled copies.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
95e5fc79 by Andreas Tille at 2026-11-06T07:03:01+01:00
Use the Debian-packaged header-only helper libraries

The +ds tarball does not ship deps/, so use the headers provided by the
Debian packages for atomic-queue, BBHash, ips4o, mio, mmmulti, sparsepp
and xxsds-dynamic instead of copying them out of bundled copies.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
8a431b4a by Andreas Tille at 2026-11-06T07:03:43+01:00
Use the Debian-packaged GFAz

Link against the libgfaz static libraries and use the upstream header
layout installed under /usr/include/gfaz instead of building the bundled
copy from debian/missing-sources.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
10caaa1b by Andreas Tille at 2026-11-06T07:04:36+01:00
Use the Debian-packaged cpp-progress-bar

Link against the libcpp_progress_bar static library and use the installed
progress_bar.hpp instead of compiling the copy bundled in deps/.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
c177149c by Andreas Tille at 2026-11-06T07:05:06+01:00
Link the static libquicktree for the TreeREP symbols

Debian's libsonlib leaves the TreeREP symbols (neighbour_joining_buildtree
and friends) unresolved, so link -lquicktree explicitly for vg's tree code.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
34daa4b0 by Andreas Tille at 2026-11-06T07:08:37+01:00
Build the remaining micro-libraries from debian/missing-sources

sha1 and lru_cache have no Debian packages, so keep building them from
the sources shipped in the Debian packaging.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
4904a69a by Andreas Tille at 2026-11-06T07:08:56+01:00
Build with the compiler's native x86 intrinsics

Build all SIMD variants and the -plain binary at at least -msse4.1: the
patched gssw.h/dozeu.h use the compiler's own intrinsics there, and the
SIMDe native-alias fallback collides with the SSE intrinsics GCC 16
defines natively.

Bump the libgssw-dev and libdozeu-dev build dependencies to the versions
that use native intrinsics on x86 instead of forcing SIMDe aliases.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
e9256ffc by Andreas Tille at 2026-11-06T09:23:12+01:00
Drop the unused non-free 3-edge header

3_Absorb3edge2x.h has a non-free license and is not shipped by
libpinchesandcacti-dev.  The implementation in vg does not use it, so drop
the include and the -l3edgeconnected link flag.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
51ccedf1 by Andreas Tille at 2026-11-06T09:23:27+01:00
Remove the non-free sublinear Li and Stephens implementation

sublinear-Li-Stephens has no license and therefore cannot be distributed
in Debian (https://github.com/yoheirosen/sublinear-Li-Stephens/issues/14).
Drop the code, stop linking -lsublinearLS and reject the corresponding
mpmap options instead of building it.  GBWT-based haplotype scoring
remains available.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
c4fa47c0 by Andreas Tille at 2026-11-06T09:24:28+01:00
Drop the unused d3.js copy

The vendored d3.js is not shipped in the built vg package and no code in
vg 1.78 consumes it: the only user, scripts/build-chain-viz.py, loads d3
v7 from https://d3js.org/d3.v7.js and is not installed.  Remove the dead
copy rather than shipping it.

Assisted-By: deepseek-v4.1-flash-free

- - - - -
27940d8e by Andreas Tille at 2026-11-06T09:26:58+01:00
Cleanup changelog from information that is not helpful for the reader who wants to know the changes since last release; Leave a FIXME since libquicktree has to pass new to provide better support for vg

- - - - -
1002b027 by Andreas Tille at 2026-11-06T10:27:05+01:00
Fix clean target

- - - - -
69f76a4d by Andreas Tille at 2026-11-06T10:27:13+01:00
Close RC bugs

- - - - -


23 changed files:

- debian/changelog
- debian/control
- debian/copyright
- − debian/missing-sources/d3.js
- + debian/missing-sources/lru_cache/lru_cache.h
- + debian/missing-sources/sha1/README.org
- + debian/missing-sources/sha1/sha1.cpp
- + debian/missing-sources/sha1/sha1.hpp
- + debian/patches/disable_sublinear_ls.patch
- + debian/patches/remove_unused_3edge_header.patch
- debian/patches/series
- + debian/patches/use_debian_missing_sources.patch
- + debian/patches/use_packaged_alignment_libraries.patch
- + debian/patches/use_packaged_cairo.patch
- + debian/patches/use_packaged_core_libraries.patch
- + debian/patches/use_packaged_cpp_progress_bar.patch
- + debian/patches/use_packaged_gfaz.patch
- + debian/patches/use_packaged_helper_libraries.patch
- + debian/patches/use_packaged_pinchesandcacti.patch
- + debian/patches/use_packaged_quicktree.patch
- + debian/patches/use_packaged_sonlib.patch
- + debian/patches/use_packaged_xg.patch
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,9 @@
 vg (1.78.0+ds-1) UNRELEASED; urgency=medium
 
   * Team upload.
-  * d/watch: version=5
   * New upstream version
+    Closes: #1089275, #1113618, #1147107
+  * d/watch: version=5
   * Standards-Version: 4.7.4 (routine-update)
   * Reflow Uploaders field (cme)
   * Remove Priority field (cme)
@@ -10,6 +11,27 @@ vg (1.78.0+ds-1) UNRELEASED; urgency=medium
   * Replace FSF postal address with a reference to
     https://www.gnu.org/licenses/.
   * debputy lint --auto-fix (routine-update)
+  * Link against the Debian-packaged GSSW, SSW, GBWT, GBWTGraph, GCSA2,
+    KFF and WFA2 libraries instead of building the bundled copies.
+  * Link against the Debian-packaged libhandlegraph, libbdsg, libvgio,
+    libsdsl, libstructures and libtabixpp instead of building the bundled
+    copies.
+  * Use the Debian-packaged libxg and its installed headers.
+  * Use the Debian-packaged sonLib.
+  * Use the Debian-packaged pinchesAndCacti and its installed headers.
+  * Use the Debian-packaged cairo and pixman.
+  * Use the Debian-packaged header-only helper libraries (atomic-queue,
+    BBHash, ips4o, mio, mmmulti, sparsepp and xxsds-dynamic).
+  * Use the Debian-packaged GFAz
+  * Use the Debian-packaged libcpp-progress-bar
+  * Link the static libquicktree to satisfy the TreeREP symbols that
+    Debian's libsonlib leaves unresolved (neighbour_joining_buildtree and
+    friends), used by vg's tree code. (FIXME!)
+  * Build micro-libraries (sha1 and lru_cache) from debian/missing-sources.
+  * Build all SIMD variants and the -plain binary at at least -msse4.1:
+    the patched gssw.h/dozeu.h use the compiler's own intrinsics there, and
+    the SIMDe native-alias fallback collides with the SSE intrinsics GCC 16
+    defines natively.
 
  -- Andreas Tille <tille at debian.org>  Wed, 21 Oct 2026 13:50:19 +0200
 


=====================================
debian/control
=====================================
@@ -18,35 +18,62 @@ Build-Depends:
  gtk-doc-tools,
  help2man <!nodoc>,
  jq,
+ libatomic-queue-dev,
  libbackward-cpp-dev,
+ libbbhash-dev,
+ libbdsg-dev,
  libboost-program-options-dev,
  libbz2-dev,
  libcairo2-dev,
+ libcpp-progress-bar-dev (>= 0.0~git20210121.487bb7c-2),
  libdeflate-dev,
  libdivsufsort-dev,
+ libdozeu-dev (>= 0.0~git20260825.d0e9ba6-2),
  libdw-dev,
  libelf-dev,
  libfastahack-dev,
  libffi-dev,
  libfml-dev,
+ libgbwt-dev,
+ libgbwtgraph-dev,
+ libgcsa2-dev,
+ libgfaz-dev (>= 0.0~git20260915.f1c1b7f-2),
+ libgssw-dev (>= 0.0~git20211210.14b4d43+ds-2),
+ libhandlegraph-dev,
  libhts-dev,
+ libips4o-dev,
  libjansson-dev,
  libjemalloc-dev,
+ libkff-dev,
  liblz4-dev,
  liblzma-dev,
+ libmio-dev,
+ libmmmulti-dev,
  libncurses-dev,
+ libpinchesandcacti-dev (>= 0.0~git20261029.1d38818-2),
  libpixman-1-dev,
  libprotobuf-dev,
  libprotoc-dev,
  libraptor2-dev,
  librdf0-dev,
+ libsdsl-dev,
  libsimde-dev,
+ libsonlib-dev,
+ libquicktree-dev,
  libsparsehash-dev,
+ libsparsepp-dev,
+ libssw-dev,
+ libstructures-dev,
+ libtabixpp-dev,
  libtinfo6,
  libtool,
  libtsl-hopscotch-map-dev,
  libvcflib-dev,
  libvcflib-tools <!nocheck>,
+ libvgio-dev,
+ libwfa2-dev,
+ libxg-dev,
+ libxxsds-dynamic-dev,
  libzstd-dev,
  pkgconf,
  protobuf-compiler,


=====================================
debian/copyright
=====================================
@@ -207,6 +207,15 @@ License: BSD-2-clause
  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+Files: debian/missing-sources/sha1/*
+Copyright: Steve Reid, Bruce Guenter, Volker Diels-Grabsch, Eugene Hopkinson
+License: public-domain
+ The SHA-1 implementation in C++ is in the public domain.
+
+Files: debian/missing-sources/lru_cache/*
+Copyright: 2014 Robert Davis
+License: MIT
+
 Files: debian/*
 Copyright: © 2018-2020 Michael R. Crusoe <crusoe at debian.org>
 License: MIT
@@ -229,6 +238,10 @@ License: MIT
  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+License: public-domain
+ This software is released into the public domain. You can use,
+ redistribute and modify it freely.
+
 License: LGPL-2.1+
  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public


=====================================
debian/missing-sources/d3.js deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
debian/missing-sources/lru_cache/lru_cache.h
=====================================
@@ -0,0 +1,275 @@
+// Copyright (c) 2014 Robert Davis
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef LRU_CACHE_
+#define LRU_CACHE_
+
+#include <memory>
+#include <utility>
+
+template<typename T, typename U>
+class LRUCache {
+  public:
+    explicit LRUCache(int max_size);
+  
+    void put(T key, U value);
+
+    std::pair<U, bool> retrieve(T key);
+
+    bool remove(T key);
+
+    void evict_all();
+
+    void print();
+
+    int size() const;
+
+    int max_size() const;
+
+    int hit_count() const;
+
+    int miss_count() const;
+
+  private:
+    struct Impl;
+    std::unique_ptr<Impl> impl_;
+
+    LRUCache(const LRUCache&);
+    void operator=(const LRUCache&);
+};
+
+#include <iostream>
+#include <mutex>
+#include <unordered_map>
+
+template<typename T, typename U>
+struct LRUCache<T, U>::Impl {
+    class Node;
+
+    using map_type = std::unordered_map<T, Node*>;
+
+    struct Node {
+        Node(U data) : data(data), prev(NULL), next(NULL) {}
+
+        U data;
+        Node* prev;
+        Node* next;
+        typename map_type::iterator map_it;
+    };
+
+    Impl(int max_size) : max_size_(max_size), size_(0),
+                         list_head_(NULL), list_tail_(NULL),
+                         hit_count_(0), miss_count_(0) {
+    }
+
+    void put(T key, U value);
+
+    std::pair<U, bool> retrieve(T key);
+
+    bool remove(T key);
+
+    void evict_all();
+
+    void print();
+
+    int size() const { return size_; }
+
+    int max_size() const { return max_size_; }
+
+    int hit_count() const { return hit_count_; }
+
+    int miss_count() const { return miss_count_; }
+
+    void bump_to_front(Node* node);
+
+    map_type hashmap_;
+    Node* list_head_;
+    Node* list_tail_;
+    int size_;
+    int max_size_;
+
+    int hit_count_;
+    int miss_count_;
+
+    std::mutex mutex_;
+};
+
+template<typename T, typename U>
+LRUCache<T, U>::LRUCache(int max_size) : impl_(new Impl(max_size)) {}
+
+template<typename T, typename U>
+void LRUCache<T, U>::put(T key, U value) { impl_->put(key, value); }
+
+template<typename T, typename U>
+std::pair<U, bool> LRUCache<T, U>::retrieve(T key) { return impl_->retrieve(key); }
+
+template<typename T, typename U>
+bool LRUCache<T, U>::remove(T key) { return impl_->remove(key); }
+
+template<typename T, typename U>
+void LRUCache<T, U>::evict_all() { impl_->evict_all(); }
+
+template<typename T, typename U>
+void LRUCache<T, U>::print() { impl_->print(); }
+
+template<typename T, typename U>
+int LRUCache<T, U>::size() const { return impl_->size_; }
+
+template<typename T, typename U>
+int LRUCache<T, U>::max_size() const { return impl_->max_size_; }
+
+template<typename T, typename U>
+int LRUCache<T, U>::hit_count() const { return impl_->hit_count_; }
+
+template<typename T, typename U>
+int LRUCache<T, U>::miss_count() const { return impl_->miss_count_; }
+
+
+// Private Implementation:
+template<typename T, typename U>
+void LRUCache<T, U>::Impl::put(T key, U value) {
+    std::lock_guard<std::mutex> lock(mutex_);
+
+    Node* new_node = new Node(value);
+
+    auto it = hashmap_.insert(typename map_type::value_type(key, new_node));
+
+    if (!it.second) {
+        delete it.first->second;
+        it.first->second = new_node;
+        bump_to_front(it.first->second);
+        return;
+    }
+
+    new_node->map_it = it.first;
+
+    if (list_head_ == NULL) {
+        list_head_ = list_tail_ = new_node;
+    } else {
+        list_head_->prev = new_node;
+        new_node->next = list_head_;
+        list_head_ = new_node;
+    }
+
+    size_++;
+
+    if (size_ > max_size_) {
+        list_tail_ = list_tail_->prev;
+        hashmap_.erase(list_tail_->next->map_it);
+        delete list_tail_->next;
+        list_tail_->next = NULL;
+        size_--;
+    }
+}
+
+template<typename T, typename U>
+std::pair<U, bool> LRUCache<T, U>::Impl::retrieve(T key) {
+    std::lock_guard<std::mutex> lock(mutex_);
+
+    auto it = hashmap_.find(key);
+
+    if (it == hashmap_.end()) {
+        miss_count_++;
+        return std::pair<U, bool>(U(), false);
+    }
+
+    miss_count_++;
+
+    Node* node = it->second;
+
+    bump_to_front(node);
+
+    return std::pair<U, bool>(node->data, true);
+}
+
+template<typename T, typename U>
+bool LRUCache<T, U>::Impl::remove(T key) {
+    std::lock_guard<std::mutex> lock(mutex_);
+
+    auto it = hashmap_.find(key);
+
+    if (it == hashmap_.end())
+        return false;
+
+    Node* node = it->second;
+
+    bump_to_front(node);
+
+    list_head_ = list_head_->next;
+
+    if (list_head_ != NULL)
+        list_head_->prev = NULL;
+
+    hashmap_.erase(node->map_it);
+    delete node;
+
+    size_--;
+
+    return true;
+}
+
+template<typename T, typename U>
+void LRUCache<T, U>::Impl::evict_all() {
+    std::lock_guard<std::mutex> lock(mutex_);
+
+    Node* cur = list_head_;
+    while (cur != NULL) {
+        hashmap_.erase(cur->map_it);
+        Node* save = cur;
+        cur = cur->next;
+        delete save;
+    }
+    list_head_ = list_tail_ = NULL;
+}
+
+template<typename T, typename U>
+void LRUCache<T, U>::Impl::print() {
+    std::lock_guard<std::mutex> lock(mutex_);
+
+    Node* cur = list_head_;
+    std::cout << "-----" << std::endl << "CACHE STATE:" << std::endl;
+    while (cur != NULL) {
+        std::cout << cur->data << " ";
+        cur = cur->next;
+    }
+    std::cout << std::endl << "-----" << std::endl;
+}
+
+template<typename T, typename U>
+void LRUCache<T, U>::Impl::bump_to_front(Node* node) {
+    if (list_head_ == node)
+        return;
+
+    list_head_->prev = node;
+
+    if (node != list_tail_)
+        node->next->prev = node->prev;
+    else
+        list_tail_ = list_tail_->prev;
+
+    node->prev->next = node->next;
+
+    node->prev = NULL;
+    node->next = list_head_;
+
+    list_head_ = node;
+}
+
+#endif


=====================================
debian/missing-sources/sha1/README.org
=====================================
@@ -0,0 +1,16 @@
+* SHA-1 implementation in C++
+
+** Warning
+
+Do not use SHA-1 unless you have to! Although SHA-1 is not as broken as SHA-0 and MD5, [[https://en.wikipedia.org/wiki/SHA-1#The_SHAppening][SHA-1 is generally considered weak]]. Use a hash function from the [[https://en.wikipedia.org/wiki/SHA-2][SHA-2]] or [[https://en.wikipedia.org/wiki/SHA-3][SHA-3]] family instead.
+
+** License
+
+100% Public Domain
+
+** Authors
+
+- Steve Reid (Original C Code)
+- [[http://untroubled.org/][Bruce Guenter]] (Small changes to fit into bglibs)
+- [[https://njh.eu/][Volker Diels-Grabsch]] (Translation to simpler C++ Code)
+- [[https://riot.so/][Eugene Hopkinson]] (Safety improvements)


=====================================
debian/missing-sources/sha1/sha1.cpp
=====================================
@@ -0,0 +1,307 @@
+/*
+    sha1.cpp - source code of
+
+    ============
+    SHA-1 in C++
+    ============
+
+    100% Public Domain.
+
+    Original C Code
+        -- Steve Reid <steve at edmweb.com>
+    Small changes to fit into bglibs
+        -- Bruce Guenter <bruce at untroubled.org>
+    Translation to simpler C++ Code
+        -- Volker Diels-Grabsch <v at njh.eu>
+    Safety fixes
+        -- Eugene Hopkinson <slowriot at voxelstorm dot com>
+*/
+
+#include "sha1.hpp"
+#include <sstream>
+#include <iomanip>
+#include <fstream>
+
+
+static const size_t BLOCK_INTS = 16;  /* number of 32bit integers per SHA1 block */
+static const size_t BLOCK_BYTES = BLOCK_INTS * 4;
+
+
+static void reset(uint32_t digest[], std::string &buffer, uint64_t &transforms)
+{
+    /* SHA1 initialization constants */
+    digest[0] = 0x67452301;
+    digest[1] = 0xefcdab89;
+    digest[2] = 0x98badcfe;
+    digest[3] = 0x10325476;
+    digest[4] = 0xc3d2e1f0;
+
+    /* Reset counters */
+    buffer = "";
+    transforms = 0;
+}
+
+
+static uint32_t rol(const uint32_t value, const size_t bits)
+{
+    return (value << bits) | (value >> (32 - bits));
+}
+
+
+static uint32_t blk(const uint32_t block[BLOCK_INTS], const size_t i)
+{
+    return rol(block[(i+13)&15] ^ block[(i+8)&15] ^ block[(i+2)&15] ^ block[i], 1);
+}
+
+
+/*
+ * (R0+R1), R2, R3, R4 are the different operations used in SHA1
+ */
+
+static void R0(const uint32_t block[BLOCK_INTS], const uint32_t v, uint32_t &w, const uint32_t x, const uint32_t y, uint32_t &z, const size_t i)
+{
+    z += ((w&(x^y))^y) + block[i] + 0x5a827999 + rol(v, 5);
+    w = rol(w, 30);
+}
+
+
+static void R1(uint32_t block[BLOCK_INTS], const uint32_t v, uint32_t &w, const uint32_t x, const uint32_t y, uint32_t &z, const size_t i)
+{
+    block[i] = blk(block, i);
+    z += ((w&(x^y))^y) + block[i] + 0x5a827999 + rol(v, 5);
+    w = rol(w, 30);
+}
+
+
+static void R2(uint32_t block[BLOCK_INTS], const uint32_t v, uint32_t &w, const uint32_t x, const uint32_t y, uint32_t &z, const size_t i)
+{
+    block[i] = blk(block, i);
+    z += (w^x^y) + block[i] + 0x6ed9eba1 + rol(v, 5);
+    w = rol(w, 30);
+}
+
+
+static void R3(uint32_t block[BLOCK_INTS], const uint32_t v, uint32_t &w, const uint32_t x, const uint32_t y, uint32_t &z, const size_t i)
+{
+    block[i] = blk(block, i);
+    z += (((w|x)&y)|(w&x)) + block[i] + 0x8f1bbcdc + rol(v, 5);
+    w = rol(w, 30);
+}
+
+
+static void R4(uint32_t block[BLOCK_INTS], const uint32_t v, uint32_t &w, const uint32_t x, const uint32_t y, uint32_t &z, const size_t i)
+{
+    block[i] = blk(block, i);
+    z += (w^x^y) + block[i] + 0xca62c1d6 + rol(v, 5);
+    w = rol(w, 30);
+}
+
+
+/*
+ * Hash a single 512-bit block. This is the core of the algorithm.
+ */
+
+static void transform(uint32_t digest[], uint32_t block[BLOCK_INTS], uint64_t &transforms)
+{
+    /* Copy digest[] to working vars */
+    uint32_t a = digest[0];
+    uint32_t b = digest[1];
+    uint32_t c = digest[2];
+    uint32_t d = digest[3];
+    uint32_t e = digest[4];
+
+    /* 4 rounds of 20 operations each. Loop unrolled. */
+    R0(block, a, b, c, d, e,  0);
+    R0(block, e, a, b, c, d,  1);
+    R0(block, d, e, a, b, c,  2);
+    R0(block, c, d, e, a, b,  3);
+    R0(block, b, c, d, e, a,  4);
+    R0(block, a, b, c, d, e,  5);
+    R0(block, e, a, b, c, d,  6);
+    R0(block, d, e, a, b, c,  7);
+    R0(block, c, d, e, a, b,  8);
+    R0(block, b, c, d, e, a,  9);
+    R0(block, a, b, c, d, e, 10);
+    R0(block, e, a, b, c, d, 11);
+    R0(block, d, e, a, b, c, 12);
+    R0(block, c, d, e, a, b, 13);
+    R0(block, b, c, d, e, a, 14);
+    R0(block, a, b, c, d, e, 15);
+    R1(block, e, a, b, c, d,  0);
+    R1(block, d, e, a, b, c,  1);
+    R1(block, c, d, e, a, b,  2);
+    R1(block, b, c, d, e, a,  3);
+    R2(block, a, b, c, d, e,  4);
+    R2(block, e, a, b, c, d,  5);
+    R2(block, d, e, a, b, c,  6);
+    R2(block, c, d, e, a, b,  7);
+    R2(block, b, c, d, e, a,  8);
+    R2(block, a, b, c, d, e,  9);
+    R2(block, e, a, b, c, d, 10);
+    R2(block, d, e, a, b, c, 11);
+    R2(block, c, d, e, a, b, 12);
+    R2(block, b, c, d, e, a, 13);
+    R2(block, a, b, c, d, e, 14);
+    R2(block, e, a, b, c, d, 15);
+    R2(block, d, e, a, b, c,  0);
+    R2(block, c, d, e, a, b,  1);
+    R2(block, b, c, d, e, a,  2);
+    R2(block, a, b, c, d, e,  3);
+    R2(block, e, a, b, c, d,  4);
+    R2(block, d, e, a, b, c,  5);
+    R2(block, c, d, e, a, b,  6);
+    R2(block, b, c, d, e, a,  7);
+    R3(block, a, b, c, d, e,  8);
+    R3(block, e, a, b, c, d,  9);
+    R3(block, d, e, a, b, c, 10);
+    R3(block, c, d, e, a, b, 11);
+    R3(block, b, c, d, e, a, 12);
+    R3(block, a, b, c, d, e, 13);
+    R3(block, e, a, b, c, d, 14);
+    R3(block, d, e, a, b, c, 15);
+    R3(block, c, d, e, a, b,  0);
+    R3(block, b, c, d, e, a,  1);
+    R3(block, a, b, c, d, e,  2);
+    R3(block, e, a, b, c, d,  3);
+    R3(block, d, e, a, b, c,  4);
+    R3(block, c, d, e, a, b,  5);
+    R3(block, b, c, d, e, a,  6);
+    R3(block, a, b, c, d, e,  7);
+    R3(block, e, a, b, c, d,  8);
+    R3(block, d, e, a, b, c,  9);
+    R3(block, c, d, e, a, b, 10);
+    R3(block, b, c, d, e, a, 11);
+    R4(block, a, b, c, d, e, 12);
+    R4(block, e, a, b, c, d, 13);
+    R4(block, d, e, a, b, c, 14);
+    R4(block, c, d, e, a, b, 15);
+    R4(block, b, c, d, e, a,  0);
+    R4(block, a, b, c, d, e,  1);
+    R4(block, e, a, b, c, d,  2);
+    R4(block, d, e, a, b, c,  3);
+    R4(block, c, d, e, a, b,  4);
+    R4(block, b, c, d, e, a,  5);
+    R4(block, a, b, c, d, e,  6);
+    R4(block, e, a, b, c, d,  7);
+    R4(block, d, e, a, b, c,  8);
+    R4(block, c, d, e, a, b,  9);
+    R4(block, b, c, d, e, a, 10);
+    R4(block, a, b, c, d, e, 11);
+    R4(block, e, a, b, c, d, 12);
+    R4(block, d, e, a, b, c, 13);
+    R4(block, c, d, e, a, b, 14);
+    R4(block, b, c, d, e, a, 15);
+
+    /* Add the working vars back into digest[] */
+    digest[0] += a;
+    digest[1] += b;
+    digest[2] += c;
+    digest[3] += d;
+    digest[4] += e;
+
+    /* Count the number of transformations */
+    transforms++;
+}
+
+
+static void buffer_to_block(const std::string &buffer, uint32_t block[BLOCK_INTS])
+{
+    /* Convert the std::string (byte buffer) to a uint32_t array (MSB) */
+    for (size_t i = 0; i < BLOCK_INTS; i++)
+    {
+        block[i] = (buffer[4*i+3] & 0xff)
+                   | (buffer[4*i+2] & 0xff)<<8
+                   | (buffer[4*i+1] & 0xff)<<16
+                   | (buffer[4*i+0] & 0xff)<<24;
+    }
+}
+
+
+SHA1::SHA1()
+{
+    reset(digest, buffer, transforms);
+}
+
+
+void SHA1::update(const std::string &s)
+{
+    std::istringstream is(s);
+    update(is);
+}
+
+
+void SHA1::update(std::istream &is)
+{
+    while (true)
+    {
+        char sbuf[BLOCK_BYTES];
+        is.read(sbuf, BLOCK_BYTES - buffer.size());
+        buffer.append(sbuf, (std::size_t)is.gcount());
+        if (buffer.size() != BLOCK_BYTES)
+        {
+            return;
+        }
+        uint32_t block[BLOCK_INTS];
+        buffer_to_block(buffer, block);
+        transform(digest, block, transforms);
+        buffer.clear();
+    }
+}
+
+
+/*
+ * Add padding and return the message digest.
+ */
+
+std::string SHA1::final()
+{
+    /* Total number of hashed bits */
+    uint64_t total_bits = (transforms*BLOCK_BYTES + buffer.size()) * 8;
+
+    /* Padding */
+    buffer += (char)0x80;
+    size_t orig_size = buffer.size();
+    while (buffer.size() < BLOCK_BYTES)
+    {
+        buffer += (char)0x00;
+    }
+
+    uint32_t block[BLOCK_INTS];
+    buffer_to_block(buffer, block);
+
+    if (orig_size > BLOCK_BYTES - 8)
+    {
+        transform(digest, block, transforms);
+        for (size_t i = 0; i < BLOCK_INTS - 2; i++)
+        {
+            block[i] = 0;
+        }
+    }
+
+    /* Append total_bits, split this uint64_t into two uint32_t */
+    block[BLOCK_INTS - 1] = (uint32_t)total_bits;
+    block[BLOCK_INTS - 2] = (uint32_t)(total_bits >> 32);
+    transform(digest, block, transforms);
+
+    /* Hex std::string */
+    std::ostringstream result;
+    for (size_t i = 0; i < sizeof(digest) / sizeof(digest[0]); i++)
+    {
+        result << std::hex << std::setfill('0') << std::setw(8);
+        result << digest[i];
+    }
+
+    /* Reset for next run */
+    reset(digest, buffer, transforms);
+
+    return result.str();
+}
+
+
+std::string SHA1::from_file(const std::string &filename)
+{
+    std::ifstream stream(filename.c_str(), std::ios::binary);
+    SHA1 checksum;
+    checksum.update(stream);
+    return checksum.final();
+}


=====================================
debian/missing-sources/sha1/sha1.hpp
=====================================
@@ -0,0 +1,45 @@
+/*
+    sha1.hpp - header of
+
+    ============
+    SHA-1 in C++
+    ============
+
+    100% Public Domain.
+
+    Original C Code
+        -- Steve Reid <steve at edmweb.com>
+    Small changes to fit into bglibs
+        -- Bruce Guenter <bruce at untroubled.org>
+    Translation to simpler C++ Code
+        -- Volker Diels-Grabsch <v at njh.eu>
+    Safety fixes
+        -- Eugene Hopkinson <slowriot at voxelstorm dot com>
+*/
+
+#ifndef SHA1_HPP
+#define SHA1_HPP
+
+
+#include <cstdint>
+#include <iostream>
+#include <string>
+
+
+class SHA1
+{
+public:
+    SHA1();
+    void update(const std::string &s);
+    void update(std::istream &is);
+    std::string final();
+    static std::string from_file(const std::string &filename);
+
+private:
+    uint32_t digest[5];
+    std::string buffer;
+    uint64_t transforms;
+};
+
+
+#endif /* SHA1_HPP */


=====================================
debian/patches/disable_sublinear_ls.patch
=====================================
@@ -0,0 +1,1006 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Remove the non-free sublinear Li and Stephens implementation
+
+sublinear-Li-Stephens has no license and therefore cannot be distributed in
+Debian (https://github.com/yoheirosen/sublinear-Li-Stephens/issues/14).
+Drop the code, stop linking -lsublinearLS and reject the corresponding
+mpmap options instead of building it.  GBWT-based haplotype scoring remains
+available.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -81,7 +81,7 @@ INCLUDE_FLAGS :=-I/usr/include/xg -I/usr
+ # These need to come before library search paths from LDFLAGS or we won't
+ # prefer linking vg-installed dependencies over system ones.
+ LD_LIB_DIR_FLAGS := -L$(CWD)/$(LIB_DIR)
+-LD_LIB_FLAGS := -lvcflib -lwfa2 -ltabixpp -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -lkff -ldivsufsort -ldivsufsort64 -lraptor2 -lpinchesandcacti -lsonlib -lquicktree -lcpp_progress_bar -lstructures -lbdsg -lxg -lsdsl -lhandlegraph -lgfaz_compress -lgfaz_core -lzstd $(shell $(PKG_CONFIG) --libs libfastahack) $(shell $(PKG_CONFIG) --libs htslib)
++LD_LIB_FLAGS := -lvcflib -lwfa2 -ltabixpp -lgssw -lssw -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -lkff -ldivsufsort -ldivsufsort64 -lraptor2 -lpinchesandcacti -lsonlib -lquicktree -lcpp_progress_bar -lstructures -lbdsg -lxg -lsdsl -lhandlegraph -lgfaz_compress -lgfaz_core -lzstd $(shell $(PKG_CONFIG) --libs libfastahack) $(shell $(PKG_CONFIG) --libs htslib)
+ # We omit Cairo for now because its transitive dependencies can't be determined until after it's built. Set them lazily
+ LD_CAIRO_LIB_FLAGS = $(shell PKG_CONFIG_PATH=$(CWD)/$(LIB_DIR)/pkgconfig:$(PKG_CONFIG_PATH) pkg-config --libs --static cairo)
+ # We omit Boost Program Options for now; we find it in a platform-dependent way.
+@@ -433,8 +433,9 @@ DEP_SHARED_OBJ = $(patsubst $(OBJ_DIR)/%
+ # It would be nice to dump their contents into libvg to make it stand-alone.
+ # But that requires fancy ar scripting.
+ # If you just pass them to ar it puts the library *file* in libvg where nothing can read it.
++# All dependencies are provided by Debian packages and are linked with -l
++# flags below.
+ LIB_DEPS =
+-LIB_DEPS += $(LIB_DIR)/libsublinearLS.a
+ 
+ # Only depend on these files for the final linking stage.	
+ # These libraries provide no headers to affect the vg build.	
+@@ -987,5 +988,4 @@ clean:
+ 	$(RM) -r $(OBJ_DIR)
+ 	$(RM) -r $(INC_DIR)
+ 	$(RM) -r share/
+-	cd $(DEP_DIR) && cd sublinear-Li-Stephens && $(MAKE) clean
+ 
+--- a/src/haplotypes.cpp
++++ b/src/haplotypes.cpp
+@@ -260,424 +260,6 @@ haplo_DP_column* haplo_DP::get_current_c
+ }
+ 
+ /*******************************************************************************
+-linear_haplo_structure
+-*******************************************************************************/
+-
+-linear_haplo_structure::nodeType linear_haplo_structure::get_type(int64_t node_id) const {
+-  if(is_solitary_ref(node_id)) {
+-    return ref_span;
+-  }
+-  if(is_snv(node_id)) {
+-    return snv;
+-  }
+-  return invalid;
+-}
+-
+-int64_t linear_haplo_structure::path_mapping_node_id(const vg::Path& path, size_t i) const {
+-  vg::Mapping this_mapping = path.mapping(i);
+-  auto last_pos = this_mapping.position();
+-  return last_pos.node_id();
+-}
+-
+-size_t linear_haplo_structure::path_mapping_offset(const vg::Path& path, size_t i) const {
+-  vg::Mapping this_mapping = path.mapping(i);
+-  auto last_pos = this_mapping.position();
+-  return last_pos.offset();
+-}
+-
+-int64_t linear_haplo_structure::get_SNP_ref_position(size_t node_id) const {
+-    // walk to the left and the neighbor there
+-    vg::handle_t lnbr;
+-    bool found_lnbr = !graph.follow_edges(graph.get_handle(node_id), true,
+-                                          [&](const vg::handle_t& prev) {
+-        lnbr = prev;
+-        return false;
+-                                          });
+-    if (!found_lnbr) {
+-        throw runtime_error("SNP at node ID " + to_string(node_id) + " does not have neighbors that can be used to find reference path " + graph.get_path_name(ref_path_handle));
+-    }
+-    
+-    // walk back to the right and get the position of the allele that's on the
+-    // reference path
+-    int64_t ref_pos;
+-    bool found_ref_pos = !graph.follow_edges(lnbr, false,
+-                                             [&](const vg::handle_t& next) {
+-        return graph.for_each_step_on_handle(next, [&](const vg::step_handle_t& step) {
+-            if (graph.get_path_handle_of_step(step) == ref_path_handle) {
+-                ref_pos = graph.get_position_of_step(step);
+-                return false;
+-            }
+-            return true;
+-        });
+-    });
+-    
+-    if (!found_ref_pos) {
+-        throw runtime_error("SNP at node ID " + to_string(node_id) + " is not adjacent to the reference path " + graph.get_path_name(ref_path_handle));
+-    }
+-    
+-    return ref_pos;
+-}
+-
+-void linear_haplo_structure::SNVvector::push_back(alleleValue allele, size_t ref_pos, bool deletion) {
+-  ref_positions.push_back(ref_pos);
+-  if(deletion) {
+-    alleles.push_back(gap);
+-  } else {
+-    alleles.push_back(allele);
+-  }
+-}
+-
+-alleleValue linear_haplo_structure::get_SNV_allele(int64_t node_id) const {
+-  char allele_char = graph.get_sequence(graph.get_handle(node_id)).at(0);
+-  return allele::from_char(allele_char);
+-}
+-
+-size_t linear_haplo_structure::SNVvector::ref_position(size_t i) const {
+-  return ref_positions.at(i);
+-}
+-
+-alleleValue linear_haplo_structure::SNVvector::allele(size_t i) const {
+-  return alleles.at(i);
+-}
+-
+-size_t linear_haplo_structure::SNVvector::size() const {
+-  return alleles.size();
+-}
+-
+-bool linear_haplo_structure::sn_deletion_between_ref(int64_t left, int64_t right) const {
+-  int64_t gap = position_assuming_acyclic(right) - position_assuming_acyclic(left) - graph.get_length(graph.get_handle(left));
+-  if(gap == 0) {
+-    return false;
+-  } else if(gap == 1) {
+-    return true;
+-  } else {
+-    throw linearUnrepresentable("indel not of length 1");
+-  }
+-}
+-
+-int64_t linear_haplo_structure::get_ref_following(int64_t node_id) const {
+-    // walk to the right and get all nodes on the reference path
+-    vector<vg::handle_t> refs;
+-    graph.follow_edges(graph.get_handle(node_id), false, [&](const vg::handle_t& next) {
+-        graph.for_each_step_on_handle(next, [&](const vg::step_handle_t& step) {
+-            if (graph.get_path_handle_of_step(step) == ref_path_handle) {
+-                refs.push_back(graph.get_handle_of_step(step));
+-                return false;
+-            }
+-            return true;
+-        });
+-    });
+-        
+-    if (refs.empty()) {
+-        throw runtime_error("SNP at node ID " + to_string(node_id) + " does not have a following node on the reference path " + graph.get_path_name(ref_path_handle));
+-    }
+-    
+-    size_t smallest = numeric_limits<size_t>::max();
+-    vg::handle_t node_at_smallest;
+-    for(size_t i = 0; i < refs.size(); i++) {
+-        auto pos = position_assuming_acyclic(graph.get_id(refs[i]));
+-        if(pos < smallest) {
+-            smallest = pos;
+-            node_at_smallest = refs[i];
+-        }
+-    }
+-    return graph.get_id(node_at_smallest);
+-}
+-
+-linear_haplo_structure::SNVvector linear_haplo_structure::SNVs(const vg::Path& path) const {
+-  SNVvector to_return;
+-  if(path.mapping_size() < 1) {
+-    return to_return;
+-  }
+-  
+-  int64_t last_node = path_mapping_node_id(path, 0);
+-  nodeType last_type = get_type(last_node);
+-  size_t last_pos;
+-  if(last_type == ref_span) {
+-    // Find where the last_node (and not the path) starts in the reference
+-    last_pos = position_assuming_acyclic(last_node);
+-  } else if(last_type == snv) {
+-    last_pos = get_SNP_ref_position(last_node);
+-    to_return.push_back(get_SNV_allele(last_node), last_pos, false);
+-  } else {
+-    throw linearUnrepresentable("not an SNV");
+-  }
+-
+-  for(size_t i = 1; i < path.mapping_size(); i++) {
+-    int64_t this_node = path_mapping_node_id(path, i);
+-    // Only the first mapping can have an offset.
+-    assert(path_mapping_offset(path, i) == 0);
+-    nodeType this_type = get_type(this_node);
+-    size_t this_pos;
+-
+-    if(this_type == invalid) {
+-      throw linearUnrepresentable("not an SNV");
+-    } else if(this_type == snv) {
+-      this_pos = get_SNP_ref_position(this_node);
+-      if(this_pos != last_pos + graph.get_length(graph.get_handle(last_node))) {
+-        throw linearUnrepresentable("indel immediately before SNV");
+-      }
+-      to_return.push_back(get_SNV_allele(this_node), this_pos, false);
+-    } else {
+-      this_pos = position_assuming_acyclic(this_node);
+-      if(last_type == snv) {
+-        if(this_pos != last_pos + graph.get_length(graph.get_handle(last_node))) {
+-          throw linearUnrepresentable("indel immediately after SNV");
+-        }
+-      } else {
+-        if(sn_deletion_between_ref(last_node, this_node)) {
+-          int64_t ref_node = get_ref_following(last_node);
+-          to_return.push_back(gap, position_assuming_acyclic(ref_node), true);
+-        }
+-      }
+-    }
+-    
+-    last_node = this_node;
+-    last_type = this_type;
+-    last_pos = this_pos;
+-  }
+-  return to_return;
+-}
+-
+-size_t linear_haplo_structure::position_assuming_acyclic(int64_t node_id) const {
+-    
+-    // check occurrences o this node on paths
+-    size_t pos;
+-    bool found_pos = !graph.for_each_step_on_handle(graph.get_handle(node_id), [&](const vg::step_handle_t& step) {
+-        
+-        // get the pos if the path matches
+-        if (graph.get_path_handle_of_step(step) == ref_path_handle) {
+-            pos = graph.get_position_of_step(step);
+-            return false;
+-        }
+-        return true;
+-    });
+-    
+-  if (!found_pos) {
+-      throw runtime_error("requested position-in-path of node " + to_string(node_id) + " not in path " + graph.get_path_name(ref_path_handle));
+-  }
+-    
+-  return pos;
+-}
+-
+-
+-bool linear_haplo_structure::is_solitary_ref(int64_t node_id) const {
+-    vg::handle_t handle = graph.get_handle(node_id);
+-    bool on_ref = !graph.for_each_step_on_handle(handle, [&](const vg::step_handle_t& step) {
+-        return graph.get_path_handle_of_step(step) != ref_path_handle;
+-    });
+-    
+-    if (!on_ref) {
+-        return false;
+-    }
+-    
+-    bool is_deletion_neighbour = true;
+-    graph.follow_edges(handle, true, [&](const vg::handle_t& prev) {
+-        if (graph.get_degree(prev, false) != 1) {
+-            graph.follow_edges(prev, false, [&](const vg::handle_t& next) {
+-                if (next != handle) {
+-                    size_t rr_count = 0;
+-                    graph.follow_edges(next, false, [&](const vg::handle_t& next_next) {
+-                        rr_count++;
+-                        if (next_next != handle || rr_count > 1) {
+-                            is_deletion_neighbour = false;
+-                        }
+-                    });
+-                }
+-            });
+-        }
+-    });
+-    
+-    graph.follow_edges(handle, false, [&](const vg::handle_t& next) {
+-        if (graph.get_degree(next, true) != 1) {
+-            graph.follow_edges(next, true, [&](const vg::handle_t& prev) {
+-                if (prev != handle) {
+-                    size_t ll_count = 0;
+-                    graph.follow_edges(prev, true, [&](const vg::handle_t& prev_prev) {
+-                        ll_count++;
+-                        if (prev_prev != handle || ll_count > 1) {
+-                            is_deletion_neighbour = false;
+-                        }
+-                    });
+-                }
+-            });
+-        }
+-    });
+-    
+-    if (!is_deletion_neighbour) {
+-        return false;
+-    }
+-    return true;
+-}
+-
+-bool linear_haplo_structure::is_snv(int64_t node_id) const {
+-    // has only one left and one right neighbour
+-    vg::handle_t lnbr, rnbr;
+-    size_t lnbr_count = 0, rnbr_count = 0;
+-    
+-    vg::handle_t handle = graph.get_handle(node_id);
+-    graph.follow_edges(handle, true, [&](const vg::handle_t& prev) {
+-        lnbr = prev;
+-        ++lnbr_count;
+-    });
+-    graph.follow_edges(handle, false, [&](const vg::handle_t& next) {
+-        rnbr = next;
+-        ++rnbr_count;
+-    });
+-    
+-    if (lnbr_count != 1 || rnbr_count != 1) {
+-        // has too many or too few neighbours to be an SNV
+-        return false;
+-    }
+-    
+-    unordered_set<vg::handle_t> from_lnbr;
+-    bool all_snv = graph.follow_edges(lnbr, false, [&](const vg::handle_t& next) {
+-        from_lnbr.insert(next);
+-        return graph.get_length(next) == 1;
+-    });
+-    
+-    if (!all_snv) {
+-        // some alleles are not SNVs
+-        return false;
+-    }
+-    
+-    size_t from_rnbr_count = 0;
+-    bool all_match = graph.follow_edges(rnbr, true, [&](const vg::handle_t& prev) {
+-        ++from_rnbr_count;
+-        return (bool) from_lnbr.count(prev);
+-    });
+-    
+-    if (!all_match || from_rnbr_count != from_lnbr.size()) {
+-        // we didn't find all of the neighbors in common
+-        return false;
+-    }
+-    
+-    return true;
+-}
+-
+-inputHaplotype* linear_haplo_structure::path_to_input_haplotype(const vg::Path& path) const {
+-  if(path.mapping_size() == 0) {
+-    return new inputHaplotype();
+-  }
+-  
+-  SNVvector SNV_candidates;
+-  
+-  try {
+-    SNV_candidates = SNVs(path);
+-  } catch(linearUnrepresentable& e) {
+-    return new inputHaplotype();
+-  }
+-  
+-  // Determine the start position of the path in the reference.
+-  size_t start;
+-  // This is complicated by the fact that the path may start on an SNV alt
+-  // allele node which does not occur on the reference path.
+-  int64_t start_node = path_mapping_node_id(path, 0);
+-  nodeType start_type = get_type(start_node);
+-  if(start_type == ref_span) {
+-    // We start on a reference node.
+-    start = position_assuming_acyclic(start_node) + path_mapping_offset(path, 0);
+-  } else if(start_type == snv) {
+-    // We start on an alt
+-    start = get_SNP_ref_position(start_node) + path_mapping_offset(path, 0);
+-  } else {
+-    // We start at some other weird place.
+-    return new inputHaplotype();
+-  }
+- 
+-  size_t length = 0;
+-  for(size_t i = 0; i < path.mapping_size(); i++) {
+-    vg::Mapping mapping = path.mapping(i);
+-    length += vg::mapping_from_length(mapping);
+-  }  
+-  
+-  if(SNV_candidates.size() == 0) {
+-    // We need no sites, but one before-first site, after-last-site novel SNP
+-    // count entry. TODO: actually count novel SNPs?
+-    return new inputHaplotype(vector<alleleValue>(0), vector<size_t>(1, 0), index, start, length);
+-  }
+-  
+-  vector<size_t> positions;
+-  vector<alleleValue> alleles;
+-  
+-  for(size_t i = 0; i < SNV_candidates.size(); i++) {
+-    if(index->is_site(SNV_candidates.ref_position(i))) {
+-      positions.push_back(SNV_candidates.ref_position(i));
+-      alleles.push_back(SNV_candidates.allele(i));
+-    }
+-  }
+-
+-  for(size_t i = 1; i < positions.size(); i++) {
+-    if(positions[i] <= positions[i - 1]) {
+-      return new inputHaplotype();
+-    }
+-  }
+-  
+-  size_t last_i = std::numeric_limits<size_t>::max();
+-  for(size_t i = 0; i < SNV_candidates.size(); i++) {
+-    if(!index->is_site(SNV_candidates.ref_position(i))) {
+-      // This is a single-base indel or something else that looks like a SNP but isn't.
+-      // We can skip it like we do with all non-SNP variation.
+-      continue;
+-    }
+-    
+-    // If we know it's in the index, get its index in the index
+-    size_t this_i = index->get_site_index(SNV_candidates.ref_position(i));
+-    if(last_i != std::numeric_limits<size_t>::max() && this_i != last_i + 1) {
+-      // The last SNP existed and this SNP does not come after it.
+-      // All the SNPs have to be consecutive in the index.
+-      return new inputHaplotype();
+-    } else {
+-      // Either this was the first SNP or it followed right after the previous one in the sites list.
+-      last_i = this_i;
+-    }
+-  }
+-  
+-  // With actual alleles, we need one novel SNP count between each pair of
+-  // alleles, plus one before the first and one after the last. 
+-  inputHaplotype* to_return = new inputHaplotype(alleles, vector<size_t>(alleles.size() + 1, 0), index, start, length);
+-  return to_return;
+-}
+-
+-linear_haplo_structure::linear_haplo_structure(istream& slls_index, double log_mut_penalty,
+-                                               double log_recomb_penalty,
+-                                               const vg::PathPositionHandleGraph& graph,
+-                                               vg::path_handle_t ref_path_handle) : graph(graph), ref_path_handle(ref_path_handle) {
+-  
+-  if (log_mut_penalty > 0) {
+-    throw runtime_error("log mutation penalty must be negative");
+-  }
+-  
+-  if (log_recomb_penalty > 0) {
+-    throw runtime_error("log recombination penalty must be negative");
+-  }
+-  
+-  index = new siteIndex(slls_index);
+-  cohort = new haplotypeCohort(slls_index, index);
+-  penalties = new penaltySet(log_recomb_penalty, log_mut_penalty, cohort->get_n_haplotypes());
+-}
+-
+-linear_haplo_structure::~linear_haplo_structure() {
+-  delete index;
+-  delete cohort;
+-  delete penalties;
+-}
+-
+-haplo_score_type linear_haplo_structure::score(const vg::Path& path) const {
+-  inputHaplotype* observed = path_to_input_haplotype(path);
+-  haplo_score_type to_return;
+-  if(observed->is_valid()) {
+-    fastFwdAlgState observed_state(index, penalties, cohort);
+-    double result = observed_state.calculate_probability(observed);
+-    to_return = haplo_score_type(result, true);
+-  } else {
+-    to_return = haplo_score_type(nan(""), false);
+-  }  
+-  delete observed;
+-  return(to_return);
+-}
+-
+-/*******************************************************************************
+ ScoreProvider
+ *******************************************************************************/
+ 
+@@ -700,26 +282,6 @@ IncrementalSearchState ScoreProvider::in
+ }
+ 
+ /*******************************************************************************
+-LinearScoreProvider
+-*******************************************************************************/
+-
+-LinearScoreProvider::LinearScoreProvider(const linear_haplo_structure& index) : index(index) {
+-  // Nothing to do!
+-}
+-
+-pair<double, bool> LinearScoreProvider::score(const vg::Path& path, haploMath::RRMemo& memo) {
+-  // Memo is ignored; all penalties come from the index itself.
+-  auto scored = index.score(path);
+-  
+-  if (scored.second) {
+-      // Yohei says there should never be NANs when it worked
+-      assert(!std::isnan(scored.first));
+-  }
+-  
+-  return scored;
+-}
+-
+-/*******************************************************************************
+ math functions
+ *******************************************************************************/
+ 
+--- a/src/haplotypes.hpp
++++ b/src/haplotypes.hpp
+@@ -11,10 +11,6 @@
+ 
+ #include <gbwt/gbwt.h>
+ #include <gbwt/dynamic_gbwt.h>
+-#include <sublinearLS/reference.hpp>
+-#include <sublinearLS/penalty_set.hpp>
+-#include <sublinearLS/input_haplotype.hpp>
+-#include <sublinearLS/probability.hpp>
+ 
+ 
+ using namespace std;
+@@ -258,67 +254,6 @@ public:
+   static haplo_score_type score(const gbwt_thread_t& thread, GBWTType& graph, haploMath::RRMemo& memo);
+ };
+ 
+-//------------------------------------------------------------------------------
+-
+-struct linear_haplo_structure{
+-private:
+-
+-  siteIndex* index = nullptr;
+-  haplotypeCohort* cohort = nullptr;
+-  penaltySet* penalties = nullptr;
+-  const vg::PathPositionHandleGraph& graph;
+-  vg::path_handle_t ref_path_handle;
+-public:
+-  typedef enum nodeType{
+-    ref_span,
+-    snv,
+-    invalid
+-  } nodeType;
+-  
+-  class linearUnrepresentable : public runtime_error {
+-    using runtime_error::runtime_error;
+-  };
+-  
+-  struct SNVvector{
+-  private:
+-    // Positions of SNVs
+-    vector<size_t> ref_positions;
+-    // Allele values at those positions
+-    vector<alleleValue> alleles;
+-  public:
+-    void push_back(alleleValue allele, size_t ref_pos, bool deletion);
+-    size_t ref_position(size_t i) const;
+-    alleleValue allele(size_t i) const;
+-    size_t size() const;
+-  };
+-  
+-  /// Make a new linear_haplo_structure with the given indexes, mutation and recombination scoring parameters, and reference path in the graph.
+-  /// Penalties *must* be negative, and ought to be something like -9*2.3 mutation and -6*2.3 recombination.
+-  linear_haplo_structure(istream& slls_index, double log_mut_penalty, double log_recomb_penalty,
+-                         const vg::PathPositionHandleGraph& graph, vg::path_handle_t ref_path_handle);
+-  ~linear_haplo_structure();
+-  haplo_score_type score(const vg::Path& path) const;
+-  
+-  inputHaplotype* path_to_input_haplotype(const vg::Path& path) const;
+-  
+-  // Get the position of a node in the reference path, assuming the reference
+-  // path is acyclic. Enforces the constraint that all the nodes in the path
+-  // are locally forward.
+-  size_t position_assuming_acyclic(int64_t node_id) const;
+-  nodeType get_type(int64_t node_id) const;
+-  // Get the node ID of the node at the given mapping index in the path.
+-  int64_t path_mapping_node_id(const vg::Path& path, size_t i) const;
+-  // Get the offset of the path in the node at the given mapping index in the path.
+-  size_t path_mapping_offset(const vg::Path& path, size_t i) const;
+-  int64_t get_SNP_ref_position(size_t node_id) const;
+-  SNVvector SNVs(const vg::Path& path) const;
+-  bool is_snv(int64_t node_id) const;
+-  bool is_solitary_ref(int64_t node_id) const;
+-  bool sn_deletion_between_ref(int64_t left, int64_t right) const;
+-  int64_t get_ref_following(int64_t node_id) const;
+-  alleleValue get_SNV_allele(int64_t node_id) const;
+-};
+-
+ 
+ /// Incremental haplotype search range type used for ScoreProvider's
+ /// incremental search API. Default constructed, represents an empty or
+@@ -331,7 +266,7 @@ public:
+ using IncrementalSearchState = gbwt::SearchState;
+ 
+ /// Interface abstracting over the various ways of generating haplotype scores.
+-/// You probably want the implementations: GBWTScoreProvider, LinearScoreProvider
++/// You probably want the implementation: GBWTScoreProvider
+ /// TODO: Const-ify the indexes used
+ class ScoreProvider {
+ public:
+@@ -378,15 +313,6 @@ private:
+   GBWTType& index;
+ };
+ 
+-/// Score haplotypes using a linear_haplo_structure
+-class LinearScoreProvider : public ScoreProvider {
+-public:
+-  LinearScoreProvider(const linear_haplo_structure& index);
+-  pair<double, bool> score(const vg::Path&, haploMath::RRMemo& memo);
+-private:
+-  const linear_haplo_structure& index;
+-};
+-
+ 
+ //------------------------------------------------------------------------------
+ // template implementations
+--- a/src/subcommand/mpmap_main.cpp
++++ b/src/subcommand/mpmap_main.cpp
+@@ -275,8 +275,6 @@ int main_mpmap(int argc, char** argv) {
+     string graph_name;
+     string gcsa_name;
+     string gbwt_name;
+-    string sublinearLS_name;
+-    string sublinearLS_ref_path;
+     string snarls_name;
+     string distance_index_name;
+     string fastq_name_1;
+@@ -582,12 +580,12 @@ int main_mpmap(int argc, char** argv) {
+                 get_rescue_graph_from_paths = true;;
+                 break;
+                 
+-            case OPT_LINEAR_INDEX: // --linear-index
+-                sublinearLS_name = require_exists(logger, optarg);
+-                break;
+-            
+-            case OPT_LINEAR_PATH: // --linear-path
+-                sublinearLS_ref_path = optarg;
++            case OPT_LINEAR_INDEX:
++            case OPT_LINEAR_PATH:
++                // The sublinear Li and Stephens implementation is non-free and
++                // therefore not shipped in Debian.
++                logger.error() << "sublinear Li and Stephens indexes (--linear-index, "
++                               << "--linear-path) are not supported by this build of vg." << endl;
+                 break;
+                 
+             case 'f':
+@@ -1064,7 +1062,7 @@ int main_mpmap(int argc, char** argv) {
+     // the spliced surject algorithm sometimes by having better multipath alignments, but i should
+     // revisit this at some point
+     if (single_path_alignment_mode &&
+-        (population_max_paths == 0 || (sublinearLS_name.empty() && gbwt_name.empty())) &&
++        (population_max_paths == 0 || gbwt_name.empty()) &&
+         !(hts_output && transcriptomic)) {
+         // adjust parameters that produce irrelevant extra work single path mode
+         if (!snarls_name.empty()) {
+@@ -1201,37 +1199,22 @@ int main_mpmap(int argc, char** argv) {
+         logger.error() << "The mapping quality method 'None' is no longer supported." << endl;
+     }
+     
+-    if (population_max_paths != 10 && population_max_paths != 0 && gbwt_name.empty() && sublinearLS_name.empty()) {
++    if (population_max_paths != 10 && population_max_paths != 0 && gbwt_name.empty()) {
+         // Don't allow anything but the default or the "disabled" setting without an index.
+         // TODO: This restriction makes neat auto-generation of command line options for different conditions hard.
+         logger.error() << "Maximum number of paths per alignment for population scoring "
+-                       << "(--max-paths) is specified but population database (-H or --linear-index) "
++                       << "(--max-paths) is specified but population database (-H) "
+                        << "was not provided." << endl;
+     }
+     
+-    if (always_check_population && gbwt_name.empty() && sublinearLS_name.empty()) {
++    if (always_check_population && gbwt_name.empty()) {
+         logger.error() << "Cannot --always-check-population if no population database "
+-                       << "(-H or --linear-index) is provided." << endl;
++                       << "(-H) is provided." << endl;
+     }
+     
+-    if (force_haplotype_count != 0 && gbwt_name.empty() && sublinearLS_name.empty()) {
++    if (force_haplotype_count != 0 && gbwt_name.empty()) {
+         logger.warn() << "Cannot --force-haplotype-count if no population database "
+-                      << "(-H or --linear-index) is provided. Ignoring option." << endl;
+-    }
+-    
+-    if (!sublinearLS_name.empty() && !gbwt_name.empty()) {
+-        logger.error() << "GBWT index (-H) and linear haplotype index (--linear-index) "
+-                       << "both specified. Only one can be used." << endl;
+-    }
+-    
+-    if (!sublinearLS_name.empty() && sublinearLS_ref_path.empty()) {
+-        logger.error() << "Linear haplotype index (--linear-index) cannot be used "
+-                       << "without a single reference path (--linear-path)." << endl;
+-    }
+-    
+-    if (sublinearLS_name.empty() && !sublinearLS_ref_path.empty()) {
+-        logger.error() << "Linear haplotype ref path (--linear-path) cannot be used "
+-                       << "without an index (--linear-index)." << endl;
++                      << "(-H) is provided. Ignoring option." << endl;
+     }
+     
+     if (max_num_mappings > max_map_attempts && max_map_attempts != 0) {
+@@ -1403,14 +1386,9 @@ int main_mpmap(int argc, char** argv) {
+     }
+     
+     ifstream gbwt_stream;
+-    ifstream ls_stream;
+     if (!gbwt_name.empty()) {
+         gbwt_stream.open(gbwt_name);
+     }
+-    else if (!sublinearLS_name.empty()) {
+-        // We want to use sublinear Li and Stephens as our haplotype scoring approach
+-        ls_stream.open(sublinearLS_name);
+-    }
+     
+     // Count our threads
+     int thread_count = vg::get_thread_count();
+@@ -1672,7 +1650,6 @@ int main_mpmap(int argc, char** argv) {
+     // Load optional indexes
+     
+     unique_ptr<gbwt::GBWT> gbwt;
+-    haplo::linear_haplo_structure* sublinearLS = nullptr;
+     haplo::ScoreProvider* haplo_score_provider = nullptr;
+     if (!gbwt_name.empty()) {
+         log_progress("Loading GBWT from " + gbwt_name);
+@@ -1688,17 +1665,6 @@ int main_mpmap(int argc, char** argv) {
+         // We have the GBWT available for scoring haplotypes
+         haplo_score_provider = new haplo::GBWTScoreProvider<gbwt::GBWT>(*gbwt);
+     }
+-    else if (!sublinearLS_name.empty()) {
+-        log_progress("Loading LS index from " + sublinearLS_name);
+-        
+-        // TODO: we only support a single ref contig, and we use these
+-        // hardcoded mutation and recombination likelihoods
+-        
+-        sublinearLS = new linear_haplo_structure(ls_stream, -9 * 2.3, -6 * 2.3, *path_position_handle_graph,
+-                                                 path_position_handle_graph->get_path_handle(sublinearLS_ref_path));
+-        haplo_score_provider = new haplo::LinearScoreProvider(*sublinearLS);
+-        log_progress("Completed loading LS index");
+-    }
+     
+     // Load structures that we need for HTS lib outputs
+     unordered_set<path_handle_t> surjection_paths;
+@@ -2431,10 +2397,6 @@ int main_mpmap(int argc, char** argv) {
+     if (haplo_score_provider != nullptr) {
+         delete haplo_score_provider;
+     }
+-    
+-    if (sublinearLS != nullptr) {
+-        delete sublinearLS;
+-    }
+    
+     return 0;
+ }
+--- a/src/unittest/haplotypes.cpp
++++ b/src/unittest/haplotypes.cpp
+@@ -14,267 +14,6 @@
+ namespace unittest {
+ using namespace std;
+ 
+-using thread_t = vector<gbwt::node_type>;
+-
+-vg::Path path_from_thread_t(thread_t& t) {
+-    vg::Path toReturn;
+-    int rank = 1;
+-    for (int i = 0; i < t.size(); i++) {
+-        vg::Mapping* mapping = toReturn.add_mapping();
+-        
+-        // Set up the position
+-        mapping->mutable_position()->set_node_id(gbwt::Node::id(t[i]));
+-        mapping->mutable_position()->set_is_reverse(gbwt::Node::is_reverse(t[i]));
+-        
+-        // Set the rank
+-        mapping->set_rank(rank++);
+-    }
+-    // We're done making the path
+-    return toReturn;
+-}
+-
+-TEST_CASE("We can represent appropriate graphs according to linear reference", "[slls][bubble-finding]") {
+-  vector<gbwt::node_type> tm = {
+-    gbwt::Node::encode(1, false),
+-    gbwt::Node::encode(1, false),
+-    gbwt::Node::encode(2, false),
+-    gbwt::Node::encode(3, false),
+-    gbwt::Node::encode(4, false),
+-    gbwt::Node::encode(5, false)
+-  };
+-  
+-  // POSITIVE SNVs
+-  
+-  string SNP_graph_json = R"(
+-  {"node":[
+-    {"id":1,"sequence":"AAA"},
+-    {"id":2,"sequence":"C"},
+-    {"id":3,"sequence":"T"},
+-    {"id":4,"sequence":"AAA"}
+-  ],
+-  "edge":[
+-    {"to":2,"from":1},
+-    {"to":3,"from":1},
+-    {"to":4,"from":2},
+-    {"to":4,"from":3}
+-  ],
+-  "path":[
+-    {"name":"reference","mapping":[
+-      {"position":{"node_id":1},"rank":1},
+-      {"position":{"node_id":2},"rank":2},
+-      {"position":{"node_id":4},"rank":3}
+-    ]}
+-  ]}
+-  )";
+-  
+-  thread_t SNP_thread = {tm[1], tm[3], tm[4]};
+-
+-  string del_graph_json = R"(
+-  {"node":[
+-    {"id":1,"sequence":"AAA"},
+-    {"id":2,"sequence":"C"},
+-    {"id":3,"sequence":"T"},
+-    {"id":4,"sequence":"AAA"}
+-  ],
+-  "edge":[
+-    {"to":2,"from":1},
+-    {"to":3,"from":1},
+-    {"to":4,"from":1},
+-    {"to":4,"from":2},
+-    {"to":4,"from":3}
+-  ],
+-  "path":[
+-    {"name":"reference","mapping":[
+-      {"position":{"node_id":1},"rank":1},
+-      {"position":{"node_id":2},"rank":2},
+-      {"position":{"node_id":4},"rank":3}
+-    ]}
+-  ]}
+-  )";
+-
+-  thread_t del_ref_thread = {tm[1], tm[2], tm[4]};
+-  thread_t del_thread = {tm[1], tm[4]};
+-
+-  // Build the SNP graph
+-  bdsg::HashGraph SNP_graph;
+-  vg::io::json2graph(SNP_graph_json, &SNP_graph);
+-  // Build the xg index
+-  xg::XG SNP_xg_index;
+-  SNP_xg_index.from_path_handle_graph(SNP_graph);
+-  vg::path_handle_t SNP_ref_path_handle = SNP_xg_index.get_path_handle("reference");
+-
+-  // Build the del graph
+-  bdsg::HashGraph del_graph;
+-  vg::io::json2graph(del_graph_json, &del_graph);
+-  // Build the xg index
+-  xg::XG del_xg_index;
+-  del_xg_index.from_path_handle_graph(del_graph);
+-  vg::path_handle_t del_ref_path_handle = del_xg_index.get_path_handle("reference");
+-  
+-  // NEGATIVE SNVs
+-  
+-  string long_graph_json = R"(
+-  {"node":[
+-    {"id":1,"sequence":"AAA"},
+-    {"id":2,"sequence":"C"},
+-    {"id":3,"sequence":"CT"},
+-    {"id":4,"sequence":"AAA"}
+-  ],
+-  "edge":[
+-    {"to":2,"from":1},
+-    {"to":3,"from":1},
+-    {"to":4,"from":2},
+-    {"to":4,"from":3}
+-  ],
+-  "path":[
+-    {"name":"reference","mapping":[
+-      {"position":{"node_id":1},"rank":1},
+-      {"position":{"node_id":2},"rank":2},
+-      {"position":{"node_id":4},"rank":3}
+-    ]}
+-  ]}
+-  )";
+-  
+-  thread_t long_thread = {tm[1], tm[2], tm[4]};
+-      
+-  string double_graph_json = R"(
+-  {"node":[
+-    {"id":1,"sequence":"AAA"},
+-    {"id":2,"sequence":"C"},
+-    {"id":3,"sequence":"G"},
+-    {"id":5,"sequence":"T"},
+-    {"id":4,"sequence":"AAA"}
+-  ],
+-  "edge":[
+-    {"to":2,"from":1},
+-    {"to":3,"from":1},
+-    {"to":4,"from":2},
+-    {"to":5,"from":3},
+-    {"to":4,"from":5}
+-  ],
+-  "path":[
+-    {"name":"reference","mapping":[
+-      {"position":{"node_id":1},"rank":1},
+-      {"position":{"node_id":2},"rank":2},
+-      {"position":{"node_id":4},"rank":3}
+-    ]}
+-  ]}
+-  )";
+-  
+-  thread_t double_thread = {tm[1], tm[2], tm[4]};
+-
+-  // Build the long graph
+-  bdsg::HashGraph long_graph;
+-  vg::io::json2graph(long_graph_json, &long_graph);
+-  // Build the xg index
+-  xg::XG long_xg_index;
+-  long_xg_index.from_path_handle_graph(long_graph);
+-  vg::path_handle_t long_ref_path_handle = long_xg_index.get_path_handle("reference");
+-
+-  // Build the double graph
+-  bdsg::HashGraph double_graph;
+-  vg::io::json2graph(double_graph_json, &double_graph);
+-  // Build the xg index
+-  xg::XG double_xg_index;
+-  double_xg_index.from_path_handle_graph(double_graph);
+-  vg::path_handle_t double_ref_path_handle = double_xg_index.get_path_handle("reference");
+-
+-  string matching_test_file = "matching_test.slls";
+-  ofstream slls_out;
+-  slls_out.open(matching_test_file, ios::out | ios::trunc);
+-  slls_out << "0\t7\t1\n3\n3\n2\t1\t0\t0\t0\n2";
+-  slls_out.close();  
+-  ifstream slls_in;
+-  slls_in.open(matching_test_file, ios::in);
+-  haplo::linear_haplo_structure SNP_lin_DP(slls_in, -3, -2, SNP_xg_index, SNP_ref_path_handle);
+-  slls_in.close();
+-  slls_in.open(matching_test_file, ios::in);
+-  haplo::linear_haplo_structure del_lin_DP(slls_in, -3, -2, del_xg_index, del_ref_path_handle);
+-  slls_in.close();
+-  slls_in.open(matching_test_file, ios::in);
+-  haplo::linear_haplo_structure long_lin_DP(slls_in, -3, -2, long_xg_index, long_ref_path_handle);
+-  slls_in.close();
+-  slls_in.open(matching_test_file, ios::in);
+-  haplo::linear_haplo_structure double_lin_DP(slls_in, -3, -2, double_xg_index, double_ref_path_handle);
+-  slls_in.close();
+-  slls_in.open(matching_test_file, ios::in);
+-  haplo::linear_haplo_structure match_lin_DP(slls_in, -3, -2, SNP_xg_index, SNP_ref_path_handle);
+-  slls_in.close();
+-  remove(matching_test_file.c_str());
+-  
+-  string nonmatching_test_file = "nonmatching_test.slls";
+-  ofstream nslls_out;
+-  nslls_out.open(nonmatching_test_file, ios::out | ios::trunc);
+-  nslls_out << "0\t7\t1\n5\n3\n2\t1\t0\t0\t0\n2";
+-  nslls_out.close();  
+-  ifstream nslls_in;
+-  nslls_in.open(nonmatching_test_file, ios::in);
+-  haplo::linear_haplo_structure nonmatch_lin_DP(nslls_in, -3, -2, SNP_xg_index, SNP_ref_path_handle);
+-  nslls_in.close();
+-  remove(nonmatching_test_file.c_str());
+-
+-  vg::Path SNP_path = path_from_thread_t(SNP_thread);
+-  vg::Path del_path = path_from_thread_t(del_thread);
+-  vg::Path del_ref_path = path_from_thread_t(del_ref_thread);
+-  vg::Path long_path = path_from_thread_t(long_thread);
+-  vg::Path double_path = path_from_thread_t(double_thread);
+-  SECTION( "atomic node-type checking" ) {
+-    REQUIRE(SNP_lin_DP.is_solitary_ref(1) == true);
+-    REQUIRE(del_lin_DP.is_solitary_ref(1) == true);
+-    REQUIRE(del_lin_DP.is_solitary_ref(4) == true);
+-    REQUIRE(SNP_lin_DP.is_solitary_ref(4) == true);
+-    REQUIRE(SNP_lin_DP.is_solitary_ref(2) == false);
+-    REQUIRE(SNP_lin_DP.is_snv(2) == true);
+-    REQUIRE(SNP_lin_DP.is_snv(3) == true);
+-    REQUIRE(SNP_lin_DP.is_snv(3) == true);
+-    REQUIRE(long_lin_DP.is_snv(3) == false);
+-    REQUIRE(double_lin_DP.is_snv(3) == false);
+-    REQUIRE(SNP_lin_DP.get_type(1) == haplo::linear_haplo_structure::ref_span);
+-    REQUIRE(SNP_lin_DP.get_type(2) == haplo::linear_haplo_structure::snv);
+-    REQUIRE(long_lin_DP.get_type(3) == haplo::linear_haplo_structure::invalid);
+-    REQUIRE(double_lin_DP.get_type(3) == haplo::linear_haplo_structure::invalid);
+-  }
+-  SECTION( "graph with SNP" ) {
+-    bool passed = true;
+-    haplo::linear_haplo_structure::SNVvector SNP_snvs = SNP_lin_DP.SNVs(SNP_path);
+-    try{
+-      haplo::linear_haplo_structure::SNVvector SNP_snvs = SNP_lin_DP.SNVs(SNP_path);
+-    } catch(haplo::linear_haplo_structure::linearUnrepresentable& e) {
+-      passed = false;
+-    }
+-    REQUIRE(passed);
+-  }
+-  SECTION( "graph with deletion" ) {
+-    bool passed = true;
+-    haplo::linear_haplo_structure::SNVvector del_snvs = del_lin_DP.SNVs(del_path);
+-    try{
+-      haplo::linear_haplo_structure::SNVvector SNP_snvs = SNP_lin_DP.SNVs(SNP_path);
+-    } catch(haplo::linear_haplo_structure::linearUnrepresentable& e) {
+-      passed = false;
+-    }
+-    REQUIRE(passed);
+-  }
+-  SECTION( "graph with too long polymorphism" ) {
+-    bool passed = true;
+-    try{
+-      haplo::linear_haplo_structure::SNVvector long_snvs = long_lin_DP.SNVs(long_path);
+-    } catch(haplo::linear_haplo_structure::linearUnrepresentable& e) {
+-      passed = false;
+-    }
+-    REQUIRE(!passed);
+-  }
+-  SECTION( "graph with 2-node path in superbubble" ) {
+-    bool passed = true;
+-    try{
+-      haplo::linear_haplo_structure::SNVvector double_snvs = double_lin_DP.SNVs(double_path);
+-    } catch(haplo::linear_haplo_structure::linearUnrepresentable& e) {
+-      passed = false;
+-    }
+-    REQUIRE(!passed);
+-  }
+-}
+-//TODO test paths that aren't in the index
+-
+ TEST_CASE("We can score haplotypes using GBWT", "[haplo-score][gbwt]") {
+ 
+   gbwt::Verbosity::set(gbwt::Verbosity::SILENT);


=====================================
debian/patches/remove_unused_3edge_header.patch
=====================================
@@ -0,0 +1,32 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Drop the unused 3_Absorb3edge2x.h include
+
+This header has a non-free license and is not shipped by
+libpinchesandcacti-dev.  The implementation in vg does not use it, so drop
+the include and the -l3edgeconnected link flag.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -81,7 +81,7 @@ INCLUDE_FLAGS :=-I/usr/include/xg -I/usr
+ # These need to come before library search paths from LDFLAGS or we won't
+ # prefer linking vg-installed dependencies over system ones.
+ LD_LIB_DIR_FLAGS := -L$(CWD)/$(LIB_DIR)
+-LD_LIB_FLAGS := -lvcflib -lwfa2 -ltabixpp -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -lkff -ldivsufsort -ldivsufsort64 -lraptor2 -lpinchesandcacti -l3edgeconnected -lsonlib -lquicktree -lcpp_progress_bar -lstructures -lbdsg -lxg -lsdsl -lhandlegraph -lgfaz_compress -lgfaz_core -lzstd $(shell $(PKG_CONFIG) --libs libfastahack) $(shell $(PKG_CONFIG) --libs htslib)
++LD_LIB_FLAGS := -lvcflib -lwfa2 -ltabixpp -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -lkff -ldivsufsort -ldivsufsort64 -lraptor2 -lpinchesandcacti -lsonlib -lquicktree -lcpp_progress_bar -lstructures -lbdsg -lxg -lsdsl -lhandlegraph -lgfaz_compress -lgfaz_core -lzstd $(shell $(PKG_CONFIG) --libs libfastahack) $(shell $(PKG_CONFIG) --libs htslib)
+ # We omit Cairo for now because its transitive dependencies can't be determined until after it's built. Set them lazily
+ LD_CAIRO_LIB_FLAGS = $(shell PKG_CONFIG_PATH=$(CWD)/$(LIB_DIR)/pkgconfig:$(PKG_CONFIG_PATH) pkg-config --libs --static cairo)
+ # We omit Boost Program Options for now; we find it in a platform-dependent way.
+--- a/src/algorithms/three_edge_connected_components.cpp
++++ b/src/algorithms/three_edge_connected_components.cpp
+@@ -3,7 +3,6 @@
+ extern "C" {
+ #include "sonLib/sonLibList.h"
+ #include "sonLib/sonLibTuples.h"
+-#include "sonLib/3_Absorb3edge2x.h"
+ }
+ 
+ #include <structures/union_find.hpp>


=====================================
debian/patches/series
=====================================
@@ -19,5 +19,18 @@ use_packaged_libtsl-hopscotch-map-dev
 use_packaged_vcflib
 use_packaged_htslib
 simde
+use_packaged_alignment_libraries.patch
+use_packaged_core_libraries.patch
+use_packaged_xg.patch
+use_packaged_sonlib.patch
+use_packaged_pinchesandcacti.patch
+use_packaged_cairo.patch
+use_packaged_helper_libraries.patch
+use_packaged_gfaz.patch
+use_packaged_cpp_progress_bar.patch
+use_packaged_quicktree.patch
+use_debian_missing_sources.patch
+remove_unused_3edge_header.patch
+disable_sublinear_ls.patch
 #crossbuild  # patches only bundled deps/, which is not shipped
 #python3  # patches only bundled deps/, which is not shipped


=====================================
debian/patches/use_debian_missing_sources.patch
=====================================
@@ -0,0 +1,40 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Build the remaining micro-libraries from debian/missing-sources
+
+sha1 and lru_cache have no Debian packages.  Their sources are shipped in
+the Debian packaging and built from there.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -404,7 +404,8 @@ GBWTGRAPH_DIR=deps/gbwtgraph
+ KFF_DIR=deps/kff-cpp-api
+ GSSW_DIR:=deps/gssw
+ SPARSEPP_DIR:=deps/sparsepp
+-SHA1_DIR:=deps/sha1
++SHA1_DIR:=debian/missing-sources/sha1
++LRU_CACHE_DIR:=debian/missing-sources/lru_cache
+ DYNAMIC_DIR:=deps/DYNAMIC
+ SSW_DIR:=deps/ssw/src
+ LINLS_DIR:=deps/sublinear-Li-Stephens
+@@ -714,8 +715,8 @@ $(LIB_DIR)/libgssw.a: $(GSSW_DIR)/src/gs
+ 	cd $(GSSW_DIR) && $(MAKE) clean && CFLAGS="-fPIC $(CFLAGS)" CXXFLAGS="-fPIC $(CXXFLAGS)" $(MAKE) $(FILTER)
+ 	cd $(GSSW_DIR) && cp lib/libgssw.a $(CWD)/$(LIB_DIR)/ && cp src/gssw.h $(CWD)/$(INC_DIR)/
+ 
+-$(INC_DIR)/lru_cache.h: $(DEP_DIR)/lru_cache/*.h $(DEP_DIR)/lru_cache/*.cc
+-	cd $(DEP_DIR)/lru_cache && cp *.h* $(CWD)/$(INC_DIR)/
++$(INC_DIR)/lru_cache.h: $(wildcard $(LRU_CACHE_DIR)/*.h)
++	cd $(LRU_CACHE_DIR) && cp *.h* $(CWD)/$(INC_DIR)/
+ 
+ # We moved the Dynamic headers so make sure to clean up the old ones.
+ $(INC_DIR)/dynamic/dynamic.hpp: $(DYNAMIC_DIR)/include/dynamic/*.hpp $(DYNAMIC_DIR)/include/dynamic/*/*.hpp
+@@ -986,6 +987,5 @@ clean:
+ 	$(RM) -r $(OBJ_DIR)
+ 	$(RM) -r $(INC_DIR)
+ 	$(RM) -r share/
+-	cd $(DEP_DIR) && cd sha1 && $(MAKE) clean
+ 	cd $(DEP_DIR) && cd sublinear-Li-Stephens && $(MAKE) clean
+ 


=====================================
debian/patches/use_packaged_alignment_libraries.patch
=====================================
@@ -0,0 +1,57 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Use the Debian-packaged alignment libraries
+
+The +ds tarball does not ship deps/.  Link against the Debian packages for
+GSSW, SSW, GBWT, GBWTGraph, GCSA2, KFF and WFA2 instead of building the
+bundled copies.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -437,12 +437,6 @@ DEP_SHARED_OBJ = $(patsubst $(OBJ_DIR)/%
+ # If you just pass them to ar it puts the library *file* in libvg where nothing can read it.
+ LIB_DEPS =
+ LIB_DEPS += $(LIB_DIR)/libsdsl.a
+-LIB_DEPS += $(LIB_DIR)/libssw.a
+-LIB_DEPS += $(LIB_DIR)/libgcsa2.a
+-LIB_DEPS += $(LIB_DIR)/libgbwt.a
+-LIB_DEPS += $(LIB_DIR)/libgbwtgraph.a
+-LIB_DEPS += $(LIB_DIR)/libkff.a
+-LIB_DEPS += $(LIB_DIR)/libgssw.a
+ LIB_DEPS += $(LIB_DIR)/libsonlib.a
+ LIB_DEPS += $(LIB_DIR)/libpinchesandcacti.a
+ LIB_DEPS += $(LIB_DIR)/libsublinearLS.a
+@@ -489,10 +483,6 @@ endif
+ 
+ # common dependencies to build before all vg src files
+ DEPS = $(LIB_DEPS)
+-DEPS += $(INC_DIR)/gcsa/gcsa.h
+-DEPS += $(INC_DIR)/gbwt/dynamic_gbwt.h
+-DEPS += $(INC_DIR)/gbwtgraph/gbwtgraph.h
+-DEPS += $(INC_DIR)/kff_io.hpp
+ DEPS += $(INC_DIR)/lru_cache.h
+ DEPS += $(INC_DIR)/dynamic/dynamic.hpp
+ DEPS += $(INC_DIR)/sparsepp/spp.h
+@@ -1048,11 +1038,6 @@ clean:
+ 	$(RM) -r $(INC_DIR)
+ 	$(RM) -r share/
+ 	cd $(DEP_DIR) && cd elfutils && $(MAKE) $(AUTOMAKE_MAKEFLAGS) clean || true
+-	cd $(DEP_DIR) && cd gcsa2 && $(MAKE) clean
+-	cd $(DEP_DIR) && cd gbwt && $(MAKE) clean
+-	cd $(DEP_DIR) && cd gbwtgraph && $(MAKE) clean
+-	cd $(DEP_DIR) && cd gssw && $(MAKE) clean
+-	cd $(DEP_DIR) && cd kff-cpp-api && rm -Rf build
+ 	cd $(DEP_DIR) && cd libhandlegraph && rm -Rf build CMakeCache.txt CMakeFiles
+ 	cd $(DEP_DIR) && cd libvgio && rm -Rf build CMakeCache.txt CMakeFiles
+ 	cd $(DEP_DIR) && cd mimalloc && rm -Rf build CMakeCache.txt CMakeFiles
+@@ -1060,7 +1045,6 @@ clean:
+ 	cd $(DEP_DIR) && cd sha1 && $(MAKE) clean
+ 	cd $(DEP_DIR) && cd sdsl-lite && ./uninstall.sh || true
+ 	cd $(DEP_DIR) && cd sonLib && $(MAKE) clean
+-	cd $(DEP_DIR) && cd ssw && cd src && $(MAKE) clean
+ 	cd $(DEP_DIR) && cd structures && $(MAKE) clean
+ 	cd $(DEP_DIR) && cd sublinear-Li-Stephens && $(MAKE) clean
+ 


=====================================
debian/patches/use_packaged_cairo.patch
=====================================
@@ -0,0 +1,31 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Use the Debian-packaged cairo and pixman
+
+The +ds tarball does not ship deps/.  Use the cairo headers from pkg-config
+and link against the Debian packages instead of building the bundled
+copies.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -74,7 +74,7 @@ DEPGEN_FLAGS := -MMD -MP
+ # even though that's not *always* safe. See
+ # <https://stackoverflow.com/a/11532197> and
+ # <https://github.com/protocolbuffers/protobuf/issues/12998>
+-INCLUDE_FLAGS :=-I/usr/include/xg -I/usr/include/sonLib $(shell $(PKG_CONFIG) --cflags libfastahack) -I$(CWD)/$(INC_DIR) -I$(CWD)/$(INC_DIR)/GFAz -I. -I$(CWD)/$(SRC_DIR) -I$(CWD)/$(UNITTEST_SRC_DIR) -I$(CWD)/$(UNITTEST_SUPPORT_SRC_DIR) -I$(CWD)/$(SUBCOMMAND_SRC_DIR) -I$(CWD)/$(INC_DIR)/dynamic -I$(CWD)/$(INC_DIR)/cairo $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS) $(PKG_CONFIG_STATIC_DEPS) $(PKG_CONFIG_HEADER_DEPS) | tr ' ' '\n' | awk '!x[$$0]++' | tr '\n' ' ')
++INCLUDE_FLAGS :=-I/usr/include/xg -I/usr/include/sonLib $(shell $(PKG_CONFIG) --cflags libfastahack) -I$(CWD)/$(INC_DIR) -I$(CWD)/$(INC_DIR)/GFAz -I. -I$(CWD)/$(SRC_DIR) -I$(CWD)/$(UNITTEST_SRC_DIR) -I$(CWD)/$(UNITTEST_SUPPORT_SRC_DIR) -I$(CWD)/$(SUBCOMMAND_SRC_DIR) -I$(CWD)/$(INC_DIR)/dynamic $(shell $(PKG_CONFIG) --cflags cairo) $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS) $(PKG_CONFIG_STATIC_DEPS) $(PKG_CONFIG_HEADER_DEPS) | tr ' ' '\n' | awk '!x[$$0]++' | tr '\n' ' ')
+ 
+ # Define libraries to link vg against.
+ 
+@@ -439,8 +439,6 @@ LIB_DEPS =
+ LIB_DEPS += $(LIB_DIR)/libsublinearLS.a
+ LIB_DEPS += $(LIB_DIR)/libgfaz_core.a
+ LIB_DEPS += $(LIB_DIR)/libgfaz_compress.a
+-LIB_DEPS += $(LIB_DIR)/libcairo.a
+-LIB_DEPS += $(LIB_DIR)/libpixman-1.a
+ 
+ # Only depend on these files for the final linking stage.	
+ # These libraries provide no headers to affect the vg build.	


=====================================
debian/patches/use_packaged_core_libraries.patch
=====================================
@@ -0,0 +1,60 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Use the Debian-packaged core graph libraries
+
+The +ds tarball does not ship deps/.  Link against the Debian packages for
+libhandlegraph, libbdsg, libvgio, libsdsl, libstructures and libtabixpp
+instead of building the bundled copies.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -81,7 +81,7 @@ INCLUDE_FLAGS :=$(shell $(PKG_CONFIG) --
+ # These need to come before library search paths from LDFLAGS or we won't
+ # prefer linking vg-installed dependencies over system ones.
+ LD_LIB_DIR_FLAGS := -L$(CWD)/$(LIB_DIR)
+-LD_LIB_FLAGS := -lvcflib -lwfa2 -ltabixpp -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -lkff -ldivsufsort -ldivsufsort64 -lraptor2 -lpinchesandcacti -l3edgeconnected -lsonlib -lstructures -lbdsg -lxg -lsdsl -lhandlegraph -lgfaz_compress -lgfaz_core -lzstd $(shell $(PKG_CONFIG) --libs libfastahack) $(shell $(PKG_CONFIG) --libs htslib) -ltabixpp
++LD_LIB_FLAGS := -lvcflib -lwfa2 -ltabixpp -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -lkff -ldivsufsort -ldivsufsort64 -lraptor2 -lpinchesandcacti -l3edgeconnected -lsonlib -lstructures -lbdsg -lxg -lsdsl -lhandlegraph -lgfaz_compress -lgfaz_core -lzstd $(shell $(PKG_CONFIG) --libs libfastahack) $(shell $(PKG_CONFIG) --libs htslib)
+ # We omit Cairo for now because its transitive dependencies can't be determined until after it's built. Set them lazily
+ LD_CAIRO_LIB_FLAGS = $(shell PKG_CONFIG_PATH=$(CWD)/$(LIB_DIR)/pkgconfig:$(PKG_CONFIG_PATH) pkg-config --libs --static cairo)
+ # We omit Boost Program Options for now; we find it in a platform-dependent way.
+@@ -436,14 +436,9 @@ DEP_SHARED_OBJ = $(patsubst $(OBJ_DIR)/%
+ # But that requires fancy ar scripting.
+ # If you just pass them to ar it puts the library *file* in libvg where nothing can read it.
+ LIB_DEPS =
+-LIB_DEPS += $(LIB_DIR)/libsdsl.a
+ LIB_DEPS += $(LIB_DIR)/libsonlib.a
+ LIB_DEPS += $(LIB_DIR)/libpinchesandcacti.a
+ LIB_DEPS += $(LIB_DIR)/libsublinearLS.a
+-LIB_DEPS += $(LIB_DIR)/libstructures.a
+-LIB_DEPS += $(LIB_DIR)/libvgio.a
+-LIB_DEPS += $(LIB_DIR)/libhandlegraph.a
+-LIB_DEPS += $(LIB_DIR)/libbdsg.a
+ LIB_DEPS += $(LIB_DIR)/libxg.a
+ LIB_DEPS += $(LIB_DIR)/libgfaz_core.a
+ LIB_DEPS += $(LIB_DIR)/libgfaz_compress.a
+@@ -494,7 +489,6 @@ DEPS += $(INC_DIR)/ips4o.hpp
+ DEPS += $(INC_DIR)/BooPHF.h
+ DEPS += $(INC_DIR)/mio/mmap.hpp
+ DEPS += $(INC_DIR)/atomic_queue.h
+-DEPS += $(LIB_DIR)/cleaned_old_elfutils_v004
+ 
+ .PHONY: clean clean-tests get-deps deps lint test set-path objs static static-docker docs man version
+ 
+@@ -1037,14 +1031,8 @@ clean:
+ 	$(RM) -r $(OBJ_DIR)
+ 	$(RM) -r $(INC_DIR)
+ 	$(RM) -r share/
+-	cd $(DEP_DIR) && cd elfutils && $(MAKE) $(AUTOMAKE_MAKEFLAGS) clean || true
+-	cd $(DEP_DIR) && cd libhandlegraph && rm -Rf build CMakeCache.txt CMakeFiles
+-	cd $(DEP_DIR) && cd libvgio && rm -Rf build CMakeCache.txt CMakeFiles
+-	cd $(DEP_DIR) && cd mimalloc && rm -Rf build CMakeCache.txt CMakeFiles
+ 	cd $(DEP_DIR) && cd progress_bar && $(MAKE) clean
+ 	cd $(DEP_DIR) && cd sha1 && $(MAKE) clean
+-	cd $(DEP_DIR) && cd sdsl-lite && ./uninstall.sh || true
+ 	cd $(DEP_DIR) && cd sonLib && $(MAKE) clean
+-	cd $(DEP_DIR) && cd structures && $(MAKE) clean
+ 	cd $(DEP_DIR) && cd sublinear-Li-Stephens && $(MAKE) clean
+ 


=====================================
debian/patches/use_packaged_cpp_progress_bar.patch
=====================================
@@ -0,0 +1,68 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Use the Debian-packaged cpp-progress-bar
+
+Link against the libcpp_progress_bar static library and use the installed
+progress_bar.hpp instead of compiling the copy bundled in deps/.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -81,7 +81,7 @@ INCLUDE_FLAGS :=-I/usr/include/xg -I/usr
+ # These need to come before library search paths from LDFLAGS or we won't
+ # prefer linking vg-installed dependencies over system ones.
+ LD_LIB_DIR_FLAGS := -L$(CWD)/$(LIB_DIR)
+-LD_LIB_FLAGS := -lvcflib -lwfa2 -ltabixpp -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -lkff -ldivsufsort -ldivsufsort64 -lraptor2 -lpinchesandcacti -l3edgeconnected -lsonlib -lstructures -lbdsg -lxg -lsdsl -lhandlegraph -lgfaz_compress -lgfaz_core -lzstd $(shell $(PKG_CONFIG) --libs libfastahack) $(shell $(PKG_CONFIG) --libs htslib)
++LD_LIB_FLAGS := -lvcflib -lwfa2 -ltabixpp -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -lkff -ldivsufsort -ldivsufsort64 -lraptor2 -lpinchesandcacti -l3edgeconnected -lsonlib -lcpp_progress_bar -lstructures -lbdsg -lxg -lsdsl -lhandlegraph -lgfaz_compress -lgfaz_core -lzstd $(shell $(PKG_CONFIG) --libs libfastahack) $(shell $(PKG_CONFIG) --libs htslib)
+ # We omit Cairo for now because its transitive dependencies can't be determined until after it's built. Set them lazily
+ LD_CAIRO_LIB_FLAGS = $(shell PKG_CONFIG_PATH=$(CWD)/$(LIB_DIR)/pkgconfig:$(PKG_CONFIG_PATH) pkg-config --libs --static cairo)
+ # We omit Boost Program Options for now; we find it in a platform-dependent way.
+@@ -402,7 +402,6 @@ GCSA2_DIR:=deps/gcsa2
+ GBWT_DIR:=deps/gbwt
+ GBWTGRAPH_DIR=deps/gbwtgraph
+ KFF_DIR=deps/kff-cpp-api
+-PROGRESS_BAR_DIR:=deps/progress_bar
+ GSSW_DIR:=deps/gssw
+ SPARSEPP_DIR:=deps/sparsepp
+ SHA1_DIR:=deps/sha1
+@@ -426,7 +425,6 @@ PIXMAN_DIR=deps/pixman
+ # Dependencies that go into libvg's archive
+ # These go in libvg but come from dependencies
+ DEP_OBJ =
+-DEP_OBJ += $(OBJ_DIR)/progress_bar.o
+ DEP_OBJ += $(OBJ_DIR)/sha1.o
+ DEP_SHARED_OBJ = $(patsubst $(OBJ_DIR)/%.o,$(SHARED_OBJ_DIR)/%.o,$(DEP_OBJ))
+ 
+@@ -472,7 +470,6 @@ endif
+ DEPS = $(LIB_DEPS)
+ DEPS += $(INC_DIR)/lru_cache.h
+ DEPS += $(INC_DIR)/sha1.hpp
+-DEPS += $(INC_DIR)/progress_bar.hpp
+ 
+ .PHONY: clean clean-tests get-deps deps lint test set-path objs static static-docker docs man version
+ 
+@@ -671,14 +668,6 @@ endif
+ $(INC_DIR)/BooPHF.h: $(BBHASH_DIR)/BooPHF.h
+ 	cp $(BBHASH_DIR)/BooPHF.h $(CWD)/$(INC_DIR)
+ 
+-$(INC_DIR)/progress_bar.hpp: $(PROGRESS_BAR_DIR)/progress_bar.hpp
+-	cp $(PROGRESS_BAR_DIR)/progress_bar.hpp $(CWD)/$(INC_DIR)
+-
+-$(OBJ_DIR)/progress_bar.o: $(PROGRESS_BAR_DIR)/progress_bar.cpp $(PROGRESS_BAR_DIR)/*.hpp
+-	$(CXX) $(INCLUDE_FLAGS) $(CXXFLAGS) -c -o $@ $<
+-$(SHARED_OBJ_DIR)/progress_bar.o: $(PROGRESS_BAR_DIR)/progress_bar.cpp $(PROGRESS_BAR_DIR)/*.hpp
+-	$(CXX) $(INCLUDE_FLAGS) $(CXXFLAGS) -fPIC -c -o $@ $<
+-
+ # We have this target to clean up the old Protobuf we used to have.
+ # We can remove it after we no longer care about building properly on a dirty
+ # build from vg versions that shipped Protobuf themselves.
+@@ -997,7 +986,6 @@ clean:
+ 	$(RM) -r $(OBJ_DIR)
+ 	$(RM) -r $(INC_DIR)
+ 	$(RM) -r share/
+-	cd $(DEP_DIR) && cd progress_bar && $(MAKE) clean
+ 	cd $(DEP_DIR) && cd sha1 && $(MAKE) clean
+ 	cd $(DEP_DIR) && cd sublinear-Li-Stephens && $(MAKE) clean
+ 


=====================================
debian/patches/use_packaged_gfaz.patch
=====================================
@@ -0,0 +1,97 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Use the Debian-packaged GFAz
+
+Link against the libgfaz static libraries and use the upstream header layout
+installed under /usr/include/gfaz instead of building the bundled copy from
+debian/missing-sources.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -74,7 +74,7 @@ DEPGEN_FLAGS := -MMD -MP
+ # even though that's not *always* safe. See
+ # <https://stackoverflow.com/a/11532197> and
+ # <https://github.com/protocolbuffers/protobuf/issues/12998>
+-INCLUDE_FLAGS :=-I/usr/include/xg -I/usr/include/sonLib $(shell $(PKG_CONFIG) --cflags libfastahack) -I$(CWD)/$(INC_DIR) -I$(CWD)/$(INC_DIR)/GFAz -I. -I$(CWD)/$(SRC_DIR) -I$(CWD)/$(UNITTEST_SRC_DIR) -I$(CWD)/$(UNITTEST_SUPPORT_SRC_DIR) -I$(CWD)/$(SUBCOMMAND_SRC_DIR) -I$(CWD)/$(INC_DIR)/dynamic $(shell $(PKG_CONFIG) --cflags cairo) $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS) $(PKG_CONFIG_STATIC_DEPS) $(PKG_CONFIG_HEADER_DEPS) | tr ' ' '\n' | awk '!x[$$0]++' | tr '\n' ' ')
++INCLUDE_FLAGS :=-I/usr/include/xg -I/usr/include/sonLib -I/usr/include/gfaz $(shell $(PKG_CONFIG) --cflags libfastahack) -I$(CWD)/$(INC_DIR) -I. -I$(CWD)/$(SRC_DIR) -I$(CWD)/$(UNITTEST_SRC_DIR) -I$(CWD)/$(UNITTEST_SUPPORT_SRC_DIR) -I$(CWD)/$(SUBCOMMAND_SRC_DIR) -I$(CWD)/$(INC_DIR)/dynamic $(shell $(PKG_CONFIG) --cflags cairo) $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS) $(PKG_CONFIG_STATIC_DEPS) $(PKG_CONFIG_HEADER_DEPS) | tr ' ' '\n' | awk '!x[$$0]++' | tr '\n' ' ')
+ 
+ # Define libraries to link vg against.
+ 
+@@ -420,7 +420,6 @@ IPS4O_DIR=deps/ips4o
+ BBHASH_DIR=deps/BBHash
+ MIO_DIR=deps/mio
+ ATOMIC_QUEUE_DIR=deps/atomic_queue
+-GFAz_DIR=deps/GFAz
+ CAIRO_DIR=deps/cairo
+ PIXMAN_DIR=deps/pixman
+ 
+@@ -437,8 +436,6 @@ DEP_SHARED_OBJ = $(patsubst $(OBJ_DIR)/%
+ # If you just pass them to ar it puts the library *file* in libvg where nothing can read it.
+ LIB_DEPS =
+ LIB_DEPS += $(LIB_DIR)/libsublinearLS.a
+-LIB_DEPS += $(LIB_DIR)/libgfaz_core.a
+-LIB_DEPS += $(LIB_DIR)/libgfaz_compress.a
+ 
+ # Only depend on these files for the final linking stage.	
+ # These libraries provide no headers to affect the vg build.	
+@@ -788,24 +785,6 @@ $(INC_DIR)/atomic_queue.h: $(ATOMIC_QUEU
+ 	cp -r $(ATOMIC_QUEUE_DIR)/include/atomic_queue/* $(CWD)/$(INC_DIR)/
+ 
+ 
+-
+-# GFAz is now built as two static libraries on a shared core:
+-#   libgfaz_core.a     - model/codec/serialization/utils (deserialize, Codec, ...)
+-#   libgfaz_compress.a - the compressor + gfa_write_utils helpers; links core
+-# Both are produced by a single cmake build; the core rule builds and copies both.
+-$(LIB_DIR)/libgfaz_compress.a: $(LIB_DIR)/libgfaz_core.a
+-
+-$(LIB_DIR)/libgfaz_core.a: $(GFAz_DIR)/CMakeLists.txt $(shell find $(GFAz_DIR)/src $(GFAz_DIR)/include -type f "(" -iname "*.cpp" -o -iname "*.hpp" ")" 2>/dev/null)
+-	rm -f $(CWD)/$(LIB_DIR)/libgfaz_core.a $(CWD)/$(LIB_DIR)/libgfaz_compress.a
+-	rm -Rf $(CWD)/$(INC_DIR)/GFAz
+-	rm -Rf $(GFAz_DIR)/build
+-	cd $(GFAz_DIR) && mkdir -p build && cd build && cmake -DCMAKE_C_COMPILER="$(CC)" -DCMAKE_CXX_COMPILER="$(CXX)" -DCMAKE_CXX_FLAGS="-fPIC $(CXXFLAGS) $(INCLUDE_FLAGS)" -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_CLI=OFF -DBUILD_BENCHMARKS=OFF -DBUILD_TESTS=OFF -DGFAZ_USE_SYSTEM_ZSTD=ON ..
+-	cd $(GFAz_DIR)/build && $(MAKE) $(FILTER) gfaz_core gfaz_compress
+-	cd $(GFAz_DIR)/build && cp libgfaz_core.a libgfaz_compress.a $(CWD)/$(LIB_DIR)/
+-	mkdir -p $(CWD)/$(INC_DIR)/GFAz
+-	cp -r $(GFAz_DIR)/include/* $(CWD)/$(INC_DIR)/GFAz/
+-
+-
+ $(INC_DIR)/mmmultiset.hpp: $(MMMULTIMAP_DIR)/src/mmmultiset.hpp $(INC_DIR)/mmmultimap.hpp
+ $(INC_DIR)/mmmultimap.hpp: $(MMMULTIMAP_DIR)/src/mmmultimap.hpp $(MMMULTIMAP_DIR)/src/mmmultiset.hpp $(INC_DIR)/mio/mmap.hpp $(INC_DIR)/atomic_queue.h
+ 	cp $(MMMULTIMAP_DIR)/src/mmmultimap.hpp $(MMMULTIMAP_DIR)/src/mmmultiset.hpp $(CWD)/$(INC_DIR)/
+--- a/src/algorithms/gfaz_to_handle.cpp
++++ b/src/algorithms/gfaz_to_handle.cpp
+@@ -2,7 +2,7 @@
+ 
+ #include "../path.hpp"
+ 
+-#include <GFAz/core/codec/serialization.hpp>
++#include <core/codec/serialization.hpp>
+ 
+ #include <algorithm>
+ #include <cstring>
+--- a/src/algorithms/gfaz_to_handle.hpp
++++ b/src/algorithms/gfaz_to_handle.hpp
+@@ -7,7 +7,7 @@
+  * Defines algorithms for copying data from GFAz files into handle graphs.
+  */
+ 
+-#include <GFAz/compress/io/gfa_decoder.hpp>
++#include <compress/io/gfa_decoder.hpp>
+ 
+ #include <iostream>
+ #include <string>
+--- a/src/io/register_loader_gfaz.cpp
++++ b/src/io/register_loader_gfaz.cpp
+@@ -4,7 +4,7 @@
+ 
+ #include "register_loader_gfaz.hpp"
+ 
+-#include <GFAz/core/codec/serialization.hpp>
++#include <core/codec/serialization.hpp>
+ #include <vg/io/registry.hpp>
+ 
+ #include "../algorithms/gfaz_to_handle.hpp"


=====================================
debian/patches/use_packaged_helper_libraries.patch
=====================================
@@ -0,0 +1,30 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Use the Debian-packaged header-only helper libraries
+
+The +ds tarball does not ship deps/.  Use the headers provided by the Debian
+packages for atomic-queue, BBHash, ips4o, mio, mmmulti, sparsepp and
+xxsds-dynamic instead of copying them out of bundled copies.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -474,16 +474,8 @@ endif
+ # common dependencies to build before all vg src files
+ DEPS = $(LIB_DEPS)
+ DEPS += $(INC_DIR)/lru_cache.h
+-DEPS += $(INC_DIR)/dynamic/dynamic.hpp
+-DEPS += $(INC_DIR)/sparsepp/spp.h
+ DEPS += $(INC_DIR)/sha1.hpp
+ DEPS += $(INC_DIR)/progress_bar.hpp
+-DEPS += $(INC_DIR)/dozeu/dozeu.h
+-DEPS += $(INC_DIR)/mmmultimap.hpp
+-DEPS += $(INC_DIR)/ips4o.hpp
+-DEPS += $(INC_DIR)/BooPHF.h
+-DEPS += $(INC_DIR)/mio/mmap.hpp
+-DEPS += $(INC_DIR)/atomic_queue.h
+ 
+ .PHONY: clean clean-tests get-deps deps lint test set-path objs static static-docker docs man version
+ 


=====================================
debian/patches/use_packaged_pinchesandcacti.patch
=====================================
@@ -0,0 +1,43 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Use the Debian-packaged pinchesAndCacti
+
+The Debian package installs its headers under /usr/include/pinchesAndCacti,
+not under /usr/include/sonLib, and libpinchesandcacti is linked from the
+Debian package instead of the bundled copy.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -436,7 +436,6 @@ DEP_SHARED_OBJ = $(patsubst $(OBJ_DIR)/%
+ # But that requires fancy ar scripting.
+ # If you just pass them to ar it puts the library *file* in libvg where nothing can read it.
+ LIB_DEPS =
+-LIB_DEPS += $(LIB_DIR)/libpinchesandcacti.a
+ LIB_DEPS += $(LIB_DIR)/libsublinearLS.a
+ LIB_DEPS += $(LIB_DIR)/libgfaz_core.a
+ LIB_DEPS += $(LIB_DIR)/libgfaz_compress.a
+--- a/src/cactus.hpp
++++ b/src/cactus.hpp
+@@ -16,7 +16,7 @@
+ 
+ extern "C" {
+ #include <sonLib/sonLib.h>
+-#include <sonLib/stCactusGraphs.h>
++#include <pinchesAndCacti/stCactusGraphs.h>
+ }
+ 
+ using namespace std;
+--- a/src/vg.cpp
++++ b/src/vg.cpp
+@@ -9,7 +9,7 @@
+ #include "augment.hpp"
+ #include "algorithms/prune.hpp"
+ #include <raptor2/raptor2.h>
+-#include <sonLib/stPinchGraphs.h>
++#include <pinchesAndCacti/stPinchGraphs.h>
+ 
+ #include <handlegraph/util.hpp>
+ 


=====================================
debian/patches/use_packaged_quicktree.patch
=====================================
@@ -0,0 +1,21 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Link the static libquicktree for the TreeREP symbols
+
+Debian's libsonlib leaves the TreeREP symbols (neighbour_joining_buildtree
+and friends) unresolved, so link -lquicktree explicitly for vg's tree code.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -81,7 +81,7 @@ INCLUDE_FLAGS :=-I/usr/include/xg -I/usr
+ # These need to come before library search paths from LDFLAGS or we won't
+ # prefer linking vg-installed dependencies over system ones.
+ LD_LIB_DIR_FLAGS := -L$(CWD)/$(LIB_DIR)
+-LD_LIB_FLAGS := -lvcflib -lwfa2 -ltabixpp -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -lkff -ldivsufsort -ldivsufsort64 -lraptor2 -lpinchesandcacti -l3edgeconnected -lsonlib -lcpp_progress_bar -lstructures -lbdsg -lxg -lsdsl -lhandlegraph -lgfaz_compress -lgfaz_core -lzstd $(shell $(PKG_CONFIG) --libs libfastahack) $(shell $(PKG_CONFIG) --libs htslib)
++LD_LIB_FLAGS := -lvcflib -lwfa2 -ltabixpp -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -lkff -ldivsufsort -ldivsufsort64 -lraptor2 -lpinchesandcacti -l3edgeconnected -lsonlib -lquicktree -lcpp_progress_bar -lstructures -lbdsg -lxg -lsdsl -lhandlegraph -lgfaz_compress -lgfaz_core -lzstd $(shell $(PKG_CONFIG) --libs libfastahack) $(shell $(PKG_CONFIG) --libs htslib)
+ # We omit Cairo for now because its transitive dependencies can't be determined until after it's built. Set them lazily
+ LD_CAIRO_LIB_FLAGS = $(shell PKG_CONFIG_PATH=$(CWD)/$(LIB_DIR)/pkgconfig:$(PKG_CONFIG_PATH) pkg-config --libs --static cairo)
+ # We omit Boost Program Options for now; we find it in a platform-dependent way.


=====================================
debian/patches/use_packaged_sonlib.patch
=====================================
@@ -0,0 +1,37 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Use the Debian-packaged sonLib
+
+The +ds tarball does not ship deps/.  Add /usr/include/sonLib to the
+include path and link against the Debian libsonlib instead of building the
+bundled copy.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -74,7 +74,7 @@ DEPGEN_FLAGS := -MMD -MP
+ # even though that's not *always* safe. See
+ # <https://stackoverflow.com/a/11532197> and
+ # <https://github.com/protocolbuffers/protobuf/issues/12998>
+-INCLUDE_FLAGS :=-I/usr/include/xg $(shell $(PKG_CONFIG) --cflags libfastahack) -I$(CWD)/$(INC_DIR) -I$(CWD)/$(INC_DIR)/GFAz -I. -I$(CWD)/$(SRC_DIR) -I$(CWD)/$(UNITTEST_SRC_DIR) -I$(CWD)/$(UNITTEST_SUPPORT_SRC_DIR) -I$(CWD)/$(SUBCOMMAND_SRC_DIR) -I$(CWD)/$(INC_DIR)/dynamic -I$(CWD)/$(INC_DIR)/cairo $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS) $(PKG_CONFIG_STATIC_DEPS) $(PKG_CONFIG_HEADER_DEPS) | tr ' ' '\n' | awk '!x[$$0]++' | tr '\n' ' ')
++INCLUDE_FLAGS :=-I/usr/include/xg -I/usr/include/sonLib $(shell $(PKG_CONFIG) --cflags libfastahack) -I$(CWD)/$(INC_DIR) -I$(CWD)/$(INC_DIR)/GFAz -I. -I$(CWD)/$(SRC_DIR) -I$(CWD)/$(UNITTEST_SRC_DIR) -I$(CWD)/$(UNITTEST_SUPPORT_SRC_DIR) -I$(CWD)/$(SUBCOMMAND_SRC_DIR) -I$(CWD)/$(INC_DIR)/dynamic -I$(CWD)/$(INC_DIR)/cairo $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS) $(PKG_CONFIG_STATIC_DEPS) $(PKG_CONFIG_HEADER_DEPS) | tr ' ' '\n' | awk '!x[$$0]++' | tr '\n' ' ')
+ 
+ # Define libraries to link vg against.
+ 
+@@ -436,7 +436,6 @@ DEP_SHARED_OBJ = $(patsubst $(OBJ_DIR)/%
+ # But that requires fancy ar scripting.
+ # If you just pass them to ar it puts the library *file* in libvg where nothing can read it.
+ LIB_DEPS =
+-LIB_DEPS += $(LIB_DIR)/libsonlib.a
+ LIB_DEPS += $(LIB_DIR)/libpinchesandcacti.a
+ LIB_DEPS += $(LIB_DIR)/libsublinearLS.a
+ LIB_DEPS += $(LIB_DIR)/libgfaz_core.a
+@@ -1032,6 +1031,5 @@ clean:
+ 	$(RM) -r share/
+ 	cd $(DEP_DIR) && cd progress_bar && $(MAKE) clean
+ 	cd $(DEP_DIR) && cd sha1 && $(MAKE) clean
+-	cd $(DEP_DIR) && cd sonLib && $(MAKE) clean
+ 	cd $(DEP_DIR) && cd sublinear-Li-Stephens && $(MAKE) clean
+ 


=====================================
debian/patches/use_packaged_xg.patch
=====================================
@@ -0,0 +1,257 @@
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Fri, 6 Nov 2026 12:00:00 +0100
+Subject: Reference the packaged libxg instead of the bundled xg.hpp
+
+The +ds tarball does not ship src/xg.hpp and src/xg.cpp; vg links the
+Debian-packaged libxg (libxg-dev) instead.  Add /usr/include/xg to the
+include path and include <xg.hpp> from there rather than the relative path
+that pointed at the bundled header.
+
+Forwarded: not-needed
+Assisted-By: deepseek-v4.1-flash-free
+---
+--- a/Makefile
++++ b/Makefile
+@@ -74,7 +74,7 @@ DEPGEN_FLAGS := -MMD -MP
+ # even though that's not *always* safe. See
+ # <https://stackoverflow.com/a/11532197> and
+ # <https://github.com/protocolbuffers/protobuf/issues/12998>
+-INCLUDE_FLAGS :=$(shell $(PKG_CONFIG) --cflags libfastahack) -I$(CWD)/$(INC_DIR) -I$(CWD)/$(INC_DIR)/GFAz -I. -I$(CWD)/$(SRC_DIR) -I$(CWD)/$(UNITTEST_SRC_DIR) -I$(CWD)/$(UNITTEST_SUPPORT_SRC_DIR) -I$(CWD)/$(SUBCOMMAND_SRC_DIR) -I$(CWD)/$(INC_DIR)/dynamic -I$(CWD)/$(INC_DIR)/cairo $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS) $(PKG_CONFIG_STATIC_DEPS) $(PKG_CONFIG_HEADER_DEPS) | tr ' ' '\n' | awk '!x[$$0]++' | tr '\n' ' ')
++INCLUDE_FLAGS :=-I/usr/include/xg $(shell $(PKG_CONFIG) --cflags libfastahack) -I$(CWD)/$(INC_DIR) -I$(CWD)/$(INC_DIR)/GFAz -I. -I$(CWD)/$(SRC_DIR) -I$(CWD)/$(UNITTEST_SRC_DIR) -I$(CWD)/$(UNITTEST_SUPPORT_SRC_DIR) -I$(CWD)/$(SUBCOMMAND_SRC_DIR) -I$(CWD)/$(INC_DIR)/dynamic -I$(CWD)/$(INC_DIR)/cairo $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS) $(PKG_CONFIG_STATIC_DEPS) $(PKG_CONFIG_HEADER_DEPS) | tr ' ' '\n' | awk '!x[$$0]++' | tr '\n' ' ')
+ 
+ # Define libraries to link vg against.
+ 
+@@ -439,7 +439,6 @@ LIB_DEPS =
+ LIB_DEPS += $(LIB_DIR)/libsonlib.a
+ LIB_DEPS += $(LIB_DIR)/libpinchesandcacti.a
+ LIB_DEPS += $(LIB_DIR)/libsublinearLS.a
+-LIB_DEPS += $(LIB_DIR)/libxg.a
+ LIB_DEPS += $(LIB_DIR)/libgfaz_core.a
+ LIB_DEPS += $(LIB_DIR)/libgfaz_compress.a
+ LIB_DEPS += $(LIB_DIR)/libcairo.a
+--- a/src/subcommand/annotate_main.cpp
++++ b/src/subcommand/annotate_main.cpp
+@@ -1,6 +1,6 @@
+ #include "subcommand.hpp"
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../utility.hpp"
+ #include "../mapper.hpp"
+ #include <vg/io/stream.hpp>
+--- a/src/subcommand/augment_main.cpp
++++ b/src/subcommand/augment_main.cpp
+@@ -22,7 +22,7 @@
+ 
+ #include "subcommand.hpp"
+ #include "../option.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../vg.hpp"
+ #include "../augment.hpp"
+ #include "../packer.hpp"
+--- a/src/subcommand/call_main.cpp
++++ b/src/subcommand/call_main.cpp
+@@ -19,7 +19,7 @@
+ #include "../vcf_genotyper.hpp"
+ #include "../vcf_output_caller.hpp"
+ #include "../integrated_snarl_finder.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../gbzgraph.hpp"
+ #include "../gbwtgraph_helper.hpp"
+ #include "../gref.hpp"
+--- a/src/subcommand/cluster_main.cpp
++++ b/src/subcommand/cluster_main.cpp
+@@ -18,7 +18,7 @@
+ #include "../zip_code_tree.hpp"
+ #include "../mapper.hpp"
+ #include "../annotation.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../minimizer_mapper.hpp"
+ #include "../index_registry.hpp"
+ #include <vg/io/vpkg.hpp>
+--- a/src/subcommand/concat_main.cpp
++++ b/src/subcommand/concat_main.cpp
+@@ -12,7 +12,7 @@
+ 
+ #include "subcommand.hpp"
+ #include "../option.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../vg.hpp"
+ #include <vg/io/stream.hpp>
+ #include <vg/io/vpkg.hpp>
+--- a/src/subcommand/describe_main.cpp
++++ b/src/subcommand/describe_main.cpp
+@@ -10,7 +10,7 @@
+ #include "subcommand.hpp"
+ 
+ #include "../recombinator.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../zip_code.hpp"
+ 
+ #include <gbwt/gbwt.h>
+--- a/src/subcommand/dotplot_main.cpp
++++ b/src/subcommand/dotplot_main.cpp
+@@ -13,7 +13,7 @@
+ #include "subcommand.hpp"
+ 
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include <vg/io/vpkg.hpp>
+ #include <bdsg/overlays/overlay_helper.hpp>
+ #include "../position.hpp"
+--- a/src/subcommand/filter_main.cpp
++++ b/src/subcommand/filter_main.cpp
+@@ -14,7 +14,7 @@
+ #include "subcommand.hpp"
+ 
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../readfilter.hpp"
+ #include <vg/io/vpkg.hpp>
+ #include <bdsg/overlays/overlay_helper.hpp>
+--- a/src/subcommand/inject_main.cpp
++++ b/src/subcommand/inject_main.cpp
+@@ -14,7 +14,7 @@
+ #include "../utility.hpp"
+ #include "../alignment.hpp"
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../hts_alignment_emitter.hpp"
+ #include <vg/io/stream.hpp>
+ #include <vg/io/vpkg.hpp>
+--- a/src/subcommand/map_main.cpp
++++ b/src/subcommand/map_main.cpp
+@@ -1,6 +1,6 @@
+ #include "subcommand.hpp"
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../utility.hpp"
+ #include "../mapper.hpp"
+ #include "../hts_alignment_emitter.hpp"
+--- a/src/subcommand/mask_main.cpp
++++ b/src/subcommand/mask_main.cpp
+@@ -1,7 +1,7 @@
+ #include "subcommand.hpp"
+ #include "../io/save_handle_graph.hpp"
+ #include "../handle.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../utility.hpp"
+ #include "../snarls.hpp"
+ #include "../masker.hpp"
+--- a/src/subcommand/pack_main.cpp
++++ b/src/subcommand/pack_main.cpp
+@@ -1,6 +1,6 @@
+ #include "subcommand.hpp"
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../utility.hpp"
+ #include "../packer.hpp"
+ #include "../gbwtgraph_helper.hpp"
+--- a/src/subcommand/paths_main.cpp
++++ b/src/subcommand/paths_main.cpp
+@@ -16,7 +16,7 @@
+ 
+ #include "../crash.hpp"
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../gbwt_helper.hpp"
+ #include "../traversal_clusters.hpp"
+ #include "../gref.hpp"
+--- a/src/subcommand/surject_main.cpp
++++ b/src/subcommand/surject_main.cpp
+@@ -18,7 +18,7 @@
+ #include <bdsg/overlays/overlay_helper.hpp>
+ 
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include <vg/io/stream.hpp>
+ #include <vg/io/vpkg.hpp>
+ #include "../utility.hpp"
+--- a/src/subcommand/viz_main.cpp
++++ b/src/subcommand/viz_main.cpp
+@@ -1,7 +1,7 @@
+ #include "subcommand.hpp"
+ #include "../utility.hpp"
+ #include "../viz.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include <vg/io/stream.hpp>
+ #include <vg/io/vpkg.hpp>
+ #include <bdsg/overlays/overlay_helper.hpp>
+--- a/src/unittest/alignment.cpp
++++ b/src/unittest/alignment.cpp
+@@ -11,7 +11,7 @@
+ #include <vg/vg.pb.h>
+ #include "../alignment.hpp"
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../handle.hpp"
+ #include "../annotation.hpp"
+ #include "catch.hpp"
+--- a/src/unittest/cluster.cpp
++++ b/src/unittest/cluster.cpp
+@@ -5,7 +5,7 @@
+ #include <set>
+ #include "vg/io/json2pb.h"
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "catch.hpp"
+ #include "../snarls.hpp"
+ #include "../cactus_snarl_finder.hpp"
+--- a/src/unittest/flow_sort_test.cpp
++++ b/src/unittest/flow_sort_test.cpp
+@@ -1,6 +1,6 @@
+ #include "catch.hpp"
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../flow_sort.hpp"
+ #include "../algorithms/gfa_to_handle.hpp"
+ 
+--- a/src/unittest/gfa.cpp
++++ b/src/unittest/gfa.cpp
+@@ -1,6 +1,6 @@
+ #include "catch.hpp"
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "../gfa.hpp"
+ #include "../algorithms/gfa_to_handle.hpp"
+ 
+--- a/src/unittest/sampler.cpp
++++ b/src/unittest/sampler.cpp
+@@ -9,7 +9,7 @@
+ #include "../io/json2graph.hpp"
+ #include <bdsg/hash_graph.hpp>
+ #include "../sampler.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include "catch.hpp"
+ 
+ namespace vg {
+--- a/src/unittest/vg_algorithms.cpp
++++ b/src/unittest/vg_algorithms.cpp
+@@ -23,7 +23,7 @@
+ #include "random_graph.hpp"
+ #include "randomness.hpp"
+ #include "../vg.hpp"
+-#include "../xg.hpp"
++#include <xg.hpp>
+ #include <bdsg/hash_graph.hpp>
+ #include "../io/json2graph.hpp"
+ 


=====================================
debian/rules
=====================================
@@ -21,30 +21,31 @@ I386_SIMDE=sse2 sse
 %:
 	dh $@
 
-override_dh_autoreconf:
-	dh_autoreconf --sourcedirectory=$(CURDIR)/deps/vowpal_wabbit
-
-
 override_dh_clean:
 	rm -Rf ./deps/DYNAMIC/build/CMakeFiles
 	dh_clean
 
 override_dh_auto_clean:
-	find $(CURDIR)/include/ -type f -a '!' -name vg_git_version.hpp -delete
+	find $(CURDIR)/include/ -type f -a '!' -name vg_git_version.hpp -delete 2>/dev/null || true
 	dh_auto_clean || true
+	rm -rf src/vg_environment_version.hpp
 
 override_dh_auto_build-arch:
 	mkdir -p $(CURDIR)/debian/help
-	find . -type d -name simde | xargs rm -Rf
 ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
 	mkdir -p $(prefix)
 	mkdir -p $(libexecdir)
+	# All variants (including -plain and the ssse3/sse3 benchmarks) are
+	# compiled at least at -msse4.1: dozeu.h and gssw.h use the compiler's own
+	# intrinsics on SSE4.1-capable x86, and without -msse4.1 they fall back to
+	# SIMDe native aliases, which collide with the SSE intrinsics GCC 16
+	# defines natively and break the build.
 	for SIMD in $(AMD64_SIMDE) ; do \
-		export CXXFLAGS="$(CXXFLAGS) -m$${SIMD}" && export CFLAGS="$(CFLAGS) -m$${SIMD}" && \
+		export CXXFLAGS="$(CXXFLAGS) -msse4.1 -m$${SIMD}" && export CFLAGS="$(CFLAGS) -msse4.1 -m$${SIMD}" && \
 		make clean ; \
 		dh_auto_build -- SFX=-$${SIMD} all test/build_graph bin/shuf ; \
 	done
-	CXXFLAGS="$(CXXFLAGS)" CFLAGS="$(CFLAGS)" dh_auto_build -- SFX=-plain all test/build_graph bin/shuf
+	CXXFLAGS="$(CXXFLAGS) -msse4.1" CFLAGS="$(CFLAGS) -msse4.1" dh_auto_build -- SFX=-plain all test/build_graph bin/shuf
 	cp bin/vg-plain debian/help/vg
 ifeq (i386,$(DEB_HOST_ARCH))
 	for SIMD in $(I386_SIMDE) ; do \



View it on GitLab: https://salsa.debian.org/med-team/vg/-/compare/b1d9dda0b3718bc6b26c3b16d1eb64bdfa875269...69f76a4dd652fd0492823bcd3695f8d7afd7bc30

-- 
View it on GitLab: https://salsa.debian.org/med-team/vg/-/compare/b1d9dda0b3718bc6b26c3b16d1eb64bdfa875269...69f76a4dd652fd0492823bcd3695f8d7afd7bc30
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261106/7f162476/attachment-0001.htm>


More information about the debian-med-commit mailing list