diff options
author | Alexey Sokolov <alexey+gentoo@asokolov.org> | 2023-07-16 11:47:13 +0100 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2023-07-17 14:33:35 +0200 |
commit | 05730b64674c86435b207321bba02368658e9f37 (patch) | |
tree | 4cccc16e21d1f75fcface21f1b026f06114bc785 /app-misc/openrgb | |
parent | sci-mathematics/coq: remove dead code (diff) | |
download | gentoo-05730b64674c86435b207321bba02368658e9f37.tar.gz gentoo-05730b64674c86435b207321bba02368658e9f37.tar.bz2 gentoo-05730b64674c86435b207321bba02368658e9f37.zip |
app-misc/openrgb: add 0.9
Closes: https://bugs.gentoo.org/910405
Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'app-misc/openrgb')
-rw-r--r-- | app-misc/openrgb/Manifest | 1 | ||||
-rw-r--r-- | app-misc/openrgb/files/OpenRGB-0.9-build-system.patch | 12 | ||||
-rw-r--r-- | app-misc/openrgb/files/OpenRGB-0.9-udev-check.patch | 12 | ||||
-rw-r--r-- | app-misc/openrgb/openrgb-0.9.ebuild | 91 |
4 files changed, 116 insertions, 0 deletions
diff --git a/app-misc/openrgb/Manifest b/app-misc/openrgb/Manifest index e0ff770dc389..eeeff9b27642 100644 --- a/app-misc/openrgb/Manifest +++ b/app-misc/openrgb/Manifest @@ -1 +1,2 @@ DIST OpenRGB-release_0.8.tar.bz2 28631365 BLAKE2B 3b328e38f1c52646da02b0b2b2c22b1285f3b31b0a2bc684e99d491d04bd14a91b49bc196b3b81b537320cd872e5568aaa8aec34744f4f15392d9424a81ac6f0 SHA512 d69686da7cab33099b13cfb5ab876fc2db047f79aa01bf8150507ec41321b4c6c092f81623823b89916c70a1a24c4a102f77b1001c5caa721ff4c0c52e0630d2 +DIST OpenRGB-release_0.9.tar.bz2 28689813 BLAKE2B 9fcf08d5e4d07ffc0f7867516f09044e18ce488bcdd99c8b44e0afe291b8a21a7ba92d6e7fd683ef22462a262004a992621efb59a5df6ed7551f4e9f75843241 SHA512 fb1bdbc7bcbd3bac888be313cfb6403a13d39de659ac6993858f9c1b17ad40e9c4a7d4c7c90682181841db1659a0ee298363c442a7120d43347aaf4485e7dccf diff --git a/app-misc/openrgb/files/OpenRGB-0.9-build-system.patch b/app-misc/openrgb/files/OpenRGB-0.9-build-system.patch new file mode 100644 index 000000000000..567e60787b72 --- /dev/null +++ b/app-misc/openrgb/files/OpenRGB-0.9-build-system.patch @@ -0,0 +1,12 @@ +--- a/OpenRGB.pro ++++ b/OpenRGB.pro +@@ -46,9 +46,6 @@ TEMPLATE = app + #-----------------------------------------------------------------------------------------------# + win32:BUILDDATE = $$system(date /t) + unix:BUILDDATE = $$system(date -R -d "@${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") +-GIT_BRANCH = $$system(git branch --show-current) + + DEFINES += \ + VERSION_STRING=\\"\"\"$$VERSION\\"\"\" \ diff --git a/app-misc/openrgb/files/OpenRGB-0.9-udev-check.patch b/app-misc/openrgb/files/OpenRGB-0.9-udev-check.patch new file mode 100644 index 000000000000..e3525c116baf --- /dev/null +++ b/app-misc/openrgb/files/OpenRGB-0.9-udev-check.patch @@ -0,0 +1,12 @@ +We install udev to /lib/udev instead, which it doesn't check + +--- a/ResourceManager.cpp ++++ b/ResourceManager.cpp +@@ -895,7 +895,6 @@ void ResourceManager::DetectDevicesThreadFunction() + { + if(access("/usr/lib/udev/rules.d/60-openrgb.rules", F_OK) != 0) + { +- udev_not_exist = true; + } + } + else diff --git a/app-misc/openrgb/openrgb-0.9.ebuild b/app-misc/openrgb/openrgb-0.9.ebuild new file mode 100644 index 000000000000..0b3ebc85f6c8 --- /dev/null +++ b/app-misc/openrgb/openrgb-0.9.ebuild @@ -0,0 +1,91 @@ +# Copyright 2020-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit 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 + SRC_URI="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_${PV}/OpenRGB-release_${PV}.tar.bz2" + S="${WORKDIR}/OpenRGB-release_${PV}" + KEYWORDS="~amd64 ~loong ~x86" + PATCHES=( "${FILESDIR}"/OpenRGB-0.9-build-system.patch ) +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/3" + +RDEPEND=" + dev-cpp/cpp-httplib:= + dev-libs/hidapi + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + net-libs/mbedtls:= + virtual/libusb:1 +" +DEPEND=" + ${RDEPEND} + dev-cpp/nlohmann_json + dev-libs/mdns +" +BDEPEND=" + dev-qt/linguist-tools:5 + virtual/pkgconfig +" + +PATCHES+=( + "${FILESDIR}"/OpenRGB-0.7-r1-udev.patch + "${FILESDIR}"/OpenRGB-0.9-udev-check.patch +) + +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 + + eqmake5 \ + INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \ + DEFINES+="OPENRGB_EXTRA_PLUGIN_DIRECTORY=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\"" \ + LIBS+=-lhttplib +} + +src_install() { + emake INSTALL_ROOT="${ED}" install + + dodoc README.md OpenRGB.patch + + rm -r "${ED}"/usr/lib/udev/ || die + udev_dorules 60-openrgb.rules + + # This is for plugins. Upstream doesn't install any headers at all. + insinto /usr/include/OpenRGB + find . -name '*.h' -exec cp --parents '{}' "${ED}/usr/include/OpenRGB/" ';' || die +} + +pkg_postinst() { + xdg_icon_cache_update + udev_reload +} + +pkg_postrm() { + xdg_icon_cache_update + udev_reload +} |