* [gentoo-commits] repo/gentoo:master commit in: app-editors/tea/files/, app-editors/tea/
@ 2023-11-30 14:46 Ionen Wolkens
0 siblings, 0 replies; only message in thread
From: Ionen Wolkens @ 2023-11-30 14:46 UTC (permalink / raw
To: gentoo-commits
commit: ebd24d66237d1521ae3a2761d4687d7076b07fc6
Author: Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sun Nov 19 11:44:19 2023 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Nov 30 14:45:13 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebd24d66
app-editors/tea: add 62.1.1
Closes: https://bugs.gentoo.org/830654
Bug: https://bugs.gentoo.org/917587
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
app-editors/tea/Manifest | 1 +
app-editors/tea/files/tea-62.1.1-fix-desktop.patch | 26 ++++++++
app-editors/tea/files/tea-62.1.1-qt-option.patch | 41 ++++++++++++
app-editors/tea/metadata.xml | 3 +
app-editors/tea/tea-62.1.1.ebuild | 73 ++++++++++++++++++++++
5 files changed, 144 insertions(+)
diff --git a/app-editors/tea/Manifest b/app-editors/tea/Manifest
index f99875f7c8fc..172827e37b93 100644
--- a/app-editors/tea/Manifest
+++ b/app-editors/tea/Manifest
@@ -1 +1,2 @@
DIST tea-47.0.0.tar.bz2 437273 BLAKE2B 8ed36526dedc6df4af74ef0e400c2ee2e19bb533cf2a4fa51df83f21ad78abb0e8e90bce3469e2e8db5f780ba8a900aedf2737c736945431b836ba0a76574b26 SHA512 7136d59383bf43c6a024a31aa29860a3e89893ff091a42f44f9e7088fb318920ab886cd1fdabc8ff6e3c30f8eb3d46d707228d2d45fb085ed7c822a4ffd89d13
+DIST tea-qt-62.1.1.tar.gz 675996 BLAKE2B 2219a7f61fe54426b0216e5612b05048ee6f1451084d4aa66c0744110ce6151c2ba46acf1c7e7b5916ae6194516391fa1c23cb797ecd7ac423e3005a88da85f4 SHA512 1d81b83a6f25f385959a507342f4a79c24be5af20c2841d851f0d233cbd77142c672c9f147a185e3088000172d5d943bd290497dfcbec87c1a3e0b96a40a5217
diff --git a/app-editors/tea/files/tea-62.1.1-fix-desktop.patch b/app-editors/tea/files/tea-62.1.1-fix-desktop.patch
new file mode 100644
index 000000000000..36af0b5c0027
--- /dev/null
+++ b/app-editors/tea/files/tea-62.1.1-fix-desktop.patch
@@ -0,0 +1,26 @@
+From 8fb78950cd2e50c76cbf34b5245a413a5f3477f0 Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Sun, 19 Nov 2023 12:56:05 +0200
+Subject: [PATCH] Remove whitespace at the end the desktop file
+
+ * QA Notice: This package installs one or more .desktop files that do not
+ * pass validation.
+ *
+ * /usr/share/applications/tea.desktop: error: (will be fatal in the future): value "text/plain;application/epub+zip;application/fb2;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.oasis.opendocument.text;application/rtf;application/x-tex; " for key "MimeType" in group "Desktop Entry" contains value " " which is an invalid MIME type: " " does not contain a subtype
+ *
+
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+--- a/desktop/tea.desktop
++++ b/desktop/tea.desktop
+@@ -6,7 +6,7 @@ Icon=tea
+ Exec=tea %F
+ Categories=Utility;TextEditor;
+ StartupNotify=false
+-MimeType=text/plain;application/epub+zip;application/fb2;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.oasis.opendocument.text;application/rtf;application/x-tex;
++MimeType=text/plain;application/epub+zip;application/fb2;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.oasis.opendocument.text;application/rtf;application/x-tex;
+ NoDisplay=false
+ Version=1.1
+ Keywords=text editor;text;editor;
+--
+2.42.1
+
diff --git a/app-editors/tea/files/tea-62.1.1-qt-option.patch b/app-editors/tea/files/tea-62.1.1-qt-option.patch
new file mode 100644
index 000000000000..e4f2a580c6e9
--- /dev/null
+++ b/app-editors/tea/files/tea-62.1.1-qt-option.patch
@@ -0,0 +1,41 @@
+From 2ca1a29e67c9cee591dbab5a323764e435d46b2c Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Sun, 19 Nov 2023 12:53:11 +0200
+Subject: [PATCH] Make qt6 a cmake option instead of letting automagic
+ handle it
+
+* qt_standard_project_setup() is >=qt-6.3 only, so put it under
+ Qt6_Found.
+
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -11,8 +11,11 @@ set(CMAKE_AUTORCC ON)
+ enable_language(CXX)
+ enable_language(C)
+
+-find_package(Qt6 COMPONENTS Core Widgets)
+-if (NOT Qt6_FOUND)
++option(USE_QT6 "Build against QT6" ON)
++
++if (USE_QT6)
++ find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
++else()
+ find_package(Qt5 5.15 REQUIRED COMPONENTS Core Widgets)
+ endif()
+
+@@ -22,10 +25,8 @@ message("+ Qt6 found")
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
+-endif()
+-
+-
+ qt_standard_project_setup()
++endif()
+
+
+ set(PROJECT "tea-qt")
+--
+2.42.1
+
diff --git a/app-editors/tea/metadata.xml b/app-editors/tea/metadata.xml
index 7bd9ca773d36..f905158e4e39 100644
--- a/app-editors/tea/metadata.xml
+++ b/app-editors/tea/metadata.xml
@@ -10,6 +10,9 @@
highlighting and a built in file manager as well as a built in image viewer.
It can also read lots of 'other' filetypes.
</longdescription>
+ <upstream>
+ <remote-id type="github">psemiletov/tea-qt</remote-id>
+ </upstream>
<use>
<flag name="aspell">Enable spellchecking using <pkg>app-text/aspell</pkg></flag>
<flag name="hunspell">Enable spellchecking using <pkg>app-text/hunspell</pkg></flag>
diff --git a/app-editors/tea/tea-62.1.1.ebuild b/app-editors/tea/tea-62.1.1.ebuild
new file mode 100644
index 000000000000..d0e26ed1bde2
--- /dev/null
+++ b/app-editors/tea/tea-62.1.1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+MY_P="tea-qt-${PV}"
+
+DESCRIPTION="Small, lightweight Qt text editor"
+HOMEPAGE="https://tea.ourproject.org/"
+SRC_URI="https://github.com/psemiletov/tea-qt/archive/${PV}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="aspell djvu pdf"
+
+# qt6 blocked by poppler[qt6]
+DEPEND="
+ app-text/hunspell:=
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ sys-libs/zlib
+ aspell? ( app-text/aspell )
+ djvu? ( app-text/djvu )
+ pdf? ( app-text/poppler:=[qt5] )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS NEWS-RU TODO )
+
+PATCHES=(
+ "${FILESDIR}/tea-62.1.1-qt-option.patch"
+ "${FILESDIR}/tea-62.1.1-fix-desktop.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Replace AUR link with p.g.o link
+ sed -i \
+ -e 's,AUR: aur.archlinux.org/packages/tea-qt-git,Gentoo: https://packages.gentoo.org/packages/app-editors/tea,' \
+ tea.cpp translations/{de,es,fr,pl,ru}.ts || die
+
+ # Rename tea to tea-qt to avoid file conflict with dev-util/tea
+ # bug #917587
+ # https://github.com/psemiletov/tea-qt/issues/50
+ sed -i -e '/set_target_properties(tea PROPERTIES$/ a\
+ OUTPUT_NAME \"tea-qt\"' \
+ CMakeLists.txt || die
+ sed -i -e '/Exec/ { s/tea/tea-qt/ }' desktop/tea.desktop || die
+}
+src_configure() {
+ local mycmakeargs=(
+ -DUSE_ASPELL=$(usex aspell)
+ -DUSE_PDF=$(usex pdf)
+ -DUSE_DJVU=$(usex djvu)
+ -DUSE_QT6=OFF # blocked by poppler-qt6
+ -DUSE_PRINTER=OFF # only for qt6
+ )
+
+ cmake_src_configure
+}
+
+pkg_postinst() {
+ if [[ "${REPLACING_VERSIONS}" == "47.0.0" ]]; then
+ elog "Executable 'tea' has been renamed to 'tea-qt'"
+ fi
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-30 14:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 14:46 [gentoo-commits] repo/gentoo:master commit in: app-editors/tea/files/, app-editors/tea/ Ionen Wolkens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox