Index: Portfile
===================================================================
--- Portfile	(revision 132920)
+++ Portfile	(working copy)
@@ -5,13 +5,12 @@
 PortGroup           muniversal 1.0
 
 name                cmake
-version             3.0.2
-revision            1
+version             3.1.3
 set branch          [join [lrange [split ${version} .] 0 1] .]
 categories          devel
 license             BSD
 installs_libs       no
-maintainers         css
+maintainers         michaelld css
 description         Cross-platform make
 long_description    An extensible, open-source system that manages the build    \
                     process in an operating system and compiler independent manner. \
@@ -21,8 +20,8 @@
 master_sites        http://www.cmake.org/files/v${branch}/
 platforms           darwin freebsd
 
-checksums           rmd160  b94ea2ed4dced373e289fa5f66674a227135f350 \
-                    sha256  6b4ea61eadbbd9bec0ccb383c29d1f4496eacc121ef7acf37c7a24777805693e
+checksums           rmd160 2693ac550a2e08fbc34601e5d8b60f2abec99d1f \
+                    sha256 45f4d3fa8a2f61cc092ae461aac4cac1bab4ac6706f98274ea7f314dd315c6d0
 
 depends_lib-append  port:libidn \
                     port:openssl \
@@ -36,6 +35,7 @@
                     patch-Modules-FindFreetype.cmake.diff \
                     patch-Modules-FindQt4.cmake.diff \
                     patch-Modules-Platform-Darwin.cmake.diff \
+                    patch-Modules-Platform-Darwin-Initialize.cmake.diff \
                     patch-Modules-noArchCheck.diff
 
 configure.env-append \
Index: files/patch-CMakeFindFrameworks.cmake.diff
===================================================================
--- files/patch-CMakeFindFrameworks.cmake.diff	(revision 132920)
+++ files/patch-CMakeFindFrameworks.cmake.diff	(working copy)
@@ -1,5 +1,5 @@
---- Modules/CMakeFindFrameworks.cmake	2012-11-02 10:05:18.000000000 -0700
-+++ Modules/CMakeFindFrameworks.cmake	2012-11-02 10:12:23.000000000 -0700
+--- Modules/CMakeFindFrameworks.cmake.orig
++++ Modules/CMakeFindFrameworks.cmake
 @@ -24,6 +24,7 @@
      if(APPLE)
        foreach(dir
Index: files/patch-CMakeLists.txt.diff
===================================================================
--- files/patch-CMakeLists.txt.diff	(revision 132920)
+++ files/patch-CMakeLists.txt.diff	(working copy)
@@ -1,4 +1,4 @@
---- CMakeLists.txt
+--- CMakeLists.txt.orig
 +++ CMakeLists.txt
 @@ -476,7 +476,7 @@ if(BUILD_CursesDialog)
  endif()
Index: files/patch-Modules-FindFreetype.cmake.diff
===================================================================
--- files/patch-Modules-FindFreetype.cmake.diff	(revision 132920)
+++ files/patch-Modules-FindFreetype.cmake.diff	(working copy)
@@ -1,6 +1,6 @@
 --- Modules/FindFreetype.cmake.orig
 +++ Modules/FindFreetype.cmake
-@@ -55,10 +55,6 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
+@@ -57,10 +57,6 @@
    HINTS
      ENV FREETYPE_DIR
    PATHS
@@ -11,7 +11,7 @@
      ENV GTKMM_BASEPATH
      [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
      [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
-@@ -72,10 +68,6 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2
+@@ -78,10 +74,6 @@
    HINTS
      ENV FREETYPE_DIR
    PATHS
@@ -22,9 +22,9 @@
      ENV GTKMM_BASEPATH
      [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
      [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
-@@ -88,10 +80,6 @@ find_library(FREETYPE_LIBRARY
+@@ -99,10 +91,6 @@
+   HINTS
      ENV FREETYPE_DIR
-   PATH_SUFFIXES lib
    PATHS
 -    /usr/X11R6
 -    /usr/local/X11R6
Index: files/patch-Modules-FindQt4.cmake.diff
===================================================================
--- files/patch-Modules-FindQt4.cmake.diff	(revision 132920)
+++ files/patch-Modules-FindQt4.cmake.diff	(working copy)
@@ -1,6 +1,6 @@
 --- Modules/FindQt4.cmake.orig
 +++ Modules/FindQt4.cmake
-@@ -728,9 +728,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
+@@ -741,9 +741,7 @@
        find_path(QT_IMPORTS_DIR NAMES Qt
          HINTS ${qt_cross_paths} ${qt_imports_dir}
          DOC "The location of the Qt imports"
Index: files/patch-Modules-Platform-Darwin-Initialize.cmake.diff
===================================================================
--- files/patch-Modules-Platform-Darwin-Initialize.cmake.diff	(revision 0)
+++ files/patch-Modules-Platform-Darwin-Initialize.cmake.diff	(working copy)
@@ -0,0 +1,25 @@
+--- Modules/Platform/Darwin-Initialize.cmake.orig
++++ Modules/Platform/Darwin-Initialize.cmake
+@@ -94,11 +94,17 @@
+         NOT CMAKE_OSX_DEPLOYMENT_TARGET VERSION_EQUAL ${_CMAKE_OSX_DEPLOYMENT_TARGET})
+       set(_CMAKE_OSX_SDKS_VER ${CMAKE_OSX_DEPLOYMENT_TARGET}${_CMAKE_OSX_SDKS_VER_SUFFIX_${CMAKE_OSX_DEPLOYMENT_TARGET}})
+       set(_CMAKE_OSX_SYSROOT_CHECK "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
+-      message(WARNING
+-        "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
+-        "but the matching SDK does not exist at:\n \"${_CMAKE_OSX_SYSROOT_CHECK}\"\n"
+-        "Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"."
+-        )
++      if(IS_DIRECTORY "${_CMAKE_OSX_SYSROOT_DEFAULT}")
++        if(NOT "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "${_CURRENT_OSX_VERSION}")
++	  message(WARNING
++            "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
++            "but the matching SDK does not exist at:\n \"${_CMAKE_OSX_SYSROOT_CHECK}\"\n"
++            "Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"."
++            )
++	endif()
++      else()
++        set(_CMAKE_OSX_SYSROOT_DEFAULT "")
++      endif()
+     endif()
+   else()
+     # Assume developer files are in root (such as Xcode 4.5 command-line tools).
Index: files/patch-Modules-Platform-Darwin.cmake.diff
===================================================================
--- files/patch-Modules-Platform-Darwin.cmake.diff	(revision 132920)
+++ files/patch-Modules-Platform-Darwin.cmake.diff	(working copy)
@@ -1,36 +1,12 @@
---- Modules/Platform/Darwin.cmake.orig	2014-09-11 23:24:00.000000000 +1000
-+++ Modules/Platform/Darwin.cmake	2014-10-21 14:02:52.000000000 +1100
-@@ -140,12 +140,18 @@
-       else()
-         set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}})
-         set(_CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CMAKE_OSX_SDKS_VER}.sdk")
--        message(WARNING
--          "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
--          "but the matching SDK does not exist at:\n \"${_CMAKE_OSX_SYSROOT_CHECK}\"\n"
--          "Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"\n"
--          "matching the host OS X version."
--          )
-+        if(IS_DIRECTORY "${_CMAKE_OSX_SYSROOT_DEFAULT}")
-+          if (NOT "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "${_CURRENT_OSX_VERSION}")
-+            message(WARNING
-+              "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
-+              "but the matching SDK does not exist at:\n \"${_CMAKE_OSX_SYSROOT_CHECK}\"\n"
-+              "Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"\n"
-+              "matching the host OS X version."
-+              )
-+          endif()
-+        else ()
-+          set(_CMAKE_OSX_SYSROOT_DEFAULT "")
-+        endif()
-       endif()
-     else()
-       set(_CMAKE_OSX_SDKS_VER ${_CURRENT_OSX_VERSION}${_CMAKE_OSX_SDKS_VER_SUFFIX_${_CURRENT_OSX_VERSION}})
-@@ -207,6 +213,8 @@
+--- Modules/Platform/Darwin.cmake.orig
++++ Modules/Platform/Darwin.cmake
+@@ -70,7 +70,8 @@
      set(_sdk_ver "${CMAKE_MATCH_1}")
    elseif("${_CMAKE_OSX_SYSROOT_ORIG}" MATCHES "^macosx([0-9]+\\.[0-9]+)$")
      set(_sdk_ver "${CMAKE_MATCH_1}")
-+  elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/" OR "${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "")
-+    set(_sdk_ver "${_CURRENT_OSX_VERSION}")
+-  elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/")
++  elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/" OR
++         "${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "")
+     set(_sdk_ver "${_CURRENT_OSX_VERSION}")
    else()
      message(FATAL_ERROR
-       "CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "
Index: files/patch-Modules-noArchCheck.diff
===================================================================
--- files/patch-Modules-noArchCheck.diff	(revision 132920)
+++ files/patch-Modules-noArchCheck.diff	(working copy)
@@ -1,6 +1,5 @@
-diff -ur ../cmake-2.8.12-orig/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in ./Modules/BasicConfigVersion-AnyNewerVersion.cmake.in
---- ../cmake-2.8.12-orig/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in	2013-10-08 00:31:00.000000000 +0900
-+++ ./Modules/BasicConfigVersion-AnyNewerVersion.cmake.in	2013-12-25 16:14:04.000000000 +0900
+--- Modules/BasicConfigVersion-AnyNewerVersion.cmake.in.orig
++++ Modules/BasicConfigVersion-AnyNewerVersion.cmake.in
 @@ -17,15 +17,3 @@
      set(PACKAGE_VERSION_EXACT TRUE)
    endif()
@@ -17,9 +16,8 @@
 -   set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
 -   set(PACKAGE_VERSION_UNSUITABLE TRUE)
 -endif()
-diff -ur ../cmake-2.8.12-orig/Modules/BasicConfigVersion-ExactVersion.cmake.in ./Modules/BasicConfigVersion-ExactVersion.cmake.in
---- ../cmake-2.8.12-orig/Modules/BasicConfigVersion-ExactVersion.cmake.in	2013-10-08 00:31:00.000000000 +0900
-+++ ./Modules/BasicConfigVersion-ExactVersion.cmake.in	2013-12-25 16:14:00.000000000 +0900
+--- Modules/BasicConfigVersion-ExactVersion.cmake.in.orig
++++ Modules/BasicConfigVersion-ExactVersion.cmake.in
 @@ -32,16 +32,3 @@
  if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
    set(PACKAGE_VERSION_EXACT TRUE)
@@ -37,9 +35,8 @@
 -  set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
 -  set(PACKAGE_VERSION_UNSUITABLE TRUE)
 -endif()
-diff -ur ../cmake-2.8.12-orig/Modules/BasicConfigVersion-SameMajorVersion.cmake.in ./Modules/BasicConfigVersion-SameMajorVersion.cmake.in
---- ../cmake-2.8.12-orig/Modules/BasicConfigVersion-SameMajorVersion.cmake.in	2013-10-08 00:31:00.000000000 +0900
-+++ ./Modules/BasicConfigVersion-SameMajorVersion.cmake.in	2013-12-25 16:13:52.000000000 +0900
+--- Modules/BasicConfigVersion-SameMajorVersion.cmake.in.orig
++++ Modules/BasicConfigVersion-SameMajorVersion.cmake.in
 @@ -31,16 +31,3 @@
        set(PACKAGE_VERSION_EXACT TRUE)
    endif()
