mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #446 from lrusak/hyperion
hyperion: update to d2f4725
This commit is contained in:
commit
e8746f9cc1
42
tools/mkpkg/mkpkg_hyperion → packages/addons/addon-depends/rpi_ws281x/package.mk
Executable file → Normal file
42
tools/mkpkg/mkpkg_hyperion → packages/addons/addon-depends/rpi_ws281x/package.mk
Executable file → Normal file
@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# This file is part of LibreELEC - https://libreelec.tv
|
# This file is part of LibreELEC - https://libreelec.tv
|
||||||
# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)
|
# Copyright (C) 2016 Team LibreELEC
|
||||||
#
|
#
|
||||||
# LibreELEC is free software: you can redistribute it and/or modify
|
# LibreELEC is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -17,25 +16,26 @@
|
|||||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
echo "getting sources..."
|
PKG_NAME="rpi_ws281x"
|
||||||
if [ ! -d hyperion.git ]; then
|
PKG_VERSION="dfcf740"
|
||||||
git clone --depth 1 --recursive https://github.com/tvdzwan/hyperion hyperion.git
|
PKG_REV="1"
|
||||||
fi
|
PKG_ARCH="any"
|
||||||
|
PKG_LICENSE=""
|
||||||
|
PKG_SITE="https://github.com/penfold42/rpi_ws281x"
|
||||||
|
PKG_URL="https://github.com/penfold42/rpi_ws281x/archive/$PKG_VERSION.tar.gz"
|
||||||
|
PKG_DEPENDS_TARGET="toolchain"
|
||||||
|
PKG_PRIORITY="optional"
|
||||||
|
PKG_SECTION=""
|
||||||
|
PKG_SHORTDESC="Userspace Raspberry Pi PWM library for WS281X LEDs"
|
||||||
|
PKG_LONGDESC="Userspace Raspberry Pi PWM library for WS281X LEDs"
|
||||||
|
|
||||||
cd hyperion.git
|
PKG_IS_ADDON="no"
|
||||||
git pull
|
PKG_AUTORECONF="no"
|
||||||
GIT_REV=`git log -n1 --format=%h`
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
echo "copying sources..."
|
make_target() {
|
||||||
rm -rf hyperion-$GIT_REV
|
:
|
||||||
cp -R hyperion.git hyperion-$GIT_REV
|
}
|
||||||
|
|
||||||
echo "cleaning sources..."
|
makeinstall_target() {
|
||||||
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
|
|
@ -1,3 +1,6 @@
|
|||||||
|
8.0.101
|
||||||
|
- Update to version d2f4725
|
||||||
|
|
||||||
8.0.100
|
8.0.100
|
||||||
- Update for LibreELEC 8.0
|
- Update for LibreELEC 8.0
|
||||||
|
|
||||||
|
@ -17,12 +17,12 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="hyperion"
|
PKG_NAME="hyperion"
|
||||||
PKG_VERSION="f64b6eb"
|
PKG_VERSION="d2f4725"
|
||||||
PKG_REV="100"
|
PKG_REV="101"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
PKG_SITE="https://github.com/tvdzwan/hyperion"
|
PKG_SITE="https://github.com/tvdzwan/hyperion"
|
||||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
PKG_URL="https://github.com/tvdzwan/hyperion/archive/$PKG_VERSION.tar.gz"
|
||||||
PKG_DEPENDS_TARGET="toolchain Python libusb qt protobuf"
|
PKG_DEPENDS_TARGET="toolchain Python libusb qt protobuf rpi_ws281x"
|
||||||
PKG_SECTION="service"
|
PKG_SECTION="service"
|
||||||
PKG_SHORTDESC="Hyperion: an AmbiLight controller"
|
PKG_SHORTDESC="Hyperion: an AmbiLight controller"
|
||||||
PKG_LONGDESC="Hyperion($PKG_VERSION) is an modern opensource AmbiLight implementation."
|
PKG_LONGDESC="Hyperion($PKG_VERSION) is an modern opensource AmbiLight implementation."
|
||||||
@ -48,6 +48,10 @@ elif [ "$DISPLAYSERVER" = "x11" ]; then
|
|||||||
X11_SUPPORT="-DENABLE_X11=1"
|
X11_SUPPORT="-DENABLE_X11=1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pre_build_target() {
|
||||||
|
cp -a $(get_build_dir rpi_ws281x)/* $ROOT/$PKG_BUILD/dependencies/external/rpi_ws281x
|
||||||
|
}
|
||||||
|
|
||||||
configure_target() {
|
configure_target() {
|
||||||
echo "" > ../cmake/FindGitVersion.cmake
|
echo "" > ../cmake/FindGitVersion.cmake
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
|
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
|
||||||
@ -59,7 +63,7 @@ configure_target() {
|
|||||||
$DISPMANX_SUPPORT \
|
$DISPMANX_SUPPORT \
|
||||||
$FB_SUPPORT \
|
$FB_SUPPORT \
|
||||||
-DENABLE_OSX=0 \
|
-DENABLE_OSX=0 \
|
||||||
-DENABLE_PROTOBUF=1 \
|
-DUSE_SYSTEM_PROTO_LIBS=ON \
|
||||||
-DENABLE_SPIDEV=1 \
|
-DENABLE_SPIDEV=1 \
|
||||||
-DENABLE_TINKERFORGE=0 \
|
-DENABLE_TINKERFORGE=0 \
|
||||||
-DENABLE_V4L2=1 \
|
-DENABLE_V4L2=1 \
|
||||||
@ -92,7 +96,7 @@ addon() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config
|
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config
|
||||||
cp -P $PKG_BUILD/config/hyperion.config.json $ADDON_BUILD/$PKG_ADDON_ID/config/hyperion.config.json.sample
|
cp -P $PKG_BUILD/config/hyperion.config.json.example $ADDON_BUILD/$PKG_ADDON_ID/config/hyperion.config.json.sample
|
||||||
sed -i -e "s,/opt/hyperion/effects,/storage/.kodi/addons/service.hyperion/effects,g" \
|
sed -i -e "s,/opt/hyperion/effects,/storage/.kodi/addons/service.hyperion/effects,g" \
|
||||||
$ADDON_BUILD/$PKG_ADDON_ID/config/hyperion.config.json.sample
|
$ADDON_BUILD/$PKG_ADDON_ID/config/hyperion.config.json.sample
|
||||||
|
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
From 0ce04b692b7c3e4414c46402c389215f7b0aac48 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonas Karlman <jonas@kwiboo.se>
|
|
||||||
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
|
|
||||||
|
|
@ -0,0 +1,76 @@
|
|||||||
|
From f0884ec25b5f56cea3ed135efaf5fca744d3f1ee Mon Sep 17 00:00:00 2001
|
||||||
|
From: redPanther <redPanther@users.noreply.github.com>
|
||||||
|
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)
|
@ -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.
|
|
Loading…
x
Reference in New Issue
Block a user