diff options
author | Wulf Krueger <philantrop@gentoo.org> | 2008-02-07 01:00:30 +0000 |
---|---|---|
committer | Wulf Krueger <philantrop@gentoo.org> | 2008-02-07 01:00:30 +0000 |
commit | b4e7a15c1a923c7953396a4b51369adfb850fc48 (patch) | |
tree | 8212b44a665a463c3bf31c420d8de0901b1e258f /kde-base/okular | |
parent | Only patch if we are building with use X, the patch causes an error when buil... (diff) | |
download | historical-b4e7a15c1a923c7953396a4b51369adfb850fc48.tar.gz historical-b4e7a15c1a923c7953396a4b51369adfb850fc48.tar.bz2 historical-b4e7a15c1a923c7953396a4b51369adfb850fc48.zip |
Added missing patch.
Package-Manager: portage-2.1.4.1
Diffstat (limited to 'kde-base/okular')
-rw-r--r-- | kde-base/okular/files/kdegraphics-4.0.1-system-libspectre.patch | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/kde-base/okular/files/kdegraphics-4.0.1-system-libspectre.patch b/kde-base/okular/files/kdegraphics-4.0.1-system-libspectre.patch new file mode 100644 index 000000000000..cc6ac55636a5 --- /dev/null +++ b/kde-base/okular/files/kdegraphics-4.0.1-system-libspectre.patch @@ -0,0 +1,140 @@ +I got this patch from Fedora. + +References: + +http://tsdgeos.blogspot.com/2008/02/okular-and-libspectre.html +http://cvs.fedoraproject.org/viewcvs/rpms/kdegraphics/devel/ +https://bugs.gentoo.org/show_bug.cgi?id=208617 + +Index: cmake/modules/FindLibSpectre.cmake +=================================================================== +--- cmake/modules/FindLibSpectre.cmake (revision 0) ++++ cmake/modules/FindLibSpectre.cmake (revision 768911) +@@ -0,0 +1,62 @@ ++# - Try to find the libspectre PS library ++# Once done this will define ++# ++# LIBSPECTRE_FOUND - system has libspectre ++# LIBSPECTRE_INCLUDE_DIR - the libspectre include directory ++# LIBSPECTRE_LIBRARY - Link this to use libspectre ++# ++ ++# Copyright (c) 2006-2007, Pino Toscano, <pino@kde.org> ++# Copyright (c) 2008, Albert Astals Cid, <aacid@kde.org> ++# ++# Redistribution and use is allowed according to the terms of the BSD license. ++# For details see the accompanying COPYING-CMAKE-SCRIPTS file. ++ ++if(LIBSPECTRE_INCLUDE_DIR AND LIBSPECTRE_LIBRARY) ++ ++ # in cache already ++ set(LIBSPECTRE_FOUND TRUE) ++ ++else(LIBSPECTRE_INCLUDE_DIR AND LIBSPECTRE_LIBRARY) ++ ++# use pkg-config to get the directories and then use these values ++# in the FIND_PATH() and FIND_LIBRARY() calls ++INCLUDE(UsePkgConfig) ++ ++PKGCONFIG(libspectre _SpectreIncDir _SpectreLinkDir _SpectreLinkFlags _SpectreCflags) ++ ++if(_SpectreLinkFlags) ++ # find again pkg-config, to query it about libspectre version ++ FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/bin/ /usr/local/bin ) ++ ++ # query pkg-config asking for a libspectre >= LIBSPECTRE_MINIMUM_VERSION ++ EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=${LIBSPECTRE_MINIMUM_VERSION} libspectre RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) ++ if(_return_VALUE STREQUAL "0") ++ set(LIBSPECTRE_FOUND TRUE) ++ endif(_return_VALUE STREQUAL "0") ++endif(_SpectreLinkFlags) ++ ++if (LIBSPECTRE_FOUND) ++ set(LIBSPECTRE_LIBRARY ${_SpectreLinkFlags}) ++ ++ # the cflags for libspectre can contain more than one include path ++ separate_arguments(_SpectreCflags) ++ foreach(_includedir ${_SpectreCflags}) ++ string(REGEX REPLACE "-I(.+)" "\\1" _includedir "${_includedir}") ++ set(LIBSPECTRE_INCLUDE_DIR ${LIBSPECTRE_INCLUDE_DIR} ${_includedir}) ++ endforeach(_includedir) ++ ++ set(CMAKE_REQUIRED_INCLUDES) ++ set(CMAKE_REQUIRED_LIBRARIES) ++else (LIBSPECTRE_FOUND) ++ if (LIBSPECTRE_FIND_REQUIRED) ++ message(FATAL_ERROR "Could NOT find libspectre") ++ endif (LIBSPECTRE_FIND_REQUIRED) ++ message(STATUS "Could not find OPTIONAL package libspectre") ++endif (LIBSPECTRE_FOUND) ++ ++# ensure that they are cached ++set(LIBSPECTRE_INCLUDE_DIR ${LIBSPECTRE_INCLUDE_DIR} CACHE INTERNAL "The libspectre include path") ++set(LIBSPECTRE_LIBRARY ${LIBSPECTRE_LIBRARY} CACHE INTERNAL "The libspectre library") ++ ++endif(LIBSPECTRE_INCLUDE_DIR AND LIBSPECTRE_LIBRARY) +Index: okular/generators/spectre/rendererthread.cpp +=================================================================== +--- okular/generators/spectre/rendererthread.cpp (revision 768910) ++++ okular/generators/spectre/rendererthread.cpp (revision 768911) +@@ -37,7 +37,7 @@ + + void GSRendererThread::setMagnify(double magnify) + { +- spectre_render_context_set_scale(m_renderContext, magnify); ++ spectre_render_context_set_scale(m_renderContext, magnify, magnify); + } + + void GSRendererThread::setPlatformFonts(bool pfonts) +Index: okular/generators/CMakeLists.txt +=================================================================== +--- okular/generators/CMakeLists.txt (revision 768910) ++++ okular/generators/CMakeLists.txt (revision 768911) +@@ -1,12 +1,12 @@ + include (MacroLogFeature) + +-set(LIBGS_MINIMUM_VERSION "8.56") ++set(LIBSPECTRE_MINIMUM_VERSION "0.2") + + macro_optional_find_package(Poppler) + macro_log_feature(POPPLER_FOUND "Poppler-Qt4" "A PDF rendering library" "http://poppler.freedesktop.org" FALSE "0.5.4" "Support for PDF files in okular.") + +-macro_optional_find_package(LIBGS) +-macro_log_feature(LIBGS_FOUND "libgs, Ghostscript libraries" "A PostScript renderining library" "http://www.cs.wisc.edu/~ghost" FALSE "${LIBGS_MINIMUM_VERSION}" "Support for PS files in okular.") ++macro_optional_find_package(LibSpectre) ++macro_log_feature(LIBSPECTRE_FOUND "libspectre" "A PostScript rendering library" "http://libspectre.freedesktop.org/wiki/" FALSE "${LIBSPECTRE_MINIMUM_VERSION}" "Support for PS files in okular.") + + macro_optional_find_package(CHM) + macro_log_feature(CHM_FOUND "CHM" "A library for dealing with Microsoft ITSS/CHM format files" "http://www.jedrea.com/chmlib" FALSE "" "Support CHM files in okular.") +@@ -30,9 +30,9 @@ + add_subdirectory(poppler) + endif(POPPLER_FOUND) + +-if(LIBGS_FOUND) ++if(LIBSPECTRE_FOUND) + add_subdirectory(spectre) +-endif(LIBGS_FOUND) ++endif(LIBSPECTRE_FOUND) + + add_subdirectory( kimgio ) + +--- okular/generators/spectre/CMakeLists.txt ++++ okular/generators/spectre/CMakeLists.txt +@@ -1,6 +1,7 @@ +-add_subdirectory( libspectre conf ) ++add_subdirectory( conf ) + + include_directories( ++ ${LIBSPECTRE_INCLUDE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../.. + ${CMAKE_CURRENT_BINARY_DIR}/../.. + ) +@@ -21,7 +22,7 @@ + + kde4_add_plugin(okularGenerator_ghostview ${okularGenerator_ghostview_SRCS}) + +-target_link_libraries(okularGenerator_ghostview okularcore spectreOkular ${KDE4_KDEUI_LIBRARY}) ++target_link_libraries(okularGenerator_ghostview okularcore ${LIBSPECTRE_LIBRARY} ${KDE4_KDEUI_LIBRARY}) + + install(TARGETS okularGenerator_ghostview DESTINATION ${PLUGIN_INSTALL_DIR}) + |