summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-10-12 20:01:55 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2012-10-12 20:01:55 +0000
commitc8d2c8e155c57327c128e8a4f5865e911913fd31 (patch)
tree26bed0fa5dc916b412a261efdb9c3ab5f68c56eb /dev-libs/libg15
parentAdd missing Manifest entry for lodgeitrc. (diff)
downloadhistorical-c8d2c8e155c57327c128e8a4f5865e911913fd31.tar.gz
historical-c8d2c8e155c57327c128e8a4f5865e911913fd31.tar.bz2
historical-c8d2c8e155c57327c128e8a4f5865e911913fd31.zip
Real working G510 support now, so my keyboard works. See also the libg15render and g15daemon bumps.
Package-Manager: portage-2.2.0_alpha121/cvs/Linux x86_64
Diffstat (limited to 'dev-libs/libg15')
-rw-r--r--dev-libs/libg15/ChangeLog7
-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.ebuild4
-rw-r--r--dev-libs/libg15/libg15-9999.ebuild8
5 files changed, 117 insertions, 9 deletions
diff --git a/dev-libs/libg15/ChangeLog b/dev-libs/libg15/ChangeLog
index 976735b761fe..88009bb97d0c 100644
--- a/dev-libs/libg15/ChangeLog
+++ b/dev-libs/libg15/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-libs/libg15
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libg15/ChangeLog,v 1.28 2012/10/08 01:53:12 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libg15/ChangeLog,v 1.29 2012/10/12 20:01:55 robbat2 Exp $
+
+ 12 Oct 2012; Robin H. Johnson <robbat2@gentoo.org> +files/g15tools.patch,
+ libg15-1.2.7-r1.ebuild, libg15-9999.ebuild:
+ Real working G510 support now, so my keyboard works. See also the libg15render
+ and g15daemon bumps.
*libg15-9999 (08 Oct 2012)
diff --git a/dev-libs/libg15/Manifest b/dev-libs/libg15/Manifest
index 4ef51afd19cf..2447248862c1 100644
--- a/dev-libs/libg15/Manifest
+++ b/dev-libs/libg15/Manifest
@@ -1,5 +1,6 @@
+AUX g15tools.patch 2928 SHA256 1ef90b144419f0d93c087fa154054c990f522e916a0409d0b3edb3a412422153 SHA512 63cf1c4ef8df47bdc19b4c4c1c40e3053e8c50d8bac25ec4bfa4a92c51b9f4ccda3dc7ac784885545727d99d4094d02295927eee5533f57615390a39dde3df07 WHIRLPOOL a8f507e6d39200ec2b92e1e01f467759caa9cec42d9525c40759c7fed5ffba724b3d5d6aa7bdbd137263aa9fe82602a3ad4f46456d174709267f4bce2ef1019b
DIST libg15-1.2.7.tar.bz2 232475 SHA256 132febe27e66fd9ee1cb7675ef2b0d99b5a404c28923494ff995012b847179d6 SHA512 ddffb38f5c3d9ce0cb90b0375c2f5d317a7bb3889fe59d56932a0889c6e15bc2f1e590757d3182eddf7c5bd3101303b332b18fbd37247c20f66e1be256aa93c0 WHIRLPOOL a3335bafffaefa5fb0af3e6a5f3ad25d66ef012395da5cfca204b5cb6ca7ca5559b4a1f90435eecbf3cf2c3c42304590476a5570288be01d6067cf0b01883405
-EBUILD libg15-1.2.7-r1.ebuild 683 SHA256 2d04bb86bd2455478e7127eaf98e2b1e8eb792867ec25e78c24474cef4c5a724 SHA512 56663d2e5e357e1e35899d86f9289aa57e5898a0ffc69c91c2ddb2124d39d0fa580d9e3cab1b92a57f6f0faf44e1d7694b1b4133067823fc74c50350b0b6bd6c WHIRLPOOL 42add9088f6a0de8beee0714e0c3337cbbb9eac2be033a6cd1f46ef4194cb0d7a599e5bee7239b98939809785f8ac3f9a9fbfc184ccfe988a04b42ff49c84852
-EBUILD libg15-9999.ebuild 1011 SHA256 a52757ea831b18856540839c4c5cb48e7d8aec9dbf47c1fcef0a3ee6697cd1e6 SHA512 844370d0867db9f2a978fe3faba663fe0b450f6f0673a1717b8e77bd0923e73779928fae8ae5d0c2e33312b2b7815ca7fcde3e3f3e53ebe555551c3634cf0ef6 WHIRLPOOL b63bc1016dbca2d008d9fb7d3a12da3edc9f861b26fd8f3037c3acbd545595fdd35514facb3c26aefe1fe2128cb821e86e23bf376f752117cb4c5411e32da6f2
-MISC ChangeLog 4032 SHA256 410d8616490baf00e0d33422f655b32be1c76898efd8bc660a5966e30eb22f2a SHA512 296201c7c9c82fb4c6f3b8387219647db47ff6a7d4b5cfd51c076f1ab32201dc4eba2db40a6fefd6e0fc6261e15517a2c472f9ea6ed608090e325ed16f023c93 WHIRLPOOL ac8af6f565b1a71bd5094f6d7ed7175a1c89f85120c6fe21d471bba149b35d067668840e9799cb8c97d527556fce627a6b388adc1b54fdeb0591193ae79546f8
+EBUILD libg15-1.2.7-r1.ebuild 681 SHA256 e544824b0b0524419d65fae65b7fc59d15c42303c3fda45c3a85f1a5d9178219 SHA512 b9859b348364441723f6fab298e6a4e855fad44ecbabd2a0144b9e13a06c240d297c95700cfa03863914d9b70421cef09584b63844f56940b7c69619b6e062ce WHIRLPOOL 680e9c5763f753b18454e25024e40e8cf218e07eb41e4bbf0877f1db7972b264215cfa1269b6fce9d684946caa10e45df106c2e44e52ed162c1bb91a6a958dd2
+EBUILD libg15-9999.ebuild 1094 SHA256 eb134d86b24d709a998338e3bd1fa36a9fe993dad4bd54950eb8c0021c5cac05 SHA512 b747f3fdf942889fadfc572ea788a7dfbaab850bcb8487f8bfc2824b548e0862cda8bdb00a3e5092de9c100cf8b8d2167461c7c7351f784008ab53d0a369b346 WHIRLPOOL 2d47e8ca007ece0de855e25e2df4d66aec7289fcae9fea3e13c1b6d0040ee2d21101680d6daf84092eaadf7d7a3728ec59e11357e7c9e3ca5d8d61086463f22f
+MISC ChangeLog 4259 SHA256 a8f78e0532f685033b1e2e9d83238fb8d6071816d8e8ed94ad0a5b69435f3ea8 SHA512 e0c8503bf641cfa409c4b603c132f89ea16a47b53e17693e25a1bf55a08f0d4a4d4a2b3e8055ddf7282f10a8845532d5e28c72e26a663f4986c4671409be340d WHIRLPOOL d2ab9200dd1e9afaf0f997e3f0657543b690d9981b58d95c39aa781c3903ed1626165f5dc2d3e97df88f9a5d50d3d05c5b4eec9f71e36f8b2401438955d9bc4c
MISC metadata.xml 222 SHA256 edd5f0f934fb8e9338e5a0ce8caaae6f6232dfb8cb4e0c0cfbac0363eb42b7c9 SHA512 15c47f038dfd87f28b1638cb2b8741434e1e22ba125314cca1d691e582f83e03d082959ebfbee59d53c2270a9301c749a38484d20032d5b45c0b57a8ac2cb332 WHIRLPOOL 14cf2020516c983921b1a7b2e689eb8ea2fcf2129ecd3cfac53969f8c67755c1c914b88d2cd3cfba2ffa55060c9f58918dc8a58d5f23c0d5695968be98f322a9
diff --git a/dev-libs/libg15/files/g15tools.patch b/dev-libs/libg15/files/g15tools.patch
new file mode 100644
index 000000000000..960d3fea29d5
--- /dev/null
+++ b/dev-libs/libg15/files/g15tools.patch
@@ -0,0 +1,100 @@
+Patch from upstream bug tracker:
+http://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
index efa5ef73412d..2b94f0209372 100644
--- a/dev-libs/libg15/libg15-1.2.7-r1.ebuild
+++ b/dev-libs/libg15/libg15-1.2.7-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libg15/libg15-1.2.7-r1.ebuild,v 1.1 2011/09/09 16:55:47 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libg15/libg15-1.2.7-r1.ebuild,v 1.2 2012/10/12 20:01:54 robbat2 Exp $
EAPI=4
diff --git a/dev-libs/libg15/libg15-9999.ebuild b/dev-libs/libg15/libg15-9999.ebuild
index f44a944549da..c7c659849204 100644
--- a/dev-libs/libg15/libg15-9999.ebuild
+++ b/dev-libs/libg15/libg15-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libg15/libg15-9999.ebuild,v 1.1 2012/10/08 01:53:12 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libg15/libg15-9999.ebuild,v 1.2 2012/10/12 20:01:54 robbat2 Exp $
EAPI=4
ESVN_PROJECT=g15tools/trunk
@@ -10,11 +10,11 @@ inherit subversion base eutils autotools
DESCRIPTION="The libg15 library gives low-level access to the Logitech G15 keyboard"
HOMEPAGE="http://g15tools.sourceforge.net/"
-SRC_URI=""
+[[ $PV = *9999* ]] || SRC_URI="mirror://sourceforge/g15tools/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+KEYWORDS=""
IUSE=""
DEPEND="=virtual/libusb-0*"
@@ -22,6 +22,8 @@ RDEPEND=${DEPEND}
DOCS=( AUTHORS README ChangeLog )
+PATCHES=( "${FILESDIR}"/g15tools.patch )
+
src_unpack() {
if [[ ${PV} = *9999* ]]; then
subversion_src_unpack