biology/sra-tools: Update to 3.0.6
Major code and build system rework since 2.11 Now supports aarch64, unblocking rna-seq and atac-seq metaports Changes: https://github.com/ncbi/sra-tools/commits/master Reported by: portscout
This commit is contained in:
parent
5b16ca04f6
commit
0f2f80ca38
|
@ -1,109 +1,67 @@
|
|||
PORTNAME= sra-tools
|
||||
DISTVERSION= 2.11.0
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= biology
|
||||
DISTVERSION= 3.0.6
|
||||
CATEGORIES= biology java
|
||||
|
||||
MAINTAINER= jwb@FreeBSD.org
|
||||
COMMENT= NCBI's toolkit for handling data in INSDC Sequence Read Archives
|
||||
WWW= https://github.com/ncbi/sra-tools/wiki
|
||||
WWW= https://github.com/ncbi/sra-tools
|
||||
|
||||
LICENSE= PD LGPL21+
|
||||
LICENSE_COMB= multi
|
||||
LICENSE_FILE_PD= ${WRKSRC}/LICENSE
|
||||
LICENSE_DISTFILES_LGPL21+ =
|
||||
|
||||
ONLY_FOR_ARCHS= amd64
|
||||
ONLY_FOR_ARCHS_REASON= NCBI-VDB requires SSE2 instructions, no 32-bit support
|
||||
# Untested on other platforms, aarch64 support was recently added upstream
|
||||
ONLY_FOR_ARCHS= aarch64 amd64
|
||||
ONLY_FOR_ARCHS_REASON= Upstream explicitly supports specific platforms
|
||||
|
||||
BUILD_DEPENDS= bash:shells/bash \
|
||||
${LOCALBASE}/lib/libngs-c++.a:biology/ngs-sdk
|
||||
BUILD_DEPENDS= bash:shells/bash
|
||||
LIB_DEPENDS= libxml2.so:textproc/libxml2 \
|
||||
libhdf5.so:science/hdf5 \
|
||||
libepoll-shim.so:devel/libepoll-shim
|
||||
libepoll-shim.so:devel/libepoll-shim \
|
||||
libzstd.so:archivers/zstd
|
||||
|
||||
USES= compiler:c11 gmake localbase:ldflags perl5 shebangfix
|
||||
USE_PERL5= build
|
||||
USES= bison cmake shebangfix
|
||||
USE_GITHUB= yes
|
||||
USE_LDCONFIG= ${PREFIX}/lib64
|
||||
USE_JAVA= yes
|
||||
|
||||
SHEBANG_GLOB= *.sh *.pl
|
||||
# Builds with earlier versions, but ngs-doc plist differs if jdk17 is present
|
||||
JAVA_VERSION= 17+
|
||||
|
||||
OPTIONS_DEFINE= EXAMPLES
|
||||
|
||||
SHEBANG_GLOB= *.sh
|
||||
GH_ACCOUNT= ncbi
|
||||
GH_TUPLE+= ncbi:ngs:${DISTVERSION}:ngs/ngs # ported as biology/ngs-sdk
|
||||
GH_TUPLE+= ncbi:ncbi-vdb:${DISTVERSION}:vdb/ncbi-vdb
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --with-ngs-sdk-prefix=${LOCALBASE} \
|
||||
--with-ncbi-vdb-sources=${NCBI_VDB_WRKSRC} \
|
||||
--with-xml2-prefix=${LOCALBASE} \
|
||||
--with-hdf5-prefix=${LOCALBASE} \
|
||||
CC="${CC}" CXX="${CXX}" TOOLS="${CHOSEN_COMPILER_TYPE}" \
|
||||
--with-ncbi-vdb-build=${NCBI_VDB_WRKSRC}/amd64-portbld-freebsd$$(${FREEBSD_RELEASE})
|
||||
MAKE_ARGS= CCNAME=${CC} CXXNAME=${CXX} PKGCFLAGS="${CFLAGS}" \
|
||||
INST_ETCDIR=${STAGEDIR}${PREFIX}/etc
|
||||
WITH_DEBUG= yes
|
||||
CMAKE_ARGS+= -DVDB_LIBDIR:STRING=${WRKSRC}/ncbi-vdb/build/lib
|
||||
|
||||
NCBI_VDB_WRKSRC= ${WRKSRC}/ncbi-vdb
|
||||
NCBI_VDB_FILESDIR= ${FILESDIR}
|
||||
FREEBSD_RELEASE= uname -r | cut -d - -f 1
|
||||
|
||||
CFLAGS+= -I${WRKSRC}/interfaces/os/sun
|
||||
CXXFLAGS+= -I${WRKSRC}/interfaces/os/sun
|
||||
|
||||
CONFLICTS_INSTALL= kget
|
||||
|
||||
BINARY_ALIAS= gcc=${CC} g++=${CXX}
|
||||
|
||||
# for port developers, building with these options may fail
|
||||
OPTIONS_DEFINE= DEBUG OPTIMIZED_CFLAGS TEST
|
||||
DEBUG_PREVENTS= OPTIMIZED_CFLAGS
|
||||
DEBUG_CONFIGURE_WITH= debug
|
||||
OPTIMIZED_CFLAGS_MAKE_ARGS_OFF= OPT=""
|
||||
TEST_TEST_TARGET= test
|
||||
TEST_USES= python
|
||||
|
||||
# ncbi-vdb build extras
|
||||
VDB_CONFIGURE_ARGS= \
|
||||
--with-xml2-prefix=${LOCALBASE} \
|
||||
--with-hdf5-prefix=${LOCALBASE} \
|
||||
--prefix=${PREFIX} \
|
||||
--build=amd64-portbld-freebsd$$(${FREEBSD_RELEASE}) \
|
||||
CC="${CC}" CXX="${CXX}" TOOLS="${CHOSEN_COMPILER_TYPE}"
|
||||
VDB_MAKE_ARGS+= -j 1 CCNAME=${CC} CXXNAME=${CXX} PKGCFLAGS="${CFLAGS}"
|
||||
MAKE_ENV+= CPATH="${LOCALBASE}/include/libepoll-shim"
|
||||
CFLAGS+= -I${WRKSRC}/lib
|
||||
|
||||
pre-patch:
|
||||
@${CP} ${FILESDIR}/Makefile.bsd ${NCBI_VDB_WRKSRC}/build/
|
||||
@${CP} ${FILESDIR}/ld.bsd.*.sh ${NCBI_VDB_WRKSRC}/build/
|
||||
@${MKDIR} ${NCBI_VDB_WRKSRC}/interfaces/os/bsd
|
||||
@${CP} -p ${NCBI_VDB_WRKSRC}/interfaces/os/mac/endian.h \
|
||||
${NCBI_VDB_WRKSRC}/interfaces/os/bsd/
|
||||
|
||||
post-patch:
|
||||
@${GREP} -q '@@PREFIX@@' ${WRKSRC}/ncbi-vdb/libs/kfg/config.c || (echo "@@PREFIX@@ in file/patch-libs_kfg_config.c is overwritten probably due to using 'make makepatch'"; exit 1)
|
||||
@${REINPLACE_CMD} -e 's#@@PREFIX@@#"${PREFIX}"#' ${WRKSRC}/ncbi-vdb/libs/kfg/config.c
|
||||
@${LN} -s ${WRKSRC}/ncbi-vdb/interfaces/cc/gcc/x86_64 ${WRKSRC}/ncbi-vdb/interfaces/cc/gcc/amd64
|
||||
|
||||
post-patch-TEST-on:
|
||||
@${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}|' ${WRKSRC}/test/kget/Makefile
|
||||
post-extract:
|
||||
@${MKDIR} ${WRKSRC}/ncbi-vdb/interfaces/os/bsd
|
||||
@${CP} ${FILESDIR}/*.h ${WRKSRC}/ncbi-vdb/interfaces/os/bsd
|
||||
# cd ${WRKDIR} && ${LN} -s ${WRKSRC}/ncbi-vdb .
|
||||
|
||||
pre-configure:
|
||||
@${CP} ${NCBI_VDB_WRKSRC}/setup/os-arch.prl ${WRKSRC}/setup/os-arch.prl
|
||||
# same as in biology/ncbi-vdb
|
||||
@${CP} ${NCBI_VDB_FILESDIR}/Makefile.bsd ${WRKSRC}/build/
|
||||
@${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} ${FILESDIR}/byteswap.h ${WRKSRC}/interfaces/override
|
||||
@cd ${WRKSRC}/ncbi-vdb && ./configure ${VDB_CONFIGURE_ARGS}
|
||||
@${ECHO} ${CHOSEN_COMPILER_TYPE} > ${WRKSRC}/ncbi-vdb/build/COMP
|
||||
@cd ${WRKSRC}/ncbi-vdb && ${DO_MAKE_BUILD} ${VDB_MAKE_ARGS}
|
||||
# This follows a static patch. Run "make clean patch" before
|
||||
# updating the patch.
|
||||
${REINPLACE_CMD} -e 's|/usr/local/etc/ncbi|${PREFIX}/etc/ncbi|g' \
|
||||
${WRKSRC}/ncbi-vdb/libs/kfg/config.c
|
||||
${REINPLACE_CMD} -e 's|/usr/local/bin|${PREFIX}/bin|g' \
|
||||
${WRKSRC}/tools/external/driver-tool/file-path.posix.cpp
|
||||
cd ${WRKSRC}/ncbi-vdb/build && cmake .. && make
|
||||
|
||||
post-build-TEST-on: do-test
|
||||
post-stage:
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*.${DISTVERSION}
|
||||
${MV} ${STAGEDIR}${PREFIX}/share/examples ${STAGEDIR}${PREFIX}/share/examples-sratools
|
||||
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
||||
${MV} ${STAGEDIR}${PREFIX}/share/examples-sratools/* ${STAGEDIR}${EXAMPLESDIR}
|
||||
${RMDIR} ${STAGEDIR}${PREFIX}/share/examples-sratools
|
||||
${MV} ${STAGEDIR}${PREFIX}/share/examples-java ${STAGEDIR}${EXAMPLESDIR}/java
|
||||
${MV} ${STAGEDIR}${PREFIX}/share/examples-python ${STAGEDIR}${EXAMPLESDIR}/python
|
||||
|
||||
do-install:
|
||||
cd ${WRKSRC}/amd64-portbld-freebsd*/sra-tools/bsd/clang/*/rel/bin && \
|
||||
for f in `ls *.${PORTVERSION}`; do \
|
||||
${INSTALL_PROGRAM} $${f} \
|
||||
${STAGEDIR}${PREFIX}/bin/`basename $${f%%.${PORTVERSION}}`; \
|
||||
done
|
||||
post-stage-EXAMPLES-off:
|
||||
${RM} -r ${STAGEDIR}${EXAMPLESDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
TIMESTAMP = 1624382289
|
||||
SHA256 (ncbi-sra-tools-2.11.0_GH0.tar.gz) = 10ac0a4d1fafc274bc107de811891d3e803d0713a247581dece4448231883810
|
||||
SIZE (ncbi-sra-tools-2.11.0_GH0.tar.gz) = 8966605
|
||||
SHA256 (ncbi-ngs-2.11.0_GH0.tar.gz) = 5fde50784760c00b403c2cc42ead15a4e9477697ee439f0a16edb4de3f52dfcc
|
||||
SIZE (ncbi-ngs-2.11.0_GH0.tar.gz) = 1100365
|
||||
SHA256 (ncbi-ncbi-vdb-2.11.0_GH0.tar.gz) = 9a65e3885b9ae1ebecbec871f04ce3162ac3764fb556ecdc8c1e61993e2164aa
|
||||
SIZE (ncbi-ncbi-vdb-2.11.0_GH0.tar.gz) = 22277539
|
||||
TIMESTAMP = 1691599515
|
||||
SHA256 (ncbi-sra-tools-3.0.6_GH0.tar.gz) = 9fecfd819ee9beaf8a1d3e4b76a5d49e747bc064525b40416e0730a168986348
|
||||
SIZE (ncbi-sra-tools-3.0.6_GH0.tar.gz) = 44957431
|
||||
SHA256 (ncbi-ncbi-vdb-3.0.6_GH0.tar.gz) = 4b6f93336bf8664fdcc151d41ea0793f0b0f88cfcb7c2aa049f162a72f905223
|
||||
SIZE (ncbi-ncbi-vdb-3.0.6_GH0.tar.gz) = 18972238
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
# ===========================================================================
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ===========================================================================
|
||||
|
||||
|
||||
# default compiler
|
||||
ifeq (,$(COMP))
|
||||
COMP = clang
|
||||
endif
|
||||
|
||||
# handle attempts to set cross-compilation architecture
|
||||
# note that if your installation is set up for cross compilation,
|
||||
# you can try to enable it on your own.
|
||||
ifeq (i386,$(ARCH))
|
||||
i386:
|
||||
@ true
|
||||
x86_64:
|
||||
@ echo "FreeBSD builds do not support cross-compilation to this architecture"
|
||||
endif
|
||||
|
||||
ifeq (x86_64,$(ARCH))
|
||||
i386:
|
||||
@ echo "FreeBSD builds do not support cross-compilation to this architecture"
|
||||
x86_64:
|
||||
@ true
|
||||
endif
|
||||
|
||||
.PHONY: i386 x86_64
|
||||
|
||||
|
||||
# library prefix
|
||||
LPFX = lib
|
||||
|
||||
# file extensions
|
||||
OBJX = o
|
||||
LOBX = pic.o
|
||||
LIBX = a
|
||||
SHLX = so
|
||||
|
||||
# compilation defines
|
||||
DEFINES := -DBSD -DUNIX -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DPKGNAME=bsd$(BITS)
|
||||
|
||||
# FreeBSD is a Unix variant; for most cases, linux sources do well
|
||||
OS_DAD = linux
|
||||
OS_GDAD = unix
|
||||
|
||||
# flex+bison: on Mac, use source-controlled generated .c/.h files
|
||||
YACC = @ true
|
||||
LEX = @ true
|
||||
|
||||
# build matrix
|
||||
COMPILERS = CLANG GCC
|
|
@ -1,40 +1,15 @@
|
|||
/*===========================================================================
|
||||
*
|
||||
* 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_
|
||||
#ifndef _freebsd_byteswap_h_
|
||||
#define _freebsd_byteswap_h_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/endian.h>
|
||||
|
||||
/* N.B. Sun's BSWAP seems to be macro-based,
|
||||
meaning that (x) will be evaluated multiple times */
|
||||
#define __BYTE_ORDER _BYTE_ORDER
|
||||
#define __BIG_ENDIAN _BIG_ENDIAN
|
||||
#define __LITTLE_ENDIAN _LITTLE_ENDIAN
|
||||
|
||||
#define bswap_16(x) bswap16 (x)
|
||||
#define bswap_32(x) bswap32 (x)
|
||||
#define bswap_64(x) bswap64 (x)
|
||||
|
||||
#endif /* _h_byteswap_ */
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
#include <sys/endian.h>
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/local/bin/bash
|
||||
# ===========================================================================
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ===========================================================================
|
||||
|
||||
# define linker params
|
||||
LD_EXPORT_GLOBAL="-Wl,--export-dynamic"
|
||||
LD_MULTIPLE_DEFS="-Wl,-zmuldefs"
|
||||
LD_STATIC="-Wl,-Bstatic"
|
||||
LD_DYNAMIC="-Wl,-Bdynamic"
|
||||
LD_ALL_SYMBOLS="-Wl,-whole-archive"
|
||||
LD_REF_SYMBOLS="-Wl,-no-whole-archive"
|
||||
|
||||
# build command
|
||||
DLIB_CMD="$LD -shared"
|
||||
EXE_CMD="$LD"
|
||||
|
||||
# versioned output
|
||||
if [ "$VERS" = "" ]
|
||||
then
|
||||
DLIB_CMD="$DLIB_CMD -o $TARG"
|
||||
EXE_CMD="$EXE_CMD -o $TARG"
|
||||
else
|
||||
set-vers $(echo $VERS | tr '.' ' ')
|
||||
DLIB_CMD="$DLIB_CMD -o $OUTDIR/$NAME$DBGAP.so.$VERS -Wl,-soname,$NAME.so.$MAJ"
|
||||
EXE_CMD="$EXE_CMD -o $OUTDIR/$NAME$DBGAP.$VERS"
|
||||
fi
|
|
@ -1,158 +0,0 @@
|
|||
#!/usr/local/bin/bash
|
||||
# ===========================================================================
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ===========================================================================
|
||||
|
||||
# script name
|
||||
SELF_NAME="$(basename $0)"
|
||||
|
||||
# parameters
|
||||
LD="$1"
|
||||
ARCH="$2"
|
||||
BUILD="$3"
|
||||
shift 3
|
||||
|
||||
SRCDIR="$1"
|
||||
BINDIR="$2"
|
||||
OUTDIR="$3"
|
||||
TARG="$4"
|
||||
NAME="$5"
|
||||
DBGAP="$6"
|
||||
shift 6
|
||||
|
||||
VERS="$1"
|
||||
VERSFILE="$2"
|
||||
DEPFILE="$3"
|
||||
shift 3
|
||||
|
||||
MODE="$1"
|
||||
SCMFLAGS="$2"
|
||||
LDFLAGS="$3"
|
||||
shift 3
|
||||
|
||||
LDIRS="$1"
|
||||
XDIRS="$2"
|
||||
shift 2
|
||||
|
||||
OBJS="$1"
|
||||
LIBS="$2"
|
||||
|
||||
# decode MODE
|
||||
STATIC=$(expr $MODE % 2)
|
||||
MODE=$(expr $MODE / 2)
|
||||
DYLD=$(expr $MODE % 2)
|
||||
MODE=$(expr $MODE / 2)
|
||||
KPROC=$(expr $MODE % 2)
|
||||
MODE=$(expr $MODE / 2)
|
||||
THREADS=$(expr $MODE % 2)
|
||||
MODE=$(expr $MODE / 2)
|
||||
HAVE_M=$(expr $MODE % 2)
|
||||
MODE=$(expr $MODE / 2)
|
||||
HAVE_XML=$(expr $MODE % 2)
|
||||
|
||||
# decode SCMFLAGS
|
||||
CHECKSUM=$(expr $SCMFLAGS % 2)
|
||||
STATICSYSLIBS=$(expr $SCMFLAGS / 2)
|
||||
|
||||
# return parameter for find-lib
|
||||
LIBPATH=''
|
||||
|
||||
# initial command state
|
||||
CMD=''
|
||||
LD_STATIC_STATE=0
|
||||
LD_ALL_STATE=0
|
||||
|
||||
# for breaking out version
|
||||
set-vers ()
|
||||
{
|
||||
MAJ=$1
|
||||
MIN=$2
|
||||
REL=$3
|
||||
}
|
||||
|
||||
# for locating libraries
|
||||
find-lib ()
|
||||
{
|
||||
_lib="lib$1"
|
||||
_dirs="$2"
|
||||
|
||||
LIBPATH=''
|
||||
|
||||
while [ "$_dirs" != "" ]
|
||||
do
|
||||
_dir="${_dirs%%:*}"
|
||||
|
||||
if [ "$_dir" != "" ]
|
||||
then
|
||||
if [ -e "$_dir/$_lib" ]
|
||||
then
|
||||
while [ -L "$_dir/$_lib" ]
|
||||
do
|
||||
_lib=$(readlink -n "$_dir/$_lib")
|
||||
done
|
||||
LIBPATH="$_dir/$_lib"
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
|
||||
_dirs="${_dirs#$_dir}"
|
||||
_dirs="${_dirs#:}"
|
||||
done
|
||||
}
|
||||
|
||||
# setting state
|
||||
load-static ()
|
||||
{
|
||||
if [ $LD_STATIC_STATE -eq 0 ]
|
||||
then
|
||||
CMD="$CMD $LD_STATIC"
|
||||
LD_STATIC_STATE=1
|
||||
fi
|
||||
}
|
||||
|
||||
load-dynamic ()
|
||||
{
|
||||
if [ $LD_STATIC_STATE -eq 1 ]
|
||||
then
|
||||
CMD="$CMD $LD_DYNAMIC"
|
||||
LD_STATIC_STATE=0
|
||||
fi
|
||||
}
|
||||
|
||||
load-all-symbols ()
|
||||
{
|
||||
if [ $LD_ALL_STATE -eq 0 ]
|
||||
then
|
||||
CMD="$CMD $LD_ALL_SYMBOLS"
|
||||
LD_ALL_STATE=1
|
||||
fi
|
||||
}
|
||||
|
||||
load-ref-symbols ()
|
||||
{
|
||||
if [ $LD_ALL_STATE -eq 1 ]
|
||||
then
|
||||
CMD="$CMD $LD_REF_SYMBOLS"
|
||||
LD_ALL_STATE=0
|
||||
fi
|
||||
}
|
|
@ -1,308 +0,0 @@
|
|||
#!/usr/local/bin/bash
|
||||
# ===========================================================================
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ===========================================================================
|
||||
|
||||
|
||||
# ===========================================================================
|
||||
# input library types, and their handling
|
||||
#
|
||||
# normal linkage
|
||||
# -l : find shared or static
|
||||
# -s : require static
|
||||
# -d : require shared
|
||||
#
|
||||
# static linkage
|
||||
# -l : require static
|
||||
# -s : require static
|
||||
# -d : ignore
|
||||
# ===========================================================================
|
||||
|
||||
|
||||
# script name
|
||||
SELF_NAME="$(basename $0)"
|
||||
BUILD_DIR="$(dirname $0)"
|
||||
|
||||
# parameters and common functions
|
||||
source "${0%dlib.sh}cmn.sh"
|
||||
|
||||
# discover tool chain
|
||||
case "$LD" in
|
||||
g*)
|
||||
source "${0%dlib.sh}gcc.sh"
|
||||
;;
|
||||
c*)
|
||||
source "${0%dlib.sh}clang.sh"
|
||||
;;
|
||||
*)
|
||||
echo "$SELF_NAME: unrecognized ld tool - '$LD'"
|
||||
exit 5
|
||||
esac
|
||||
|
||||
# DLIB_CMD was started in tool-specific source
|
||||
CMD="$DLIB_CMD $LDFLAGS"
|
||||
|
||||
# tack on object files
|
||||
CMD="$CMD $OBJS"
|
||||
|
||||
# list of static libraries used to create dynamic lib
|
||||
SLIBS=''
|
||||
|
||||
# initial dependency upon Makefile and vers file
|
||||
DEPS="$SRCDIR/Makefile"
|
||||
if [ "$LIBS" != "" ]
|
||||
then
|
||||
# tack on paths
|
||||
DIRS="$LDIRS:$XDIRS"
|
||||
while [ "$DIRS" != "" ]
|
||||
do
|
||||
DIR="${DIRS%%:*}"
|
||||
[ "$DIR" != "" ] && CMD="$CMD -L$DIR"
|
||||
DIRS="${DIRS#$DIR}"
|
||||
DIRS="${DIRS#:}"
|
||||
done
|
||||
|
||||
# update LD_LIBRARY_PATH
|
||||
unset LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH="$LDIRS:$XDIRS"
|
||||
|
||||
# tack on libraries, finding as we go
|
||||
for LIB in $LIBS
|
||||
do
|
||||
|
||||
# strip off switch
|
||||
LIBNAME="${LIB#-[lsd]}"
|
||||
|
||||
# look at linkage
|
||||
case "$LIB" in
|
||||
-ldl|-ddl)
|
||||
|
||||
# always load libdl as shared library
|
||||
load-ref-symbols
|
||||
load-dynamic
|
||||
# CMD="$CMD -ldl"
|
||||
;;
|
||||
|
||||
-l*)
|
||||
|
||||
# normal or dynamic linkage
|
||||
FOUND=0
|
||||
if [ $STATIC -eq 0 ]
|
||||
then
|
||||
find-lib $LIBNAME.so $LDIRS
|
||||
if [ "$LIBPATH" != "" ]
|
||||
then
|
||||
|
||||
# found it
|
||||
FOUND=1
|
||||
|
||||
# load normally
|
||||
load-ref-symbols
|
||||
load-dynamic
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
# try static only
|
||||
if [ $FOUND -eq 0 ]
|
||||
then
|
||||
find-lib $LIBNAME.a $LDIRS
|
||||
if [ "$LIBPATH" != "" ]
|
||||
then
|
||||
|
||||
# found it
|
||||
FOUND=1
|
||||
|
||||
# add it to dependencies
|
||||
DEPS="$DEPS $LIBPATH"
|
||||
SLIBS="$SLIBS $(dirname $LIBPATH)/lib$LIBNAME.a"
|
||||
|
||||
# load static
|
||||
load-static
|
||||
load-all-symbols
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
# not found within our directories
|
||||
if [ $FOUND -eq 0 ]
|
||||
then
|
||||
|
||||
if [ $STATICSYSLIBS -eq 1 ]
|
||||
then
|
||||
case "$LIBNAME" in
|
||||
z|bz2)
|
||||
# set load to static
|
||||
load-static
|
||||
load-all-symbols
|
||||
;;
|
||||
|
||||
*)
|
||||
# set load to dynamic
|
||||
load-ref-symbols
|
||||
load-dynamic
|
||||
;;
|
||||
|
||||
esac
|
||||
else
|
||||
# set load to normal
|
||||
load-ref-symbols
|
||||
load-dynamic
|
||||
fi
|
||||
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
fi
|
||||
;;
|
||||
|
||||
-s*)
|
||||
|
||||
# force static load
|
||||
FOUND=0
|
||||
find-lib $LIBNAME.a $LDIRS
|
||||
if [ "$LIBPATH" != "" ]
|
||||
then
|
||||
|
||||
# found it
|
||||
FOUND=1
|
||||
|
||||
# add it to dependencies
|
||||
DEPS="$DEPS $LIBPATH"
|
||||
SLIBS="$SLIBS $(dirname $LIBPATH)/lib$LIBNAME.a"
|
||||
|
||||
# load static
|
||||
load-static
|
||||
load-all-symbols
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
|
||||
fi
|
||||
|
||||
# not found within our directories
|
||||
if [ $FOUND -eq 0 ]
|
||||
then
|
||||
|
||||
if [ $STATIC -eq 1 ] || [ $STATICSYSLIBS -eq 1 ]
|
||||
then
|
||||
# set load to static
|
||||
load-static
|
||||
load-all-symbols
|
||||
else
|
||||
|
||||
case "$LIBNAME" in
|
||||
z|bz2)
|
||||
# set load to dynamic
|
||||
load-ref-symbols
|
||||
load-dynamic
|
||||
;;
|
||||
|
||||
*)
|
||||
# set load to static
|
||||
load-static
|
||||
load-all-symbols
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
fi
|
||||
;;
|
||||
|
||||
-d*)
|
||||
|
||||
# only dynamic linkage
|
||||
FOUND=0
|
||||
if [ $STATIC -eq 0 ]
|
||||
then
|
||||
find-lib $LIBNAME.so $LDIRS
|
||||
if [ "$LIBPATH" != "" ]
|
||||
then
|
||||
|
||||
# found it
|
||||
FOUND=1
|
||||
|
||||
# load normally
|
||||
load-ref-symbols
|
||||
load-dynamic
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
# not found within our directories
|
||||
if [ $FOUND -eq 0 ]
|
||||
then
|
||||
# set load to normal
|
||||
load-ref-symbols
|
||||
load-dynamic
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
done
|
||||
fi
|
||||
|
||||
# put state back to normal
|
||||
load-ref-symbols
|
||||
load-dynamic
|
||||
|
||||
# add in pthreads
|
||||
if [ $THREADS -ne 0 ]
|
||||
then
|
||||
CMD="$CMD -lpthread"
|
||||
fi
|
||||
|
||||
# add in xml
|
||||
if [ $HAVE_XML -ne 0 ]
|
||||
then
|
||||
CMD="$CMD -lxml2"
|
||||
fi
|
||||
|
||||
# add in math library
|
||||
if [ $HAVE_M -ne 0 ]
|
||||
then
|
||||
CMD="$CMD -lm"
|
||||
fi
|
||||
|
||||
# produce shared library
|
||||
echo "$CMD"
|
||||
$CMD || exit $?
|
||||
|
||||
# produce dependencies
|
||||
if [ "$DEPFILE" != "" ]
|
||||
then
|
||||
echo "$TARG: $DEPS" > "$DEPFILE"
|
||||
fi
|
||||
|
||||
if [ $CHECKSUM -eq 1 ]
|
||||
then
|
||||
SCM_DIR="${BUILD_DIR%/*}/scm"
|
||||
LOGFILE="$SCM_DIR/scm.log"
|
||||
MSG=">>>>> scm: calling the collect script from ld.linux.dlib.sh <<<<<<"
|
||||
#echo "$MSG"
|
||||
echo "$MSG" >> $LOGFILE
|
||||
|
||||
"$BUILD_DIR/scm-collect.sh" "$OBJS" "$SLIBS" | sort -u > "$TARG.md5"
|
||||
fi
|
|
@ -1,326 +0,0 @@
|
|||
#!/usr/local/bin/bash
|
||||
# ===========================================================================
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ===========================================================================
|
||||
|
||||
|
||||
# ===========================================================================
|
||||
# input library types, and their handling
|
||||
#
|
||||
# normal linkage
|
||||
# -l : find shared or static
|
||||
# -s : require static
|
||||
# -d : ignore - will be dynamically loaded
|
||||
#
|
||||
# static linkage
|
||||
# -l : require static
|
||||
# -s : require static
|
||||
# -d : require static
|
||||
# ===========================================================================
|
||||
|
||||
|
||||
# script name
|
||||
SELF_NAME="$(basename $0)"
|
||||
BUILD_DIR="$(dirname $0)"
|
||||
|
||||
# parameters and common functions
|
||||
source "${0%exe.sh}cmn.sh"
|
||||
|
||||
# discover tool chain
|
||||
case "$LD" in
|
||||
g*)
|
||||
source "${0%exe.sh}gcc.sh"
|
||||
;;
|
||||
c*)
|
||||
source "${0%exe.sh}clang.sh"
|
||||
;;
|
||||
*)
|
||||
echo "$SELF_NAME: unrecognized ld tool - '$LD'"
|
||||
exit 5
|
||||
esac
|
||||
|
||||
# EXE_CMD was started in tool-specific source
|
||||
CMD="$EXE_CMD $LDFLAGS"
|
||||
|
||||
# if building a static executable against dynamic libraries
|
||||
# the main application will substitute for name lookup
|
||||
if [ $STATIC -eq 1 ] && [ $DYLD -eq 1 ]
|
||||
then
|
||||
# CMD="$CMD $LD_EXPORT_GLOBAL $LD_MULTIPLE_DEFS"
|
||||
CMD="$CMD $LD_EXPORT_GLOBAL"
|
||||
fi
|
||||
|
||||
# tack on object files
|
||||
CMD="$CMD $OBJS"
|
||||
|
||||
# list of static libraries used to create executable
|
||||
SLIBS=''
|
||||
|
||||
# initial dependency upon Makefile and vers file
|
||||
DEPS="$SRCDIR/Makefile $VERSFILE"
|
||||
if [ "$LIBS" != "" ]
|
||||
then
|
||||
# tack on paths
|
||||
DIRS="$LDIRS:$XDIRS"
|
||||
while [ "$DIRS" != "" ]
|
||||
do
|
||||
DIR="${DIRS%%:*}"
|
||||
[ "$DIR" != "" ] && CMD="$CMD -L$DIR"
|
||||
DIRS="${DIRS#$DIR}"
|
||||
DIRS="${DIRS#:}"
|
||||
done
|
||||
|
||||
# update LD_LIBRARY_PATH
|
||||
unset LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH="$LDIRS:$XDIRS"
|
||||
|
||||
# tack on libraries, finding as we go
|
||||
for LIB in $LIBS
|
||||
do
|
||||
|
||||
# strip off switch
|
||||
LIBNAME="${LIB#-[lsd]}"
|
||||
|
||||
# look at linkage
|
||||
case "$LIB" in
|
||||
-ldl|-ddl)
|
||||
|
||||
# always load libdl as shared library
|
||||
load-ref-symbols
|
||||
load-dynamic
|
||||
# CMD="$CMD -ldl"
|
||||
;;
|
||||
|
||||
-l*)
|
||||
|
||||
# normal or dynamic linkage
|
||||
FOUND=0
|
||||
if [ $STATIC -eq 0 ]
|
||||
then
|
||||
find-lib $LIBNAME.so $LDIRS
|
||||
if [ "$LIBPATH" != "" ]
|
||||
then
|
||||
|
||||
# found it
|
||||
FOUND=1
|
||||
|
||||
# load dynamic
|
||||
load-dynamic
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
# try static only
|
||||
if [ $FOUND -eq 0 ]
|
||||
then
|
||||
find-lib $LIBNAME.a $LDIRS
|
||||
if [ "$LIBPATH" != "" ]
|
||||
then
|
||||
|
||||
# found it
|
||||
FOUND=1
|
||||
|
||||
# add it to dependencies
|
||||
DEPS="$DEPS $LIBPATH"
|
||||
SLIBS="$SLIBS $(dirname $LIBPATH)/lib$LIBNAME.a"
|
||||
|
||||
# load static
|
||||
load-static
|
||||
[ $STATIC -eq 1 ] && load-all-symbols
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
# not found within our directories
|
||||
if [ $FOUND -eq 0 ]
|
||||
then
|
||||
|
||||
# do not need to load all symbols for external libs
|
||||
[ $STATIC -eq 1 ] && load-ref-symbols
|
||||
|
||||
if [ $STATICSYSLIBS -eq 1 ]
|
||||
then
|
||||
case "$LIBNAME" in
|
||||
z|bz2)
|
||||
# set load to static
|
||||
load-static
|
||||
;;
|
||||
|
||||
*)
|
||||
# set load to dynamic
|
||||
load-dynamic
|
||||
;;
|
||||
|
||||
esac
|
||||
else
|
||||
# set load to normal
|
||||
load-dynamic
|
||||
fi
|
||||
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
fi
|
||||
;;
|
||||
|
||||
-s*)
|
||||
|
||||
# force static load
|
||||
FOUND=0
|
||||
find-lib $LIBNAME.a $LDIRS
|
||||
if [ "$LIBPATH" != "" ]
|
||||
then
|
||||
|
||||
# found it
|
||||
FOUND=1
|
||||
|
||||
# add it to dependencies
|
||||
DEPS="$DEPS $LIBPATH"
|
||||
SLIBS="$SLIBS $(dirname $LIBPATH)/lib$LIBNAME.a"
|
||||
|
||||
# load static
|
||||
load-static
|
||||
[ $STATIC -eq 1 ] && load-all-symbols
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
|
||||
fi
|
||||
|
||||
# not found within our directories
|
||||
if [ $FOUND -eq 0 ]
|
||||
then
|
||||
|
||||
# do not need to load all symbols for external libs
|
||||
[ $STATIC -eq 1 ] && load-ref-symbols
|
||||
|
||||
if [ $STATIC -eq 1 ] || [ $STATICSYSLIBS -eq 1 ]
|
||||
then
|
||||
|
||||
# set load to static
|
||||
load-static
|
||||
|
||||
else
|
||||
|
||||
# special case for libs we have in "ext"
|
||||
# that are sometimes requested as static
|
||||
case "$LIBNAME" in
|
||||
z|bz2)
|
||||
# set load to dynamic
|
||||
load-dynamic
|
||||
;;
|
||||
*)
|
||||
load-static
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
fi
|
||||
;;
|
||||
|
||||
-d*)
|
||||
|
||||
FOUND=0
|
||||
if [ $STATIC -eq 1 ]
|
||||
then
|
||||
find-lib $LIBNAME.a $LDIRS
|
||||
if [ "$LIBPATH" != "" ]
|
||||
then
|
||||
|
||||
# found it
|
||||
FOUND=1
|
||||
|
||||
# add it to dependencies
|
||||
DEPS="$DEPS $LIBPATH"
|
||||
SLIBS="$SLIBS $(dirname $LIBPATH)/lib$LIBNAME.a"
|
||||
|
||||
# load static
|
||||
load-static
|
||||
load-all-symbols
|
||||
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
|
||||
fi
|
||||
|
||||
# not found within our directories
|
||||
if [ $FOUND -eq 0 ]
|
||||
then
|
||||
load-static
|
||||
load-all-symbols
|
||||
|
||||
CMD="$CMD -l$LIBNAME"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
esac
|
||||
|
||||
done
|
||||
fi
|
||||
|
||||
# return to normal
|
||||
load-ref-symbols
|
||||
load-dynamic
|
||||
|
||||
# add in pthreads
|
||||
if [ $THREADS -ne 0 ]
|
||||
then
|
||||
CMD="$CMD -lpthread"
|
||||
fi
|
||||
|
||||
# add in xml
|
||||
# Doesn't work since ld.sh uses HAVE_XML=32, passed here as part of MODE
|
||||
if [ "$HAVE_XML2" = "1" ]
|
||||
then
|
||||
CMD="$CMD -lxml2"
|
||||
fi
|
||||
|
||||
# For sra-tools tools/*
|
||||
CMD="$CMD -lepoll-shim -lxml2 -lbz2 -lz"
|
||||
|
||||
# add in math library
|
||||
if [ $HAVE_M -ne 0 ]
|
||||
then
|
||||
CMD="$CMD -lm"
|
||||
fi
|
||||
|
||||
# produce shared library
|
||||
echo $CMD
|
||||
$CMD || exit $?
|
||||
|
||||
# produce dependencies
|
||||
if [ "$DEPFILE" != "" ]
|
||||
then
|
||||
echo "$TARG: $DEPS" > "$DEPFILE"
|
||||
fi
|
||||
|
||||
if [ $CHECKSUM -eq 1 ]
|
||||
then
|
||||
SCM_DIR="${BUILD_DIR%/*}/scm"
|
||||
LOGFILE="$SCM_DIR/scm.log"
|
||||
MSG=">>>>> scm: calling the collect script from ld.linux.exe.sh <<<<<<"
|
||||
#echo "$MSG"
|
||||
echo "$MSG" >> $LOGFILE
|
||||
|
||||
"$BUILD_DIR/scm-collect.sh" "$OBJS" "$SLIBS" | sort -u > "$TARG.md5"
|
||||
fi
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/local/bin/bash
|
||||
# ===========================================================================
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ===========================================================================
|
||||
|
||||
# define linker params
|
||||
LD_EXPORT_GLOBAL="-Wl,--export-dynamic"
|
||||
LD_MULTIPLE_DEFS="-Wl,-zmuldefs"
|
||||
LD_STATIC="-Wl,-Bstatic"
|
||||
LD_DYNAMIC="-Wl,-Bdynamic"
|
||||
LD_ALL_SYMBOLS="-Wl,-whole-archive"
|
||||
LD_REF_SYMBOLS="-Wl,-no-whole-archive"
|
||||
|
||||
# build command
|
||||
DLIB_CMD="$LD -shared"
|
||||
EXE_CMD="$LD"
|
||||
|
||||
# versioned output
|
||||
if [ "$VERS" = "" ]
|
||||
then
|
||||
DLIB_CMD="$DLIB_CMD -o $TARG"
|
||||
EXE_CMD="$EXE_CMD -o $TARG"
|
||||
else
|
||||
set-vers $(echo $VERS | tr '.' ' ')
|
||||
DLIB_CMD="$DLIB_CMD -o $OUTDIR/$NAME$DBGAP.so.$VERS -Wl,-soname,$NAME.so.$MAJ"
|
||||
EXE_CMD="$EXE_CMD -o $OUTDIR/$NAME$DBGAP.$VERS"
|
||||
fi
|
|
@ -1,98 +0,0 @@
|
|||
#!/usr/local/bin/bash
|
||||
# ===========================================================================
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ===========================================================================
|
||||
|
||||
# script name
|
||||
SELF_NAME="$(basename $0)"
|
||||
|
||||
# parameters
|
||||
TYPE="$1"
|
||||
OUTDIR="$2"
|
||||
TARG="$3"
|
||||
NAME="$4"
|
||||
DBGAP="$5"
|
||||
EXT="$6"
|
||||
VERS="$7"
|
||||
|
||||
# find target
|
||||
TARG=$(basename "$TARG")
|
||||
|
||||
# put extension back onto name
|
||||
NAME="$NAME$DBGAP"
|
||||
STATIC_NAME="$NAME-static"
|
||||
if [ "$EXT" != "" ]
|
||||
then
|
||||
NAME="$NAME.$EXT"
|
||||
STATIC_NAME="$STATIC_NAME.$EXT"
|
||||
fi
|
||||
|
||||
# break out version
|
||||
set-vers ()
|
||||
{
|
||||
MAJ=$1
|
||||
MIN=$2
|
||||
REL=$3
|
||||
}
|
||||
|
||||
set-vers $(echo $VERS | tr '.' ' ')
|
||||
|
||||
cd "$OUTDIR" || exit 5
|
||||
|
||||
# create link
|
||||
create-link ()
|
||||
{
|
||||
rm -f "$2"
|
||||
local CMD="ln -s $1 $2"
|
||||
echo $CMD
|
||||
$CMD
|
||||
}
|
||||
|
||||
# test for version in target name
|
||||
if [ "$TARG" != "$NAME.$MAJ.$MIN.$REL" ]
|
||||
then
|
||||
|
||||
# for simple name, create 2 links
|
||||
if [ "$TARG" = "$NAME" ]
|
||||
then
|
||||
create-link "$NAME.$MAJ.$MIN.$REL" "$NAME.$MAJ"
|
||||
create-link "$NAME.$MAJ" "$NAME"
|
||||
|
||||
# for static libraries, create special link
|
||||
if [ "$TYPE" = "slib" ]
|
||||
then
|
||||
create-link "$NAME" "$STATIC_NAME"
|
||||
fi
|
||||
|
||||
# for name with major version in it
|
||||
elif [ "$TARG" = "$NAME.$MAJ" ]
|
||||
then
|
||||
create-link "$NAME.$MAJ.$MIN.$REL" "$NAME.$MAJ"
|
||||
|
||||
|
||||
# for name with major & minor version in it
|
||||
elif [ "$TARG" = "$NAME.$MAJ.$MIN" ]
|
||||
then
|
||||
create-link "$NAME.$MAJ.$MIN.$REL" "$NAME.$MAJ.$MIN"
|
||||
fi
|
||||
fi
|
|
@ -1,146 +0,0 @@
|
|||
#!/usr/local/bin/bash
|
||||
# ===========================================================================
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ===========================================================================
|
||||
|
||||
|
||||
# ===========================================================================
|
||||
# input library types, and their handling
|
||||
#
|
||||
# normal or static linkage
|
||||
# -l : require static
|
||||
# -s : require static
|
||||
# -d : ignore
|
||||
# ===========================================================================
|
||||
|
||||
# script name
|
||||
SELF_NAME="$(basename $0)"
|
||||
BUILD_DIR="$(dirname $0)"
|
||||
|
||||
# parameters and common functions
|
||||
source "${0%slib.sh}cmn.sh"
|
||||
|
||||
# initialize command
|
||||
CMD="ar -rc"
|
||||
|
||||
# function to convert an archive into individual object files
|
||||
convert-static ()
|
||||
{
|
||||
# list members
|
||||
local path="$1"
|
||||
local mbrs="$(ar -t $path)"
|
||||
|
||||
# unpack archive into temporary directory
|
||||
mkdir -p ld-tmp
|
||||
if ! cd ld-tmp
|
||||
then
|
||||
echo "$SELF_NAME: failed to cd to ld-tmp"
|
||||
exit 5
|
||||
fi
|
||||
ar -x "$path"
|
||||
|
||||
# rename and add to source files list
|
||||
local m=
|
||||
for m in $mbrs
|
||||
do
|
||||
mv $m $LIBNAME-$m
|
||||
CMD="$CMD ld-tmp/$LIBNAME-$m"
|
||||
done
|
||||
|
||||
# return to prior location
|
||||
cd - > /dev/null
|
||||
}
|
||||
|
||||
# versioned output
|
||||
if [ "$VERS" = "" ]
|
||||
then
|
||||
CMD="$CMD $TARG"
|
||||
else
|
||||
set-vers $(echo $VERS | tr '.' ' ')
|
||||
CMD="$CMD $OUTDIR/$NAME$DBGAP.a.$VERS"
|
||||
fi
|
||||
|
||||
# tack on object files
|
||||
CMD="$CMD $OBJS"
|
||||
|
||||
# list of static libraries used to create this lib
|
||||
SLIBS=''
|
||||
|
||||
# initial dependency upon Makefile and vers file
|
||||
DEPS="$SRCDIR/Makefile"
|
||||
if [ "$LIBS" != "" ]
|
||||
then
|
||||
# tack on libraries, finding as we go
|
||||
for LIB in $LIBS
|
||||
do
|
||||
|
||||
# strip off switch
|
||||
LIBNAME="${LIB#-[lsd]}"
|
||||
|
||||
# look at linkage
|
||||
case "$LIB" in
|
||||
-s*)
|
||||
|
||||
# force static load
|
||||
find-lib $LIBNAME.a $LDIRS
|
||||
if [ "$LIBPATH" != "" ]
|
||||
then
|
||||
|
||||
# add it to dependencies
|
||||
DEPS="$DEPS $LIBPATH"
|
||||
SLIBS="$SLIBS $(dirname $LIBPATH)/lib$LIBNAME.a"
|
||||
|
||||
# convert to individual object files
|
||||
convert-static "$LIBPATH" || exit $?
|
||||
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
done
|
||||
fi
|
||||
|
||||
# produce static library
|
||||
echo $CMD
|
||||
$CMD || exit $?
|
||||
|
||||
# remove temporaries
|
||||
rm -rf ld-tmp
|
||||
|
||||
# produce dependencies
|
||||
if [ "$DEPFILE" != "" ] && [ "$DEPS" != "" ]
|
||||
then
|
||||
echo "$TARG: $DEPS" > "$DEPFILE"
|
||||
fi
|
||||
|
||||
if [ $CHECKSUM -eq 1 ]
|
||||
then
|
||||
SCM_DIR="${BUILD_DIR%/*}/scm"
|
||||
LOGFILE="$SCM_DIR/scm.log"
|
||||
MSG=">>>>> scm: calling the collect script from ld.linux.slib.sh <<<<<<"
|
||||
#echo "$MSG"
|
||||
echo "$MSG" >> $LOGFILE
|
||||
|
||||
"$BUILD_DIR/scm-collect.sh" "$OBJS" "$SLIBS" | sort -u > "$TARG.md5"
|
||||
fi
|
|
@ -0,0 +1,43 @@
|
|||
/*===========================================================================
|
||||
*
|
||||
* 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_os_native_
|
||||
#define _h_os_native_
|
||||
|
||||
#ifndef _h_unix_native_
|
||||
#include "../unix/unix-native.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _h_os_native_ */
|
|
@ -0,0 +1,13 @@
|
|||
--- CMakeLists.txt.orig 2023-02-01 20:26:19 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -54,8 +54,8 @@ set(CMAKE_MODULE_PATH
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/build"
|
||||
)
|
||||
|
||||
-set( VDB_BINDIR "${CMAKE_BINARY_DIR}/../ncbi-vdb" CACHE PATH "Location of NCBI VDB build directory" )
|
||||
-set( VDB_INCDIR "${CMAKE_SOURCE_DIR}/../ncbi-vdb/interfaces" CACHE PATH "Location of NCBI VDB include directory" )
|
||||
+set( VDB_BINDIR "${CMAKE_BINARY_DIR}/ncbi-vdb" CACHE PATH "Location of NCBI VDB build directory" )
|
||||
+set( VDB_INCDIR "${CMAKE_SOURCE_DIR}/ncbi-vdb/interfaces" CACHE PATH "Location of NCBI VDB include directory" )
|
||||
|
||||
include(CTest)
|
||||
enable_testing()
|
|
@ -0,0 +1,56 @@
|
|||
--- build/env.cmake.orig 2023-07-10 16:23:35 UTC
|
||||
+++ build/env.cmake
|
||||
@@ -69,11 +69,21 @@ if ( ${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin" )
|
||||
set(LIBPFX "lib")
|
||||
set(SHLX "dylib")
|
||||
set(STLX "a")
|
||||
+elseif ( ${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD" )
|
||||
+ set(OS "bsd")
|
||||
+ set(LIBPFX "lib")
|
||||
+ set(SHLX "so")
|
||||
+ set(STLX "a")
|
||||
elseif ( ${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux" )
|
||||
set(OS "linux")
|
||||
set(LIBPFX "lib")
|
||||
set(SHLX "so")
|
||||
set(STLX "a")
|
||||
+elseif ( ${CMAKE_HOST_SYSTEM_NAME} STREQUAL "NetBSD" )
|
||||
+ set(OS "bsd")
|
||||
+ set(LIBPFX "lib")
|
||||
+ set(SHLX "so")
|
||||
+ set(STLX "a")
|
||||
elseif ( ${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows" )
|
||||
set(OS "windows")
|
||||
set(LIBPFX "")
|
||||
@@ -91,6 +101,8 @@ elseif ( ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "aarc
|
||||
set(ARCH "arm64")
|
||||
elseif ( ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64")
|
||||
set(ARCH "x86_64")
|
||||
+elseif ( ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "amd64")
|
||||
+ set(ARCH "x86_64")
|
||||
elseif ( ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "AMD64")
|
||||
set(ARCH "x86_64")
|
||||
else()
|
||||
@@ -98,7 +110,11 @@ else()
|
||||
endif ()
|
||||
|
||||
# create variables based entirely upon OS
|
||||
-if ( "mac" STREQUAL ${OS} )
|
||||
+if ( "bsd" STREQUAL ${OS} )
|
||||
+ add_compile_definitions( BSD UNIX )
|
||||
+ set( LMCHECK "" )
|
||||
+ set( EXE "" )
|
||||
+elseif ( "mac" STREQUAL ${OS} )
|
||||
add_compile_definitions( MAC BSD UNIX )
|
||||
set( LMCHECK "" )
|
||||
set( EXE "" )
|
||||
@@ -380,6 +396,9 @@ endif()
|
||||
|
||||
if ( "mac" STREQUAL ${OS} )
|
||||
include_directories(${VDB_INTERFACES_DIR}/os/mac)
|
||||
+ include_directories(${VDB_INTERFACES_DIR}/os/unix)
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ include_directories(${VDB_INTERFACES_DIR}/os/bsd)
|
||||
include_directories(${VDB_INTERFACES_DIR}/os/unix)
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
include_directories(${VDB_INTERFACES_DIR}/os/linux)
|
|
@ -1,11 +0,0 @@
|
|||
--- build/ld.linux.exe.sh.orig 2021-06-20 16:32:05 UTC
|
||||
+++ build/ld.linux.exe.sh
|
||||
@@ -313,6 +313,8 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
+CMD="$CMD -lepoll-thread -lbz2 -lz"
|
||||
+
|
||||
# add in math library
|
||||
if [ $HAVE_M -ne 0 ]
|
||||
then
|
|
@ -1,30 +0,0 @@
|
|||
--- ncbi-vdb/interfaces/ext/hdf5/H5Opublic.h.orig 2021-03-15 18:16:43 UTC
|
||||
+++ ncbi-vdb/interfaces/ext/hdf5/H5Opublic.h
|
||||
@@ -150,8 +150,13 @@ H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *
|
||||
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
|
||||
H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id);
|
||||
H5_DLL herr_t H5Oget_info(hid_t loc_id, H5O_info_t *oinfo);
|
||||
+#if H5_VERSION_GE(1,12,0)
|
||||
+H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, unsigned fields,
|
||||
+ hid_t lapl_id);
|
||||
+#else
|
||||
H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo,
|
||||
hid_t lapl_id);
|
||||
+#endif
|
||||
H5_DLL herr_t H5Oget_info_by_idx(hid_t loc_id, const char *group_name,
|
||||
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo,
|
||||
hid_t lapl_id);
|
||||
--- ncbi-vdb/libs/hdf5/hdf5dir.c.orig 2021-03-15 18:16:43 UTC
|
||||
+++ ncbi-vdb/libs/hdf5/hdf5dir.c
|
||||
@@ -292,7 +292,11 @@ rc_t CC HDF5DirVisitUpdate ( HDF5Dir *self, bool recur
|
||||
static uint32_t HDF5DirPathTypeOnBuffer( const HDF5Dir *self, const char *buffer )
|
||||
{
|
||||
H5O_info_t obj_info;
|
||||
+#if H5_VERSION_GE(1,12,0)
|
||||
+ herr_t h5e = H5Oget_info_by_name( self->hdf5_handle, buffer, &obj_info, H5O_INFO_BASIC, H5P_DEFAULT );
|
||||
+#else
|
||||
herr_t h5e = H5Oget_info_by_name( self->hdf5_handle, buffer, &obj_info, H5P_DEFAULT );
|
||||
+#endif
|
||||
if ( h5e >= 0 )
|
||||
{
|
||||
switch( obj_info.type )
|
|
@ -0,0 +1,27 @@
|
|||
--- libs/ascp/CMakeLists.txt.orig 2023-07-10 16:23:35 UTC
|
||||
+++ libs/ascp/CMakeLists.txt
|
||||
@@ -23,12 +23,17 @@
|
||||
# ===========================================================================
|
||||
|
||||
set ( UNIX_SRC unix/connect.c )
|
||||
+# FIXME: Add BSD-specific ascp-path.c
|
||||
+# Aspera can be installed and run with linux compat
|
||||
+set ( BSD_SRC ${UNIX_SRC} linux/ascp-path.c )
|
||||
set ( LINUX_SRC ${UNIX_SRC} linux/ascp-path.c )
|
||||
set ( MAC_SRC ${UNIX_SRC} mac/ascp-path.c )
|
||||
set ( WIN_SRC win/connect.c win/ascp-path.c )
|
||||
|
||||
if ( "windows" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${WIN_SRC} )
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ set ( OS_SPECIFIC_SRC ${BSD_SRC} )
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
|
||||
elseif( "mac" STREQUAL ${OS} )
|
||||
@@ -49,4 +54,4 @@ GenerateStaticLibs(ascp
|
||||
)
|
||||
|
||||
add_compile_definitions( __mod__="libs/ascp" )
|
||||
-include_directories( BEFORE ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
\ No newline at end of file
|
||||
+include_directories( BEFORE ${CMAKE_CURRENT_SOURCE_DIR} )
|
|
@ -0,0 +1,10 @@
|
|||
--- libs/general-writer/general-writer.cpp.orig 2023-05-11 11:57:33 UTC
|
||||
+++ libs/general-writer/general-writer.cpp
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#define PROGRESS_EVENT 0
|
||||
+#define UNUSED(x) ((void)(x))
|
||||
|
||||
namespace ncbi
|
||||
{
|
|
@ -1,30 +0,0 @@
|
|||
--- ncbi-vdb/build/Makefile.clang.orig 2021-03-15 18:16:43 UTC
|
||||
+++ ncbi-vdb/build/Makefile.clang
|
||||
@@ -24,23 +24,23 @@
|
||||
|
||||
|
||||
# compilers
|
||||
-CC = @ $(TOP)/build/cc.sh $(OS) 'clang -c' \
|
||||
+CC = @ $(TOP)/build/cc.sh $(OS) '$(CCNAME) -c' \
|
||||
$(CHECKSUM) --objx $(OBJX) --cflags "$(CFLAGS)" -MD
|
||||
-CP = @ $(TOP)/build/cc.sh $(OS) 'clang++ -c' \
|
||||
+CP = @ $(TOP)/build/cc.sh $(OS) '$(CXXNAME) -c' \
|
||||
$(CHECKSUM) --objx $(OBJX) -stdlib=libc++ --cflags "$(CPFLAGS)" -MD
|
||||
|
||||
# C preprocessor
|
||||
PP = gcc -E $(CFLAGS)
|
||||
|
||||
# linkers
|
||||
-LD = @ $(TOP)/build/ld.sh $(OS) $(ARCH) clang \
|
||||
+LD = @ $(TOP)/build/ld.sh $(OS) $(ARCH) $(CCNAME) \
|
||||
--build $(BUILD) --ldflags "$(LDFLAGS)" $(STATIC) \
|
||||
$(STATICSYSLIBS) $(CHECKSUM) --objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
|
||||
-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
|
||||
|
||||
LPFLAGS = $(LDFLAGS)
|
||||
|
||||
-LP = @ $(TOP)/build/ld.sh $(OS) $(ARCH) clang++ \
|
||||
+LP = @ $(TOP)/build/ld.sh $(OS) $(ARCH) $(CXXNAME) \
|
||||
--build $(BUILD) --ldflags "$(LDFLAGS)" $(STATIC) \
|
||||
$(STATICSYSLIBS) $(CHECKSUM) --objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
|
||||
-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
|
|
@ -1,25 +0,0 @@
|
|||
--- ncbi-vdb/build/Makefile.env.orig 2021-03-15 18:16:43 UTC
|
||||
+++ ncbi-vdb/build/Makefile.env
|
||||
@@ -333,6 +333,22 @@ INCDIRS = \
|
||||
$(addprefix -I,$(XTINC) $(NGSINC)) \
|
||||
-I.
|
||||
|
||||
+# linker paths
|
||||
+LDPATHS =
|
||||
+
|
||||
+ifneq (,$(HDF5_LIBDIR))
|
||||
+ LDPATHS += -L$(HDF5_LIBDIR)
|
||||
+endif
|
||||
+ifneq (,$(XML2_LIBDIR))
|
||||
+ LDPATHS += -L$(XML2_LIBDIR)
|
||||
+endif
|
||||
+ifneq (,$(MAGIC_LIBDIR))
|
||||
+ LDPATHS += -L$(MAGIC_LIBDIR)
|
||||
+endif
|
||||
+ifneq (,$(FUSE_LIBDIR))
|
||||
+ LDPATHS += -L$(FUSE_LIBDIR)
|
||||
+endif
|
||||
+
|
||||
|
||||
# defines that describe os & architecture
|
||||
DLLX ?= $(SHLX)
|
|
@ -1,35 +0,0 @@
|
|||
--- ncbi-vdb/build/Makefile.gcc.orig 2017-07-14 21:55:36 UTC
|
||||
+++ ncbi-vdb/build/Makefile.gcc
|
||||
@@ -22,25 +22,27 @@
|
||||
#
|
||||
# ===========================================================================
|
||||
|
||||
+CCNAME ?= gcc
|
||||
+CXXNAME ?= g++
|
||||
|
||||
# compilers
|
||||
-CC = @ $(TOP)/build/cc.sh $(OS) 'gcc -c' \
|
||||
+CC = @ $(TOP)/build/cc.sh $(OS) '$(CCNAME) -c' \
|
||||
$(CHECKSUM) --objx $(OBJX) --cflags "$(CFLAGS)" -MD
|
||||
-CP = @ $(TOP)/build/cc.sh $(OS) 'g++ -c' \
|
||||
+CP = @ $(TOP)/build/cc.sh $(OS) '$(CXXNAME) -c' \
|
||||
$(CHECKSUM) --objx $(OBJX) --cflags "$(CPFLAGS)" -MD
|
||||
|
||||
# C preprocessor
|
||||
-PP = gcc -E $(CFLAGS)
|
||||
+PP = $(CCNAME) -E $(CFLAGS)
|
||||
|
||||
# linkers
|
||||
-LD = @ $(TOP)/build/ld.sh $(OS) $(ARCH) gcc \
|
||||
+LD = @ $(TOP)/build/ld.sh $(OS) $(ARCH) $(CCNAME) \
|
||||
--build $(BUILD) --ldflags "$(LDFLAGS)" $(STATIC) \
|
||||
$(STATICSYSLIBS) $(CHECKSUM) --objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
|
||||
-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
|
||||
|
||||
LPFLAGS = $(LDFLAGS)
|
||||
|
||||
-LP = @ $(TOP)/build/ld.sh $(OS) $(ARCH) g++ \
|
||||
+LP = @ $(TOP)/build/ld.sh $(OS) $(ARCH) $(CXXNAME) \
|
||||
--build $(BUILD) --ldflags "$(LPFLAGS)" $(STATIC) \
|
||||
$(STATICSYSLIBS) $(CHECKSUM) --objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
|
||||
-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
|
|
@ -1,11 +0,0 @@
|
|||
--- ncbi-vdb/build/Makefile.install.orig 2021-03-15 18:16:43 UTC
|
||||
+++ ncbi-vdb/build/Makefile.install
|
||||
@@ -69,7 +69,7 @@ ifeq (1,$(HAVE_HDF5))
|
||||
endif
|
||||
|
||||
|
||||
-LIB_TARGET = $(INST_LIBDIR)$(BITS)
|
||||
+LIB_TARGET = $(INST_LIBDIR)
|
||||
|
||||
LIBRARIES_WITH_PREFIX = \
|
||||
$(addprefix $(LIB_TARGET)/$(LPFX),$(LIBRARIES_TO_INSTALL))
|
|
@ -1,31 +0,0 @@
|
|||
--- ncbi-vdb/build/Makefile.shell.orig 2017-07-14 21:55:36 UTC
|
||||
+++ ncbi-vdb/build/Makefile.shell
|
||||
@@ -36,6 +36,9 @@ endif
|
||||
ifeq (Linux, $(UNAME))
|
||||
HOST_OS = linux
|
||||
endif
|
||||
+ifeq (FreeBSD, $(UNAME))
|
||||
+ HOST_OS = bsd
|
||||
+endif
|
||||
ifeq (SunOS, $(UNAME))
|
||||
HOST_OS = sun
|
||||
ARCHITECTURES = x86_64 i386
|
||||
@@ -83,6 +86,9 @@ else
|
||||
ifeq (x86_64, $(MARCH))
|
||||
HOST_ARCH = x86_64
|
||||
endif
|
||||
+ ifeq (amd64, $(MARCH))
|
||||
+ HOST_ARCH = x86_64
|
||||
+ endif
|
||||
ifeq (i86pc, $(MARCH))
|
||||
HOST_ARCH = x86_64
|
||||
ARCHITECTURES = x86_64 i386
|
||||
@@ -93,7 +99,7 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
-ARCH = $(HOST_ARCH)
|
||||
+override ARCH = $(HOST_ARCH)
|
||||
REMOTE_ARCH = $(ARCH)
|
||||
|
||||
# pick up dependencies from object directory
|
|
@ -0,0 +1,47 @@
|
|||
--- ncbi-vdb/build/env.cmake.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/build/env.cmake
|
||||
@@ -75,9 +75,15 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
|
||||
set(OS "mac")
|
||||
set(SHLX "dylib")
|
||||
+elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" )
|
||||
+ set(OS "bsd")
|
||||
+ set(SHLX "so")
|
||||
elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
|
||||
set(OS "linux")
|
||||
set(SHLX "so")
|
||||
+elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD" )
|
||||
+ set(OS "bsd")
|
||||
+ set(SHLX "so")
|
||||
elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
|
||||
set(OS "windows")
|
||||
else()
|
||||
@@ -99,6 +105,8 @@ elseif ( ${_system_processor} STREQUAL "x86_64")
|
||||
set(ARCH "x86_64")
|
||||
elseif ( ${_system_processor} STREQUAL "AMD64")
|
||||
set(ARCH "x86_64")
|
||||
+elseif ( ${_system_processor} STREQUAL "amd64")
|
||||
+ set(ARCH "x86_64")
|
||||
else ()
|
||||
message ( FATAL_ERROR "unknown architecture " ${_system_processor})
|
||||
endif ()
|
||||
@@ -110,6 +118,9 @@ if ( "mac" STREQUAL ${OS} )
|
||||
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
||||
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ add_compile_definitions( BSD UNIX )
|
||||
+ set( LMCHECK "" )
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
add_compile_definitions( LINUX UNIX )
|
||||
set( LMCHECK -lmcheck )
|
||||
@@ -241,6 +252,9 @@ endif()
|
||||
|
||||
if ( "mac" STREQUAL ${OS} )
|
||||
include_directories(interfaces/os/mac)
|
||||
+ include_directories(interfaces/os/unix)
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ include_directories(interfaces/os/bsd)
|
||||
include_directories(interfaces/os/unix)
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
include_directories(interfaces/os/linux)
|
|
@ -1,85 +0,0 @@
|
|||
--- ncbi-vdb/interfaces/os/sun/atomic32.h.orig 2021-03-15 18:16:43 UTC
|
||||
+++ ncbi-vdb/interfaces/os/sun/atomic32.h
|
||||
@@ -1,3 +1,66 @@
|
||||
+#ifndef _h_atomic32_
|
||||
+#define _h_atomic32_
|
||||
+
|
||||
+#include <sys/types.h>
|
||||
+#include <machine/atomic.h>
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ * /usr/src/sys/cddl/compat/opensolaris/sys/atomic.h
|
||||
+ * BSD license
|
||||
+ */
|
||||
+
|
||||
+#if defined(__i386__) || defined(__amd64__) || defined(__arm__)
|
||||
+/* No spurious failures from fcmpset. */
|
||||
+#define STRONG_FCMPSET
|
||||
+#endif
|
||||
+
|
||||
+static inline uint32_t
|
||||
+atomic_cas_32(volatile uint32_t *target, uint32_t cmp, uint32_t newval)
|
||||
+{
|
||||
+#ifdef STRONG_FCMPSET
|
||||
+ (void) atomic_fcmpset_32(target, &cmp, newval);
|
||||
+#else
|
||||
+ uint32_t expected = cmp;
|
||||
+
|
||||
+ do {
|
||||
+ if (atomic_fcmpset_32(target, &cmp, newval))
|
||||
+ break;
|
||||
+ } while (cmp == expected);
|
||||
+#endif
|
||||
+ return (cmp);
|
||||
+}
|
||||
+
|
||||
+static inline void atomic_inc_32(volatile uint32_t *target)
|
||||
+{
|
||||
+ atomic_add_32(target, 1);
|
||||
+}
|
||||
+
|
||||
+static __inline uint32_t atomic_add_32_nv(volatile uint32_t *target, int32_t delta)
|
||||
+{
|
||||
+ return (atomic_fetchadd_32(target, delta) + delta);
|
||||
+}
|
||||
+
|
||||
+static __inline uint32_t atomic_inc_32_nv(volatile uint32_t *target)
|
||||
+{
|
||||
+ return (atomic_add_32_nv(target, 1));
|
||||
+}
|
||||
+
|
||||
+static __inline void
|
||||
+atomic_dec_32(volatile uint32_t *target)
|
||||
+{
|
||||
+ atomic_subtract_32(target, 1);
|
||||
+}
|
||||
+
|
||||
+static __inline uint32_t
|
||||
+atomic_dec_32_nv(volatile uint32_t *target)
|
||||
+{
|
||||
+ return (atomic_fetchadd_32(target, -1) - 1);
|
||||
+}
|
||||
+
|
||||
/*===========================================================================
|
||||
*
|
||||
* PUBLIC DOMAIN NOTICE
|
||||
@@ -23,15 +86,6 @@
|
||||
* ===========================================================================
|
||||
*
|
||||
*/
|
||||
-
|
||||
-#ifndef _h_atomic32_
|
||||
-#define _h_atomic32_
|
||||
-
|
||||
-#include <sys/atomic.h>
|
||||
-
|
||||
-#ifdef __cplusplus
|
||||
-extern "C" {
|
||||
-#endif
|
||||
|
||||
#ifndef __inline__
|
||||
#define __inline__ inline
|
|
@ -0,0 +1,11 @@
|
|||
--- ncbi-vdb/libs/align/samextract-lib.cpp.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/align/samextract-lib.cpp
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
-#if LINUX
|
||||
+#if BSD || LINUX
|
||||
#include <unistd.h>
|
||||
#define DFL_THREAD_COUNT ((int)sysconf( _SC_NPROCESSORS_ONLN ) - 1)
|
||||
#else
|
|
@ -1,12 +0,0 @@
|
|||
--- ncbi-vdb/libs/ext/Makefile.orig 2021-03-15 18:16:43 UTC
|
||||
+++ ncbi-vdb/libs/ext/Makefile
|
||||
@@ -32,9 +32,6 @@ include $(TOP)/build/Makefile.shell
|
||||
# default
|
||||
#
|
||||
SUBDIRS = \
|
||||
- zlib \
|
||||
- bzip2 \
|
||||
- magic \
|
||||
mbedtls
|
||||
|
||||
include $(TOP)/build/Makefile.targets
|
|
@ -0,0 +1,19 @@
|
|||
--- ncbi-vdb/libs/kapp/CMakeLists.txt.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/kapp/CMakeLists.txt
|
||||
@@ -23,12 +23,16 @@
|
||||
# ===========================================================================
|
||||
|
||||
set ( UNIX_SRC unix/args-conv-os.c unix/sysmain.c )
|
||||
+# Must patch hw.memsize -> hw.usermem
|
||||
+set ( BSD_SRC ${UNIX_SRC} mac/ram.c )
|
||||
set ( LINUX_SRC ${UNIX_SRC} linux/ram.c )
|
||||
set ( MAC_SRC ${UNIX_SRC} mac/ram.c )
|
||||
set ( WIN_SRC win/args-conv-os.c win/ram.c win/sysmain.c )
|
||||
|
||||
if ( "windows" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${WIN_SRC} )
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ set ( OS_SPECIFIC_SRC ${BSD_SRC} )
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
|
||||
elseif( "mac" STREQUAL ${OS} )
|
|
@ -0,0 +1,17 @@
|
|||
--- ncbi-vdb/libs/kapp/mac/ram.c.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/kapp/mac/ram.c
|
||||
@@ -46,7 +46,14 @@ rc_t KAppGetTotalRam ( uint64_t * totalRam )
|
||||
|
||||
assert ( totalRam != 0 );
|
||||
|
||||
+// FIXME: This file should probably be moved to bsd/ram.c
|
||||
+#if defined(__APPLE__)
|
||||
ret = sysctlbyname("hw.memsize", totalRam, &len, NULL, 0 );
|
||||
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
+ ret = sysctlbyname("hw.usermem", totalRam, &len, NULL, 0 );
|
||||
+#else
|
||||
+ #error "You need to add a sysctl for this platform."
|
||||
+#endif
|
||||
if ( ret < 0 )
|
||||
{
|
||||
int status = errno;
|
|
@ -0,0 +1,25 @@
|
|||
--- ncbi-vdb/libs/kfc/CMakeLists.txt.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/kfc/CMakeLists.txt
|
||||
@@ -23,12 +23,15 @@
|
||||
# ===========================================================================
|
||||
|
||||
set ( UNIX_SRC unix/sysctx.c unix/sysrsrc.c )
|
||||
+set ( BSD_SRC ${UNIX_SRC} )
|
||||
set ( LINUX_SRC ${UNIX_SRC} )
|
||||
set ( MAC_SRC ${UNIX_SRC} )
|
||||
set ( WIN_SRC win/sysctx.c win/sysrsrc.c )
|
||||
|
||||
if ( "windows" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${WIN_SRC} )
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
|
||||
elseif( "mac" STREQUAL ${OS} )
|
||||
@@ -48,4 +51,4 @@ set( SRC
|
||||
GenerateStaticLibs( kfc "${SRC}" )
|
||||
|
||||
add_compile_definitions (__mod__="libs/kfc")
|
||||
-include_directories( BEFORE ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
\ No newline at end of file
|
||||
+include_directories( BEFORE ${CMAKE_CURRENT_SOURCE_DIR} )
|
|
@ -1,20 +1,31 @@
|
|||
--- ncbi-vdb/libs/kfg/config.c.orig 2021-03-15 18:16:43 UTC
|
||||
--- ncbi-vdb/libs/kfg/config.c.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/kfg/config.c
|
||||
@@ -2577,7 +2577,7 @@ bool load_from_std_location ( KConfig *self, const KDi
|
||||
@@ -2574,7 +2574,7 @@ bool load_from_std_location ( KConfig *self, const KDi
|
||||
const char * std_locs [] =
|
||||
{
|
||||
#if ! WINDOWS
|
||||
- "/etc/ncbi",
|
||||
+ @@PREFIX@@ "/etc/ncbi",
|
||||
+ "/usr/local/etc/ncbi",
|
||||
#else
|
||||
"/c/ncbi",
|
||||
#endif
|
||||
@@ -2850,6 +2850,8 @@ void add_predefined_nodes ( KConfig * self, const char
|
||||
#define OS "win"
|
||||
#elif SUN
|
||||
#define OS "sun"
|
||||
+#elif BSD
|
||||
@@ -2588,7 +2588,7 @@ bool load_from_std_location ( KConfig *self, const KDi
|
||||
NCBI_VDB_NO_ETC_NCBI_KFG[0] != '\0')
|
||||
{
|
||||
DBGMSG(DBG_KFG, DBG_FLAG(DBG_KFG),
|
||||
- ("KFG: load from std. location /etc/ncbi is disabled. "
|
||||
+ ("KFG: load from std. location /usr/local/etc/ncbi is disabled. "
|
||||
"NCBI_VDB_NO_ETC_NCBI_KFG='%s'\n", NCBI_VDB_NO_ETC_NCBI_KFG));
|
||||
return loaded;
|
||||
}
|
||||
@@ -2839,7 +2839,9 @@ void add_predefined_nodes ( KConfig * self, const char
|
||||
update_node ( self, "kfg/arch/bits", buf, true );
|
||||
|
||||
/* *OS */
|
||||
-#if LINUX
|
||||
+#if BSD
|
||||
+ #define OS "bsd"
|
||||
#else
|
||||
#error unrecognized OS
|
||||
#endif
|
||||
+#elif LINUX
|
||||
#define OS "linux"
|
||||
#elif MAC
|
||||
#define OS "mac"
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
--- ncbi-vdb/libs/kfs/CMakeLists.txt.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/kfs/CMakeLists.txt
|
||||
@@ -23,6 +23,7 @@
|
||||
# ===========================================================================
|
||||
|
||||
set ( UNIX_SRC unix/sysdir.c unix/sysdll.c unix/sysfile.c unix/syslockfile.c unix/sysmmap.c )
|
||||
+set ( BSD_SRC ${UNIX_SRC} )
|
||||
set ( LINUX_SRC ${UNIX_SRC} )
|
||||
set ( MAC_SRC ${UNIX_SRC} )
|
||||
set ( WIN_SRC win/directory-path.c win/sysdir.c win/sysdll.c win/sysfile.c win/syslockfile.c win/sysmmap.c
|
||||
@@ -30,6 +31,7 @@ set ( WIN_SRC win/directory-path.c win/sysdir.c win/sy
|
||||
)
|
||||
|
||||
set ( UNIX_SRC_V2 unix/sysfile-v2.c )
|
||||
+set ( BSD_SRC_V2 ${UNIX_SRC_V2} )
|
||||
set ( LINUX_SRC_V2 ${UNIX_SRC_V2} )
|
||||
set ( MAC_SRC_V2 ${UNIX_SRC_V2} )
|
||||
set ( WIN_SRC_V2 win/sysfile-v2.c )
|
||||
@@ -37,6 +39,9 @@ set ( WIN_SRC_V2 win/sysfile-v2.c )
|
||||
if ( "windows" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${WIN_SRC} )
|
||||
include_directories( win )
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ set ( OS_SPECIFIC_SRC ${BSD_SRC} )
|
||||
+ include_directories( unix )
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
|
||||
include_directories( unix )
|
||||
@@ -106,4 +111,4 @@ GenerateStaticLibsWithDefs( kfs-nommap ${KFS_NOMMAP_SR
|
||||
GenerateStaticLibs( kfs "${KFS_SRC}" )
|
||||
|
||||
add_compile_definitions (__mod__="libs/kfs")
|
||||
-include_directories( BEFORE ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
\ No newline at end of file
|
||||
+include_directories( BEFORE ${CMAKE_CURRENT_SOURCE_DIR} )
|
|
@ -0,0 +1,11 @@
|
|||
--- ncbi-vdb/libs/kfs/unix/sysdir.c.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/kfs/unix/sysdir.c
|
||||
@@ -2291,6 +2291,8 @@ rc_t KSysDirOpenDirRead_v1 ( const KSysDir_v1 * self,
|
||||
rc_t rc;
|
||||
|
||||
rc = KSysDirMakePath_v1 ( self, rcOpening, true, full, sizeof full, path, args );
|
||||
+ // FIXME: Remove this debug statement
|
||||
+ // fprintf(stderr, "path = %s full = %s\n", path, full);
|
||||
if ( rc == 0 )
|
||||
{
|
||||
int t;
|
|
@ -0,0 +1,18 @@
|
|||
--- ncbi-vdb/libs/klib/CMakeLists.txt.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/klib/CMakeLists.txt
|
||||
@@ -24,12 +24,15 @@
|
||||
|
||||
set ( UNIX_BASE_SRC unix/misc.c unix/syslog.c unix/systime.c unix/syswriter.c )
|
||||
set ( UNIX_SRC ${UNIX_BASE_SRC} unix/syserrcode.c )
|
||||
+set ( BSD_SRC ${UNIX_SRC} )
|
||||
set ( LINUX_SRC ${UNIX_BASE_SRC} linux/syserrcode.c )
|
||||
set ( MAC_SRC ${UNIX_SRC} )
|
||||
set ( WIN_SRC win/misc.c win/sysalloc.c win/syserrcode.c win/syslog.c win/systime.c win/syswriter.c )
|
||||
|
||||
if ( "windows" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${WIN_SRC} )
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ set ( OS_SPECIFIC_SRC ${BSD_SRC} )
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
|
||||
elseif( "mac" STREQUAL ${OS} )
|
|
@ -0,0 +1,20 @@
|
|||
--- ncbi-vdb/libs/klib/hashfile.c.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/klib/hashfile.c
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#if LINUX
|
||||
+#if BSD || LINUX
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
@@ -346,7 +346,7 @@ static void * map_calloc( KHashFile * self, size_t siz
|
||||
KLockUnlock( self->alloc_lock );
|
||||
return NULL;
|
||||
}
|
||||
-#if LINUX
|
||||
+#if BSD || LINUX
|
||||
/* Not sure this helps */
|
||||
madvise( (void *)self->alloc_base, req, MADV_RANDOM );
|
||||
#endif
|
|
@ -1,11 +1,16 @@
|
|||
--- ncbi-vdb/libs/klib/unix/systime.c.orig 2017-07-14 21:55:36 UTC
|
||||
--- ncbi-vdb/libs/klib/unix/systime.c.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/klib/unix/systime.c
|
||||
@@ -142,7 +142,7 @@ LIB_EXPORT KTime_t CC KTimeMakeTime ( co
|
||||
@@ -142,7 +142,13 @@ LIB_EXPORT KTime_t CC KTimeMakeTime ( const KTime *sel
|
||||
t . tm_isdst = self -> dst;
|
||||
|
||||
ts = mktime ( &t );
|
||||
- ts -= timezone;
|
||||
+ ts += localtime(&ts)->tm_gmtoff;
|
||||
+#ifdef __FreeBSD__
|
||||
+ // This might be portable to all platforms
|
||||
+ ts += localtime(&ts)->tm_gmtoff;
|
||||
+#else
|
||||
+ // extern global in sys/time.h on Linux and some other platforms
|
||||
ts -= timezone;
|
||||
+#endif
|
||||
}
|
||||
|
||||
return ts;
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
--- ncbi-vdb/libs/kns/CMakeLists.txt.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/kns/CMakeLists.txt
|
||||
@@ -23,6 +23,7 @@
|
||||
# ===========================================================================
|
||||
|
||||
set ( UNIX_SRC unix/sysmgr.c unix/syssock.c unix/sysstream.c )
|
||||
+set ( BSD_SRC ${UNIX_SRC} mac/sysendpoint.c mac/syspoll.c )
|
||||
set ( LINUX_SRC ${UNIX_SRC} linux/sysendpoint.c linux/syspoll.c )
|
||||
set ( MAC_SRC ${UNIX_SRC} mac/sysendpoint.c mac/syspoll.c )
|
||||
set ( WIN_SRC win/sysendpoint.c win/sysmgr.c win/syssock.c win/sysstream.c )
|
||||
@@ -30,6 +31,9 @@ set ( WIN_SRC win/sysendpoint.c win/sysmgr.c win/sysso
|
||||
if ( "windows" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${WIN_SRC} )
|
||||
include_directories( win )
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ set ( OS_SPECIFIC_SRC ${BSD_SRC} )
|
||||
+ include_directories( unix )
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
|
||||
include_directories( unix )
|
|
@ -0,0 +1,11 @@
|
|||
--- ncbi-vdb/libs/kns/manager.c.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/kns/manager.c
|
||||
@@ -58,7 +58,7 @@
|
||||
#if HAVE_GNU_LIBC_VERSION_H
|
||||
#include <gnu/libc-version.h>
|
||||
#endif
|
||||
-#if LINUX
|
||||
+#if BSD || LINUX
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
--- ncbi-vdb/libs/kns/unix/syssock.c.orig 2017-07-14 21:55:36 UTC
|
||||
--- ncbi-vdb/libs/kns/unix/syssock.c.orig 2023-08-07 20:34:54 UTC
|
||||
+++ ncbi-vdb/libs/kns/unix/syssock.c
|
||||
@@ -66,6 +66,7 @@
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
--- ncbi-vdb/libs/kproc/CMakeLists.txt.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/kproc/CMakeLists.txt
|
||||
@@ -23,6 +23,7 @@
|
||||
# ===========================================================================
|
||||
|
||||
set ( UNIX_SRC unix/syscond.c unix/systhread.c unix/systimeout.c )
|
||||
+set ( BSD_SRC ${UNIX_SRC} bsd/syslock.c bsd/sysmgr.c)
|
||||
set ( LINUX_SRC ${UNIX_SRC} linux/sysbarrier.c linux/syslock.c linux/sysmgr.c )
|
||||
set ( MAC_SRC ${UNIX_SRC} bsd/syslock.c bsd/sysmgr.c)
|
||||
set ( WIN_SRC win/syscond.c win/syslock.c win/sysmgr.c win/systhread.c win/systimeout.c )
|
||||
@@ -30,6 +31,10 @@ set ( WIN_SRC win/syscond.c win/syslock.c win/sysmgr.c
|
||||
if ( "windows" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${WIN_SRC} )
|
||||
include_directories( win )
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ set ( OS_SPECIFIC_SRC ${BSD_SRC} )
|
||||
+ include_directories( bsd )
|
||||
+ include_directories( unix )
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
|
||||
include_directories( linux )
|
|
@ -0,0 +1,18 @@
|
|||
--- ncbi-vdb/libs/ktst/CMakeLists.txt.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/ktst/CMakeLists.txt
|
||||
@@ -23,12 +23,15 @@
|
||||
# ===========================================================================
|
||||
|
||||
set ( UNIX_SRC unix/systestenv )
|
||||
+set ( BSD_SRC ${UNIX_SRC} )
|
||||
set ( LINUX_SRC ${UNIX_SRC} )
|
||||
set ( MAC_SRC ${UNIX_SRC} )
|
||||
set ( WIN_SRC win/systestenv )
|
||||
|
||||
if ( "windows" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${WIN_SRC} )
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ set ( OS_SPECIFIC_SRC ${BSD_SRC} )
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
|
||||
elseif( "mac" STREQUAL ${OS} )
|
|
@ -1,20 +0,0 @@
|
|||
--- ncbi-vdb/libs/ncbi-vdb/Makefile.orig 2021-06-20 15:15:25 UTC
|
||||
+++ ncbi-vdb/libs/ncbi-vdb/Makefile
|
||||
@@ -138,9 +138,7 @@ VDB_LIB_CMN = \
|
||||
klib \
|
||||
kproc \
|
||||
$(LIBKQ) \
|
||||
- kfc \
|
||||
- bz2 \
|
||||
- z \
|
||||
+ kfc
|
||||
|
||||
VDB_LIB_RD = \
|
||||
align-reader \
|
||||
@@ -198,4 +196,4 @@ fuzz:
|
||||
$(TOP)/build/ld.sh linux x86_64 gcc --build dbg --ldflags "-g -m64" --objx o --shlx so --libx a --srcdir $(SRCDIR) --bindir $(BINDIR) --slib -o $(FLIBDIR)/libncbi-vdb.$(LIBX) -L$(FLIBDIR) $(VDB_LIB) $(VDB_NGS_LIB)
|
||||
|
||||
cleanfuzz:
|
||||
- rm -rf $(FLIBDIR)/*
|
||||
\ No newline at end of file
|
||||
+ rm -rf $(FLIBDIR)/*
|
|
@ -1,12 +0,0 @@
|
|||
--- ncbi-vdb/libs/search/Makefile.orig 2017-07-14 21:55:36 UTC
|
||||
+++ ncbi-vdb/libs/search/Makefile
|
||||
@@ -39,6 +39,9 @@ OBJFILES = \
|
||||
|
||||
include $(TOP)/build/Makefile.env
|
||||
|
||||
+CARCH += -msse2
|
||||
+# nucstrstr.c requires SSE2
|
||||
+
|
||||
#-------------------------------------------------------------------------------
|
||||
# outer targets
|
||||
#
|
|
@ -0,0 +1,25 @@
|
|||
--- ncbi-vdb/libs/vfs/CMakeLists.txt.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/libs/vfs/CMakeLists.txt
|
||||
@@ -23,12 +23,15 @@
|
||||
# ===========================================================================
|
||||
|
||||
set ( UNIX_SRC unix/syskeyring.c unix/syspath.c )
|
||||
+set ( BSD_SRC ${UNIX_SRC} )
|
||||
set ( LINUX_SRC ${UNIX_SRC} )
|
||||
set ( MAC_SRC ${UNIX_SRC} )
|
||||
set ( WIN_SRC win/syskeyring.c win/syspath.c )
|
||||
|
||||
if ( "windows" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${WIN_SRC} )
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ set ( OS_SPECIFIC_SRC ${BSD_SRC} )
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
|
||||
elseif( "mac" STREQUAL ${OS} )
|
||||
@@ -54,4 +57,4 @@ set( SRC
|
||||
GenerateStaticLibs( vfs "${SRC}" )
|
||||
|
||||
add_compile_definitions (__mod__="libs/vfs")
|
||||
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
\ No newline at end of file
|
||||
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
@ -1,243 +0,0 @@
|
|||
--- ncbi-vdb/setup/konfigure.perl.orig 2021-03-15 18:16:43 UTC
|
||||
+++ ncbi-vdb/setup/konfigure.perl
|
||||
@@ -192,7 +192,7 @@ if ($OPT{'help'}) {
|
||||
foreach (@ARGV) {
|
||||
@_ = split('=');
|
||||
next if ($#_ != 1);
|
||||
- $OPT{$_[0]} = $_[1] if ($_[0] eq 'CXX' || $_[0] eq 'LDFLAGS');
|
||||
+ $OPT{$_[0]} = $_[1] if ($_[0] eq 'CC' || $_[0] eq 'CXX' || $_[0] eq 'LDFLAGS' || $_[0] eq 'TOOLS');
|
||||
}
|
||||
|
||||
println "Configuring $PACKAGE_NAME package";
|
||||
@@ -204,7 +204,7 @@ print "checking system type... " unless ($AUTORUN);
|
||||
my ($OS, $ARCH, $OSTYPE, $MARCH, @ARCHITECTURES) = OsArch();
|
||||
println $OSTYPE unless ($AUTORUN);
|
||||
|
||||
-unless ($OSTYPE =~ /linux/i || $OSTYPE =~ /darwin/i || $OSTYPE eq 'win') {
|
||||
+unless ($OSTYPE =~ /linux/i || $OSTYPE =~ /freebsd/i || $OSTYPE =~ /darwin/i || $OSTYPE eq 'win') {
|
||||
println "configure: error: unsupported system '$OSTYPE'";
|
||||
exit 1;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ if ($OS eq 'linux') {
|
||||
|
||||
print "checking machine architecture... " unless ($AUTORUN);
|
||||
println $MARCH unless ($AUTORUN);
|
||||
-unless ($MARCH =~ /x86_64/i || $MARCH =~ /i?86/i || $MARCH =~ /aarch64/) {
|
||||
+unless ($MARCH =~ /x86_64/i || $MARCH =~ /amd64/i || $MARCH =~ /i?86/i || $MARCH =~ /aarch64/) {
|
||||
println "configure: error: unsupported architecture '$OSTYPE':'$MARCH'";
|
||||
exit 1;
|
||||
}
|
||||
@@ -310,7 +310,7 @@ print "checking for supported architecture... " unless
|
||||
|
||||
my $BITS;
|
||||
|
||||
-if ($MARCH =~ /x86_64/i) {
|
||||
+if ($MARCH =~ /(x86_|amd)64/i) {
|
||||
$BITS = 64;
|
||||
} elsif ($MARCH eq 'fat86') {
|
||||
$BITS = '32_64';
|
||||
@@ -337,6 +337,19 @@ if ($OSTYPE =~ /linux/i) {
|
||||
$OSINC = 'unix';
|
||||
$TOOLS = 'gcc' unless ($TOOLS);
|
||||
$PYTHON = 'python';
|
||||
+} elsif ($OSTYPE =~ /freebsd/i) {
|
||||
+ $LPFX = 'lib';
|
||||
+ $OBJX = 'o';
|
||||
+ $LOBX = 'pic.o';
|
||||
+ $LIBX = 'a';
|
||||
+ $SHLX = 'so';
|
||||
+ $EXEX = '';
|
||||
+ $OSINC = 'unix';
|
||||
+ unless ($TOOLS) {
|
||||
+ $TOOLS = 'clang';
|
||||
+ $TOOLS = $OPT{TOOLS} if ($OPT{TOOLS});
|
||||
+ }
|
||||
+ $PYTHON = $ENV{FREEBSD_PYTHON_CMD};
|
||||
} elsif ($OSTYPE =~ /darwin/i) {
|
||||
$LPFX = 'lib';
|
||||
$OBJX = 'o';
|
||||
@@ -362,17 +375,19 @@ my ($ARCH_FL, $DBG, $OPT, $PIC, $INC, $MD, $LDFLAGS) =
|
||||
|
||||
print "checking for supported tool chain... " unless ($AUTORUN);
|
||||
|
||||
+$CC = $OPT{CC } if ($OPT{CC });
|
||||
$CPP = $OPT{CXX } if ($OPT{CXX });
|
||||
$LDFLAGS = $OPT{LDFLAGS} if ($OPT{LDFLAGS});
|
||||
|
||||
if ($TOOLS =~ /gcc$/) {
|
||||
$CPP = 'g++' unless ($CPP);
|
||||
- $CC = "$TOOLS -c";
|
||||
+ $CC = 'gcc' unless ($CC);
|
||||
+ $LD = $CC;
|
||||
+ $CC = "$CC -c";
|
||||
$CP = "$CPP -c";
|
||||
$AR = 'ar rc';
|
||||
$ARX = 'ar x';
|
||||
$ARLS = 'ar t';
|
||||
- $LD = $TOOLS;
|
||||
$LP = $CPP;
|
||||
|
||||
$DBG = '-g -DDEBUG';
|
||||
@@ -382,21 +397,24 @@ if ($TOOLS =~ /gcc$/) {
|
||||
$MD = '-MD';
|
||||
} elsif ($TOOLS eq 'clang') {
|
||||
$CPP = 'clang++' unless ($CPP);
|
||||
- $CC = 'clang -c';
|
||||
- my $versionMin = '-mmacosx-version-min=10.10';
|
||||
+ $CC = 'clang' unless ($CC);
|
||||
+ $LD = $CC;
|
||||
+ $CC = "$CC -c";
|
||||
+ my $versionMin = '';
|
||||
+ $versionMin = '-mmacosx-version-min=10.6' if ($OSTYPE =~ /darwin/i);
|
||||
$CP = "$CPP -c $versionMin";
|
||||
if ($BITS ne '32_64') {
|
||||
$ARCH_FL = '-arch i386' if ($BITS == 32);
|
||||
$OPT = '-O3';
|
||||
$AR = 'ar rc';
|
||||
- $LD = "clang $ARCH_FL";
|
||||
+ $LD = "$LD $ARCH_FL";
|
||||
$LP = "$CPP $versionMin $ARCH_FL";
|
||||
} else {
|
||||
$MAKE_MANIFEST = '( echo "$^" > $@/manifest )';
|
||||
$ARCH_FL = '-arch i386 -arch x86_64';
|
||||
$OPT = '-O3';
|
||||
$AR = 'libtool -static -o';
|
||||
- $LD = "clang -Wl,-arch_multiple $ARCH_FL -Wl,-all_load";
|
||||
+ $LD = "$LD -Wl,-arch_multiple $ARCH_FL -Wl,-all_load";
|
||||
$LP = "$CPP $versionMin -Wl,-arch_multiple $ARCH_FL -Wl,-all_load";
|
||||
}
|
||||
$ARX = 'ar x';
|
||||
@@ -826,13 +844,13 @@ OS_ARCH = \$(shell perl \$(TOP)/setup/os-arch.perl)
|
||||
# install paths
|
||||
EndText
|
||||
|
||||
- L($F, "INST_BINDIR = $OPT{'bindir'}" ) if ($OPT{'bindir'});
|
||||
- L($F, "INST_LIBDIR = $OPT{'libdir'}" ) if ($OPT{'libdir'});
|
||||
- L($F, "INST_INCDIR = $OPT{'includedir'}" ) if ($OPT{'includedir'});
|
||||
- L($F, "INST_SCHEMADIR = $OPT{'shemadir'}" ) if ($OPT{'shemadir'});
|
||||
- L($F, "INST_SHAREDIR = $OPT{'sharedir'}" ) if ($OPT{'sharedir'});
|
||||
- L($F, "INST_JARDIR = $OPT{'javadir'}" ) if ($OPT{'javadir'});
|
||||
- L($F, "INST_PYTHONDIR = $OPT{'pythondir'}") if ($OPT{'pythondir'});
|
||||
+ L($F, "INST_BINDIR = \$(DESTDIR)$OPT{'bindir'}" ) if ($OPT{'bindir'});
|
||||
+ L($F, "INST_LIBDIR = \$(DESTDIR)$OPT{'libdir'}" ) if ($OPT{'libdir'});
|
||||
+ L($F, "INST_INCDIR = \$(DESTDIR)$OPT{'includedir'}" ) if ($OPT{'includedir'});
|
||||
+ L($F, "INST_SCHEMADIR = \$(DESTDIR)$OPT{'shemadir'}" ) if ($OPT{'shemadir'});
|
||||
+ L($F, "INST_SHAREDIR = \$(DESTDIR)$OPT{'sharedir'}" ) if ($OPT{'sharedir'});
|
||||
+ L($F, "INST_JARDIR = \$(DESTDIR)$OPT{'javadir'}" ) if ($OPT{'javadir'});
|
||||
+ L($F, "INST_PYTHONDIR = \$(DESTDIR)$OPT{'pythondir'}") if ($OPT{'pythondir'});
|
||||
|
||||
my ($E_VERSION_SHLX, $VERSION_SHLX,
|
||||
$E_MAJVERS_SHLX , $MAJMIN_SHLX, $MAJVERS_SHLX);
|
||||
@@ -896,7 +914,7 @@ MAJMIN_EXEX = \$(EXEX).\$(MAJMIN)
|
||||
MAJVERS_EXEX = \$(EXEX).\$(MAJVERS)
|
||||
|
||||
# system architecture and wordsize
|
||||
-ARCH = $ARCH
|
||||
+override ARCH = $ARCH
|
||||
EndText
|
||||
|
||||
L($F, "# ARCH = $ARCH ( $MARCH )") if ($ARCH ne $MARCH);
|
||||
@@ -932,7 +950,7 @@ EndText
|
||||
}
|
||||
L($F, "PIC = $PIC") if ($PIC);
|
||||
if ($PKG{LNG} eq 'C') {
|
||||
- if ($TOOLS =~ /clang/i) {
|
||||
+ if ($OSTYPE =~ /darwin/i) {
|
||||
L($F, 'SONAME = -install_name ' .
|
||||
'$(INST_LIBDIR)$(BITS)/$(subst $(VERSION),$(MAJVERS),$(@F)) \\');
|
||||
L($F, ' -compatibility_version $(MAJMIN) -current_version $(VERSION) \\');
|
||||
@@ -1043,7 +1061,7 @@ EndText
|
||||
L($F, '# directory rules');
|
||||
if ($PKG{LNG} eq 'C') {
|
||||
L($F, '$(BINDIR) $(LIBDIR) $(ILIBDIR) '
|
||||
- . '$(OBJDIR) $(INST_LIBDIR) $(INST_LIBDIR)$(BITS):');
|
||||
+ . '$(OBJDIR) $(INST_LIBDIR):');
|
||||
T($F, 'mkdir -p $@');
|
||||
} elsif ($PKG{LNG} eq 'JAVA') {
|
||||
# test if we have jni header path
|
||||
@@ -1073,12 +1091,12 @@ EndText
|
||||
L($F, 'export CONFIGURE_FOUND_XML2');
|
||||
L($F);
|
||||
|
||||
- if ($OS eq 'linux' || $OS eq 'mac') {
|
||||
+ if ($OS eq 'linux' || $OS eq 'bsd' || $OS eq 'mac') {
|
||||
L($F, '# installation rules');
|
||||
L($F,
|
||||
- '$(INST_LIBDIR)$(BITS)/%.$(VERSION_LIBX): $(LIBDIR)/%.$(VERSION_LIBX)');
|
||||
+ '$(INST_LIBDIR)/%.$(VERSION_LIBX): $(LIBDIR)/%.$(VERSION_LIBX)');
|
||||
T($F, '@ echo -n "installing \'$(@F)\'... "');
|
||||
- T($F, '@ if cp $^ $@ && chmod 644 $@; \\');
|
||||
+ T($F, '@ if $(BSD_INSTALL_DATA) $^ $@; \\');
|
||||
T($F, ' then \\');
|
||||
T($F, ' rm -f $(patsubst %$(VERSION),%$(MAJVERS),$@) '
|
||||
. '$(patsubst %$(VERSION_LIBX),%$(LIBX),$@) '
|
||||
@@ -1087,7 +1105,7 @@ EndText
|
||||
T($F, ' ln -s $(patsubst %$(VERSION),%$(MAJVERS),$(@F)) '
|
||||
. '$(patsubst %$(VERSION_LIBX),%$(LIBX),$@); \\');
|
||||
T($F, ' ln -s $(patsubst %$(VERSION_LIBX),%$(LIBX),$(@F)) ' .
|
||||
- '$(INST_LIBDIR)$(BITS)/$(patsubst %.$(VERSION_LIBX),%-static.$(LIBX),$(@F));'
|
||||
+ '$(INST_LIBDIR)/$(patsubst %.$(VERSION_LIBX),%-static.$(LIBX),$(@F));'
|
||||
. ' \\');
|
||||
T($F, ' echo success; \\');
|
||||
T($F, ' else \\');
|
||||
@@ -1097,15 +1115,15 @@ EndText
|
||||
L($F);
|
||||
|
||||
L($F,
|
||||
- '$(INST_LIBDIR)$(BITS)/%.$(VERSION_SHLX): $(LIBDIR)/%.$(VERSION_SHLX)');
|
||||
+ '$(INST_LIBDIR)/%.$(VERSION_SHLX): $(LIBDIR)/%.$(VERSION_SHLX)');
|
||||
T($F, '@ echo -n "installing \'$(@F)\'... "');
|
||||
- T($F, '@ if cp $^ $@ && chmod 755 $@; \\');
|
||||
+ T($F, '@ if $(BSD_INSTALL_LIB) $^ $@; \\');
|
||||
T($F, ' then \\');
|
||||
if ($OS ne 'mac') {
|
||||
T($F, ' rm -f $(patsubst %$(VERSION),%$(MAJVERS),$@) '
|
||||
. '$(patsubst %$(VERSION_SHLX),%$(SHLX),$@); \\');
|
||||
}
|
||||
- if ($OS eq 'linux') {
|
||||
+ if ($OS eq 'linux' || $OS eq 'bsd') {
|
||||
T($F, ' ln -s $(@F) $(patsubst %$(VERSION),%$(MAJVERS),$@); \\');
|
||||
} elsif ($OS eq 'mac') {
|
||||
T($F, ' ln -sf $(@F) '
|
||||
@@ -1124,7 +1142,7 @@ EndText
|
||||
|
||||
L($F, '$(INST_BINDIR)/%$(VERSION_EXEX): $(BINDIR)/%$(VERSION_EXEX)');
|
||||
T($F, '@ echo -n "installing \'$(@F)\'... "');
|
||||
- T($F, '@ if cp $^ $@ && chmod 755 $@; \\');
|
||||
+ T($F, '@ if $(BSD_INSTALL_PROGRAM) $^ $@; \\');
|
||||
T($F, ' then \\');
|
||||
T($F, ' rm -f $(patsubst %$(VERSION),%$(MAJVERS),$@) '
|
||||
. '$(patsubst %$(VERSION_EXEX),%$(EXEX),$@); \\');
|
||||
@@ -1406,7 +1424,7 @@ sub find_in_dir {
|
||||
++$found;
|
||||
}
|
||||
if (! $found) {
|
||||
- my $libdir = File::Spec->catdir($dir, 'lib' . $BITS);
|
||||
+ my $libdir = File::Spec->catdir($dir, 'lib');
|
||||
my $f = File::Spec->catdir($libdir, $lib);
|
||||
print "\tchecking $f\n\t" if ($OPT{'debug'});
|
||||
if (-e $f) {
|
||||
@@ -1628,12 +1646,12 @@ sub find_lib {
|
||||
|
||||
sub check_compiler {
|
||||
my ($t, $n, $I, @l) = @_;
|
||||
- my $tool = $TOOLS;
|
||||
+ my $tool = $CC;
|
||||
|
||||
if ($t eq 'L') {
|
||||
print "checking for $n library... ";
|
||||
} elsif ($t eq 'O') {
|
||||
- if ($tool && ($tool =~ /gcc$/ || $tool =~ /g\+\+$/)) {
|
||||
+ if ($tool && ($tool =~ /gcc/ || $tool =~ /g\+\+/)) {
|
||||
print "checking whether $tool accepts $n... ";
|
||||
} else {
|
||||
return;
|
||||
@@ -1706,7 +1724,7 @@ sub check_compiler {
|
||||
}
|
||||
}
|
||||
my $gcc = "| $tool -xc $flags " . ($I ? "-I$I " : ' ')
|
||||
- . ($l ? "-L$l " : ' ') . "- $library";
|
||||
+ . ($l ? "-L$l " : ' ') . "-o a.out - $library";
|
||||
$gcc .= ' 2> /dev/null' unless ($OPT{'debug'});
|
||||
|
||||
open GCC, $gcc or last;
|
|
@ -1,20 +0,0 @@
|
|||
--- ncbi-vdb/setup/os-arch.prl.orig 2021-03-15 18:16:43 UTC
|
||||
+++ ncbi-vdb/setup/os-arch.prl
|
||||
@@ -11,6 +11,8 @@ sub OsArch {
|
||||
chomp $UNAME;
|
||||
if ($UNAME =~ /Darwin/) {
|
||||
$HOST_OS = 'mac';
|
||||
+ } elsif ($UNAME =~ /.*BSD/) {
|
||||
+ $HOST_OS = 'bsd';
|
||||
} elsif ($UNAME =~ /Linux/) {
|
||||
$HOST_OS = 'linux';
|
||||
} elsif ($UNAME =~ /SunOS/) {
|
||||
@@ -48,6 +50,8 @@ sub OsArch {
|
||||
$HOST_ARCH = 'i386';
|
||||
}
|
||||
} elsif ($MARCH =~ /x86_64/) {
|
||||
+ $HOST_ARCH = 'x86_64';
|
||||
+ } elsif ($MARCH =~ /amd64/) {
|
||||
$HOST_ARCH = 'x86_64';
|
||||
} elsif ($MARCH =~ /i86pc/) {
|
||||
$HOST_ARCH = 'x86_64';
|
|
@ -1,11 +1,11 @@
|
|||
--- ncbi-vdb/test/kfg/kfgtest.cpp.orig 2019-08-20 18:27:10 UTC
|
||||
--- ncbi-vdb/test/kfg/kfgtest.cpp.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/test/kfg/kfgtest.cpp
|
||||
@@ -280,6 +280,8 @@ FIXTURE_TEST_CASE(predef_OS, KfgFixture)
|
||||
@@ -282,6 +282,8 @@ FIXTURE_TEST_CASE(predef_ARCHBITS, KfgFixture)
|
||||
FIXTURE_TEST_CASE(predef_OS, KfgFixture)
|
||||
{
|
||||
CreateAndLoad(GetName(), "var=$(OS)\n");
|
||||
+ #if BSD
|
||||
+ #define OS "bsd"
|
||||
#if LINUX
|
||||
#define OS "linux"
|
||||
+ #elif BSD
|
||||
+ #define OS "bsd"
|
||||
#elif SUN
|
||||
#define OS "sun"
|
||||
#elif MAC
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- ncbi-vdb/test/klib/printf-test.c.orig 2019-08-20 18:27:10 UTC
|
||||
--- ncbi-vdb/test/klib/printf-test.c.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/test/klib/printf-test.c
|
||||
@@ -503,7 +503,7 @@ rc_t run ( const char *progname )
|
||||
@@ -504,7 +504,7 @@ rc_t run ( const char *progname )
|
||||
if ( rc == 0 )
|
||||
{
|
||||
rc = make_initial_test ( field_width, precision, " ", "s", "Kurt is having a fit" );
|
||||
-#if !defined(__SunOS) && !defined(__sun__)
|
||||
+#if !defined(__SunOS) && !defined(__sun__) && !defined(__FreeBSD__)
|
||||
/* Solaris printf doesn't cope with NULLs */
|
||||
rc = make_initial_test ( field_width, precision, " ", "s", NULL );
|
||||
#endif
|
||||
#if 0
|
||||
/* The standard says this result is undefined, we shouldn't test for it, it is not consistent */
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
--- ncbi-vdb/test/kns/Makefile.orig 2021-03-15 18:16:43 UTC
|
||||
+++ ncbi-vdb/test/kns/Makefile
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
default: runtests
|
||||
|
||||
-runtests: run-tests run-test-proxy-with-scheme
|
||||
+runtests:
|
||||
|
||||
TOP ?= $(abspath ../..)
|
||||
MODULE = test/kns
|
||||
@@ -133,6 +133,7 @@ $(TEST_BINDIR)/test-kns: $(KNSTEST_OBJ)
|
||||
$(LP) --exe -o $@ $^ $(KNSTEST_LIB)
|
||||
|
||||
kns: test-kns
|
||||
+ if [ ! -d $(HOME)/.ncbi ]; then mkdir $(HOME)/.ncbi; fi
|
||||
$(TEST_BINDIR)/test-kns #-l=all
|
||||
|
||||
#----------------------------------------------------------------
|
|
@ -1,11 +0,0 @@
|
|||
--- ncbi-vdb/test/vdb/test-dependencies.cpp.orig 2019-08-20 18:27:10 UTC
|
||||
+++ ncbi-vdb/test/vdb/test-dependencies.cpp
|
||||
@@ -115,7 +115,7 @@ class EmptyFixture : public DepFixture { (public)
|
||||
|
||||
class RefseqFixture : public DepFixture {
|
||||
|
||||
- #if LINUX
|
||||
+ #if LINUX || BSD
|
||||
#define PATH "kfg/linux"
|
||||
#elif MAC
|
||||
#define PATH "kfg/mac"
|
|
@ -0,0 +1,12 @@
|
|||
--- ncbi-vdb/test/vdb/test-dependencies_dflt.cpp.orig 2023-07-10 16:13:36 UTC
|
||||
+++ ncbi-vdb/test/vdb/test-dependencies_dflt.cpp
|
||||
@@ -139,6 +139,9 @@ class EmptyFixture : public DepFixture { (public)
|
||||
|
||||
class RefseqFixture : public DepFixture {
|
||||
|
||||
+ #if BSD
|
||||
+ // FIXME: Should there be a separate kfg/freebsd?
|
||||
+ #define PATH "kfg/linux"
|
||||
#if LINUX
|
||||
#define PATH "kfg/linux"
|
||||
#elif MAC
|
|
@ -1,11 +0,0 @@
|
|||
--- ncbi-vdb/test/vfs/redirect-rejected-names-cgi-http-to-https.cpp.orig 2017-07-14 21:55:36 UTC
|
||||
+++ ncbi-vdb/test/vfs/redirect-rejected-names-cgi-http-to-https.cpp
|
||||
@@ -148,7 +148,7 @@ struct Test : protected ncbi :: NK :: Sh
|
||||
|
||||
TEST_CASE(TEST) {
|
||||
|
||||
-#define RESOLVER_CGI_HEAD "test.ncbi.nlm.nih."
|
||||
+#define RESOLVER_CGI_HEAD "www.ncbi.nlm.nih."
|
||||
|
||||
#ifdef VDB_3162
|
||||
#else
|
|
@ -1,13 +0,0 @@
|
|||
--- setup/install.perl.orig 2021-03-15 18:25:25 UTC
|
||||
+++ setup/install.perl
|
||||
@@ -1283,8 +1283,8 @@ sub prepare {
|
||||
' $_{INST_JARDIR } = "$_{PREFIX}/jar"; ' .
|
||||
' $_{INST_SHAREDIR} = "$_{PREFIX}/share"; ' .
|
||||
' $_{INCDIR } = "$Bin/../include"; ' .
|
||||
- ' $_{LIBDIR64 } = "$Bin/../lib64"; ' .
|
||||
- ' $_{LIBDIR32 } = "$Bin/../lib32"; ';
|
||||
+ ' $_{LIBDIR64 } = "$Bin/../lib"; ' .
|
||||
+ ' $_{LIBDIR32 } = "$Bin/../lib"; ';
|
||||
if ($HAVE{TWO_LIBS}) {
|
||||
$code .=
|
||||
'$_{INST_NGSLIBDIR} = "' . "$root/usr/local/ngs/ngs-sdk/lib\";"
|
|
@ -1,121 +0,0 @@
|
|||
--- setup/konfigure.perl.orig 2021-03-15 18:25:25 UTC
|
||||
+++ setup/konfigure.perl
|
||||
@@ -204,7 +204,7 @@ print "checking system type... " unless ($AUTORUN);
|
||||
my ($OS, $ARCH, $OSTYPE, $MARCH, @ARCHITECTURES) = OsArch();
|
||||
println $OSTYPE unless ($AUTORUN);
|
||||
|
||||
-unless ($OSTYPE =~ /linux/i || $OSTYPE =~ /darwin/i || $OSTYPE eq 'win') {
|
||||
+unless ($OSTYPE =~ /linux/i || $OSTYPE =~ /darwin/i || $OSTYPE eq 'win' || $OSTYPE =~ /freebsd/i) {
|
||||
println "configure: error: unsupported system '$OSTYPE'";
|
||||
exit 1;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ if ($OS eq 'linux') {
|
||||
|
||||
print "checking machine architecture... " unless ($AUTORUN);
|
||||
println $MARCH unless ($AUTORUN);
|
||||
-unless ($MARCH =~ /x86_64/i || $MARCH =~ /i?86/i || $MARCH =~ /aarch64/) {
|
||||
+unless ($MARCH =~ /x86_64/i || $MARCH =~ /amd64/i || $MARCH =~ /i?86/i || $MARCH =~ /aarch64/) {
|
||||
println "configure: error: unsupported architecture '$OSTYPE':'$MARCH'";
|
||||
exit 1;
|
||||
}
|
||||
@@ -310,7 +310,7 @@ print "checking for supported architecture... " unless
|
||||
|
||||
my $BITS;
|
||||
|
||||
-if ($MARCH =~ /x86_64/i) {
|
||||
+if ($MARCH =~ /x86_64/i || $MARCH =~ /amd64/i) {
|
||||
$BITS = 64;
|
||||
} elsif ($MARCH eq 'fat86') {
|
||||
$BITS = '32_64';
|
||||
@@ -337,6 +337,16 @@ if ($OSTYPE =~ /linux/i) {
|
||||
$OSINC = 'unix';
|
||||
$TOOLS = 'gcc' unless ($TOOLS);
|
||||
$PYTHON = 'python';
|
||||
+} elsif ($OSTYPE =~ /freebsd/i) {
|
||||
+ $LPFX = 'lib';
|
||||
+ $OBJX = 'o';
|
||||
+ $LOBX = 'pic.o';
|
||||
+ $LIBX = 'a';
|
||||
+ $SHLX = 'so';
|
||||
+ $EXEX = '';
|
||||
+ $OSINC = 'unix';
|
||||
+ $TOOLS = 'clang' unless ($TOOLS);
|
||||
+ $PYTHON = 'python';
|
||||
} elsif ($OSTYPE =~ /darwin/i) {
|
||||
$LPFX = 'lib';
|
||||
$OBJX = 'o';
|
||||
@@ -512,7 +522,7 @@ foreach my $href (DEPENDS()) {
|
||||
$I = $t if (-e $t);
|
||||
}
|
||||
push ( @L, File::Spec->catdir($OPT{$o}, 'lib') );
|
||||
- push ( @L, File::Spec->catdir($OPT{$o}, 'lib64') );
|
||||
+ #push ( @L, File::Spec->catdir($OPT{$o}, 'lib64') );
|
||||
}
|
||||
my ($i, $l) = find_lib($_, $I, @L);
|
||||
if (defined $i || $l) {
|
||||
@@ -934,7 +944,7 @@ EndText
|
||||
if ($PKG{LNG} eq 'C') {
|
||||
if ($TOOLS =~ /clang/i) {
|
||||
L($F, 'SONAME = -install_name ' .
|
||||
- '$(INST_LIBDIR)$(BITS)/$(subst $(VERSION),$(MAJVERS),$(@F)) \\');
|
||||
+ '$(INST_LIBDIR)/$(subst $(VERSION),$(MAJVERS),$(@F)) \\');
|
||||
L($F, ' -compatibility_version $(MAJMIN) -current_version $(VERSION) \\');
|
||||
L($F, ' -flat_namespace -undefined suppress');
|
||||
} else {
|
||||
@@ -1043,7 +1053,7 @@ EndText
|
||||
L($F, '# directory rules');
|
||||
if ($PKG{LNG} eq 'C') {
|
||||
L($F, '$(BINDIR) $(LIBDIR) $(ILIBDIR) '
|
||||
- . '$(OBJDIR) $(INST_LIBDIR) $(INST_LIBDIR)$(BITS):');
|
||||
+ . '$(OBJDIR) $(INST_LIBDIR) $(INST_LIBDIR):');
|
||||
T($F, 'mkdir -p $@');
|
||||
} elsif ($PKG{LNG} eq 'JAVA') {
|
||||
# test if we have jni header path
|
||||
@@ -1076,7 +1086,7 @@ EndText
|
||||
if ($OS eq 'linux' || $OS eq 'mac') {
|
||||
L($F, '# installation rules');
|
||||
L($F,
|
||||
- '$(INST_LIBDIR)$(BITS)/%.$(VERSION_LIBX): $(LIBDIR)/%.$(VERSION_LIBX)');
|
||||
+ '$(INST_LIBDIR)/%.$(VERSION_LIBX): $(LIBDIR)/%.$(VERSION_LIBX)');
|
||||
T($F, '@ echo -n "installing \'$(@F)\'... "');
|
||||
T($F, '@ if cp $^ $@ && chmod 644 $@; \\');
|
||||
T($F, ' then \\');
|
||||
@@ -1087,7 +1097,7 @@ EndText
|
||||
T($F, ' ln -s $(patsubst %$(VERSION),%$(MAJVERS),$(@F)) '
|
||||
. '$(patsubst %$(VERSION_LIBX),%$(LIBX),$@); \\');
|
||||
T($F, ' ln -s $(patsubst %$(VERSION_LIBX),%$(LIBX),$(@F)) ' .
|
||||
- '$(INST_LIBDIR)$(BITS)/$(patsubst %.$(VERSION_LIBX),%-static.$(LIBX),$(@F));'
|
||||
+ '$(INST_LIBDIR)/$(patsubst %.$(VERSION_LIBX),%-static.$(LIBX),$(@F));'
|
||||
. ' \\');
|
||||
T($F, ' echo success; \\');
|
||||
T($F, ' else \\');
|
||||
@@ -1097,7 +1107,7 @@ EndText
|
||||
L($F);
|
||||
|
||||
L($F,
|
||||
- '$(INST_LIBDIR)$(BITS)/%.$(VERSION_SHLX): $(LIBDIR)/%.$(VERSION_SHLX)');
|
||||
+ '$(INST_LIBDIR)/%.$(VERSION_SHLX): $(LIBDIR)/%.$(VERSION_SHLX)');
|
||||
T($F, '@ echo -n "installing \'$(@F)\'... "');
|
||||
T($F, '@ if cp $^ $@ && chmod 755 $@; \\');
|
||||
T($F, ' then \\');
|
||||
@@ -1168,9 +1178,9 @@ EndText
|
||||
print $F " \$_{INCDIR } = '" . expand("$Bin/.." ) . "';\n";
|
||||
if ($PKG{LNG} ne 'PYTHON') {
|
||||
print $F " \$_{BINDIR$BITS} = '" . expand($E_BINDIR ) . "';\n";
|
||||
- print $F " \$_{LIBDIR$BITS} = '" . expand($E_LIBDIR ) . "';\n";
|
||||
+ print $F " \$_{LIBDIR} = '" . expand($E_LIBDIR ) . "';\n";
|
||||
} elsif ($OPT{PYTHON_LIB_PATH}) {
|
||||
- print $F " \$_{LIBDIR$BITS} = '$OPT{PYTHON_LIB_PATH}';\n";
|
||||
+ print $F " \$_{LIBDIR} = '$OPT{PYTHON_LIB_PATH}';\n";
|
||||
}
|
||||
print $F " \$_{OTHER_PREFIX } = '$PKG{UPATH}';\n";
|
||||
print $F " \$_{PREFIX } = '$OPT{'prefix'}';\n";
|
||||
@@ -1406,7 +1416,7 @@ sub find_in_dir {
|
||||
++$found;
|
||||
}
|
||||
if (! $found) {
|
||||
- my $libdir = File::Spec->catdir($dir, 'lib' . $BITS);
|
||||
+ my $libdir = File::Spec->catdir($dir, 'lib');
|
||||
my $f = File::Spec->catdir($libdir, $lib);
|
||||
print "\tchecking $f\n\t" if ($OPT{'debug'});
|
||||
if (-e $f) {
|
|
@ -1,10 +0,0 @@
|
|||
--- tools/bam-loader/loader-imp.c.orig 2021-06-20 16:59:47 UTC
|
||||
+++ tools/bam-loader/loader-imp.c
|
||||
@@ -71,6 +71,7 @@
|
||||
#include <sysalloc.h>
|
||||
#include <atomic32.h>
|
||||
|
||||
+#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
|
@ -1,11 +0,0 @@
|
|||
--- tools/copycat/Makefile.orig 2021-06-20 17:45:49 UTC
|
||||
+++ tools/copycat/Makefile
|
||||
@@ -92,7 +92,7 @@ COPYCAT_LIB = \
|
||||
-stk-version \
|
||||
-sncbi-vdb \
|
||||
-skff \
|
||||
- -smagic-static
|
||||
+ -smagic
|
||||
|
||||
|
||||
$(BINDIR)/copycat: $(COPYCAT_OBJ)
|
|
@ -1,16 +0,0 @@
|
|||
--- tools/driver-tool/Makefile.orig 2021-03-15 18:25:25 UTC
|
||||
+++ tools/driver-tool/Makefile
|
||||
@@ -97,7 +97,12 @@ SRATOOLS_OBJ = \
|
||||
SRATOOLS_LIB = \
|
||||
-sncbi-vdb \
|
||||
-sjson \
|
||||
- -lm
|
||||
+ -lepoll-shim \
|
||||
+ -lmbedtls \
|
||||
+ -lm \
|
||||
+ -lexecinfo \
|
||||
+ -lz \
|
||||
+ -lbz2
|
||||
|
||||
$(BINDIR)/sratools: $(SRATOOLS_OBJ) $(ILIBDIR)/libjson.$(LIBX)
|
||||
$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SRATOOLS_LIB)
|
|
@ -1,13 +0,0 @@
|
|||
--- tools/driver-tool/cmdline.cpp.orig 2021-04-21 19:42:12 UTC
|
||||
+++ tools/driver-tool/cmdline.cpp
|
||||
@@ -50,6 +50,10 @@
|
||||
#define environ (*_NSGetEnviron())
|
||||
#endif
|
||||
|
||||
+#if defined(__FreeBSD__)
|
||||
+extern char **environ;
|
||||
+#endif
|
||||
+
|
||||
#define TRACE( lvl, ... ) /* ignore */
|
||||
|
||||
namespace ncbi
|
|
@ -1,11 +0,0 @@
|
|||
--- 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) $@
|
|
@ -0,0 +1,20 @@
|
|||
--- tools/external/driver-tool/file-path.posix.cpp.orig 2023-07-10 16:23:35 UTC
|
||||
+++ tools/external/driver-tool/file-path.posix.cpp
|
||||
@@ -193,7 +193,16 @@ static char const *find_executable_path(char const *co
|
||||
FilePath FilePath::fullPathToExecutable(char const *const *const argv, char const *const *const envp, char const *const *const extra)
|
||||
{
|
||||
char const *path;
|
||||
-#if LINUX
|
||||
+// Assume sra-tools is installed by FreeBSD ports. FreeBSD users
|
||||
+// don't often install software by other means. Default prefix
|
||||
+// is /usr/local, but this can be overridden by the user building
|
||||
+// the port. The port can replace /usr/local using sed if that's the
|
||||
+// case.
|
||||
+#if BSD
|
||||
+ char full_path[PATH_MAX];
|
||||
+ snprintf(full_path, PATH_MAX, "/usr/local/bin/%s", argv[0]);
|
||||
+ path = full_path;
|
||||
+#elif LINUX
|
||||
path = "/proc/self/exe";
|
||||
#elif MAC
|
||||
path = find_executable_path(extra, argv[0]);
|
|
@ -0,0 +1,25 @@
|
|||
--- tools/external/driver-tool/sratools.cpp.orig 2023-07-10 16:23:35 UTC
|
||||
+++ tools/external/driver-tool/sratools.cpp
|
||||
@@ -420,6 +420,7 @@ static int main(CommandLine const &argv)
|
||||
enableLogging(argv.toolName.c_str());
|
||||
#endif
|
||||
LOG(7) << "executable path: " << (std::string)argv.fullPathToExe << std::endl;
|
||||
+ // std::cerr << "executable path: " << (std::string)argv.fullPathToExe << std::endl;
|
||||
|
||||
config = new Config();
|
||||
struct Defer { ~Defer() { delete config; config = nullptr; } } freeConfig;
|
||||
@@ -576,6 +577,14 @@ static int main(CommandLine const &argv)
|
||||
}
|
||||
|
||||
} // namespace sratools
|
||||
+
|
||||
+#if BSD
|
||||
+int main(int argc, char *argv[], char *envp[])
|
||||
+{
|
||||
+ auto const invocation = CommandLine(argc, argv, envp, nullptr);
|
||||
+ return sratools::main(invocation);
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#if MAC
|
||||
int main(int argc, char *argv[], char *envp[], char *apple[])
|
|
@ -0,0 +1,20 @@
|
|||
--- tools/external/vdb-config/tui/CMakeLists.txt.orig 2023-07-10 16:23:35 UTC
|
||||
+++ tools/external/vdb-config/tui/CMakeLists.txt
|
||||
@@ -25,6 +25,7 @@
|
||||
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
|
||||
|
||||
set ( UNIX_SRC unix/systui.c )
|
||||
+set ( BSD_SRC bsd/systui.c )
|
||||
set ( LINUX_SRC linux/systui.c )
|
||||
set ( MAC_SRC bsd/systui.c )
|
||||
set ( WIN_SRC win/systui.c )
|
||||
@@ -32,6 +33,9 @@ set ( WIN_SRC win/systui.c )
|
||||
if ( "windows" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${WIN_SRC} )
|
||||
#include_directories( win )
|
||||
+elseif( "bsd" STREQUAL ${OS} )
|
||||
+ set ( OS_SPECIFIC_SRC ${BSD_SRC} )
|
||||
+ #include_directories( unix )
|
||||
elseif( "linux" STREQUAL ${OS} )
|
||||
set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
|
||||
#include_directories( unix )
|
|
@ -1,11 +0,0 @@
|
|||
--- tools/fastq-loader/spot-assembler.c.orig 2021-06-20 17:00:29 UTC
|
||||
+++ tools/fastq-loader/spot-assembler.c
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#include "spot-assembler.h"
|
||||
|
||||
+#include <sys/stat.h>
|
||||
+
|
||||
#include <klib/status.h>
|
||||
#include <klib/printf.h>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
--- tools/loaders/fastq-loader/spot-assembler.c.orig 2023-08-08 12:26:35 UTC
|
||||
+++ tools/loaders/fastq-loader/spot-assembler.c
|
||||
@@ -1,3 +1,4 @@
|
||||
+
|
||||
/*===========================================================================
|
||||
*
|
||||
* PUBLIC DOMAIN NOTICE
|
||||
@@ -25,6 +26,9 @@
|
||||
*/
|
||||
|
||||
#include "spot-assembler.h"
|
||||
+
|
||||
+// FIXME: Unsure if this is still necessary
|
||||
+#include <sys/stat.h>
|
||||
|
||||
#include <klib/status.h>
|
||||
#include <klib/printf.h>
|
|
@ -1,13 +0,0 @@
|
|||
--- tools/sra-sort/Makefile.orig 2021-06-20 22:24:20 UTC
|
||||
+++ tools/sra-sort/Makefile
|
||||
@@ -135,7 +135,9 @@ DBB_OBJ = \
|
||||
$(addsuffix .$(OBJX),$(DBB_SRC))
|
||||
|
||||
DBB_LIB = \
|
||||
- -lncbi-vdb \
|
||||
+ -sncbi-vdb \
|
||||
|
||||
$(BINDIR)/dump-blob-boundaries: $(DBB_OBJ)
|
||||
+ @echo "LD = ${LD}"
|
||||
+ @echo "DBB_LIB = ${DBB_LIB}"
|
||||
$(LD) --exe -o $@ $^ $(DBB_LIB)
|
|
@ -1,13 +0,0 @@
|
|||
--- tools/util/validate-names4.c.orig 2021-06-20 17:53:25 UTC
|
||||
+++ tools/util/validate-names4.c
|
||||
@@ -30,8 +30,8 @@
|
||||
#include <klib/rc.h> /* RC */
|
||||
#include <vfs/path.h> /* VPath */
|
||||
|
||||
-#include "../../../ncbi-vdb/libs/vfs/json-response.h" /* Response4Make4 */
|
||||
-#include "../../../ncbi-vdb/libs/vfs/services-priv.h"/*KServiceGetKSrvResponse*/
|
||||
+#include "../libs/vfs/json-response.h" /* Response4Make4 */
|
||||
+#include "../libs/vfs/services-priv.h"/*KServiceGetKSrvResponse*/
|
||||
|
||||
#define RELEASE(type, obj) do { rc_t rc2 = type##Release(obj); \
|
||||
if (rc2 && !rc) { rc = rc2; } obj = NULL; } while (false)
|
|
@ -1,16 +1,13 @@
|
|||
SRA tools is a toolkit for using data in the INSDC Sequence Read Archives.
|
||||
|
||||
SRAs operated by International Nucleotide Sequence Database Collaboration
|
||||
houses sequence reads and alignments generated by "next-gen" sequencers.
|
||||
SRA tools allows conversion of .sra files, which INSDC SRAs maintain,
|
||||
from/to other formats that the 'next-gen' sequenecers generate including:
|
||||
|
||||
* csfasta/csqual (ABI SOLiD)
|
||||
* fastq (and fasta for writing)
|
||||
* hdf5 (PacBio, reading only)
|
||||
* qseq (older Illumina)
|
||||
* sam (writing only) / bam (reading only)
|
||||
* sff
|
||||
|
||||
The toolkit uses NCBI-VDB back-end enabling seamless access to remote SRA data
|
||||
and local SRA files.
|
||||
|
|
|
@ -1,57 +1,282 @@
|
|||
bin/abi-dump
|
||||
bin/abi-load
|
||||
bin/align-cache
|
||||
bin/abi-dump.3
|
||||
bin/abi-dump.3.0.6
|
||||
bin/align-info
|
||||
bin/bam-load
|
||||
bin/align-info.3
|
||||
bin/align-info.3.0.6
|
||||
bin/cache-mgr
|
||||
bin/ccextract
|
||||
bin/cg-load
|
||||
bin/cache-mgr.3
|
||||
bin/cache-mgr.3.0.6
|
||||
bin/check-corrupt
|
||||
bin/copycat
|
||||
bin/check-corrupt.3
|
||||
bin/check-corrupt.3.0.6
|
||||
bin/fasterq-dump
|
||||
bin/fasterq-dump-orig.3.0.6
|
||||
bin/fasterq-dump.3
|
||||
bin/fasterq-dump.3.0.6
|
||||
bin/fastq-dump
|
||||
bin/fastq-load
|
||||
bin/helicos-load
|
||||
bin/fastq-dump-orig.3.0.6
|
||||
bin/fastq-dump.3
|
||||
bin/fastq-dump.3.0.6
|
||||
bin/illumina-dump
|
||||
bin/illumina-load
|
||||
bin/kar
|
||||
bin/kar+
|
||||
bin/kar+meta
|
||||
bin/kdb-index
|
||||
bin/illumina-dump.3
|
||||
bin/illumina-dump.3.0.6
|
||||
bin/kdbmeta
|
||||
bin/kget
|
||||
bin/latf-load
|
||||
bin/make-read-filter
|
||||
bin/md5cp
|
||||
bin/kdbmeta.3
|
||||
bin/kdbmeta.3.0.6
|
||||
bin/ngs-pileup
|
||||
bin/pacbio-correct
|
||||
bin/pacbio-loadxml
|
||||
bin/ngs-pileup.3
|
||||
bin/ngs-pileup.3.0.6
|
||||
bin/prefetch
|
||||
bin/qual-recalib-stat
|
||||
bin/prefetch-orig.3.0.6
|
||||
bin/prefetch.3
|
||||
bin/prefetch.3.0.6
|
||||
bin/rcexplain
|
||||
bin/read-filter-redact
|
||||
bin/rcexplain.3
|
||||
bin/rcexplain.3.0.6
|
||||
bin/ref-variation
|
||||
bin/ref-variation.3
|
||||
bin/ref-variation.3.0.6
|
||||
bin/sam-dump
|
||||
bin/samview
|
||||
bin/schema-replace
|
||||
bin/sam-dump-orig.3.0.6
|
||||
bin/sam-dump.3
|
||||
bin/sam-dump.3.0.6
|
||||
bin/sff-dump
|
||||
bin/sff-load
|
||||
bin/sff-dump.3
|
||||
bin/sff-dump.3.0.6
|
||||
bin/sra-info
|
||||
bin/sra-info.3
|
||||
bin/sra-info.3.0.6
|
||||
bin/sra-pileup
|
||||
bin/sra-sort
|
||||
bin/sra-sort-cg
|
||||
bin/sra-pileup-orig.3.0.6
|
||||
bin/sra-pileup.3
|
||||
bin/sra-pileup.3.0.6
|
||||
bin/sra-search
|
||||
bin/sra-search.3
|
||||
bin/sra-search.3.0.6
|
||||
bin/sra-stat
|
||||
bin/sra-stat.3
|
||||
bin/sra-stat.3.0.6
|
||||
bin/srapath
|
||||
bin/srapath-orig.3.0.6
|
||||
bin/srapath.3
|
||||
bin/srapath.3.0.6
|
||||
bin/sratools
|
||||
bin/srf-load
|
||||
bin/test-read-write-cursor
|
||||
bin/sratools.3
|
||||
bin/sratools.3.0.6
|
||||
bin/test-sra
|
||||
bin/test-sra.3
|
||||
bin/test-sra.3.0.6
|
||||
bin/var-expand
|
||||
bin/var-expand.3
|
||||
bin/var-expand.3.0.6
|
||||
bin/vdb-config
|
||||
bin/vdb-copy
|
||||
bin/vdb-config.3
|
||||
bin/vdb-config.3.0.6
|
||||
bin/vdb-decrypt
|
||||
bin/vdb-diff
|
||||
bin/vdb-decrypt.3
|
||||
bin/vdb-decrypt.3.0.6
|
||||
bin/vdb-dump
|
||||
bin/vdb-dump-orig.3.0.6
|
||||
bin/vdb-dump.3
|
||||
bin/vdb-dump.3.0.6
|
||||
bin/vdb-encrypt
|
||||
bin/vdb-lock
|
||||
bin/vdb-passwd
|
||||
bin/vdb-sql
|
||||
bin/vdb-unlock
|
||||
bin/vdb-encrypt.3
|
||||
bin/vdb-encrypt.3.0.6
|
||||
bin/vdb-validate
|
||||
bin/vdb-validate.3
|
||||
bin/vdb-validate.3.0.6
|
||||
include/ncbi-vdb/NGS.hpp
|
||||
include/ngs/Alignment.hpp
|
||||
include/ngs/AlignmentIterator.hpp
|
||||
include/ngs/ErrorMsg.hpp
|
||||
include/ngs/Fragment.hpp
|
||||
include/ngs/FragmentIterator.hpp
|
||||
include/ngs/Package.hpp
|
||||
include/ngs/Pileup.hpp
|
||||
include/ngs/PileupEvent.hpp
|
||||
include/ngs/PileupEventIterator.hpp
|
||||
include/ngs/PileupIterator.hpp
|
||||
include/ngs/Read.hpp
|
||||
include/ngs/ReadCollection.hpp
|
||||
include/ngs/ReadGroup.hpp
|
||||
include/ngs/ReadGroupIterator.hpp
|
||||
include/ngs/ReadIterator.hpp
|
||||
include/ngs/Reference.hpp
|
||||
include/ngs/ReferenceIterator.hpp
|
||||
include/ngs/ReferenceSequence.hpp
|
||||
include/ngs/Statistics.hpp
|
||||
include/ngs/StringRef.hpp
|
||||
include/ngs/adapter/AlignmentItf.hpp
|
||||
include/ngs/adapter/ErrorMsg.hpp
|
||||
include/ngs/adapter/FragmentItf.hpp
|
||||
include/ngs/adapter/PileupEventItf.hpp
|
||||
include/ngs/adapter/PileupItf.hpp
|
||||
include/ngs/adapter/ReadCollectionItf.hpp
|
||||
include/ngs/adapter/ReadGroupItf.hpp
|
||||
include/ngs/adapter/ReadItf.hpp
|
||||
include/ngs/adapter/Refcount.hpp
|
||||
include/ngs/adapter/ReferenceItf.hpp
|
||||
include/ngs/adapter/ReferenceSequenceItf.hpp
|
||||
include/ngs/adapter/StatisticsItf.hpp
|
||||
include/ngs/adapter/StringItf.hpp
|
||||
include/ngs/adapter/defs.h
|
||||
include/ngs/inl/Alignment.hpp
|
||||
include/ngs/inl/AlignmentIterator.hpp
|
||||
include/ngs/inl/Fragment.hpp
|
||||
include/ngs/inl/FragmentIterator.hpp
|
||||
include/ngs/inl/Package.hpp
|
||||
include/ngs/inl/Pileup.hpp
|
||||
include/ngs/inl/PileupEvent.hpp
|
||||
include/ngs/inl/PileupEventIterator.hpp
|
||||
include/ngs/inl/PileupIterator.hpp
|
||||
include/ngs/inl/Read.hpp
|
||||
include/ngs/inl/ReadCollection.hpp
|
||||
include/ngs/inl/ReadGroup.hpp
|
||||
include/ngs/inl/ReadGroupIterator.hpp
|
||||
include/ngs/inl/ReadIterator.hpp
|
||||
include/ngs/inl/Reference.hpp
|
||||
include/ngs/inl/ReferenceIterator.hpp
|
||||
include/ngs/inl/ReferenceSequence.hpp
|
||||
include/ngs/inl/Statistics.hpp
|
||||
include/ngs/inl/StringRef.hpp
|
||||
include/ngs/itf/AlignmentItf.h
|
||||
include/ngs/itf/AlignmentItf.hpp
|
||||
include/ngs/itf/ErrBlock.h
|
||||
include/ngs/itf/ErrBlock.hpp
|
||||
include/ngs/itf/ErrorMsg.hpp
|
||||
include/ngs/itf/FragmentItf.h
|
||||
include/ngs/itf/FragmentItf.hpp
|
||||
include/ngs/itf/PackageItf.hpp
|
||||
include/ngs/itf/PileupEventItf.h
|
||||
include/ngs/itf/PileupEventItf.hpp
|
||||
include/ngs/itf/PileupItf.h
|
||||
include/ngs/itf/PileupItf.hpp
|
||||
include/ngs/itf/ReadCollectionItf.h
|
||||
include/ngs/itf/ReadCollectionItf.hpp
|
||||
include/ngs/itf/ReadGroupItf.h
|
||||
include/ngs/itf/ReadGroupItf.hpp
|
||||
include/ngs/itf/ReadItf.h
|
||||
include/ngs/itf/ReadItf.hpp
|
||||
include/ngs/itf/Refcount.h
|
||||
include/ngs/itf/Refcount.hpp
|
||||
include/ngs/itf/ReferenceItf.h
|
||||
include/ngs/itf/ReferenceItf.hpp
|
||||
include/ngs/itf/ReferenceSequenceItf.h
|
||||
include/ngs/itf/ReferenceSequenceItf.hpp
|
||||
include/ngs/itf/StatisticsItf.h
|
||||
include/ngs/itf/StatisticsItf.hpp
|
||||
include/ngs/itf/StringItf.h
|
||||
include/ngs/itf/StringItf.hpp
|
||||
include/ngs/itf/VTable.h
|
||||
include/ngs/itf/VTable.hpp
|
||||
include/ngs/itf/defs.h
|
||||
include/ngs/unix/arm64/atomic32.h
|
||||
include/ngs/unix/fat86/atomic32.h
|
||||
include/ngs/unix/i386/atomic32.h
|
||||
include/ngs/unix/x86_64/atomic32.h
|
||||
include/ngs/win/atomic32.h
|
||||
include/ngs/win/stdbool.h
|
||||
jar/ngs-doc.jar
|
||||
jar/ngs-examples.jar
|
||||
jar/ngs-java.jar
|
||||
jar/ngs-src.jar
|
||||
lib64/libncbi-ngs-c++-static.a
|
||||
lib64/libncbi-ngs-c++.a
|
||||
lib64/libncbi-ngs-c++.a.3
|
||||
lib64/libncbi-ngs-c++.a.3.0.6
|
||||
lib64/libncbi-ngs-static.a
|
||||
lib64/libncbi-ngs.a
|
||||
lib64/libncbi-ngs.a.3
|
||||
lib64/libncbi-ngs.a.3.0.6
|
||||
lib64/libncbi-ngs.so
|
||||
lib64/libncbi-ngs.so.3
|
||||
lib64/libncbi-ngs.so.3.0.6
|
||||
lib64/libngs-c++-static.a
|
||||
lib64/libngs-c++.a
|
||||
lib64/libngs-c++.a.3
|
||||
lib64/libngs-c++.a.3.0.6
|
||||
lib64/libngs-c++.so
|
||||
lib64/libngs-c++.so.3
|
||||
lib64/libngs-c++.so.3.0.6
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/AlignSliceTest.cpp
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/AlignTest.cpp
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/DumpReferenceFASTA.cpp
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/FragTest.cpp
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/PileupTest.cpp
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README.txt
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/RefTest.cpp
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/expected.txt
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/Makefile
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/README.txt
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/examples/AlignSliceTest.java
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/examples/AlignTest.java
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/examples/DumpReferenceFASTA.java
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/examples/FragTest.java
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/examples/PileupTest.java
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/examples/ReadGroupTest.java
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/examples/RefTest.java
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/java/expected.txt
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/python/AlignSliceTest.py
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/python/AlignTest.py
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/python/FragTest.py
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/python/Makefile
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/python/PileupTest.py
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/python/README.txt
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/python/RefTest.py
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/python/expected.txt
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/allclasses-index.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/allpackages-index.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/constant-values.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/element-list
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/gov/nih/nlm/ncbi/ngs/LibDependencies.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/gov/nih/nlm/ncbi/ngs/NGS.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/gov/nih/nlm/ncbi/ngs/package-summary.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/gov/nih/nlm/ncbi/ngs/package-tree.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/help-doc.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/index-all.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/index.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/jquery-ui.overrides.css
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/legal/ADDITIONAL_LICENSE_INFO
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/legal/ASSEMBLY_EXCEPTION
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/legal/LICENSE
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/legal/jquery.md
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/legal/jqueryUI.md
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/member-search-index.js
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/module-search-index.js
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/Alignment.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/AlignmentIterator.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/ErrorMsg.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/Fragment.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/FragmentIterator.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/Package.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/Pileup.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/PileupEvent.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/PileupEventIterator.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/PileupIterator.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/Read.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/ReadCollection.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/ReadGroup.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/ReadGroupIterator.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/ReadIterator.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/Reference.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/ReferenceIterator.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/ReferenceSequence.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/Statistics.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/package-summary.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/ngs/package-tree.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/overview-summary.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/overview-tree.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/package-search-index.js
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/resources/glass.png
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/resources/x.png
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/script-dir/jquery-3.6.1.min.js
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/script-dir/jquery-ui.min.css
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/script-dir/jquery-ui.min.js
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/script.js
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/search.js
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/serialized-form.html
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/stylesheet.css
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/tag-search-index.js
|
||||
%%JAVASHAREDIR%%doc/ngs-doc/type-search-index.js
|
||||
|
|
Loading…
Reference in New Issue