public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/libcommuni/files/, net-im/libcommuni/
Date: Tue, 28 Jan 2025 22:23:40 +0000 (UTC)	[thread overview]
Message-ID: <1738103011.7880b6eec5c547dd8f772726c5b37b8ac5e9bfeb.conikost@gentoo> (raw)

commit:     7880b6eec5c547dd8f772726c5b37b8ac5e9bfeb
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 28 22:07:57 2025 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Tue Jan 28 22:23:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7880b6ee

net-im/libcommuni: add support for qt6

Bug: https://bugs.gentoo.org/948977
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 net-im/libcommuni/files/libcommuni-3.7.0-qt6.patch | 116 +++++++++++++++++++++
 net-im/libcommuni/libcommuni-3.7.0-r2.ebuild       |  79 ++++++++++++++
 2 files changed, 195 insertions(+)

diff --git a/net-im/libcommuni/files/libcommuni-3.7.0-qt6.patch b/net-im/libcommuni/files/libcommuni-3.7.0-qt6.patch
new file mode 100644
index 000000000000..e0964a652522
--- /dev/null
+++ b/net-im/libcommuni/files/libcommuni-3.7.0-qt6.patch
@@ -0,0 +1,116 @@
+From 8f5e706960648ed9c87968bb1526905d39cb9c52 Mon Sep 17 00:00:00 2001
+From: Kaj-Michael Lang <milang@tal.org>
+Date: Fri, 28 Apr 2023 20:11:52 +0300
+Subject: [PATCH 1/5] src: Use core5compat if building on Qt 6
+
+---
+ src/module_build.pri | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/module_build.pri b/src/module_build.pri
+index 75205a24..6772d725 100644
+--- a/src/module_build.pri
++++ b/src/module_build.pri
+@@ -7,6 +7,9 @@ isEmpty(IRC_MODULE):error(IRC_MODULE must be set)
+ TEMPLATE = lib
+ TARGET = $$qtLibraryTarget($$IRC_MODULE)
+ QT = core network
++
++greaterThan(QT_MAJOR_VERSION,5): QT += core5compat
++
+ !verbose:CONFIG += silent
+ contains(QT_CONFIG, debug_and_release) {
+     win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all
+
+From c57dc67df4fef310f55ecfa55d3e6c5d8eb34826 Mon Sep 17 00:00:00 2001
+From: Kaj-Michael Lang <milang@tal.org>
+Date: Fri, 28 Apr 2023 20:12:32 +0300
+Subject: [PATCH 2/5] tests: Use core5compat if building on Qt 6
+
+---
+ tests/tests.pri | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/tests.pri b/tests/tests.pri
+index 04588b05..c3f74ad9 100644
+--- a/tests/tests.pri
++++ b/tests/tests.pri
+@@ -19,6 +19,8 @@ CONFIG(debug, debug|release) {
+     MOC_DIR = release
+ }
+ 
++greaterThan(QT_MAJOR_VERSION,5): QT += core5compat
++
+ IRC_BUILDDIR = $$OUT_PWD/../../..
+ 
+ IRC_MODULES = IrcCore IrcModel IrcUtil
+
+From b13cbca833e91a346e5e630a3a2995a49663c142 Mon Sep 17 00:00:00 2001
+From: Kaj-Michael Lang <milang@tal.org>
+Date: Fri, 28 Apr 2023 20:13:12 +0300
+Subject: [PATCH 3/5] tests: Use fromSecsSinceEpoch instead of fromTime_t that
+ has been deprecated in Qt 5, and removed in Qt 6.
+
+---
+ tests/auto/ircconnection/tst_ircconnection.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/auto/ircconnection/tst_ircconnection.cpp b/tests/auto/ircconnection/tst_ircconnection.cpp
+index 76e36a3d..7b7b78f5 100644
+--- a/tests/auto/ircconnection/tst_ircconnection.cpp
++++ b/tests/auto/ircconnection/tst_ircconnection.cpp
+@@ -1334,7 +1334,7 @@ void tst_IrcConnection::testMessageComposer()
+     QCOMPARE(filter.values.value("account").toString(), QString("qtaccountant"));
+     QEXPECT_FAIL("", "RPL_WHOISHOST :is connecting from *@88.95.51.136 88.95.51.136", Continue);
+     QCOMPARE(filter.values.value("address").toString(), QString("88.95.51.136"));
+-    QCOMPARE(filter.values.value("since").toDateTime(), QDateTime::fromTime_t(1440706032));
++    QCOMPARE(filter.values.value("since").toDateTime(), QDateTime::fromSecsSinceEpoch(1440706032));
+     QCOMPARE(filter.values.value("idle").toInt(), 15);
+     QCOMPARE(filter.values.value("secure").toBool(), true);
+     QCOMPARE(filter.values.value("channels").toStringList(), QStringList() << "+#jpnurmi");
+
+From aab157c89bdbf41e85f33823200c472c2b055a9f Mon Sep 17 00:00:00 2001
+From: Kaj-Michael Lang <milang@tal.org>
+Date: Fri, 28 Apr 2023 20:14:23 +0300
+Subject: [PATCH 4/5] examples: Use core5compat if building on Qt 6
+
+---
+ examples/bot/bot.pro | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/examples/bot/bot.pro b/examples/bot/bot.pro
+index 1f4f4346..f73c7c77 100644
+--- a/examples/bot/bot.pro
++++ b/examples/bot/bot.pro
+@@ -10,6 +10,8 @@ CONFIG += console
+ CONFIG -= app_bundle
+ QT = core network
+ 
++greaterThan(QT_MAJOR_VERSION,5): QT += core5compat
++
+ # Input
+ HEADERS += ircbot.h
+ SOURCES += ircbot.cpp main.cpp
+
+From 76fed16afa7c2e028b11820a857d6d9e8868208f Mon Sep 17 00:00:00 2001
+From: Kaj-Michael Lang <milang@tal.org>
+Date: Fri, 28 Apr 2023 20:14:47 +0300
+Subject: [PATCH 5/5] examples: setMargin() is deprected in Qt 5 and removed in
+ Qt 6, just remove it
+
+---
+ examples/client/ircclient.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/examples/client/ircclient.cpp b/examples/client/ircclient.cpp
+index 38c21a65..69e7600d 100644
+--- a/examples/client/ircclient.cpp
++++ b/examples/client/ircclient.cpp
+@@ -238,7 +238,6 @@ void IrcClient::createLayout()
+     QWidget* container = new QWidget(this);
+     QVBoxLayout* layout = new QVBoxLayout(container);
+     layout->setSpacing(0);
+-    layout->setMargin(0);
+     layout->addWidget(splitter);
+     layout->addWidget(lineEdit);
+ 

diff --git a/net-im/libcommuni/libcommuni-3.7.0-r2.ebuild b/net-im/libcommuni/libcommuni-3.7.0-r2.ebuild
new file mode 100644
index 000000000000..184cc23c3e79
--- /dev/null
+++ b/net-im/libcommuni/libcommuni-3.7.0-r2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qmake-utils
+
+DESCRIPTION="A cross-platform IRC framework written with Qt"
+HOMEPAGE="https://communi.github.io/"
+SRC_URI="https://github.com/communi/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples qml test +uchardet"
+REQUIRED_USE="examples? ( qml )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	dev-qt/qt5compat:6
+	dev-qt/qtbase:6[network]
+	examples? ( dev-qt/qtbase:6[gui,X] )
+	qml? (
+		dev-qt/qt5compat:6[qml]
+		dev-qt/qtdeclarative:6
+	)
+	uchardet? ( app-i18n/uchardet )
+	!uchardet? ( dev-libs/icu:= )
+"
+
+DEPEND="
+	${RDEPEND}
+	test? ( dev-qt/qttest:5 )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-3.7.0-qt6.patch" )
+
+src_configure() {
+	local myqmakeargs=( libcommuni.pro
+		# Disables compile run-time benchmarks, as they don't make any sense
+		-config no_benchmarks
+		# Is needed for fixing the QA Notice: The following files contain insecure RUNPATHs
+		-config no_rpath
+		# Compile libcommuni always in Release mode, as Debug seems to do nothing
+		-config release
+		# Don't silence all compile messages
+		-config verbose
+		-config $(usex examples '' 'no_')examples
+		-config $(usex qml '' 'no_')qml
+		-config $(usex test '' 'no_')tests
+		-config $(usex uchardet 'no_' '')icu
+		-config $(usex uchardet '' 'no_')uchardet )
+
+	eqmake6 "${myqmakeargs[@]}"
+}
+
+src_test() {
+	# This is a hack to delete the existing LD_LIBRARY_PATH and set a new one,
+	# otherwise a test will fail, because it uses the system installed lib instead of the new compiled lib.
+	# The test will fail, when libcommuni is emerged with USE="uchardet" and
+	# libcommuni is already installed with USE="-uchardat", or the other way around.
+	find "${S}" -type f -name 'target_wrapper.sh' -exec sed -i -e "/.*LD_LIBRARY_PATH.*/d" {} \; || die
+	local -x LD_LIBRARY_PATH="${S}/lib"
+
+	default
+}
+
+src_install() {
+	emake install INSTALL_ROOT="${D}"
+
+	if use examples; then
+		local examples=( "bot" "client" "minimal" "qmlbot" "quick" )
+		for example in ${examples[@]}; do
+			newbin examples/"${example}"/"${example}" libcommuni."${example}"
+		done
+	fi
+
+	einstalldocs
+}


             reply	other threads:[~2025-01-28 22:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28 22:23 Conrad Kostecki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-11-03 21:58 [gentoo-commits] repo/gentoo:master commit in: net-im/libcommuni/files/, net-im/libcommuni/ Michał Górny
2018-05-09 12:46 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1738103011.7880b6eec5c547dd8f772726c5b37b8ac5e9bfeb.conikost@gentoo \
    --to=conikost@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox