git: d3e958636916 - main - biology/ngs-sdk: Revert: Un-remove, ngs was moved into sra-tools

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 07 Jul 2022 01:34:33 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d3e958636916e711fa0437b21b617c16f026d64e

commit d3e958636916e711fa0437b21b617c16f026d64e
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-07-07 01:32:07 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-07-07 01:33:58 +0000

    biology/ngs-sdk: Revert: Un-remove, ngs was moved into sra-tools
    
    This reverts commit 1cb8897f610a381ddf2802eb09acfba97b15b505.
    
    sra-tools needs to be updated first.
    
    Reported by:    Tomoaki AOKI <junchoon@dec.sakura.ne.jp>, perciva@
---
 MOVED                                              |   1 -
 biology/Makefile                                   |   1 +
 biology/ngs-sdk/Makefile                           |  43 +++++++++
 biology/ngs-sdk/distinfo                           |   3 +
 .../ngs-sdk/files/patch-ngs-sdk_Makefile.install   |  11 +++
 .../files/patch-ngs-sdk_setup_konfigure.perl       |  37 ++++++++
 biology/ngs-sdk/pkg-descr                          |  12 +++
 biology/ngs-sdk/pkg-plist                          | 100 +++++++++++++++++++++
 8 files changed, 207 insertions(+), 1 deletion(-)

