From c6f4cd18ab706868be0eff10327a0dcd58cecdf3 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 17 Feb 2013 00:45:16 -0800 Subject: Sun Feb 17 00:45:00 PST 2013 --- community/performous/PKGBUILD | 18 ++- community/performous/performous-0.7.0-cmake.patch | 155 ++++++++++++++++++++++ 2 files changed, 166 insertions(+), 7 deletions(-) create mode 100644 community/performous/performous-0.7.0-cmake.patch (limited to 'community/performous') diff --git a/community/performous/PKGBUILD b/community/performous/PKGBUILD index 64e5b04ff..ce57e7121 100644 --- a/community/performous/PKGBUILD +++ b/community/performous/PKGBUILD @@ -1,22 +1,26 @@ -# $Id: PKGBUILD 83265 2013-01-28 16:49:52Z stephane $ +# $Id: PKGBUILD 84361 2013-02-16 22:50:39Z ioni $ # Maintainer : Laurent Carlier # Contributor: Christoph Zeiler pkgname=performous pkgver=0.7.0 -pkgrel=3 +pkgrel=4 pkgdesc='A free game like "Singstar", "Rockband" or "Stepmania"' arch=('i686' 'x86_64') url="http://performous.org/" license=('GPL') depends=('boost-libs' 'imagemagick' 'glew' 'libxml++' 'portaudio' 'portmidi' 'librsvg' 'ffmpeg') # opencv -makedepends=('cmake' 'pkgconfig' 'help2man' 'boost>=1.50' 'mesa') +makedepends=('cmake' 'pkgconfig' 'help2man' 'boost' 'mesa') optdepends=('performous-freesongs: free songs for performous') -source=(http://sourceforge.net/projects/$pkgname/files/$pkgname/$pkgver/performous-$pkgver.tar.bz2) -md5sums=('60f3f72b51a630a4aa996484aedb9526') +source=(http://sourceforge.net/projects/$pkgname/files/$pkgname/$pkgver/performous-$pkgver.tar.bz2 + performous-0.7.0-cmake.patch) +md5sums=('60f3f72b51a630a4aa996484aedb9526' + '7da8aef3f4dd28e19f95957ae9ac2bb1') build() { - cd ${srcdir}/performous-${pkgver} + cd performous-${pkgver} + + patch -Np0 -i ../performous-0.7.0-cmake.patch mkdir -p build cd build @@ -28,7 +32,7 @@ build() { } package() { - cd ${srcdir}/performous-${pkgver}/build + cd performous-${pkgver}/build make DESTDIR="$pkgdir" install } diff --git a/community/performous/performous-0.7.0-cmake.patch b/community/performous/performous-0.7.0-cmake.patch new file mode 100644 index 000000000..4c6f47b63 --- /dev/null +++ b/community/performous/performous-0.7.0-cmake.patch @@ -0,0 +1,155 @@ +From: Julian Ospald +Date: Thu Jan 24 13:13:50 UTC 2013 +Subject: build system + + - fix opencv module to prefer pkg-config results + - fix some module and macro names and try to use + system modules as much as possible (ALSA Boost Gettext Jpeg Png Tiff Z) + +--- cmake/Modules/FindOpenCV.cmake ++++ cmake/Modules/FindOpenCV.cmake +@@ -57,13 +57,21 @@ + include(FindPkgConfig) + if(PKG_CONFIG_FOUND) + pkg_check_modules(OPENCV_PKGCONF opencv) +- set(OpenCV_DIR ${OPENCV_PKGCONF_PREFIX}) +- if(EXISTS "${OpenCV_DIR}") +- set(OpenCV_configScript_DIR "${OpenCV_DIR}/share/opencv") +- if(EXISTS "${OpenCV_configScript_DIR}") +- set(OpenCV_configScript "${OpenCV_configScript_DIR}/OpenCVConfig.cmake") +- endif(EXISTS "${OpenCV_configScript_DIR}") +- endif(EXISTS "${OpenCV_DIR}") ++ # prefer pkg-config values ++ if(OPENCV_PKGCONF_FOUND) ++ set(OpenCV_LIBS ${OPENCV_PKGCONF_LDFLAGS}) ++ set(OpenCV_FOUND true) ++ set(OpenCV_INCLUDE_DIR ${OPENCV_PKGCONF_INCLUDE_DIRS}) ++ set(OpenCV_VERSION ${OPENCV_PKGCONF_VERSION}) ++ else(OPENCV_PKGCONF_FOUND) ++ set(OpenCV_DIR ${OPENCV_PKGCONF_PREFIX}) ++ if(EXISTS "${OpenCV_DIR}") ++ set(OpenCV_configScript_DIR "${OpenCV_DIR}/share/opencv") ++ if(EXISTS "${OpenCV_configScript_DIR}") ++ set(OpenCV_configScript "${OpenCV_configScript_DIR}/OpenCVConfig.cmake") ++ endif(EXISTS "${OpenCV_configScript_DIR}") ++ endif(EXISTS "${OpenCV_DIR}") ++ endif(OPENCV_PKGCONF_FOUND) + endif(PKG_CONFIG_FOUND) + endif(NOT WIN32) + endif(NOT EXISTS "${OpenCV_DIR}") +@@ -72,7 +80,7 @@ + ##==================================================== + ## Find OpenCV libraries + ##---------------------------------------------------- +-if(EXISTS "${OpenCV_DIR}") ++if(EXISTS "${OpenCV_DIR}" AND NOT OpenCV_FOUND) + + #When its possible to use the Config script use it. + if(EXISTS "${OpenCV_configScript}") +@@ -257,9 +265,9 @@ + endif(${OpenCV_VERSION} VERSION_GREATER 2.1.0) + + +-else(EXISTS "${OpenCV_DIR}") ++else(EXISTS "${OpenCV_DIR}" AND NOT OpenCV_FOUND) + set(ERR_MSG "Please specify OpenCV directory using OpenCV_DIR env. variable") +-endif(EXISTS "${OpenCV_DIR}") ++endif(EXISTS "${OpenCV_DIR}" AND NOT OpenCV_FOUND) + ##==================================================== + + ##==================================================== +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -33,7 +33,7 @@ + + #need to put here do setting LOCALE_DIR variable + find_package(Gettext) +-if(Gettext_FOUND) ++if(GETTEXT_FOUND) + if(NOT LOCALE_DIR) + if(WIN32) + SET(LOCALE_DIR "bin/locale") +@@ -55,7 +55,7 @@ + message(STATUS "Cannot find msgfmt to convert language file. Translation won't be enabled") + endif() + endif(NOT LOCALE_DIR) +-endif(Gettext_FOUND) ++endif(GETTEXT_FOUND) + add_subdirectory(themes) + add_subdirectory(data) + add_subdirectory(game) +--- game/CMakeLists.txt ++++ game/CMakeLists.txt +@@ -71,7 +71,7 @@ + list(APPEND LIBS ${Boost_LIBRARIES}) + + # Find all the libs that don't require extra parameters +-foreach(lib ${OUR_LIBS} SDL PangoCairo LibRSVG LibXML++ GLEW AVFormat SWScale OpenGL Z Jpeg Png PortAudio) ++foreach(lib ${OUR_LIBS} SDL PangoCairo LibRSVG LibXML++ GLEW AVFormat SWScale OpenGL ZLIB JPEG PNG PortAudio) + find_package(${lib} REQUIRED) + include_directories(${${lib}_INCLUDE_DIRS}) + list(APPEND LIBS ${${lib}_LIBRARIES}) +@@ -79,7 +79,7 @@ + endforeach(lib) + + find_package(Gettext) +-if(Gettext_FOUND) ++if(GETTEXT_FOUND) + include_directories(${Gettext_INCLUDE_DIRS}) + list(APPEND LIBS ${Gettext_LIBRARIES}) + add_definitions("-DUSE_GETTEXT") +--- tools/CMakeLists.txt ++++ tools/CMakeLists.txt +@@ -6,7 +6,7 @@ + include_directories(${Boost_INCLUDE_DIRS}) + + # Find all the libs that don't require extra parameters +-foreach(lib LibXML++ Magick++ Z Jpeg Tiff Png Freetype Z) ++foreach(lib LibXML++ Magick++ ZLIB JPEG TIFF PNG Freetype ZLIB) + find_package(${lib}) + if (${lib}_FOUND) + include_directories(${${lib}_INCLUDE_DIRS}) +@@ -24,13 +24,13 @@ + if (LibXML++_FOUND) + if (Boost_FOUND) + if (Magick++_FOUND) +- if (Z_FOUND) ++ if (ZLIB_FOUND) + add_executable(ss_extract ss_extract.cpp pak.cpp ipu_conv.cpp ss_cover.cpp) +- target_link_libraries(ss_extract ${LibXML++_LIBRARIES} ${Boost_LIBRARIES} ${Magick++_LIBRARIES} ${Z_LIBRARIES} ${Jpeg_LIBRARIES} ${Tiff_LIBRARIES} ${Png_LIBRARIES} ${Freetype_LIBRARY} ${Magick++_LIBRARIES}) ++ target_link_libraries(ss_extract ${LibXML++_LIBRARIES} ${Boost_LIBRARIES} ${Magick++_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${PNG_LIBRARIES} ${Freetype_LIBRARY} ${Magick++_LIBRARIES}) + set(targets ${targets} ss_extract) +- else (Z_FOUND) ++ else (ZLIB_FOUND) + message("No zlib found, not building ss_extract") +- endif (Z_FOUND) ++ endif (ZLIB_FOUND) + else (Magick++_FOUND) + message("No Magick++ found, not building ss_extract") + endif (Magick++_FOUND) +@@ -40,7 +40,7 @@ + + if (Magick++_FOUND) + add_executable(ss_cover_conv cover_conv.cpp pak.cpp ss_cover.cpp) +- target_link_libraries(ss_cover_conv ${Magick++_LIBRARIES} ${LibXML++_LIBRARIES} ${Z_LIBRARIES} ${Jpeg_LIBRARIES} ${Tiff_LIBRARIES} ${Png_LIBRARIES} ${Freetype_LIBRARY} ${Magick++_LIBRARIES}) ++ target_link_libraries(ss_cover_conv ${Magick++_LIBRARIES} ${LibXML++_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${PNG_LIBRARIES} ${Freetype_LIBRARY} ${Magick++_LIBRARIES}) + set(targets ${targets} ss_cover_conv) + else (Magick++_FOUND) + message("No Magick++ found, not building ss_cover_conv") +@@ -58,13 +58,13 @@ + target_link_libraries(ss_archive_extract ${Boost_LIBRARIES}) + set(targets ${targets} ss_archive_extract) + +- if (Z_FOUND) ++ if (ZLIB_FOUND) + add_executable(itg_pck itg_pck.cc) +- target_link_libraries(itg_pck ${Boost_LIBRARIES} ${Z_LIBRARIES}) ++ target_link_libraries(itg_pck ${Boost_LIBRARIES} ${ZLIB_LIBRARIES}) + set(targets ${targets} itg_pck) + + add_executable(ss_chc_decode ss_chc_decode.cpp) +- target_link_libraries(ss_chc_decode ${Boost_LIBRARIES} ${Z_LIBRARIES}) ++ target_link_libraries(ss_chc_decode ${Boost_LIBRARIES} ${ZLIB_LIBRARIES}) + set(targets ${targets} ss_chc_decode) + endif() + endif (Boost_FOUND) -- cgit v1.2.3-54-g00ecf