git: dd048035a8f5 - main - biology/ngs-sdk: Improve the 'install' target and other parts of Makefile, report issues to upstream.
Yuri Victorovich
yuri at FreeBSD.org
Mon Apr 12 08:51:05 UTC 2021
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=dd048035a8f50b282d6dc310f19587007eda8fc2
commit dd048035a8f50b282d6dc310f19587007eda8fc2
Author: Yuri Victorovich <yuri at FreeBSD.org>
AuthorDate: 2021-04-12 08:47:34 +0000
Commit: Yuri Victorovich <yuri at FreeBSD.org>
CommitDate: 2021-04-12 08:51:03 +0000
biology/ngs-sdk: Improve the 'install' target and other parts of Makefile, report issues to upstream.
---
biology/ngs-sdk/Makefile | 35 +++++-----
biology/ngs-sdk/files/patch-Makefile | 13 ----
biology/ngs-sdk/files/patch-configure | 11 ----
.../ngs-sdk/files/patch-ngs-sdk_Makefile.install | 11 ++++
.../ngs-sdk/files/patch-ngs-sdk_setup_install.perl | 13 ----
.../files/patch-ngs-sdk_setup_konfigure.perl | 75 +++++++++-------------
biology/ngs-sdk/pkg-plist | 6 +-
7 files changed, 62 insertions(+), 102 deletions(-)
diff --git a/biology/ngs-sdk/Makefile b/biology/ngs-sdk/Makefile
index efd286d1a0d4..ca7321dc39fc 100644
--- a/biology/ngs-sdk/Makefile
+++ b/biology/ngs-sdk/Makefile
@@ -1,5 +1,6 @@
PORTNAME= ngs
DISTVERSION= 2.11.0
+PORTREVISION= 1
CATEGORIES= biology
PKGNAMESUFFIX= -sdk
@@ -14,26 +15,30 @@ 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= gmake perl5
-GNU_CONFIGURE= yes
+USES= compiler:c++11-lang gmake perl5
+USE_PERL5= build
+USE_LDCONFIG= yes
+
USE_GITHUB= yes
GH_ACCOUNT= ncbi
-ALL_TARGET= default
-USE_LDCONFIG= yes
-CFLAGS+= -I${WRKSRC}/ngs-sdk/ngs/unix/${ARCH}/
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS= --prefix="${STAGEDIR}${PREFIX}" --build-prefix="${WRKSRC}/build"
+
+ALL_TARGET= ngs-sdk
-post-patch:
+post-extract:
@cd ${WRKSRC}/ngs-sdk/ngs/unix && ${LN} -s x86_64 amd64
-do-install:
- cd ${WRKSRC}/ngs-sdk && ${COPYTREE_SHARE} ngs ${STAGEDIR}/${PREFIX}/include
- ${INSTALL_PROGRAM} ${WRKSRC}/ngs-sdk/${ARCH}-portbld-*/ngs-sdk/FreeBSD/clang/${ARCH}/rel/lib/libngs-sdk.so.${DISTVERSION} ${STAGEDIR}${PREFIX}/lib/
- cd ${STAGEDIR}${PREFIX}/lib/ && \
- ${LN} -s libngs-sdk.so.${DISTVERSION} libngs-sdk.so.${DISTVERSION:R:R} && \
- ${LN} -s libngs-sdk.so.${DISTVERSION:R:R} libngs-sdk.so
-.for l in libngs-c++.a libngs-adapt-c++.a
- ${INSTALL_LIB} ${WRKSRC}/ngs-sdk/${ARCH}-portbld-*/ngs-sdk/FreeBSD/clang/${ARCH}/rel/lib/${l}.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/${l}
-.endfor
+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/amd64/rel/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib
+ # remove static libs built instead of shared libs, see https://github.com/ncbi/ngs/issues/33
+ cd ${STAGEDIR}${PREFIX}/lib && ${RM} libngs-c++.a* libngs-adapt-c++.a*
+ # strip
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libngs-sdk.so.2.11.0
.include <bsd.port.mk>
diff --git a/biology/ngs-sdk/files/patch-Makefile b/biology/ngs-sdk/files/patch-Makefile
deleted file mode 100644
index 963de357e518..000000000000
--- a/biology/ngs-sdk/files/patch-Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
---- Makefile.orig 2018-06-10 19:59:04 UTC
-+++ Makefile
-@@ -27,9 +27,7 @@ default: subdirs
-
- # the sub-directories
- SUBDIRS = \
-- ngs-sdk \
-- ngs-java \
-- ngs-python \
-+ ngs-sdk
-
- SUBDIRS_CLN = \
- $(addsuffix _cln,$(SUBDIRS))
diff --git a/biology/ngs-sdk/files/patch-configure b/biology/ngs-sdk/files/patch-configure
deleted file mode 100644
index f83ac70d996a..000000000000
--- a/biology/ngs-sdk/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig 2018-06-10 19:58:29 UTC
-+++ configure
-@@ -41,7 +41,7 @@ if [ "$FILENAME" != configure -a ! -s co
- echo configure: error: configure should be run as ./configure
- else
- cd $CURDIR
-- for D in ngs-sdk ngs-java ngs-python
-+ for D in ngs-sdk
- do
- if [ -d $D ]
- then echo "CONFIGURING $D"
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_install.perl b/biology/ngs-sdk/files/patch-ngs-sdk_setup_install.perl
deleted file mode 100644
index 640e227e429e..000000000000
--- a/biology/ngs-sdk/files/patch-ngs-sdk_setup_install.perl
+++ /dev/null
@@ -1,13 +0,0 @@
---- ngs-sdk/setup/install.perl.orig 2018-06-10 20:03:25 UTC
-+++ ngs-sdk/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\";"
diff --git a/biology/ngs-sdk/files/patch-ngs-sdk_setup_konfigure.perl b/biology/ngs-sdk/files/patch-ngs-sdk_setup_konfigure.perl
index 5a199c8ad1dd..ef1f8a936a62 100644
--- a/biology/ngs-sdk/files/patch-ngs-sdk_setup_konfigure.perl
+++ b/biology/ngs-sdk/files/patch-ngs-sdk_setup_konfigure.perl
@@ -1,26 +1,33 @@
---- ngs-sdk/setup/konfigure.perl.orig 2020-04-01 16:34:36 UTC
+--- ngs-sdk/setup/konfigure.perl.orig 2021-03-15 18:08:20 UTC
+++ ngs-sdk/setup/konfigure.perl
-@@ -202,7 +202,7 @@ print "checking system type... " unless ($AUTORUN);
+@@ -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 eq 'FreeBSD') {
++unless ($OSTYPE =~ /linux/i || $OSTYPE =~ /freebsd/i || $OSTYPE =~ /darwin/i || $OSTYPE eq 'win') {
println "configure: error: unsupported system '$OSTYPE'";
exit 1;
}
-@@ -221,6 +221,10 @@ if ($OS eq 'linux') {
- println $OS_DISTRIBUTOR unless ($AUTORUN);
- }
+@@ -225,7 +225,7 @@ if ($OS eq 'linux') {
-+if ($MARCH eq 'amd64') {
-+ $MARCH = 'x86_64';
-+}
-+
print "checking machine architecture... " unless ($AUTORUN);
println $MARCH unless ($AUTORUN);
- unless ($MARCH =~ /x86_64/i || $MARCH =~ /i?86/i) {
-@@ -333,6 +337,16 @@ if ($OSTYPE =~ /linux/i) {
+-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,25 @@ if ($OSTYPE =~ /linux/i) {
$OSINC = 'unix';
$TOOLS = 'gcc' unless ($TOOLS);
$PYTHON = 'python';
@@ -33,40 +40,16 @@
+ $EXEX = '';
+ $OSINC = 'unix';
+ $TOOLS = 'clang' unless ($TOOLS);
-+ $PYTHON = 'python';
++ $PYTHON = $ENV{FREEBSD_PYTHON_CMD};
++} elsif ($OSTYPE =~ /darwin/i) {
++ $LPFX = 'lib';
++ $OBJX = 'o';
++ $LOBX = 'pic.o';
++ $LIBX = 'a';
++ $SHLX = 'dylib';
++ $EXEX = '';
++ $OSINC = 'unix';
++ $TOOLS = 'clang' unless ($TOOLS);
} elsif ($OSTYPE =~ /darwin/i) {
$LPFX = 'lib';
$OBJX = 'o';
-@@ -379,11 +393,11 @@ if ($TOOLS =~ /gcc$/) {
- } elsif ($TOOLS eq 'clang') {
- $CPP = 'clang++' unless ($CPP);
- $CC = 'clang -c';
-- my $versionMin = '-mmacosx-version-min=10.10';
-+ my $versionMin = '';
- $CP = "$CPP -c $versionMin";
- if ($BITS ne '32_64') {
- $ARCH_FL = '-arch i386' if ($BITS == 32);
-- $OPT = '-O3';
-+ $OPT = $ENV{'CXXFLAGS'};
- $AR = 'ar rc';
- $LD = "clang $ARCH_FL";
- $LP = "$CPP $versionMin $ARCH_FL";
-@@ -508,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) {
-@@ -929,8 +943,7 @@ EndText
- L($F, "PIC = $PIC") if ($PIC);
- if ($PKG{LNG} eq 'C') {
- if ($TOOLS =~ /clang/i) {
-- L($F, 'SONAME = -install_name ' .
-- '$(INST_LIBDIR)$(BITS)/$(subst $(VERSION),$(MAJVERS),$(@F)) \\');
-+ L($F, 'SONAME = -Wl,-soname=$(subst $(VERSION),$(MAJVERS),$(@F)) \\');
- L($F, ' -compatibility_version $(MAJMIN) -current_version $(VERSION) \\');
- L($F, ' -flat_namespace -undefined suppress');
- } else {
diff --git a/biology/ngs-sdk/pkg-plist b/biology/ngs-sdk/pkg-plist
index 422d5540493d..5b9c929a1a46 100644
--- a/biology/ngs-sdk/pkg-plist
+++ b/biology/ngs-sdk/pkg-plist
@@ -87,10 +87,8 @@ 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
-lib/libngs-adapt-c++.a
-lib/libngs-c++.a
+lib/libngs-adapt-c++-static.a
+lib/libngs-c++-static.a
lib/libngs-sdk.so
lib/libngs-sdk.so.2
lib/libngs-sdk.so.2.11.0
More information about the dev-commits-ports-all
mailing list