From d144306a339f6fbc2c0da2776aac018be1e4a618 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 12 May 2015 14:36:33 +0200 Subject: [PATCH 1/5] add ilmbase --- packages/graphics/ilmbase/package.mk | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 packages/graphics/ilmbase/package.mk diff --git a/packages/graphics/ilmbase/package.mk b/packages/graphics/ilmbase/package.mk new file mode 100644 index 0000000000..f03af23d0c --- /dev/null +++ b/packages/graphics/ilmbase/package.mk @@ -0,0 +1,39 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC 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. +# +# OpenELEC 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 OpenELEC. If not, see . +################################################################################ + +PKG_NAME="ilmbase" +PKG_VERSION="2.2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://www.openexr.com" +PKG_URL="http://download.savannah.nongnu.org/releases/openexr/ilmbase-2.2.0.tar.gz" +PKG_DEPENDS_TARGET="mesa" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="ilmbase:" +PKG_LONGDESC="ilmbase:" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +PKG_CONFIGURE_OPTS_TARGET="--enable-static --disable-shared" + +pre_configure_target() { + pushd .. && ./bootstrap && popd +} From f472f1df32d50a2ac56fdc815404cd7eea65f2f7 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 12 May 2015 14:36:39 +0200 Subject: [PATCH 2/5] add openexr --- packages/graphics/openexr/package.mk | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 packages/graphics/openexr/package.mk diff --git a/packages/graphics/openexr/package.mk b/packages/graphics/openexr/package.mk new file mode 100644 index 0000000000..b1ba991033 --- /dev/null +++ b/packages/graphics/openexr/package.mk @@ -0,0 +1,39 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC 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. +# +# OpenELEC 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 OpenELEC. If not, see . +################################################################################ + +PKG_NAME="openexr" +PKG_VERSION="2.2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://www.openexr.com" +PKG_URL="http://download.savannah.nongnu.org/releases/openexr/openexr-2.2.0.tar.gz" +PKG_DEPENDS_TARGET="ilmbase" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="openexr:" +PKG_LONGDESC="openexr:" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +PKG_CONFIGURE_OPTS_TARGET="--enable-static --disable-shared" + +pre_configure_target() { + pushd .. && ./bootstrap && popd +} From 4ace15ad95443a5fe0d9d80706e65d4edbfa7f23 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 12 May 2015 14:36:44 +0200 Subject: [PATCH 3/5] add glfw --- packages/graphics/glfw/package.mk | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 packages/graphics/glfw/package.mk diff --git a/packages/graphics/glfw/package.mk b/packages/graphics/glfw/package.mk new file mode 100644 index 0000000000..30601ce3d6 --- /dev/null +++ b/packages/graphics/glfw/package.mk @@ -0,0 +1,45 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC 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. +# +# OpenELEC 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 OpenELEC. If not, see . +################################################################################ + +PKG_NAME="glfw" +PKG_VERSION="2.7.9" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://glfw.org" +PKG_URL="$SOURCEFORGE_SRC/glfw/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain mesa" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="glfw:" +PKG_LONGDESC="glfw:" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +if [ ! "$OPENGL" = "no" ]; then + PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET $OPENGL glu" +fi + +make_target() { + make x11 PREFIX=$SYSROOT_PREFIX/usr +} + +makeinstall_target() { + make x11-install PREFIX=$SYSROOT_PREFIX/usr +} From c07ad213cc47be4875a038bd51844776a6637f1a Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 12 May 2015 15:02:08 +0200 Subject: [PATCH 4/5] add vsxu --- packages/graphics/vsxu/package.mk | 59 +++++++++++++++ .../vsxu/patches/vsxu-01-fix-order.patch | 75 +++++++++++++++++++ .../vsxu/patches/vsxu-02-fix-glfw.patch | 27 +++++++ .../vsxu/patches/vsxu-03-fix-exr.patch | 11 +++ .../vsxu/patches/vsxu-04-fix-freetype.patch | 11 +++ 5 files changed, 183 insertions(+) create mode 100644 packages/graphics/vsxu/package.mk create mode 100644 packages/graphics/vsxu/patches/vsxu-01-fix-order.patch create mode 100644 packages/graphics/vsxu/patches/vsxu-02-fix-glfw.patch create mode 100644 packages/graphics/vsxu/patches/vsxu-03-fix-exr.patch create mode 100644 packages/graphics/vsxu/patches/vsxu-04-fix-freetype.patch diff --git a/packages/graphics/vsxu/package.mk b/packages/graphics/vsxu/package.mk new file mode 100644 index 0000000000..a68a942f77 --- /dev/null +++ b/packages/graphics/vsxu/package.mk @@ -0,0 +1,59 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC 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. +# +# OpenELEC 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 OpenELEC. If not, see . +################################################################################ + +PKG_NAME="vsxu" +PKG_VERSION="0.5.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.vsxu.com" +# repackaged from https://github.com/vovoid/vsxu/archive/$PKG_VERSION.tar.gz +PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain glew glfw" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="vsxu:" +PKG_LONGDESC="vsxu:" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +configure_target() { + cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib \ + -DCMAKE_INSTALL_LIBDIR_NOARCH=/usr/lib \ + -DCMAKE_INSTALL_PREFIX_TOOLCHAIN=$SYSROOT_PREFIX/usr \ + -DCMAKE_PREFIX_PATH=$SYSROOT_PREFIX/usr \ + -DBUILD_SHARED_LIBS=0 \ + -DVSXU_STATIC=1 \ + -DCMAKE_POSITION_INDEPENDENT_CODE=1 \ + -DCMAKE_CXX_FLAGS="-I$SYSROOT_PREFIX/usr/include/freetype2" \ + .. +} + +post_makeinstall_target() { + mkdir -p $SYSROOT_PREFIX/usr/lib/vsxu + cp -PR $INSTALL/usr/lib/* $SYSROOT_PREFIX/usr/lib + + mkdir -p $SYSROOT_PREFIX/usr/include/ + cp -RP $INSTALL/usr/include/* $SYSROOT_PREFIX/usr/include + + mkdir -p $SYSROOT_PREFIX/usr/share/ + cp -RP $INSTALL/usr/share/vsxu $SYSROOT_PREFIX/usr/share +} diff --git a/packages/graphics/vsxu/patches/vsxu-01-fix-order.patch b/packages/graphics/vsxu/patches/vsxu-01-fix-order.patch new file mode 100644 index 0000000000..8709295fc5 --- /dev/null +++ b/packages/graphics/vsxu/patches/vsxu-01-fix-order.patch @@ -0,0 +1,75 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e61faf..435cf29 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -389,10 +389,11 @@ add_definitions(-DVSXU_INSTALL_LIB_DIR="${VSXU_INSTALL_LIB_DIR}") + ################################################################################ + # VSXU LIBRARIES ############################################################### + ################################################################################ +-add_subdirectory(engine) + add_subdirectory(engine_audiovisual) + add_subdirectory(engine_graphics) ++# order matters - need to add plugins before engine to create static glue + add_subdirectory(plugins) ++add_subdirectory(engine) + add_subdirectory(widget) + + ################################################################################ +--- vsxu-0.5.1/CMakeLists.txt.orig 2015-05-12 14:43:04.427596836 +0200 ++++ vsxu-0.5.1/CMakeLists.txt 2015-05-12 14:43:13.995596648 +0200 +@@ -56,27 +56,6 @@ + endif() + + ################################################################################ +-# The pkg-config file +-################################################################################ +-IF (UNIX OR VSXU_WINDOWS_LIB_BUILD) +- if (VSXU_STATIC EQUAL 1 AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugins/static_factory_pkgconfig_libs") +- file (STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/plugins/static_factory_pkgconfig_libs" VSXU_PLUGIN_PKGCONFIG_LIBS) +- CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/libvsxu.pc.in.static +- ${CMAKE_CURRENT_BINARY_DIR}/libvsxu.pc +- @ONLY) +- +- else() +- CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/libvsxu.pc.in.dynamic +- ${CMAKE_CURRENT_BINARY_DIR}/libvsxu.pc +- @ONLY) +- endif() +- +- INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/libvsxu.pc +- DESTINATION ${VSXU_INSTALL_LIB_DIR}/pkgconfig) +-ENDIF() +- +- +-################################################################################ + # CPACK OPTIONS ################################################################ + ################################################################################ + SET(CPACK_PACKAGE_NAME "vsxu") +@@ -417,6 +396,27 @@ + add_subdirectory(tools/vsxl) + endif(UNIX) + ++################################################################################ ++# The pkg-config file ++################################################################################ ++IF (UNIX OR VSXU_WINDOWS_LIB_BUILD) ++ if (VSXU_STATIC EQUAL 1 AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugins/static_factory_pkgconfig_libs") ++ file (STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/plugins/static_factory_pkgconfig_libs" VSXU_PLUGIN_PKGCONFIG_LIBS) ++ CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/libvsxu.pc.in.static ++ ${CMAKE_CURRENT_BINARY_DIR}/libvsxu.pc ++ @ONLY) ++ ++ else() ++ CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/libvsxu.pc.in.dynamic ++ ${CMAKE_CURRENT_BINARY_DIR}/libvsxu.pc ++ @ONLY) ++ endif() ++ ++ INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/libvsxu.pc ++ DESTINATION ${VSXU_INSTALL_LIB_DIR}/pkgconfig) ++ENDIF() ++ ++ + + + diff --git a/packages/graphics/vsxu/patches/vsxu-02-fix-glfw.patch b/packages/graphics/vsxu/patches/vsxu-02-fix-glfw.patch new file mode 100644 index 0000000000..6df9c7bb0d --- /dev/null +++ b/packages/graphics/vsxu/patches/vsxu-02-fix-glfw.patch @@ -0,0 +1,27 @@ +--- vsxu-0.5.1/cmake/modules/FindGLFW.cmake.orig 2015-05-12 14:22:23.123621176 +0200 ++++ vsxu-0.5.1/cmake/modules/FindGLFW.cmake 2015-05-12 14:23:14.863620161 +0200 +@@ -19,6 +19,14 @@ + # TODO: + # Allow the user to select to link to a shared library or to a static library. + ++find_package(PkgConfig) ++ ++pkg_check_modules(GLFW libglfw) ++set(GLFW_INCLUDE_PATH ${GLFW_INCLUDE_DIRS}) ++set(GLFW_LIBRARY ${GLFW_LIBRARIES} -lXrandr) ++ ++if(NOT GLFW_FOUND) ++ + #Search for the include file... + FIND_PATH(GLFW_INCLUDE_PATH GL/glfw.h DOC "Path to GLFW include directory." + HINTS +@@ -45,5 +53,7 @@ + ${GLFW_ROOT_DIR}/lib-msvc100/release # added by ptr + ) + ++endif() ++ + INCLUDE(FindPackageHandleStandardArgs) +-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLFW DEFAULT_MSG GLFW_LIBRARY GLFW_INCLUDE_PATH) +\ No newline at end of file ++FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLFW DEFAULT_MSG GLFW_LIBRARY GLFW_INCLUDE_PATH) diff --git a/packages/graphics/vsxu/patches/vsxu-03-fix-exr.patch b/packages/graphics/vsxu/patches/vsxu-03-fix-exr.patch new file mode 100644 index 0000000000..34530a5f83 --- /dev/null +++ b/packages/graphics/vsxu/patches/vsxu-03-fix-exr.patch @@ -0,0 +1,11 @@ +--- vsxu-0.5.1/plugins/src/texture/CMakeLists.txt.orig 2015-05-12 14:04:42.659641970 +0200 ++++ vsxu-0.5.1/plugins/src/texture/CMakeLists.txt 2015-05-12 14:05:43.315640780 +0200 +@@ -8,7 +8,7 @@ + + message("configuring vsxu module " ${module_id}) + +-include_directories(/usr/include/OpenEXR) ++#include_directories(/usr/include/OpenEXR) + + # set defines for MOD_CM, MOD_DM, MOD_NM + CREATE_STATIC_GLUE(${module_id}) diff --git a/packages/graphics/vsxu/patches/vsxu-04-fix-freetype.patch b/packages/graphics/vsxu/patches/vsxu-04-fix-freetype.patch new file mode 100644 index 0000000000..36213245cf --- /dev/null +++ b/packages/graphics/vsxu/patches/vsxu-04-fix-freetype.patch @@ -0,0 +1,11 @@ +--- vsxu-0.5.1/plugins/src/render.text/CMakeLists.txt.orig 2015-05-12 14:07:20.367638877 +0200 ++++ vsxu-0.5.1/plugins/src/render.text/CMakeLists.txt 2015-05-12 14:07:24.371638799 +0200 +@@ -20,7 +20,7 @@ + endif(WIN32) + + if(UNIX) +- include_directories(/usr/include/freetype2) ++ # include_directories(/usr/include/freetype2) + endif(UNIX) + + # include common From b9ae39cc5da719c3ddf73edd9a9e704a0914fdf3 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 13 May 2015 09:27:23 +0200 Subject: [PATCH 5/5] add visualization.vsxu --- .../visualization.vsxu/package.mk | 52 +++++++++++++++++++ tools/mkpkg/mkpkg_visualization.vsxu | 43 +++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 packages/mediacenter/kodi-binary-addons/visualization.vsxu/package.mk create mode 100755 tools/mkpkg/mkpkg_visualization.vsxu diff --git a/packages/mediacenter/kodi-binary-addons/visualization.vsxu/package.mk b/packages/mediacenter/kodi-binary-addons/visualization.vsxu/package.mk new file mode 100644 index 0000000000..30864159cb --- /dev/null +++ b/packages/mediacenter/kodi-binary-addons/visualization.vsxu/package.mk @@ -0,0 +1,52 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC 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. +# +# OpenELEC 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 OpenELEC. If not, see . +################################################################################ + +PKG_NAME="visualization.vsxu" +PKG_VERSION="059e5e0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="https://github.com/notspiff/visualization.vsxu" +PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS_TARGET="toolchain kodi-platform vsxu" +PKG_PRIORITY="optional" +PKG_SECTION="" +PKG_SHORTDESC="visualization.vsxu" +PKG_LONGDESC="visualization.vsxu" +PKG_AUTORECONF="no" + +PKG_IS_ADDON="yes" +PKG_ADDON_TYPE="xbmc.player.musicviz" + +if [ "$OPENGL" = "no" ] ; then + exit 0 +fi + +configure_target() { + cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_MODULE_PATH=$SYSROOT_PREFIX/usr/lib/kodi \ + -DCMAKE_PREFIX_PATH=$SYSROOT_PREFIX/usr \ + .. +} + +addon() { + mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/ + cp -PR $PKG_BUILD/.install_pkg/usr/share/kodi/addons/$PKG_NAME/* $ADDON_BUILD/$PKG_ADDON_ID/ + cp -PL $PKG_BUILD/.install_pkg/usr/lib/kodi/addons/$PKG_NAME/*.so $ADDON_BUILD/$PKG_ADDON_ID/ +} diff --git a/tools/mkpkg/mkpkg_visualization.vsxu b/tools/mkpkg/mkpkg_visualization.vsxu new file mode 100755 index 0000000000..7a5bbd6d28 --- /dev/null +++ b/tools/mkpkg/mkpkg_visualization.vsxu @@ -0,0 +1,43 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program 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, or (at your option) +# any later version. +# +# This Program 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +echo "getting sources..." + if [ ! -d visualization.vsxu.git ]; then + git clone https://github.com/notspiff/visualization.vsxu.git visualization.vsxu.git + fi + + cd visualization.vsxu.git + git pull + GIT_REV=`git log -n1 --format=%h` + cd .. + +echo "copying sources..." + rm -rf visualization.vsxu-$GIT_REV + cp -R visualization.vsxu.git visualization.vsxu-$GIT_REV + +echo "cleaning sources..." + rm -rf visualization.vsxu-$GIT_REV/.git + +echo "packing sources..." + tar cvJf visualization.vsxu-$GIT_REV.tar.xz visualization.vsxu-$GIT_REV + +echo "remove temporary sourcedir..." + rm -rf visualization.vsxu-$GIT_REV