pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sra-tools: NetBSD fixes



Module Name:	pkgsrc-wip
Committed By:	Jason W. Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Mon Aug 14 10:14:08 2023 -0500
Changeset:	fe4be84b36802869972422612093867be8afbade

Modified Files:
	sra-tools/Makefile
	sra-tools/distinfo
	sra-tools/patches/patch-ncbi-vdb_libs_kproc_bsd_sysmgr.c
	sra-tools/patches/patch-tools_external_driver-tool_sratools.cpp

Log Message:
sra-tools: NetBSD fixes

Limit @rpath patch to Darwin
Fix pthread_main_np() implementation

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=fe4be84b36802869972422612093867be8afbade

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 sra-tools/Makefile                                       | 16 ++++++++++------
 sra-tools/distinfo                                       |  4 ++--
 sra-tools/patches/patch-ncbi-vdb_libs_kproc_bsd_sysmgr.c |  4 ++--
 .../patch-tools_external_driver-tool_sratools.cpp        |  7 ++++---
 4 files changed, 18 insertions(+), 13 deletions(-)

diffs:
diff --git a/sra-tools/Makefile b/sra-tools/Makefile
index b2441eadec..312061ba15 100644
--- a/sra-tools/Makefile
+++ b/sra-tools/Makefile
@@ -41,11 +41,6 @@ SUBST_STAGE.submoddir=	pre-configure
 SUBST_SED.submoddir+=	-e 's|/../ncbi-vdb|/ncbi-vdb|g'
 SUBST_FILES.submoddir+=	CMakeLists.txt
 
-SUBST_CLASSES+=		srarpath
-SUBST_STAGE.srarpath=	post-configure
-SUBST_SED.srarpath+=	-e 's|@rpath|${PREFIX}/lib|g'
-SUBST_FILES.srarpath+=	cmake-pkgsrc-build/ngs/ngs-sdk/CMakeFiles/*/link.txt
-
 REPLACE_BASH=	*/*.sh */*/*.sh */*/*/*.sh */*/*/*/*.sh
 
 USE_CMAKE=	yes
@@ -57,18 +52,27 @@ EXAMPLESDIR=	${PREFIX}/share/examples/sra-tools
 
 .include "../../mk/bsd.prefs.mk"
 
+.if ${OPSYS} == Darwin
+SUBST_CLASSES+=		srarpath
+SUBST_STAGE.srarpath=	post-configure
+SUBST_SED.srarpath+=	-e 's|@rpath|${PREFIX}/lib|g'
+SUBST_FILES.srarpath+=	cmake-pkgsrc-build/ngs/ngs-sdk/CMakeFiles/*/link.txt
+.endif
+
 pre-configure:
 .if ${OPSYS} == NetBSD
 	# Incorrect code found before bsd/byteswap.h
 	#ifndef __NetBSD__ doesn't help
-	${RM} ${WRKSRC}/ncbi-vdb/interfaces/cc/gcc/x86_64/byteswap.h
+	${RM} -f ${WRKSRC}/ncbi-vdb/interfaces/cc/gcc/x86_64/byteswap.h
 .endif
 	cd ${WRKSRC}/ncbi-vdb/build && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ..
+.if ${OPSYS} == Darwin
 	# Unsure how to prevent cmake from generating @rpath in the first place
 	# No instances of @rpath or -install_name in any files before configure
 	for f in ${WRKSRC}/ncbi-vdb/build/libs/ncbi-vdb/CMakeFiles/*/link.txt; do \
 		${SED} -e 's|@rpath|${PREFIX}/lib|g' $${f} > $${f}.tmp && ${MV} -f $${f}.tmp $${f}; \
 	done
+.endif
 	cd ${WRKSRC}/ncbi-vdb/build && ${MAKE}
 
 post-install:
