Ticket #36287: fix-cmake-2.8.9-port-gui-variant.patch

File fix-cmake-2.8.9-port-gui-variant.patch, 6.6 KB (added by maehne (Torsten Maehne), 12 years ago)

Patch for CMake 2.8.9 port.

  • Portfile

    diff -u -r cmake-orig/Portfile cmake/Portfile
    old new  
    66
    77name            cmake
    88version         2.8.9
    9 revision        1
     9revision        2
    1010set branch      [join [lrange [split ${version} .] 0 1] .]
    1111categories      devel
    1212license         BSD
     
    7070                xinstall -m 0644 -W ${worksrcpath}/Docs cmake-${type}.vim \
    7171                        ${destroot}${prefix}/share/vim/vimfiles/${type}
    7272        }
     73        if ([variant_isset gui]) {
     74                set app CMake
     75                xinstall -d ${destroot}${applications_dir}/${app}.app/Contents/MacOS \
     76                        ${destroot}${applications_dir}/${app}.app/Contents/Resources
     77                xinstall -m 644 ${filespath}/Info.plist.in ${destroot}${applications_dir}/${app}.app/Contents/Info.plist
     78                reinplace "s|@VERSION@|${version}|g" ${destroot}${applications_dir}/${app}.app/Contents/Info.plist
     79                reinplace "s|@PREFIX@|${prefix}|g" ${destroot}${applications_dir}/${app}.app/Contents/Info.plist
     80                ln -s ${prefix}/bin/cmake-gui ${destroot}${applications_dir}/${app}.app/Contents/MacOS/cmake-gui
     81                xinstall -m 644 ${worksrcpath}/Source/QtDialog/CMakeSetup.icns ${destroot}${applications_dir}/${app}.app/Contents/Resources/CMakeSetup.icns
     82        }
    7383}
    7484
    7585variant gui description {Qt4 based cmake-gui} {
    7686        PortGroup qt4 1.0
    77 #       patchfiles-append patch-CMakeLists.txt.diff
     87        patchfiles-append patch-CMakeLists.txt.diff
    7888        configure.args-append --qt-gui --qt-qmake=${qt_qmake_cmd}
    7989}
    8090
  • files/patch-CMakeFindFrameworks.cmake.diff

    Only in cmake/files: Info.plist.in
    diff -u -r cmake-orig/files/patch-CMakeFindFrameworks.cmake.diff cmake/files/patch-CMakeFindFrameworks.cmake.diff
    old new  
    1 --- Modules/CMakeFindFrameworks.cmake   2012-05-11 11:39:53.000000000 +0200
    2 +++ Modules/CMakeFindFrameworks.cmake   2012-05-11 11:47:07.000000000 +0200
     1--- Modules/CMakeFindFrameworks.cmake   2012-10-07 15:26:05.000000000 +0200
     2+++ Modules/CMakeFindFrameworks.cmake   2012-10-07 15:50:10.000000000 +0200
    33@@ -20,6 +20,7 @@
    44     IF(APPLE)
    55       FOREACH(dir
  • files/patch-CMakeLists.txt.diff

    diff -u -r cmake-orig/files/patch-CMakeLists.txt.diff cmake/files/patch-CMakeLists.txt.diff
    old new  
    1 --- CMakeLists.txt      2012-05-11 11:39:53.000000000 +0200
    2 +++ CMakeLists.txt      2012-05-11 11:48:15.000000000 +0200
    3 @@ -542,7 +542,7 @@
     1--- CMakeLists.txt      2012-10-07 15:26:05.000000000 +0200
     2+++ CMakeLists.txt      2012-10-07 15:52:38.000000000 +0200
     3@@ -528,7 +528,7 @@
    44 ENDIF(BUILD_CursesDialog)
    55 
    66 IF(BUILD_QtDialog)
     
    99     SET(CMAKE_BUNDLE_NAME
    1010       "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}-${CMake_VERSION_PATCH}")
    1111     SET(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
    12 @@ -555,7 +555,7 @@
     12@@ -541,7 +541,7 @@
    1313     ENDIF(NOT "${ENDCH}" STREQUAL "/")
    1414     SET(CMAKE_INSTALL_PREFIX
    1515       "${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME}.app/Contents")
     
    1818   
    1919   SET(QT_NEED_RPATH FALSE)
    2020   IF(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64")
    21 --- Source/QtDialog/CMakeLists.txt      2012-05-11 11:39:53.000000000 +0200
    22 +++ Source/QtDialog/CMakeLists.txt      2012-05-11 11:48:15.000000000 +0200
     21diff -u -r cmake-2.8.9-orig/Modules/CMakeFindFrameworks.cmake cmake-2.8.9/Modules/CMakeFindFrameworks.cmake
     22--- Source/QtDialog/CMakeLists.txt      2012-10-07 15:26:05.000000000 +0200
     23+++ Source/QtDialog/CMakeLists.txt      2012-10-07 15:57:54.000000000 +0200
    2324@@ -59,23 +59,23 @@
    2425   IF(Q_WS_WIN)
    2526     SET(SRCS ${SRCS} CMakeSetup.rc)
     
    4647        OUTPUT_NAME ${CMAKE_BUNDLE_NAME})
    4748-    ENDIF(APPLE)
    4849+    ENDIF(FALSE)
    49      SET(CMAKE_INSTALL_DESTINATION_ARGS 
     50     SET(CMAKE_INSTALL_DESTINATION_ARGS
    5051       BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
    5152   ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
    5253@@ -90,7 +90,7 @@
     
    7071     # install rules for including 3rd party libs such as Qt
    7172     # if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation
    7273     set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}")
    73 @@ -114,7 +114,7 @@
    74        include(\"${CMake_SOURCE_DIR}/Modules/BundleUtilities.cmake\")
     74@@ -115,7 +115,7 @@
     75       set(BU_CHMOD_BUNDLE_ITEMS ON)
    7576       fixup_bundle(\"${fixup_exe}\" \"\" \"${QT_LIBRARY_DIR};${QT_BINARY_DIR}\")
    7677     ")
    7778-  endif(APPLE OR WIN32)
    7879+  endif(WIN32)
    7980 
    8081   CONFIGURE_FILE("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in"
    81      "${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY)   
     82     "${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY)
  • files/patch-Modules-FindQt4.cmake.diff

    diff -u -r cmake-orig/files/patch-Modules-FindQt4.cmake.diff cmake/files/patch-Modules-FindQt4.cmake.diff
    old new  
    1 --- Modules/FindQt4.cmake       2012-05-11 11:39:53.000000000 +0200
    2 +++ Modules/FindQt4.cmake       2012-05-11 11:49:04.000000000 +0200
    3 @@ -526,7 +526,8 @@
     1--- Modules/FindQt4.cmake       2012-10-07 15:26:05.000000000 +0200
     2+++ Modules/FindQt4.cmake       2012-10-07 15:46:05.000000000 +0200
     3@@ -539,8 +539,9 @@
    44     SET(QT_MKSPECS_DIR NOTFOUND)
    55     FIND_PATH(QT_MKSPECS_DIR NAMES qconfig.pri
    66       HINTS ${qt_cross_paths} ${qt_mkspecs_dirs}
    77-      DOC "The location of the Qt mkspecs containing qconfig.pri")
     8-  ENDIF()
    89+      DOC "The location of the Qt mkspecs containing qconfig.pri"
    910+      NO_DEFAULT_PATH)
    10    ENDIF()
     11+   ENDIF()
    1112 
    1213   IF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
    13 @@ -620,6 +621,7 @@
     14     FILE(READ ${QT_MKSPECS_DIR}/qconfig.pri _qconfig_FILE_contents)
     15@@ -633,6 +634,7 @@
    1416       FIND_PATH(QT_QTCORE_INCLUDE_DIR QtCore
    1517                 HINTS ${qt_headers} ${QT_LIBRARY_DIR}
    1618                 PATH_SUFFIXES QtCore qt4/QtCore
     
    1820         )
    1921 
    2022       # Set QT_HEADERS_DIR based on finding QtCore header
    21 @@ -672,7 +674,8 @@
     23@@ -685,7 +687,8 @@
    2224     endforeach(qt_cross_path)
    2325     FIND_PATH(QT_PLUGINS_DIR NAMES accessible imageformats sqldrivers codecs designer
    2426       HINTS ${qt_cross_paths} ${qt_plugins_dir}
     
    2830   ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR  OR  QT_QMAKE_CHANGED)
    2931 
    3032   # ask qmake for the translations directory
    31 @@ -692,8 +695,7 @@
     33@@ -705,8 +708,7 @@
    3234       FIND_PATH(QT_IMPORTS_DIR NAMES Qt
    3335         HINTS ${qt_cross_paths} ${qt_imports_dir}
    3436         DOC "The location of the Qt imports"