Files
haikuports/net-analyzer/wireshark/patches/wireshark-4.0.7.patchset
2023-08-05 05:32:17 +00:00

248 lines
6.8 KiB
Plaintext

From 9c6502a444c6bc4c08d723e7a4378cc3e3aedf2d 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 d86d35869ee27d522915f1a7d4ba74b53f1de6ae 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 88936274fa8e28a473b614400369a10267aa5196 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 1eca4ce..138a1bf 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -741,6 +741,12 @@ configuration_init(
}
}
+ 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.37.3
From e4f4b6acf0316f7b6d769f9a75a290b24304d3d4 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 138a1bf..b412dbc 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -1230,6 +1230,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 0effbf8f12ed324049bd9bbd3f108cf627b5308d Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Thu, 25 Nov 2021 18:24:45 +0000
Subject: use full path for PLUGIN_DIR, EXTCAP_DIR, DATA_DIR
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
index a55086c..3b51243 100644
--- a/wsutil/CMakeLists.txt
+++ b/wsutil/CMakeLists.txt
@@ -7,9 +7,12 @@
# 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}\")
+GNUInstallDirs_get_absolute_install_dir(PLUGIN_INSTALL_FULL_LIBDIR PLUGIN_INSTALL_LIBDIR LIBDIR)
+GNUInstallDirs_get_absolute_install_dir(EXTCAP_INSTALL_FULL_LIBDIR EXTCAP_INSTALL_LIBDIR LIBDIR)
+
+add_definitions(-DPLUGIN_DIR=\"${PLUGIN_INSTALL_FULL_LIBDIR}\")
+add_definitions(-DEXTCAP_DIR=\"${EXTCAP_INSTALL_FULL_LIBDIR}\")
+add_definitions(-DDATA_DIR=\"${CMAKE_INSTALL_FULL_DATADIR}\")
add_subdirectory(wmem)
--
2.37.3
From ecf04cfad15ba4f1eff71ad937a74b157be0e116 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 b412dbc..30ea574 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>
@@ -1079,6 +1083,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);
@@ -1390,6 +1396,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
From 91b6c820710ad5039d43cb31d2f732c76b3b9c4b 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 6db2e46..78ef1df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -240,6 +240,12 @@ if(WIN32)
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.37.3
From 681db79f9d0024ce964f3b23dd4032b54ba31688 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 87c02a9..e27a8af 100644
--- a/ui/qt/main.cpp
+++ b/ui/qt/main.cpp
@@ -128,6 +128,7 @@ void exit_application(int status) {
if (wsApp) {
wsApp->quit();
}
+ qInstallMessageHandler(0);
exit(status);
}
--
2.37.3
From 8b0028c571061f5844ea7be6a0d0a1b31bad2de0 Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Fri, 4 Aug 2023 21:21:58 +0200
Subject: AUTHORS-SHORT should not depend on asciidoctor
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 78ef1df..5a0b9e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2004,9 +2004,12 @@ if (BUILD_logray)
)
endif()
+list(APPEND INSTALL_FILES
+ ${CMAKE_BINARY_DIR}/doc/AUTHORS-SHORT
+)
+
if (ASCIIDOCTOR_FOUND)
list(APPEND INSTALL_FILES
- ${CMAKE_BINARY_DIR}/doc/AUTHORS-SHORT
${CMAKE_BINARY_DIR}/doc/androiddump.html
${CMAKE_BINARY_DIR}/doc/udpdump.html
${CMAKE_BINARY_DIR}/doc/capinfos.html
--
2.37.3