From c38dfe6188112ca490090966a63faefe5ec7e9a0 Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 29 Aug 2022 13:01:02 +0000 Subject: added snes9x and php --- repo/openrgb/0001-fix-build.patch | 29 +++++++++++++++++++++++++++++ repo/openrgb/modules-load.conf | 1 + repo/openrgb/openrgb.post-install | 5 +++++ repo/openrgb/openrgb.xibuild | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+) create mode 100644 repo/openrgb/0001-fix-build.patch create mode 100644 repo/openrgb/modules-load.conf create mode 100644 repo/openrgb/openrgb.post-install create mode 100644 repo/openrgb/openrgb.xibuild (limited to 'repo/openrgb') diff --git a/repo/openrgb/0001-fix-build.patch b/repo/openrgb/0001-fix-build.patch new file mode 100644 index 0000000..f9371d9 --- /dev/null +++ b/repo/openrgb/0001-fix-build.patch @@ -0,0 +1,29 @@ +diff --git a/i2c_smbus/i2c_smbus_linux.cpp b/i2c_smbus/i2c_smbus_linux.cpp +index 33d1494b..1c5ff27b 100644 +--- a/i2c_smbus/i2c_smbus_linux.cpp ++++ b/i2c_smbus/i2c_smbus_linux.cpp +@@ -14,6 +14,24 @@ + #include + #include + ++#ifndef HAVE_CANONICALIZE_FILE_NAME ++#include ++#include ++#include ++#include ++static char * canonicalize_file_name(const char *path) ++{ ++ char buf[PATH_MAX] = { }; ++ ++ snprintf(buf, sizeof(buf) - 1, "%s", path); ++ ++ if (!realpath(path, buf)) ++ return NULL; ++ ++ return strdup(buf); ++} ++#endif ++ + s32 i2c_smbus_linux::i2c_smbus_xfer(u8 addr, char read_write, u8 command, int size, union i2c_smbus_data* data) + { + diff --git a/repo/openrgb/modules-load.conf b/repo/openrgb/modules-load.conf new file mode 100644 index 0000000..0cdf71f --- /dev/null +++ b/repo/openrgb/modules-load.conf @@ -0,0 +1 @@ +i2c-dev diff --git a/repo/openrgb/openrgb.post-install b/repo/openrgb/openrgb.post-install new file mode 100644 index 0000000..739ef0c --- /dev/null +++ b/repo/openrgb/openrgb.post-install @@ -0,0 +1,5 @@ +#!/bin/sh + +modprobe i2c-dev + +exit 0 diff --git a/repo/openrgb/openrgb.xibuild b/repo/openrgb/openrgb.xibuild new file mode 100644 index 0000000..4934a60 --- /dev/null +++ b/repo/openrgb/openrgb.xibuild @@ -0,0 +1,36 @@ +#!/bin/sh + +NAME="openrgb" +DESC="Open source RGB lighting control that doesn't depend on manufacturer software" + +MAKEDEPS="hidapi libusb mbedtls qt5-qtbase" + +PKG_VER=0.7 +SOURCE="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_$PKG_VER/OpenRGB-release_$PKG_VER.tar.gz" + +ADDITIONAL=" +0001-fix-build.patch +modules-load.conf +openrgb.post-install +" + +prepare () { +# apply_patches +true +} + +build() { + qmake-qt5 PREFIX=/usr + make +} + +check() { + make check +} + +package() { + INSTALL_ROOT="$PKG_DEST" make install + + install -Dm644 "$BUILD_ROOT"/modules-load.conf "$PKG_DEST"/usr/lib/modules-load.d/openrgb.conf +} + -- cgit v1.2.1