diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-02-20 18:19:47 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2021-02-23 20:52:26 +0100 |
commit | 4d117f06aea1efe47243f73a64820fc54d42e40d (patch) | |
tree | 33acf8caf684ac94db80a82bf825fce661fdab6d /app-misc | |
parent | games-board/chessx: Drop 1.5.4-r2 (diff) | |
download | gentoo-4d117f06aea1efe47243f73a64820fc54d42e40d.tar.gz gentoo-4d117f06aea1efe47243f73a64820fc54d42e40d.tar.bz2 gentoo-4d117f06aea1efe47243f73a64820fc54d42e40d.zip |
app-misc/rbutil: Support build with >=dev-libs/quazip-1.0
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/rbutil/files/rbutil-1.4.1-quazip1.patch | 84 | ||||
-rw-r--r-- | app-misc/rbutil/rbutil-1.4.1-r2.ebuild | 79 |
2 files changed, 163 insertions, 0 deletions
diff --git a/app-misc/rbutil/files/rbutil-1.4.1-quazip1.patch b/app-misc/rbutil/files/rbutil-1.4.1-quazip1.patch new file mode 100644 index 000000000000..aa28cc9ea271 --- /dev/null +++ b/app-misc/rbutil/files/rbutil-1.4.1-quazip1.patch @@ -0,0 +1,84 @@ +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/rbutil-1.4.1-r2.ebuild b/app-misc/rbutil/rbutil-1.4.1-r2.ebuild new file mode 100644 index 000000000000..322c9c396c37 --- /dev/null +++ b/app-misc/rbutil/rbutil-1.4.1-r2.ebuild @@ -0,0 +1,79 @@ +# 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 +) + +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 +} |