rpms/kdegraphics/devel kdegraphics-4.0.1-system-libspectre.patch, NONE, 1.1 kdegraphics.spec, 1.130, 1.131

Kevin Kofler (kkofler) fedora-extras-commits at redhat.com
Fri Feb 1 02:26:50 UTC 2008


Author: kkofler

Update of /cvs/pkgs/rpms/kdegraphics/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14624/devel

Modified Files:
	kdegraphics.spec 
Added Files:
	kdegraphics-4.0.1-system-libspectre.patch 
Log Message:
* Fri Feb 01 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.0.1-2
- build against system libspectre (backported from KDE 4.1)

kdegraphics-4.0.1-system-libspectre.patch:

--- NEW FILE kdegraphics-4.0.1-system-libspectre.patch ---
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 at kde.org>
+# Copyright (c) 2008, Albert Astals Cid, <aacid at 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 )
 


Index: kdegraphics.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdegraphics/devel/kdegraphics.spec,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -r1.130 -r1.131
--- kdegraphics.spec	31 Jan 2008 19:52:51 -0000	1.130
+++ kdegraphics.spec	1 Feb 2008 02:26:09 -0000	1.131
@@ -4,7 +4,7 @@
 Summary:        K Desktop Environment - Graphics Applications
 Epoch:          7
 Version:        4.0.1
-Release:        1%{?dist}
+Release:        2%{?dist}
 
 Name:           kdegraphics
 Obsoletes:      kdegraphics4 < %{version}-%{release}
@@ -14,6 +14,8 @@
 License:        GPLv2
 URL:            http://www.kde.org/
 Source0:        ftp://ftp.kde.org/pub/kde/unstable/%{version}/src/kdegraphics-%{version}.tar.bz2
+# backported from trunk (KDE 4.1): http://websvn.kde.org/?view=rev&revision=768911
+Patch0:         kdegraphics-4.0.1-system-libspectre.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  kde-filesystem >= 4
@@ -23,8 +25,8 @@
 BuildRequires:  djvulibre-devel
 BuildRequires:  exiv2-devel
 BuildRequires:  giflib-devel
-BuildRequires:  ghostscript-devel
 BuildRequires:  gphoto2-devel
+BuildRequires:  libspectre-devel
 BuildRequires:  libtiff-devel
 BuildRequires:  libXxf86vm-devel
 BuildRequires:  pcre-devel
@@ -78,6 +80,9 @@
 
 %prep
 %setup -q -n kdegraphics-%{version}
+# use system libspectre
+%patch0 -p0
+rm -rf okular/generators/spectre/libspectre
 
 
 %build
@@ -155,6 +160,9 @@
 
 
 %changelog
+* Fri Feb 01 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.0.1-2
+- build against system libspectre (backported from KDE 4.1)
+
 * Thu Jan 31 2008 Rex Dieter <rdieter at fedoraproject.org> 4.0.1-1
 - kde-4.0.1
 




More information about the fedora-extras-commits mailing list