public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/user/gerislay:master commit in: media-plugins/hyperion/files/, media-plugins/hyperion/, acct-group/hyperion/, ...
@ 2021-01-13 22:17 gerion
  0 siblings, 0 replies; only message in thread
From: gerion @ 2021-01-13 22:17 UTC (permalink / raw
  To: gentoo-commits

commit:     ac39bc7536fb345ed687e5238fff74081de4b65f
Author:     Gerion Entrup <gerion.entrup <AT> flump <DOT> de>
AuthorDate: Wed Jan 13 22:16:40 2021 +0000
Commit:     gerion <gerion.entrup <AT> flump <DOT> de>
CommitDate: Wed Jan 13 22:17:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/user/gerislay.git/commit/?id=ac39bc75

media-plugins/hyperion: update to hyperion.ng

Signed-off-by: Gerion Entrup <gerion.entrup <AT> flump.de>

 acct-group/hyperion/Manifest                       |   1 +
 acct-group/hyperion/hyperion-0.ebuild              |   9 ++
 acct-user/hyperion/Manifest                        |   1 +
 acct-user/hyperion/hyperion-0.ebuild               |  12 +++
 media-plugins/hyperion/Manifest                    |   6 +-
 ...e-prevent-lib-copies-for-package-creation.patch |  34 +++++++
 .../hyperion/files/0001-Cmake-fix-rpath.patch      |  35 +++++++
 .../0001-Proto-fix-Error-macro-conflict.patch      |  79 ++++++++++++++
 media-plugins/hyperion/hyperion-9999.ebuild        | 113 ++++++++++++++-------
 media-plugins/hyperion/metadata.xml                |  17 ++++
 10 files changed, 269 insertions(+), 38 deletions(-)

diff --git a/acct-group/hyperion/Manifest b/acct-group/hyperion/Manifest
new file mode 100644
index 0000000..f6d5df7
--- /dev/null
+++ b/acct-group/hyperion/Manifest
@@ -0,0 +1 @@
+EBUILD hyperion-0.ebuild 202 BLAKE2B 9befad7b98ba5e8b120d05631cf0d1e01648a665c47b90afde798d43d4fdde77670f19a2bef40b53d32aa3730af44d285e51cd321b6b67865a8293e800164e0e SHA512 9aa5bbb18a50d5c695c0125c53ca67e34dac2ee51bfe08139909ee6a6a1c0e44a1eddc3e6e7edddbfbfc5c49ce8fdb85fe3f3e4a1b1475fe843178be9c8155d2

diff --git a/acct-group/hyperion/hyperion-0.ebuild b/acct-group/hyperion/hyperion-0.ebuild
new file mode 100644
index 0000000..faed6af
--- /dev/null
+++ b/acct-group/hyperion/hyperion-0.ebuild
@@ -0,0 +1,9 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-group
+
+DESCRIPTION="Group for media-plugins/hyperion (daemon)"
+ACCT_GROUP_ID=264

diff --git a/acct-user/hyperion/Manifest b/acct-user/hyperion/Manifest
new file mode 100644
index 0000000..af91a84
--- /dev/null
+++ b/acct-user/hyperion/Manifest
@@ -0,0 +1 @@
+EBUILD hyperion-0.ebuild 249 BLAKE2B 865467e7dade8edf040a5ee6da56b9e659cdbe2bc34c53d84776f45b029dcd26acc136f5d9ccb47bc9230435707c7fbb561034bb75a4f54218c2cf7691c24ec9 SHA512 f5f5166e8aa384fe3c806e0efaeda8dc55c3521260faa2081c20d69dcf983090b4e5a67e7c3649094fe602d34e976d6f71d0eeabe45e25c10d023e1276f5f820

diff --git a/acct-user/hyperion/hyperion-0.ebuild b/acct-user/hyperion/hyperion-0.ebuild
new file mode 100644
index 0000000..6d22f00
--- /dev/null
+++ b/acct-user/hyperion/hyperion-0.ebuild
@@ -0,0 +1,12 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-user
+
+DESCRIPTION="User for media-plugins/hyperion (daemon)"
+ACCT_USER_ID=264
+ACCT_USER_GROUPS=( hyperion )
+
+acct-user_add_deps

diff --git a/media-plugins/hyperion/Manifest b/media-plugins/hyperion/Manifest
index 4263dc7..5d80302 100644
--- a/media-plugins/hyperion/Manifest
+++ b/media-plugins/hyperion/Manifest
@@ -1,2 +1,6 @@
+AUX 0001-CMake-prevent-lib-copies-for-package-creation.patch 1006 BLAKE2B a88281a4b39570be849daba0d9e84554f7177a9f32ab32dec277cb379f754648b0a386ed2d3aa0c99a456b642f8608893806fba2d16b0c039eadfc28386a6b5d SHA512 1e2d19de445b16df491133c18634d11b35460d3b11407b61006e4909d1a769cb6f2973a48eba8e7b564f3e1604ed76952aec6e3c9a30c2f816c930570287f35f
+AUX 0001-Cmake-fix-rpath.patch 1066 BLAKE2B 1ca9a013ef64c709464f709410f71cb9f5d72070d28c7d7e3c1c723964f8190eacd818a0efbf8fb05861508ca1745bcc28a8ef8941f754101dd96dc355dfdbe9 SHA512 5a7503f7d7f35a0fb5721899ab9ddae6ebf84a0e114da2a3f0ed13c942d4d2772eb8052efddd8cd03db6b06554a3d1da2790a828a143410d4d64be12d0c07e61
+AUX 0001-Proto-fix-Error-macro-conflict.patch 2492 BLAKE2B f32a90de8092da740d44ea179b87bcc5580c61d9225deb3077888044cdc5a308db518bb19a267810e9909fc98a1cf1928624f9317c3601d3bb7b598a765697c6 SHA512 656a81d27ce088d99bd3b22eecceb2b51d382d500553a8eedcfdb726c051b37bcd9a0ad937e077298ef4ddc9973cc7eab94fdbb6a5f0eb94b4a9e67260cfcf0e
 AUX hyperion.initd 465 BLAKE2B 32b0a8272f7b91aef3f02100d3a271f7ae569c24efe38ae1246b3bae5c39d51c6537d13664f482900de16bb012109c7594318116206cc3534b9a0e58ac3a062f SHA512 df1a0c5c0bca4585be5014807f280cbf3cd22298ef6feebcb9fc01bdf7b207186510aad7987bc49e3b0cf3d18dce05829ae3b3d4fc2969e38682ce9ec5a86998
-EBUILD hyperion-9999.ebuild 1781 BLAKE2B 7a2223a17357e155c9b65b0d2d7021e54c90949313c57ce5743878a4de6fc2b13a6ae4a26d8ec0b796d8e26354faa4ddc55c56cc97a0ce730fda02e1c62d6db6 SHA512 246d41f9316351baf17c513bfd9e9214181f539d2f062251ff54b63f5873974d3221fb6074f051f41ab021c305a5bb86d5d9c8ceef9ba38be381509a5d1b86e6
+EBUILD hyperion-9999.ebuild 2688 BLAKE2B 29bb0be8b1ce0acd4f43b53a861b43c1bf86cc92bb0209d9e7723ab2cf34198082a7a91da72758ef34ef72cc9ce3dadf765b1d49250729dcec5af380bc47898a SHA512 b2080664da9c561cdbd179ca7f30d90b4f46afc2715d8c17f0fe9a9ce769a9b40c57016dd9c79c0a1ed0fd39cdf9c3cfc541641f83d936ea21d1b21b3446498e
+MISC metadata.xml 605 BLAKE2B cca61cdcb5dfa7ce9424cbd9551a1f0b6ad0ee5e09b24922d44860b797d34c90b4e16790f3b5bac278271cb909627c3b5eb1248b8e75d1aa1aa5a911554a1b3b SHA512 3e648db4b0063e5d53722f5a3859b52761655d950cf8c9f975190f44a63c9ce2451d3039b474515f9c3f6df7c8e7a0b7f7870468da988061eecc8de7090e212a

diff --git a/media-plugins/hyperion/files/0001-CMake-prevent-lib-copies-for-package-creation.patch b/media-plugins/hyperion/files/0001-CMake-prevent-lib-copies-for-package-creation.patch
new file mode 100644
index 0000000..2103493
--- /dev/null
+++ b/media-plugins/hyperion/files/0001-CMake-prevent-lib-copies-for-package-creation.patch
@@ -0,0 +1,34 @@
+From 5c41b1a49bbacd3a1eb0ca08a50eb9573bdd5380 Mon Sep 17 00:00:00 2001
+From: Gerion Entrup <gerion.entrup@flump.de>
+Date: Wed, 13 Jan 2021 22:44:09 +0100
+Subject: [PATCH] CMake: prevent lib copies for package creation
+
+---
+ src/hyperiond/CMakeLists.txt | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/hyperiond/CMakeLists.txt b/src/hyperiond/CMakeLists.txt
+index 02bce862..57e26a95 100644
+--- a/src/hyperiond/CMakeLists.txt
++++ b/src/hyperiond/CMakeLists.txt
+@@ -147,10 +147,10 @@ if(WIN32)
+ endif()
+ 
+ # Deploy all dependencies for package creation (not for OSX)
+-include(${CMAKE_SOURCE_DIR}/cmake/Dependencies.cmake)
+-
+-if (NOT ENABLE_OSX AND NOT WIN32) # Unix
+-	DeployUnix("hyperiond")
+-elseif(WIN32) # Windows
+-	DeployWindows("hyperiond")
+-endif ()
++# include(${CMAKE_SOURCE_DIR}/cmake/Dependencies.cmake)
++#
++# if (NOT ENABLE_OSX AND NOT WIN32) # Unix
++# 	DeployUnix("hyperiond")
++# elseif(WIN32) # Windows
++# 	DeployWindows("hyperiond")
++# endif ()
+-- 
+2.26.2
+

diff --git a/media-plugins/hyperion/files/0001-Cmake-fix-rpath.patch b/media-plugins/hyperion/files/0001-Cmake-fix-rpath.patch
new file mode 100644
index 0000000..3d0f44f
--- /dev/null
+++ b/media-plugins/hyperion/files/0001-Cmake-fix-rpath.patch
@@ -0,0 +1,35 @@
+From c832778b4c9a2096322dd5c15b18fb8f5bc4281b Mon Sep 17 00:00:00 2001
+From: Gerion Entrup <gerion.entrup@flump.de>
+Date: Wed, 13 Jan 2021 22:48:00 +0100
+Subject: [PATCH] Cmake: fix rpath
+
+---
+ CMakeLists.txt | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 62200bb2..de1cd319 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -355,12 +355,12 @@ if (NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ endif()
+ 
+ # setup -rpath to search for shared libs in BINARY/../lib folder
+-if (UNIX AND NOT APPLE)
+-	SET(CMAKE_SKIP_BUILD_RPATH FALSE)
+-	SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+-	SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:$ORIGIN/../lib")
+-	SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+-endif ()
++#if (UNIX AND NOT APPLE)
++#	SET(CMAKE_SKIP_BUILD_RPATH FALSE)
++#	SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
++#	SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:$ORIGIN/../lib")
++#	SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
++#endif ()
+ 
+ # add QT5 dependency
+ IF ( CMAKE_CROSSCOMPILING )
+-- 
+2.26.2
+

diff --git a/media-plugins/hyperion/files/0001-Proto-fix-Error-macro-conflict.patch b/media-plugins/hyperion/files/0001-Proto-fix-Error-macro-conflict.patch
new file mode 100644
index 0000000..c904ff2
--- /dev/null
+++ b/media-plugins/hyperion/files/0001-Proto-fix-Error-macro-conflict.patch
@@ -0,0 +1,79 @@
+From 559fd409d332e56dd0ad56aa89bcaaa8c533677a Mon Sep 17 00:00:00 2001
+From: Gerion Entrup <gerion.entrup@flump.de>
+Date: Wed, 13 Jan 2021 19:48:57 +0100
+Subject: [PATCH] Proto*: fix Error macro conflict
+
+utils/Logger.h contains a preprocessor macro Error() for easy logging.
+However, the upstream protobuf/io/coded_stream.h also defines a private
+function Error() in one of it's classes that conflicts with this macro.
+
+Unfortunate include orders results then in a build error. This commit
+reorders the includes to prevent the error. It also defines an extra
+`#undef Error` before including upstream protobuf to make the problem
+more visible.
+
+Fixes: #882
+---
+ libsrc/protoserver/ProtoClientConnection.cpp | 7 ++++---
+ libsrc/protoserver/ProtoClientConnection.h   | 7 ++++---
+ libsrc/protoserver/ProtoServer.cpp           | 2 +-
+ 3 files changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/libsrc/protoserver/ProtoClientConnection.cpp b/libsrc/protoserver/ProtoClientConnection.cpp
+index e8bf1d91..051ca3e7 100644
+--- a/libsrc/protoserver/ProtoClientConnection.cpp
++++ b/libsrc/protoserver/ProtoClientConnection.cpp
+@@ -1,12 +1,13 @@
+-// project includes
+-#include "ProtoClientConnection.h"
+-
+ // qt
+ #include <QTcpSocket>
+ #include <QHostAddress>
+ #include <QTimer>
+ #include <QRgb>
+ 
++// project includes
++#include "ProtoClientConnection.h"
++
++
+ // TODO Remove this class if third-party apps have been migrated (eg. Hyperion Android Grabber, Windows Screen grabber etc.)
+ 
+ ProtoClientConnection::ProtoClientConnection(QTcpSocket* socket, int timeout, QObject *parent)
+diff --git a/libsrc/protoserver/ProtoClientConnection.h b/libsrc/protoserver/ProtoClientConnection.h
+index 6d8ce378..6ee947ab 100644
+--- a/libsrc/protoserver/ProtoClientConnection.h
++++ b/libsrc/protoserver/ProtoClientConnection.h
+@@ -1,14 +1,15 @@
+ #pragma once
+ 
++// protobuffer PROTO
++#undef Error
++#include "message.pb.h"
++
+ // util
+ #include <utils/Logger.h>
+ #include <utils/Image.h>
+ #include <utils/ColorRgb.h>
+ #include <utils/Components.h>
+ 
+-// protobuffer PROTO
+-#include "message.pb.h"
+-
+ class QTcpSocket;
+ class QTimer;
+ 
+diff --git a/libsrc/protoserver/ProtoServer.cpp b/libsrc/protoserver/ProtoServer.cpp
+index 7bfc2954..fb45ae60 100644
+--- a/libsrc/protoserver/ProtoServer.cpp
++++ b/libsrc/protoserver/ProtoServer.cpp
+@@ -1,5 +1,5 @@
+-#include <protoserver/ProtoServer.h>
+ #include "ProtoClientConnection.h"
++#include <protoserver/ProtoServer.h>
+ 
+ // util
+ #include <utils/NetOrigin.h>
+-- 
+2.26.2
+

diff --git a/media-plugins/hyperion/hyperion-9999.ebuild b/media-plugins/hyperion/hyperion-9999.ebuild
index b168340..4e2cff7 100644
--- a/media-plugins/hyperion/hyperion-9999.ebuild
+++ b/media-plugins/hyperion/hyperion-9999.ebuild
@@ -1,72 +1,111 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-inherit git-r3 cmake-utils systemd user
+inherit git-r3 cmake systemd
 
-DESCRIPTION="An opensource 'AmbiLight' implementation supported by many devices"
+DESCRIPTION="An opensource 'AmbiLight' implementation (next generation)"
 HOMEPAGE="https://hyperion-project.org/"
 SRC_URI=""
-EGIT_REPO_URI="https://github.com/hyperion-project/${PN}"
+EGIT_REPO_URI="https://github.com/hyperion-project/${PN}.ng"
 EGIT_SUBMODULES=()
 
+if [[ ${PV} != 9999 ]]; then
+	MY_PV="${PV/_/-}"
+	MY_PV="${MY_PV/alpha9/alpha.9}"
+	EGIT_COMMIT="${MY_PV}"
+fi
+
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS=""
-IUSE="dispmanx framebuffer spi vfl X"
+IUSE="cec +spi tinkerforge +qt-grabber +usb +v4l +xcb +zeroconf"
 
-DEPEND="x11-libs/libXrender
-	dev-util/cmake
-	virtual/libusb
-	dev-libs/icu
+# currently only platform x11 is supported
+# TODO extend for rpi amlogic amlogic64
+
+DEPEND="
+	dev-lang/python
+	dev-libs/protobuf
 	dev-qt/qtcore:5
 	dev-qt/qtgui:5
-	dev-qt/qtwidgets:5
 	dev-qt/qtnetwork:5
 	dev-qt/qtserialport:5
-	dev-lang/python
-	net-dns/avahi
-	dev-libs/protobuf"
-RDEPEND="${DEPEND}"
+	dev-qt/qtsql:5
+	dev-qt/qtsvg:5
+	dev-qt/qtx11extras:5
+	dev-libs/flatbuffers
+	dev-util/cmake
+	net-libs/mbedtls
+	dev-libs/openssl
+	sys-libs/zlib
+	sys-apps/dbus
+	v4l? ( virtual/jpeg )
+	zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+	cec? ( dev-libs/libcec )
+	xcb? (
+		x11-libs/xcb-util-image
+		x11-libs/libxcb
+		x11-libs/xcb-util
+		x11-libs/xcb-util-renderutil
+		x11-libs/libXrandr
+		x11-libs/libXrender
+	)
+	usb? ( virtual/libusb )
+"
+RDEPEND="
+	acct-user/hyperion
+	${DEPEND}
+"
 
-pkg_setup() {
-	HYPERION_HOME="/var/lib/hyperion"
-	ebegin "Creating hyperion user and group"
-	enewgroup ${PN}
-	enewuser ${PN} -1 -1 "${HYPERION_HOME}" ${PN}
-	eend $?
-}
+PATCHES=(
+	"${FILESDIR}"/0001-Proto-fix-Error-macro-conflict.patch
+	"${FILESDIR}"/0001-CMake-prevent-lib-copies-for-package-creation.patch
+	"${FILESDIR}"/0001-Cmake-fix-rpath.patch
+)
 
 src_configure() {
 	local mycmakeargs=(
-		-DENABLE_DISPMANX="$(usex dispmanx)"
-		-DENABLE_FB="$(usex framebuffer)"
-		-DENABLE_SPIDEV="$(usex spi)"
-		-DENABLE_QT5=yes
-		-DENABLE_VFL2="$(usex vfl)"
-		-DENABLE_X11="$(usex X)"
 		-DCMAKE_BUILD_TYPE=Release
+		-DPLATFORM=x11
+		-DBUILD_SHARED_LIBS=off
+		-DENABLE_AMLOGIC=off
+		-DENABLE_OSX=off
+		-DENABLE_X11=on
+		-DENABLE_EXPERIMENTAL=off
+		-DENABLE_DISPMANX=off # rpi lib
+		-DENABLE_DX=off # DirectX
+		-DENABLE_PROFILER=off # DirectX
+		-DENABLE_WS281XPWM=off # rpi lib
+		-DENABLE_FB=on
+		-DENABLE_QT=$(usex qt-grabber)
+		-DENABLE_TINKERFORGE=$(usex tinkerforge)
+		-DENABLE_XCB=$(usex xcb)
+		-DENABLE_AVAHI=$(usex zeroconf)
+		-DENABLE_CEC="$(usex cec)"
+		-DENABLE_SPIDEV="$(usex spi)"
+		-DENABLE_USB_HID="$(usex usb)"
+		-DENABLE_V4L2="$(usex v4l)"
 		-DUSE_SYSTEM_PROTO_LIBS=on
+		-DUSE_SYSTEM_FLATBUFFERS_LIBS=on
+		-DUSE_SYSTEM_MBEDTLS_LIBS=on
 		-DUSE_SHARED_AVAHI_LIBS=on
-		-DPROTOBUF_PROTOC_EXECUTABLE=/usr/bin/protoc
-		-DPLATFORM=x86
 		-Wno-dev
 	)
-	cmake-utils_src_configure
+	cmake_src_configure
 }
 
 src_install() {
-	cmake-utils_src_install
+	cmake_src_install
 
 	insinto /etc/hyperion
-	doins "${S}/config/hyperion.config.json.example"
-	ewarn "In /etc/hyperion/ an example config file is provided. The config"
-	ewarn "file is also creatable with the GUI program HyperCon."
+	doins "${S}/config/hyperion.config.json.default"
+	doins "${S}/config/hyperion.config.json.commented"
+	ewarn "An example config file is provided in /etc/hyperion."
 	ewarn "To allow access to certain input devices you have add the hyperion"
 	ewarn "user to the uucp group: usermod -G uucp hyperion"
 
 	newinitd "${FILESDIR}"/hyperion.initd hyperion
-
-	systemd_newunit "${S}/bin/service/hyperion.systemd.sh" hyperion.service
+	systemd_newunit "${S}/share/hyperion/service/hyperion.systemd" hyperion.service
 }

diff --git a/media-plugins/hyperion/metadata.xml b/media-plugins/hyperion/metadata.xml
new file mode 100644
index 0000000..0ed7f1f
--- /dev/null
+++ b/media-plugins/hyperion/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>gerion.entrup@flump.de</email>
+		<name>Gerion Entrup</name>
+	</maintainer>
+	<use>
+		<flag name="cec">Enable CEC control via <pkg>dev-libs/libcec</pkg></flag>
+		<flag name="spi">Enable the SPIDEV device</flag>
+		<flag name="tinkerforge">Enable the TINKERFORGE device</flag>
+		<flag name="qt-grabber">Enable the qt grabber</flag>
+	</use>
+	<upstream>
+		<remote-id type="github">hyperion-project/hyperion.ng</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-13 22:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13 22:17 [gentoo-commits] repo/user/gerislay:master commit in: media-plugins/hyperion/files/, media-plugins/hyperion/, acct-group/hyperion/, gerion

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox