commit:     aa095115b3d2c8b0045b024e195c1a072b5bbcdb
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue May  6 21:07:32 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue May  6 21:10:15 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa095115

gui-apps/input-leap: New package to replace x11-misc/barrier

barrier is now dead but has been forked as input-leap with a new upstream.

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 gui-apps/input-leap/Manifest                       |  2 +
 .../files/input-leap-3.0.2-gui-crash.patch         | 59 ++++++++++++++
 gui-apps/input-leap/input-leap-3.0.2-r1.ebuild     | 93 ++++++++++++++++++++++
 gui-apps/input-leap/input-leap-9999.ebuild         | 87 ++++++++++++++++++++
 gui-apps/input-leap/metadata.xml                   | 11 +++
 5 files changed, 252 insertions(+)

diff --git a/gui-apps/input-leap/Manifest b/gui-apps/input-leap/Manifest
new file mode 100644
index 000000000000..d0a806e487e5
--- /dev/null
+++ b/gui-apps/input-leap/Manifest
@@ -0,0 +1,2 @@
+DIST input-leap-3.0.2-no-x11.patch 167137 BLAKE2B 
850d4e842233a960136251ff83cbfa58cddd73f15da84d6f024ebcb08b0b7bcafc8cd3d402e5b2297f68b4ab75ff47e241e1c8d32f900babec496c7a39906bed
 SHA512 
d80fd984d26f1cd141a2635b35740a320c389dd60b651a6d4c8ef4db04778cb7c090ddd5aee2d8061cc69fe4d58b36262008bcce5cab05ce84162af699e086c7
+DIST input-leap-3.0.2.tar.gz 1764599 BLAKE2B 
0924a1869b1820710b426e68a45e1e538c15a656677d0d2459697035ff1780c12f07da05ecb3890595833ac4ad6e07c66cc68164fa8d70f259b1599d0b287c1e
 SHA512 
caadf17b64765c0732e94e6a38e17e560d050a2fa0252f26ec382f3f80af936aa9d0aa8172e29724b04223fd3b378b68b7afe7db41c336431b839331815774d9

