diff --git a/app-misc/openrgb/Manifest b/app-misc/openrgb/Manifest index ef601d6236e93..13e88421e839b 100644 --- a/app-misc/openrgb/Manifest +++ b/app-misc/openrgb/Manifest @@ -1,2 +1,3 @@ DIST OpenRGB-0.9-odr.patch 90600 BLAKE2B 1cb0aaab997da90b5cf6fbf1e971cef6848d4372ba021d27efed070ff2c398074d7b79623a1669995bbdaaacae1c5a9ff09344ef0cab7098e9354f95d005b856 SHA512 5f2a5194419d14b97dc2e8ca47a2b9914c01148cfb24d61266a8a9615f6d09509906d7e69d8264ddbde71474955f789925b400f29682d12779c2a3d38a4bd6eb +DIST OpenRGB-90c1e10cc59f4ba203bc797d75315885a32dddab.tar.bz2 10276845 BLAKE2B 2f8645575a1848f3341404f01ffe85025577198aed260ac19b8f4e512474a3fa3bb99ca5672bbe873daea3a68958b95e2fe00610470913dbace3cc2ddeab1b95 SHA512 e713b3ba629ddf610f58f59b8a843ed8b2a2bb2997698913de0cb34f07d7ff9af0e4ad6f47e82a4f7f0378dfa6dcffde72ae8a5d57238f513321cd4df5a2c0f7 DIST OpenRGB-release_0.9.tar.bz2 28689813 BLAKE2B 9fcf08d5e4d07ffc0f7867516f09044e18ce488bcdd99c8b44e0afe291b8a21a7ba92d6e7fd683ef22462a262004a992621efb59a5df6ed7551f4e9f75843241 SHA512 fb1bdbc7bcbd3bac888be313cfb6403a13d39de659ac6993858f9c1b17ad40e9c4a7d4c7c90682181841db1659a0ee298363c442a7120d43347aaf4485e7dccf diff --git a/app-misc/openrgb/files/openrgb-0.9_p20250802-build-system.patch b/app-misc/openrgb/files/openrgb-0.9_p20250802-build-system.patch new file mode 100644 index 0000000000000..041eceabc557d --- /dev/null +++ b/app-misc/openrgb/files/openrgb-0.9_p20250802-build-system.patch @@ -0,0 +1,31 @@ +Avoid calling `git` + +--- a/OpenRGB.pro ++++ b/OpenRGB.pro +@@ -28,10 +28,7 @@ MAJOR = 0 + MINOR = 9 + SUFFIX = git + +-SHORTHASH = $$system("git rev-parse --short=7 HEAD") + LASTTAG = "release_"$$MAJOR"."$$MINOR +-COMMAND = "git rev-list --count "$$LASTTAG"..HEAD" +-COMMITS = $$system($$COMMAND) + + VERSION_NUM = $$MAJOR"."$$MINOR"."$$COMMITS + VERSION_STR = $$MAJOR"."$$MINOR +@@ -73,15 +70,6 @@ win32:BUILDDATE = $$system(date /t) + linux:BUILDDATE = $$system(date -R -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}") + freebsd:BUILDDATE = $$system(date -j -R -r "${SOURCE_DATE_EPOCH:-$(date +%s)}") + macx:BUILDDATE = $$system(date -j -R -r "${SOURCE_DATE_EPOCH:-$(date +%s)}") +-GIT_COMMIT_ID = $$system(git log -n 1 --pretty=format:"%H") +-GIT_COMMIT_DATE = $$system(git log -n 1 --pretty=format:"%ci") +- +-unix { +- GIT_BRANCH = $$system(sh scripts/git-get-branch.sh) +-} +-else { +- GIT_BRANCH = $$system(powershell -ExecutionPolicy Bypass -File scripts/git-get-branch.ps1) +-} + + message("GIT_BRANCH: "$$GIT_BRANCH) + DEFINES += \ diff --git a/app-misc/openrgb/openrgb-0.9_p20250802.ebuild b/app-misc/openrgb/openrgb-0.9_p20250802.ebuild new file mode 100644 index 0000000000000..b19a160422dc6 --- /dev/null +++ b/app-misc/openrgb/openrgb-0.9_p20250802.ebuild @@ -0,0 +1,105 @@ +# Copyright 2020-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit check-reqs flag-o-matic qmake-utils udev xdg-utils + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI=${EGIT_REPO_URI:-"https://gitlab.com/CalcProgrammer1/OpenRGB"} +else + MY_COMMIT="90c1e10cc59f4ba203bc797d75315885a32dddab" + SRC_URI="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/${MY_COMMIT}/OpenRGB-${MY_COMMIT}.tar.bz2" + S="${WORKDIR}/OpenRGB-${MY_COMMIT}" + KEYWORDS="~amd64 ~loong ~x86" +fi + +DESCRIPTION="Open source RGB lighting control" +HOMEPAGE="https://openrgb.org https://gitlab.com/CalcProgrammer1/OpenRGB/" +LICENSE="GPL-2" +# subslot is OPENRGB_PLUGIN_API_VERSION from +# https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/OpenRGBPluginInterface.h +SLOT="0/4" + +RDEPEND=" + dev-cpp/cpp-httplib:= + dev-libs/hidapi + dev-qt/qtbase:6[gui,widgets] + net-libs/mbedtls:0= + virtual/libusb:1 +" +DEPEND=" + ${RDEPEND} + dev-cpp/nlohmann_json + dev-libs/mdns +" +BDEPEND=" + dev-qt/qttools:6[linguist] + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/OpenRGB-0.7-r1-udev.patch + "${FILESDIR}"/OpenRGB-0.9-udev-check.patch +) +if [[ ${PV} != *9999* ]]; then + PATCHES+=( "${FILESDIR}"/${P}-build-system.patch ) +fi + +CHECKREQS_DISK_BUILD="2G" + +src_prepare() { + default + + rm -r dependencies/{httplib,hidapi,libusb,mdns,json,mbedtls}* \ + || die "Failed to remove unneded deps" +} + +src_configure() { + # Some plugins require symbols defined in the main binary. + # The upstream build system of plugins bundles OpenRGB as a submodule + # instead, and compiles the .cpp file again. + append-ldflags -Wl,--export-dynamic + + # > warning: '-pipe' ignored because '-save-temps' specified + filter-flags -pipe + + # cpp-httplib >=0.16.0 changed the library name from "httplib" to "cpp-httplib". + # See bug: https://bugs.gentoo.org/934576 + local -a libs=() + if has_version "