mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
commit
0491f74ac7
107
packages/addons/addon-depends/qt/package.mk
Normal file
107
packages/addons/addon-depends/qt/package.mk
Normal file
@ -0,0 +1,107 @@
|
||||
################################################################################
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="qt"
|
||||
PKG_VERSION="4.8.7"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://qt-project.org"
|
||||
PKG_URL="http://download.qt-project.org/official_releases/qt/4.8/${PKG_VERSION}/qt-everywhere-opensource-src-${PKG_VERSION}.tar.gz"
|
||||
PKG_SOURCE_DIR="qt-everywhere-opensource-src-${PKG_VERSION}"
|
||||
PKG_DEPENDS_TARGET="toolchain Python zlib:host zlib"
|
||||
PKG_SHORTDESC="Qt GUI toolkit"
|
||||
PKG_LONGDESC="Qt GUI toolkit"
|
||||
|
||||
QMAKE_CONF_DIR="mkspecs/qws/linux-openelec-g++"
|
||||
QMAKE_CONF="${QMAKE_CONF_DIR}/qmake.conf"
|
||||
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="-prefix /usr \
|
||||
-hostprefix $SYSROOT_PREFIX \
|
||||
-xplatform qws/linux-openelec-g++ \
|
||||
-make libs \
|
||||
-force-pkg-config \
|
||||
-release \
|
||||
-opensource -confirm-license \
|
||||
-static \
|
||||
-fast \
|
||||
-no-accessibility \
|
||||
-no-sql-mysql -no-sql-sqlite \
|
||||
-no-qt3support \
|
||||
-no-xmlpatterns \
|
||||
-no-multimedia \
|
||||
-no-audio-backend \
|
||||
-no-phonon -no-phonon-backend \
|
||||
-no-svg \
|
||||
-no-webkit \
|
||||
-no-javascript-jit \
|
||||
-no-script \
|
||||
-no-scripttools \
|
||||
-no-declarative -no-declarative-debug \
|
||||
-no-neon \
|
||||
-system-zlib \
|
||||
-no-gif \
|
||||
-no-libtiff \
|
||||
-no-libpng \
|
||||
-no-libmng \
|
||||
-no-libjpeg \
|
||||
-no-openssl \
|
||||
-no-rpath \
|
||||
-silent \
|
||||
-optimized-qmake \
|
||||
-no-nis \
|
||||
-no-cups \
|
||||
-no-pch \
|
||||
-no-dbus \
|
||||
-reduce-relocations \
|
||||
-reduce-exports \
|
||||
-no-separate-debug-info \
|
||||
-no-fontconfig \
|
||||
-no-glib \
|
||||
-embedded $TARGET_ARCH"
|
||||
|
||||
configure_target() {
|
||||
cd ..
|
||||
mkdir -p $QMAKE_CONF_DIR
|
||||
echo "include(../../common/linux.conf)" > $QMAKE_CONF
|
||||
echo "include(../../common/gcc-base-unix.conf)" >> $QMAKE_CONF
|
||||
echo "include(../../common/g++-unix.conf)" >> $QMAKE_CONF
|
||||
echo "include(../../common/qws.conf)" >> $QMAKE_CONF
|
||||
echo "QMAKE_CC = $CC" >> $QMAKE_CONF
|
||||
echo "QMAKE_CXX = $CXX" >> $QMAKE_CONF
|
||||
echo "QMAKE_LINK = $CXX" >> $QMAKE_CONF
|
||||
echo "QMAKE_LINK_SHLIB = $CXX" >> $QMAKE_CONF
|
||||
echo "QMAKE_AR = $AR cqs" >> $QMAKE_CONF
|
||||
echo "QMAKE_OBJCOPY = $OBJCOPY" >> $QMAKE_CONF
|
||||
echo "QMAKE_STRIP = $STRIP" >> $QMAKE_CONF
|
||||
echo "QMAKE_CFLAGS = $CFLAGS" >> $QMAKE_CONF
|
||||
echo "QMAKE_CXXFLAGS = $CXXFLAGS" >> $QMAKE_CONF
|
||||
echo "QMAKE_LFLAGS = $LDFLAGS" >> $QMAKE_CONF
|
||||
echo "load(qt_config)" >> $QMAKE_CONF
|
||||
echo '#include "../../linux-g++/qplatformdefs.h"' >> $QMAKE_CONF_DIR/qplatformdefs.h
|
||||
|
||||
CC="" CXX="" LD="" RANLIB="" AR="" AS="" CPPFLAGS="" CFLAGS="" LDFLAGS="" CXXFLAGS="" \
|
||||
PKG_CONFIG_SYSROOT_DIR="$SYSROOT_PREFIX" \
|
||||
PKG_CONFIG="$ROOT/$TOOLCHAIN/bin/pkg-config" \
|
||||
PKG_CONFIG_PATH="$SYSROOT_PREFIX/usr/lib/pkgconfig" \
|
||||
./configure $PKG_CONFIGURE_OPTS_TARGET
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
mkdir -p $ROOT/$TOOLCHAIN/bin
|
||||
cp -P $ROOT/$PKG_BUILD/bin/qmake $ROOT/$TOOLCHAIN/bin
|
||||
}
|
BIN
packages/addons/service/hyperion/icon/icon.png
Normal file
BIN
packages/addons/service/hyperion/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
94
packages/addons/service/hyperion/package.mk
Normal file
94
packages/addons/service/hyperion/package.mk
Normal file
@ -0,0 +1,94 @@
|
||||
################################################################################
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="hyperion"
|
||||
PKG_VERSION="f64b6eb"
|
||||
PKG_REV="0"
|
||||
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"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="hyperion: an ambilight controller"
|
||||
PKG_LONGDESC="$PKG_NAME-$PKG_VERSION\nHyperion is an opensource 'AmbiLight' implementation"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Hyperion"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
PKG_MAINTAINER="Lukas Rusak (lrusak@libreelec.tv)"
|
||||
|
||||
AMLOGIC_SUPPORT="-DENABLE_AMLOGIC=0"
|
||||
DISPMANX_SUPPORT="-DENABLE_DISPMANX=0"
|
||||
FB_SUPPORT="-DENABLE_FB=1"
|
||||
X11_SUPPORT="-DENABLE_X11=0"
|
||||
|
||||
if [ "$KODIPLAYER_DRIVER" = "libamcodec" ]; then
|
||||
AMLOGIC_SUPPORT="-DENABLE_AMLOGIC=1"
|
||||
elif [ "$KODIPLAYER_DRIVER" = "bcm2835-driver" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET bcm2835-driver"
|
||||
DISPMANX_SUPPORT="-DENABLE_DISPMANX=1"
|
||||
FB_SUPPORT="-DENABLE_FB=0"
|
||||
elif [ "$DISPLAYSERVER" = "x11" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET xorg-server"
|
||||
X11_SUPPORT="-DENABLE_X11=1"
|
||||
fi
|
||||
|
||||
configure_target() {
|
||||
echo "" > ../cmake/FindGitVersion.cmake
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_PREFIX_PATH=$SYSROOT_PREFIX/usr \
|
||||
-DQT_QMAKE_EXECUTABLE=$ROOT/$TOOLCHAIN/bin/qmake \
|
||||
-DHYPERION_VERSION_ID="$PKG_VERSION" \
|
||||
$AMLOGIC_SUPPORT \
|
||||
$DISPMANX_SUPPORT \
|
||||
$FB_SUPPORT \
|
||||
-DENABLE_OSX=0 \
|
||||
-DENABLE_PROTOBUF=0 \
|
||||
-DENABLE_SPIDEV=1 \
|
||||
-DENABLE_TINKERFORGE=0 \
|
||||
-DENABLE_V4L2=0 \
|
||||
-DENABLE_WS2812BPWM=0 \
|
||||
-DENABLE_WS281XPWM=1 \
|
||||
$X11_SUPPORT \
|
||||
-DENABLE_QT5=0 \
|
||||
-DENABLE_TESTS=0 \
|
||||
-Wno-dev \
|
||||
..
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
: # nothing to do here
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $PKG_BUILD/.$TARGET_NAME/bin/hyperiond $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $PKG_BUILD/.$TARGET_NAME/bin/hyperion-remote $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
|
||||
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
|
||||
sed -i -e "s,/opt/hyperion/effects,/storage/.kodi/addons/service.hyperion/effects,g" \
|
||||
$ADDON_BUILD/$PKG_ADDON_ID/config/hyperion.config.json.sample
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/effects
|
||||
cp -PR $PKG_BUILD/effects/* $ADDON_BUILD/$PKG_ADDON_ID/effects
|
||||
|
||||
debug_strip $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
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.
|
24
packages/addons/service/hyperion/source/bin/hyperiond.start
Normal file
24
packages/addons/service/hyperion/source/bin/hyperiond.start
Normal file
@ -0,0 +1,24 @@
|
||||
#!/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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
|
||||
oe_setup_addon service.hyperion
|
||||
|
||||
exec hyperiond $ADDON_HOME/hyperion.config.json
|
22
packages/addons/service/hyperion/source/default.py
Normal file
22
packages/addons/service/hyperion/source/default.py
Normal file
@ -0,0 +1,22 @@
|
||||
################################################################################
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import xbmc
|
||||
|
||||
monitor = xbmc.Monitor()
|
||||
monitor.waitForAbort()
|
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Hyperion service
|
||||
After=graphical.target
|
||||
ConditionPathExists=/storage/.kodi/userdata/addon_data/service.hyperion/hyperion.config.json
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/service.hyperion/bin/hyperiond.start"
|
||||
TimeoutStopSec=2
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
StartLimitInterval=0
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
@ -48,6 +48,9 @@ echo 1 > /sys/class/graphics/fb1/blank
|
||||
# Disable framebuffer scaling
|
||||
echo 0 > /sys/class/graphics/fb0/free_scale
|
||||
|
||||
# set initial video state
|
||||
echo 1 > /sys/class/video/disable_video
|
||||
|
||||
# Set framebuffer geometry to match the resolution
|
||||
case "$hdmimode" in
|
||||
720*)
|
||||
|
@ -46,6 +46,9 @@ echo 0 > /sys/class/graphics/fb0/blank
|
||||
# Disable framebuffer scaling
|
||||
echo 0 > /sys/class/graphics/fb0/free_scale
|
||||
|
||||
# set initial video state
|
||||
echo 1 > /sys/class/video/disable_video
|
||||
|
||||
# Set framebuffer geometry to match the resolution
|
||||
case "$hdmimode" in
|
||||
720*)
|
||||
|
41
tools/mkpkg/mkpkg_hyperion
Executable file
41
tools/mkpkg/mkpkg_hyperion
Executable file
@ -0,0 +1,41 @@
|
||||
#!/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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user