summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2024-11-23 12:24:18 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2024-11-23 12:33:22 +0100
commitae7ecc439b27f9bef126160f6b551c71c12d7690 (patch)
treeda48f6c4069bdb095e992ef1a64509cbbae5edc0
parentdev-util/pkgcheck: Bump to 0.10.32 (diff)
downloadgentoo-ae7ecc439b27f9bef126160f6b551c71c12d7690.tar.gz
gentoo-ae7ecc439b27f9bef126160f6b551c71c12d7690.tar.bz2
gentoo-ae7ecc439b27f9bef126160f6b551c71c12d7690.zip
x11-misc/qterm: add 0.8.2
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--x11-misc/qterm/Manifest1
-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, 227 insertions, 0 deletions
diff --git a/x11-misc/qterm/Manifest b/x11-misc/qterm/Manifest
index 030eacc9a25e..0ea49b1b6346 100644
--- a/x11-misc/qterm/Manifest
+++ b/x11-misc/qterm/Manifest
@@ -1 +1,2 @@
DIST qterm-0.7.3.tar.gz 901423 BLAKE2B e3f799946bfff4531e77d04fe535d53ef92093d1435aca32b06fa43c444c55798ab1c8408847dde81d1d24b5fda0c4a4f58fb563369f2c4669ba43929695cbd8 SHA512 93fdd24d79a81853654a4702ff55b2fad80c1cc734ec3230a297b3a2613cf24d41f4c645eadc5f34b6025f548e7c8cd5d291d4c29fc919f8966eeb8b44f5c046
+DIST qterm-0.8.2.tar.gz 903553 BLAKE2B 90978a6783ec727035d1cba2152e570f3aa2788a39a66730588b6d77faf3924e7035924ff49e4caba9acef4eaa400b54053de4ad284cda7ac081eb3d8d0ab8ec SHA512 13140d3e96d288288990aae2df0c85f3dd53187d1c1bd9dadaae5654ae25539ca85c26350ef01e9ff04cc08af3f87929b6bc7f5fbd6b52c8ec2a3f6101bcd686
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
+}