Index: Portfile
===================================================================
--- Portfile	(revision 118522)
+++ Portfile	(working copy)
@@ -5,7 +5,7 @@
 PortGroup           muniversal 1.0
 
 name                cmake
-version             2.8.12.2
+version             3.0.0
 set branch          [join [lrange [split ${version} .] 0 1] .]
 categories          devel
 license             BSD
@@ -20,8 +20,8 @@
 master_sites        http://www.cmake.org/files/v${branch}/
 platforms           darwin freebsd
 
-checksums           rmd160  ee92327c3870f3ae2ea997d0258b0ef141e90525 \
-                    sha256  8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a120e5e
+checksums           rmd160  a35492be2953d6dd432594e833b7586dc154f52d \
+                    sha256  99a34b7f74000404feffd82fba9d9e0cd623428c74b6a4851a0dee1c272606c0
 
 depends_lib-append  port:libidn port:openssl
 
@@ -56,9 +56,7 @@
     # TODO: Figure out why using libc++ fails.
     #       Since nothing links against cmake and cmake is just using
     #       the STL, we're safe to force libstdc++
-    if {[info exists configure.cxx_stdlib]} {
-        configure.cxx_stdlib libstdc++
-    }
+    configure.cxx_stdlib libstdc++
 }
 
 post-patch {
@@ -72,11 +70,11 @@
 
 post-destroot {
     xinstall -d -m 0755 ${destroot}${prefix}/share/emacs/site-lisp
-    xinstall -m 0644 ${worksrcpath}/Docs/cmake-mode.el \
+    xinstall -m 0644 ${worksrcpath}/Auxiliary/cmake-mode.el \
         ${destroot}${prefix}/share/emacs/site-lisp
     foreach type {syntax indent} {
         xinstall -d -m 0755 ${destroot}${prefix}/share/vim/vimfiles/${type}
-        xinstall -m 0644 -W ${worksrcpath}/Docs cmake-${type}.vim \
+        xinstall -m 0644 -W ${worksrcpath}/Auxiliary cmake-${type}.vim \
             ${destroot}${prefix}/share/vim/vimfiles/${type}
     }
     if ([variant_isset gui]) {
Index: files/patch-CMakeFindFrameworks.cmake.diff
===================================================================
--- files/patch-CMakeFindFrameworks.cmake.diff	(revision 118522)
+++ files/patch-CMakeFindFrameworks.cmake.diff	(working copy)
@@ -1,6 +1,6 @@
 --- Modules/CMakeFindFrameworks.cmake	2012-11-02 10:05:18.000000000 -0700
 +++ Modules/CMakeFindFrameworks.cmake	2012-11-02 10:12:23.000000000 -0700
-@@ -20,6 +20,7 @@
+@@ -24,6 +24,7 @@
      if(APPLE)
        foreach(dir
            ~/Library/Frameworks/${fwk}.framework
Index: files/patch-CMakeLists.txt.diff
===================================================================
--- files/patch-CMakeLists.txt.diff	(revision 118522)
+++ files/patch-CMakeLists.txt.diff	(working copy)
@@ -1,17 +1,17 @@
---- CMakeLists.txt	2013-10-11 18:37:11.000000000 +0200
-+++ CMakeLists.txt	2013-10-11 18:39:22.000000000 +0200
-@@ -528,7 +528,7 @@ if(BUILD_CursesDialog)
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -476,7 +476,7 @@ if(BUILD_CursesDialog)
  endif()
  
  if(BUILD_QtDialog)
 -  if(APPLE)
 +  if(FALSE)
-     set(CMAKE_BUNDLE_NAME
-       "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}-${CMake_VERSION_PATCH}")
+     set(CMAKE_BUNDLE_VERSION
+       "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
      set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
---- Source/QtDialog/CMakeLists.txt	2013-10-11 18:37:12.000000000 +0200
-+++ Source/QtDialog/CMakeLists.txt	2013-10-11 18:43:24.000000000 +0200
-@@ -95,7 +95,7 @@ set(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} 
+--- Source/QtDialog/CMakeLists.txt
++++ Source/QtDialog/CMakeLists.txt
+@@ -99,7 +99,7 @@ set(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS})
  if(WIN32)
    set(SRCS ${SRCS} CMakeSetup.rc)
  endif()
@@ -20,13 +20,13 @@
    set(SRCS ${SRCS} CMakeSetup.icns)
    set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
    set_source_files_properties(CMakeSetup.icns PROPERTIES
-@@ -104,13 +104,13 @@ endif()
+@@ -115,13 +115,13 @@ endif()
  
  set(CMAKE_INCLUDE_CURRENT_DIR ON)
  
 -add_executable(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS})
 +add_executable(cmake-gui WIN32 ${SRCS})
- target_link_libraries(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES})
+ target_link_libraries(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${CMake_QT_LIBRARIES})
  if(Qt_BIN_DIR)
    set_property(TARGET cmake-gui PROPERTY Qt_BIN_DIR ${Qt_BIN_DIR})
  endif()
@@ -33,10 +33,10 @@
  
 -if(APPLE)
 +if(FALSE)
-   set_target_properties(cmake-gui PROPERTIES
-     OUTPUT_NAME ${CMAKE_BUNDLE_NAME})
- endif()
-@@ -127,7 +127,7 @@ if(UNIX)
+   file(STRINGS "${CMake_SOURCE_DIR}/Copyright.txt" copyright_line
+     LIMIT_COUNT 1 REGEX "^Copyright 2000-20[0-9][0-9] Kitware")
+ 
+@@ -153,7 +153,7 @@ if(UNIX)
    install(FILES cmakecache.xml DESTINATION share/mime/packages )
  endif()
  
@@ -45,7 +45,7 @@
    set(CMAKE_POSTFLIGHT_SCRIPT
      "${CMake_BINARY_DIR}/Source/QtDialog/postflight.sh")
    set(CMAKE_POSTUPGRADE_SCRIPT
-@@ -140,7 +140,7 @@ if(APPLE)
+@@ -166,7 +166,7 @@ if(APPLE)
                  WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)")
  endif()
  
Index: files/patch-Modules-FindFreetype.cmake.diff
===================================================================
--- files/patch-Modules-FindFreetype.cmake.diff	(revision 118522)
+++ files/patch-Modules-FindFreetype.cmake.diff	(working copy)
@@ -1,6 +1,6 @@
---- Modules/FindFreetype.cmake.orig	2013-10-07 10:31:00.000000000 -0500
-+++ Modules/FindFreetype.cmake	2013-11-30 05:30:36.000000000 -0600
-@@ -46,24 +46,16 @@
+--- Modules/FindFreetype.cmake.orig
++++ Modules/FindFreetype.cmake
+@@ -55,10 +55,6 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
    HINTS
      ENV FREETYPE_DIR
    PATHS
@@ -11,11 +11,7 @@
      ENV GTKMM_BASEPATH
      [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
      [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
-   PATH_SUFFIXES include/freetype2 include
- )
- 
--find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
-+find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
+@@ -72,10 +68,6 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2
    HINTS
      ENV FREETYPE_DIR
    PATHS
@@ -26,7 +22,7 @@
      ENV GTKMM_BASEPATH
      [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
      [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
-@@ -76,10 +68,6 @@
+@@ -88,10 +80,6 @@ find_library(FREETYPE_LIBRARY
      ENV FREETYPE_DIR
    PATH_SUFFIXES lib
    PATHS
@@ -37,14 +33,3 @@
      ENV GTKMM_BASEPATH
      [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
      [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
-@@ -91,8 +79,8 @@
- endif()
- set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
- 
--if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
--    file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h" freetype_version_str
-+if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
-+    file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h" freetype_version_str
-          REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$")
- 
-     unset(FREETYPE_VERSION_STRING)
Index: files/patch-Modules-FindQt4.cmake.diff
===================================================================
--- files/patch-Modules-FindQt4.cmake.diff	(revision 118522)
+++ files/patch-Modules-FindQt4.cmake.diff	(working copy)
@@ -1,37 +1,10 @@
 --- Modules/FindQt4.cmake.orig
 +++ Modules/FindQt4.cmake
-@@ -594,7 +594,8 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
-     set(QT_MKSPECS_DIR NOTFOUND)
-     find_path(QT_MKSPECS_DIR NAMES qconfig.pri
-       HINTS ${qt_cross_paths} ${qt_mkspecs_dirs}
--      DOC "The location of the Qt mkspecs containing qconfig.pri")
-+      DOC "The location of the Qt mkspecs containing qconfig.pri"
-+      NO_DEFAULT_PATH)
-   endif()
- 
-   if(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
-@@ -697,6 +698,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
-         find_path(QT_QTCORE_INCLUDE_DIR QtCore
-                   HINTS ${qt_headers} ${QT_LIBRARY_DIR}
-                   PATH_SUFFIXES QtCore qt4/QtCore
-+                  NO_DEFAULT_PATH
-           )
-       endif()
- 
-@@ -750,7 +752,8 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
-     endforeach()
-     find_path(QT_PLUGINS_DIR NAMES accessible imageformats sqldrivers codecs designer
-       HINTS ${qt_cross_paths} ${qt_plugins_dir}
--      DOC "The location of the Qt plugins")
-+      DOC "The location of the Qt plugins"
-+      NO_DEFAULT_PATH)
-   endif ()
- 
-   # ask qmake for the translations directory
-@@ -770,8 +773,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
+@@ -728,9 +728,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
        find_path(QT_IMPORTS_DIR NAMES Qt
          HINTS ${qt_cross_paths} ${qt_imports_dir}
          DOC "The location of the Qt imports"
+-        NO_CMAKE_FIND_ROOT_PATH
 -        NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
 -        NO_CMAKE_SYSTEM_PATH)
 +        NO_DEFAULT_PATH)
