Ticket #30539: cmake-gui-app-bundle.patch

File cmake-gui-app-bundle.patch, 2.8 KB (added by maehne (Torsten Maehne), 12 years ago)

Patch for cmake port to install an Application Bundle for the gui variant.

  • Portfile

    diff -urN cmake.orig/Portfile cmake/Portfile
    old new  
    66
    77name            cmake
    88version         2.8.8
    9 revision    1
     9revision    2
    1010set branch      [join [lrange [split ${version} .] 0 1] .]
    1111categories      devel
    1212license         BSD
     
    7171                xinstall -m 0644 -W ${worksrcpath}/Docs cmake-${type}.vim \
    7272                        ${destroot}${prefix}/share/vim/vimfiles/${type}
    7373        }
     74        if ([variant_isset gui]) {
     75                set app CMake
     76                xinstall -d ${destroot}${applications_dir}/${app}.app/Contents/MacOS \
     77                        ${destroot}${applications_dir}/${app}.app/Contents/Resources
     78                xinstall -m 644 ${filespath}/Info.plist.in ${destroot}${applications_dir}/${app}.app/Contents/Info.plist
     79                reinplace "s|@VERSION@|${version}|g" ${destroot}${applications_dir}/${app}.app/Contents/Info.plist
     80                reinplace "s|@PREFIX@|${prefix}|g" ${destroot}${applications_dir}/${app}.app/Contents/Info.plist
     81                ln -s ${prefix}/bin/cmake-gui ${destroot}${applications_dir}/${app}.app/Contents/MacOS/cmake-gui
     82                xinstall -m 644 ${worksrcpath}/Source/QtDialog/CMakeSetup.icns ${destroot}${applications_dir}/${app}.app/Contents/Resources/CMakeSetup.icns
     83        }
    7484}
    7585
    7686variant gui description {Qt4 based cmake-gui} {
  • files/Info.plist.in

    diff -urN cmake.orig/files/Info.plist.in cmake/files/Info.plist.in
    old new  
     1<?xml version="1.0" encoding="UTF-8"?>
     2<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     3<plist version="1.0">
     4<dict>
     5        <key>LSEnvironment</key>
     6        <dict>
     7                <key>PATH</key>
     8                <string>@PREFIX@/bin:@PREFIX@/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
     9        </dict>
     10        <key>CFBundleDevelopmentRegion</key>
     11        <string>English</string>
     12        <key>CFBundleExecutable</key>
     13        <string>cmake-gui</string>
     14        <key>CFBundleGetInfoString</key>
     15        <string>CMake - Cross Platform Makefile Generator</string>
     16        <key>CFBundleIconFile</key>
     17        <string>CMakeSetup.icns</string>
     18        <key>CFBundleIdentifier</key>
     19        <string>com.kitware.cmake</string>
     20        <key>CFBundleInfoDictionaryVersion</key>
     21        <string>6.0</string>
     22        <key>CFBundleLongVersionString</key>
     23        <string>@VERSION@</string>
     24        <key>CFBundleName</key>
     25        <string>CMake</string>
     26        <key>CFBundlePackageType</key>
     27        <string>APPL</string>
     28        <key>CFBundleShortVersionString</key>
     29        <string>@VERSION@</string>
     30        <key>CFBundleSignature</key>
     31        <string>CMakeGui</string>
     32        <key>CFBundleVersion</key>
     33        <string>@VERSION</string>
     34        <key>CSResourcesFileMapped</key>
     35        <true/>
     36        <key>LSRequiresCarbon</key>
     37        <true/>
     38        <key>NSHumanReadableCopyright</key>
     39        <string>2000-2011 Kitware, Inc., Insight Software Consortium.
     40All rights reserved.</string>
     41</dict>
     42</plist>