From 7e4202973bb0c27529345260c297983bf3710a83 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Nov 22 2010 21:16:46 +0000 Subject: * Mon Nov 22 2010 Kevin Kofler - 4.5.80-2 - don't hardcode paths in OkularConfig.cmake --- 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-4.5.80-readd-FindOkular.patch b/kdegraphics-4.5.80-readd-FindOkular.patch deleted file mode 100644 index 67b3928..0000000 --- a/kdegraphics-4.5.80-readd-FindOkular.patch +++ /dev/null @@ -1,101 +0,0 @@ -Index: cmake/modules/CMakeLists.txt -=================================================================== ---- cmake/modules/CMakeLists.txt (revision 1179984) -+++ cmake/modules/CMakeLists.txt (revision 1179983) -@@ -1,6 +1,7 @@ - # explicitely install the "public" cmake files - - set(cmakeFiles -+ FindOkular.cmake - FindKSane.cmake - ) - -Index: cmake/modules/FindOkular.cmake -=================================================================== ---- cmake/modules/FindOkular.cmake (revision 0) -+++ cmake/modules/FindOkular.cmake (revision 1179983) -@@ -0,0 +1,38 @@ -+# - Find Okular -+# Find the Okular core library -+# -+# This module defines -+# OKULAR_FOUND - whether the Okular core library was found -+# OKULAR_LIBRARIES - the Okular core library -+# OKULAR_INCLUDE_DIR - the include path of the Okular core library -+# -+ -+if (OKULAR_INCLUDE_DIR AND OKULAR_LIBRARIES) -+ -+ # Already in cache -+ set (OKULAR_FOUND TRUE) -+ -+else (OKULAR_INCLUDE_DIR AND OKULAR_LIBRARIES) -+ -+ find_library (OKULAR_LIBRARIES -+ NAMES -+ okularcore -+ PATHS -+ ${LIB_INSTALL_DIR} -+ ${KDE4_LIB_DIR} -+ ) -+ -+ find_path (OKULAR_INCLUDE_DIR -+ NAMES -+ okular/core/document.h -+ PATHS -+ ${INCLUDE_INSTALL_DIR} -+ ${KDE4_INCLUDE_DIR} -+ ) -+ -+ include(FindPackageHandleStandardArgs) -+ find_package_handle_standard_args(Okular DEFAULT_MSG OKULAR_LIBRARIES OKULAR_INCLUDE_DIR) -+ -+endif (OKULAR_INCLUDE_DIR AND OKULAR_LIBRARIES) -+ -+mark_as_advanced(OKULAR_INCLUDE_DIR OKULAR_LIBRARIES) -Index: okular/OkularConfig.cmake -=================================================================== ---- okular/OkularConfig.cmake (revision 1179984) -+++ okular/OkularConfig.cmake (revision 1179983) -@@ -1,17 +0,0 @@ --# 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) -- --set(OKULAR_LIBRARIES ${OKULAR_CORE_LIBRARY}) -Index: okular/CMakeLists.txt -=================================================================== ---- okular/CMakeLists.txt (revision 1179984) -+++ okular/CMakeLists.txt (revision 1179983) -@@ -5,7 +5,6 @@ - add_subdirectory( tests ) - - include(OkularConfigureChecks.cmake) --include(MacroWriteBasicCMakeVersionFile) - - if(NOT WIN32) - set(MATH_LIB m) -@@ -182,10 +181,3 @@ - install( FILES okular_part.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - install( FILES part.rc DESTINATION ${DATA_INSTALL_DIR}/okular ) - --########### cmake files ################# -- --macro_write_basic_cmake_version_file(${CMAKE_CURRENT_BINARY_DIR}/OkularConfigVersion.cmake 0 11 80) -- --install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/OkularConfig.cmake -- ${CMAKE_CURRENT_BINARY_DIR}/OkularConfigVersion.cmake -- DESTINATION ${LIB_INSTALL_DIR}/cmake/Okular ) -\ No newline at end of file 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 - 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 - 4.5.80-1 - 4.5.80 (4.6beta1)