diff options
author | Tasos Sahanidis | 2022-06-20 23:06:26 +0300 |
---|---|---|
committer | Tasos Sahanidis | 2022-06-20 23:06:26 +0300 |
commit | 31ac2f799bb5e52e60784096b4e17c1eb10c80a4 (patch) | |
tree | 327545aba6376548412bc98a44d8a2e74afeac41 | |
parent | f7c1a4a2912f3fb9837af57e9fd282c50795e2c9 (diff) | |
download | aur-31ac2f799bb5e52e60784096b4e17c1eb10c80a4.tar.gz |
Fix autostart option not showing up
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | 0001-Fix-autostart-checkbox-detection-with-renamed-binary.patch | 35 | ||||
-rw-r--r-- | PKGBUILD | 11 |
3 files changed, 46 insertions, 5 deletions
@@ -1,11 +1,12 @@ pkgbase = ckb-next pkgdesc = Corsair Keyboard and Mouse Input Driver, release version pkgver = 0.5.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/ckb-next/ckb-next install = ckb-next.install arch = i686 arch = x86_64 + arch = pentium4 license = GPL2 makedepends = git makedepends = cmake @@ -26,8 +27,10 @@ pkgbase = ckb-next conflicts = ckb-next-git source = https://github.com/ckb-next/ckb-next/archive/v0.5.0.tar.gz source = AUR-wrapper::git+https://github.com/ckb-next/AUR-wrapper.git + source = 0001-Fix-autostart-checkbox-detection-with-renamed-binary.patch sha256sums = 12705aa86cb544a77df6d7a73744f21513bcc6cce805ed8caf5d3b72a950157e sha256sums = SKIP + sha256sums = 6cddbf71179ad385d89b9a2ed318b0fa3dd5817b5bcfd4432d22b088d183bfcd pkgname = ckb-next diff --git a/0001-Fix-autostart-checkbox-detection-with-renamed-binary.patch b/0001-Fix-autostart-checkbox-detection-with-renamed-binary.patch new file mode 100644 index 000000000000..4ad323874888 --- /dev/null +++ b/0001-Fix-autostart-checkbox-detection-with-renamed-binary.patch @@ -0,0 +1,35 @@ +From 1de099678ea522e7a66bed19c1cc86de0e24b759 Mon Sep 17 00:00:00 2001 +From: Tasos Sahanidis <tasos@tasossah.com> +Date: Mon, 20 Jun 2022 22:58:28 +0300 +Subject: [PATCH] Fix autostart checkbox detection with renamed binary + +--- + src/gui/autorun.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/gui/autorun.cpp b/src/gui/autorun.cpp +index 0f11ff0f..cac6bb11 100644 +--- a/src/gui/autorun.cpp ++++ b/src/gui/autorun.cpp +@@ -4,6 +4,7 @@ + #include "autorun.h" + #include "ckbsettings.h" + #include <QDebug> ++#include <QFileInfo> + + // >=0.3.0 (new) paths + #ifdef Q_OS_LINUX +@@ -30,7 +31,9 @@ static const QString oldSettingPath = "Program/DidLoginItem"; + bool AutoRun::available() { + // Allow autostart if the program is located in a system path + #ifdef Q_OS_LINUX +- return QDir::root().absoluteFilePath(QStandardPaths::findExecutable("ckb-next")) == qApp->applicationFilePath(); ++ const QString& fpath = qApp->applicationFilePath(); ++ QFileInfo finfo(fpath); ++ return QDir::root().absoluteFilePath(QStandardPaths::findExecutable(finfo.fileName())) == fpath; + #elif defined(Q_OS_MACOS) + return qApp->applicationFilePath().startsWith("/Applications/ckb-next.app", Qt::CaseInsensitive); + #endif +-- +2.25.1 + @@ -2,9 +2,9 @@ # Contributor: Light2Yellow <oleksii.vilchanskyi@gmail.com> pkgname=ckb-next pkgver=0.5.0 -pkgrel=1 +pkgrel=2 pkgdesc="Corsair Keyboard and Mouse Input Driver, release version" -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'pentium4') url="https://github.com/ckb-next/ckb-next" license=('GPL2') depends=('qt5-base' 'hicolor-icon-theme' 'quazip-qt5' 'qt5-tools' 'libxcb' 'xcb-util-wm' 'qt5-x11extras' 'libdbusmenu-qt5' 'python3' 'python-pyqt5') @@ -14,9 +14,11 @@ conflicts=('ckb-git' 'ckb-git-latest' 'ckb-next-git') provides=('ckb-next') install=ckb-next.install source=("https://github.com/ckb-next/$pkgname/archive/v$pkgver.tar.gz" - 'AUR-wrapper::git+https://github.com/ckb-next/AUR-wrapper.git') + 'AUR-wrapper::git+https://github.com/ckb-next/AUR-wrapper.git' + '0001-Fix-autostart-checkbox-detection-with-renamed-binary.patch') sha256sums=('12705aa86cb544a77df6d7a73744f21513bcc6cce805ed8caf5d3b72a950157e' - 'SKIP') + 'SKIP' + '6cddbf71179ad385d89b9a2ed318b0fa3dd5817b5bcfd4432d22b088d183bfcd') build() { cd "$srcdir/${pkgname}-${pkgver}" @@ -34,6 +36,7 @@ build() { prepare() { cd "$srcdir/${pkgname}-${pkgver}" + patch -p1 -i "$srcdir/0001-Fix-autostart-checkbox-detection-with-renamed-binary.patch" } package() { |