diff --git a/sra-tools/Makefile b/sra-tools/Makefile index 2449f926..224e6772 100644 --- a/sra-tools/Makefile +++ b/sra-tools/Makefile @@ -17,7 +17,8 @@ BUILD_DEPENDS= bash:shells/bash \ ${NONEXISTENT}:biology/ncbi-vdb:build LIB_DEPENDS= libxml2.so:textproc/libxml2 \ libhdf5.so:science/hdf5 \ - libmbedtls.so:security/mbedtls + libmbedtls.so:security/mbedtls \ + libepoll-shim.so:devel/libepoll-shim USE_GITHUB= yes GH_ACCOUNT= ncbi @@ -42,13 +43,16 @@ CONFIGURE_ARGS= --with-ngs-sdk-prefix=${LOCALBASE} \ MAKE_ARGS= CCNAME=${CC} CXXNAME=${CXX} PKGCFLAGS="${CFLAGS}" \ INST_ETCDIR=${STAGEDIR}${PREFIX}/etc +# Just for debugging: Remove if possible. +MAKE_JOBS_UNSAFE= yes + ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= NCBI-VDB requires SSE2 instructions BROKEN_i386= buggy output CFLAGS+= -I${WRKSRC}/interfaces/os/sun CXXFLAGS+= -I${WRKSRC}/interfaces/os/sun -LDFLAGS+= -lz -lexecinfo +LDFLAGS+= -lz BINARY_ALIAS= gcc=${CC} g++=${CXX} @@ -72,7 +76,7 @@ pre-configure: @${CP} ${NCBI_VDB_WRKSRC}/build/ld.bsd.*.sh ${WRKSRC}/build/ ${MKDIR} ${WRKSRC}/interfaces/override @${CP} ${NCBI_VDB_WRKSRC}/interfaces/os/sun/atomic32.h ${WRKSRC}/interfaces/override - @${CP} ${NCBI_VDB_WRKSRC}/interfaces/os/sun/byteswap.h ${WRKSRC}/interfaces/override + @${CP} ${FILESDIR}/byteswap.h ${WRKSRC}/interfaces/override @for f in ${NCBI_VDB_WRKSRC}/build/ld.linux.*.sh; do ${CP} -p $${f} $${f%linux*}bsd$${f#*linux}; done @${CP} -p ${NCBI_VDB_WRKSRC}/build/ld.linux.gcc.sh ${WRKSRC}/build/ld.bsd.clang.sh #@${MKDIR} ${WRKSRC}/interfaces/os/bsd diff --git a/sra-tools/files/byteswap.h b/sra-tools/files/byteswap.h new file mode 100644 index 00000000..ef07fe98 --- /dev/null +++ b/sra-tools/files/byteswap.h @@ -0,0 +1,40 @@ +/*=========================================================================== +* +* PUBLIC DOMAIN NOTICE +* National Center for Biotechnology Information +* +* This software/database is a "United States Government Work" under the +* terms of the United States Copyright Act. It was written as part of +* the author's official duties as a United States Government employee and +* thus cannot be copyrighted. This software/database is freely available +* to the public for use. The National Library of Medicine and the U.S. +* Government have not placed any restriction on its use or reproduction. +* +* Although all reasonable efforts have been taken to ensure the accuracy +* and reliability of the software and data, the NLM and the U.S. +* Government do not and cannot warrant the performance or results that +* may be obtained by using this software or data. The NLM and the U.S. +* Government disclaim all warranties, express or implied, including +* warranties of performance, merchantability or fitness for any particular +* purpose. +* +* Please cite the author in any work or product based on this material. +* +* =========================================================================== +* +*/ + +#ifndef _h_byteswap_ +#define _h_byteswap_ + +#include +#include + +/* N.B. Sun's BSWAP seems to be macro-based, + meaning that (x) will be evaluated multiple times */ + +#define bswap_16(x) bswap16 (x) +#define bswap_32(x) bswap32 (x) +#define bswap_64(x) bswap64 (x) + +#endif /* _h_byteswap_ */ diff --git a/sra-tools/files/patch-tools_driver-tool_Makefile b/sra-tools/files/patch-tools_driver-tool_Makefile new file mode 100644 index 00000000..a8555456 --- /dev/null +++ b/sra-tools/files/patch-tools_driver-tool_Makefile @@ -0,0 +1,17 @@ +--- tools/driver-tool/Makefile.orig 2021-03-15 18:25:25 UTC ++++ tools/driver-tool/Makefile +@@ -97,7 +97,13 @@ SRATOOLS_OBJ = \ + SRATOOLS_LIB = \ + -sncbi-vdb \ + -sjson \ +- -lm ++ -lepoll-shim \ ++ -lncbi-vdb \ ++ -lmbedtls \ ++ -lm \ ++ -lexecinfo \ ++ -lz \ ++ -lbz2 + + $(BINDIR)/sratools: $(SRATOOLS_OBJ) $(ILIBDIR)/libjson.$(LIBX) + $(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SRATOOLS_LIB) diff --git a/sra-tools/files/patch-tools_driver-tool_utf8proc_Makefile b/sra-tools/files/patch-tools_driver-tool_utf8proc_Makefile new file mode 100644 index 00000000..c5c82764 --- /dev/null +++ b/sra-tools/files/patch-tools_driver-tool_utf8proc_Makefile @@ -0,0 +1,11 @@ +--- tools/driver-tool/utf8proc/Makefile.orig 2021-04-29 14:50:48 UTC ++++ tools/driver-tool/utf8proc/Makefile +@@ -79,7 +79,7 @@ libutf8proc.a: utf8proc.o + + libutf8proc.so.$(MAJOR).$(MINOR).$(PATCH): utf8proc.o + $(CC) $(LDFLAGS) -shared -o $@ -Wl,-soname -Wl,libutf8proc.so.$(MAJOR) utf8proc.o +- chmod a-x $@ ++ # FIX .so build so this will work: chmod a-x $@ + + libutf8proc.so: libutf8proc.so.$(MAJOR).$(MINOR).$(PATCH) + ln -f -s libutf8proc.so.$(MAJOR).$(MINOR).$(PATCH) $@