summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Michael Moser2022-07-25 19:40:28 +0200
committer Matteo Bernardini2022-10-01 10:28:02 +0200
commitee887bb025c7a35d1b19e5b0a5420dd56c817501 (patch)
tree4a50adafa289b97ec9485d51008ca8e9fc03b992
parent1bbfcb24994b4f85d5525c6a462e1110099ea32e (diff)
downloadslackbuilds-owncloud-client.tar.gz
network/owncloud-client: Patch for gcc >= 12.x.owncloud-client
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--network/owncloud-client/gcc12.patch93
-rw-r--r--network/owncloud-client/owncloud-client.SlackBuild2
2 files changed, 95 insertions, 0 deletions
diff --git a/network/owncloud-client/gcc12.patch b/network/owncloud-client/gcc12.patch
new file mode 100644
index 0000000000..31981415f8
--- /dev/null
+++ b/network/owncloud-client/gcc12.patch
@@ -0,0 +1,93 @@
+From c1e3bb8457d77619a1c31217716789e76fd06500 Mon Sep 17 00:00:00 2001
+From: Hannah von Reth <hannah.vonreth@owncloud.com>
+Date: Fri, 20 May 2022 11:19:59 +0200
+Subject: [PATCH] Fix build with gcc12
+
+---
+ src/common/asserts.h | 2 +-
+ src/common/vfs.h | 16 ++++++++--------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/common/asserts.h b/src/common/asserts.h
+index 9f43c532a6d..5fa4b4da3e5 100644
+--- a/src/common/asserts.h
++++ b/src/common/asserts.h
+@@ -44,7 +44,7 @@
+ } else { \
+ }
+
+-inline OC_REQUIRED_RESULT bool __OC_ENSURE(bool condition, const char *cond, const char *file, int line, const char *info)
++OC_REQUIRED_RESULT inline bool __OC_ENSURE(bool condition, const char *cond, const char *file, int line, const char *info)
+ {
+ if (Q_UNLIKELY(!condition)) {
+ OC_ASSERT_MSG("ENSURE: \"%s\" in file %s, line %d %s", cond, file, line, info);
+diff --git a/src/common/vfs.h b/src/common/vfs.h
+index 983c999106c..da04d7ed97d 100644
+--- a/src/common/vfs.h
++++ b/src/common/vfs.h
+@@ -162,17 +162,17 @@ class OCSYNC_EXPORT Vfs : public QObject
+ virtual bool isHydrating() const = 0;
+
+ /// Create a new dehydrated placeholder. Called from PropagateDownload.
+- virtual OC_REQUIRED_RESULT Result<void, QString> createPlaceholder(const SyncFileItem &item) = 0;
++ OC_REQUIRED_RESULT virtual Result<void, QString> createPlaceholder(const SyncFileItem &item) = 0;
+
+ /** Discovery hook: even unchanged files may need UPDATE_METADATA.
+ *
+ * For instance cfapi vfs wants local hydrated non-placeholder files to
+ * become hydrated placeholder files.
+ */
+- virtual OC_REQUIRED_RESULT bool needsMetadataUpdate(const SyncFileItem &item) = 0;
++ OC_REQUIRED_RESULT virtual bool needsMetadataUpdate(const SyncFileItem &item) = 0;
+
+ /// Determine whether the file at the given absolute path is a dehydrated placeholder.
+- virtual OC_REQUIRED_RESULT bool isDehydratedPlaceholder(const QString &filePath) = 0;
++ OC_REQUIRED_RESULT virtual bool isDehydratedPlaceholder(const QString &filePath) = 0;
+
+ /** Similar to isDehydratedPlaceholder() but used from sync discovery.
+ *
+@@ -181,7 +181,7 @@ class OCSYNC_EXPORT Vfs : public QObject
+ *
+ * Returning true means that type was fully determined.
+ */
+- virtual OC_REQUIRED_RESULT bool statTypeVirtualFile(csync_file_stat_t *stat, void *stat_data) = 0;
++ OC_REQUIRED_RESULT virtual bool statTypeVirtualFile(csync_file_stat_t *stat, void *stat_data) = 0;
+
+ /** Sets the pin state for the item at a path.
+ *
+@@ -192,7 +192,7 @@ class OCSYNC_EXPORT Vfs : public QObject
+ *
+ * relFilePath is relative to the sync folder. Can be "" for root folder.
+ */
+- virtual OC_REQUIRED_RESULT bool setPinState(const QString &relFilePath, PinState state) = 0;
++ OC_REQUIRED_RESULT virtual bool setPinState(const QString &relFilePath, PinState state) = 0;
+
+ /** Returns the pin state of an item at a path.
+ *
+@@ -203,7 +203,7 @@ class OCSYNC_EXPORT Vfs : public QObject
+ *
+ * Returns none on retrieval error.
+ */
+- virtual OC_REQUIRED_RESULT Optional<PinState> pinState(const QString &relFilePath) = 0;
++ OC_REQUIRED_RESULT virtual Optional<PinState> pinState(const QString &relFilePath) = 0;
+
+ /** Returns availability status of an item at a path.
+ *
+@@ -212,7 +212,7 @@ class OCSYNC_EXPORT Vfs : public QObject
+ *
+ * folderPath is relative to the sync folder. Can be "" for root folder.
+ */
+- virtual OC_REQUIRED_RESULT AvailabilityResult availability(const QString &folderPath) = 0;
++ OC_REQUIRED_RESULT virtual AvailabilityResult availability(const QString &folderPath) = 0;
+
+ public slots:
+ /** Update in-sync state based on SyncFileStatusTracker signal.
+@@ -240,7 +240,7 @@ public slots:
+ * If the remote metadata changes, the local placeholder's metadata should possibly
+ * change as well.
+ */
+- virtual OC_REQUIRED_RESULT Result<ConvertToPlaceholderResult, QString> updateMetadata(const SyncFileItem &item, const QString &filePath, const QString &replacesFile) = 0;
++ OC_REQUIRED_RESULT virtual Result<ConvertToPlaceholderResult, QString> updateMetadata(const SyncFileItem &item, const QString &filePath, const QString &replacesFile) = 0;
+
+ /** Setup the plugin for the folder.
+ *
diff --git a/network/owncloud-client/owncloud-client.SlackBuild b/network/owncloud-client/owncloud-client.SlackBuild
index 6b43409036..d3b7e914bb 100644
--- a/network/owncloud-client/owncloud-client.SlackBuild
+++ b/network/owncloud-client/owncloud-client.SlackBuild
@@ -82,6 +82,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/gcc12.patch
+
mkdir -p build
cd build
cmake \