public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/cutter-re] rawhide: Update to 2.5.0
@ 2026-08-16 23:16 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-08-16 23:16 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/cutter-re
            Branch : rawhide
            Commit : 673b3f4f31b59e31e74656ef99a82d1e6260616a
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-08-15T17:27:30-03:00
            Stats  : +213/-19 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/cutter-re/c/673b3f4f31b59e31e74656ef99a82d1e6260616a?branch=rawhide

            Log:
            Update to 2.5.0

Resolves: rhbz#2362520
Resolves: rhbz#2467052
Resolves: rhbz#2503835

---
diff --git a/.gitignore b/.gitignore
index fa74480..644aa31 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
 /cutter-*.tar.gz
-/Cutter-v*-src.tar.gz

diff --git a/cutter-re.spec b/cutter-re.spec
index fb80f97..0c6c824 100644
--- a/cutter-re.spec
+++ b/cutter-re.spec
@@ -1,36 +1,42 @@
+%global forgeurl https://github.com/rizinorg/cutter
+Version:        2.5.0
+%forgemeta
+
 Name:           cutter-re
-Version:        2.3.4
 Release:        %autorelease
 Summary:        GUI for Rizin reverse engineering framework
 
 # CC-BY-SA: src/img/icons/
-# CC0: src/fonts/Anonymous Pro.ttf
-License:        GPL-3.0-only AND CC-BY-SA-3.0 AND CC0-1.0
+# OFL-1.1: src/fonts/Anonymous Pro.ttf, src/fonts/Inconsolata-Regular.ttf
+License:        GPL-3.0-only AND CC-BY-SA-3.0 AND OFL-1.1
 
 URL:            https://cutter.re/
-VCS:            https://github.com/rizinorg/cutter
-Source0:        %{vcs}/releases/download/v%{version}/Cutter-v%{version}-src.tar.gz
+Source0:        %forgesource
 Source1:        cutter-re.desktop
 Source2:        cutter-re.appdata.xml
 
-BuildRequires:  rizin-devel >= 0.6.1
+Patch0:         rizin-compatibility.patch
+
 BuildRequires:  cmake
+BuildRequires:  desktop-file-utils
+BuildRequires:  file-devel
 BuildRequires:  gcc-c++
+BuildRequires:  graphviz-devel
+BuildRequires:  kf6-syntax-highlighting-devel
+BuildRequires:  libappstream-glib
 BuildRequires:  make
-BuildRequires:  kf5-syntax-highlighting-devel
 BuildRequires:  python3-devel
-BuildRequires:  qt5-qtsvg-devel
-BuildRequires:  file-devel
-BuildRequires:  desktop-file-utils
-BuildRequires:  libappstream-glib
-BuildRequires:  graphviz-devel
-BuildRequires:  qt5-linguist
-%ifarch %{qt5_qtwebengine_arches}
-BuildRequires:  qt5-qtwebengine-devel
+BuildRequires:  qt6-qt5compat-devel
+BuildRequires:  qt6-qtbase-devel
+BuildRequires:  qt6-qttools-devel
+BuildRequires:  qt6-qtsvg-devel
+%ifarch %{qt6_qtwebengine_arches}
+BuildRequires:  qt6-qtwebengine-devel
 %endif
+BuildRequires:  rizin-devel >= 0.8.0
+Requires:       hicolor-icon-theme
 Requires:       python3-jupyter-client
 Requires:       python3-notebook
-Requires:       hicolor-icon-theme
 
 %description
 Cutter is a Qt and C++ GUI for Rizin. Its goal is making an advanced,
@@ -49,7 +55,7 @@ information.
 
 
 %prep
-%autosetup -p1 -n Cutter-v%{version}
+%autosetup -p1 -n cutter-%{version}
 
 
 %build

