Revision
133428
Author
takeshi@macports.org
Date
2015-03-01 05:18:57 -0800 (Sun, 01 Mar 2015)

Log Message

plplot: patch cmake/modules/pkg-config.cmake for CMake 3.1, closing #46971

Modified Paths

Added Paths

Diff

Modified: trunk/dports/science/plplot/Portfile (133427 => 133428)


--- trunk/dports/science/plplot/Portfile	2015-03-01 13:05:50 UTC (rev 133427)
+++ trunk/dports/science/plplot/Portfile	2015-03-01 13:18:57 UTC (rev 133428)
@@ -39,7 +39,8 @@
                 port:tcl
 
 patchfiles      patch-CMakeLists.txt.diff \
-                patch-plConfig.h.in.diff
+                patch-plConfig.h.in.diff  \
+                patch-cmake-modules-pkg-config.cmake.diff
 post-patch {
     reinplace "s|-ObjC|-ObjC -framework AquaTerm|" ${worksrcpath}/cmake/modules/aqt.cmake
     reinplace "s|-framework AquaTerm|-F${frameworks_dir} -framework AquaTerm|" ${worksrcpath}/cmake/modules/aqt.cmake

Added: trunk/dports/science/plplot/files/patch-cmake-modules-pkg-config.cmake.diff (0 => 133428)


--- trunk/dports/science/plplot/files/patch-cmake-modules-pkg-config.cmake.diff	                        (rev 0)
+++ trunk/dports/science/plplot/files/patch-cmake-modules-pkg-config.cmake.diff	2015-03-01 13:18:57 UTC (rev 133428)
@@ -0,0 +1,16 @@
+--- cmake/modules/pkg-config.cmake.orig	2014-02-06 14:06:07.000000000 +0900
++++ cmake/modules/pkg-config.cmake	2015-03-01 22:14:10.000000000 +0900
+@@ -94,7 +94,12 @@
+     set(_xprefix ${_prefix})
+   endif(FORCE_EXTERNAL_STATIC)
+   
+-  _pkg_check_modules_internal(0 0 ${_prefix} "${_package}")
++  if(CMAKE_VERSION VERSION_LESS "3.1")
++    _pkg_check_modules_internal(0 0 ${_prefix} "${_package}")
++  else(CMAKE_VERSION VERSION_LESS "3.1")
++    _pkg_check_modules_internal(0 0 0 0 ${_prefix} "${_package}")
++  endif(CMAKE_VERSION VERSION_LESS "3.1")
++
+   if(${_prefix}_FOUND)
+     cmake_link_flags(${_link_FLAGS} "${${_xprefix}_LDFLAGS}")
+     # If libraries cannot be not found, then that is equivalent to whole