diff --git a/gui-apps/input-leap/files/input-leap-3.0.2-gui-crash.patch 
b/gui-apps/input-leap/files/input-leap-3.0.2-gui-crash.patch
new file mode 100644
index 000000000000..ebd4bd3ec135
--- /dev/null
+++ b/gui-apps/input-leap/files/input-leap-3.0.2-gui-crash.patch
@@ -0,0 +1,59 @@
+From 0bae409d577e1efddacec5be7b0c97329eff854f Mon Sep 17 00:00:00 2001
+From: Jordan <[email protected]>
+Date: Sat, 9 Nov 2024 00:55:32 +0100
+Subject: [PATCH] fix: server config dialog show event. Fixes issue 2067 on
+ github. Was initially suggested by sithlord48.
+
+---
+ .../arch_bug_when_configuring_server.bugfix         |  1 +
+ src/gui/src/ServerConfigDialog.cpp                  | 13 -------------
+ src/gui/src/ServerConfigDialog.h                    |  1 -
+ 3 files changed, 1 insertion(+), 14 deletions(-)
+ create mode 100644 doc/newsfragments/arch_bug_when_configuring_server.bugfix
+
+diff --git a/doc/newsfragments/arch_bug_when_configuring_server.bugfix 
b/doc/newsfragments/arch_bug_when_configuring_server.bugfix
+new file mode 100644
+index 00000000..65060e11
+--- /dev/null
++++ b/doc/newsfragments/arch_bug_when_configuring_server.bugfix
+@@ -0,0 +1 @@
++Fixed a segmentation fault that would occur when configuring servers on 
certain platforms. This solution was proposed by sithlord48 and they used it to 
fix the issue for deskflow.
+diff --git a/src/gui/src/ServerConfigDialog.cpp 
b/src/gui/src/ServerConfigDialog.cpp
+index ec81702d..5783e435 100644
+--- a/src/gui/src/ServerConfigDialog.cpp
++++ b/src/gui/src/ServerConfigDialog.cpp
+@@ -74,19 +74,6 @@ ServerConfigDialog::ServerConfigDialog(QWidget* parent, 
ServerConfig& config, co
+         model().screen(serverConfig().numColumns() / 2, 
serverConfig().numRows() / 2) = Screen(defaultScreenName);
+ }
+ 
+-void ServerConfigDialog::showEvent(QShowEvent* event)
+-{
+-    (void) event;
+-
+-    QDialog::show();
+-
+-    if (!m_Message.isEmpty())
+-    {
+-        // TODO: ideally this message box should pop up after the dialog is 
shown
+-        QMessageBox::information(this, tr("Configure server"), m_Message);
+-    }
+-}
+-
+ void ServerConfigDialog::accept()
+ {
+     serverConfig().haveHeartbeat(ui_->m_pCheckBoxHeartbeat->isChecked());
+diff --git a/src/gui/src/ServerConfigDialog.h 
b/src/gui/src/ServerConfigDialog.h
+index 6b306f6e..aacf2ef5 100644
+--- a/src/gui/src/ServerConfigDialog.h
++++ b/src/gui/src/ServerConfigDialog.h
+@@ -39,7 +39,6 @@ class ServerConfigDialog : public QDialog
+ 
+     public slots:
+         void accept() override;
+-        void showEvent(QShowEvent* event) override;
+         void message(const QString& message) { m_Message = message; }
+ 
+     protected slots:
+-- 
+2.49.0
+

diff --git a/gui-apps/input-leap/input-leap-3.0.2-r1.ebuild 
b/gui-apps/input-leap/input-leap-3.0.2-r1.ebuild
new file mode 100644
index 000000000000..67f5037f8e04
--- /dev/null
+++ b/gui-apps/input-leap/input-leap-3.0.2-r1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VIRTUALX_REQUIRED="manual"
+inherit cmake virtualx xdg
+
+if [[ ${PV} == *9999* ]]; then
+       EGIT_REPO_URI="https://github.com/input-leap/input-leap.git";
+       inherit git-r3
+else
+       
SRC_URI="https://github.com/input-leap/input-leap/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz
+               https://dev.gentoo.org/~chewi/distfiles/${P}-no-x11.patch";
+       KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Share a mouse and keyboard between computers (fork of Barrier)"
+HOMEPAGE="https://github.com/input-leap/input-leap";
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="gui test +wayland +X"
+REQUIRED_USE="|| ( wayland X )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       dev-libs/openssl:0=
+       gui? (
+               dev-qt/qtbase:6[gui,network,widgets]
+               net-dns/avahi[mdnsresponder-compat]
+       )
+       wayland? (
+               dev-libs/glib:2
+               dev-libs/libei
+               dev-libs/libportal:=
+               x11-libs/libxkbcommon
+       )
+       X? (
+               x11-libs/libICE
+               x11-libs/libSM
+               x11-libs/libX11
+               x11-libs/libXext
+               x11-libs/libXi
+               x11-libs/libXinerama
+               x11-libs/libXrandr
+               x11-libs/libXtst
+       )
+"
+DEPEND="
+       ${RDEPEND}
+       x11-base/xorg-proto
+       test? ( dev-cpp/gtest )
+"
+BDEPEND="
+       virtual/pkgconfig
+       gui? ( dev-qt/qttools:6[linguist] )
+       test? ( X? ( ${VIRTUALX_DEPEND} ) )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-gui-crash.patch
+       "${DISTDIR}"/${P}-no-x11.patch
+)
+
+DOCS=(
+       ChangeLog
+       README.md
+       doc/${PN}.conf.example{,-advanced,-basic}
+)
+
+src_configure() {
+       local REV="${EGIT_VERSION:-00000000}"
+       local mycmakeargs=(
+               -DINPUTLEAP_BUILD_GUI=$(usex gui)
+               -DINPUTLEAP_BUILD_LIBEI=$(usex wayland)
+               -DINPUTLEAP_BUILD_TESTS=$(usex test)
+               -DINPUTLEAP_BUILD_X11=$(usex X)
+               -DINPUTLEAP_REVISION="${REV:0:8}"
+               -DINPUTLEAP_USE_EXTERNAL_GTEST=ON
+       )
+       cmake_src_configure
+}
+
+src_test() {
+       "${BUILD_DIR}"/bin/unittests || die
+
+       if use X; then
+               virtx "${BUILD_DIR}"/bin/integtests
+       else
+               "${BUILD_DIR}"/bin/integtests || die
+       fi
+}

