From b6a6463ce62d5fe09d1f0b0d695c553072fca82f Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Mon, 23 Dec 2024 14:42:06 +0200 Subject: [PATCH 1/7] ghostx: add aarch64/arm64 builds Signed-off-by: Martin Tzvetanov Grigorov --- build-fail-blacklist | 1 - recipes/ghostx/build.sh | 10 +++++++--- recipes/ghostx/meta.yaml | 7 ++++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/build-fail-blacklist b/build-fail-blacklist index c669f377a6459..e3b1034c69b4f 100644 --- a/build-fail-blacklist +++ b/build-fail-blacklist @@ -607,7 +607,6 @@ recipes/fastuniq recipes/fgap recipes/funcannot recipes/genepender -recipes/ghostx recipes/ls-gkm recipes/mosaik recipes/ngmerge diff --git a/recipes/ghostx/build.sh b/recipes/ghostx/build.sh index 2c7bc97bdc3af..0686d75f5d9f7 100644 --- a/recipes/ghostx/build.sh +++ b/recipes/ghostx/build.sh @@ -1,6 +1,10 @@ +#!/usr/bin/env bash + +set -xe + cd ./src/ -make -mkdir -p $PREFIX/bin +make -j"${CPU_COUNT}" -cp ghostx $PREFIX/bin +mkdir -p $PREFIX/bin +install -m 755 ghostx $PREFIX/bin diff --git a/recipes/ghostx/meta.yaml b/recipes/ghostx/meta.yaml index 960a749842cc3..3da36725fce77 100644 --- a/recipes/ghostx/meta.yaml +++ b/recipes/ghostx/meta.yaml @@ -10,7 +10,9 @@ source: sha256: c2bd846e2d7c648931601578501db3aea89c4c5af8fa5f3fa79680c8fe0755bf build: - number: 1 + number: 2 + run_exports: + - {{ pin_subpackage(name, max_pin='x') }} requirements: build: @@ -30,6 +32,9 @@ about: summary: "GHOSTX is a homology search tool which can detect remote homologues like BLAST and is about 100 times more efficient than BLAST by using suffix arrays. GHOSTX outputs search results in the format similar to BLAST-tabular format." extra: + additional-platforms: + - linux-aarch64 + - osx-arm64 recipe-maintainers: - tomkinsc identifiers: From f3f7a3992f2431aece8fdddeea9327dc5611b0f4 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Mon, 23 Dec 2024 15:14:32 +0200 Subject: [PATCH 2/7] ghostx: Patch the Makefile to be able to use custom CC and CXX Signed-off-by: Martin Tzvetanov Grigorov --- recipes/ghostx/build.sh | 2 +- recipes/ghostx/ghostx-makefile.patch | 34 ++++++++++++++++++++++++++++ recipes/ghostx/meta.yaml | 2 ++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 recipes/ghostx/ghostx-makefile.patch diff --git a/recipes/ghostx/build.sh b/recipes/ghostx/build.sh index 0686d75f5d9f7..9027e882edf0c 100644 --- a/recipes/ghostx/build.sh +++ b/recipes/ghostx/build.sh @@ -4,7 +4,7 @@ set -xe cd ./src/ -make -j"${CPU_COUNT}" +CC="${CC}" CXX="${CXX}" CC_FLAGS="${CFLAGS}" make -j"${CPU_COUNT}" mkdir -p $PREFIX/bin install -m 755 ghostx $PREFIX/bin diff --git a/recipes/ghostx/ghostx-makefile.patch b/recipes/ghostx/ghostx-makefile.patch new file mode 100644 index 0000000000000..a75d7310358c5 --- /dev/null +++ b/recipes/ghostx/ghostx-makefile.patch @@ -0,0 +1,34 @@ +diff --git i/src/Makefile w/src/Makefile +index 8844e0a..93e4701 100644 +--- i/src/Makefile ++++ w/src/Makefile +@@ -1,9 +1,9 @@ + LAST_CC=g++ +-CC=gcc +-CXX=g++ ++CC?=gcc ++CXX?=g++ + COMMON_FLAGS=-Wall -Wextra -pedantic -fopenmp -O3 + INCLUDES = -I ../ext/boost +-CC_FLAGS=${COMMON_FLAGS} ++CC_FLAGS?=${COMMON_FLAGS} + LDLIBS =-lm -fopenmp + + ifeq ($(PROFILE), Yes) +@@ -69,7 +69,7 @@ OBJS += $(CPP_SRC:%.cpp=%.o) + all:ghostx + + ghostx: $(OBJS) +- $(LAST_CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) ++ $(CXX) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) + + .c.o: + $(CC) -c $(CC_FLAGS) $< -o $@ $(INCLUDES) +@@ -81,6 +81,6 @@ ghostx: $(OBJS) + + .PHONY: clean + clean: +- rm ghostx + rm -f *.o + rm -f *~ ++ rm ghostx diff --git a/recipes/ghostx/meta.yaml b/recipes/ghostx/meta.yaml index 3da36725fce77..01271599f0a4b 100644 --- a/recipes/ghostx/meta.yaml +++ b/recipes/ghostx/meta.yaml @@ -8,6 +8,8 @@ package: source: url: http://www.bi.cs.titech.ac.jp/{{ name }}/releases/{{ name }}-{{ version }}.tar.gz sha256: c2bd846e2d7c648931601578501db3aea89c4c5af8fa5f3fa79680c8fe0755bf + patches: + - ghostx-makefile.patch build: number: 2 From c09cb95f8ca97fcb8a7e133588cd2e38fba7dabb Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Mon, 23 Dec 2024 15:46:10 +0200 Subject: [PATCH 3/7] Add '-D_LIBCPP_DISABLE_AVAILABILITY' for OSX Signed-off-by: Martin Tzvetanov Grigorov --- recipes/ghostx/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ghostx/build.sh b/recipes/ghostx/build.sh index 9027e882edf0c..9d2dcef4371c9 100644 --- a/recipes/ghostx/build.sh +++ b/recipes/ghostx/build.sh @@ -4,7 +4,7 @@ set -xe cd ./src/ -CC="${CC}" CXX="${CXX}" CC_FLAGS="${CFLAGS}" make -j"${CPU_COUNT}" +CC="${CC}" CXX="${CXX}" CC_FLAGS="${CFLAGS} -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" make -j"${CPU_COUNT}" mkdir -p $PREFIX/bin install -m 755 ghostx $PREFIX/bin From 7ad9b36297b93e01078da15e8386038bb3c6c2ac Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Mon, 23 Dec 2024 16:19:20 +0200 Subject: [PATCH 4/7] Add libgomp/llvm-openmp as host deps Signed-off-by: Martin Tzvetanov Grigorov --- recipes/ghostx/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/ghostx/meta.yaml b/recipes/ghostx/meta.yaml index 01271599f0a4b..205ada602fb76 100644 --- a/recipes/ghostx/meta.yaml +++ b/recipes/ghostx/meta.yaml @@ -21,6 +21,9 @@ requirements: - make - {{ compiler('c') }} - {{ compiler('cxx') }} + host: + - libgomp # [linux] + - llvm-openmp # [osx] run: test: From af1eef16c07c535ebd4e3b7f4f53f96fb6cffc2d Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Mon, 23 Dec 2024 18:21:19 +0200 Subject: [PATCH 5/7] Set C++ standard to 14 Signed-off-by: Martin Tzvetanov Grigorov --- recipes/ghostx/build.sh | 2 +- recipes/ghostx/ghostx-makefile.patch | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/recipes/ghostx/build.sh b/recipes/ghostx/build.sh index 9d2dcef4371c9..9027e882edf0c 100644 --- a/recipes/ghostx/build.sh +++ b/recipes/ghostx/build.sh @@ -4,7 +4,7 @@ set -xe cd ./src/ -CC="${CC}" CXX="${CXX}" CC_FLAGS="${CFLAGS} -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" make -j"${CPU_COUNT}" +CC="${CC}" CXX="${CXX}" CC_FLAGS="${CFLAGS}" make -j"${CPU_COUNT}" mkdir -p $PREFIX/bin install -m 755 ghostx $PREFIX/bin diff --git a/recipes/ghostx/ghostx-makefile.patch b/recipes/ghostx/ghostx-makefile.patch index a75d7310358c5..459c6f410a457 100644 --- a/recipes/ghostx/ghostx-makefile.patch +++ b/recipes/ghostx/ghostx-makefile.patch @@ -1,5 +1,5 @@ diff --git i/src/Makefile w/src/Makefile -index 8844e0a..93e4701 100644 +index 8844e0a..3248657 100644 --- i/src/Makefile +++ w/src/Makefile @@ -1,9 +1,9 @@ @@ -15,16 +15,21 @@ index 8844e0a..93e4701 100644 LDLIBS =-lm -fopenmp ifeq ($(PROFILE), Yes) -@@ -69,7 +69,7 @@ OBJS += $(CPP_SRC:%.cpp=%.o) +@@ -69,18 +69,18 @@ OBJS += $(CPP_SRC:%.cpp=%.o) all:ghostx ghostx: $(OBJS) - $(LAST_CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) -+ $(CXX) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) ++ $(CXX) -std=c++14 -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) .c.o: $(CC) -c $(CC_FLAGS) $< -o $@ $(INCLUDES) -@@ -81,6 +81,6 @@ ghostx: $(OBJS) + + .cpp.o: +- $(CXX) -c $(CC_FLAGS) $< -o $@ $(INCLUDES) ++ $(CXX) -std=c++14 -c $(CC_FLAGS) $< -o $@ $(INCLUDES) + + .PHONY: clean clean: From 589e7c728d2303964f1e0629bd9df08c8ea266f3 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Mon, 23 Dec 2024 18:46:54 +0200 Subject: [PATCH 6/7] Try without libgomp/llvm-openmp Signed-off-by: Martin Tzvetanov Grigorov --- recipes/ghostx/meta.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/ghostx/meta.yaml b/recipes/ghostx/meta.yaml index 205ada602fb76..ef57660a3609f 100644 --- a/recipes/ghostx/meta.yaml +++ b/recipes/ghostx/meta.yaml @@ -21,10 +21,6 @@ requirements: - make - {{ compiler('c') }} - {{ compiler('cxx') }} - host: - - libgomp # [linux] - - llvm-openmp # [osx] - run: test: commands: From acc7cf6a6cbb2d466a2128d9a2a79c6e00064b27 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Mon, 23 Dec 2024 18:53:21 +0200 Subject: [PATCH 7/7] Re-add libgomp/llvm-openmp Signed-off-by: Martin Tzvetanov Grigorov --- recipes/ghostx/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/ghostx/meta.yaml b/recipes/ghostx/meta.yaml index ef57660a3609f..076edf882c2ec 100644 --- a/recipes/ghostx/meta.yaml +++ b/recipes/ghostx/meta.yaml @@ -21,6 +21,9 @@ requirements: - make - {{ compiler('c') }} - {{ compiler('cxx') }} + host: + - libgomp # [linux] + - llvm-openmp # [osx] test: commands: