pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
recoll: improve pxattr patch, from Jean-Francois Dockes
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%gatalith.at@localhost>
Pushed By: wiz
Date: Fri Sep 29 20:06:57 2023 +0200
Changeset: 184fa57efb1da73ac90e368e4005d91d921903c4
Modified Files:
recoll/TODO
recoll/distinfo
recoll/patches/patch-utils_pxattr.cpp
Log Message:
recoll: improve pxattr patch, from Jean-Francois Dockes
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=184fa57efb1da73ac90e368e4005d91d921903c4
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
recoll/TODO | 8 +--
recoll/distinfo | 2 +-
recoll/patches/patch-utils_pxattr.cpp | 97 ++++++++++++++++++++++++++++++++++-
3 files changed, 97 insertions(+), 10 deletions(-)
diffs:
diff --git a/recoll/TODO b/recoll/TODO
index 1db50a117f..3c2dc837d0 100644
--- a/recoll/TODO
+++ b/recoll/TODO
@@ -1,11 +1,5 @@
-Build stops at
+Build stops with
---- recollindex ---
-ld: ./.libs/librecoll.a(mimetype.o): in function `mimetype(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RclConfig*, bool, MedocUtils::PathStat const&)':
-/scratch/wip/recoll/work/recoll-1.35.0/index/mimetype.cpp:187: undefined reference to `pxattr::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, pxattr::flags, pxattr::nspace)'
-ld: ./.libs/librecoll.a(mh_text.o): in function `MimeHandlerText::set_document_file_impl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
-/scratch/wip/recoll/work/recoll-1.35.0/internfile/mh_text.cpp:74: undefined reference to `pxattr::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, pxattr::flags, pxattr::nspace)'
---- recollqt ---
--- .obj/advshist.o ---
In file included from advshist.cpp:24:
../query/dynconf.h: In member function 'virtual bool RclSListEntry::decode(const string&)':
diff --git a/recoll/distinfo b/recoll/distinfo
index 4db8d18bd1..7869a58176 100644
--- a/recoll/distinfo
+++ b/recoll/distinfo
@@ -3,4 +3,4 @@ $NetBSD: distinfo,v 1.2 2012/06/14 07:29:13 thomasklausner Exp $
BLAKE2s (recoll-1.35.0.tar.gz) = ea04fb056b3b0d8d3f0cc1d64932f842268d19d246952d9947bf2516fc2395ae
SHA512 (recoll-1.35.0.tar.gz) = 35dcbfb650251b00f2c7654dc7617bf24f7e480955121821c55e0d31c6ec4fa041f8f99e64afa12ad4ead725c366084d7d727dbdcee875b93bbc858a6229d236
Size (recoll-1.35.0.tar.gz) = 3121862 bytes
-SHA1 (patch-utils_pxattr.cpp) = d124c5c316a204665831167b8c7b26d48b7fcfea
+SHA1 (patch-utils_pxattr.cpp) = da808290ecfe0189255fd3f1336415a55b9dd873
diff --git a/recoll/patches/patch-utils_pxattr.cpp b/recoll/patches/patch-utils_pxattr.cpp
index 15996e5303..2e1fef7f53 100644
--- a/recoll/patches/patch-utils_pxattr.cpp
+++ b/recoll/patches/patch-utils_pxattr.cpp
@@ -2,12 +2,105 @@ $NetBSD$
--- utils/pxattr.cpp.orig 2023-05-12 08:19:26.000000000 +0000
+++ utils/pxattr.cpp
-@@ -64,7 +64,7 @@
+@@ -27,14 +27,6 @@
+ \brief Portable External Attributes API
+ */
+
+-// PXALINUX: platforms like kfreebsd which aren't linux but use the
+-// same xattr interface
+-#if defined(__linux__) || \
+- (defined(__FreeBSD_kernel__)&&defined(__GLIBC__)&&!defined(__FreeBSD__)) || \
+- defined(__CYGWIN__)
+-#define PXALINUX
+-#endif
+-
+ // If the platform is not known yet, let this file be empty instead of
+ // breaking the compile, this will let the build work if the rest of
+ // the software is not actually calling us. If it does call us, this
+@@ -44,6 +36,20 @@
+ // just let the methods return errors (like they would on a non-xattr
+ // fs on e.g. linux)
+
++
++// PXALINUX: platforms like kfreebsd which aren't linux but use the
++// same xattr interface
++#if defined(__linux__) || \
++ (defined(__FreeBSD_kernel__)&&defined(__GLIBC__)&&!defined(__FreeBSD__)) || \
++ defined(__CYGWIN__)
++#define PXALINUX
++#endif
++
++// FreeBSD and NetBSD use the same interface. Let's call this PXAFREEBSD
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++#define PXAFREEBSD
++#endif // __FreeBSD__ or __NetBSD__
++
+ // Not exactly true for win32, but makes my life easier by avoiding ifdefs in recoll (the calls just
+ // fail, which is expected)
+ #if defined(__DragonFly__) || defined(__OpenBSD__) || defined(_WIN32)
+@@ -55,7 +61,7 @@
+ #endif
+
+
+-#if defined(__FreeBSD__) || defined(PXALINUX) || defined(__APPLE__) || defined(HAS_NO_XATTR)
++#if defined(PXAFREEBSD) || defined(PXALINUX) || defined(__APPLE__) || defined(HAS_NO_XATTR)
+
+
+ #ifndef TEST_PXATTR
+@@ -64,7 +70,7 @@
#include <stdlib.h>
#include <stdio.h>
-#if defined(__FreeBSD__)
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
++#if defined(PXAFREEBSD)
#include <sys/extattr.h>
#include <sys/uio.h>
#elif defined(PXALINUX)
+@@ -112,7 +118,7 @@ get(int fd, const string& path, const st
+
+ ssize_t ret = -1;
+ AutoBuf buf;
+-#if defined(__FreeBSD__)
++#if defined(PXAFREEBSD)
+ if (fd < 0) {
+ if (flags & PXATTR_NOFOLLOW) {
+ ret = extattr_get_link(path.c_str(), EXTATTR_NAMESPACE_USER,
+@@ -209,7 +215,7 @@ set(int fd, const string& path, const st
+
+ ssize_t ret = -1;
+
+-#if defined(__FreeBSD__)
++#if defined(PXAFREEBSD)
+
+ if (flags & (PXATTR_CREATE|PXATTR_REPLACE)) {
+ // Need to test existence
+@@ -306,7 +312,7 @@ del(int fd, const string& path, const st
+
+ int ret = -1;
+
+-#if defined(__FreeBSD__)
++#if defined(PXAFREEBSD)
+ if (fd < 0) {
+ if (flags & PXATTR_NOFOLLOW) {
+ ret = extattr_delete_link(path.c_str(), EXTATTR_NAMESPACE_USER,
+@@ -353,7 +359,7 @@ list(int fd, const string& path, vector<
+ ssize_t ret = -1;
+ AutoBuf buf;
+
+-#if defined(__FreeBSD__)
++#if defined(PXAFREEBSD)
+ if (fd < 0) {
+ if (flags & PXATTR_NOFOLLOW) {
+ ret = extattr_list_link(path.c_str(), EXTATTR_NAMESPACE_USER, 0, 0);
+@@ -438,9 +444,9 @@ list(int fd, const string& path, vector<
+
+ char *bufstart = buf.buf;
+
+- // All systems return a 0-separated string list except FreeBSD
++ // All systems return a 0-separated string list except FreeBSD/NetBSD
+ // which has length, value pairs, length is a byte.
+-#if defined(__FreeBSD__)
++#if defined(PXAFREEBSD)
+ char *cp = buf.buf;
+ unsigned int len;
+ while (cp < buf.buf + ret + 1) {
Home |
Main Index |
Thread Index |
Old Index