summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Rösner <rndxelement@protonmail.com>2022-01-05 23:12:20 +0100
committerFlorian Schmaus <flow@gentoo.org>2022-01-11 17:30:32 +0100
commit628935c96983361f7fbfa3adb1771ef06f8d821a (patch)
tree96068479a73afa27bef1e75617d26e6e7a6207bc /x11-misc/x2x
parentwww-apps/icingaweb2: 2.9.3 clean up (diff)
downloadgentoo-628935c96983361f7fbfa3adb1771ef06f8d821a.tar.gz
gentoo-628935c96983361f7fbfa3adb1771ef06f8d821a.tar.bz2
gentoo-628935c96983361f7fbfa3adb1771ef06f8d821a.zip
x11-misc/x2x: version bump to 1.30
We added an ebuild for x2x-1.30-10. It uses the current upstream source, which now resides on GitHub. Also, we removed obsolete patches and refactored the ebuild. Furthermore, I added myself as a proxied maintainer. Closes: https://bugs.gentoo.org/754132 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Philipp Roesner <rndxelement@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/23668 Signed-off-by: Florian Schmaus <flow@gentoo.org> Modified-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'x11-misc/x2x')
-rw-r--r--x11-misc/x2x/Manifest1
-rw-r--r--x11-misc/x2x/files/x2x_1.30-10-keymap.patch80
-rw-r--r--x11-misc/x2x/metadata.xml9
-rw-r--r--x11-misc/x2x/x2x-1.30.ebuild48
4 files changed, 137 insertions, 1 deletions
diff --git a/x11-misc/x2x/Manifest b/x11-misc/x2x/Manifest
index b7569af88c55..afbe097daec5 100644
--- a/x11-misc/x2x/Manifest
+++ b/x11-misc/x2x/Manifest
@@ -1,4 +1,5 @@
DIST x2x-1.27-keymap.diff.gz 1145 BLAKE2B cca78c368a9f5a27c94121eec12ab800322d1b0549c1be940b22dd455cbd42761283d1646bba8e098b94364cd6023ef6e615df9f788cf68913af967077eb6de9 SHA512 46e0d9cef4b985523e4bf2d6c550d68f488c0975a007433f2a6c03d77541ce0cbdffd44ea29472fa6db4e8b804503cdaf9e8b5f9d72c56d902270cf3291ca37f
DIST x2x-1.27.tar.gz 16776 BLAKE2B 8f78d801c1911928b0d5bb37b406bcf5285d3a54daf5067abae40125ad4e4f7fc52b8cc74f4e1c35b99350fc794f80c26120cae48e5076326746ec87d7aee0f3 SHA512 c5f8b1ec49f9871bf0d8142a047a2dff9a6ee262dfafd459044c977973dd45e297186961a8793938fc8e328f2553ec4de97e06343bdf3550f3bc3f2368b23131
+DIST x2x-1.30.tar.gz 52760 BLAKE2B fae2eeb9aa68241c3ba9e79021aa9313a5852048f23b6be8ad5de7dd090d2cd09c006f4c1b1403ccfa8057f314657c2248463a7c53187e41291742cfaa04139a SHA512 cb14b40e1511e3fe6c927443f5f411a827ebf6c313bfb46af0165eebdd534c8aa3abcc8064b89420b7f44c23c518ed4f02bab4c23bbcfaece8910a3f824c9c11
DIST x2x_1.27-8-initvars.patch.gz 494 BLAKE2B 97d48f4a2e7b65fd6755860c51399e5b6343bd0c7e6c79c7dd311792a899a02ed0ac6991d16495e96ca34913fbcec011b106bac6d0f9798540fb5704ca12f4cf SHA512 53060affef7575106932380063616473103c738193fdeab9118e0fb9ec1d1de2fe63f4112e5af82fe38198d0b42a10effde574bb9dee95c8fefdbdf680dbdf01
DIST x2x_1.27-8.diff.gz 13291 BLAKE2B 4a4a0bf34a864596cff2f0722163bfe53968e30892bd0a18ed18ca6c3ef8f5bc763b215381c46792b499839397dbecab033bd9095646fad36613ad11beba1240 SHA512 8201ab5fd0efd93adec53cec3b48f7b4de907b2db184ffa6e85a1e16739b4d0021f4562820d0b4730a0f6a2779985b5574973c2b0ceb04b241f0d7dc15060b71
diff --git a/x11-misc/x2x/files/x2x_1.30-10-keymap.patch b/x11-misc/x2x/files/x2x_1.30-10-keymap.patch
new file mode 100644
index 000000000000..f1d7f543fcf5
--- /dev/null
+++ b/x11-misc/x2x/files/x2x_1.30-10-keymap.patch
@@ -0,0 +1,80 @@
+--- a./x2x.c
++++ b./x2x.c
+@@ -321,6 +321,12 @@ typedef struct _sticky {
+ KeySym keysym;
+ } STICKY, *PSTICKY;
+
++typedef struct _keymap {
++ struct _keymap * pNext;
++ KeySym from;
++ KeySym to;
++} KEYMAP, *PKEYMAP;
++
+ typedef int (*HANDLER)(); /* event handler function */
+
+ /* These prototypes need the typedefs */
+@@ -377,6 +383,7 @@ static Bool doDpmsMouse = False;
+ static int logicalOffset= 0;
+ static int nButtons = 0;
+ static KeySym buttonmap[N_BUTTONS + 1][MAX_BUTTONMAPEVENTS + 1];
++static PKEYMAP keymaps = NULL;
+ static Bool noScale = False;
+ static int compRegLeft = 0;
+ static int compRegRight = 0;
+@@ -571,7 +578,8 @@ char **argv;
+ PSHADOW pShadow;
+ extern char *lawyerese;
+ PSTICKY pNewSticky;
+- KeySym keysym;
++ PKEYMAP pNewKeymap;
++ KeySym keysym,keysym2;
+ int button;
+ int eventno;
+ char *keyname, *argptr;
+@@ -703,6 +711,22 @@ char **argv;
+ } else {
+ printf("x2x: warning: can't translate %s\n", argv[arg]);
+ }
++ } else if (!strcasecmp(argv[arg], "-keymap")) {
++ if ((++arg+1) >= argc) Usage();
++ if (((keysym = XStringToKeysym(argv[arg])) != NoSymbol) &&
++ ((keysym2 = XStringToKeysym(argv[arg+1])) != NoSymbol)) {
++ pNewKeymap = (PKEYMAP)malloc(sizeof(KEYMAP));
++ pNewKeymap->pNext = keymaps;
++ pNewKeymap->from = keysym;
++ pNewKeymap->to = keysym2;
++ keymaps = pNewKeymap;
++#ifdef DEBUG
++ printf("will translate key %s to %s\n", argv[arg],argv[arg+1]);
++#endif
++ } else {
++ printf("x2x: warning: can't translate %s or %s\n", argv[arg],argv[arg+1]);
++ }
++ arg++;
+ } else if (!strcasecmp(argv[arg], "-buttonmap")) {
+ if (++arg >= argc) Usage();
+ button = atoi(argv[arg]);
+@@ -2200,6 +2224,7 @@ XKeyEvent *pEv;
+ PSHADOW pShadow;
+ Bool bPress;
+ PSTICKY pSticky;
++ PKEYMAP pKeymap;
+ Bool DoFakeShift = False;
+ KeyCode toShiftCode;
+
+@@ -2211,6 +2236,15 @@ XKeyEvent *pEv;
+ XKeysymToString(keysym), (bPress ? "pressed" : "released"), pEv->state);
+ #endif
+
++ for (pKeymap = keymaps; pKeymap; pKeymap = pKeymap->pNext)
++ if (keysym == pKeymap->from) {
++ keysym = pKeymap->to;
++#ifdef DEBUG
++ printf("Key mapped from %x to %x\n", pKeymap->from, pKeymap->to);
++#endif
++ }
++
++
+ /* If CapsLock is on, we need to do some funny business to make sure the */
+ /* "to" display does the right thing */
+ if(doCapsLkHack && (pEv->state & 0x2))
diff --git a/x11-misc/x2x/metadata.xml b/x11-misc/x2x/metadata.xml
index 115e9d64a669..5d2f87cc3174 100644
--- a/x11-misc/x2x/metadata.xml
+++ b/x11-misc/x2x/metadata.xml
@@ -1,5 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>rndxelement@protonmail.com</email>
+ <name>Philipp Rösner</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
</pkgmetadata>
diff --git a/x11-misc/x2x/x2x-1.30.ebuild b/x11-misc/x2x/x2x-1.30.ebuild
new file mode 100644
index 000000000000..09d330e821dd
--- /dev/null
+++ b/x11-misc/x2x/x2x-1.30.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="A utility to connect the mouse and keyboard to another X"
+HOMEPAGE="https://github.com/dottedmag/x2x"
+SRC_URI="https://github.com/dottedmag/x2x/archive/refs/tags/debian/${PV}-10.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ x11-libs/libXtst
+ x11-libs/libXext"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-text/rman
+ x11-base/xorg-proto
+ >=x11-misc/imake-1.0.8-r1"
+
+S="${WORKDIR}"/${PN}-debian-1.30-10
+
+PATCHES=(
+ # Patch to fix bug #126939
+ # AltGr does not work in x2x with different keymaps:
+ "${FILESDIR}"/${PN}_1.30-10-keymap.patch
+)
+DOCS=( README AUTHORS INSTALL ChangeLog ChangeLog.old )
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CDEBUGFLAGS="${CFLAGS}" \
+ EXTRA_LDOPTIONS="${LDFLAGS}"
+}
+
+src_install() {
+ default
+ dodoc -r docs/
+}