Skip to content

Commit

Permalink
ghostx: add aarch64/arm64 builds (#52967)
Browse files Browse the repository at this point in the history
* ghostx: add aarch64/arm64 builds

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* ghostx: Patch the Makefile to be able to use custom CC and CXX

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* Add '-D_LIBCPP_DISABLE_AVAILABILITY' for OSX

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* Add libgomp/llvm-openmp as host deps

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* Set C++ standard to 14

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* Try without libgomp/llvm-openmp

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* Re-add libgomp/llvm-openmp

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

---------

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
  • Loading branch information
martin-g authored Dec 23, 2024
1 parent a0ec37f commit 0ca83c0
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 6 deletions.
1 change: 0 additions & 1 deletion build-fail-blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ recipes/fastuniq
recipes/fgap
recipes/funcannot
recipes/genepender
recipes/ghostx
recipes/ls-gkm
recipes/mosaik
recipes/ngmerge
Expand Down
10 changes: 7 additions & 3 deletions recipes/ghostx/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env bash

set -xe

cd ./src/

make
mkdir -p $PREFIX/bin
CC="${CC}" CXX="${CXX}" CC_FLAGS="${CFLAGS}" make -j"${CPU_COUNT}"

cp ghostx $PREFIX/bin
mkdir -p $PREFIX/bin
install -m 755 ghostx $PREFIX/bin
39 changes: 39 additions & 0 deletions recipes/ghostx/ghostx-makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git i/src/Makefile w/src/Makefile
index 8844e0a..3248657 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,18 +69,18 @@ OBJS += $(CPP_SRC:%.cpp=%.o)
all:ghostx

ghostx: $(OBJS)
- $(LAST_CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
+ $(CXX) -std=c++14 -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)

.c.o:
$(CC) -c $(CC_FLAGS) $< -o $@ $(INCLUDES)

.cpp.o:
- $(CXX) -c $(CC_FLAGS) $< -o $@ $(INCLUDES)
+ $(CXX) -std=c++14 -c $(CC_FLAGS) $< -o $@ $(INCLUDES)



.PHONY: clean
clean:
- rm ghostx
rm -f *.o
rm -f *~
+ rm ghostx
13 changes: 11 additions & 2 deletions recipes/ghostx/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ package:
source:
url: http://www.bi.cs.titech.ac.jp/{{ name }}/releases/{{ name }}-{{ version }}.tar.gz
sha256: c2bd846e2d7c648931601578501db3aea89c4c5af8fa5f3fa79680c8fe0755bf
patches:
- ghostx-makefile.patch

build:
number: 1
number: 2
run_exports:
- {{ pin_subpackage(name, max_pin='x') }}

requirements:
build:
- make
- {{ compiler('c') }}
- {{ compiler('cxx') }}
run:
host:
- libgomp # [linux]
- llvm-openmp # [osx]

test:
commands:
Expand All @@ -30,6 +36,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:
Expand Down

0 comments on commit 0ca83c0

Please sign in to comment.