mirror of
https://git.freebsd.org/ports.git
synced 2025-04-29 01:56:37 -04:00
Major code and build system rework since 2.11 Now supports aarch64, unblocking rna-seq and atac-seq metaports Changes: https://github.com/ncbi/sra-tools/commits/master Reported by: portscout
20 lines
892 B
C++
20 lines
892 B
C++
--- tools/external/driver-tool/file-path.posix.cpp.orig 2023-07-10 16:23:35 UTC
|
|
+++ tools/external/driver-tool/file-path.posix.cpp
|
|
@@ -193,7 +193,16 @@ static char const *find_executable_path(char const *co
|
|
FilePath FilePath::fullPathToExecutable(char const *const *const argv, char const *const *const envp, char const *const *const extra)
|
|
{
|
|
char const *path;
|
|
-#if LINUX
|
|
+// Assume sra-tools is installed by FreeBSD ports. FreeBSD users
|
|
+// don't often install software by other means. Default prefix
|
|
+// is /usr/local, but this can be overridden by the user building
|
|
+// the port. The port can replace /usr/local using sed if that's the
|
|
+// case.
|
|
+#if BSD
|
|
+ char full_path[PATH_MAX];
|
|
+ snprintf(full_path, PATH_MAX, "/usr/local/bin/%s", argv[0]);
|
|
+ path = full_path;
|
|
+#elif LINUX
|
|
path = "/proc/self/exe";
|
|
#elif MAC
|
|
path = find_executable_path(extra, argv[0]);
|