aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/htslib/bzip2-use-pkgconfig.diff
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/htslib/bzip2-use-pkgconfig.diff
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/htslib/bzip2-use-pkgconfig.diff')
-rw-r--r--vcpkg/ports/htslib/bzip2-use-pkgconfig.diff31
1 files changed, 31 insertions, 0 deletions
diff --git a/vcpkg/ports/htslib/bzip2-use-pkgconfig.diff b/vcpkg/ports/htslib/bzip2-use-pkgconfig.diff
new file mode 100644
index 0000000..34d7bc8
--- /dev/null
+++ b/vcpkg/ports/htslib/bzip2-use-pkgconfig.diff
@@ -0,0 +1,31 @@
+diff --git a/configure.ac b/configure.ac
+index 593a664..5fcca0d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -412,8 +412,11 @@ fi],
+
+ if test "$enable_bz2" != no; then
+ bz2_devel=ok
+- AC_CHECK_HEADER([bzlib.h], [], [bz2_devel=missing], [;])
+- AC_CHECK_LIB([bz2], [BZ2_bzBuffToBuffCompress], [], [bz2_devel=missing])
++ PKG_CHECK_MODULES([BZ2_PKG], [bzip2], [
++ AC_DEFINE([HAVE_LIBBZ2], 1, [Define if libbzip2 is available.])
++ LIBS="$LIBS $BZ2_PKG_LIBS"
++ CFLAGS="$CFLAGS $BZ2_PKG_CFLAGS"
++ ], [bz2_devel=missing])
+ if test $bz2_devel != ok; then
+ MSG_ERROR([libbzip2 development files not found
+
+@@ -430,12 +433,7 @@ produced elsewhere unreadable) or resolve this error to build HTSlib.])
+ fi
+ dnl Unfortunately the 'bzip2' package-cfg module is not standard.
+ dnl Redhat/Fedora has it; Debian/Ubuntu does not.
+- if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists bzip2; then
+ pc_requires="$pc_requires bzip2"
+- else
+- private_LIBS="$private_LIBS -lbz2"
+- fi
+- static_LIBS="$static_LIBS -lbz2"
+ fi
+
+ if test "$enable_lzma" != no; then