mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
169 lines
4.7 KiB
Plaintext
169 lines
4.7 KiB
Plaintext
From 04c5a22ffb687760b5b03918eb9bc2b92521988e Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Tue, 25 Oct 2022 21:11:55 +0200
|
|
Subject: fix build for cpu_info.c
|
|
|
|
|
|
diff --git a/wsutil/cpu_info.c b/wsutil/cpu_info.c
|
|
index f7f0d2e..fee8651 100644
|
|
--- a/wsutil/cpu_info.c
|
|
+++ b/wsutil/cpu_info.c
|
|
@@ -413,7 +413,7 @@ get_cpu_info(GString *str)
|
|
ws_cpuid(CPUInfo, 0x80000004);
|
|
memcpy(CPUBrandString + 32, CPUInfo, sizeof(CPUInfo));
|
|
|
|
- model_name = g_strdup(g_strstrip(CPUBrandString));
|
|
+ char *model_name = g_strdup(g_strstrip(CPUBrandString));
|
|
g_tree_insert(model_names, model_name, NULL);
|
|
#endif
|
|
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From bd388fa669cd6ccf484a59908a04c4e9459c7c54 Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Tue, 25 Oct 2022 21:14:59 +0200
|
|
Subject: fix include sys/time.h
|
|
|
|
|
|
diff --git a/ui/qt/interface_toolbar_reader.cpp b/ui/qt/interface_toolbar_reader.cpp
|
|
index d12f747..80597f0 100644
|
|
--- a/ui/qt/interface_toolbar_reader.cpp
|
|
+++ b/ui/qt/interface_toolbar_reader.cpp
|
|
@@ -9,6 +9,7 @@
|
|
|
|
#include "config.h"
|
|
|
|
+#include <sys/time.h>
|
|
#include <sys/types.h>
|
|
|
|
#ifdef HAVE_UNISTD_H
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 64c102739f5ad1959347be9722fd863a86143bee Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Mon, 15 Nov 2021 10:26:33 +0000
|
|
Subject: use realpath in init_progfile_dir
|
|
|
|
|
|
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
|
|
index 4d749da..ab0220f 100644
|
|
--- a/wsutil/filesystem.c
|
|
+++ b/wsutil/filesystem.c
|
|
@@ -726,6 +726,12 @@ configuration_init(
|
|
}
|
|
}
|
|
|
|
+ static char buffer[PATH_MAX + 1];
|
|
+ char *res = realpath(prog_pathname, buffer);
|
|
+ if (res != NULL) {
|
|
+ prog_pathname = buffer;
|
|
+ }
|
|
+
|
|
/*
|
|
* OK, we have what we think is the pathname
|
|
* of the program.
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 66291b84f692d6a9277653057b40b163aa716df1 Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Thu, 25 Nov 2021 18:41:24 +0000
|
|
Subject: adjust get_systemfile_dir for Haiku
|
|
|
|
|
|
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
|
|
index ab0220f..2027fa7 100644
|
|
--- a/wsutil/filesystem.c
|
|
+++ b/wsutil/filesystem.c
|
|
@@ -1214,6 +1214,8 @@ get_systemfile_dir(void)
|
|
{
|
|
#ifdef _WIN32
|
|
return get_datafile_dir();
|
|
+#elif __HAIKU__
|
|
+ return "/boot/system/settings/etc";
|
|
#else
|
|
return "/etc";
|
|
#endif
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 00c98ea18a56361165a13934ea4d8c42c09a3712 Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Thu, 25 Nov 2021 18:24:45 +0000
|
|
Subject: remove prefix from PLUGIN_DIR, EXTCAP_DIR, DATA_DIR as they already
|
|
contain full path
|
|
|
|
|
|
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
|
|
index a55086c..6d82b11 100644
|
|
--- a/wsutil/CMakeLists.txt
|
|
+++ b/wsutil/CMakeLists.txt
|
|
@@ -7,9 +7,9 @@
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
#
|
|
|
|
-add_definitions(-DPLUGIN_DIR=\"${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_LIBDIR}\")
|
|
-add_definitions(-DEXTCAP_DIR=\"${CMAKE_INSTALL_PREFIX}/${EXTCAP_INSTALL_LIBDIR}\")
|
|
-add_definitions(-DDATA_DIR=\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}\")
|
|
+add_definitions(-DPLUGIN_DIR=\"${PLUGIN_INSTALL_LIBDIR}\")
|
|
+add_definitions(-DEXTCAP_DIR=\"${EXTCAP_INSTALL_LIBDIR}\")
|
|
+add_definitions(-DDATA_DIR=\"${CMAKE_INSTALL_DATADIR}\")
|
|
|
|
add_subdirectory(wmem)
|
|
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From f73f607e1576bae7d424ccdc75b78f880b7f6840 Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Tue, 25 Oct 2022 22:00:34 +0200
|
|
Subject: adjust user dirs for Haiku
|
|
|
|
|
|
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
|
|
index 2027fa7..02bddb1 100644
|
|
--- a/wsutil/filesystem.c
|
|
+++ b/wsutil/filesystem.c
|
|
@@ -39,6 +39,10 @@
|
|
#endif
|
|
#include <pwd.h>
|
|
#endif /* _WIN32 */
|
|
+#ifdef __HAIKU__
|
|
+#include <FindDirectory.h>
|
|
+#include <fs_info.h>
|
|
+#endif
|
|
|
|
#include <wsutil/report_message.h>
|
|
#include <wsutil/privileges.h>
|
|
@@ -1063,6 +1067,8 @@ init_plugin_pers_dir(void)
|
|
#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
|
|
#ifdef _WIN32
|
|
plugin_pers_dir = get_persconffile_path(PLUGINS_DIR_NAME, FALSE);
|
|
+#elif __HAIKU__
|
|
+ plugin_pers_dir = get_persconffile_path(PLUGINS_DIR_NAME, FALSE);
|
|
#else
|
|
plugin_pers_dir = g_build_filename(g_get_home_dir(), ".local/lib",
|
|
CONFIGURATION_NAMESPACE_LOWER, PLUGINS_DIR_NAME, (gchar *)NULL);
|
|
@@ -1374,6 +1380,11 @@ get_persconffile_dir_no_profile(void)
|
|
*/
|
|
persconffile_dir = g_build_filename("C:", persconf_namespace, NULL);
|
|
return persconffile_dir;
|
|
+#elif __HAIKU__
|
|
+ char buffer[B_PATH_NAME_LENGTH+B_FILE_NAME_LENGTH];
|
|
+ find_directory(B_USER_SETTINGS_DIRECTORY, dev_for_path("/boot"), true, buffer, sizeof(buffer));
|
|
+ persconffile_dir = g_build_filename(buffer, "wireshark", NULL);
|
|
+ return persconffile_dir;
|
|
#else
|
|
char *xdg_path, *path;
|
|
struct passwd *pwd;
|
|
--
|
|
2.37.3
|
|
|