diff --git a/rizin-compatibility.patch b/rizin-compatibility.patch
new file mode 100644
index 0000000..38174d1
--- /dev/null
+++ b/rizin-compatibility.patch
@@ -0,0 +1,189 @@
+--- cutter-2.5.0/src/core/RizinCpp.h.orig	2026-08-15 17:21:27.256131005 -0300
++++ cutter-2.5.0/src/core/RizinCpp.h	2026-08-15 17:23:49.639049656 -0300
+@@ -6,6 +6,26 @@
+ #define RIZINCPP_H
+ 
+ #include "rz_core.h"
++#include "rz_build_version.h"
++
++#if RZ_VERSION_NUMBER < 9000
++using RzCoreDecodedBytes = RzAnalysisBytes;
++static inline RzTypeDB *rz_analysis_get_type_db(RzAnalysis *analysis)
++{
++    return analysis->typedb;
++}
++static inline void rz_base_type_set_typeclass(RzBaseType *type, RzTypeTypeclass typeclass)
++{
++    (void)type;
++    (void)typeclass;
++}
++static inline void rz_core_types_rename(RzCore *core, const char *from, const char *to)
++{
++    (void)core;
++    (void)from;
++    (void)to;
++}
++#endif
+ 
+ #include <QString>
+ 
+@@ -53,11 +73,15 @@
+     return { data, {} };
+ }
+ 
+-// Rizin list iteration macros
+-// deprecated, prefer using CutterPVector and CutterRzList instead
++#if RZ_VERSION_NUMBER < 9000
++#define CutterRzListForeach(list, it, type, x)                                                     \
++    if (list)                                                                                      \
++        for (it = list->head; it && ((x = static_cast<type *>(it->elem))); it = it->next)
++#else
+ #define CutterRzListForeach(list, it, type, x)                                                     \
+     if (list)                                                                                      \
+         for (it = list->head; it && ((x = static_cast<type *>(it->val))); it = it->next)
++#endif
+ 
+ #define CutterRzVectorForeach(vec, it, type)                                                       \
+     if ((vec) && (vec)->a)                                                                         \
+@@ -151,7 +175,11 @@
+             if (!iter) {
+                 return nullptr;
+             }
++#if RZ_VERSION_NUMBER < 9000
++            return reinterpret_cast<T *>(iter->elem);
++#else
+             return reinterpret_cast<T *>(iter->val);
++#endif
+         }
+     };
+ 
+@@ -187,9 +215,9 @@
+         return *this;
+     }
+     operator bool() { return rzIter && rzIter->cur; }
+-    T &operator*() { return *reinterpret_cast<RzCoreDecodedBytes *>(rzIter->cur); }
+-    T *get() { return reinterpret_cast<RzCoreDecodedBytes *>(rzIter->cur); }
+-    T *operator->() { return reinterpret_cast<RzCoreDecodedBytes *>(rzIter->cur); }
++    T &operator*() { return *reinterpret_cast<T *>(rzIter->cur); }
++    T *get() { return reinterpret_cast<T *>(rzIter->cur); }
++    T *operator->() { return reinterpret_cast<T *>(rzIter->cur); }
+ };
+ 
+ #define CutterHtDef(xx, XX, K, VB)                                                                 \
+--- cutter-2.5.0/src/core/Cutter.cpp.orig	2026-08-15 17:25:06.365427901 -0300
++++ cutter-2.5.0/src/core/Cutter.cpp	2026-08-15 17:25:02.566326751 -0300
+@@ -203,8 +203,12 @@
+     app_path.cd("Resources");
+     qInfo() << "Setting Rizin prefix =" << app_path.absolutePath()
+             << " for macOS Application Bundle.";
++#if RZ_VERSION_NUMBER < 9000
++    rz_path_set_prefix(app_path.absolutePath().toUtf8().constData());
++#else
+     rz_path_set_prefix(rzCore->sys_path, app_path.absolutePath().toUtf8().constData());
+ #endif
++#endif
+ 
+     char **env = rz_sys_get_environ();
+     rzCore->io->envprofile = rz_run_get_environ_profile(env);
+@@ -4907,6 +4911,7 @@
+ void CutterCore::addMark(RVA from, RVA to, const QString &name, const QString &comment,
+                          QColor color)
+ {
++#if RZ_VERSION_NUMBER >= 9000
+     CORE_LOCK();
+     auto m = rz_mark_set(core->marks, name.toStdString().c_str(), from, to);
+     if (m) {
+@@ -4914,22 +4919,33 @@
+         rz_mark_item_set_color(m, color.name().toStdString().c_str());
+     }
+     emit marksChanged();
++#else
++    Q_UNUSED(from);
++    Q_UNUSED(to);
++    Q_UNUSED(name);
++    Q_UNUSED(comment);
++    Q_UNUSED(color);
++#endif
+ }
+ 
+ void CutterCore::delMark(const QString &name)
+ {
++#if RZ_VERSION_NUMBER >= 9000
+     CORE_LOCK();
+     auto m = rz_mark_get(core->marks, name.toStdString().c_str());
+     if (m) {
+         rz_mark_unset(core->marks, m);
+     }
+     emit marksChanged();
++#else
++    Q_UNUSED(name);
++#endif
+ }
+ 
+ QList<MarkDescription> CutterCore::convertMarks(RzList *marks)
+ {
+     QList<MarkDescription> markList;
+-
++#if RZ_VERSION_NUMBER >= 9000
+     RzListIter *it;
+     RzMarkItem *mark;
+     CutterRzListForeach (marks, it, RzMarkItem, mark) {
+@@ -4944,19 +4960,31 @@
+         markList.append(desc);
+     }
+     rz_list_free(marks);
++#else
++    (void)marks;
++#endif
+     return markList;
+ }
+ 
+ QList<MarkDescription> CutterCore::getMarks()
+ {
++#if RZ_VERSION_NUMBER >= 9000
+     CORE_LOCK();
+     return convertMarks(rz_mark_all_list(core->marks));
++#else
++    return {};
++#endif
+ }
+ 
+ QList<MarkDescription> CutterCore::getMarksAt(RVA addr)
+ {
++#if RZ_VERSION_NUMBER >= 9000
+     CORE_LOCK();
+     return convertMarks(rz_mark_get_all_off(core->marks, addr));
++#else
++    Q_UNUSED(addr);
++    return {};
++#endif
+ }
+ 
+ QColor CutterCore::getBlendedMarksColorAt(RVA addr)
+@@ -5170,7 +5198,11 @@
+ 
+ QString CutterCore::getRizinVersionReadable(const char *program)
+ {
++#if RZ_VERSION_NUMBER < 9000
++    return fromOwnedCharPtr(rz_version_str(program));
++#else
+     return fromOwnedCharPtr(rz_version_str(rzCore->sys_path, program));
++#endif
+ }
+ 
+ QString CutterCore::getVersionInformation()
+--- cutter-2.5.0/src/common/ColorThemeWorker.cpp.orig	2026-08-15 17:25:06.395426988 -0300
++++ cutter-2.5.0/src/common/ColorThemeWorker.cpp	2026-08-15 17:24:45.532510873 -0300
+@@ -57,7 +57,12 @@
+     }
+ 
+     RzCoreLocked core = Core()->lock();
++#if RZ_VERSION_NUMBER < 9000
++    (void)core;
++    const char *themeDir = rz_path_system(RZ_THEMES);
++#else
+     const char *themeDir = rz_path_system(core->sys_path, RZ_THEMES);
++#endif
+     const QDir currDir { themeDir };
+     if (currDir.exists()) {
+         standardRzThemesLocationPath = currDir.absolutePath();

diff --git a/sources b/sources
index 09fc501..65793f4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (Cutter-v2.3.4-src.tar.gz) = c35a7091aaf2c99a4595b48029017353092b178ed6a57cbe2f0d9758f1330d2521e3fc339558ffc0dfa500ace0510daded8591f7a04b0efa0209ba4f8a5e7d33
+SHA512 (cutter-2.5.0.tar.gz) = 737774a19a3fff2bcc0cd34698cb0539be147823f8489e1ed9c6e2a9d74325763d2e572319096de8aeaea779488406c94121bfe7b333024680e8eaa48f14de20

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

only message in thread, other threads:[~2026-08-16 23:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-16 23:16 [rpms/cutter-re] rawhide: Update to 2.5.0 Filipe Rosset

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