Skip to content

Commit 34d1b63

Browse files
committed
Patch htslib 1.10 to fix build with autoconf 2.70+
details in: samtools/htslib#1198
1 parent 813d422 commit 34d1b63

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

libtiledbvcf/cmake/Modules/FindHTSlib_EP.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ if (NOT HTSLIB_FOUND)
8989
$(MAKE)
9090
INSTALL_COMMAND
9191
$(MAKE) install
92+
PATCH_COMMAND
93+
patch -N -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/cmake/patches/htslib-1.10-config.patch
9294
BUILD_IN_SOURCE TRUE
9395
LOG_DOWNLOAD TRUE
9496
LOG_CONFIGURE TRUE
@@ -114,4 +116,4 @@ endif()
114116
if (EP_HTSLIB_BUILT AND TARGET HTSlib::HTSlib)
115117
include(TileDBCommon)
116118
install_target_libs(HTSlib::HTSlib)
117-
endif()
119+
endif()
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From 6821fc8ed88706e9282b561e74dfa45dac4d74c8 Mon Sep 17 00:00:00 2001
2+
From: John Marshall <[email protected]>
3+
Date: Fri, 1 Jan 2021 10:37:22 +0000
4+
Subject: [PATCH] Don't set $host_alias as that confuses autoconf 2.70
5+
6+
Autoconf 2.70 is more careful about cross compilation, so with this
7+
version using AC_FUNC_MMAP implies AC_CANONICAL_HOST and hence computes
8+
$build/build_alias/host/host_alias/etc. Setting $host_alias ourselves
9+
interferes with that. Hat tip Matthias Klose (via debbug#978835).
10+
11+
As autoconf 2.70 implicitly uses AC_CANONICAL_HOST, it requires (and its
12+
autoreconf --install installs) config.guess and config.sub. Ignore those,
13+
and ignore install-sh as well for good measure.
14+
---
15+
diff --git a/configure.ac b/configure.ac
16+
index 9bd1642d7..f473c97e5 100644
17+
--- a/configure.ac
18+
+++ b/configure.ac
19+
@@ -137,9 +137,9 @@ AC_ARG_ENABLE([s3],
20+
[support Amazon AWS S3 URLs])],
21+
[], [enable_s3=check])
22+
23+
-test -n "$host_alias" || host_alias=unknown-`uname -s`
24+
-AC_MSG_CHECKING([shared library type for $host_alias])
25+
-case $host_alias in
26+
+basic_host=${host_alias:-unknown-`uname -s`}
27+
+AC_MSG_CHECKING([shared library type for $basic_host])
28+
+case $basic_host in
29+
*-cygwin* | *-CYGWIN*)
30+
host_result="Cygwin DLL"
31+
PLATFORM=CYGWIN

0 commit comments

Comments
 (0)