From ac21da15be67ca91c9bd319a91379dc8cefbf5b2 Mon Sep 17 00:00:00 2001 From: Maciej Barć Date: Fri, 6 Jan 2023 15:08:41 +0100 Subject: app-misc/openrgb: properly install udev rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: https://github.com/gentoo/gentoo/pull/28800 Signed-off-by: Maciej Barć --- app-misc/openrgb/openrgb-0.8-r1.ebuild | 89 ++++++++++++++++++++++++++++++++++ app-misc/openrgb/openrgb-0.8.ebuild | 89 ---------------------------------- 2 files changed, 89 insertions(+), 89 deletions(-) create mode 100644 app-misc/openrgb/openrgb-0.8-r1.ebuild delete mode 100644 app-misc/openrgb/openrgb-0.8.ebuild (limited to 'app-misc/openrgb') diff --git a/app-misc/openrgb/openrgb-0.8-r1.ebuild b/app-misc/openrgb/openrgb-0.8-r1.ebuild new file mode 100644 index 000000000000..79b8c72fcdf9 --- /dev/null +++ b/app-misc/openrgb/openrgb-0.8-r1.ebuild @@ -0,0 +1,89 @@ +# 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 ~x86" + PATCHES=( "${FILESDIR}"/OpenRGB-0.5-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/2" + +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 +) + +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 official build system 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 +} diff --git a/app-misc/openrgb/openrgb-0.8.ebuild b/app-misc/openrgb/openrgb-0.8.ebuild deleted file mode 100644 index 516276f31fcd..000000000000 --- a/app-misc/openrgb/openrgb-0.8.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 2020-2022 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 ~x86" - PATCHES=( "${FILESDIR}"/OpenRGB-0.5-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/2" - -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 -) - -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 official build system 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 - - udev_dorules 60-openrgb.rules - rm -r "${ED}"/usr/lib/udev/ || die - - # 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 -} -- cgit v1.2.3-65-gdbad