Skip to content

Commit

Permalink
Rebuild stringtie on osx
Browse files Browse the repository at this point in the history
  • Loading branch information
mencian committed Dec 13, 2024
1 parent 3f1de47 commit 9191c9b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
16 changes: 12 additions & 4 deletions recipes/stringtie/build.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
#!/bin/bash

mkdir -p $PREFIX/bin
ln -sf $PREFIX/lib/libz.so.1 $PREFIX/lib/libz.so

export C_INCLUDE_PATH=$PREFIX/include
export CPLUS_INCLUDE_PATH=$PREFIX/include
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib"
export LINKER="$CXX"
export CXXFLAGS="$CPPFLAGS"

make release CXX=$CXX
mkdir -p $PREFIX/bin
chmod 755 stringtie
mv stringtie $PREFIX/bin
cd SuperReads_RNA/global-1
autoreconf -if
./configure CC="${CC}" CXX="${CXX}" LDFLAGS="${LDFLAGS}"
cd ../../htslib
autoreconf -if
./configure CC="${CC}" CXX="${CXX}" LDFLAGS="${LDFLAGS}"
cd ../

make release CXX="${CXX}" LINKER="${CXX}" -j"${CPU_COUNT}"
install -v -m 0755 stringtie $PREFIX/bin

# Prepare prepDE
# This is equivalent to https://github.com/gpertea/stringtie/blob/master/prepDE.py
Expand Down
9 changes: 4 additions & 5 deletions recipes/stringtie/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ source:
- patch

build:
number: 0
# TODO currently fails to build on osx.
# Feel free to re-enable and debug.
skip: True # [osx]
number: 1
run_exports:
- {{ pin_subpackage("stringtie", max_pin="x") }}

Expand All @@ -25,10 +22,11 @@ requirements:
- make
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- zlib
host:
# curl is used to download prepDE.py
- htslib
- curl
- zlib
run:
- htslib
- python
Expand All @@ -50,6 +48,7 @@ about:
extra:
additional-platforms:
- linux-aarch64
- osx-arm64
identifiers:
- biotools:stringtie
- usegalaxy-eu:stringtie
Expand Down
19 changes: 17 additions & 2 deletions recipes/stringtie/patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/Makefile b/Makefile
index d7b179e..a54e396 100644
index d29c461..0eb9c6b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
Expand All @@ -9,6 +9,21 @@ index d7b179e..a54e396 100644
#--
LIBDEFLATE := ${HTSLIB}/xlibs/lib/libdeflate.a
LIBBZ2 := ${HTSLIB}/xlibs/lib/libbz2.a
@@ -8,12 +8,12 @@ LIBLZMA := ${HTSLIB}/xlibs/lib/liblzma.a
GDIR := ./gclib
#--

-INCDIRS := -I. -I${GDIR} -I${HTSLIB}
+INCDIRS := -I. -I${GDIR} -I${HTSLIB} -I${PREFIX}/include

CXX := $(if $(CXX),$(CXX),g++)

BASEFLAGS := -Wall -Wextra ${INCDIRS} -fsigned-char -D_FILE_OFFSET_BITS=64 \
--D_LARGEFILE_SOURCE -std=c++11 -fno-strict-aliasing -fno-exceptions -fno-rtti
+-D_LARGEFILE_SOURCE -std=c++14 -fno-strict-aliasing -fno-exceptions -fno-rtti
#for gcc 8+ add: -Wno-class-memaccess
GCCGTE5 := $(shell expr `${CXX} -dumpversion | cut -f1 -d.` \>= 5)
ifeq "$(GCCGTE5)" "1"
@@ -31,7 +31,7 @@ LDFLAGS := $(if $(LDFLAGS),$(LDFLAGS),-g)

# LDFLAGS += -L${BAM}
Expand All @@ -18,7 +33,7 @@ index d7b179e..a54e396 100644

ifneq (,$(filter %nothreads %prof %profile, $(MAKECMDGOALS)))
NOTHREADS=1
@@ -172,10 +172,7 @@ tablemaker.o : tablemaker.h rlink.h
@@ -170,10 +170,7 @@ tablemaker.o : tablemaker.h rlink.h
##${BAM}/libbam.a:
## cd ${BAM} && make lib

Expand Down

0 comments on commit 9191c9b

Please sign in to comment.