diff --git a/sra-tools/distinfo b/sra-tools/distinfo
index 73f4b34527..7ce43ae94e 100644
--- a/sra-tools/distinfo
+++ b/sra-tools/distinfo
@@ -9,8 +9,8 @@ Size (sra-tools-3.0.6-de3d50d111874171766fd017c8cbcf92a9009263.tar.gz) = 4496331
 SHA1 (patch-build_env.cmake) = 14add56e66e5578fd0d51ce55329285e0981ac4e
 SHA1 (patch-ncbi-vdb_interfaces_os_bsd_byteswap.h) = 2ecc80bca4dd3b0c28b20d1a82c2a315d29bb02c
 SHA1 (patch-ncbi-vdb_interfaces_os_bsd_endian.h) = fa522758b0a122f5da8b3ddc2b98fff1c1d82e33
-SHA1 (patch-ncbi-vdb_libs_kproc_bsd_sysmgr.c) = 8f592d6b4131eba45de98cf516b940df90f550f2
+SHA1 (patch-ncbi-vdb_libs_kproc_bsd_sysmgr.c) = 453533319677ccb1004d0b851016f410bfb60422
 SHA1 (patch-ngs_ngs-java_CMakeLists.txt) = 44b822381fd564d045406cc926f807adae9fbe59
 SHA1 (patch-tools_external_driver-tool_build-version.cpp) = ec194aad65c86035c1fee0fe42722faf06af17fe
 SHA1 (patch-tools_external_driver-tool_build-version.hpp) = 0d50aba6b3fe1086cf0562c935f114bb117ac195
-SHA1 (patch-tools_external_driver-tool_sratools.cpp) = 1f4062ebe1536ce4350db5d5c2ebaf58ad2b374d
+SHA1 (patch-tools_external_driver-tool_sratools.cpp) = ca8fe3882ae36fb076e3be9bddbfca7493b6afd5
diff --git a/sra-tools/patches/patch-ncbi-vdb_libs_kproc_bsd_sysmgr.c b/sra-tools/patches/patch-ncbi-vdb_libs_kproc_bsd_sysmgr.c
index 337bb446f6..aeb05e09f9 100644
--- a/sra-tools/patches/patch-ncbi-vdb_libs_kproc_bsd_sysmgr.c
+++ b/sra-tools/patches/patch-ncbi-vdb_libs_kproc_bsd_sysmgr.c
@@ -1,6 +1,6 @@
 $NetBSD$
 
-# NetBSD: Add pthread_main_np() implementation
+# pthread_main_np() for NetBSD
 
 --- ncbi-vdb/libs/kproc/bsd/sysmgr.c.orig	2023-08-12 23:35:46.000000000 +0000
 +++ ncbi-vdb/libs/kproc/bsd/sysmgr.c
@@ -16,7 +16,7 @@ $NetBSD$
 +
 +// This should be initialized to pthread_self() at the start of main()
 +// If the thread ID of this thread is the same, then this is the main thread
-+extern pthread_t _thr_main;
++pthread_t _thr_main;
 +
 +int	pthread_main_np(void)
 +
diff --git a/sra-tools/patches/patch-tools_external_driver-tool_sratools.cpp b/sra-tools/patches/patch-tools_external_driver-tool_sratools.cpp
index 8440f034ac..d96bf03fd8 100644
--- a/sra-tools/patches/patch-tools_external_driver-tool_sratools.cpp
+++ b/sra-tools/patches/patch-tools_external_driver-tool_sratools.cpp
@@ -1,16 +1,17 @@
 $NetBSD$
 
-# NetBSD: Add support for pthread_main_np()
+# pthread_main_np() for NetBSD
 
 --- tools/external/driver-tool/sratools.cpp.orig	2023-08-12 23:35:22.000000000 +0000
 +++ tools/external/driver-tool/sratools.cpp
-@@ -578,9 +578,17 @@ static int main(CommandLine const &argv)
+@@ -578,9 +578,18 @@ static int main(CommandLine const &argv)
  
  } // namespace sratools
  
 -#if BSD
 +#ifdef __NetBSD__
-+pthread_t	_thr_main = 0;
++// Defined in sysmgr.c
++extern pthread_t	_thr_main;
 +#endif
 +
 +#if BSD && ! MAC


Home | Main Index | Thread Index | Old Index