pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
sra-tools: Successful build on NetBSD
Module Name: pkgsrc-wip
Committed By: Jason W. Bacon <bacon%NetBSD.org@localhost>
Pushed By: outpaddling
Date: Sun Aug 13 15:58:34 2023 -0500
Changeset: 5815fe82863e4d2e3cdd1d37719e98ae9ee3565d
Modified Files:
sra-tools/Makefile
sra-tools/distinfo
Added Files:
sra-tools/patches/patch-ncbi-vdb_libs_kproc_bsd_sysmgr.c
sra-tools/patches/patch-tools_external_driver-tool_build-version.cpp
sra-tools/patches/patch-tools_external_driver-tool_build-version.hpp
Log Message:
sra-tools: Successful build on NetBSD
Non-functional due to stub for pthread_main_np()
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5815fe82863e4d2e3cdd1d37719e98ae9ee3565d
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
sra-tools/Makefile | 15 +++++++------
sra-tools/distinfo | 3 +++
.../patches/patch-ncbi-vdb_libs_kproc_bsd_sysmgr.c | 26 ++++++++++++++++++++++
...ch-tools_external_driver-tool_build-version.cpp | 15 +++++++++++++
...ch-tools_external_driver-tool_build-version.hpp | 23 +++++++++++++++++++
5 files changed, 75 insertions(+), 7 deletions(-)
diffs:
diff --git a/sra-tools/Makefile b/sra-tools/Makefile
index 6034ca5f3d..714e565e45 100644
--- a/sra-tools/Makefile
+++ b/sra-tools/Makefile
@@ -81,20 +81,21 @@ pre-configure:
post-install:
${STRIP} ${DESTDIR}${PREFIX}/bin/*.${PKGVERSION_NOREV}
- ${MV} ${DESTDIR}${PREFIX}/share/examples ${DESTDIR}${PREFIX}/share/examples-sratools
- ${MKDIR} ${DESTDIR}${EXAMPLESDIR}
- ${MV} ${DESTDIR}${PREFIX}/share/examples-sratools/* ${DESTDIR}${EXAMPLESDIR}
- ${RMDIR} ${DESTDIR}${PREFIX}/share/examples-sratools
- ${MV} ${DESTDIR}${PREFIX}/share/examples-java ${DESTDIR}${EXAMPLESDIR}/java
- ${MV} ${DESTDIR}${PREFIX}/share/examples-python ${DESTDIR}${EXAMPLESDIR}/python
+ #${MV} ${DESTDIR}${PREFIX}/share/examples ${DESTDIR}${PREFIX}/share/examples-sratools
+ #${MKDIR} ${DESTDIR}${EXAMPLESDIR}
+ #${MV} ${DESTDIR}${PREFIX}/share/examples-sratools/* ${DESTDIR}${EXAMPLESDIR}
+ #${RMDIR} ${DESTDIR}${PREFIX}/share/examples-sratools
+ #${MV} ${DESTDIR}${PREFIX}/share/examples-java ${DESTDIR}${EXAMPLESDIR}/java
+ #${MV} ${DESTDIR}${PREFIX}/share/examples-python ${DESTDIR}${EXAMPLESDIR}/python
# Shouldn't epoll bl3 check this?
.if ${OPSYS} != Linux
.include "../../devel/libepoll-shim/buildlink3.mk"
.endif
-.include "../../devel/cmake/build.mk"
+.include "../../mk/java-vm.mk"
.include "../../mk/pthread.buildlink3.mk"
+.include "../../devel/cmake/build.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../devel/hdf5/buildlink3.mk"
.include "../../archivers/zstd/buildlink3.mk"
diff --git a/sra-tools/distinfo b/sra-tools/distinfo
index 7fdeeb7438..6d42259bd0 100644
--- a/sra-tools/distinfo
+++ b/sra-tools/distinfo
@@ -9,3 +9,6 @@ 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) = 00fc8af348db6a6fe213c4023fc6e8e46c34cf2c
+SHA1 (patch-tools_external_driver-tool_build-version.cpp) = ec194aad65c86035c1fee0fe42722faf06af17fe
+SHA1 (patch-tools_external_driver-tool_build-version.hpp) = 0d50aba6b3fe1086cf0562c935f114bb117ac195
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
new file mode 100644
index 0000000000..affb65576c
--- /dev/null
+++ b/sra-tools/patches/patch-ncbi-vdb_libs_kproc_bsd_sysmgr.c
@@ -0,0 +1,26 @@
+$NetBSD$
+
+# Stand-in for pthread_main_np()
+
+--- ncbi-vdb/libs/kproc/bsd/sysmgr.c.orig 2023-08-13 20:43:27.391870168 +0000
++++ ncbi-vdb/libs/kproc/bsd/sysmgr.c
+@@ -30,6 +30,19 @@
+ #include <pthread.h>
+ #include <unistd.h>
+
++/*
++ * NetBSD lacks non-POSIX POSIX threads functions (pthread_np)
++ */
++
++#ifdef __NetBSD__
++int pthread_main_np(void)
++
++{
++ // FIXME: Return a real value
++ return 0;
++}
++#endif
++
+ /* OnMainThread
+ * returns true if running on main thread
+ */
diff --git a/sra-tools/patches/patch-tools_external_driver-tool_build-version.cpp b/sra-tools/patches/patch-tools_external_driver-tool_build-version.cpp
new file mode 100644
index 0000000000..b3eb6f3b3d
--- /dev/null
+++ b/sra-tools/patches/patch-tools_external_driver-tool_build-version.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Resolve collision on NetBSD
+
+--- tools/external/driver-tool/build-version.cpp.orig 2023-08-13 20:53:11.943803445 +0000
++++ tools/external/driver-tool/build-version.cpp
+@@ -60,7 +60,7 @@ public:
+ }
+
+ VersionBuffer(sratools::Version const &vers) noexcept {
+- begin = utoa(vers.major(), '.', utoa(vers.minor(), '.', utoa(vers.revision(), '\0', end())));
++ begin = utoa(vers.ncbi_major(), '.', utoa(vers.ncbi_minor(), '.', utoa(vers.revision(), '\0', end())));
+ }
+ };
+
diff --git a/sra-tools/patches/patch-tools_external_driver-tool_build-version.hpp b/sra-tools/patches/patch-tools_external_driver-tool_build-version.hpp
new file mode 100644
index 0000000000..87bf699e25
--- /dev/null
+++ b/sra-tools/patches/patch-tools_external_driver-tool_build-version.hpp
@@ -0,0 +1,23 @@
+$NetBSD$
+
+# Resolve collision on NetBSD
+
+--- tools/external/driver-tool/build-version.hpp.orig 2023-08-13 20:51:13.494470918 +0000
++++ tools/external/driver-tool/build-version.hpp
+@@ -77,12 +77,12 @@ struct Version {
+ : packed((((uint32_t)major) << 24) | (((uint32_t)minor) << 16) | ((uint32_t)revision))
+ {}
+
+- unsigned major() const noexcept { return packed >> 24; }
+- unsigned minor() const noexcept { return (packed >> 16) & 0xFF; }
++ unsigned ncbi_major() const noexcept { return packed >> 24; }
++ unsigned ncbi_minor() const noexcept { return (packed >> 16) & 0xFF; }
+ unsigned revision() const noexcept { return packed & 0xFFFF; }
+
+- Version nextMinor() const noexcept { return Version(uint8_t(major()), uint8_t(minor() + 1), 0); }
+- Version nextMajor() const noexcept { return Version(uint8_t(major() + 1), 0, 0); }
++ Version nextMinor() const noexcept { return Version(uint8_t(ncbi_major()), uint8_t(ncbi_minor() + 1), 0); }
++ Version nextMajor() const noexcept { return Version(uint8_t(ncbi_major() + 1), 0, 0); }
+
+ /// \brief Scan the name for a version string; if found, remove it.
+ /// \Returns The found version or `Version()`.
Home |
Main Index |
Thread Index |
Old Index