Ticket #24252: patch-cmake-gui.diff

File patch-cmake-gui.diff, 3.8 KB (added by raimue (Rainer Müller), 15 years ago)
  • files/patch-no-app.patch

     
     1http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/cmake/files/cmake-2.8.0-darwin-no-app-with-qt.patch
     2
     3Description: Don't build the GUI's app-bundle.
     4Author:      Heiko Przybyl <zuxez@cs.tu-berlin.de>
     5--- CMakeLists.txt.orig 2010-02-10 19:38:03 +0100
     6+++ CMakeLists.txt      2010-02-10 19:38:49 +0100
     7@@ -381,7 +381,7 @@ IF(BUILD_CursesDialog)
     8 ENDIF(BUILD_CursesDialog)
     9 
     10 IF(BUILD_QtDialog)
     11-  IF(APPLE)
     12+  IF(FALSE)
     13     SET(CMAKE_BUNDLE_NAME
     14       "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}-${CMake_VERSION_PATCH}")
     15     SET(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
     16@@ -394,7 +394,7 @@ IF(BUILD_QtDialog)
     17     ENDIF(NOT "${ENDCH}" STREQUAL "/")
     18     SET(CMAKE_INSTALL_PREFIX
     19       "${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME}.app/Contents")
     20-  ENDIF(APPLE)
     21+  ENDIF(FALSE)
     22   
     23   SET(QT_NEED_RPATH FALSE)
     24   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")
     25--- Source/QtDialog/CMakeLists.txt.orig 2010-02-10 19:39:59 +0100
     26+++ Source/QtDialog/CMakeLists.txt      2010-02-10 19:42:12 +0100
     27@@ -66,12 +66,12 @@ ELSE(NOT QT4_FOUND)
     28   IF(Q_WS_WIN)
     29     SET(SRCS ${SRCS} CMakeSetup.rc)
     30   ENDIF(Q_WS_WIN)
     31-  IF(Q_WS_MAC)
     32+  IF(FALSE)
     33     SET(SRCS ${SRCS} CMakeSetup.icns)
     34     SET(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
     35     SET_SOURCE_FILES_PROPERTIES(CMakeSetup.icns PROPERTIES
     36       MACOSX_PACKAGE_LOCATION Resources)
     37-  ENDIF(Q_WS_MAC)
     38+  ENDIF(FALSE)
     39 
     40   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
     41   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
     42@@ -79,13 +79,13 @@ ELSE(NOT QT4_FOUND)
     43   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
     44   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
     45 
     46-  ADD_EXECUTABLE(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS})
     47+  ADD_EXECUTABLE(cmake-gui WIN32 ${SRCS})
     48   TARGET_LINK_LIBRARIES(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES})
     49   IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
     50-    IF(APPLE)
     51+    IF(FALSE)
     52       SET_TARGET_PROPERTIES(cmake-gui PROPERTIES
     53        OUTPUT_NAME ${CMAKE_BUNDLE_NAME})
     54-    ENDIF(APPLE)
     55+    ENDIF(FALSE)
     56     SET(CMAKE_INSTALL_DESTINATION_ARGS
     57       BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
     58   ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
     59@@ -101,7 +101,7 @@ ELSE(NOT QT4_FOUND)
     60     INSTALL(FILES cmakecache.xml DESTINATION share/mime/packages )
     61   ENDIF(UNIX)
     62 
     63-  IF(APPLE)
     64+  IF(FALSE)
     65     SET(CMAKE_POSTFLIGHT_SCRIPT
     66       "${CMake_BINARY_DIR}/Source/QtDialog/postflight.sh")
     67     SET(CMAKE_POSTUPGRADE_SCRIPT
     68@@ -115,7 +115,7 @@ ELSE(NOT QT4_FOUND)
     69     INSTALL(CODE "set(input_file
     70        \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/${CMAKE_BUNDLE_NAME}\")")
     71     INSTALL(SCRIPT "${CMake_SOURCE_DIR}/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake")
     72-  ENDIF(APPLE)
     73+  ENDIF(FALSE)
     74   CONFIGURE_FILE("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in"
     75     "${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY)   
     76 ENDIF(NOT QT4_FOUND)
  • Portfile

     
    3939                cmake-syntax.vim ${destroot}${prefix}/share/doc/cmake
    4040}
    4141
     42variant gui description {Qt4 based cmake-gui} {
     43        depends_lib-append path:libexec/qt4-mac:qt4-mac
     44        patchfiles-append patch-no-app.patch
     45        configure.args-append --qt-gui --qt-qmake=${prefix}/libexec/qt4-mac/bin/qmake
     46}
     47
    4248livecheck.type  regex
    4349livecheck.regex {Latest Release \((\d(?:\.\d+)*)\)}
    4450livecheck.url   ${homepage}cmake/resources/software.html