* [gentoo-commits] repo/gentoo:master commit in: app-misc/g810-led/files/, app-misc/g810-led/
@ 2018-09-13 8:05 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2018-09-13 8:05 UTC (permalink / raw
To: gentoo-commits
commit: 616f99209237a7470bdacee6e24120130dfb5ae7
Author: Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Tue Aug 7 02:17:49 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Sep 13 08:00:14 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=616f9920
app-misc/g810-led: New Package
Based on ::zyrenth
Closes: https://bugs.gentoo.org/662494
Closes: https://github.com/gentoo/gentoo/pull/9476
app-misc/g810-led/Manifest | 1 +
...0-led-0.2.7-Have_makefile_use_environment.patch | 63 ++++++++++++++++++++++
app-misc/g810-led/g810-led-0.2.7.ebuild | 52 ++++++++++++++++++
app-misc/g810-led/metadata.xml | 18 +++++++
4 files changed, 134 insertions(+)
diff --git a/app-misc/g810-led/Manifest b/app-misc/g810-led/Manifest
new file mode 100644
index 00000000000..44d9060a363
--- /dev/null
+++ b/app-misc/g810-led/Manifest
@@ -0,0 +1 @@
+DIST g810-led-0.2.7.tar.gz 33127 BLAKE2B 1ffa28f4e21273afa805ff2ddfeae00cf4b25382f7da617016651283331d7d17faee1e6f68d00ab988c30ba1a7d4b252cf28c021999871a7fbe54c47ae3ccb23 SHA512 f67d44f1c51a29cbdfe9bb5e28f3dea5e9b08aa5e2a08cf875578d6b74e8e77f880378c825efcc3068b400131295e1fd196454b8b10143c4f5d5f77be760512a
diff --git a/app-misc/g810-led/files/g810-led-0.2.7-Have_makefile_use_environment.patch b/app-misc/g810-led/files/g810-led-0.2.7-Have_makefile_use_environment.patch
new file mode 100644
index 00000000000..249462bbcf0
--- /dev/null
+++ b/app-misc/g810-led/files/g810-led-0.2.7-Have_makefile_use_environment.patch
@@ -0,0 +1,63 @@
+diff --git a/makefile b/makefile
+index 019636d..707517d 100644
+--- a/makefile
++++ b/makefile
+@@ -1,18 +1,18 @@
+-CC=g++
+-CFLAGS=-Wall -O2 -std=gnu++11
++CXX?=g++
++CXXFLAGS?=-Wall -O2
+ LIB?=hidapi
+ ifeq ($(LIB),libusb)
+ CPPFLAGS=-Dlibusb
+- LDFLAGS=-lusb-1.0
++ LIBS=-lusb-1.0
+ else
+ CPPFLAGS=-Dhidapi
+- LDFLAGS=-lhidapi-hidraw
++ LIBS=-lhidapi-hidraw
+ endif
+ SYSTEMDDIR?=/usr/lib/systemd
+
+-prefix?=$(DESTDIR)/usr
+-libdir?=$(prefix)/lib
+-includedir?=$(prefix)/include
++PREFIX?=$(DESTDIR)/usr
++libdir?=$(PREFIX)/lib
++includedir?=$(PREFIX)/include
+
+ # Program & versioning information
+ PROGN=g810-led
+@@ -20,7 +20,7 @@ MAJOR=0
+ MINOR=2
+ MICRO=7
+
+-CFLAGS+=-DVERSION=\"$(MAJOR).$(MINOR).$(MICRO)\"
++CXXFLAGS+=-std=gnu++11 -DVERSION=\"$(MAJOR).$(MINOR).$(MICRO)\"
+ APPSRCS=src/main.cpp src/helpers/*.cpp src/helpers/*.h
+ LIBSRCS=src/classes/*.cpp src/classes/*.h
+
+@@ -32,19 +32,19 @@ bin: bin/$(PROGN)
+
+ bin/$(PROGN): $(APPSRCS) $(LIBSRCS)
+ @mkdir -p bin
+- $(CC) $(CPPFLAGS) $(CFLAGS) $^ -o $@ $(LDFLAGS)
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
+
+-debug: CFLAGS += -g -Wextra -pedantic
++debug: CXXFLAGS += -g -Wextra -pedantic
+ debug: bin/$(PROGN)
+
+ lib/lib$(PROGN).so: $(LIBSRCS)
+ @mkdir -p lib
+- $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -shared -Wl,-soname,lib$(PROGN).so -o lib/lib$(PROGN).so.$(MAJOR).$(MINOR).$(MICRO) $^ $(LDFLAGS)
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-soname,lib$(PROGN).so -o lib/lib$(PROGN).so.$(MAJOR).$(MINOR).$(MICRO) $^ $(LIBS)
+ @ln -sf lib$(PROGN).so.$(MAJOR).$(MINOR).$(MICRO) lib/lib$(PROGN).so
+
+ bin-linked: lib/lib$(PROGN).so
+ @mkdir -p bin
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(APPSRCS) -o bin/$(PROGN) $(LDFLAGS) -L./lib -l$(PROGN)
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(APPSRCS) -o bin/$(PROGN) $(LIBS) -L./lib -l$(PROGN)
+
+ lib: lib/lib$(PROGN).so
+
diff --git a/app-misc/g810-led/g810-led-0.2.7.ebuild b/app-misc/g810-led/g810-led-0.2.7.ebuild
new file mode 100644
index 00000000000..9251fa585b8
--- /dev/null
+++ b/app-misc/g810-led/g810-led-0.2.7.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd udev eutils
+
+DESCRIPTION="Led controller for Logitech G- 213, 410, 413, 610, 810, 910 and PRO Keyboards"
+HOMEPAGE="https://github.com/MatMoul/g810-led"
+SRC_URI="https://github.com/MatMoul/g810-led/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+hidapi"
+
+RDEPEND="
+ hidapi? ( dev-libs/hidapi:= )
+ !hidapi? ( virtual/libusb:= )
+"
+
+DEPEND="${RDEPEND}"
+
+DOCS=("README.md" "sample_profiles")
+
+src_prepare() {
+ eapply "${FILESDIR}/g810-led-0.2.7-Have_makefile_use_environment.patch"
+ default
+}
+
+src_compile() {
+ emake LIB="$(usex hidapi hidapi libusb)"
+}
+
+src_install() {
+ dolib.so "lib/libg810-led.so.${PV}"
+ dosym "libg810-led.so.${PV}" "/usr/$(get_libdir)/libg810-led.so"
+
+ dobin bin/g810-led
+ local boards=(213 410 413 610 910 pro)
+ local x
+ for x in "${boards[@]}"; do
+ dosym g810-led "/usr/bin/g${x}-led"
+ done
+
+ systemd_dounit systemd/g810-led.service
+ systemd_dounit systemd/g810-led-reboot.service
+
+ udev_newrules udev/g810-led.rules 60-g810-led.rules
+
+ einstalldocs
+}
diff --git a/app-misc/g810-led/metadata.xml b/app-misc/g810-led/metadata.xml
new file mode 100644
index 00000000000..d8e24b32305
--- /dev/null
+++ b/app-misc/g810-led/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>contact@hacktivis.me</email>
+ <name>Haelwenn (lanodan) Monnier</name>
+</maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+</maintainer>
+<use>
+ <flag name="hidapi">Use <pkg>dev-libs/hidapi</pkg> instead of <pkg>virtual/libusb</pkg> for talking to the device (advertised to be faster)</flag>
+</use>
+<upstream>
+ <remote-id type="github">MatMoul/g810-led</remote-id>
+</upstream>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/g810-led/files/, app-misc/g810-led/
@ 2023-04-18 13:28 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-04-18 13:28 UTC (permalink / raw
To: gentoo-commits
commit: 1de89049f3dda69b47abc6a1aaee46dfbc2c5028
Author: Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Tue Apr 18 12:56:29 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 18 13:28:02 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1de89049
app-misc/g810-led: Fix for GCC 13
Closes: https://bugs.gentoo.org/895426
Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me>
Closes: https://github.com/gentoo/gentoo/pull/30640
Signed-off-by: Sam James <sam <AT> gentoo.org>
app-misc/g810-led/files/g810-led-0.4.2_gcc13.patch | 21 +++++++++++++++++++++
app-misc/g810-led/g810-led-0.4.2.ebuild | 6 +++++-
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/app-misc/g810-led/files/g810-led-0.4.2_gcc13.patch b/app-misc/g810-led/files/g810-led-0.4.2_gcc13.patch
new file mode 100644
index 000000000000..041f000aef1f
--- /dev/null
+++ b/app-misc/g810-led/files/g810-led-0.4.2_gcc13.patch
@@ -0,0 +1,21 @@
+From 0ca17e2ba8c8f01e51a360903a2009186ff78a1c Mon Sep 17 00:00:00 2001
+From: Olav Reinert <seroton10@gmail.com>
+Date: Sun, 26 Mar 2023 13:48:10 +0200
+Subject: [PATCH] fix: compilation error with GCC 13
+
+---
+ src/helpers/help.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/helpers/help.h b/src/helpers/help.h
+index 1d176f0..b7d02fd 100644
+--- a/src/helpers/help.h
++++ b/src/helpers/help.h
+@@ -18,6 +18,7 @@
+ #define HELP_HELPER
+
+ #include <iostream>
++#include <cstdint>
+
+ namespace help {
+
diff --git a/app-misc/g810-led/g810-led-0.4.2.ebuild b/app-misc/g810-led/g810-led-0.4.2.ebuild
index 5b912b7836b9..b99c5dd3daea 100644
--- a/app-misc/g810-led/g810-led-0.4.2.ebuild
+++ b/app-misc/g810-led/g810-led-0.4.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2018-2021 Gentoo Authors
+# Copyright 2018-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -22,6 +22,10 @@ DEPEND="${RDEPEND}"
DOCS=("README.md" "sample_profiles" "sample_effects")
+# Fix for GCC 13; Bug #895426
+# See https://github.com/MatMoul/g810-led/pull/302
+PATCHES=( "${FILESDIR}/g810-led-0.4.2_gcc13.patch" )
+
src_prepare() {
default
# See
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-18 13:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-18 13:28 [gentoo-commits] repo/gentoo:master commit in: app-misc/g810-led/files/, app-misc/g810-led/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2018-09-13 8:05 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox