summaryrefslogtreecommitdiff
path: root/dev-libs/libg15
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/libg15
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/libg15')
-rw-r--r--dev-libs/libg15/Manifest7
-rw-r--r--dev-libs/libg15/files/g15tools.patch100
-rw-r--r--dev-libs/libg15/libg15-1.2.7-r1.ebuild29
-rw-r--r--dev-libs/libg15/libg15-9999.ebuild51
-rw-r--r--dev-libs/libg15/metadata.xml14
5 files changed, 201 insertions, 0 deletions
diff --git a/dev-libs/libg15/Manifest b/dev-libs/libg15/Manifest
new file mode 100644
index 000000000000..b481804676ff
--- /dev/null
+++ b/dev-libs/libg15/Manifest
@@ -0,0 +1,7 @@
+AUX g15tools.patch 2929 SHA256 5a930164cb897ed04182e31b4da28b7cfe5a1e90c05733202acae7ab1ededf63 SHA512 2cd1b1f54ea8d4cc2a322c657cce6b8252b9425df6ad031401d6187ff82472fc3fb974734cfefe80b85b3e1a3532b26a5685b5aa9ff42ca7453ec55892834e41 WHIRLPOOL 473ae5dc07c3b06fc10cf3217c9283a411b0cfd1b7e13098ad29e49c1374f002799b34a84578c71486a8becd56f202312cdc6bbe87478b299e120dbc514f387b
+DIST libg15-1.2.7.tar.bz2 232475 SHA256 132febe27e66fd9ee1cb7675ef2b0d99b5a404c28923494ff995012b847179d6 SHA512 ddffb38f5c3d9ce0cb90b0375c2f5d317a7bb3889fe59d56932a0889c6e15bc2f1e590757d3182eddf7c5bd3101303b332b18fbd37247c20f66e1be256aa93c0 WHIRLPOOL a3335bafffaefa5fb0af3e6a5f3ad25d66ef012395da5cfca204b5cb6ca7ca5559b4a1f90435eecbf3cf2c3c42304590476a5570288be01d6067cf0b01883405
+EBUILD libg15-1.2.7-r1.ebuild 567 SHA256 21f769a0c1749f9e558da2f527c6e1810d16453c37394d3f9ee422cd76ec7334 SHA512 f09233edcf9a3e5e98c0e8a75fe63dbc561568212f1203a9b2af13a52794703a73f801dcfdce64e31c5eaebf57f5e11419e51cff894f05449848d4b30539fc53 WHIRLPOOL b675df004801c39a27784babd0189bd05853eb45de26c81d2ff624563d668fe006e820469b235ba98375a8b4b943ae6e5bdd8a1a71694f554b58d97904161352
+EBUILD libg15-9999.ebuild 969 SHA256 d170bfbf87384df14f8483b86c96fe891d563690f93ea2afbed7d3ad1bf155f9 SHA512 bdfeabc76fc6b00c3f6b9afc5e6b4c886d8e986480fe371d1ede848575d585556279a25b37e0ab9cf7d63177b3d2660000604ed533ccf4b1d261d8a2ad601995 WHIRLPOOL ba3ad23f576ae0bac7f86c339deede768cceddd152925bb398a0563f35fd1b79e55c99aa087adc223698efc5659f03f1e943eeef48f16972e9f426472ba472d9
+MISC ChangeLog 2498 SHA256 15be8c1f89761606c15eb2f4121b9909caa88f8db6f57d3f207ea553582aa3e1 SHA512 0fbb00b62946ef2adab7760c0fd52802f9a994735611cb5fa5089a395395403a0519f4e6343e061cb79f09503db3e3528d4acb5579762327cb7db49065541ddf WHIRLPOOL af2ec4135b0d33e6e6d8097d5cfa7af1d3ed76844c3eb182fe87c2296f2cb0f425bd8aeccaa972953513e182da0c6b67e582ce7f9f858885da48750ad4bbc40d
+MISC ChangeLog-2015 4561 SHA256 cc456f2271ca1dcf0fb500f624c9444b290a02b007383183bd487df92903e89c SHA512 d1fcede051b7daceb5c95c5363bda5ae9ad40cd832657e4914a123558afc6a89da471cbd6d342575ef666e183d20550e576f06896eee0bdc1efe65335f5347ac WHIRLPOOL 4a71c9dcc761d88256fdcb5896efc69cfa57feab64cda7731d4ad028d141d54368332a80c183b2a9f8ebcd57b550bce1a2cc1627c0bc8c9bb81bf06ff2de7dc8
+MISC metadata.xml 408 SHA256 f15f645720f0908d277ac56f394af2d074465e160bf04bf85f2fbaa005fb8134 SHA512 e4da283d6a210afc06b392ed61be935a1a1dfa0d886c0f3e6e82bd5e78323e080e911ef7eee9ff2e6ab98ced93804ab8f48433b9f0f630d8c68a62f91a3e780d WHIRLPOOL 740c63a74eb283fd6a374f3ba2e22be805e13361414f0aa5ca3f33f1e08b4e652f178183b765f4f847973545b8363f0f115cc99b1efd4dcd04bea0e5ca269d22
diff --git a/dev-libs/libg15/files/g15tools.patch b/dev-libs/libg15/files/g15tools.patch
new file mode 100644
index 000000000000..7eb6e915e596
--- /dev/null
+++ b/dev-libs/libg15/files/g15tools.patch
@@ -0,0 +1,100 @@
+Patch from upstream bug tracker:
+https://sourceforge.net/tracker/?func=detail&aid=3336448&group_id=167869&atid=844658
+
+As only part of G510 support was merged to upstream. Does NOT apply & compile
+on top of 1.2.7-r1.
+
+diff -aNru trunk/libg15/libg15.c mod/libg15/libg15.c
+--- trunk/libg15/libg15.c 2011-03-31 23:33:44.000000000 +0000
++++ mod/libg15/libg15.c 2011-06-26 07:08:21.000000000 +0000
+@@ -1029,6 +1029,76 @@
+ }
+ }
+
++// Logitech G510 Media Keys implementation. Unknown if this will work for other
++// models. Using the backlight key as a modifier. The assumption is you would
++// normally not be holding down the backlight key while pressing G-keys.
++static void processKeyEvent2Byte(unsigned int *pressed_keys, unsigned char *buffer)
++{
++ // Key modifier
++ *pressed_keys |= G15_KEY_LIGHT;
++
++ // XF86AudioPlay
++ if (*pressed_keys & G15_KEY_G1)
++ *pressed_keys -= G15_KEY_G1;
++
++ // XF86AudioStop
++ if (*pressed_keys & G15_KEY_G2)
++ *pressed_keys -= G15_KEY_G2;
++
++ // XF86AudioPrev
++ if (*pressed_keys & G15_KEY_G3)
++ *pressed_keys -= G15_KEY_G3;
++
++ // XF86AudioNext
++ if (*pressed_keys & G15_KEY_G4)
++ *pressed_keys -= G15_KEY_G4;
++
++ // XF86AudioMute
++ if (*pressed_keys & G15_KEY_G5)
++ *pressed_keys -= G15_KEY_G5;
++
++ // XF86AudioRaiseVolume
++ if (*pressed_keys & G15_KEY_G6)
++ *pressed_keys -= G15_KEY_G6;
++
++ // XF86AudioLowerVolume
++ if (*pressed_keys & G15_KEY_G7)
++ *pressed_keys -= G15_KEY_G7;
++
++ g15_log(stderr,G15_LOG_WARN,"Keyboard: %x, %x\n", buffer[0], buffer[1]);
++
++ if (buffer[0] == 0x02)
++ {
++ // XF86AudioPlay
++ if (buffer[1] & 0x08)
++ *pressed_keys |= G15_KEY_G1;
++
++ // XF86AudioStop
++ if (buffer[1] & 0x04)
++ *pressed_keys |= G15_KEY_G2;
++
++ // XF86AudioPrev
++ if (buffer[1] & 0x02)
++ *pressed_keys |= G15_KEY_G3;
++
++ // XF86AudioNext
++ if (buffer[1] & 0x01)
++ *pressed_keys |= G15_KEY_G4;
++
++ // XF86AudioMute
++ if (buffer[1] & 0x16)
++ *pressed_keys |= G15_KEY_G5;
++
++ // XF86AudioRaiseVolume
++ if (buffer[1] & 0x32)
++ *pressed_keys |= G15_KEY_G6;
++
++ // XF86AudioLowerVolume
++ if (buffer[1] & 0x64)
++ *pressed_keys |= G15_KEY_G7;
++ }
++}
++
+ int getPressedKeys(unsigned int *pressed_keys, unsigned int timeout)
+ {
+ unsigned char buffer[G15_KEY_READ_LENGTH];
+@@ -1063,6 +1133,13 @@
+ case 9:
+ processKeyEvent9Byte(pressed_keys, buffer);
+ return G15_NO_ERROR;
++ case 2:
++ if (g15DeviceCapabilities() & G15_DEVICE_G510)
++ {
++ processKeyEvent2Byte(pressed_keys, buffer);
++ return G15_NO_ERROR;
++ }
++ // Deliberate fallthrough
+ default:
+ return handle_usb_errors("Keyboard Read", ret); /* allow the app to deal with errors */
+ }
diff --git a/dev-libs/libg15/libg15-1.2.7-r1.ebuild b/dev-libs/libg15/libg15-1.2.7-r1.ebuild
new file mode 100644
index 000000000000..9b340e408e4a
--- /dev/null
+++ b/dev-libs/libg15/libg15-1.2.7-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="The libg15 library gives low-level access to the Logitech G15 keyboard"
+HOMEPAGE="http://g15tools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/g15tools/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+
+DEPEND="=virtual/libusb-0*"
+RDEPEND=${DEPEND}
+
+DOCS=( AUTHORS README ChangeLog )
+
+src_configure() {
+ econf \
+ --disable-static
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-libs/libg15/libg15-9999.ebuild b/dev-libs/libg15/libg15-9999.ebuild
new file mode 100644
index 000000000000..174001c15b58
--- /dev/null
+++ b/dev-libs/libg15/libg15-9999.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+ESVN_PROJECT=g15tools/trunk
+ESVN_REPO_URI="https://svn.code.sf.net/p/g15tools/code/trunk/${PN}"
+
+inherit subversion base eutils autotools
+
+DESCRIPTION="The libg15 library gives low-level access to the Logitech G15 keyboard"
+HOMEPAGE="http://g15tools.sourceforge.net/"
+[[ $PV = *9999* ]] || SRC_URI="mirror://sourceforge/g15tools/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="=virtual/libusb-0*"
+RDEPEND=${DEPEND}
+
+DOCS=( AUTHORS README ChangeLog )
+
+PATCHES=( "${FILESDIR}"/g15tools.patch )
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]]; then
+ subversion_src_unpack
+ fi
+}
+
+src_prepare() {
+ if [[ ${PV} = *9999* ]]; then
+ subversion_wc_info
+ fi
+ base_src_prepare
+ if [[ ${PV} = *9999* ]]; then
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ --disable-static
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-libs/libg15/metadata.xml b/dev-libs/libg15/metadata.xml
new file mode 100644
index 000000000000..da7ba4ad6e9d
--- /dev/null
+++ b/dev-libs/libg15/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">g15tools</remote-id>
+ </upstream>
+</pkgmetadata>