diff --git a/packages/addons/service/hyperion/changelog.txt b/packages/addons/service/hyperion/changelog.txt index 7e2de841a6..1ac8bc97e6 100644 --- a/packages/addons/service/hyperion/changelog.txt +++ b/packages/addons/service/hyperion/changelog.txt @@ -1,3 +1,6 @@ +7.0.102 +- Update to version d2f4725 + 7.0.101 - Add protobuf/V4L2 support diff --git a/packages/addons/service/hyperion/package.mk b/packages/addons/service/hyperion/package.mk index 332e7b2b69..81c4d2022f 100644 --- a/packages/addons/service/hyperion/package.mk +++ b/packages/addons/service/hyperion/package.mk @@ -17,12 +17,12 @@ ################################################################################ PKG_NAME="hyperion" -PKG_VERSION="f64b6eb" -PKG_REV="101" +PKG_VERSION="d2f4725" +PKG_REV="102" PKG_LICENSE="GPL" PKG_SITE="https://github.com/tvdzwan/hyperion" -PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" -PKG_DEPENDS_TARGET="toolchain Python libusb qt protobuf" +PKG_URL="https://github.com/tvdzwan/hyperion/archive/$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain Python libusb qt protobuf rpi_ws281x" PKG_SECTION="service" PKG_SHORTDESC="Hyperion: an AmbiLight controller" PKG_LONGDESC="Hyperion($PKG_VERSION) is an modern opensource AmbiLight implementation." @@ -48,6 +48,10 @@ elif [ "$DISPLAYSERVER" = "x11" ]; then X11_SUPPORT="-DENABLE_X11=1" fi +pre_build_target() { + cp -a $(get_build_dir rpi_ws281x)/* $ROOT/$PKG_BUILD/dependencies/external/rpi_ws281x +} + configure_target() { echo "" > ../cmake/FindGitVersion.cmake cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \ @@ -59,7 +63,7 @@ configure_target() { $DISPMANX_SUPPORT \ $FB_SUPPORT \ -DENABLE_OSX=0 \ - -DENABLE_PROTOBUF=1 \ + -DUSE_SYSTEM_PROTO_LIBS=ON \ -DENABLE_SPIDEV=1 \ -DENABLE_TINKERFORGE=0 \ -DENABLE_V4L2=1 \ diff --git a/packages/addons/service/hyperion/patches/hyperion-0001-Use-protobuf-from-pkg-config.patch b/packages/addons/service/hyperion/patches/hyperion-0001-Use-protobuf-from-pkg-config.patch deleted file mode 100644 index 1b5184b0d5..0000000000 --- a/packages/addons/service/hyperion/patches/hyperion-0001-Use-protobuf-from-pkg-config.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 0ce04b692b7c3e4414c46402c389215f7b0aac48 Mon Sep 17 00:00:00 2001 -From: Jonas Karlman -Date: Mon, 6 Apr 2015 21:47:41 +0200 -Subject: [PATCH] Use protobuf from pkg-config - ---- - dependencies/CMakeLists.txt | 20 ++------------------ - 1 file changed, 2 insertions(+), 18 deletions(-) - -diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt -index 17747bd..4406d01 100644 ---- a/dependencies/CMakeLists.txt -+++ b/dependencies/CMakeLists.txt -@@ -5,25 +5,9 @@ add_subdirectory(build/serial) - add_subdirectory(build/tinkerforge) - - if(ENABLE_PROTOBUF) -- set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared protobuf library") -- add_subdirectory(external/protobuf) -+ find_package(Protobuf REQUIRED) -+ include_directories(${PROTOBUF_INCLUDE_DIRS}) - -- if(CMAKE_CROSSCOMPILING) -- # when crosscompiling import the protoc executable targets from a file generated by a native build -- option(IMPORT_PROTOC "Protoc export file (protoc_export.cmake) from a native build" "IMPORT_PROTOC-FILE_NOT_FOUND") -- include(${IMPORT_PROTOC}) -- else() -- # export the protoc compiler so it can be used when cross compiling -- export(TARGETS protoc_compiler FILE "${CMAKE_BINARY_DIR}/protoc_export.cmake") -- endif() -- -- # define the include for the protobuf library at the parent scope -- set(PROTOBUF_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/external/protobuf/src") -- set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS} PARENT_SCOPE) -- -- # define the protoc executable at the parent scope -- get_property(PROTOBUF_PROTOC_EXECUTABLE TARGET protoc_compiler PROPERTY LOCATION) -- set(PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE} PARENT_SCOPE) - message(STATUS "Using protobuf compiler: " ${PROTOBUF_PROTOC_EXECUTABLE}) - - #============================================================================= --- -2.3.4 - diff --git a/packages/addons/service/hyperion/patches/hyperion-0001-make-protobuf-use-system-version.patch b/packages/addons/service/hyperion/patches/hyperion-0001-make-protobuf-use-system-version.patch new file mode 100644 index 0000000000..9863b961d7 --- /dev/null +++ b/packages/addons/service/hyperion/patches/hyperion-0001-make-protobuf-use-system-version.patch @@ -0,0 +1,76 @@ +From f0884ec25b5f56cea3ed135efaf5fca744d3f1ee Mon Sep 17 00:00:00 2001 +From: redPanther +Date: Mon, 13 Jun 2016 08:11:57 +0200 +Subject: [PATCH] add support for using system protoc instead of version in + submodule (#698) + +--- + dependencies/CMakeLists.txt | 44 ++++++++++++++++++++++++++------------------ + 1 file changed, 26 insertions(+), 18 deletions(-) + +diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt +index 52d7f74..26dd96c 100644 +--- a/dependencies/CMakeLists.txt ++++ b/dependencies/CMakeLists.txt +@@ -9,27 +9,35 @@ if(ENABLE_WS281XPWM) + external/rpi_ws281x/mailbox.c external/rpi_ws281x/ws2811.c + external/rpi_ws281x/pwm.c external/rpi_ws281x/dma.c + external/rpi_ws281x/rpihw.c) +-endif(ENABLE_WS281XPWM) ++endif() + +-set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared protobuf library") +-add_subdirectory(external/protobuf) ++set(USE_SYSTEM_PROTO_LIBS OFF CACHE BOOL "use protobuf library from system") + +-if(CMAKE_CROSSCOMPILING) +- # when crosscompiling import the protoc executable targets from a file generated by a native build +- option(IMPORT_PROTOC "Protoc export file (protoc_export.cmake) from a native build" "IMPORT_PROTOC-FILE_NOT_FOUND") +- include(${IMPORT_PROTOC}) +-else() +- # export the protoc compiler so it can be used when cross compiling +- export(TARGETS protoc_compiler FILE "${CMAKE_BINARY_DIR}/protoc_export.cmake") +-endif() ++if (USE_SYSTEM_PROTO_LIBS) ++ find_package(Protobuf REQUIRED) ++ include_directories(${PROTOBUF_INCLUDE_DIRS}) ++else () ++ set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared protobuf library") ++ add_subdirectory(external/protobuf) + +-# define the include for the protobuf library at the parent scope +-set(PROTOBUF_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/external/protobuf/src") +-set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS} PARENT_SCOPE) ++ if(CMAKE_CROSSCOMPILING) ++ # when crosscompiling import the protoc executable targets from a file generated by a native build ++ option(IMPORT_PROTOC "Protoc export file (protoc_export.cmake) from a native build" "IMPORT_PROTOC-FILE_NOT_FOUND") ++ include(${IMPORT_PROTOC}) ++ else() ++ # export the protoc compiler so it can be used when cross compiling ++ export(TARGETS protoc_compiler FILE "${CMAKE_BINARY_DIR}/protoc_export.cmake") ++ endif() ++ ++ # define the include for the protobuf library at the parent scope ++ set(PROTOBUF_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/external/protobuf/src") ++ set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS} PARENT_SCOPE) ++ ++ # define the protoc executable at the parent scope ++ get_property(PROTOBUF_PROTOC_EXECUTABLE TARGET protoc_compiler PROPERTY LOCATION) ++ set(PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE} PARENT_SCOPE) ++endif() + +-# define the protoc executable at the parent scope +-get_property(PROTOBUF_PROTOC_EXECUTABLE TARGET protoc_compiler PROPERTY LOCATION) +-set(PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE} PARENT_SCOPE) + message(STATUS "Using protobuf compiler: " ${PROTOBUF_PROTOC_EXECUTABLE}) + + #============================================================================= +@@ -76,7 +84,7 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS) + endforeach() + endif() + +- if(CMAKE_CROSSCOMPILING) ++ if(CMAKE_CROSSCOMPILING OR USE_SYSTEM_PROTO_LIBS) + set(PROTOC_DEPENDENCY ${PROTOBUF_PROTOC_EXECUTABLE}) + else() + set(PROTOC_DEPENDENCY protoc_compiler) diff --git a/packages/addons/service/hyperion/patches/hyperion-01_std-isnan.patch b/packages/addons/service/hyperion/patches/hyperion-01_std-isnan.patch deleted file mode 100644 index 44e06c17b8..0000000000 --- a/packages/addons/service/hyperion/patches/hyperion-01_std-isnan.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/libsrc/leddevice/LedDevicePhilipsHue.cpp b/libsrc/leddevice/LedDevicePhilipsHue.cpp -index 332176a..81f421b 100755 ---- a/libsrc/leddevice/LedDevicePhilipsHue.cpp -+++ b/libsrc/leddevice/LedDevicePhilipsHue.cpp -@@ -105,10 +105,10 @@ CiColor PhilipsHueLight::rgbToCiColor(float red, float green, float blue) { - // Convert to x,y space. - float cx = X / (X + Y + Z); - float cy = Y / (X + Y + Z); -- if (isnan(cx)) { -+ if (std::isnan(cx)) { - cx = 0.0f; - } -- if (isnan(cy)) { -+ if (std::isnan(cy)) { - cy = 0.0f; - } - // Brightness is simply Y in the XYZ space. diff --git a/tools/mkpkg/mkpkg_hyperion b/tools/mkpkg/mkpkg_hyperion deleted file mode 100755 index 6586a6b620..0000000000 --- a/tools/mkpkg/mkpkg_hyperion +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -################################################################################ -# This file is part of LibreELEC - http://www.libreelec.tv -# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv) -# -# LibreELEC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# LibreELEC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with LibreELEC. If not, see . -################################################################################ - -echo "getting sources..." - if [ ! -d hyperion.git ]; then - git clone --depth 1 --recursive https://github.com/tvdzwan/hyperion hyperion.git - fi - - cd hyperion.git - git pull - GIT_REV=`git log -n1 --format=%h` - cd .. - -echo "copying sources..." - rm -rf hyperion-$GIT_REV - cp -R hyperion.git hyperion-$GIT_REV - -echo "cleaning sources..." - rm -rf hyperion-$GIT_REV/.git - -echo "packing sources..." - tar cvJf hyperion-$GIT_REV.tar.xz hyperion-$GIT_REV - -echo "remove temporary sourcedir..." - rm -rf hyperion-$GIT_REV