Merge pull request #4143 from notspiff/add_vsxu

Add visualization.vsxu
This commit is contained in:
Stefan Saraev 2015-05-13 11:07:43 +03:00
commit 93ca4c624d
10 changed files with 401 additions and 0 deletions

View File

@ -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 <http://www.gnu.org/licenses/>.
################################################################################
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
}

View File

@ -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 <http://www.gnu.org/licenses/>.
################################################################################
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
}

View File

@ -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 <http://www.gnu.org/licenses/>.
################################################################################
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
}

View File

@ -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 <http://www.gnu.org/licenses/>.
################################################################################
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
}

View File

@ -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()
+
+

View File

@ -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)

View File

@ -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})

View File

@ -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

View File

@ -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 <http://www.gnu.org/licenses/>.
################################################################################
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/
}

View File

@ -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