diff --git a/gui-apps/input-leap/input-leap-9999.ebuild 
b/gui-apps/input-leap/input-leap-9999.ebuild
new file mode 100644
index 000000000000..1dc699561578
--- /dev/null
+++ b/gui-apps/input-leap/input-leap-9999.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VIRTUALX_REQUIRED="manual"
+inherit cmake virtualx xdg
+
+if [[ ${PV} == *9999* ]]; then
+       EGIT_REPO_URI="https://github.com/input-leap/input-leap.git";
+       inherit git-r3
+else
+       
SRC_URI="https://github.com/input-leap/input-leap/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz"
+       KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Share a mouse and keyboard between computers (fork of Barrier)"
+HOMEPAGE="https://github.com/input-leap/input-leap";
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="gui test +wayland +X"
+REQUIRED_USE="|| ( wayland X )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       dev-libs/openssl:0=
+       gui? (
+               dev-qt/qtbase:6[gui,network,widgets]
+               net-dns/avahi[mdnsresponder-compat]
+       )
+       wayland? (
+               dev-libs/glib:2
+               dev-libs/libei
+               dev-libs/libportal:=
+               x11-libs/libxkbcommon
+       )
+       X? (
+               x11-libs/libICE
+               x11-libs/libSM
+               x11-libs/libX11
+               x11-libs/libXext
+               x11-libs/libXi
+               x11-libs/libXinerama
+               x11-libs/libXrandr
+               x11-libs/libXtst
+       )
+"
+DEPEND="
+       ${RDEPEND}
+       x11-base/xorg-proto
+       test? ( dev-cpp/gtest )
+"
+BDEPEND="
+       virtual/pkgconfig
+       gui? ( dev-qt/qttools:6[linguist] )
+       test? ( X? ( ${VIRTUALX_DEPEND} ) )
+"
+
+DOCS=(
+       ChangeLog
+       README.md
+       doc/${PN}.conf.example{,-advanced,-basic}
+)
+
+src_configure() {
+       local REV="${EGIT_VERSION:-00000000}"
+       local mycmakeargs=(
+               -DINPUTLEAP_BUILD_GUI=$(usex gui)
+               -DINPUTLEAP_BUILD_LIBEI=$(usex wayland)
+               -DINPUTLEAP_BUILD_TESTS=$(usex test)
+               -DINPUTLEAP_BUILD_X11=$(usex X)
+               -DINPUTLEAP_REVISION="${REV:0:8}"
+               -DINPUTLEAP_USE_EXTERNAL_GTEST=ON
+       )
+       cmake_src_configure
+}
+
+src_test() {
+       "${BUILD_DIR}"/bin/unittests || die
+
+       if use X; then
+               virtx "${BUILD_DIR}"/bin/integtests
+       else
+               "${BUILD_DIR}"/bin/integtests || die
+       fi
+}

diff --git a/gui-apps/input-leap/metadata.xml b/gui-apps/input-leap/metadata.xml
new file mode 100644
index 000000000000..4c5e40ce6067
--- /dev/null
+++ b/gui-apps/input-leap/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>James Le Cuirot</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">input-leap/input-leap</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to