Skip to content

Commit

Permalink
xone: Rebuild for kernels
Browse files Browse the repository at this point in the history
Signed-off-by: Reilly Brogan <[email protected]>
  • Loading branch information
ReillyBrogan committed Apr 11, 2024
1 parent 1f8b46f commit 2458298
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 12 deletions.
33 changes: 33 additions & 0 deletions packages/x/xone/files/linux-6.8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 1b4344ab8d9d7891f843dc993b0c5447f46c9889 Mon Sep 17 00:00:00 2001
From: medusalix <[email protected]>
Date: Sun, 21 Jan 2024 21:18:17 +0100
Subject: [PATCH] Fix build on kernel 6.8

---
transport/dongle.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/transport/dongle.c b/transport/dongle.c
index 1a30922..71aed1c 100644
--- a/transport/dongle.c
+++ b/transport/dongle.c
@@ -6,6 +6,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/bitfield.h>
+#include <linux/version.h>
#include <linux/usb.h>
#include <linux/ieee80211.h>
#include <net/cfg80211.h>
@@ -1024,7 +1025,11 @@ static struct usb_driver xone_dongle_driver = {
.suspend = xone_dongle_suspend,
.resume = xone_dongle_resume,
.id_table = xone_dongle_id_table,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
.drvwrap.driver.shutdown = xone_dongle_shutdown,
+#else
+ .driver.shutdown = xone_dongle_shutdown,
+#endif
.supports_autosuspend = true,
.disable_hub_initiated_lpm = true,
.soft_unbind = true,
3 changes: 2 additions & 1 deletion packages/x/xone/package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name : xone
version : '0.3'
release : 59
release : 60
source :
- https://github.com/medusalix/xone/archive/refs/tags/v0.3.tar.gz : 993f6b2b07c3236ce283d5de4da47dbfc16a86e056af504a4958d87f718ece20
- git|https://github.com/medusalix/xpad-noone.git : d02737f7eab1e17a7748fbe550dd982e3808525d
Expand Down Expand Up @@ -40,6 +40,7 @@ rundeps :
- xone-common
setup : |
%patch -p1 -i $pkgfiles/linux-6.3.patch
%patch -p1 -i $pkgfiles/linux-6.8.patch
# Prep build dirs for each kernel version
pushd ../
Expand Down
22 changes: 11 additions & 11 deletions packages/x/xone/pspec_x86_64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</Description>
<PartOf>kernel.drivers</PartOf>
<RuntimeDependencies>
<Dependency releaseFrom="59">xone-common</Dependency>
<Dependency releaseFrom="60">xone-common</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="data">/lib/modules/6.6.26-239.lts/drivers/input/joystick/xone-dongle.ko.zst</Path>
Expand Down Expand Up @@ -51,17 +51,17 @@
</Description>
<PartOf>kernel.drivers</PartOf>
<RuntimeDependencies>
<Dependency releaseFrom="59">xone-common</Dependency>
<Dependency releaseFrom="60">xone-common</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="data">/lib/modules/6.6.26-283.current/drivers/input/joystick/xone-dongle.ko.zst</Path>
<Path fileType="data">/lib/modules/6.6.26-283.current/drivers/input/joystick/xone-gip-chatpad.ko.zst</Path>
<Path fileType="data">/lib/modules/6.6.26-283.current/drivers/input/joystick/xone-gip-gamepad.ko.zst</Path>
<Path fileType="data">/lib/modules/6.6.26-283.current/drivers/input/joystick/xone-gip-guitar.ko.zst</Path>
<Path fileType="data">/lib/modules/6.6.26-283.current/drivers/input/joystick/xone-gip-headset.ko.zst</Path>
<Path fileType="data">/lib/modules/6.6.26-283.current/drivers/input/joystick/xone-gip.ko.zst</Path>
<Path fileType="data">/lib/modules/6.6.26-283.current/drivers/input/joystick/xone-wired.ko.zst</Path>
<Path fileType="data">/lib/modules/6.6.26-283.current/drivers/input/joystick/xpad-noone.ko.zst</Path>
<Path fileType="data">/lib/modules/6.8.5-284.current/drivers/input/joystick/xone-dongle.ko.zst</Path>
<Path fileType="data">/lib/modules/6.8.5-284.current/drivers/input/joystick/xone-gip-chatpad.ko.zst</Path>
<Path fileType="data">/lib/modules/6.8.5-284.current/drivers/input/joystick/xone-gip-gamepad.ko.zst</Path>
<Path fileType="data">/lib/modules/6.8.5-284.current/drivers/input/joystick/xone-gip-guitar.ko.zst</Path>
<Path fileType="data">/lib/modules/6.8.5-284.current/drivers/input/joystick/xone-gip-headset.ko.zst</Path>
<Path fileType="data">/lib/modules/6.8.5-284.current/drivers/input/joystick/xone-gip.ko.zst</Path>
<Path fileType="data">/lib/modules/6.8.5-284.current/drivers/input/joystick/xone-wired.ko.zst</Path>
<Path fileType="data">/lib/modules/6.8.5-284.current/drivers/input/joystick/xpad-noone.ko.zst</Path>
</Files>
</Package>
<Package>
Expand All @@ -75,7 +75,7 @@
</Files>
</Package>
<History>
<Update release="59">
<Update release="60">
<Date>2024-04-11</Date>
<Version>0.3</Version>
<Comment>Packaging update</Comment>
Expand Down

0 comments on commit 2458298

Please sign in to comment.