public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/bibletime] rawhide: Fix FTBFS with C++20 spaceship operator, fixes rhbz#2433879
@ 2026-06-29 23:48 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-06-29 23:48 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/bibletime
            Branch : rawhide
            Commit : b8718557c447a7b43e2afc1076c1a0fbe49d5715
            Author : Filipe Rosset <filiperosset@fedoraproject.org>
            Date   : 2026-06-23T17:33:36-03:00
            Stats  : +107/-10 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/bibletime/c/b8718557c447a7b43e2afc1076c1a0fbe49d5715?branch=rawhide

            Log:
            Fix FTBFS with C++20 spaceship operator, fixes rhbz#2433879

Signed-off-by: Filipe Rosset <filiperosset@fedoraproject.org>

---
diff --git a/bibletime-c++20-spaceship.patch b/bibletime-c++20-spaceship.patch
new file mode 100644
index 0000000..d7df306
--- /dev/null
+++ b/bibletime-c++20-spaceship.patch
@@ -0,0 +1,94 @@
+diff -urN a/src/backend/keys/cswordtreekey.h b/src/backend/keys/cswordtreekey.h
+--- a/src/backend/keys/cswordtreekey.h	2025-03-21 12:51:00.000000000 -0300
++++ b/src/backend/keys/cswordtreekey.h	2026-06-23 14:44:56.700110829 -0300
+@@ -49,21 +49,32 @@
+ 
+     public:
+ 
+-        #define BibleTime_CSwordTreeKey_DEFINE_COMP(op) \
++        #if __cpp_impl_three_way_comparison >= 201907L
++        #define BibleTime_CSwordTreeKey_DEFINE_COMP_AUTO(op) \
++            friend auto operator op(CSwordTreeKey const & lhs, \
++                                    CSwordTreeKey const & rhs) \
++            { return lhs.offset() op rhs.offset(); }
++        #define BibleTime_CSwordTreeKey_DEFINE_COMP_BOOL(op) \
+             friend bool operator op(CSwordTreeKey const & lhs, \
+                                     CSwordTreeKey const & rhs) \
+             { return lhs.offset() op rhs.offset(); }
+-        #if __cpp_impl_three_way_comparison >= 201907L
+-        BibleTime_CSwordTreeKey_DEFINE_COMP(<=>)
++        BibleTime_CSwordTreeKey_DEFINE_COMP_AUTO(<=>)
++        BibleTime_CSwordTreeKey_DEFINE_COMP_BOOL(==)
++        #undef BibleTime_CSwordTreeKey_DEFINE_COMP_AUTO
++        #undef BibleTime_CSwordTreeKey_DEFINE_COMP_BOOL
+         #else
++        #define BibleTime_CSwordTreeKey_DEFINE_COMP(op) \
++            friend bool operator op(CSwordTreeKey const & lhs, \
++                                    CSwordTreeKey const & rhs) \
++            { return lhs.offset() op rhs.offset(); }
+         BibleTime_CSwordTreeKey_DEFINE_COMP(<)
+         BibleTime_CSwordTreeKey_DEFINE_COMP(<=)
+         BibleTime_CSwordTreeKey_DEFINE_COMP(==)
+         BibleTime_CSwordTreeKey_DEFINE_COMP(!=)
+         BibleTime_CSwordTreeKey_DEFINE_COMP(>=)
+         BibleTime_CSwordTreeKey_DEFINE_COMP(>)
+-        #endif
+         #undef BibleTime_CSwordTreeKey_DEFINE_COMP
++        #endif
+ 
+         CSwordTreeKey & operator=(CSwordTreeKey const &) = delete;
+ 
+diff -urN a/src/backend/keys/cswordversekey.h b/src/backend/keys/cswordversekey.h
+--- a/src/backend/keys/cswordversekey.h	2025-03-21 12:51:00.000000000 -0300
++++ b/src/backend/keys/cswordversekey.h	2026-06-23 14:44:51.584503225 -0300
+@@ -70,7 +70,17 @@
+ 
+     public: // methods:
+ 
+-        #define BibleTime_CSwordVerseKey_DEFINE_COMP(op) \
++        #if __cpp_impl_three_way_comparison >= 201907L
++        #define BibleTime_CSwordVerseKey_DEFINE_COMP_AUTO(op) \
++            friend auto operator op(CSwordVerseKey const & lhs, \
++                                    CSwordVerseKey const & rhs) \
++            { \
++                return std::tuple(lhs.testament(), lhs.book(), lhs.chapter(), \
++                                  lhs.verse(), lhs.suffix()) op \
++                       std::tuple(rhs.testament(), rhs.book(), rhs.chapter(), \
++                                  rhs.verse(), rhs.suffix()); \
++            }
++        #define BibleTime_CSwordVerseKey_DEFINE_COMP_BOOL(op) \
+             friend bool operator op(CSwordVerseKey const & lhs, \
+                                     CSwordVerseKey const & rhs) \
+             { \
+@@ -79,17 +89,28 @@
+                        std::tuple(rhs.testament(), rhs.book(), rhs.chapter(), \
+                                   rhs.verse(), rhs.suffix()); \
+             }
+-        #if __cpp_impl_three_way_comparison >= 201907L
+-        BibleTime_CSwordVerseKey_DEFINE_COMP(<=>)
++        BibleTime_CSwordVerseKey_DEFINE_COMP_AUTO(<=>)
++        BibleTime_CSwordVerseKey_DEFINE_COMP_BOOL(==)
++        #undef BibleTime_CSwordVerseKey_DEFINE_COMP_AUTO
++        #undef BibleTime_CSwordVerseKey_DEFINE_COMP_BOOL
+         #else
++        #define BibleTime_CSwordVerseKey_DEFINE_COMP(op) \
++            friend bool operator op(CSwordVerseKey const & lhs, \
++                                    CSwordVerseKey const & rhs) \
++            { \
++                return std::tuple(lhs.testament(), lhs.book(), lhs.chapter(), \
++                                  lhs.verse(), lhs.suffix()) op \
++                       std::tuple(rhs.testament(), rhs.book(), rhs.chapter(), \
++                                  rhs.verse(), rhs.suffix()); \
++            }
+         BibleTime_CSwordVerseKey_DEFINE_COMP(<)
+         BibleTime_CSwordVerseKey_DEFINE_COMP(<=)
+         BibleTime_CSwordVerseKey_DEFINE_COMP(==)
+         BibleTime_CSwordVerseKey_DEFINE_COMP(!=)
+         BibleTime_CSwordVerseKey_DEFINE_COMP(>=)
+         BibleTime_CSwordVerseKey_DEFINE_COMP(>)
+-        #endif
+         #undef BibleTime_CSwordVerseKey_DEFINE_COMP
++        #endif
+ 
+         CSwordVerseKey & operator=(CSwordVerseKey const &) = delete;
+ 

diff --git a/bibletime.spec b/bibletime.spec
index ddb9273..396868d 100644
--- a/bibletime.spec
+++ b/bibletime.spec
@@ -1,11 +1,11 @@
 Name:           bibletime
 Version:        3.1.1
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        An easy to use Bible study tool
-# Automatically converted from old format: GPLv2 - review is highly recommended.
 License:        GPL-2.0-only
 URL:            http://www.bibletime.info/
 Source0:        http://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
+Patch:          bibletime-c++20-spaceship.patch
 
 # These lack qtwebengine/qtwebkit
 ExclusiveArch:  %{qt6_qtwebengine_arches}
@@ -30,7 +30,7 @@ BuildRequires:  make
 # fop is java_arches exclusive
 # However, this line is more inclusive of arches that do not have
 # qtwebengine
-#ExclusiveArch:  %{java_arches}
+#ExclusiveArch:  %%{java_arches}
 BuildRequires:  fop
 
 %description
@@ -41,7 +41,7 @@ texts, write own notes, save, print etc.). BibleTime is a frontend for
 the SWORD Bible Framework.
 
 %prep
-%autosetup
+%autosetup -p1
 
 %build
 %cmake -DCMAKE_BUILD_TYPE=Release
@@ -61,12 +61,12 @@ mv %{buildroot}%{_docdir}/%{name}/howto/pdf/{br,BR} || :
 %find_lang %{name} || touch %{name}.lang
 BT_DOC_DIR=%{_docdir}/%{name}/
 for doctype in handbook howto ; do
-	for fmt in html pdf; do
-		for lang_dir in %{buildroot}/$BT_DOC_DIR/$doctype/$fmt/* ; do
-			lang=$(basename $lang_dir)
-			echo "%lang($lang) $BT_DOC_DIR/$doctype/$fmt/$lang/*" >> %{name}.lang
-		done
-	done
+    for fmt in html pdf; do
+        for lang_dir in %{buildroot}/$BT_DOC_DIR/$doctype/$fmt/* ; do
+            lang=$(basename $lang_dir)
+            echo "%lang($lang) $BT_DOC_DIR/$doctype/$fmt/$lang/*" >> %{name}.lang
+        done
+    done
 done
 
 %check
@@ -89,6 +89,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/info.%{name}.BibleTim
 %{_datadir}/icons/hicolor/scalable/apps/info.%{name}.BibleTime.svg
 
 %changelog
+* Tue Jun 23 2026 Filipe Rosset <filiperosset@fedoraproject.org> - 3.1.1-7
+- Fix FTBFS with C++20 spaceship operator, fixes rhbz#2433879
+
 * Fri Jun 12 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 3.1.1-6
 - Rebuilt for openssl 4.0
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-29 23:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-29 23:48 [rpms/bibletime] rawhide: Fix FTBFS with C++20 spaceship operator, fixes rhbz#2433879 Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox