From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- dev-libs/libg15/Manifest | 5 ++ dev-libs/libg15/files/g15tools.patch | 100 +++++++++++++++++++++++++++++++++ dev-libs/libg15/libg15-1.2.7-r1.ebuild | 29 ++++++++++ dev-libs/libg15/libg15-9999.ebuild | 51 +++++++++++++++++ dev-libs/libg15/metadata.xml | 14 +++++ 5 files changed, 199 insertions(+) create mode 100644 dev-libs/libg15/Manifest create mode 100644 dev-libs/libg15/files/g15tools.patch create mode 100644 dev-libs/libg15/libg15-1.2.7-r1.ebuild create mode 100644 dev-libs/libg15/libg15-9999.ebuild create mode 100644 dev-libs/libg15/metadata.xml (limited to 'dev-libs/libg15') diff --git a/dev-libs/libg15/Manifest b/dev-libs/libg15/Manifest new file mode 100644 index 000000000000..8309d0440ac7 --- /dev/null +++ b/dev-libs/libg15/Manifest @@ -0,0 +1,5 @@ +AUX g15tools.patch 2929 BLAKE2B cc88ba441a27b7cc2e256712536304f7a1d3667b04fc1e2583dea994321df8a59ad295a6cecc76cf5633a5f6994cb674e7a7f3f8eaf2c0d86dad35b3e7d0c8df SHA512 2cd1b1f54ea8d4cc2a322c657cce6b8252b9425df6ad031401d6187ff82472fc3fb974734cfefe80b85b3e1a3532b26a5685b5aa9ff42ca7453ec55892834e41 +DIST libg15-1.2.7.tar.bz2 232475 BLAKE2B 490193410f2127d4efc0bcf64909514faff2ecce57bba08e1cf53a958ab296a59bc12867bbd14ca1bf866e5f69833d99f4e3ebb7d078ece35725afe2c0dd03ab SHA512 ddffb38f5c3d9ce0cb90b0375c2f5d317a7bb3889fe59d56932a0889c6e15bc2f1e590757d3182eddf7c5bd3101303b332b18fbd37247c20f66e1be256aa93c0 +EBUILD libg15-1.2.7-r1.ebuild 577 BLAKE2B 7c691bd1a18b975f94b304fba02b5893e214a484c99e3d98cc2210fc8083590fc549ff38b2d50fa1cb49a6d3564b39a95381adb1ef89a88fbc4170cea0af9d38 SHA512 4f69993a3fe66ba8642eea1d8bb3aa9e6b1e86f579ed91c163fb1db2d8b6241ab2586d0cafbab3dc030128a170085d8eb2ce8975fee3afb55f4a4ac6cb10f343 +EBUILD libg15-9999.ebuild 979 BLAKE2B 023afc75bd44fe0e05ea3dd313e3df3b27d282f4b26ca56c682715c17c362695e5e4d7d9266bf43eae06a88d96639830ee1d7bc6ef1a1b84eddfd7856a9ed642 SHA512 8acc39a8dd1b341bb727d6958a253236880f0e240cbc57ae70285b6304ce431926400137c419289a9a2285fde6965c9a9771ac1a55c9836934d3e8afdad5759c +MISC metadata.xml 408 BLAKE2B 2165f633654f865b41938473830e3a25c373d585a453ea4a084eb4912e0abb0567366c76a9d11373b54bc0e1fd1e76d5fbdc3724a1dd05e47442e778f60fe754 SHA512 e4da283d6a210afc06b392ed61be935a1a1dfa0d886c0f3e6e82bd5e78323e080e911ef7eee9ff2e6ab98ced93804ab8f48433b9f0f630d8c68a62f91a3e780d 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..5ec490f2e523 --- /dev/null +++ b/dev-libs/libg15/libg15-1.2.7-r1.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2017 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="https://sourceforge.net/projects/g15tools/" +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..a2faa8211176 --- /dev/null +++ b/dev-libs/libg15/libg15-9999.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2017 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="https://sourceforge.net/projects/g15tools/" +[[ $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 @@ + + + + + robbat2@gentoo.org + + + polynomial-c@gentoo.org + Lars Wendler + + + g15tools + + -- cgit v1.2.3