summaryrefslogtreecommitdiff
path: root/x11-misc/qterm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-11-24 03:02:55 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-11-24 03:02:55 +0000
commit530a5a826feeb71085fb8a01927f4d775a0b131b (patch)
treeb7669c45ea3f2a3a37b2437817a370226bb1c819 /x11-misc/qterm
parent71dd9d29cdaf7cc0ecdb9ea37d128726a941c630 (diff)
gentoo auto-resync : 24:11:2024 - 03:02:54
Diffstat (limited to 'x11-misc/qterm')
-rw-r--r--x11-misc/qterm/Manifest8
-rw-r--r--x11-misc/qterm/files/qterm-0.8.2-fix-case-fallthrough.patch21
-rw-r--r--x11-misc/qterm/files/qterm-0.8.2-fix-typo.patch22
-rw-r--r--x11-misc/qterm/files/qterm-0.8.2-gcc14-fix-Wunused.patch83
-rw-r--r--x11-misc/qterm/files/qterm-0.8.2-missing-QDebug-include.patch21
-rw-r--r--x11-misc/qterm/metadata.xml3
-rw-r--r--x11-misc/qterm/qterm-0.8.2.ebuild76
7 files changed, 233 insertions, 1 deletions
diff --git a/x11-misc/qterm/Manifest b/x11-misc/qterm/Manifest
index db4eec38e096..5cdf669af937 100644
--- a/x11-misc/qterm/Manifest
+++ b/x11-misc/qterm/Manifest
@@ -1,3 +1,9 @@
+AUX qterm-0.8.2-fix-case-fallthrough.patch 627 BLAKE2B 512b8ec92ac66cecc7f1693563474169f9ffacd54159f0854e0ae10d6d20e6082d681487199b90b3adbc6238a331cc3a845e9c3b4f758ac68867b585f986b3f2 SHA512 9a6d60e707d2504d10a5473057a531c7cbbe1ba97ced0b2c29f3040144cc6a29f84398d3c3c8bb5db83b7d956f5f73746aaeefe4bfe027db6089306802a65ae7
+AUX qterm-0.8.2-fix-typo.patch 742 BLAKE2B 8455619663a9521b8126f618d94864d344004dd692f554847aeefd0dd3bb8b434b0d76c88f39a8107406e4910099e8e45d35950ae2554201b9b2af935cd631d2 SHA512 c0701734add0bfaeaf3763cd0c43b27bac3220361cba6f6de666204c1a4188c01acf562ca5f43d011d59194c3cda29c79d828df57444f1c8809c4ebf2e6a7939
+AUX qterm-0.8.2-gcc14-fix-Wunused.patch 2613 BLAKE2B fc2fc4ca29ce848b10a0ee822c13ae0ba0da1844e86448b40723e77bf780979e990006a7b2e25c5557972a64b4adf5657f335166303ac2e1ce063f66e056e2d2 SHA512 819f6aa61b6941b5151918d3f9f7f67279e3d73351b43499c2d68e0f362119b4fb4335044eadd777be076a98e6822ddc64360d3610639d14ab9b5e178e1ef406
+AUX qterm-0.8.2-missing-QDebug-include.patch 588 BLAKE2B c742dea23ffa34c8197778f7c96f65c4ce9a3be2110defeaee097f58fc05b879a9a3aa16bc7c0202457622bdbb166a5e7b79014b1e60f1ada27b32dbc0f8b0f2 SHA512 eb07013675039b27ebdd0bc1237a186e9c61d66eef6fabb27a510d55901a41847cbe187d2f9d37c7578228bc750e81900140cf78cc388707709f1bd29126e422
DIST qterm-0.7.3.tar.gz 901423 BLAKE2B e3f799946bfff4531e77d04fe535d53ef92093d1435aca32b06fa43c444c55798ab1c8408847dde81d1d24b5fda0c4a4f58fb563369f2c4669ba43929695cbd8 SHA512 93fdd24d79a81853654a4702ff55b2fad80c1cc734ec3230a297b3a2613cf24d41f4c645eadc5f34b6025f548e7c8cd5d291d4c29fc919f8966eeb8b44f5c046
+DIST qterm-0.8.2.tar.gz 903553 BLAKE2B 90978a6783ec727035d1cba2152e570f3aa2788a39a66730588b6d77faf3924e7035924ff49e4caba9acef4eaa400b54053de4ad284cda7ac081eb3d8d0ab8ec SHA512 13140d3e96d288288990aae2df0c85f3dd53187d1c1bd9dadaae5654ae25539ca85c26350ef01e9ff04cc08af3f87929b6bc7f5fbd6b52c8ec2a3f6101bcd686
EBUILD qterm-0.7.3-r1.ebuild 1011 BLAKE2B 7603ab7874de10039d1aaaf53a07d4c167803e64d8ce52751b59c8ee9c406c6c50af3a72e3188525573459257e93de5c6c0919f79ab43e3840a80b90fcf5aef5 SHA512 07d83e4dc0fd5870f51bbf8b29a1b7c40a4d227c97600c6b0a676de2ae7be5a4e08dd221f38641a91bd83c03d1d584ad204b5c1fe5e2b28cfcbbdf94d47ba38f
-MISC metadata.xml 294 BLAKE2B 3da9750117b2f1cb46f77857a8cf66e9c55fe0a1ffb544c9ec825062e21254f7200366fbc823af8c240d00519547a45f087b89bf236ba3a0364e399561904b16 SHA512 2bccf268fb899b84f549c168b048b77e2db24e76dc8d1d69e5fa45ccf92ca9dda6095aeabdb16486852f501713d2fec87a87ea9c0ec8f67b05242138ef100b87
+EBUILD qterm-0.8.2.ebuild 1813 BLAKE2B c0a4a91ecfca84af57bffedc0fa02b9dc6b3426d9edb74126a6e140e31de7ee0d172720889dc3213321b7e40f2b029af0757556b9182bfb1136cf625491fa74a SHA512 8cdb7eac96b20e63230d07a3a3384f1184eedf639a403a473c67056d7a2bbe224b5498c02f8f4a47d89416c792c7a095706ee6ff7dc32fe74c2203d9a6ebad3e
+MISC metadata.xml 392 BLAKE2B 3fd78b89c1b4ca2b9042e9c9e7d1e59b081d5fcee25f486dda27caa78d49d56f2b85b20e5c28c1ec8af9f2fc91fd44805adafbc506c13879377d1a3790ae9efe SHA512 1c3c36c7b2b0858380306099feed590fa185ea1489a88f7e30d363f6e642cbda4bdfa10ed216126a96718ceb589a19d2053413ef79e4396e24334542388e4660
diff --git a/x11-misc/qterm/files/qterm-0.8.2-fix-case-fallthrough.patch b/x11-misc/qterm/files/qterm-0.8.2-fix-case-fallthrough.patch
new file mode 100644
index 000000000000..1feb56fc8610
--- /dev/null
+++ b/x11-misc/qterm/files/qterm-0.8.2-fix-case-fallthrough.patch
@@ -0,0 +1,21 @@
+From 7b7f66d78901166a9b68f3d6e81770e0c038bade Mon Sep 17 00:00:00 2001
+From: Xiaoqiang Wang <xiaoqiangwang@gmail.com>
+Date: Wed, 18 Sep 2024 23:22:02 +0200
+Subject: [PATCH] fix case fall-through
+
+---
+ src/ssh/auth.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/ssh/auth.cpp b/src/ssh/auth.cpp
+index 37870e9..a7dc5ef 100644
+--- a/src/ssh/auth.cpp
++++ b/src/ssh/auth.cpp
+@@ -163,6 +163,7 @@ void SSH2Auth::authPacketReceived(int flag)
+ qDebug() << "====== success! ======";
+ #endif
+ emit authFinished();
++ break;
+ default:
+ qDebug() << "Unknown message: " << flag;
+ break;
diff --git a/x11-misc/qterm/files/qterm-0.8.2-fix-typo.patch b/x11-misc/qterm/files/qterm-0.8.2-fix-typo.patch
new file mode 100644
index 000000000000..bba8ea915697
--- /dev/null
+++ b/x11-misc/qterm/files/qterm-0.8.2-fix-typo.patch
@@ -0,0 +1,22 @@
+From c929c3f38deeee9a9151f7ba0eb1f43baeada4ed Mon Sep 17 00:00:00 2001
+From: Xiaoqiang Wang <xiaoqiangwang@gmail.com>
+Date: Fri, 20 Sep 2024 09:30:31 +0200
+Subject: [PATCH] fix typo
+
+---
+ src/qtermglobal.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/qtermglobal.cpp b/src/qtermglobal.cpp
+index 5055928..6b7ed79 100644
+--- a/src/qtermglobal.cpp
++++ b/src/qtermglobal.cpp
+@@ -858,7 +858,7 @@ void Global::openUrl(const QString & urlStr)
+ command += " &";
+ success = system(command.toUtf8().data()) == 0;
+ #else
+- succes = QProcess::startDetached(command);
++ success = QProcess::startDetached(command);
+ #endif
+ if (!success)
+ qDebug() << "Failed to open the url with the system command";
diff --git a/x11-misc/qterm/files/qterm-0.8.2-gcc14-fix-Wunused.patch b/x11-misc/qterm/files/qterm-0.8.2-gcc14-fix-Wunused.patch
new file mode 100644
index 000000000000..df2e6b804071
--- /dev/null
+++ b/x11-misc/qterm/files/qterm-0.8.2-gcc14-fix-Wunused.patch
@@ -0,0 +1,83 @@
+From dda28e63d1fb4497ad823273c511bcc0c27d137f Mon Sep 17 00:00:00 2001
+From: Xiaoqiang Wang <xiaoqiangwang@gmail.com>
+Date: Fri, 20 Sep 2024 06:41:41 +0200
+Subject: [PATCH] check return values from system call (#40)
+
+---
+ src/main.cpp | 12 +++++++++---
+ src/qtermframe.cpp | 4 +++-
+ src/qtermglobal.cpp | 8 +++++---
+ 3 files changed, 17 insertions(+), 7 deletions(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index 9dce864..474814c 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -57,12 +57,14 @@ void sig_fatal_init();
+ void sig_fatal_handler (int sig)
+ {
+ int num, fd, i;
+-
++ ssize_t written;
+ i = 0;
+
+ sig_fatal_finish ();
+
+- chdir (QTERM_SIG_LOG_DIR);
++ if (chdir (QTERM_SIG_LOG_DIR) == -1) {
++ return;
++ }
+
+ if ((fd = creat (_sig_fname, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) {
+ i = errno;
+@@ -73,7 +75,11 @@ void sig_fatal_handler (int sig)
+
+ sprintf (_buf, "Hit with signal %d! Stack trace of last %d functions:\n",
+ sig, num);
+- write (fd, _buf, strlen (_buf));
++ written = write (fd, _buf, strlen (_buf));
++ if (written == -1) {
++ close (fd);
++ return;
++ }
+
+ backtrace_symbols_fd (_rets, num, fd);
+
+diff --git a/src/qtermframe.cpp b/src/qtermframe.cpp
+index f450fae..bc19f8d 100644
+--- a/src/qtermframe.cpp
++++ b/src/qtermframe.cpp
+@@ -818,7 +818,9 @@ void Frame::keyClicked(int id)
+ } else if (strTmp[0] == '1') { // script
+ qobject_cast<Window *>(mdiArea->activeSubWindow())->runScript(strTmp.mid(1));
+ } else if (strTmp[0] == '2') { // program
+- system((strTmp.mid(1) + " &").toLocal8Bit());
++ if (system((strTmp.mid(1) + " &").toLocal8Bit()) != 0) {
++ QMessageBox::warning(this, tr("Run program error"), tr("Error in running program '%1'").arg(strTmp));
++ }
+ }
+ }
+
+diff --git a/src/qtermglobal.cpp b/src/qtermglobal.cpp
+index 0bc4a86..48c36cc 100644
+--- a/src/qtermglobal.cpp
++++ b/src/qtermglobal.cpp
+@@ -852,13 +852,15 @@ void Global::openUrl(const QString & urlStr)
+ command.replace("%L", "\"" + urlStr + "\"");
+ //cstrCmd.replace("%L", strUrl.toLocal8Bit());
+
++ bool success;
+ #if !defined(_OS_WIN32_) && !defined(Q_OS_WIN32)
+ command += " &";
+- system(command.toUtf8().data());
++ success = system(command.toUtf8().data()) == 0;
+ #else
+- QProcess::startDetached(command);
++ succes = QProcess::startDetached(command);
+ #endif
+-
++ if (!success)
++ qDebug() << "Failed to open the url with the system command";
+ }
+
+ QString Global::convert(const QString & source, Global::Conversion flag)
diff --git a/x11-misc/qterm/files/qterm-0.8.2-missing-QDebug-include.patch b/x11-misc/qterm/files/qterm-0.8.2-missing-QDebug-include.patch
new file mode 100644
index 000000000000..9039f99d7ce5
--- /dev/null
+++ b/x11-misc/qterm/files/qterm-0.8.2-missing-QDebug-include.patch
@@ -0,0 +1,21 @@
+From cd79201bebce732fd47fee97c9d73e66805473f0 Mon Sep 17 00:00:00 2001
+From: Xiaoqiang Wang <xiaoqiangwang@gmail.com>
+Date: Fri, 20 Sep 2024 07:47:10 +0200
+Subject: [PATCH] header for QDebug class
+
+---
+ src/qtermglobal.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/qtermglobal.cpp b/src/qtermglobal.cpp
+index 48c36cc..5055928 100644
+--- a/src/qtermglobal.cpp
++++ b/src/qtermglobal.cpp
+@@ -31,6 +31,7 @@
+ #include <QFileDialog>
+ #include <QMessageBox>
+ #include <QtXml/QDomDocument>
++#include <QtDebug>
+
+ #if defined(_OS_WIN32_) || defined(Q_OS_WIN32)
+ #include <windows.h>
diff --git a/x11-misc/qterm/metadata.xml b/x11-misc/qterm/metadata.xml
index d010a3ee5307..48ef20e15c21 100644
--- a/x11-misc/qterm/metadata.xml
+++ b/x11-misc/qterm/metadata.xml
@@ -6,4 +6,7 @@
<remote-id type="github">qterm/qterm</remote-id>
<remote-id type="sourceforge">qterm</remote-id>
</upstream>
+ <use>
+ <flag name="ssh">Enable SSH support (requires <pkg>dev-libs/openssl</pkg></flag>
+ </use>
</pkgmetadata>
diff --git a/x11-misc/qterm/qterm-0.8.2.ebuild b/x11-misc/qterm/qterm-0.8.2.ebuild
new file mode 100644
index 000000000000..ed01bf3380d3
--- /dev/null
+++ b/x11-misc/qterm/qterm-0.8.2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake xdg
+
+DESCRIPTION="BBS client based on Qt"
+HOMEPAGE="https://github.com/qterm/qterm"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssh"
+
+RDEPEND="
+ dev-qt/qt5compat:6
+ dev-qt/qtbase:6[gui,network,widgets,X,xml]
+ x11-libs/libX11
+ ssh? ( dev-libs/openssl:= )
+"
+DEPEND="${RDEPEND}
+ x11-base/xorg-proto
+"
+BDEPEND="
+ dev-qt/qttools:6[assistant,linguist]
+"
+
+DOCS=( README.rst RELEASE_NOTES TODO doc/script.txt )
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-case-fallthrough.patch"
+ "${FILESDIR}/${P}-gcc14-fix-Wunused.patch"
+ "${FILESDIR}/${P}-missing-QDebug-include.patch"
+ "${FILESDIR}/${P}-fix-typo.patch"
+)
+
+src_prepare() {
+ # no Qt5 automagic, please
+ sed -e "/^ *find_package.*QT NAMES/s/Qt5 //" -i CMakeLists.txt || die
+
+ cmake_run_in src cmake_comment_add_subdirectory scripts
+
+ # file collision with sys-cluster/torque, bug #176533
+ sed -i "/PROGRAME /s/qterm/QTerm/" CMakeLists.txt || die
+ sed -i "s/Exec=qterm/Exec=QTerm/" src/${PN}.desktop || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ # not ported from Qt4
+ -DQTERM_ENABLE_TEST=OFF
+ # not ported from Qt5
+ -DQTERM_ENABLE_SCRIPT=OFF
+ -DQTERM_ENABLE_SCRIPT_DEBUGGER=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt6Script=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt6ScriptTools=ON
+ -DQTERM_ENABLE_QMEDIAPLAYER=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt6Multimedia=ON
+ # not wired up at all
+ -DQTERM_ENABLE_DBUS=OFF
+ -DQTERM_ENABLE_PHONON=OFF
+ -DQTERM_ENABLE_SSH=$(usex ssh)
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ # proper Wayland session application icon
+ mv "${ED}"/usr/share/applications/{qterm,QTerm}.desktop || die
+}