diff options
author | Kyle Guinn <elyk03@gmail.com> | 2022-07-29 01:13:27 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-07-30 11:26:27 +0700 |
commit | dfbfbec3ef27c7d11fc311746cd340382327eb75 (patch) | |
tree | b5c26e20fc46ee275fef1dac61e00ed7610f1ab9 /misc | |
parent | 20cda8998738fc09cef01b739174a30a9f7eadd2 (diff) |
misc/rbutil: Updated for version 1.5.1
Signed-off-by: Kyle Guinn <elyk03@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/rbutil/doinst.sh | 4 | ||||
-rw-r--r-- | misc/rbutil/patches/bundled-licenses.patch | 38 | ||||
-rw-r--r-- | misc/rbutil/patches/rbutil-1.4.1-quazip.patch | 63 | ||||
-rw-r--r-- | misc/rbutil/patches/rbutil-1.5.1-cmake.patch | 32 | ||||
-rw-r--r-- | misc/rbutil/patches/rbutil-1.5.1-headers.patch | 17 | ||||
-rw-r--r-- | misc/rbutil/patches/rbutil-1.5.1-system-quazip.patch | 150 | ||||
-rw-r--r-- | misc/rbutil/patches/system-bzip2.patch | 12 | ||||
-rw-r--r-- | misc/rbutil/patches/system-mspack.patch | 118 | ||||
-rw-r--r-- | misc/rbutil/patches/system-tomcrypt.patch | 83 | ||||
-rw-r--r-- | misc/rbutil/rbutil.SlackBuild | 91 | ||||
-rw-r--r-- | misc/rbutil/rbutil.info | 8 |
11 files changed, 507 insertions, 109 deletions
diff --git a/misc/rbutil/doinst.sh b/misc/rbutil/doinst.sh index 19400050fd705..4a25de5e6fbd1 100644 --- a/misc/rbutil/doinst.sh +++ b/misc/rbutil/doinst.sh @@ -1,3 +1,7 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then if [ -x /usr/bin/gtk-update-icon-cache ]; then /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 diff --git a/misc/rbutil/patches/bundled-licenses.patch b/misc/rbutil/patches/bundled-licenses.patch new file mode 100644 index 0000000000000..1bb1b970aea6b --- /dev/null +++ b/misc/rbutil/patches/bundled-licenses.patch @@ -0,0 +1,38 @@ +diff --git a/utils/rbutilqt/rbutilqt.cpp b/utils/rbutilqt/rbutilqt.cpp +--- a/utils/rbutilqt/rbutilqt.cpp ++++ b/utils/rbutilqt/rbutilqt.cpp +@@ -303,21 +303,13 @@ + + QString html = "<p>" + tr("Libraries used") + "</p>"; + html += "<ul>"; +- html += "<li>Speex: <a href='#speex'>Speex License</a></li>"; + html += "<li>bspatch: <a href='#bspatch'>bspatch License</a></li>"; +- html += "<li>bzip2: <a href='#bzip2'>bzip2 License</a></li>"; +- html += "<li>mspack: <a href='#lgpl2'>LGPL v2.1 License</a></li>"; +- html += "<li>quazip: <a href='#lgpl2'>LGPL v2.1 License</a></li>"; +- html += "<li>tomcrypt: <a href='#tomcrypt'>Tomcrypt License</a></li>"; + html += "<li>CuteLogger: <a href='#lgpl2'>LGPL v2.1 License</a></li>"; + html += "</ul>"; + about.browserLicenses->insertHtml(html); + + QMap<QString, QString> licenses; +- licenses[":/docs/COPYING.SPEEX"] = "<a id='speex'>Speex License</a>"; + licenses[":/docs/lgpl-2.1.txt"] = "<a id='lgpl2'>LGPL v2.1</a>"; +- licenses[":/docs/LICENSE.TOMCRYPT"] = "<a id='tomcrypt'>Tomcrypt License</a>"; +- licenses[":/docs/LICENSE.BZIP2"] = "<a id='bzip2'>bzip2 License</a>"; + licenses[":/docs/LICENSE.BSPATCH"] = "<a id='bspatch'>bspatch License</a>"; + + for (auto it = licenses.keyBegin(); it != licenses.keyEnd(); ++it) { +diff --git a/utils/rbutilqt/rbutilqt.qrc b/utils/rbutilqt/rbutilqt.qrc +--- a/utils/rbutilqt/rbutilqt.qrc ++++ b/utils/rbutilqt/rbutilqt.qrc +@@ -3,9 +3,6 @@ + <file alias="docs/CREDITS">../../docs/CREDITS</file> + <file alias="docs/gpl-2.0.html">../../docs/gpl-2.0.html</file> + <file alias="docs/lgpl-2.1.txt">logger/LICENSE.LGPL</file> +- <file alias="docs/COPYING.SPEEX">../../lib/rbcodec/codecs/libspeex/COPYING</file> +- <file alias="docs/LICENSE.TOMCRYPT">../../utils/tomcrypt/LICENSE</file> +- <file alias="docs/LICENSE.BZIP2">../bzip2/LICENSE</file> + <file alias="docs/LICENSE.BSPATCH">../bspatch/LICENSE</file> + <file alias="docs/changelog.txt">changelog.txt</file> + </qresource> diff --git a/misc/rbutil/patches/rbutil-1.4.1-quazip.patch b/misc/rbutil/patches/rbutil-1.4.1-quazip.patch deleted file mode 100644 index 596127c340609..0000000000000 --- a/misc/rbutil/patches/rbutil-1.4.1-quazip.patch +++ /dev/null @@ -1,63 +0,0 @@ -This patch is a simplified version of a patch I have sent upstream. -http://gerrit.rockbox.org/1825 - --- Chewi - -diff -Naur a/base/ziputil.cpp b/base/ziputil.cpp ---- a/base/ziputil.cpp 2019-11-10 06:45:49.000000000 +0000 -+++ b/base/ziputil.cpp 2019-12-04 22:38:34.443112450 +0000 -@@ -22,9 +22,9 @@ - #include "progressloggerinterface.h" - #include "Logger.h" - --#include "quazip/quazip.h" --#include "quazip/quazipfile.h" --#include "quazip/quazipfileinfo.h" -+#include <quazip5/quazip.h> -+#include <quazip5/quazipfile.h> -+#include <quazip5/quazipfileinfo.h> - - - ZipUtil::ZipUtil(QObject* parent) : ArchiveUtil(parent) -diff -Naur a/base/ziputil.h b/base/ziputil.h ---- a/base/ziputil.h 2019-11-10 06:45:49.000000000 +0000 -+++ b/base/ziputil.h 2019-12-04 22:38:34.443112450 +0000 -@@ -21,9 +21,9 @@ - - #include <QtCore> - #include "archiveutil.h" --#include "quazip/quazip.h" --#include "quazip/quazipfile.h" --#include "quazip/quazipfileinfo.h" -+#include <quazip5/quazip.h> -+#include <quazip5/quazipfile.h> -+#include <quazip5/quazipfileinfo.h> - - class ZipUtil : public ArchiveUtil - { -diff -Naur a/rbutilqt.pro b/rbutilqt.pro ---- a/rbutilqt.pro 2019-11-10 06:45:50.000000000 +0000 -+++ b/rbutilqt.pro 2019-12-04 22:43:30.144259710 +0000 -@@ -131,7 +131,7 @@ - - DEPENDPATH = $$INCLUDEPATH - --LIBS += -L$$OUT_PWD -L$$MYLIBBUILDDIR -+LIBS += -L$$OUT_PWD -L$$MYLIBBUILDDIR -lquazip5 - # append all RBLIBS to LIBS - for(rblib, RBLIBS) { - LIBS += -l$$rblib -@@ -142,7 +142,6 @@ - - # on win32 libz is linked implicitly. - !win32 { -- LIBS += -lz - } - - # Add a (possibly found) libspeex now, don't do this before -lrbspeex! -@@ -271,5 +270,4 @@ - - # source files are separate. - include(rbutilqt.pri) --include(quazip/quazip.pri) - include(logger/logger.pri) diff --git a/misc/rbutil/patches/rbutil-1.5.1-cmake.patch b/misc/rbutil/patches/rbutil-1.5.1-cmake.patch new file mode 100644 index 0000000000000..276dba7e61d93 --- /dev/null +++ b/misc/rbutil/patches/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/misc/rbutil/patches/rbutil-1.5.1-headers.patch b/misc/rbutil/patches/rbutil-1.5.1-headers.patch new file mode 100644 index 0000000000000..ff7ac8760ff78 --- /dev/null +++ b/misc/rbutil/patches/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/misc/rbutil/patches/rbutil-1.5.1-system-quazip.patch b/misc/rbutil/patches/rbutil-1.5.1-system-quazip.patch new file mode 100644 index 0000000000000..84b9655c0c0e4 --- /dev/null +++ b/misc/rbutil/patches/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/misc/rbutil/patches/system-bzip2.patch b/misc/rbutil/patches/system-bzip2.patch new file mode 100644 index 0000000000000..98189d2566882 --- /dev/null +++ b/misc/rbutil/patches/system-bzip2.patch @@ -0,0 +1,12 @@ +diff --git a/utils/bspatch/bspatch.c b/utils/bspatch/bspatch.c +--- a/utils/bspatch/bspatch.c ++++ b/utils/bspatch/bspatch.c +@@ -30,7 +30,7 @@ + #include <stdarg.h> + #include <sys/types.h> + #endif +-#include "../bzip2/bzlib.h" ++#include <bzlib.h> + #include <stdlib.h> + #include <stdio.h> + #include <string.h> diff --git a/misc/rbutil/patches/system-mspack.patch b/misc/rbutil/patches/system-mspack.patch new file mode 100644 index 0000000000000..cd7e3d0045076 --- /dev/null +++ b/misc/rbutil/patches/system-mspack.patch @@ -0,0 +1,118 @@ +diff --git a/utils/rbutilqt/CMakeLists.txt b/utils/rbutilqt/CMakeLists.txt +--- a/utils/rbutilqt/CMakeLists.txt ++++ b/utils/rbutilqt/CMakeLists.txt +@@ -289,8 +289,53 @@ + set(QUAZIP_LIBRARY quazip) + endif() + ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(MSPACK libmspack) ++if(NOT ${MSPACK_FOUND}) ++ add_library(mspack ++ #mspack/cabc.c ++ mspack/cabd.c ++ mspack/cab.h ++ #mspack/chmc.c ++ #mspack/chmd.c ++ #mspack/chm.h ++ mspack/des.h ++ #mspack/hlpc.c ++ #mspack/hlpd.c ++ #mspack/hlp.h ++ #mspack/kwajc.c ++ #mspack/kwajd.c ++ #mspack/kwaj.h ++ #mspack/litc.c ++ #mspack/litd.c ++ #mspack/lit.h ++ #mspack/lzssd.c ++ #mspack/lzss.h ++ mspack/lzxc.c ++ mspack/lzxd.c ++ mspack/lzx.h ++ mspack/mspack.h ++ mspack/mszipc.c ++ mspack/mszipd.c ++ mspack/mszip.h ++ mspack/qtmd.c ++ mspack/qtm.h ++ mspack/readbits.h ++ mspack/readhuff.h ++ mspack/sha.h ++ mspack/system-mspack.c ++ mspack/system-mspack.h ++ #mspack/szddc.c ++ #mspack/szddd.c ++ #mspack/szdd.h ++ ) ++ ++ target_include_directories(mspack PUBLIC ${CMAKE_CURRENT_LIST_DIR}/mspack) ++ set(MSPACK_LIBRARIES mspack) ++endif() ++ + target_link_libraries(rbbase +- cutelogger ${QUAZIP_LIBRARY} mspack bspatch rbspeex ++ cutelogger ${QUAZIP_LIBRARY} ${MSPACK_LIBRARIES} bspatch rbspeex + voicefont sansapatcher ipodpatcher chinachippatcher + mkamsboot mkimxboot mkmpioboot mktccboot mks5lboot + Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network) +@@ -332,47 +377,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) + +-add_library(mspack +- #mspack/cabc.c +- mspack/cabd.c +- mspack/cab.h +- #mspack/chmc.c +- #mspack/chmd.c +- #mspack/chm.h +- mspack/des.h +- #mspack/hlpc.c +- #mspack/hlpd.c +- #mspack/hlp.h +- #mspack/kwajc.c +- #mspack/kwajd.c +- #mspack/kwaj.h +- #mspack/litc.c +- #mspack/litd.c +- #mspack/lit.h +- #mspack/lzssd.c +- #mspack/lzss.h +- mspack/lzxc.c +- mspack/lzxd.c +- mspack/lzx.h +- mspack/mspack.h +- mspack/mszipc.c +- mspack/mszipd.c +- mspack/mszip.h +- mspack/qtmd.c +- mspack/qtm.h +- mspack/readbits.h +- mspack/readhuff.h +- mspack/sha.h +- mspack/system-mspack.c +- mspack/system-mspack.h +- #mspack/szddc.c +- #mspack/szddd.c +- #mspack/szdd.h +- ) +- +-target_include_directories(mspack PUBLIC ${CMAKE_CURRENT_LIST_DIR}/mspack) +- +- + # Unit tests + add_executable(test_compareversion + base/utils.cpp +diff --git a/utils/rbutilqt/base/mspackutil.h b/utils/rbutilqt/base/mspackutil.h +--- a/utils/rbutilqt/base/mspackutil.h ++++ b/utils/rbutilqt/base/mspackutil.h +@@ -21,7 +21,7 @@ + + #include <QtCore> + #include "archiveutil.h" +-#include "mspack/mspack.h" ++#include <mspack.h> + + class MsPackUtil : public ArchiveUtil + { diff --git a/misc/rbutil/patches/system-tomcrypt.patch b/misc/rbutil/patches/system-tomcrypt.patch new file mode 100644 index 0000000000000..cdff54f83296f --- /dev/null +++ b/misc/rbutil/patches/system-tomcrypt.patch @@ -0,0 +1,83 @@ +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -264,7 +264,7 @@ + ) + + target_include_directories(sbtools PUBLIC ${CMAKE_CURRENT_LIST_DIR}/imxtools/sbtools) +-target_link_libraries(sbtools PUBLIC rbtomcrypt) ++target_link_libraries(sbtools PUBLIC tomcrypt) + + add_library(mkmpioboot + mkmpioboot/mkmpioboot.c +@@ -328,35 +328,41 @@ else() + message("-- Found libbz2: ${LIBBZ2}") + endif() + +-add_library(rbtomcrypt +- tomcrypt/src/ciphers/aes/aes.c +- tomcrypt/src/ciphers/aes/aes_tab.c +- tomcrypt/src/misc/crypt/crypt_argchk.c +- tomcrypt/src/misc/crypt/crypt_register_cipher.c +- tomcrypt/src/misc/crypt/crypt_cipher_is_valid.c +- tomcrypt/src/misc/crypt/crypt_cipher_descriptor.c +- tomcrypt/src/misc/zeromem.c +- tomcrypt/src/misc/compare_testvector.c +- tomcrypt/src/modes/cbc/cbc_start.c +- tomcrypt/src/modes/cbc/cbc_decrypt.c +- tomcrypt/src/modes/cbc/cbc_encrypt.c +- tomcrypt/src/hashes/sha1.c +- tomcrypt/src/headers/tomcrypt_argchk.h +- tomcrypt/src/headers/tomcrypt_cfg.h +- tomcrypt/src/headers/tomcrypt_cipher.h +- tomcrypt/src/headers/tomcrypt_custom.h +- tomcrypt/src/headers/tomcrypt.h +- tomcrypt/src/headers/tomcrypt_hash.h +- tomcrypt/src/headers/tomcrypt_mac.h +- tomcrypt/src/headers/tomcrypt_macros.h +- tomcrypt/src/headers/tomcrypt_math.h +- tomcrypt/src/headers/tomcrypt_misc.h +- tomcrypt/src/headers/tomcrypt_pkcs.h +- tomcrypt/src/headers/tomcrypt_pk.h +- tomcrypt/src/headers/tomcrypt_private.h +- tomcrypt/src/headers/tomcrypt_prng.h +- ) +-target_include_directories(rbtomcrypt PUBLIC ${CMAKE_CURRENT_LIST_DIR}/tomcrypt/src/headers) ++find_library(LIBTOMCRYPT tomcrypt) ++if(${LIBTOMCRYPT} STREQUAL "LIBTOMCRYPT-NOTFOUND") ++ message("-- tomcrypt not found, building our own") ++ add_library(tomcrypt ++ tomcrypt/src/ciphers/aes/aes.c ++ tomcrypt/src/ciphers/aes/aes_tab.c ++ tomcrypt/src/misc/crypt/crypt_argchk.c ++ tomcrypt/src/misc/crypt/crypt_register_cipher.c ++ tomcrypt/src/misc/crypt/crypt_cipher_is_valid.c ++ tomcrypt/src/misc/crypt/crypt_cipher_descriptor.c ++ tomcrypt/src/misc/zeromem.c ++ tomcrypt/src/misc/compare_testvector.c ++ tomcrypt/src/modes/cbc/cbc_start.c ++ tomcrypt/src/modes/cbc/cbc_decrypt.c ++ tomcrypt/src/modes/cbc/cbc_encrypt.c ++ tomcrypt/src/hashes/sha1.c ++ tomcrypt/src/headers/tomcrypt_argchk.h ++ tomcrypt/src/headers/tomcrypt_cfg.h ++ tomcrypt/src/headers/tomcrypt_cipher.h ++ tomcrypt/src/headers/tomcrypt_custom.h ++ tomcrypt/src/headers/tomcrypt.h ++ tomcrypt/src/headers/tomcrypt_hash.h ++ tomcrypt/src/headers/tomcrypt_mac.h ++ tomcrypt/src/headers/tomcrypt_macros.h ++ tomcrypt/src/headers/tomcrypt_math.h ++ tomcrypt/src/headers/tomcrypt_misc.h ++ tomcrypt/src/headers/tomcrypt_pkcs.h ++ tomcrypt/src/headers/tomcrypt_pk.h ++ tomcrypt/src/headers/tomcrypt_private.h ++ tomcrypt/src/headers/tomcrypt_prng.h ++ ) ++target_include_directories(tomcrypt PUBLIC ${CMAKE_CURRENT_LIST_DIR}/tomcrypt/src/headers) ++else() ++ message("-- Found libtomcrypt: ${LIBTOMCRYPT}") ++endif() + + add_library(skin_parser + ${CMAKE_CURRENT_LIST_DIR}/../lib/skin_parser/skin_buffer.c diff --git a/misc/rbutil/rbutil.SlackBuild b/misc/rbutil/rbutil.SlackBuild index a3775ef455531..2889a4feb4def 100644 --- a/misc/rbutil/rbutil.SlackBuild +++ b/misc/rbutil/rbutil.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for RockboxUtility -# Copyright 2020-2021 Kyle Guinn <elyk03@gmail.com> +# Copyright 2020-2022 Kyle Guinn <elyk03@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,8 +26,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=rbutil SRCNAM=RockboxUtility -VERSION=${VERSION:-1.4.1} -BUILD=${BUILD:-2} +VERSION=${VERSION:-1.5.1} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -39,9 +39,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -51,7 +48,7 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM-$VERSION OUTPUT=${OUTPUT:-/tmp} -DOCS="docs/COPYING" +DOCS="docs/COPYING docs/CREDITS utils/rbutilqt/changelog.txt" if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" @@ -72,49 +69,59 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $SRCNAM-v$VERSION +rm -rf $SRCNAM-v$VERSION-src tar xvf $CWD/$SRCNAM-v$VERSION-src.tar.bz2 -cd $SRCNAM-v$VERSION +cd $SRCNAM-v$VERSION-src chown -R root:root . chmod -R u+w,go-w,a+rX-st . -cd rbutil/rbutilqt - # Use the system quazip. Thanks to gentoo. -patch -p1 < $CWD/patches/rbutil-1.4.1-quazip.patch -sed -i 's/quazip5/quazip/' base/ziputil.cpp -sed -i 's/quazip5/quazip/' base/ziputil.h -sed -i 's/ -lquazip5//' rbutilqt.pro -sed -i 's/\$\$_PRO_FILE_PWD_\/zlib//' rbutilqt.pro -echo "INCLUDEPATH += $(pkg-config --cflags-only-I quazip1-qt5 | sed s/-I//g)" >> rbutilqt.pro -echo "LIBS += $(pkg-config --libs quazip1-qt5)" >> rbutilqt.pro -rm -rf quazip zlib - -# Respect SLKCFLAGS, add -fcommon for gcc >= 10.x -sed -i "s/-O3/$SLKCFLAGS -fcommon/" ../mkimxboot/Makefile +patch -p1 < $CWD/patches/rbutil-1.5.1-system-quazip.patch +patch -p1 < $CWD/patches/rbutil-1.5.1-cmake.patch +patch -p1 < $CWD/patches/rbutil-1.5.1-headers.patch + +# Use the system bzip2, only for use with bspatch +# (another 3rd party program, modified by Rockbox +# for use as a library, so cannot be unbundled). +patch -p1 < $CWD/patches/system-bzip2.patch + +# Use the system mspack. +patch -p1 < $CWD/patches/system-mspack.patch + +# Use the system tomcrypt. +patch -p1 < $CWD/patches/system-tomcrypt.patch + +# Ensure we don't build/use these bundled libs. +patch -p1 < $CWD/patches/bundled-licenses.patch +rm -rf \ + lib/rbcodec/codecs/libspeex \ + utils/rbutilqt/mspack \ + utils/rbutilqt/quazip \ + utils/rbutilqt/zlib \ + utils/bzip2 \ + utils/tomcrypt \ # Decrease the amount of log spam. -sed -i 's/Logger::Debug/Logger::Warning/' logger/AbstractAppender.cpp - -# Build the translations first to avoid warnings. -lrelease rbutilqt.pro - -# SLKCFLAGS aren't always respected. -# $CC is not quoted properly. "ccache gcc" (the default) will fail. -qmake \ - QMAKE_CFLAGS="$SLKCFLAGS" \ - QMAKE_CXXFLAGS="$SLKCFLAGS" \ - -config noccache \ - rbutilqt.pro -make - -install -D -m 0755 -s RockboxUtility $PKG/usr/bin/RockboxUtility -# Some of these icons aren't exactly square. -for i in 16 32 48 64 128 256; do - install -D -m 0644 icons/rockbox-$i.png $PKG/usr/share/icons/hicolor/$i\x$i/apps/rockbox.png -done - +sed -i 's/Logger::Debug/Logger::Warning/' utils/rbutilqt/logger/src/AbstractAppender.cpp + +mkdir -p utils/build +cd utils/build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_RULE_MESSAGES=OFF \ + -DCMAKE_VERBOSE_MAKEFILE=TRUE \ + -DBUILD_SHARED_LIBS=OFF \ + -DCCACHE_PROGRAM=FALSE \ + -DUSE_SYSTEM_QUAZIP=ON \ + .. + make + install -D -m 0755 -s rbutilqt/RockboxUtility $PKG/usr/bin/RockboxUtility cd ../.. +install -D -m 0644 utils/rbutilqt/RockboxUtility.desktop $PKG/usr/share/applications/RockboxUtility.desktop +install -D -m 0644 docs/logo/rockbox-clef.svg $PKG/usr/share/icons/hicolor/scalable/apps/rockbox-clef.svg mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/misc/rbutil/rbutil.info b/misc/rbutil/rbutil.info index 7eb6347287aa5..2df31d939b3f1 100644 --- a/misc/rbutil/rbutil.info +++ b/misc/rbutil/rbutil.info @@ -1,10 +1,10 @@ PRGNAM="rbutil" -VERSION="1.4.1" +VERSION="1.5.1" HOMEPAGE="https://www.rockbox.org/wiki/RockboxUtility" -DOWNLOAD="https://download.rockbox.org/rbutil/source/RockboxUtility-v1.4.1-src.tar.bz2" -MD5SUM="0e29f60ee87f433087c6ead09dde81f3" +DOWNLOAD="https://download.rockbox.org/rbutil/source/RockboxUtility-v1.5.1-src.tar.bz2" +MD5SUM="e995b21923a19975b5b10987de7af528" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="" +REQUIRES="libmspack libtomcrypt" MAINTAINER="Kyle Guinn" EMAIL="elyk03@gmail.com" |