samtools / htslib

C library for high-throughput sequencing data formats
Other
803 stars 446 forks source link

Support building with htscodecs not in a submodule. #1750

Closed teo-tsirpanis closed 7 months ago

teo-tsirpanis commented 7 months ago

This PR changes the generation logic of htscodecs/htscodecs/version.h in the Makefile to run git describe only if htscodecs is a submodule, otherwise the version will be extracted exclusively from htscodecs/configure.ac.

This upstreams a patch to build htslib with vcpkg.

daviesrob commented 7 months ago

This is incorrect. If the htscodecs/.git directory is not present, $vers is not set and whatever value is used will not be the correct version number for htscodecs.

Having found your proposed patch, it looks like you're trying to build the package in a way we do not support. You should either:

  1. Use a git checkout with htscodecs as a submodule
  2. Use one of our release tarballs, which come with a pre-made htscodecs/htscodecs/version.h file
  3. Make htscodecs a dependency of htslib in the package manager, build and install it separately, and tell htslib where to find it when running ./configure.

Number 3 appears to be recommended by vcpkg.

Your patch also has the wrong homepage for HTSlib, and the wrong license. Out of interest, who would be maintaining this port? Conda has a bot that keeps HTSlib up to date, but I don't see anything similar for vcpkg.

teo-tsirpanis commented 7 months ago

Thanks for the feedback, I will try moving htscodecs to a separate port. My port is still WIP and was originally copied from another one, hence the wrong values which I fixed, thanks for noticing.

Out of interest, who would be maintaining this port?

Vcpkg ports are mostly updated by those that need them updated. I might subscribe to new releases of htslib or htscodecs for some time after the port gets published.