* [gentoo-commits] repo/gentoo:master commit in: app-laptop/msi-keyboard/files/, app-laptop/msi-keyboard/
@ 2019-08-20 12:41 Joonas Niilola
0 siblings, 0 replies; 2+ messages in thread
From: Joonas Niilola @ 2019-08-20 12:41 UTC (permalink / raw
To: gentoo-commits
commit: 1f3c291a1d794868c714acf741974563d9ff8791
Author: fulgurance <zohran.londais <AT> gmail <DOT> com>
AuthorDate: Fri May 3 15:10:59 2019 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Aug 20 12:41:31 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f3c291a
app-laptop/msi-keyboard: New package
Control backlight of MSI laptop keyboards
Package-Manager: Portage 2.3.72, Repoman 2.3.17
Signed-off-by: Zohran Londais <zohran.londais <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11884
Closes: https://github.com/gentoo/gentoo/pull/10476
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
app-laptop/msi-keyboard/Manifest | 1 +
.../files/msi-keyboard-1.0-makefile.patch | 20 +++++++++++++++++
app-laptop/msi-keyboard/metadata.xml | 11 +++++++++
app-laptop/msi-keyboard/msi-keyboard-1.0.ebuild | 26 ++++++++++++++++++++++
4 files changed, 58 insertions(+)
diff --git a/app-laptop/msi-keyboard/Manifest b/app-laptop/msi-keyboard/Manifest
new file mode 100644
index 00000000000..8931d70a696
--- /dev/null
+++ b/app-laptop/msi-keyboard/Manifest
@@ -0,0 +1 @@
+DIST msi-keyboard-1.0.tar.gz 15182 BLAKE2B 4c084e1522da926e541b18d0e59044aeb83873516b3ec5b5bd980883b923acee21842c3612910d84008f66556b6c9e2f9d0c7e588f6aecf242a0e54d72e9c3a3 SHA512 542f74b8eb77db4ef0b26fc5c671bc7446d37b88e13855927d5cdd68c688f933e46b5a377d0f5ec496c1e35694789ae82694d31fc70f04d5059fe60f2ea9d24a
diff --git a/app-laptop/msi-keyboard/files/msi-keyboard-1.0-makefile.patch b/app-laptop/msi-keyboard/files/msi-keyboard-1.0-makefile.patch
new file mode 100644
index 00000000000..08cdaa79e23
--- /dev/null
+++ b/app-laptop/msi-keyboard/files/msi-keyboard-1.0-makefile.patch
@@ -0,0 +1,20 @@
+--- a/Makefile 2019-08-19 22:40:43.258528097 +0200
++++ b/Makefile 2019-08-19 23:00:30.786462412 +0200
+@@ -1,6 +1,4 @@
+ CC=g++
+-CFLAGS=-c -Wall
+-LDFLAGS=-lhidapi-libusb
+ SOURCES=main.cpp Keyboard.cpp Color.cpp
+ OBJECTS=$(SOURCES:.cpp=.o)
+ EXECUTABLE=msi-keyboard
+@@ -11,8 +9,7 @@
+ rm $(OBJECTS) $(EXECUTABLE)
+
+ $(EXECUTABLE): $(OBJECTS)
+- $(CC) $(LDFLAGS) $(OBJECTS) -o $@
++ $(CC) $(CFLAGS) -lhidapi-libusb $(LDFLAGS) $(OBJECTS) -o $@
+
+ .cpp.o:
+- $(CC) $(CFLAGS) $< -o $@
+-
++ $(CC) $(CFLAGS) -c $< -o $@
diff --git a/app-laptop/msi-keyboard/metadata.xml b/app-laptop/msi-keyboard/metadata.xml
new file mode 100644
index 00000000000..5c41b33f0a4
--- /dev/null
+++ b/app-laptop/msi-keyboard/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zohran.londais@gmail.com</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-laptop/msi-keyboard/msi-keyboard-1.0.ebuild b/app-laptop/msi-keyboard/msi-keyboard-1.0.ebuild
new file mode 100644
index 00000000000..7e074cc86a8
--- /dev/null
+++ b/app-laptop/msi-keyboard/msi-keyboard-1.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit udev
+
+DESCRIPTION="Control backlight of MSI laptop keyboards"
+HOMEPAGE="https://github.com/makkarpov/msi-keyboard"
+SRC_URI="https://github.com/makkarpov/msi-keyboard/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="dev-libs/hidapi"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-makefile.patch
+)
+
+src_install() {
+ udev_dorules 99-msi-keyboard.rules
+ udev_reload
+ dobin msi-keyboard
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-laptop/msi-keyboard/files/, app-laptop/msi-keyboard/
@ 2022-06-10 3:50 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-06-10 3:50 UTC (permalink / raw
To: gentoo-commits
commit: bbaeaf9218b0bc5665b657155625e677e512161a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 10 03:50:36 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 10 03:50:36 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbaeaf92
app-laptop/msi-keyboard: fix build with GCC 12; respect CXX
Closes: https://bugs.gentoo.org/840329
Closes: https://bugs.gentoo.org/722324
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/msi-keyboard-1.0-gcc12.patch | 9 +++++
.../files/msi-keyboard-1.0-r1-makefile.patch | 24 +++++++++++++
app-laptop/msi-keyboard/msi-keyboard-1.0-r1.ebuild | 39 ++++++++++++++++++++++
3 files changed, 72 insertions(+)
diff --git a/app-laptop/msi-keyboard/files/msi-keyboard-1.0-gcc12.patch b/app-laptop/msi-keyboard/files/msi-keyboard-1.0-gcc12.patch
new file mode 100644
index 000000000000..a1d9e3f1151c
--- /dev/null
+++ b/app-laptop/msi-keyboard/files/msi-keyboard-1.0-gcc12.patch
@@ -0,0 +1,9 @@
+https://bugs.gentoo.org/840329
+--- a/main.cpp
++++ b/main.cpp
+@@ -1,4 +1,5 @@
+ #include "Keyboard.h"
++#include <cstring>
+ #include <regex>
+ #include <iostream>
+
diff --git a/app-laptop/msi-keyboard/files/msi-keyboard-1.0-r1-makefile.patch b/app-laptop/msi-keyboard/files/msi-keyboard-1.0-r1-makefile.patch
new file mode 100644
index 000000000000..7588494501e9
--- /dev/null
+++ b/app-laptop/msi-keyboard/files/msi-keyboard-1.0-r1-makefile.patch
@@ -0,0 +1,24 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,7 @@
+-CC=g++
+-CFLAGS=-c -Wall
+-LDFLAGS=-lhidapi-libusb
++CXX?=g++
++COMMON_FLAGS=-Wall
++CXXFLAGS+=$(COMMON_FLAGS)
++LIBS=-lhidapi-libusb
+ SOURCES=main.cpp Keyboard.cpp Color.cpp
+ OBJECTS=$(SOURCES:.cpp=.o)
+ EXECUTABLE=msi-keyboard
+@@ -11,8 +12,8 @@ clean:
+ rm $(OBJECTS) $(EXECUTABLE)
+
+ $(EXECUTABLE): $(OBJECTS)
+- $(CC) $(LDFLAGS) $(OBJECTS) -o $@
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
+
+ .cpp.o:
+- $(CC) $(CFLAGS) $< -o $@
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
+
diff --git a/app-laptop/msi-keyboard/msi-keyboard-1.0-r1.ebuild b/app-laptop/msi-keyboard/msi-keyboard-1.0-r1.ebuild
new file mode 100644
index 000000000000..65aff6060bd4
--- /dev/null
+++ b/app-laptop/msi-keyboard/msi-keyboard-1.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs udev
+
+DESCRIPTION="Control backlight of MSI laptop keyboards"
+HOMEPAGE="https://github.com/makkarpov/msi-keyboard"
+SRC_URI="https://github.com/makkarpov/msi-keyboard/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="dev-libs/hidapi"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-r1-makefile.patch
+ "${FILESDIR}"/${P}-gcc12.patch
+)
+
+src_configure() {
+ tc-export CXX
+}
+
+src_install() {
+ udev_dorules 99-msi-keyboard.rules
+ dobin msi-keyboard
+}
+
+pkg_prerm() {
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-10 3:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-20 12:41 [gentoo-commits] repo/gentoo:master commit in: app-laptop/msi-keyboard/files/, app-laptop/msi-keyboard/ Joonas Niilola
-- strict thread matches above, loose matches on Subject: below --
2022-06-10 3:50 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox