[kdegraphics] * Mon Nov 22 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.5.80-2 - don't hardcode paths in OkularC

Kevin Kofler kkofler at fedoraproject.org
Mon Nov 22 21:16:56 UTC 2010


commit 7e4202973bb0c27529345260c297983bf3710a83
Author: Kevin Kofler <Kevin at tigcc.ticalc.org>
Date:   Mon Nov 22 22:16:46 2010 +0100

    * Mon Nov 22 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.5.80-2
    - don't hardcode paths in OkularConfig.cmake

 ...s-4.5.80-OkularConfig-dont-hardcode-paths.patch |   30 ++++++
 kdegraphics-4.5.80-readd-FindOkular.patch          |  101 --------------------
 kdegraphics.spec                                   |   16 ++--
 3 files changed, 37 insertions(+), 110 deletions(-)
---
diff --git a/kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths.patch b/kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths.patch
new file mode 100644
index 0000000..9b8b18b
--- /dev/null
+++ b/kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths.patch
@@ -0,0 +1,30 @@
+diff -ur kdegraphics-4.5.80/okular/OkularConfig.cmake kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths/okular/OkularConfig.cmake
+--- kdegraphics-4.5.80/okular/OkularConfig.cmake	2010-10-05 13:38:39.000000000 +0200
++++ kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths/okular/OkularConfig.cmake	2010-11-22 22:12:53.000000000 +0100
+@@ -1,18 +1,13 @@
+-# get from the full path to OkularConfig.cmake up to the base dir dir:
+-get_filename_component( _okularBaseDir  ${CMAKE_CURRENT_LIST_FILE} PATH)
+-get_filename_component( _okularBaseDir  ${_okularBaseDir} PATH)
+-get_filename_component( _okularBaseDir  ${_okularBaseDir} PATH)
+-get_filename_component( _okularBaseDir  ${_okularBaseDir} PATH)
+-
+-
+ # find the full paths to the library and the includes:
+ find_path(OKULAR_INCLUDE_DIR okular/core/document.h
+-          HINTS ${_okularBaseDir}/include
+-          NO_DEFAULT_PATH)
+-
+-find_library(OKULAR_CORE_LIBRARY okularcore 
+-             HINTS ${_okularBaseDir}/lib
+-             NO_DEFAULT_PATH)
++          PATHS
++          ${INCLUDE_INSTALL_DIR}
++          ${KDE4_INCLUDE_DIR})
++
++find_library(OKULAR_CORE_LIBRARY okularcore
++             PATHS
++             ${LIB_INSTALL_DIR}
++             ${KDE4_LIB_DIR})
+ 
+ set(OKULAR_LIBRARIES ${OKULAR_CORE_LIBRARY})
+ 
diff --git a/kdegraphics.spec b/kdegraphics.spec
index 7ce6d73..d98b1e7 100644
--- a/kdegraphics.spec
+++ b/kdegraphics.spec
@@ -27,14 +27,14 @@ URL:            http://www.kde.org/
 Source0:        ftp://ftp.kde.org/pub/kde/unstable/%{version}/src/kdegraphics-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-# readd a FindOkular.cmake, OkularConfig.cmake is not working as advertised
-# FIXME/TODO: get this sorted out properly
-Patch0:         kdegraphics-4.5.80-readd-FindOkular.patch
-
 ## upstreamable patches
 # okular.desktop : Categories=-Office,+VectorGraphics (http://bugzilla.redhat.com/591089)
 Patch50: kdegraphics-4.5.1-okular_dt.patch
 
+# don't hardcode paths in OkularConfig.cmake
+# TODO: upstreamable?
+Patch51: kdegraphics-4.5.80-OkularConfig-dont-hardcode-paths.patch
+
 ## upstream patches
 
 %if 0%{?fedora}
@@ -127,8 +127,8 @@ Summary: A kioslave for displaying WinHelp files
 %prep
 %setup -q -n kdegraphics-%{version}%{?alphatag}
 
-%patch0 -p0 -b .readd-FindOkular
 %patch50 -p1 -b .okular_dt
+%patch51 -p1 -b .OkularConfig
 
 
 %build
@@ -268,9 +268,7 @@ fi
 %{_kde4_includedir}/okular/
 %{_kde4_libdir}/lib*.so
 %{_kde4_appsdir}/cmake/modules/FindKSane.cmake
-# see Patch0
-%{_kde4_appsdir}/cmake/modules/FindOkular.cmake
-#%{_kde4_libdir}/cmake/Okular/
+%{_kde4_libdir}/cmake/Okular/
 %{_libdir}/pkgconfig/*.pc
 
 %files -n kio_msits
@@ -281,7 +279,7 @@ fi
 
 %changelog
 * Mon Nov 22 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.5.80-2
-- readd a FindOkular.cmake, OkularConfig.cmake is not working as advertised
+- don't hardcode paths in OkularConfig.cmake
 
 * Sat Nov 20 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.5.80-1
 - 4.5.80 (4.6beta1)


More information about the scm-commits mailing list