Skip to content
Commits on Source (9)
# ===========================================================================
#
# 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.
#
# ===========================================================================
The NCBI NGS Software Development Kit
Contact: sra-tools@ncbi.nlm.nih.gov
NGS SDK 2.9.0
February 23, 2018
version: changed version to match that of ncbi-vdb
build: Fixed configure allowing to run it on Perl with version >= v5.26 that has "." removed from @INC
kfg: added searching of configuration files in ../etc/ncbi/ relative to the binaries
kfs: fix to improve on windows
klib: Reverted KTimeMakeTime to use UTC
kns: Accept the same http_proxy specifications as wget
kns: Added possibility to report server's IP address after network error
kns: Ignore HTTP headers sent multiple times
kns: Improved reporting of network errors
kns: fixed generation of invalid error code in response to dropped connection
ncbi-vdb: fixed bug of directory not found on mac
ncbi-vdb, ngs-engine: improved handling of blobs inside the NGS engine
ngs: Examples for python 2.6 were removed
ngs: Python examples work with Python 2.6.6
ngs-engine: improved performance when iterating through partially aligned and unaligned reads
ngs-engine: optimized filtered access to unaligned runs
vfs: Name resolving service was updated and switched to protocol version 3.0
NGS SDK 1.3.0
October 7, 2016
HTTPS-ENABLED RELEASE
build, ngs-tools: Now ngs-tools look for its dependencies using their normal build paths and does not reconfigure them
build, ngs-tools: Now ngs-tools use CMAKE_INSTALL_PREFIX for installation path
kns: All tools and libraries now support https
ngs: Fixed all crashes when using null as string in ngs-java APIs
ngs: NGS_ReferenceGetChunk() will now return chunks potentially exceeding 5000 bases
ngs: fixed potential concurrency issues at exit, when called from Java
ngs: ngs-java and ngs-python auto-download (of native libraries) now works through HTTPS
ngs: read fragments of length 0 are now ignored
ngs, ngs-tools, ref-variation: added class ngs-vdb::VdbAlignment, featuring method IsFirst()
ngs-engine: improved diagnostic messages
ngs-tools: Fixed Makefiles to keep supporting "./configure; make" build of sra-search, alongside CMake-based build.
NGS SDK 1.2.5
July 11, 2016
blast, kfg, ncbi-vdb, sra-tools, vfs: restored possibility to disable local caching
htsjdk: Several JVM crashes related to a number of open files were fixed. New property to disable auto-download was integrated into HTSJDK
kfg: When loading configuration files on Windows USERPROFILE environment variable is used before HOME
ngs, search, sra-search: sra-search was modified to support multiple threads.
ngs-engine, ngs-tools, sra-tools, vfs: The "auxiliary" nodes in configuration are now ignored
ngs-engine: Added support for blob-by-blob access to SEQUENCE table
ngs-engine: removed a potential memory leak in NGS_CursorMake()
ngs: Fixed a bug in ngs::Alignment::getMateReferenceSpec() affecting pre-March 2015 runs
ngs: now supports parallel compilation with "make -j N"
vfs: environment variable VDB_PWFILE is no longer used
NGS SDK 1.2.4
May 25, 2016
build: MSVS 2013 toolset (12.0) is now supported across all repositories
doc, ngs: updated javadoc to include throws and other missing tags
examples, ngs: added DumpReferenceFASTA.py example
htsjdk: added code to HTS-JDK to avoid involving NGS unless we are sure that it is being requested
ngs, ngs-engine: Added filtering to NGS of secondary alignments that do not have primary alignments
ngs, test: ngs-python: fixed bug in String processing for Python 3.*
ngs-engine: ncbi-ngs engine was updated: fixed a bug that made NGS read iterator return 0 reads on WGS accessions.
ngs: Improved native library load in ngs-java, enhanced its error reporting and added a mode to disable auto-download of native libraries
ngs: Python code will check for the latest version of the libraries and update if newer ones are available
ngs: check for the latest version of the libraries and update if newer ones are available
ngs: simplified ngs-python bindings
# NCBI External Developer Release:
## NGS SDK 2.9.0
**February 23, 2018**
**version**: changed version to match that of _ncbi-vdb_
**build**: Fixed configure allowing to run it on Perl with version >= v5.26 that has "." removed from @INC
**kfg**: added searching of configuration files in ../etc/ncbi/ relative to the binaries
**kfs**: fix to improve on windows
**klib**: Reverted KTimeMakeTime to use UTC
**kns**: Accept the same http_proxy specifications as wget
**kns**: Added possibility to report server's IP address after network error
**kns**: Ignore HTTP headers sent multiple times
**kns**: Improved reporting of network errors
**kns**: fixed generation of invalid error code in response to dropped connection
**ncbi-vdb**: fixed bug of directory not found on mac
**ncbi-vdb, ngs-engine**: improved handling of blobs inside the NGS engine
**ngs**: Examples for python 2.6 were removed
**ngs**: Python examples work with Python 2.6.6
**ngs-engine**: improved performance when iterating through partially aligned and unaligned reads
**ngs-engine**: optimized filtered access to unaligned runs
**vfs**: Name resolving service was updated and switched to protocol version 3.0
## NGS SDK 1.3.0
**October 7, 2016**
......
......@@ -18,7 +18,7 @@ If you use software that accesses NCBI SRA data in any way, your software will l
If you develop software that relies on `sra-tools`, `ncbi-vdb` or `ngs` in any way, you will likely need to update your code so that it accesses NCBI using HTTPS.
We will be releasing new tools that are HTTPS compatible and `M-15-13` compliant in early September, 2016. Please be certain to update all of your binaries and configuration files.
We have released new tools with version 1.3.0 that are HTTPS compatible and `M-15-13` compliant as of October 7, 2016. Please be certain to [update all of your binaries](https://github.com/ncbi/sra-tools/wiki/Downloads) and configuration files.
# Documentation
......
ngs-sdk (2.9.0-1) unstable; urgency=medium
* New upstream version
* Standards-Version: 4.1.3
* debhelper 11
* Soname change for library: s/libngs-sdk1/libngs-sdk2/
* New Build-Depends: python3-distutils
-- Andreas Tille <tille@debian.org> Sat, 24 Mar 2018 09:34:17 +0100
ngs-sdk (1.3.0-3) unstable; urgency=medium
[ Scott Kitterman ]
......
......@@ -5,21 +5,22 @@ Uploaders: Andreas Tille <tille@debian.org>,
Vincent Danjean <vdanjean@debian.org>
Section: science
Priority: optional
Build-Depends: debhelper (>= 10),
Build-Depends: debhelper (>= 11~),
d-shlibs,
python-markdown,
python-all-dev,
python3-all,
python3-distutils,
dh-python,
javahelper,
maven-repo-helper,
default-jdk
Standards-Version: 4.1.0
Standards-Version: 4.1.3
Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/ngs-sdk.git
Vcs-Git: https://anonscm.debian.org/git/debian-med/ngs-sdk.git
Homepage: https://github.com/ncbi/ngs
Package: libngs-sdk1
Package: libngs-sdk2
Architecture: any
Section: libs
Depends: ${shlibs:Depends},
......@@ -42,7 +43,7 @@ Architecture: any
Section: libdevel
Depends: ${shlibs:Depends},
${misc:Depends},
libngs-sdk1 (= ${binary:Version})
libngs-sdk2 (= ${binary:Version})
Description: Next Generation Sequencing language Bindings (development)
NGS is a new, domain-specific API for accessing reads, alignments and
pileups produced from Next Generation Sequencing. The API itself is
......
Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
ngs-sdk (1.0.0-1) UNRELEASED; urgency=low
.
* Initial release (Closes: #<bug>)
Author: Andreas Tille <tille@debian.org>
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>
--- /dev/null
+++ ngs-sdk-1.0.0/ngs-java/Makefile.config
@@ -0,0 +1,4 @@
+### AUTO-GENERATED FILE ###
+
+OS_ARCH = $(shell perl $(TOP)/os-arch.perl)
+include $(TOP)/./Makefile.config.$(OS_ARCH)
--- /dev/null
+++ ngs-sdk-1.0.0/ngs-java/Makefile.config.linux.x86_64
@@ -0,0 +1,139 @@
+### AUTO-GENERATED FILE ###
+
+OS_ARCH = $(shell perl $(TOP)/os-arch.perl)
+
+# install paths
+INST_BINDIR = /usr/bin
+INST_LIBDIR = /usr/lib
+INST_INCDIR = /usr/include
+INST_SHAREDIR = /usr/share
+INST_JARDIR = /usr/jar
+
+# build type
+BUILD = rel
+
+# target OS
+OS = linux
+OSINC = unix
+
+# prefix string for system libraries
+LPFX = lib
+
+# suffix strings for system libraries
+LIBX = a
+VERSION_LIBX = $(LIBX).$(VERSION)
+MAJMIN_LIBX = $(LIBX).$(MAJMIN)
+MAJVERS_LIBX = $(LIBX).$(MAJVERS)
+
+SHLX = so
+VERSION_SHLX = $(SHLX).$(VERSION)
+MAJMIN_SHLX = $(SHLX).$(MAJMIN)
+MAJVERS_SHLX = $(SHLX).$(MAJVERS)
+
+# suffix strings for system object files
+OBJX = o
+LOBX = pic.o
+
+# suffix string for system executable
+EXEX =
+VERSION_EXEX = $(EXEX).$(VERSION)
+MAJMIN_EXEX = $(EXEX).$(MAJMIN)
+MAJVERS_EXEX = $(EXEX).$(MAJVERS)
+
+# system architecture and wordsize
+ARCH = x86_64
+BITS = 64
+
+# tools
+JAVAC = javac
+JAVAH = javah
+JAR = jar cf
+
+# tool options
+SRCINC = -sourcepath $(INCPATHS)
+CLSPATH = -classpath $(CLSDIR)
+
+# NGS-JAVA and library version
+VERSION = 1.0.0
+MAJMIN = 1.0
+MAJVERS = 1
+
+# output path
+TARGDIR = /home/andreas/ncbi-outdir/ngs-java/linux/jdk/x86_64/rel
+
+# derived paths
+MODPATH ?= $(subst $(TOP)/,,$(CURDIR))
+SRCDIR ?= $(TOP)/$(MODPATH)
+MAKEFILE ?= $(abspath $(firstword $(MAKEFILE_LIST)))
+BINDIR = $(TARGDIR)/bin
+LIBDIR = $(TARGDIR)/jar
+ILIBDIR = $(TARGDIR)/ilib
+OBJDIR = $(TARGDIR)/obj/$(MODPATH)
+CLSDIR = $(TARGDIR)/cls
+INCPATHS = $(SRCDIR):$(SRCDIR)/itf:$(TOP)/gov/nih/nlm/ncbi/ngs
+
+# exports
+export TOP
+export MODPATH
+export SRCDIR
+export MAKEFILE
+
+# auto-compilation rules
+$(OBJDIR)/%.$(OBJX): %.cpp
+ $(CP) -o $@ $< $(CFLAGS)
+$(OBJDIR)/%.$(LOBX): %.cpp
+ $(CP) -o $@ $< $(PIC) $(CFLAGS)
+
+VPATH = $(SRCDIR)
+
+# directory rules
+$(LIBDIR) $(CLSDIR) $(INST_JARDIR):
+ mkdir -p $@
+
+# not real targets
+.PHONY: default clean install all std $(TARGETS)
+
+# dependencies
+include $(wildcard $(CLSDIR)/*.d)
+NGS_INCDIR = /home/andreas/debian-maintain/alioth/debian-med_git/ngs-sdk/ngs-sdk
+
+# installation rules
+$(INST_LIBDIR)$(BITS)/%.$(VERSION_LIBX): $(LIBDIR)/%.$(VERSION_LIBX)
+ @ echo -n "installing '$(@F)'... "
+ @ if cp $^ $@ && chmod 644 $@; \
+ then \
+ rm -f $(subst $(VERSION),$(MAJVERS),$@) $(subst $(VERSION_LIBX),$(LIBX),$@) $(subst .$(VERSION_LIBX),-static.$(LIBX),$@); \
+ ln -s $(@F) $(subst $(VERSION),$(MAJVERS),$@); \
+ ln -s $(subst $(VERSION),$(MAJVERS),$(@F)) $(subst $(VERSION_LIBX),$(LIBX),$@); \
+ ln -s $(subst $(VERSION_LIBX),$(LIBX),$(@F)) $(INST_LIBDIR)$(BITS)/$(subst .$(VERSION_LIBX),-static.$(LIBX),$(@F)); \
+ echo success; \
+ else \
+ echo failure; \
+ false; \
+ fi
+
+$(INST_LIBDIR)$(BITS)/%.$(VERSION_SHLX): $(LIBDIR)/%.$(VERSION_SHLX)
+ @ echo -n "installing '$(@F)'... "
+ @ if cp $^ $@ && chmod 755 $@; \
+ then \
+ rm -f $(subst $(VERSION),$(MAJVERS),$@) $(subst $(VERSION_SHLX),$(SHLX),$@); \
+ ln -s $(@F) $(subst $(VERSION),$(MAJVERS),$@); \
+ ln -s $(subst $(VERSION),$(MAJVERS),$(@F)) $(subst $(VERSION_SHLX),$(SHLX),$@); \
+ echo success; \
+ else \
+ echo failure; \
+ false; \
+ fi
+
+$(INST_BINDIR)/%$(VERSION_EXEX): $(BINDIR)/%$(VERSION_EXEX)
+ @ echo -n "installing '$(@F)'... "
+ @ if cp $^ $@ && chmod 755 $@; \
+ then \
+ rm -f $(subst $(VERSION),$(MAJVERS),$@) $(subst $(VERSION_EXEX),$(EXEX),$@); \
+ ln -s $(@F) $(subst $(VERSION),$(MAJVERS),$@); \
+ ln -s $(subst $(VERSION),$(MAJVERS),$(@F)) $(subst $(VERSION_EXEX),$(EXEX),$@); \
+ echo success; \
+ else \
+ echo failure; \
+ false; \
+ fi
--- /dev/null
+++ ngs-sdk-1.0.0/ngs-sdk/Makefile.config
@@ -0,0 +1,4 @@
+### AUTO-GENERATED FILE ###
+
+OS_ARCH = $(shell perl $(TOP)/os-arch.perl)
+include $(TOP)/./Makefile.config.$(OS_ARCH)
--- /dev/null
+++ ngs-sdk-1.0.0/ngs-sdk/Makefile.config.linux.x86_64
@@ -0,0 +1,150 @@
+### AUTO-GENERATED FILE ###
+
+OS_ARCH = $(shell perl $(TOP)/os-arch.perl)
+
+# install paths
+INST_BINDIR = /usr/bin
+INST_LIBDIR = /usr/lib
+INST_INCDIR = /usr/include
+INST_SHAREDIR = /usr/share
+
+# build type
+BUILD = rel
+
+# target OS
+OS = linux
+OSINC = unix
+
+# prefix string for system libraries
+LPFX = lib
+
+# suffix strings for system libraries
+LIBX = a
+VERSION_LIBX = $(LIBX).$(VERSION)
+MAJMIN_LIBX = $(LIBX).$(MAJMIN)
+MAJVERS_LIBX = $(LIBX).$(MAJVERS)
+
+SHLX = so
+VERSION_SHLX = $(SHLX).$(VERSION)
+MAJMIN_SHLX = $(SHLX).$(MAJMIN)
+MAJVERS_SHLX = $(SHLX).$(MAJVERS)
+
+# suffix strings for system object files
+OBJX = o
+LOBX = pic.o
+
+# suffix string for system executable
+EXEX =
+VERSION_EXEX = $(EXEX).$(VERSION)
+MAJMIN_EXEX = $(EXEX).$(MAJMIN)
+MAJVERS_EXEX = $(EXEX).$(MAJVERS)
+
+# system architecture and wordsize
+ARCH = x86_64
+BITS = 64
+
+# tools
+CC = gcc -c
+CP = g++ -c
+AR = ar rc
+ARX = ar x
+ARLS = ar t
+LD = gcc
+LP = g++
+
+# tool options
+DBG = -DNDEBUG
+OPT = -O3
+PIC = -fPIC
+SONAME = -Wl,-soname=$(subst $(VERSION),$(MAJVERS),$(@F))
+SRCINC = -I. -I$(SRCDIR)
+INCDIRS = $(SRCINC) -I$(TOP)
+CFLAGS = $(DBG) $(OPT) $(INCDIRS) -MD
+CLSPATH = -classpath $(CLSDIR)
+
+# NGS-SDK and library version
+VERSION = 1.0.0
+MAJMIN = 1.0
+MAJVERS = 1
+
+# output path
+TARGDIR = /home/andreas/ncbi-outdir/ngs-sdk/linux/gcc/x86_64/rel
+
+# derived paths
+MODPATH ?= $(subst $(TOP)/,,$(CURDIR))
+SRCDIR ?= $(TOP)/$(MODPATH)
+MAKEFILE ?= $(abspath $(firstword $(MAKEFILE_LIST)))
+BINDIR = $(TARGDIR)/bin
+LIBDIR = $(TARGDIR)/lib
+ILIBDIR = $(TARGDIR)/ilib
+OBJDIR = $(TARGDIR)/obj/$(MODPATH)
+CLSDIR = $(TARGDIR)/cls
+
+# exports
+export TOP
+export MODPATH
+export SRCDIR
+export MAKEFILE
+
+# auto-compilation rules
+$(OBJDIR)/%.$(OBJX): %.c
+ $(CC) -o $@ $< $(CFLAGS)
+$(OBJDIR)/%.$(LOBX): %.c
+ $(CC) -o $@ $< $(PIC) $(CFLAGS)
+$(OBJDIR)/%.$(OBJX): %.cpp
+ $(CP) -o $@ $< $(CFLAGS)
+$(OBJDIR)/%.$(LOBX): %.cpp
+ $(CP) -o $@ $< $(PIC) $(CFLAGS)
+
+VPATH = $(SRCDIR)
+
+# directory rules
+$(BINDIR) $(LIBDIR) $(ILIBDIR) $(OBJDIR) $(INST_LIBDIR) $(INST_LIBDIR)$(BITS):
+ mkdir -p $@
+
+# not real targets
+.PHONY: default clean install all std $(TARGETS)
+
+# dependencies
+include $(wildcard $(OBJDIR)/*.d)
+
+# installation rules
+$(INST_LIBDIR)$(BITS)/%.$(VERSION_LIBX): $(LIBDIR)/%.$(VERSION_LIBX)
+ @ echo -n "installing '$(@F)'... "
+ @ if cp $^ $@ && chmod 644 $@; \
+ then \
+ rm -f $(subst $(VERSION),$(MAJVERS),$@) $(subst $(VERSION_LIBX),$(LIBX),$@) $(subst .$(VERSION_LIBX),-static.$(LIBX),$@); \
+ ln -s $(@F) $(subst $(VERSION),$(MAJVERS),$@); \
+ ln -s $(subst $(VERSION),$(MAJVERS),$(@F)) $(subst $(VERSION_LIBX),$(LIBX),$@); \
+ ln -s $(subst $(VERSION_LIBX),$(LIBX),$(@F)) $(INST_LIBDIR)$(BITS)/$(subst .$(VERSION_LIBX),-static.$(LIBX),$(@F)); \
+ echo success; \
+ else \
+ echo failure; \
+ false; \
+ fi
+
+$(INST_LIBDIR)$(BITS)/%.$(VERSION_SHLX): $(LIBDIR)/%.$(VERSION_SHLX)
+ @ echo -n "installing '$(@F)'... "
+ @ if cp $^ $@ && chmod 755 $@; \
+ then \
+ rm -f $(subst $(VERSION),$(MAJVERS),$@) $(subst $(VERSION_SHLX),$(SHLX),$@); \
+ ln -s $(@F) $(subst $(VERSION),$(MAJVERS),$@); \
+ ln -s $(subst $(VERSION),$(MAJVERS),$(@F)) $(subst $(VERSION_SHLX),$(SHLX),$@); \
+ echo success; \
+ else \
+ echo failure; \
+ false; \
+ fi
+
+$(INST_BINDIR)/%$(VERSION_EXEX): $(BINDIR)/%$(VERSION_EXEX)
+ @ echo -n "installing '$(@F)'... "
+ @ if cp $^ $@ && chmod 755 $@; \
+ then \
+ rm -f $(subst $(VERSION),$(MAJVERS),$@) $(subst $(VERSION_EXEX),$(EXEX),$@); \
+ ln -s $(@F) $(subst $(VERSION),$(MAJVERS),$@); \
+ ln -s $(subst $(VERSION),$(MAJVERS),$(@F)) $(subst $(VERSION_EXEX),$(EXEX),$@); \
+ echo success; \
+ else \
+ echo failure; \
+ false; \
+ fi
......@@ -6,7 +6,7 @@ Last-Update: Wed, 03 Feb 2016 07:53:29 +0100
--- a/ngs-bam/setup/konfigure.perl
+++ b/ngs-bam/setup/konfigure.perl
@@ -214,8 +214,7 @@
@@ -218,8 +218,7 @@ if ($OS eq 'linux') {
print "checking machine architecture... " unless ($AUTORUN);
println $MARCH unless ($AUTORUN);
unless ($MARCH =~ /x86_64/i || $MARCH =~ /i?86/i) {
......@@ -18,7 +18,7 @@ Last-Update: Wed, 03 Feb 2016 07:53:29 +0100
{
--- a/ngs-java/setup/konfigure.perl
+++ b/ngs-java/setup/konfigure.perl
@@ -214,8 +214,7 @@
@@ -218,8 +218,7 @@ if ($OS eq 'linux') {
print "checking machine architecture... " unless ($AUTORUN);
println $MARCH unless ($AUTORUN);
unless ($MARCH =~ /x86_64/i || $MARCH =~ /i?86/i) {
......@@ -30,7 +30,7 @@ Last-Update: Wed, 03 Feb 2016 07:53:29 +0100
{
--- a/ngs-python/setup/konfigure.perl
+++ b/ngs-python/setup/konfigure.perl
@@ -214,8 +214,7 @@
@@ -218,8 +218,7 @@ if ($OS eq 'linux') {
print "checking machine architecture... " unless ($AUTORUN);
println $MARCH unless ($AUTORUN);
unless ($MARCH =~ /x86_64/i || $MARCH =~ /i?86/i) {
......@@ -42,7 +42,7 @@ Last-Update: Wed, 03 Feb 2016 07:53:29 +0100
{
--- a/ngs-sdk/setup/konfigure.perl
+++ b/ngs-sdk/setup/konfigure.perl
@@ -214,8 +214,7 @@
@@ -218,8 +218,7 @@ if ($OS eq 'linux') {
print "checking machine architecture... " unless ($AUTORUN);
println $MARCH unless ($AUTORUN);
unless ($MARCH =~ /x86_64/i || $MARCH =~ /i?86/i) {
......
......@@ -51,7 +51,11 @@ clean:
ngs-bam: $(LIBDIR) $(OBJDIR) $(LIBDIR)/$(LPFX)ngs-bam.$(SHLX)
ngs-bam-c++: $(LIBDIR) $(OBJDIR) $(LIBDIR)/$(LPFX)ngs-bam-c++.$(LIBX)
ngs-bam-c++: $(LIBDIR) $(LIBDIR)/$(LPFX)ngs-bam-c++-static.$(LIBX)
$(LIBDIR)/$(LPFX)ngs-bam-c++-static.$(LIBX): $(LIBDIR)/$(LPFX)ngs-bam-c++.$(LIBX)
rm -f $@
ln -s $(notdir $^) $@
runtests: ngs-bam ngs-bam-c++
......
......@@ -23,4 +23,4 @@
# ===========================================================================
# NGS-BAM and library version
VERSION = 1.3.0
VERSION = 2.9.0
......@@ -370,7 +370,7 @@ void BAMFile::ReadZlib(void) {
if (total_in >= IO_BLK_SIZE && total_in + zs.avail_in == 2 * IO_BLK_SIZE)
{
memcpy(iobuffer, &iobuffer[sizeof(iobuffer)/2], sizeof(iobuffer)/2);
memmove(iobuffer, &iobuffer[sizeof(iobuffer)/2], sizeof(iobuffer)/2);
cpos += sizeof(iobuffer)/2;
zs.next_in -= sizeof(iobuffer)/2;
zs.avail_in += FillBuffer(1);
......@@ -398,7 +398,7 @@ size_t BAMFile::ReadN(size_t N, void *Dst) {
if (avail_in) {
size_t const copy = avail_out < avail_in ? avail_out : avail_in;
memcpy(dst + n, bambuffer + bam_cur, copy);
memmove(dst + n, bambuffer + bam_cur, copy);
bam_cur += copy;
if (bam_cur == zs.total_out)
bam_cur = zs.total_out = 0;
......
......@@ -52,7 +52,7 @@ static T LE2Host(void const *const src)
uint8_t ch[sizeof(T)];
T v; // ensures alignment if necessary
} u;
memcpy(reinterpret_cast<void *>(&u), src, sizeof(T));
memmove(reinterpret_cast<void *>(&u), src, sizeof(T));
#if BYTE_ORDER == LITTLE_ENDIAN
return u.v;
#else
......
......@@ -41,5 +41,5 @@ else
echo >&2 "configure: error: perl not found."; exit 1; }
cd $CURDIR/setup
perl -w konfigure.perl "$@"
perl konfigure.perl "$@"
fi
......@@ -24,6 +24,10 @@
use strict;
use Cwd 'abs_path';
use File::Basename 'dirname';
use lib dirname( abs_path $0 );
sub println { print @_; print "\n" }
my ($filename, $directories, $suffix) = fileparse($0);
......@@ -433,12 +437,22 @@ if ($TOOLS =~ /gcc$/) {
$STATIC_LIBSTDCPP = check_static_libstdcpp();
}
if ( $PKG{REQ} ) {
foreach ( @{ $PKG{REQ} } ) {
unless (check_tool__h($_)) {
println "configure: error: '$_' cannot be found";
exit 1;
}
}
}
my @dependencies;
my %DEPEND_OPTIONS;
foreach my $href (DEPENDS()) {
$_ = $href->{name};
my ($I, $L) = ($href->{Include});
my $I = $href->{Include};
my @L;
my $o = "with-$_-prefix";
++$DEPEND_OPTIONS{$o};
if ($OPT{$o}) {
......@@ -448,9 +462,10 @@ foreach my $href (DEPENDS()) {
my $t = File::Spec->catdir($I, 'libxml2');
$I = $t if (-e $t);
}
$L = File::Spec->catdir($OPT{$o}, 'lib');
push ( @L, File::Spec->catdir($OPT{$o}, 'lib') );
push ( @L, File::Spec->catdir($OPT{$o}, 'lib64') );
}
my ($i, $l) = find_lib($_, $I, $L);
my ($i, $l) = find_lib($_, $I, @L);
if (defined $i || $l) {
my $d = 'HAVE_' . uc($_) . ' = 1';
push @dependencies, $d;
......@@ -485,6 +500,7 @@ foreach my $href (@REQ) {
my $need_build = $a{type} =~ /B/;
my $need_lib = $a{type} =~ /L|D/;
my $need_itf = ! ($a{type} =~ /D/ || $a{type} =~ /E/ || $a{type} =~ /J/);
$need_itf = 1 if ($a{type} =~ /I/);
my $need_jar = $a{type} =~ /J/;
my ($bin, $inc, $lib, $ilib, $src)
......@@ -530,12 +546,13 @@ foreach my $href (@REQ) {
undef $il;
++$has_option{sources};
}
my ($fi, $fl, $fil)
my ($fi, $fl, $fil, $fs)
= find_in_dir($try, $i, $l, $il, undef, undef, $src);
if ($fi || $fl || $fil) {
$found_itf = $fi if (! $found_itf && $fi);
$found_lib = $fl if (! $found_lib && $fl);
$found_ilib = $fil if (! $found_ilib && $fil);
$found_src = $fs if (! $found_src && $fs);
} elsif (! ($try =~ /$a{name}$/)) {
$try = File::Spec->catdir($try, $a{name});
($fi, $fl, $fil) = find_in_dir($try, $i, $l, $il);
......@@ -652,6 +669,9 @@ foreach my $href (@REQ) {
} elsif ($quasi_optional && $found_itf && ($need_lib && ! $found_lib)) {
println "configure: $a{name} package: "
. "found interface files but not libraries.";
$found_itf = abs_path($found_itf);
push(@dependencies, "$a{aname}_INCDIR = $found_itf");
println "includes: $found_itf";
} else {
if ($OPT{'debug'}) {
$_ = "$a{name}: includes: ";
......@@ -892,9 +912,11 @@ EndText
L($F, "NO_ARRAY_BOUNDS_WARNING = $NO_ARRAY_BOUNDS_WARNING");
L($F);
print $F <<EndText;
# $PACKAGE_NAME and library version
# \$(VERSION) is defined in a separate file which is updated every release
include \$(TOP)/Makefile.vers
L($F, "include \$(TOP)/" . CONFIG_OUT() . "/Makefile.vers" );
print $F <<EndText;
empty :=
space := \$(empty) \$(empty)
......@@ -1439,17 +1461,33 @@ sub check_tool {
}
}
sub check_no_array_bounds {
check_compiler('O', '-Wno-array-bounds');
}
sub check_static_libstdcpp {
my $option = '-static-libstdc++';
my $save = $TOOLS;
$TOOLS = $CPP;
$_ = check_compiler('O', $option);
$TOOLS = $save;
$_ ? $option : ''
print "checking whether $CPP accepts $option... ";
my $log = 'int main() {}\n';
my $cmd = $log;
$cmd =~ s/\\n/\n/g;
my $gcc = "echo -e '$log' | $CPP -xc $option - 2>&1";
print "\n\t\trunning $gcc\n" if ($OPT{'debug'});
my $out = `$gcc`;
my $ok = $? == 0;
if ( $ok && $out ) {
$ok = 0 if ( $out =~ /unrecognized option '-static-libstdc\+\+'/ );
}
print "$out\t" if ($OPT{'debug'});
println $ok ? 'yes' : 'no';
unlink 'a.out';
return '' if (!$ok);
return $option;
}
sub check_no_array_bounds {
check_compiler('O', '-Wno-array-bounds');
}
sub find_lib {
......@@ -1457,7 +1495,7 @@ sub find_lib {
}
sub check_compiler {
my ($t, $n, $i, $l) = @_;
my ($t, $n, $I, @l) = @_;
my $tool = $TOOLS;
if ($t eq 'L') {
......@@ -1503,20 +1541,32 @@ sub check_compiler {
return;
}
if ($i && ! -d $i) {
print "'$i': " if ($OPT{'debug'});
if ($I && ! -d $I) {
print "'$I': " if ($OPT{'debug'});
println 'no';
return;
}
if ($l && ! -d $l) {
print "'$l': " if ($OPT{'debug'}); println 'no';
for ( my $i = 0; $i <= $#l; ++ $i ) {
print "'$l[$i]': " if ($OPT{'debug'});
if ( $l [ $i ] ) {
if ( -d $l [ $i ] ) {
last;
} elsif ( $i == $#l ) {
println 'no';
return;
}
}
}
my $cmd = $log;
$cmd =~ s/\\n/\n/g;
my $gcc = "| $tool -xc $flags " . ($i ? "-I$i " : ' ')
push ( @l, '' ) unless ( @l );
for my $i ( 0 .. $#l ) {
my $l = $l [ $i ];
next if ( $l && ! -d $l );
my $gcc = "| $tool -xc $flags " . ($I ? "-I$I " : ' ')
. ($l ? "-L$l " : ' ') . "- $library";
$gcc .= ' 2> /dev/null' unless ($OPT{'debug'});
......@@ -1525,15 +1575,20 @@ sub check_compiler {
print GCC "$cmd" or last;
my $ok = close GCC;
print "\t" if ($OPT{'debug'});
println $ok ? 'yes' : 'no';
if ( $ok ) {
println 'yes';
} else {
println 'no' if ( $i == $#l );
}
unlink 'a.out';
return if (!$ok);
return if ( ! $ok && ( $i == $#l ) );
return 1 if ($t eq 'O');
return ($i, $l);
return ($I, $l) if ( $ok) ;
}
}
println "cannot run $tool: skipped";
......@@ -1689,9 +1744,12 @@ EndText
foreach my $href (@REQ) {
next unless (optional($href->{type}));
my %a = %$href;
if ($a{option} =~ /-sources$/) {
if ($a{option} && $a{option} =~ /-sources$/) {
println " --$a{option}=DIR search for $a{name} package";
println " source files in DIR";
} elsif ($a{boption} && $a{boption} =~ /-build$/) {
println " --$a{boption}=DIR search for $a{name} package";
println " build output in DIR";
} else {
println " --$a{option}=DIR search for $a{name} files in DIR"
}
......
......@@ -23,4 +23,4 @@
# ===========================================================================
# NGS-JAVA and library version
VERSION = 1.3.0
VERSION = 2.9.0
......@@ -41,5 +41,5 @@ else
echo >&2 "configure: error: perl not found."; exit 1; }
cd $CURDIR/setup
perl -w konfigure.perl "$@"
perl konfigure.perl "$@"
fi
......@@ -102,10 +102,10 @@ run_all: $(ALL_TESTS)
# expected results for auto-testing
#
expected.txt update_expected:
rm -f expected.txt; $(MAKE) run_all REDIRECT=">>expected.txt"
rm -f expected.txt; LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(MAKE) run_all REDIRECT=">>expected.txt"
run_and_diff: expected.txt
rm -f actual.txt; $(MAKE) run_all REDIRECT=">>actual.txt"
rm -f actual.txt; LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(MAKE) run_all REDIRECT=">>actual.txt"
diff expected.txt actual.txt && rm actual.txt && echo NGS Java examples work as expected
.PHONY: update_expected run_and_diff
......@@ -29,6 +29,6 @@ package gov.nih.nlm.ncbi.ngs;
class LibDependencies {
final static String NGS_SDK = "ngs-sdk";
final static String NCBI_VDB = "ncbi-vdb";
final static String NGS_SDK_VERSION = "1.3.0";
final static String NCBI_VDB_VERSION = "2.8.0";
final static String NGS_SDK_VERSION = "2.9.0";
final static String NCBI_VDB_VERSION = "2.9.0";
}
......@@ -119,6 +119,10 @@ class Manager
}
}
);
Logger.info ( "NCBI-VDB v" + getPackageVersion () );
Logger.info ( "NGS-JAVA v" + LibDependencies . NGS_SDK_VERSION );
Logger.info ( "NGS-SDK v" + ngs . Package . getPackageVersion () );
}
catch ( ExceptionInInitializerError x )
{
......
......@@ -24,6 +24,10 @@
use strict;
use Cwd 'abs_path';
use File::Basename 'dirname';
use lib dirname( abs_path $0 );
sub println { print @_; print "\n" }
my ($filename, $directories, $suffix) = fileparse($0);
......@@ -433,12 +437,22 @@ if ($TOOLS =~ /gcc$/) {
$STATIC_LIBSTDCPP = check_static_libstdcpp();
}
if ( $PKG{REQ} ) {
foreach ( @{ $PKG{REQ} } ) {
unless (check_tool__h($_)) {
println "configure: error: '$_' cannot be found";
exit 1;
}
}
}
my @dependencies;
my %DEPEND_OPTIONS;
foreach my $href (DEPENDS()) {
$_ = $href->{name};
my ($I, $L) = ($href->{Include});
my $I = $href->{Include};
my @L;
my $o = "with-$_-prefix";
++$DEPEND_OPTIONS{$o};
if ($OPT{$o}) {
......@@ -448,9 +462,10 @@ foreach my $href (DEPENDS()) {
my $t = File::Spec->catdir($I, 'libxml2');
$I = $t if (-e $t);
}
$L = File::Spec->catdir($OPT{$o}, 'lib');
push ( @L, File::Spec->catdir($OPT{$o}, 'lib') );
push ( @L, File::Spec->catdir($OPT{$o}, 'lib64') );
}
my ($i, $l) = find_lib($_, $I, $L);
my ($i, $l) = find_lib($_, $I, @L);
if (defined $i || $l) {
my $d = 'HAVE_' . uc($_) . ' = 1';
push @dependencies, $d;
......@@ -485,6 +500,7 @@ foreach my $href (@REQ) {
my $need_build = $a{type} =~ /B/;
my $need_lib = $a{type} =~ /L|D/;
my $need_itf = ! ($a{type} =~ /D/ || $a{type} =~ /E/ || $a{type} =~ /J/);
$need_itf = 1 if ($a{type} =~ /I/);
my $need_jar = $a{type} =~ /J/;
my ($bin, $inc, $lib, $ilib, $src)
......@@ -530,12 +546,13 @@ foreach my $href (@REQ) {
undef $il;
++$has_option{sources};
}
my ($fi, $fl, $fil)
my ($fi, $fl, $fil, $fs)
= find_in_dir($try, $i, $l, $il, undef, undef, $src);
if ($fi || $fl || $fil) {
$found_itf = $fi if (! $found_itf && $fi);
$found_lib = $fl if (! $found_lib && $fl);
$found_ilib = $fil if (! $found_ilib && $fil);
$found_src = $fs if (! $found_src && $fs);
} elsif (! ($try =~ /$a{name}$/)) {
$try = File::Spec->catdir($try, $a{name});
($fi, $fl, $fil) = find_in_dir($try, $i, $l, $il);
......@@ -652,6 +669,9 @@ foreach my $href (@REQ) {
} elsif ($quasi_optional && $found_itf && ($need_lib && ! $found_lib)) {
println "configure: $a{name} package: "
. "found interface files but not libraries.";
$found_itf = abs_path($found_itf);
push(@dependencies, "$a{aname}_INCDIR = $found_itf");
println "includes: $found_itf";
} else {
if ($OPT{'debug'}) {
$_ = "$a{name}: includes: ";
......@@ -892,9 +912,11 @@ EndText
L($F, "NO_ARRAY_BOUNDS_WARNING = $NO_ARRAY_BOUNDS_WARNING");
L($F);
print $F <<EndText;
# $PACKAGE_NAME and library version
# \$(VERSION) is defined in a separate file which is updated every release
include \$(TOP)/Makefile.vers
L($F, "include \$(TOP)/" . CONFIG_OUT() . "/Makefile.vers" );
print $F <<EndText;
empty :=
space := \$(empty) \$(empty)
......@@ -1439,17 +1461,33 @@ sub check_tool {
}
}
sub check_no_array_bounds {
check_compiler('O', '-Wno-array-bounds');
}
sub check_static_libstdcpp {
my $option = '-static-libstdc++';
my $save = $TOOLS;
$TOOLS = $CPP;
$_ = check_compiler('O', $option);
$TOOLS = $save;
$_ ? $option : ''
print "checking whether $CPP accepts $option... ";
my $log = 'int main() {}\n';
my $cmd = $log;
$cmd =~ s/\\n/\n/g;
my $gcc = "echo -e '$log' | $CPP -xc $option - 2>&1";
print "\n\t\trunning $gcc\n" if ($OPT{'debug'});
my $out = `$gcc`;
my $ok = $? == 0;
if ( $ok && $out ) {
$ok = 0 if ( $out =~ /unrecognized option '-static-libstdc\+\+'/ );
}
print "$out\t" if ($OPT{'debug'});
println $ok ? 'yes' : 'no';
unlink 'a.out';
return '' if (!$ok);
return $option;
}
sub check_no_array_bounds {
check_compiler('O', '-Wno-array-bounds');
}
sub find_lib {
......@@ -1457,7 +1495,7 @@ sub find_lib {
}
sub check_compiler {
my ($t, $n, $i, $l) = @_;
my ($t, $n, $I, @l) = @_;
my $tool = $TOOLS;
if ($t eq 'L') {
......@@ -1503,20 +1541,32 @@ sub check_compiler {
return;
}
if ($i && ! -d $i) {
print "'$i': " if ($OPT{'debug'});
if ($I && ! -d $I) {
print "'$I': " if ($OPT{'debug'});
println 'no';
return;
}
if ($l && ! -d $l) {
print "'$l': " if ($OPT{'debug'}); println 'no';
for ( my $i = 0; $i <= $#l; ++ $i ) {
print "'$l[$i]': " if ($OPT{'debug'});
if ( $l [ $i ] ) {
if ( -d $l [ $i ] ) {
last;
} elsif ( $i == $#l ) {
println 'no';
return;
}
}
}
my $cmd = $log;
$cmd =~ s/\\n/\n/g;
my $gcc = "| $tool -xc $flags " . ($i ? "-I$i " : ' ')
push ( @l, '' ) unless ( @l );
for my $i ( 0 .. $#l ) {
my $l = $l [ $i ];
next if ( $l && ! -d $l );
my $gcc = "| $tool -xc $flags " . ($I ? "-I$I " : ' ')
. ($l ? "-L$l " : ' ') . "- $library";
$gcc .= ' 2> /dev/null' unless ($OPT{'debug'});
......@@ -1525,15 +1575,20 @@ sub check_compiler {
print GCC "$cmd" or last;
my $ok = close GCC;
print "\t" if ($OPT{'debug'});
println $ok ? 'yes' : 'no';
if ( $ok ) {
println 'yes';
} else {
println 'no' if ( $i == $#l );
}
unlink 'a.out';
return if (!$ok);
return if ( ! $ok && ( $i == $#l ) );
return 1 if ($t eq 'O');
return ($i, $l);
return ($I, $l) if ( $ok) ;
}
}
println "cannot run $tool: skipped";
......@@ -1689,9 +1744,12 @@ EndText
foreach my $href (@REQ) {
next unless (optional($href->{type}));
my %a = %$href;
if ($a{option} =~ /-sources$/) {
if ($a{option} && $a{option} =~ /-sources$/) {
println " --$a{option}=DIR search for $a{name} package";
println " source files in DIR";
} elsif ($a{boption} && $a{boption} =~ /-build$/) {
println " --$a{boption}=DIR search for $a{name} package";
println " build output in DIR";
} else {
println " --$a{option}=DIR search for $a{name} files in DIR"
}
......