libdazzel: Update to 3.40.0, fix header.
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
From 7a42701011425d821044ecd5ed8ee9d47cadd216 Mon Sep 17 00:00:00 2001
|
||||
From: Biswapriyo Nath <nathbappai@gmail.com>
|
||||
Date: Tue, 20 Apr 2021 01:23:39 +0530
|
||||
Subject: [PATCH] Include counter headers not for Win32.
|
||||
|
||||
---
|
||||
src/dazzle.h | 8 ++++++--
|
||||
src/util/meson.build | 1 +
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/dazzle.h b/src/dazzle.h
|
||||
index b206337..900ce3c 100644
|
||||
--- a/src/dazzle.h
|
||||
+++ b/src/dazzle.h
|
||||
@@ -133,7 +133,9 @@ G_BEGIN_DECLS
|
||||
#include "tree/dzl-tree-types.h"
|
||||
#include "util/dzl-cairo.h"
|
||||
#include "util/dzl-cancellable.h"
|
||||
-#include "util/dzl-counter.h"
|
||||
+#ifndef G_OS_WIN32
|
||||
+# include "util/dzl-counter.h"
|
||||
+#endif
|
||||
#include "util/dzl-date-time.h"
|
||||
#include "util/dzl-dnd.h"
|
||||
#include "util/dzl-file-manager.h"
|
||||
@@ -153,7 +155,9 @@ G_BEGIN_DECLS
|
||||
#include "widgets/dzl-box.h"
|
||||
#include "widgets/dzl-centering-bin.h"
|
||||
#include "widgets/dzl-column-layout.h"
|
||||
-#include "widgets/dzl-counters-window.h"
|
||||
+#ifndef G_OS_WIN32
|
||||
+# include "widgets/dzl-counters-window.h"
|
||||
+#endif
|
||||
#include "widgets/dzl-elastic-bin.h"
|
||||
#include "widgets/dzl-empty-state.h"
|
||||
#include "widgets/dzl-entry-box.h"
|
||||
diff --git a/src/util/meson.build b/src/util/meson.build
|
||||
index 19cc951..b267773 100644
|
||||
--- a/src/util/meson.build
|
||||
+++ b/src/util/meson.build
|
||||
@@ -36,6 +36,7 @@ util_sources = [
|
||||
]
|
||||
|
||||
# No counters if building on win32 for now.
|
||||
+# When avaiable remove G_OS_WIN32 checks in src/dazzel.h.
|
||||
# They need explicit porting to that platform and should
|
||||
# probably just wrap the eventtrace API or something.
|
||||
if host_machine.system() != 'windows'
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
From 3ccef8c092cc33cd6678185a19eda57a85685b9e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hergert <chergert@redhat.com>
|
||||
Date: Mon, 9 Nov 2020 09:03:43 -0800
|
||||
Subject: [PATCH] build: fix build for mingw64
|
||||
|
||||
This fixes some issues where the types were causing different alignment
|
||||
rules for Windows than we expect elsewhere.
|
||||
|
||||
This supercedes !48, and is based upon ZUHONG TAO's work there to include
|
||||
the necessary changes for alignment fixes.
|
||||
---
|
||||
src/files/dzl-recursive-file-monitor.c | 4 ++++
|
||||
src/search/dzl-fuzzy-mutable-index.c | 5 +++++
|
||||
src/search/dzl-trie.c | 16 +++++++++-------
|
||||
tests/test-directory-reaper.c | 2 ++
|
||||
4 files changed, 20 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/files/dzl-recursive-file-monitor.c b/src/files/dzl-recursive-file-monitor.c
|
||||
index 824fd83..b09fbf9 100644
|
||||
--- a/src/files/dzl-recursive-file-monitor.c
|
||||
+++ b/src/files/dzl-recursive-file-monitor.c
|
||||
@@ -174,7 +174,11 @@ resolve_file (GFile *file)
|
||||
return g_object_ref (file);
|
||||
|
||||
orig_path = g_file_get_path (file);
|
||||
+#ifdef G_OS_UNIX
|
||||
real_path = realpath (orig_path, NULL);
|
||||
+#else
|
||||
+ real_path = _fullpath (orig_path, NULL, _MAX_PATH);
|
||||
+#endif
|
||||
|
||||
/* unlikely, but PATH_MAX exceeded */
|
||||
if (real_path == NULL)
|
||||
diff --git a/src/search/dzl-fuzzy-mutable-index.c b/src/search/dzl-fuzzy-mutable-index.c
|
||||
index 49a6c8a..b34a8b5 100644
|
||||
--- a/src/search/dzl-fuzzy-mutable-index.c
|
||||
+++ b/src/search/dzl-fuzzy-mutable-index.c
|
||||
@@ -62,8 +62,13 @@ struct _DzlFuzzyMutableIndex
|
||||
#pragma pack(push, 1)
|
||||
typedef struct
|
||||
{
|
||||
+#ifdef G_OS_WIN32
|
||||
+ guint32 id;
|
||||
+ guint16 pos;
|
||||
+#else
|
||||
guint64 id : 32;
|
||||
guint64 pos : 16;
|
||||
+#endif
|
||||
} DzlFuzzyMutableIndexItem;
|
||||
#pragma pack(pop)
|
||||
|
||||
diff --git a/src/search/dzl-trie.c b/src/search/dzl-trie.c
|
||||
index b4ac47c..75ed5f6 100644
|
||||
--- a/src/search/dzl-trie.c
|
||||
+++ b/src/search/dzl-trie.c
|
||||
@@ -71,16 +71,17 @@ G_DEFINE_BOXED_TYPE (DzlTrie, dzl_trie, dzl_trie_ref, dzl_trie_unref)
|
||||
* @children: The children #DzlTrieNodeChunk or %NULL. If the chunk is
|
||||
* inline the DzlTrieNode, then there will be fewer items.
|
||||
*/
|
||||
-DZL_ALIGNED_BEGIN(1)
|
||||
+#pragma pack(push, 1)
|
||||
struct _DzlTrieNodeChunk
|
||||
{
|
||||
DzlTrieNodeChunk *next;
|
||||
- gboolean is_inline : 1;
|
||||
- guint flags : 7;
|
||||
- guint count : 8;
|
||||
+ guint16 is_inline : 1;
|
||||
+ guint16 flags : 7;
|
||||
+ guint16 count : 8;
|
||||
guint8 keys[6];
|
||||
DzlTrieNode *children[0];
|
||||
-} DZL_ALIGNED_END(1);
|
||||
+};
|
||||
+#pragma pack(pop)
|
||||
|
||||
/**
|
||||
* DzlTrieNode:
|
||||
@@ -90,13 +91,14 @@ struct _DzlTrieNodeChunk
|
||||
* @chunk: The first chunk in the chain. Inline chunks have fewer children
|
||||
* elements than extra allocated chunks so that they are cache aligned.
|
||||
*/
|
||||
-DZL_ALIGNED_BEGIN(1)
|
||||
+#pragma pack(push, 1)
|
||||
struct _DzlTrieNode
|
||||
{
|
||||
DzlTrieNode *parent;
|
||||
gpointer value;
|
||||
DzlTrieNodeChunk chunk;
|
||||
-} DZL_ALIGNED_END(1);
|
||||
+};
|
||||
+#pragma pack(pop)
|
||||
|
||||
/**
|
||||
* DzlTrie:
|
||||
diff --git a/tests/test-directory-reaper.c b/tests/test-directory-reaper.c
|
||||
index 99bfcd7..a185bd2 100644
|
||||
--- a/tests/test-directory-reaper.c
|
||||
+++ b/tests/test-directory-reaper.c
|
||||
@@ -75,6 +75,7 @@ test_reaper_basic (void)
|
||||
g_assert_cmpint (r, ==, TRUE);
|
||||
}
|
||||
|
||||
+#ifdef G_OS_UNIX
|
||||
/* Add a symlink to ../ so that we keep ourselves honest ;) */
|
||||
{
|
||||
g_autofree gchar *cwd = g_get_current_dir ();
|
||||
@@ -95,6 +96,7 @@ test_reaper_basic (void)
|
||||
g_assert_cmpint (0, ==, symlink ("../../../out-of-tree", "reaper/a/b/d"));
|
||||
g_assert_true (g_file_test ("reaper/a/b/d", G_FILE_TEST_IS_SYMLINK));
|
||||
g_assert_true (g_file_test ("reaper/a/b/d", G_FILE_TEST_EXISTS));
|
||||
+#endif
|
||||
|
||||
dzl_directory_reaper_add_directory (reaper, file, 0);
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
_realname=libdazzle
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=3.38.0
|
||||
pkgrel=3
|
||||
pkgver=3.40.0
|
||||
pkgrel=1
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
|
||||
pkgdesc="A companion library to GObject and Gtk+"
|
||||
@@ -22,18 +22,20 @@ url="https://gitlab.gnome.org/GNOME/libdazzle"
|
||||
source=("https://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz"
|
||||
"0001-build-on-win32.patch"
|
||||
"0002-Install-to-bin-dir.patch"
|
||||
"0003-mingw-fixes.patch")
|
||||
sha256sums=('e18af28217943bcec106585298a91ec3da48aa3ad62fd0992f23f0c70cd1678f'
|
||||
"0003-Include-counter-headers-not-for-Win32.patch")
|
||||
sha256sums=('dba99a7e65fa6662c012b306e5d0f99ff3b466a46059ea7aa0104aaf65ce4ba5'
|
||||
'4078776e59f690829008b83008f967a9974bbaacce09e5a81bd9cad3a7893efc'
|
||||
'8585b4889cd1ce2c6a50634ff75f28a23f8d1b9ebf5f465e363e7897247ee12c'
|
||||
'6c952c082f777f22823690865bd1729f0d9e1f55581dd46c728dba43629ca28a')
|
||||
'9b2e711405255bf6e4cdc3aa1559f4d08882e9f1e3ee01cde327e96eda76076f')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"/${_realname}-${pkgver}
|
||||
|
||||
patch -p1 -i ${srcdir}/0001-build-on-win32.patch
|
||||
patch -p1 -i ${srcdir}/0002-Install-to-bin-dir.patch
|
||||
patch -p1 -i ${srcdir}/0003-mingw-fixes.patch
|
||||
patch -p1 -i "${srcdir}/0001-build-on-win32.patch"
|
||||
patch -p1 -i "${srcdir}/0002-Install-to-bin-dir.patch"
|
||||
|
||||
# https://gitlab.gnome.org/GNOME/libdazzle/-/merge_requests/51
|
||||
patch -p1 -i "${srcdir}/0003-Include-counter-headers-not-for-Win32.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in New Issue
Block a user