diff --git a/.github/workflows/testmac.yml b/.github/workflows/testmac.yml index fff05f3ba7a..af600dc249f 100644 --- a/.github/workflows/testmac.yml +++ b/.github/workflows/testmac.yml @@ -18,6 +18,14 @@ jobs: runs-on: macos-10.15 steps: + # The Homebrew Github ships as of 4/12/21 in their Mac 10.15 image uses Bintray for binaries, which is shutting down. + # They recommend updating Homebrew to the latest version which pulls binaries from Github Packages instead. + # See: https://github.com/Homebrew/discussions/discussions/691#discussioncomment-600559 + # Remove this step when Github starts shipping a sufficiently new Homebrew + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + - name: Use cache uses: actions/cache@v2 with: diff --git a/Makefile b/Makefile index f3e32f5ab5b..b135cddd054 100644 --- a/Makefile +++ b/Makefile @@ -525,7 +525,8 @@ $(LIB_DIR)/libdeflate.a: $(LIBDEFLATE_DIR)/*.h $(LIBDEFLATE_DIR)/lib/*.h $(LIBDE +. ./source_me.sh && cd $(LIBDEFLATE_DIR) && V=1 $(MAKE) $(FILTER) && cp libdeflate.a $(CWD)/$(LIB_DIR) && cp libdeflate.h $(CWD)/$(INC_DIR) # We build htslib after libdeflate so it can use libdeflate. -# We make sure to use the htslib that chips inside vcflib. +# We make sure to use the htslib that ships inside vcflib. +# We need to do some wizardry to get it to pick up the right build and target system types on modern autotools. # We have to do a full build in order to install, to get the pkg-config file so libvgio can link against it. # We also have to have the shared libdeflate or we will get complaints that the static one is not position independent. # If we need either the library or the pkg-config file (which we didn't used to ship), run the whole build. @@ -535,7 +536,9 @@ $(LIB_DIR)/libdeflate.a: $(LIBDEFLATE_DIR)/*.h $(LIBDEFLATE_DIR)/lib/*.h $(LIBDE # a system path, in case another htslib is installed on the system. Some HTSlib # headers look for the current HTSlib with <>. $(LIB_DIR)/libhts%a $(LIB_DIR)/pkgconfig/htslib%pc: $(LIB_DIR)/libdeflate.a $(LIB_DIR)/libdeflate.$(SHARED_SUFFIX) $(HTSLIB_DIR)/*.c $(HTSLIB_DIR)/*.h $(HTSLIB_DIR)/htslib/*.h $(HTSLIB_DIR)/cram/*.c $(HTSLIB_DIR)/cram/*.h - +. ./source_me.sh && cd $(HTSLIB_DIR) && rm -Rf $(CWD)/$(INC_DIR)/htslib $(CWD)/$(LIB_DIR)/libhts* && autoheader && autoconf && CFLAGS="-I$(CWD)/$(HTSLIB_DIR) -isystem $(CWD)/$(HTSLIB_DIR) -I$(CWD)/$(INC_DIR) $(CFLAGS)" LDFLAGS="-L$(CWD)/$(LIB_DIR) $(LD_UTIL_RPATH_FLAGS)" ./configure --with-libdeflate --disable-s3 --disable-gcs --disable-libcurl --disable-plugins --prefix=$(CWD) $(FILTER) && $(MAKE) clean && $(MAKE) $(FILTER) && $(MAKE) install && ls $(CWD)/$(INC_DIR)/htslib + +. ./source_me.sh && cd $(HTSLIB_DIR) && rm -Rf $(CWD)/$(INC_DIR)/htslib $(CWD)/$(LIB_DIR)/libhts* && autoreconf -i && autoheader && autoconf || true + +. ./source_me.sh && cd $(HTSLIB_DIR) && (./configure -n 2>&1 || true) | grep "build system type" | rev | cut -f1 -d' ' | rev >systype.txt + +. ./source_me.sh && cd $(HTSLIB_DIR) && CFLAGS="-I$(CWD)/$(HTSLIB_DIR) -isystem $(CWD)/$(HTSLIB_DIR) -I$(CWD)/$(INC_DIR) $(CFLAGS)" LDFLAGS="-L$(CWD)/$(LIB_DIR) $(LD_UTIL_RPATH_FLAGS)" ./configure --with-libdeflate --disable-s3 --disable-gcs --disable-libcurl --disable-plugins --prefix=$(CWD) --host=$$(cat systype.txt) $(FILTER) && $(MAKE) clean && $(MAKE) $(FILTER) && $(MAKE) install # When building vcflib, make sure to force it to use our libdeflate, since we wnt in and configured its htslib to use libdeflate. $(LIB_DIR)/libvcflib.a: $(LIB_DIR)/libhts.a $(VCFLIB_DIR)/src/*.cpp $(VCFLIB_DIR)/src/*.hpp $(VCFLIB_DIR)/intervaltree/*.cpp $(VCFLIB_DIR)/intervaltree/*.h $(VCFLIB_DIR)/tabixpp/*.cpp $(VCFLIB_DIR)/tabixpp/*.hpp