diff --git a/tools/mkpkg/mkpkg_hyperion b/packages/addons/addon-depends/rpi_ws281x/package.mk
old mode 100755
new mode 100644
similarity index 59%
rename from tools/mkpkg/mkpkg_hyperion
rename to packages/addons/addon-depends/rpi_ws281x/package.mk
index 39e4f31833..96ffdb5170
--- a/tools/mkpkg/mkpkg_hyperion
+++ b/packages/addons/addon-depends/rpi_ws281x/package.mk
@@ -1,7 +1,6 @@
-#!/bin/sh
################################################################################
# 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
# it under the terms of the GNU General Public License as published by
@@ -17,25 +16,26 @@
# 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
+PKG_NAME="rpi_ws281x"
+PKG_VERSION="dfcf740"
+PKG_REV="1"
+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
- git pull
- GIT_REV=`git log -n1 --format=%h`
- cd ..
+PKG_IS_ADDON="no"
+PKG_AUTORECONF="no"
-echo "copying sources..."
- rm -rf hyperion-$GIT_REV
- cp -R hyperion.git hyperion-$GIT_REV
+make_target() {
+ :
+}
-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
+makeinstall_target() {
+ :
+}
diff --git a/packages/addons/service/hyperion/changelog.txt b/packages/addons/service/hyperion/changelog.txt
index fd12f9d050..5068086e88 100644
--- a/packages/addons/service/hyperion/changelog.txt
+++ b/packages/addons/service/hyperion/changelog.txt
@@ -1,3 +1,6 @@
+8.0.101
+- Update to version d2f4725
+
8.0.100
- Update for LibreELEC 8.0
diff --git a/packages/addons/service/hyperion/package.mk b/packages/addons/service/hyperion/package.mk
index c755ff4b9c..18c94661b2 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="100"
+PKG_VERSION="d2f4725"
+PKG_REV="101"
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 \
@@ -92,7 +96,7 @@ addon() {
fi
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" \
$ADDON_BUILD/$PKG_ADDON_ID/config/hyperion.config.json.sample
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.