mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
190 lines
5.1 KiB
Plaintext
190 lines
5.1 KiB
Plaintext
From 6fdc080dc1c8daee7edaed74ad86dfb0fd96b16b 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 f9e6aa2..800a9a2 100644
|
|
--- a/wsutil/cpu_info.c
|
|
+++ b/wsutil/cpu_info.c
|
|
@@ -412,7 +412,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.42.1
|
|
|
|
|
|
From aeaf476bfe3848251820b0993c3059fb390e039f 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.42.1
|
|
|
|
|
|
From bbb73c7b5159eb745e414a142bac185db8ff807b 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 065cdd3..e264576 100644
|
|
--- a/wsutil/filesystem.c
|
|
+++ b/wsutil/filesystem.c
|
|
@@ -804,6 +804,12 @@ configuration_init_posix(const char* arg0)
|
|
}
|
|
}
|
|
|
|
+ static char buffer[PATH_MAX + 1];
|
|
+ char *res = realpath(prog_pathname, buffer);
|
|
+ if (res != NULL) {
|
|
+ prog_pathname = g_strdup(buffer);
|
|
+ }
|
|
+
|
|
/*
|
|
* OK, we have what we think is the pathname
|
|
* of the program.
|
|
--
|
|
2.42.1
|
|
|
|
|
|
From f825e34c1ccca4fd3b16ab4069e30ad87f320959 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 e264576..102bc17 100644
|
|
--- a/wsutil/filesystem.c
|
|
+++ b/wsutil/filesystem.c
|
|
@@ -1420,6 +1420,8 @@ get_systemfile_dir(void)
|
|
{
|
|
#ifdef _WIN32
|
|
return get_datafile_dir();
|
|
+#elif __HAIKU__
|
|
+ return "/boot/system/settings/etc";
|
|
#else
|
|
return "/etc";
|
|
#endif
|
|
--
|
|
2.42.1
|
|
|
|
|
|
From 68ee2e00fd1b8310804fb40c2ce7014bb0e01633 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 102bc17..3ba8390 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>
|
|
@@ -1240,6 +1244,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, (char *)NULL);
|
|
@@ -1580,6 +1586,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.42.1
|
|
|
|
|
|
From 6837b9f3fbc966a98fa60922720a72cbacb2c994 Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Tue, 7 Mar 2023 15:42:01 +0100
|
|
Subject: Haiku: adjust default value for INSTALL_DATADIR
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 4836838..9eaaa47 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -289,6 +289,12 @@ if(WIN32 AND NOT USE_MSYSTEM)
|
|
set(CMAKE_INSTALL_INCLUDEDIR "include")
|
|
set(CMAKE_INSTALL_DATADIR ".")
|
|
set(CMAKE_INSTALL_DOCDIR ".")
|
|
+elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku")
|
|
+ # By default INSTALL_DATADIR is set to INSTALL_DATAROOTDIR, set the
|
|
+ # proper value here.
|
|
+ set(CMAKE_INSTALL_DATADIR "data/${PROJECT_NAME}"
|
|
+ CACHE PATH "Read-only architecture-independent data"
|
|
+ )
|
|
else()
|
|
# By default INSTALL_DATADIR is set to INSTALL_DATAROOTDIR, set the
|
|
# proper value here.
|
|
--
|
|
2.42.1
|
|
|
|
|
|
From 2de9c94633a517c04cbea183e9353d2dff907107 Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Sun, 23 Apr 2023 19:18:49 +0000
|
|
Subject: deregister log writer on exit
|
|
|
|
|
|
diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp
|
|
index eef4e44..5144dae 100644
|
|
--- a/ui/qt/main.cpp
|
|
+++ b/ui/qt/main.cpp
|
|
@@ -129,6 +129,7 @@ void exit_application(int status) {
|
|
if (wsApp) {
|
|
wsApp->quit();
|
|
}
|
|
+ qInstallMessageHandler(0);
|
|
exit(status);
|
|
}
|
|
|
|
--
|
|
2.42.1
|
|
|