diff --git a/MOVED b/MOVED
index a7b5f52d4d77..9372e586ae59 100644
--- a/MOVED
+++ b/MOVED
@@ -17491,4 +17491,3 @@ sysutils/go-btfs||2022-07-01|Has expired: Requires go 1.15
 sysutils/pesign||2022-07-01|Has expired: Unmaintaned since 2016, very much out of date, does not build with GCC 11 (PR #263544)
 sysutils/cfengine316||2022-07-06|Has expired: Expire one year after cfengine 3.18.0 released
 sysutils/cfengine-masterfiles316||2022-07-06|Has expired: Expire one year after cfengine 3.18.0 released
-biology/ngs-sdk|biology/sra-tools|2022-07-06|ngs was moved into sra-tools by the upstream
diff --git a/biology/Makefile b/biology/Makefile
index c67a064d6afa..422c8fdd52b4 100644
--- a/biology/Makefile
+++ b/biology/Makefile
@@ -101,6 +101,7 @@
     SUBDIR += ncbi-entrez-direct
     SUBDIR += ncbi-toolkit
     SUBDIR += ncbi-vdb
+    SUBDIR += ngs-sdk
     SUBDIR += p5-AcePerl
     SUBDIR += p5-Bio-ASN1-EntrezGene
     SUBDIR += p5-Bio-Cluster
diff --git a/biology/ngs-sdk/Makefile b/biology/ngs-sdk/Makefile
new file mode 100644
index 000000000000..2a6e174bbf5f
--- /dev/null
+++ b/biology/ngs-sdk/Makefile
@@ -0,0 +1,43 @@
+PORTNAME=	ngs
+DISTVERSION=	2.11.2
+CATEGORIES=	biology
+PKGNAMESUFFIX=	-sdk
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Tools and libraries for using data in the INSDC Sequence Read Archives
+
+LICENSE=	PD
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BROKEN_aarch64=		fails to configure: unsupported architecture 'FreeBSD'
+BROKEN_riscv64=		fails to configure: unsupported architecture 'FreeBSD'
+NOT_FOR_ARCHS=		powerpc64
+NOT_FOR_ARCHS_REASON=	os-arch.prl needs to be taught about powerpc64
+
+USES=		compiler:c++11-lang gmake perl5
+USE_PERL5=	build
+USE_LDCONFIG=	yes
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	ncbi
+
+HAS_CONFIGURE=	yes
+CONFIGURE_ARGS=	--prefix="${STAGEDIR}${PREFIX}" --build-prefix="${WRKSRC}/build"
+
+ALL_TARGET=	ngs-sdk
+
+post-extract:
+	@cd ${WRKSRC}/ngs-sdk/ngs/unix && ${LN} -s x86_64 amd64
+
+do-install: # install target from the project breaks: https://github.com/ncbi/ngs/issues/34
+	# install headers
+	cd ${WRKSRC}/ngs-sdk && ${COPYTREE_SHARE} ngs ${STAGEDIR}${PREFIX}/include
+	${RM} -r ${STAGEDIR}${PREFIX}/include/ngs/win
+	# install libraries
+	cd ${WRKSRC}/build/ngs-sdk/FreeBSD/clang/${ARCH}/rel/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib
+		# The above command installs broken-looking static libs with symlinks.
+		# This is intentional, see comments https://github.com/ncbi/ncbi-vdb/issues/36#issuecomment-817990790 This may change in future versions.
+	# strip
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libngs-sdk.so.${DISTVERSION}
+
+.include <bsd.port.mk>
diff --git a/biology/ngs-sdk/distinfo b/biology/ngs-sdk/distinfo
new file mode 100644
index 000000000000..922f4ad62f65
--- /dev/null
+++ b/biology/ngs-sdk/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1643246050
+SHA256 (ncbi-ngs-2.11.2_GH0.tar.gz) = 7555ab7c2f04bd81160859f6c85c65376dc7f7b891804fad9e7636a7788e39c2
+SIZE (ncbi-ngs-2.11.2_GH0.tar.gz) = 1101119
diff --git a/biology/ngs-sdk/files/patch-ngs-sdk_Makefile.install b/biology/ngs-sdk/files/patch-ngs-sdk_Makefile.install
new file mode 100644
index 000000000000..b9cf320d1f6d
--- /dev/null
+++ b/biology/ngs-sdk/files/patch-ngs-sdk_Makefile.install
@@ -0,0 +1,11 @@
+--- ngs-sdk/Makefile.install.orig	2021-04-12 08:00:01 UTC
++++ ngs-sdk/Makefile.install
+@@ -37,7 +37,7 @@ LIBRARIES_TO_INSTALL = \
+     ngs-c++.$(VERSION_LIBX) \
+     ngs-adapt-c++.$(VERSION_LIBX) \
+ 
+-LIB_TARGET = $(INST_LIBDIR)$(BITS)
++LIB_TARGET = $(INST_LIBDIR)
+ 
+ LIBRARIES_WITH_PREFIX = \
+ 	$(addprefix $(LIB_TARGET)/$(LPFX),$(LIBRARIES_TO_INSTALL))
diff --git a/biology/ngs-sdk/files/patch-ngs-sdk_setup_konfigure.perl b/biology/ngs-sdk/files/patch-ngs-sdk_setup_konfigure.perl
new file mode 100644
index 000000000000..5fc8fb532a2c
--- /dev/null
+++ b/biology/ngs-sdk/files/patch-ngs-sdk_setup_konfigure.perl
@@ -0,0 +1,37 @@
+--- ngs-sdk/setup/konfigure.perl.orig	2021-08-18 16:26:23 UTC
++++ ngs-sdk/setup/konfigure.perl
+@@ -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;
+ }
+@@ -312,6 +312,8 @@ my $BITS;
+ 
+ if ($MARCH =~ /x86_64/i) {
+     $BITS = 64;
++} elsif ($MARCH =~ /amd64/i) {
++    $BITS = 64;
+ } elsif ($MARCH eq 'fat86') {
+     $BITS = '32_64';
+ } elsif ($MARCH =~ /i?86/i) {
+@@ -337,6 +339,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 = $ENV{FREEBSD_PYTHON_CMD};
+ } elsif ($OSTYPE =~ /darwin/i) {
+     $LPFX = 'lib';
+     $OBJX = 'o';
diff --git a/biology/ngs-sdk/pkg-descr b/biology/ngs-sdk/pkg-descr
new file mode 100644
index 000000000000..b52c80174755
--- /dev/null
+++ b/biology/ngs-sdk/pkg-descr
@@ -0,0 +1,12 @@
+NGS is a new, domain-specific API for accessing reads, alignments and pileups
+produced from Next Generation Sequencing. The API itself is independent from any
+particular back-end implementation, and supports use of multiple back-ends
+simultaneously. It also provides a library for building new back-end "engines".
+The engine for accessing SRA data is contained within the sister repository
+ncbi-vdb.
+
+The API is currently expressed in C++, Java and Python languages. The design
+makes it possible to maintain a high degree of similarity between the code in
+one language and code in another - especially between C++ and Java.
+
+WWW: https://github.com/ncbi/ngs
diff --git a/biology/ngs-sdk/pkg-plist b/biology/ngs-sdk/pkg-plist
new file mode 100644
index 000000000000..958bceed7edc
--- /dev/null
+++ b/biology/ngs-sdk/pkg-plist
@@ -0,0 +1,100 @@
+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/amd64
+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
+lib/libngs-adapt-c++-static.a
+lib/libngs-adapt-c++.a
+lib/libngs-adapt-c++.a.2
+lib/libngs-adapt-c++.a.2.11.2
+lib/libngs-c++-static.a
+lib/libngs-c++.a
+lib/libngs-c++.a.2
+lib/libngs-c++.a.2.11.2
+lib/libngs-sdk.so
+lib/libngs-sdk.so.2
+lib/libngs-sdk.so.2.11.2