diff --git a/recipes/rdeval/build.sh b/recipes/rdeval/build.sh new file mode 100644 index 0000000000000..0082bc9545c6a --- /dev/null +++ b/recipes/rdeval/build.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o xtrace + +cd "$SRC_DIR" + +export CXXFLAGS="$CXXFLAGS -O3 -I$PREFIX/include" +export LDFLAGS="$LDFLAGS -L$PREFIX/lib" + +make -j"${CPU_COUNT}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS} -Wno-unused-command-line-argument" LDFLAGS="${LDFLAGS}" +install -d "$PREFIX/bin" +install -v -m 0755 build/bin/rdeval "$PREFIX/bin/" diff --git a/recipes/rdeval/foo.patch b/recipes/rdeval/foo.patch new file mode 100644 index 0000000000000..417701560725a --- /dev/null +++ b/recipes/rdeval/foo.patch @@ -0,0 +1,38 @@ +diff --git a/Makefile b/Makefile +index 5823f28..6f4a60f 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,5 @@ +-CXX ?= g++ +-INCLUDE_DIR = -I./include -I./gfalibs/include ++CXX ?= ${CXX} ++INCLUDE_DIR = -I${PREFIX}/include -I./include -I./gfalibs/include + WARNINGS = -Wall -Wextra + + CXXFLAGS = -g -std=gnu++14 -O3 $(INCLUDE_DIR) $(WARNINGS) +@@ -12,8 +12,8 @@ SOURCE = src + INCLUDE = include + BINDIR := $(BUILD)/.o + +-LDFLAGS := -pthread +-LIBS = -lz ++LDFLAGS := -pthread -L${PREFIX}/lib ++LIBS := -lz -lpthread + + OBJS := main input reads + BINS := $(addprefix $(BINDIR)/, $(OBJS)) +@@ -22,12 +22,12 @@ BINS := $(addprefix $(BINDIR)/, $(OBJS)) + GFALIBS_DIR := $(CURDIR)/gfalibs + + head: $(BINS) gfalibs | $(BUILD) +- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(BUILD)/$(TARGET) $(BINDIR)/* $(GFALIBS_DIR)/*.o $(LIBS) ++ $(CXX) $(CXXFLAGS) $(INCLUDE_DIR) $(LDFLAGS) -o $(BUILD)/$(TARGET) $(BINDIR)/* $(GFALIBS_DIR)/*.o $(LIBS) + + all: head validate regenerate + + $(BINDIR)%: $(SOURCE)/%.cpp $(INCLUDE)/%.h | $(BINDIR) +- $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(SOURCE)/$(notdir $@).cpp -o $@ ++ $(CXX) $(CXXFLAGS) $(INCLUDE_DIR) $(LDFLAGS) -c $(SOURCE)/$(notdir $@).cpp -o $@ $(LIBS) + + .PHONY: gfalibs + gfalibs: diff --git a/recipes/rdeval/gfalibs.patch b/recipes/rdeval/gfalibs.patch new file mode 100644 index 0000000000000..e6cc8439bf6c2 --- /dev/null +++ b/recipes/rdeval/gfalibs.patch @@ -0,0 +1,30 @@ +diff --git a/gfalibs/Makefile b/gfalibs/Makefile +index de9ab9b..90a703c 100644 +--- a/gfalibs/Makefile ++++ b/gfalibs/Makefile +@@ -1,5 +1,5 @@ +-CXX = g++ +-INCLUDE_DIR = -I./include ++CXX = $(CXX) ++INCLUDE_DIR = -I${PREFIX}/include -I./include -I./include/parallel-hashmap + WARNINGS = -Wall -Wextra + + CXXFLAGS = -g -std=gnu++14 -O3 $(INCLUDE_DIR) $(WARNINGS) +@@ -8,7 +8,7 @@ TARGET = gfalibs + BUILD = build/bin + SOURCE = src + INCLUDE = include +-LDFLAGS := ++LDFLAGS := -L${PREFIX}/lib -pthread + + SOURCES = $(addsuffix .o, input-filters input-gfa input-agp gfa gfa-lines log stream-obj uid-generator struct output memory) + +@@ -16,7 +16,7 @@ all: $(SOURCES) + @ + + %.o: $(SOURCE)/%.cpp $(INCLUDE)/%.h +- $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(SOURCE)/$(basename $@).cpp -o $@ ++ $(CXX) $(CXXFLAGS) $(INCLUDE_DIR) $(LDFLAGS) -c $(SOURCE)/$(basename $@).cpp -o $@ -lz -lpthread + + clean: + $(RM) *.o diff --git a/recipes/rdeval/meta.yaml b/recipes/rdeval/meta.yaml new file mode 100644 index 0000000000000..ce1571a5436bd --- /dev/null +++ b/recipes/rdeval/meta.yaml @@ -0,0 +1,45 @@ +{% set name = "rdeval" %} +{% set version = "0.0.2" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://github.com/vgl-hub/{{ name }}/releases/download/v{{ version }}/{{ name }}.v{{ version }}-with_submodules.zip + sha256: 56c2f4d7d2c22b27d1b380dc41b81cc77a2d97c792a69b9360bed9e0027bac4d + patches: + - zlib.patch + - foo.patch + - gfalibs.patch + +build: + number: 0 + run_exports: + - {{ pin_subpackage(name|lower, max_pin="x.x") }} + +requirements: + build: + - {{ compiler('cxx') }} + - make + host: + - pthread-stubs + - zlib + +test: + commands: + - rdeval --help + +about: + home: https://github.com/vgl-hub/{{ name }} + summary: A general purpose, multithreaded read analysis and manipulation tool. + license: MIT + license_family: MIT + license_file: LICENSE + dev_url: https://github.com/vgl-hub/{{ name }} + doc_url: https://github.com/vgl-hub/rdeval/blob/v{{ version }}/README.md + +extra: + additional-platforms: + - linux-aarch64 + - osx-arm64 diff --git a/recipes/rdeval/zlib.patch b/recipes/rdeval/zlib.patch new file mode 100644 index 0000000000000..d1e9639bb43c4 --- /dev/null +++ b/recipes/rdeval/zlib.patch @@ -0,0 +1,52 @@ +diff --git a/gfalibs/include/output.h b/gfalibs/include/output.h +index aabbec0..20f0dc1 100644 +--- a/gfalibs/include/output.h ++++ b/gfalibs/include/output.h +@@ -12,7 +12,7 @@ + #include "gfa-lines.h" + #include "gfa.h" + +-#include "zlib.h" ++#include + #include "zstream/zstream_common.hpp" + #include "zstream/ozstream.hpp" + #include "zstream/ozstream_impl.hpp" +diff --git a/gfalibs/include/stream-obj.h b/gfalibs/include/stream-obj.h +index 1faa4df..8e28bf6 100644 +--- a/gfalibs/include/stream-obj.h ++++ b/gfalibs/include/stream-obj.h +@@ -2,7 +2,7 @@ + #define STREAM_OBJ_H + + #include +-#include "zlib.h" ++#include + + class membuf : public std::streambuf { + +diff --git a/gfalibs/src/stream-obj.cpp b/gfalibs/src/stream-obj.cpp +index e9694ee..c6eca26 100644 +--- a/gfalibs/src/stream-obj.cpp ++++ b/gfalibs/src/stream-obj.cpp +@@ -5,7 +5,7 @@ + + #include "bed.h" + #include "struct.h" +-#include "zlib.h" ++#include + #include "global.h" + #include "log.h" + #include "threadpool.h" +diff --git a/src/reads.cpp b/src/reads.cpp +index 866f49b..ac714cf 100644 +--- a/src/reads.cpp ++++ b/src/reads.cpp +@@ -14,7 +14,7 @@ + #include "functions.h" // global functions + #include "stream-obj.h" + +-#include "zlib.h" ++#include + #include "zstream/zstream_common.hpp" + #include "zstream/ozstream.hpp" + #include "zstream/ozstream_impl.hpp"