summaryrefslogtreecommitdiff
path: root/app-misc/rbutil
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
commit2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch)
tree8c816148bcbd22757d892089c989ae614eae4f5a /app-misc/rbutil
parent0f558761aa2dee1017b4751e4017205e015a9560 (diff)
gentoo resync : 09.07.2022
Diffstat (limited to 'app-misc/rbutil')
-rw-r--r--app-misc/rbutil/Manifest10
-rw-r--r--app-misc/rbutil/files/0001-imxtools-sbtools-fix-compilation-with-gcc-10.patch27
-rw-r--r--app-misc/rbutil/files/rbutil-1.4.1-fix-versionstring.patch11
-rw-r--r--app-misc/rbutil/files/rbutil-1.4.1-quazip1.patch84
-rw-r--r--app-misc/rbutil/files/rbutil-1.5.1-cmake.patch32
-rw-r--r--app-misc/rbutil/files/rbutil-1.5.1-headers.patch17
-rw-r--r--app-misc/rbutil/files/rbutil-1.5.1-system-quazip.patch150
-rw-r--r--app-misc/rbutil/rbutil-1.4.1-r2.ebuild80
-rw-r--r--app-misc/rbutil/rbutil-1.5.1.ebuild66
9 files changed, 270 insertions, 207 deletions
diff --git a/app-misc/rbutil/Manifest b/app-misc/rbutil/Manifest
index 68dd35adf61d..5cb5c6f6946e 100644
--- a/app-misc/rbutil/Manifest
+++ b/app-misc/rbutil/Manifest
@@ -1,6 +1,6 @@
-AUX 0001-imxtools-sbtools-fix-compilation-with-gcc-10.patch 765 BLAKE2B f71598d503d5c9981b2955aa1eadf374d7bf00cc1af7b6733aee8009ff7bb20455a6539a7614ec742b4067e6a9337f1dfe713bfc19fb8344af6a43422867a148 SHA512 e9661c5365d2c71fe9f016d936b3d4c844c91cbc9649f877eee385ad894ff03bd3a8e90ecc504aaf1f21c7d339348f22b59a45859fe9b1527113ad7eb39dfd9e
-AUX rbutil-1.4.1-fix-versionstring.patch 402 BLAKE2B afe3c79869c926ff04d7630104c0b177974beb9103d729e5deb2e91f183e7ec859811beaf1141084ed9371f9541ec6b3a6e59fbad4dfab5069ab3ab19bc39d87 SHA512 9a627aa68fdd639a33dfcbbe81f86e1a757fc040cef223eb3c0ea1feed2574140cb6c6645c9fe200adc9c8dcf4026e32d792572d3011ad8c1bbf37b9c445033d
-AUX rbutil-1.4.1-quazip1.patch 2376 BLAKE2B 5bf56d8ca9d91e321f3a61b80e64b80a3e227e7cfc46c96d1a6b5b2dbf94f63a3c545f1394df76dcf2562cfdb45d4e19dfdf17896553146c214fbb80a2eb4c0d SHA512 b2b58a21e13af102bddf1be14e506310f9c1f8e03cbf8793440492080ee7868b8e9d664177c6309dd3dd99da1c3898f4edad8fadb484d69590cc6d0bb689742a
-DIST RockboxUtility-v1.4.1-src.tar.bz2 1427019 BLAKE2B b4d5e7e74c46c32138c564ebe5b81233ac47ddabe51241e7c6cfef9d5ca25f85b53166a840e5aadec0e021ad206e5d987c71d617c56aee425ece0321aea5edb2 SHA512 24e4ac7b99618d40044bd8248e6755b40e77e333902ddd898e57b33c50705e97fdc5a751be49f8e5ded445b4f712bdd5310b266ff82680ea76488d8bfc8e17c2
-EBUILD rbutil-1.4.1-r2.ebuild 1676 BLAKE2B b7c7a662ce282f9cc8f96a93f3a86e318f035889eb6e15c7c33533a8a0b3b084b2becaaa08ed4353392d653a4296aab1428102e3d6c4f455ebd3e844b716f462 SHA512 071dd21234e5880be514247aea42a35d20d7533cf4ccf379ed0f327c775583b8704734db25f5bacf493b205fcd5b6ea5df92f446ca31648779a2ba1d6004d567
+AUX rbutil-1.5.1-cmake.patch 1518 BLAKE2B 1755a6cf567775afc5eb1a9b9c12ac29a01ed26d2d921d47080ee2542a8ba2621bfe2704d89cd417cb34cd50f0d6d4374d266dd71fe87b15d8ee21510ba79fec SHA512 6e083d19795a9d6020bf910510b53796c68dd30939949fff4f0b48e3d988d16139784d36dead756ee88d318be09ebc1508f788e4283482fb973b3c1c40ea54d8
+AUX rbutil-1.5.1-headers.patch 475 BLAKE2B 3bb6bfdaaa16f8401b9efce799a2a726b8c903a20b97191e41ed01b7970f7629b997fa6e044ff9472e64947cad207dcdb0c71ca1489e391648a8f30c06eaea6f SHA512 ebf25d30cb067d831024973913f8aa48de6b282db667939a4bdada4a44f7d74ccf58f764a2aa079dc3f7875631638070b75d7fae65d670836460efc1f0dc64f8
+AUX rbutil-1.5.1-system-quazip.patch 5656 BLAKE2B c36a76ebe073055ea4c7e840f532a3a356b824d1aba5f4082f88176a5ffa5a01c1a4b199346baa1a2ac910698fc0fb7cdb222fc7c6ee7f9f83f5e945301b64d9 SHA512 3ee97efa7453ad7fc77a39dcae9225f1a17b176b62cde1033a3426d5f8786447d260a284f43b6fcf8bd7c8a5049f845a4241daa057ee81ad342d1994c83529d7
+DIST RockboxUtility-v1.5.1-src.tar.bz2 1495776 BLAKE2B 0a5009cfbe610a46a98d72d184cb49852ba6ffbee7a826bc4d69a7dd06f982695c6964586c48cf58b2f12ee5f650ec2ee0c650336ea987b2c8d62b459f2333cb SHA512 623cdc7bba3028264448f072be1e9a754afe544cda1193bec051dd390acadea213cda8f00e25bc3a0254a282f8f6b2ba34e67c2ac0d086c0a74d52df1fd733fb
+EBUILD rbutil-1.5.1.ebuild 1377 BLAKE2B 7db81a14b5f15f795d7d1ee2c0b1814e3ccffd60bf34583cf31fc813c92c548bc8428af558d4afc324a6468a84b5e3f79324bb6409ba7e94bbb1d973138a4fa9 SHA512 13182bb33ffe2b47a4c0273eb18ab98c2953f5f54d87a8de8716effe2dffc018768a9a576372f7b112b81c0939303609333b762addb0eea03f1f534417d2cac6
MISC metadata.xml 248 BLAKE2B 97ed0d2320e1aa2d1cca6b63b0cf9cb07669ea73ac0dad7a8f7db4f510d3b2dc28cbf5a7c019f15ac87c25c5e51e619386694b49d21fc19f4092047c8e382287 SHA512 23bb29604f7cc644073025158d751004189a85fe6be88a7817afebad685c3b73f21cdb3e5d05f16699baa5d6b52f1e3a1f365b1ad7ea09bfcd204182e646f203
diff --git a/app-misc/rbutil/files/0001-imxtools-sbtools-fix-compilation-with-gcc-10.patch b/app-misc/rbutil/files/0001-imxtools-sbtools-fix-compilation-with-gcc-10.patch
deleted file mode 100644
index 3ff18f2afcf1..000000000000
--- a/app-misc/rbutil/files/0001-imxtools-sbtools-fix-compilation-with-gcc-10.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 141c9c218c31dfd6f4f9e47f25cc2764d2bb4b63 Mon Sep 17 00:00:00 2001
-From: Martin Hauke <mardnh@gmx.de>
-Date: Sat, 13 Jun 2020 19:11:15 +0200
-Subject: [PATCH] imxtools/sbtools: fix compilation with gcc 10
-
----
- utils/imxtools/sbtools/misc.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/utils/imxtools/sbtools/misc.h b/utils/imxtools/sbtools/misc.h
-index f803fbb..5c6b2fc 100644
---- a/utils/imxtools/sbtools/misc.h
-+++ b/utils/imxtools/sbtools/misc.h
-@@ -40,8 +40,8 @@ extern bool g_debug;
- extern bool g_force;
-
- typedef struct crypto_key_t *key_array_t;
--int g_nr_keys;
--key_array_t g_key_array;
-+extern int g_nr_keys;
-+extern key_array_t g_key_array;
-
- typedef void (*misc_printf_t)(void *user, const char *fmt, ...);
-
---
-2.26.2
-
diff --git a/app-misc/rbutil/files/rbutil-1.4.1-fix-versionstring.patch b/app-misc/rbutil/files/rbutil-1.4.1-fix-versionstring.patch
deleted file mode 100644
index f8a1fade7f0e..000000000000
--- a/app-misc/rbutil/files/rbutil-1.4.1-fix-versionstring.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/rbutil/rbutilqt/version.h b/rbutil/rbutilqt/version.h
-index f0877ba..044c7c7 100644
---- a/rbutil/rbutilqt/version.h
-+++ b/rbutil/rbutilqt/version.h
-@@ -40,5 +40,5 @@
- // PUREVERSION should identify the build uniquely. Use version string for now.
- #define PUREVERSION "v1.4.1"
-
--#define FULLVERSION VERSION " (" PUREVERSION "), built " __DATE__ " " __TIME__
-+#define FULLVERSION VERSION
-
diff --git a/app-misc/rbutil/files/rbutil-1.4.1-quazip1.patch b/app-misc/rbutil/files/rbutil-1.4.1-quazip1.patch
deleted file mode 100644
index aa28cc9ea271..000000000000
--- a/app-misc/rbutil/files/rbutil-1.4.1-quazip1.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From f9e3ba5d8be99dc78eeb7b21d16afe2955e0a9f8 Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <asturm@gentoo.org>
-Date: Sat, 20 Feb 2021 18:11:09 +0100
-Subject: [PATCH] Use upstream quazip1-qt5 pkgconfig
-
-Based on patch by James Le Cuirot <chewi@gentoo.org>
-http://gerrit.rockbox.org/1825
-
-Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
----
- rbutil/rbutilqt/base/ziputil.cpp | 6 +++---
- rbutil/rbutilqt/base/ziputil.h | 6 +++---
- rbutil/rbutilqt/rbutilqt.pro | 9 +++------
- 3 files changed, 9 insertions(+), 12 deletions(-)
-
-diff --git a/rbutil/rbutilqt/base/ziputil.cpp b/rbutil/rbutilqt/base/ziputil.cpp
-index b6cfddd..9fa6632 100644
---- a/rbutil/rbutilqt/base/ziputil.cpp
-+++ b/rbutil/rbutilqt/base/ziputil.cpp
-@@ -22,9 +22,9 @@
- #include "progressloggerinterface.h"
- #include "Logger.h"
-
--#include "quazip/quazip.h"
--#include "quazip/quazipfile.h"
--#include "quazip/quazipfileinfo.h"
-+#include "quazip.h"
-+#include "quazipfile.h"
-+#include "quazipfileinfo.h"
-
-
- ZipUtil::ZipUtil(QObject* parent) : ArchiveUtil(parent)
-diff --git a/rbutil/rbutilqt/base/ziputil.h b/rbutil/rbutilqt/base/ziputil.h
-index 25c3dce..7a6e08a 100644
---- a/rbutil/rbutilqt/base/ziputil.h
-+++ b/rbutil/rbutilqt/base/ziputil.h
-@@ -21,9 +21,9 @@
-
- #include <QtCore>
- #include "archiveutil.h"
--#include "quazip/quazip.h"
--#include "quazip/quazipfile.h"
--#include "quazip/quazipfileinfo.h"
-+#include "quazip.h"
-+#include "quazipfile.h"
-+#include "quazipfileinfo.h"
-
- class ZipUtil : public ArchiveUtil
- {
-diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro
-index d5caa77..40a62ff 100644
---- a/rbutil/rbutilqt/rbutilqt.pro
-+++ b/rbutil/rbutilqt/rbutilqt.pro
-@@ -140,11 +140,6 @@ for(rblib, RBLIBS) {
- # We need libcrypto++
- LIBS += -lcryptopp
-
--# on win32 libz is linked implicitly.
--!win32 {
-- LIBS += -lz
--}
--
- # Add a (possibly found) libspeex now, don't do this before -lrbspeex!
- !static:!isEmpty(LIBSPEEX) {
- LIBS += $$LIBSPEEX
-@@ -205,6 +200,9 @@ unix:!static:libusb0:!macx {
- LIBS += -lusb
- }
-
-+CONFIG += link_pkgconfig
-+PKGCONFIG += quazip1-qt5
-+
- unix:!macx:static {
- # force statically linking of libusb. Libraries that are appended
- # later will get linked dynamically again.
-@@ -271,5 +269,4 @@ unix {
-
- # source files are separate.
- include(rbutilqt.pri)
--include(quazip/quazip.pri)
- include(logger/logger.pri)
---
-2.30.1
-
diff --git a/app-misc/rbutil/files/rbutil-1.5.1-cmake.patch b/app-misc/rbutil/files/rbutil-1.5.1-cmake.patch
new file mode 100644
index 000000000000..276dba7e61d9
--- /dev/null
+++ b/app-misc/rbutil/files/rbutil-1.5.1-cmake.patch
@@ -0,0 +1,32 @@
+diff -Naur a/utils/CMakeLists.txt b/utils/CMakeLists.txt
+--- a/utils/CMakeLists.txt 2022-04-18 20:05:44.073208000 +0100
++++ b/utils/CMakeLists.txt 2022-07-07 16:19:17.378055916 +0100
+@@ -358,22 +358,6 @@
+ )
+ target_include_directories(rbtomcrypt PUBLIC ${CMAKE_CURRENT_LIST_DIR}/tomcrypt/src/headers)
+
+-add_library(skin_parser
+- ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_buffer.c
+- ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_buffer.h
+- ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_debug.c
+- ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_debug.h
+- ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_parser.c
+- ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_parser.h
+- ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_scan.c
+- ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_scan.h
+- ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/symbols.h
+- ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/tag_table.c
+- ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/tag_table.h
+- )
+-target_include_directories(skin_parser PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser)
+-target_compile_definitions(skin_parser PUBLIC __PCTOOL__)
+-
+ # target will always be build. File is only updated when contents change.
+ add_custom_target(gitversion.h
+ COMMENT "Updating gitversion.h"
+@@ -391,5 +375,3 @@
+ include(${CMAKE_CURRENT_LIST_DIR}/cmake/deploy.cmake)
+ include(${CMAKE_CURRENT_LIST_DIR}/cmake/QtTest.cmake)
+ add_subdirectory(rbutilqt)
+-add_subdirectory(themeeditor)
+-
diff --git a/app-misc/rbutil/files/rbutil-1.5.1-headers.patch b/app-misc/rbutil/files/rbutil-1.5.1-headers.patch
new file mode 100644
index 000000000000..ff7ac8760ff7
--- /dev/null
+++ b/app-misc/rbutil/files/rbutil-1.5.1-headers.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/830559
+https://www.rockbox.org/tracker/task/13358
+
+Note: This may need tweaking for non-Linux platforms.
+
+diff --git a/utils/sansapatcher/sansaio.h b/utils/sansapatcher/sansaio.h
+index 61e2f1d1b2..327f8fbd18 100644
+--- a/utils/sansapatcher/sansaio.h
++++ b/utils/sansapatcher/sansaio.h
+@@ -23,6 +23,7 @@
+ #define __SANSAIO_H
+
+ #include <stdint.h>
++#include <sys/types.h>
+ #if !defined(_MSC_VER)
+ #include <unistd.h> /* not available on MSVC */
+ #endif
diff --git a/app-misc/rbutil/files/rbutil-1.5.1-system-quazip.patch b/app-misc/rbutil/files/rbutil-1.5.1-system-quazip.patch
new file mode 100644
index 000000000000..84b9655c0c0e
--- /dev/null
+++ b/app-misc/rbutil/files/rbutil-1.5.1-system-quazip.patch
@@ -0,0 +1,150 @@
+From 930293a899825ae552370a060dd04117ebc5fdae Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Thu, 7 Jul 2022 21:52:54 +0100
+Subject: [PATCH] rbutil: Add USE_SYSTEM_QUAZIP option to use system-wide
+ QuaZIP
+
+QuaZIP is included in several major Linux distributions and packaging
+policies strongly oppose bundling of libraries.
+
+Change-Id: I8d454784dc4b244f4dd8aa18deb3350a29aaab77
+---
+ docs/CREDITS | 1 +
+ utils/rbutilqt/CMakeLists.txt | 65 ++++++++++++++++++---------------
+ utils/rbutilqt/base/ziputil.cpp | 6 +--
+ utils/rbutilqt/base/ziputil.h | 6 +--
+ 4 files changed, 43 insertions(+), 35 deletions(-)
+
+diff --git a/docs/CREDITS b/docs/CREDITS
+index 6f7c23fc7e..3a6fcb83b9 100644
+--- a/docs/CREDITS
++++ b/docs/CREDITS
+@@ -710,6 +710,7 @@ Marc Aarts
+ Fabrice Bellard
+ Selami Dinçer
+ Matej Golian
++James Le Cuirot
+
+ The libmad team
+ The wavpack team
+diff --git a/utils/rbutilqt/CMakeLists.txt b/utils/rbutilqt/CMakeLists.txt
+index 41954cb9ee..350790109b 100644
+--- a/utils/rbutilqt/CMakeLists.txt
++++ b/utils/rbutilqt/CMakeLists.txt
+@@ -255,9 +255,43 @@ if(APPLE)
+ ${CMAKE_CURRENT_LIST_DIR}/base/ttscarbon.h)
+ endif()
+
++option(USE_SYSTEM_QUAZIP "Use system QuaZIP library" OFF)
++if(USE_SYSTEM_QUAZIP)
++ find_package(QuaZip-Qt5 REQUIRED)
++ set(QUAZIP_LIBRARY QuaZip::QuaZip)
++else()
++ # TODO: Upstream has cmake support, use that instead.
++ add_library(quazip
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/ioapi.h
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/minizip_crypt.h
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/qioapi.cpp
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/quazip.cpp
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfile.cpp
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfile.h
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfileinfo.cpp
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfileinfo.h
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/quazip_global.h
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/quazip.h
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipnewinfo.cpp
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipnewinfo.h
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/unzip.c
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/unzip.h
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/zip.c
++ ${CMAKE_CURRENT_LIST_DIR}/quazip/zip.h
++ )
++ target_include_directories(quazip PUBLIC ${CMAKE_CURRENT_LIST_DIR}/quazip)
++ target_link_libraries(quazip z Qt${QT_VERSION_MAJOR}::Core)
++ if(QT_VERSION_MAJOR EQUAL 6)
++ target_link_libraries(quazip Qt${QT_VERSION_MAJOR}::Core5Compat)
++ endif()
++ target_compile_definitions(quazip PUBLIC QUAZIP_STATIC)
++ set_property(TARGET quazip PROPERTY AUTOMOC ON)
++ set(QUAZIP_LIBRARY quazip)
++endif()
++
+ target_link_libraries(rbbase
+- cutelogger quazip mspack bspatch rbspeex voicefont
+- sansapatcher ipodpatcher chinachippatcher
++ cutelogger ${QUAZIP_LIBRARY} mspack bspatch rbspeex
++ voicefont sansapatcher ipodpatcher chinachippatcher
+ mkamsboot mkimxboot mkmpioboot mktccboot mks5lboot
+ Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
+ target_include_directories(rbbase PUBLIC ${CMAKE_CURRENT_LIST_DIR}/base)
+@@ -298,33 +332,6 @@ target_link_libraries(cutelogger PUBLIC Qt${QT_VERSION_MAJOR}::Core)
+ target_compile_definitions(cutelogger PUBLIC CUTELOGGER_STATIC)
+ set_property(TARGET cutelogger PROPERTY AUTOMOC ON)
+
+-# TODO: Upstream has cmake support, use that instead.
+-add_library(quazip
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/ioapi.h
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/minizip_crypt.h
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/qioapi.cpp
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/quazip.cpp
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfile.cpp
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfile.h
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfileinfo.cpp
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipfileinfo.h
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/quazip_global.h
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/quazip.h
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipnewinfo.cpp
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/quazipnewinfo.h
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/unzip.c
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/unzip.h
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/zip.c
+- ${CMAKE_CURRENT_LIST_DIR}/quazip/zip.h
+- )
+-target_include_directories(quazip PUBLIC ${CMAKE_CURRENT_LIST_DIR}/quazip)
+-target_link_libraries(quazip z Qt${QT_VERSION_MAJOR}::Core)
+-if(QT_VERSION_MAJOR EQUAL 6)
+- target_link_libraries(quazip Qt${QT_VERSION_MAJOR}::Core5Compat)
+-endif()
+-target_compile_definitions(quazip PUBLIC QUAZIP_STATIC)
+-set_property(TARGET quazip PROPERTY AUTOMOC ON)
+-
+ add_library(mspack
+ #mspack/cabc.c
+ mspack/cabd.c
+diff --git a/utils/rbutilqt/base/ziputil.cpp b/utils/rbutilqt/base/ziputil.cpp
+index e285446711..877a861253 100644
+--- a/utils/rbutilqt/base/ziputil.cpp
++++ b/utils/rbutilqt/base/ziputil.cpp
+@@ -22,9 +22,9 @@
+ #include "progressloglevels.h"
+ #include "Logger.h"
+
+-#include "quazip/quazip.h"
+-#include "quazip/quazipfile.h"
+-#include "quazip/quazipfileinfo.h"
++#include <quazip.h>
++#include <quazipfile.h>
++#include <quazipfileinfo.h>
+
+
+ ZipUtil::ZipUtil(QObject* parent) : ArchiveUtil(parent)
+diff --git a/utils/rbutilqt/base/ziputil.h b/utils/rbutilqt/base/ziputil.h
+index 73a87a820a..ea32ca42c3 100644
+--- a/utils/rbutilqt/base/ziputil.h
++++ b/utils/rbutilqt/base/ziputil.h
+@@ -21,9 +21,9 @@
+
+ #include <QtCore>
+ #include "archiveutil.h"
+-#include "quazip/quazip.h"
+-#include "quazip/quazipfile.h"
+-#include "quazip/quazipfileinfo.h"
++#include <quazip.h>
++#include <quazipfile.h>
++#include <quazipfileinfo.h>
+
+ class ZipUtil : public ArchiveUtil
+ {
+--
+2.35.1
+
diff --git a/app-misc/rbutil/rbutil-1.4.1-r2.ebuild b/app-misc/rbutil/rbutil-1.4.1-r2.ebuild
deleted file mode 100644
index ebfb53deeda9..000000000000
--- a/app-misc/rbutil/rbutil-1.4.1-r2.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit desktop qmake-utils xdg
-
-DESCRIPTION="Rockbox open source firmware manager for music players"
-HOMEPAGE="https://www.rockbox.org/wiki/RockboxUtility"
-SRC_URI="https://download.rockbox.org/${PN}/source/RockboxUtility-v${PV}-src.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug"
-
-RDEPEND="
- dev-libs/crypto++:=
- dev-libs/quazip:0=
- dev-qt/qtcore:5
- dev-qt/qtgui:5
- dev-qt/qtnetwork:5
- dev-qt/qtwidgets:5
- media-libs/speex
- media-libs/speexdsp
- virtual/libusb:1
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- dev-qt/linguist-tools:5
- virtual/pkgconfig
-"
-
-S="${WORKDIR}/RockboxUtility-v${PV}"
-QTDIR="${PN}/${PN}qt"
-
-PATCHES=(
- "${FILESDIR}"/${P}-quazip1.patch
- "${FILESDIR}"/0001-imxtools-sbtools-fix-compilation-with-gcc-10.patch
- "${FILESDIR}"/${P}-fix-versionstring.patch # bug 734178
-)
-
-src_prepare() {
- xdg_src_prepare
-
- if has_version "<dev-libs/quazip-1.0"; then
- sed -e "/^PKGCONFIG/s/quazip1-qt5/quazip/" -i ${QTDIR}/${PN}qt.pro || die
- fi
-
- rm -rv "${QTDIR}"/{quazip,zlib}/ || die
-}
-
-src_configure() {
- cd "${QTDIR}" || die
-
- # Generate binary translations.
- "$(qt5_get_bindir)"/lrelease ${PN}qt.pro || die
-
- # noccache is required to call the correct compiler.
- eqmake5 CONFIG+="noccache $(use debug && echo dbg)"
-}
-
-src_compile() {
- emake -C "${QTDIR}"
-}
-
-src_install() {
- cd "${QTDIR}" || die
-
- local icon size
- for icon in icons/rockbox-*.png; do
- size=${icon##*-}
- size=${size%%.*}
- newicon -s "${size}" "${icon}" rockbox.png
- done
-
- dobin RockboxUtility
- make_desktop_entry RockboxUtility "Rockbox Utility" rockbox
- dodoc changelog.txt
-}
diff --git a/app-misc/rbutil/rbutil-1.5.1.ebuild b/app-misc/rbutil/rbutil-1.5.1.ebuild
new file mode 100644
index 000000000000..c4d3f49101d8
--- /dev/null
+++ b/app-misc/rbutil/rbutil-1.5.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake desktop xdg
+
+DESCRIPTION="Rockbox open source firmware manager for music players"
+HOMEPAGE="https://www.rockbox.org/wiki/RockboxUtility"
+SRC_URI="https://download.rockbox.org/${PN}/source/RockboxUtility-v${PV}-src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ app-arch/bzip2:=
+ >=dev-libs/quazip-1.2:=
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ media-libs/speex
+ media-libs/speexdsp
+ virtual/libusb:1
+"
+DEPEND="
+ ${RDEPEND}
+ dev-qt/qttest:5
+"
+BDEPEND="
+ dev-qt/linguist-tools:5
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/RockboxUtility-v${PV}-src"
+CMAKE_USE_DIR="${S}/utils"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-system-quazip.patch
+ "${FILESDIR}"/${P}-cmake.patch
+ "${FILESDIR}"/${P}-headers.patch
+)
+
+src_prepare() {
+ cmake_src_prepare
+ rm -rv utils/rbutilqt/{quazip,zlib}/ || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=OFF
+ -DCCACHE_PROGRAM=FALSE
+ -DUSE_SYSTEM_QUAZIP=ON
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ dobin "${BUILD_DIR}"/{ipodpatcher,sansapatcher,rbutilqt/RockboxUtility}
+ newicon -s scalable docs/logo/rockbox-clef.svg rockbox.svg
+ make_desktop_entry RockboxUtility "Rockbox Utility" rockbox
+ dodoc utils/rbutilqt/changelog.txt
+}