Permalink
Browse files

new package: libprojectM

  • Loading branch information...
stefansaraev committed Jul 4, 2015
1 parent e3a5d6d commit c597c2d5a5b664d8bc4db8563e2f5b0d615862be
@@ -0,0 +1,41 @@
################################################################################
# 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="libprojectM"
PKG_VERSION="2.0.0"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://projectm.sourceforge.net/"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain ftgl"
PKG_PRIORITY="optional"
PKG_SECTION="multimedia"
PKG_SHORTDESC="libprojectM:"
PKG_LONGDESC="libprojectM:"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
configure_target() {
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_PREFIX_PATH=$SYSROOT_PREFIX/usr \
-DBUILD_PROJECTM_STATIC=1 \
..
}
@@ -0,0 +1,38 @@
--- projectm/cmake/FindFreetype2.orig.cmake 2013-07-17 11:47:46.844351322 +0200
+++ projectm/cmake/FindFreetype2.cmake 2013-07-17 11:48:14.912350387 +0200
@@ -64,7 +64,7 @@
/sw/include/freetype2
${VISUS_INCLUDE}
${VISUS_INCLUDE}/freetype2
- NO_DEFAULT_PATH
+ # NO_DEFAULT_PATH
)
FIND_PATH(FREETYPE2_FT2BUILD ft2build.h
@@ -74,7 +74,7 @@
/usr/X11R6/include
/sw/include
${VISUS_INCLUDE}
- NO_DEFAULT_PATH
+ # NO_DEFAULT_PATH
)
FIND_PATH(FREETYPE2_FT_CONFIG bin/freetype-config
@@ -84,7 +84,7 @@
/usr/X11R6
/sw/bin
${VISUS_BINARY_DIR}
- NO_DEFAULT_PATH
+ # NO_DEFAULT_PATH
)
IF (NOT WIN32)
@@ -95,7 +95,7 @@
/usr/X11R6/lib
/sw/lib
${VISUS_LIBRARIES}
- NO_DEFAULT_PATH
+ # NO_DEFAULT_PATH
)
ELSE (NOT WIN32)
@@ -0,0 +1,108 @@
--- projectM-2.0.0-Source.orig/CMakeLists.txt 2009-12-01 07:38:42.000000000 +0100
+++ projectM-2.0.0-Source/CMakeLists.txt 2014-09-02 18:13:37.650948971 +0200
@@ -18,6 +18,7 @@
cmake_policy(SET CMP0005 OLD)
+ADD_DEFINITIONS(-fPIC)
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
${CMAKE_CURRENT_SOURCE_DIR}/cmake )
@@ -100,15 +101,6 @@
ADD_DEFINITIONS(-DUSE_FBO)
endif(USE_FBO)
-if(USE_FTGL)
-ADD_DEFINITIONS(-DUSE_FTGL)
-
-find_package( Freetype2 REQUIRED)
-include_directories( ${FREETYPE2_INCLUDE_DIR} )
-
-endif(USE_FTGL)
-
-
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
@@ -138,58 +130,54 @@
add_subdirectory(Renderer)
-#ADD_DEFINITIONS(-DCMAKE_INSTALL_PREFIX="\\\"${CMAKE_INSTALL_PREFIX}\\\"")
-
FIND_PACKAGE(OpenGL)
INCLUDE(FindPkgConfig.cmake)
-pkg_search_module (FTGL ftgl)
-
-#set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH};/opt/local/include;/Developer/SDKs/MACOSX10.5.sdk/usr/X11/include)
-#set(CMAKE_LIBRARY_PATH /opt/local/lib;/Developer/SDKs/MACOSX10.5.sdk;/Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/)
-
IF(USE_FTGL)
- if (FTGL_FOUND)
+ pkg_check_modules (FREETYPE freetype2)
+ if(FREETYPE_FOUND)
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(FREETYPE DEFAULT_MSG FREETYPE_INCLUDE_DIRS FREETYPE_LIBRARIES FREETYPE_LIBRARY_DIRS)
+ set(FREETYPE2_INCLUDE_DIR ${FREETYPE_INCLUDE_DIRS})
+ include_directories(${FREETYPE_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS}/include/freetype2)
+ endif()
+ message(STATUS "FREETYPE2_INCLUDE_DIR: ${FREETYPE2_INCLUDE_DIR}")
+
+ pkg_check_modules (FTGL ftgl)
+ if(FTGL_FOUND)
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(FTGL DEFAULT_MSG FTGL_INCLUDE_DIRS FTGL_LIBRARIES FTGL_LIBRARY_DIRS)
+ ADD_DEFINITIONS(-DUSE_FTGL)
+
MESSAGE(STATUS "[projectM] FTGL font support was detected and enabled.")
else (FTGL_FOUND)
- MESSAGE(STATUS
- "[projectM] Warning! FTGL has been enabled but not detected. Your compilation will probably break. Turn off FTGL support by setting USE_FTGL to false, or visit http://ftgl.wiki.sourceforge.net/ for help on installing FTGL.")
+ MESSAGE(FATAL_ERROR "[projectM] Warning! FTGL has been enabled but not detected. Your compilation will probably break. Turn off FTGL support by setting USE_FTGL to false, or visit http://ftgl.wiki.sourceforge.net/ for help on installing FTGL.")
endif (FTGL_FOUND)
- ADD_DEFINITIONS(-DUSE_FTGL)
-
set (FTGL_INCUDE_DIRS ${FTGL_INCLUDE_DIRS} ${CMAKE_INCLUDE_PATH} ${OPENGL_INCLUDE_DIR})
- set (FTGL_LINK_DIRS ${FTGL_LIBRARY_DIRS} )
+ set (FTGL_LINK_DIRS ${FTGL_LIBRARIES} )
+ set (FTGL_LINK_LIBS -L${FTGL_LIBRARY_DIRS} ${FTGL_LIBRARIES} -L${FREETYPE_LIBRARY_DIRS} ${FREETYPE_LIBRARIES})
set (FTGL_LINK_TARGETS ftgl freetype)
-ELSE (USE_FTGL)
- IF (FTGL_FOUND)
- MESSAGE(STATUS "[projectM] Warning: FTGL font support was detected but NOT enabled. You can enable it by setting USE_FTGL=true")
- ELSE (FTGL_FOUND)
- MESSAGE(STATUS "[projectM] Warning: FTGL font support was not detected. Visit http://ftgl.wiki.sourceforge.net/ for help on installing FTGL.")
- ENDIF(FTGL_FOUND)
-
- # todo: change this because its obscure and probably not being used
- set (FTGL_INCLUDE_DIRS "/opt/local/include")
- set (FTGL_LINK_DIRS )
- set (FTGL_LINK_TARGETS )
ENDIF(USE_FTGL)
-
IF(USE_OPENMP)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
ENDIF(USE_OPENMP)
INCLUDE_DIRECTORIES(${projectM_SOURCE_DIR} ${FTGL_INCLUDE_DIRS} ${Renderer_SOURCE_DIR} ${PRESET_FACTORY_SOURCES})
-LINK_DIRECTORIES(${FTGL_LINK_DIRS} ${Renderer_BINARY_DIR} ${PRESET_FACTORY_BINARY_DIR})
+LINK_DIRECTORIES(${Renderer_BINARY_DIR} ${PRESET_FACTORY_BINARY_DIR})
if(BUILD_PROJECTM_STATIC)
- TARGET_LINK_LIBRARIES(projectM ${GLEW_LINK_TARGETS} m ${FTGL_LINK_TARGETS} ${OPENGL_LIBRARIES} ${IMAGE_LINK_TARGETS} ${CG_LINK_TARGETS} ${PRESET_FACTORY_LINK_TARGETS})
+message(STATUS "OPENGL_LIBRARIES: ${OPENGL_LIBRARIES}")
+ set(OPENGL_LIBRARIES "-lGLEW -lGLU -lGL -lm -ldl -ldrm -lXdamage -lX11-xcb -lxcb-glx -lxcb-dri2 -lxcb-dri3 -lxcb-present -lxcb-sync -lxshmfence -lXxf86vm -lXfixes -lXext -lX11 -lpthread -lxcb -lXau -lXdmcp")
+message(STATUS "OPENGL_LIBRARIES: ${OPENGL_LIBRARIES}")
+ TARGET_LINK_LIBRARIES(projectM Renderer ${PRESET_FACTORY_LINK_TARGETS} ${GLEW_LINK_TARGETS} m ${FTGL_LINK_LIBS} ${OPENGL_LIBRARIES} ${IMAGE_LINK_TARGETS} ${CG_LINK_TARGETS})
else(BUILD_PROJECTM_STATIC)
-TARGET_LINK_LIBRARIES(projectM ${GLEW_LINK_TARGETS} m ${FTGL_LINK_TARGETS} ${OPENGL_LIBRARIES} ${IMAGE_LINK_TARGETS} ${CG_LINK_TARGETS} ${PRESET_FACTORY_LINK_TARGETS})
+ TARGET_LINK_LIBRARIES(projectM Renderer ${PRESET_FACTORY_LINK_TARGETS} ${GLEW_LINK_TARGETS} m dl ${FTGL_LINK_LIBS} ${OPENGL_LIBRARIES} ${IMAGE_LINK_TARGETS} ${CG_LINK_TARGETS})
endif(BUILD_PROJECTM_STATIC)
Oops, something went wrong.

0 comments on commit c597c2d

Please sign in to comment.