From c8519f723d963b46b3ff2137d9ac7d498af94a57 Mon Sep 17 00:00:00 2001 From: Pavel Kalugin <38429428+pavel-the-best@users.noreply.github.com> Date: Mon, 25 May 2020 21:48:18 +0300 Subject: [PATCH] media-gfx/flameshot: new package Signed-off-by: Pavel Kalugin Closes: https://github.com/gentoo/gentoo/pull/15968 Signed-off-by: Maxim Koltsov --- media-gfx/flameshot/Manifest | 1 + ...t-0.6.0-unbundle-qtsingleapplication.patch | 47 ++++++++++++++++ media-gfx/flameshot/flameshot-0.6.0.ebuild | 53 +++++++++++++++++++ media-gfx/flameshot/metadata.xml | 12 +++++ 4 files changed, 113 insertions(+) create mode 100644 media-gfx/flameshot/Manifest create mode 100644 media-gfx/flameshot/files/flameshot-0.6.0-unbundle-qtsingleapplication.patch create mode 100644 media-gfx/flameshot/flameshot-0.6.0.ebuild create mode 100644 media-gfx/flameshot/metadata.xml diff --git a/media-gfx/flameshot/Manifest b/media-gfx/flameshot/Manifest new file mode 100644 index 000000000000..bf5fbbbba36b --- /dev/null +++ b/media-gfx/flameshot/Manifest @@ -0,0 +1 @@ +DIST flameshot-0.6.0.tar.gz 641561 BLAKE2B f9e87373d84c1a841f70cd9c13b504865a0ef23d0fb29848f2270171459afe9c6852e12c712ebdc7cf3cfc62214d7b7507b85cf21838d0ebed33bee1e39f4aad SHA512 194127032ab0f62a6ba2698688e11b2d4e6f0e04a282144f5fbb6c232eeebc71371af2d55abbb6e98b8649dee036e6f0a6ef55710e4321a60fd5ac6e453ab975 diff --git a/media-gfx/flameshot/files/flameshot-0.6.0-unbundle-qtsingleapplication.patch b/media-gfx/flameshot/files/flameshot-0.6.0-unbundle-qtsingleapplication.patch new file mode 100644 index 000000000000..7973aa1d06c8 --- /dev/null +++ b/media-gfx/flameshot/files/flameshot-0.6.0-unbundle-qtsingleapplication.patch @@ -0,0 +1,47 @@ +diff -ruN a/flameshot.pro b/flameshot.pro +--- a/flameshot.pro 2020-05-25 21:16:54.044214597 +0300 ++++ b/flameshot.pro 2020-05-25 21:25:03.808676488 +0300 +@@ -18,7 +18,7 @@ + QT += dbus + } + +-CONFIG += c++11 link_pkgconfig ++CONFIG += c++11 link_pkgconfig qtsingleapplication + + #CONFIG += packaging # Enables "make install" for packaging paths + +@@ -63,7 +63,6 @@ + + DEFINES += QT_DEPRECATED_WARNINGS + +-include(src/third-party/singleapplication/singleapplication.pri) + include(src/third-party/Qt-Color-Widgets//color_widgets.pri) + + DEFINES += QAPPLICATION_CLASS=QApplication +diff -ruN a/src/main.cpp b/src/main.cpp +--- a/src/main.cpp 2020-05-25 21:16:54.055215952 +0300 ++++ b/src/main.cpp 2020-05-25 21:25:35.095744395 +0300 +@@ -16,13 +16,13 @@ + // along with Flameshot. If not, see . + + #include "src/core/controller.h" +-#include "singleapplication.h" + #include "src/utils/filenamehandler.h" + #include "src/utils/confighandler.h" + #include "src/cli/commandlineparser.h" + #include "src/utils/systemnotification.h" + #include "src/utils/pathinfo.h" + #include "src/core/capturerequest.h" ++#include + #include + #include + #include +@@ -44,7 +44,7 @@ + + // no arguments, just launch Flameshot + if (argc == 1) { +- SingleApplication app(argc, argv); ++ QtSingleApplication app(argc, argv); + + QTranslator translator; + QStringList trPaths = PathInfo::translationsPaths(); diff --git a/media-gfx/flameshot/flameshot-0.6.0.ebuild b/media-gfx/flameshot/flameshot-0.6.0.ebuild new file mode 100644 index 000000000000..e3d9daac1c78 --- /dev/null +++ b/media-gfx/flameshot/flameshot-0.6.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop qmake-utils xdg-utils + +DESCRIPTION="Powerful yet simple to use screenshot software" +HOMEPAGE="https://flameshot.js.org" +SRC_URI="https://github.com/lupoDharkael/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="FreeArt GPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=" + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtsingleapplication[qt5(+),X] + dev-qt/qtwidgets:5 + dev-qt/qtsvg:5 + dev-qt/qtnetwork:5 + dev-qt/qtdbus:5 + sys-apps/dbus +" +RDEPEND="${DEPEND}" +PATCHES=( "${FILESDIR}/${P}-unbundle-qtsingleapplication.patch" ) + +src_prepare() { + rm -r src/third-party/singleapplication || die + default +} + +src_configure() { + eqmake5 "CONFIG+=packaging" +} + +src_install() { + emake INSTALL_ROOT="${D}" install +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} diff --git a/media-gfx/flameshot/metadata.xml b/media-gfx/flameshot/metadata.xml new file mode 100644 index 000000000000..49f9e82790bb --- /dev/null +++ b/media-gfx/flameshot/metadata.xml @@ -0,0 +1,12 @@ + + + + + paul.kalug@gmail.com + Pavel Kalugin + + + proxy-maint@gentoo.org + Proxy Maintainers + + -- 2.26.2