[packages/plplot] - fix building with cmake 3.1

baggins baggins at pld-linux.org
Mon Apr 6 16:15:27 CEST 2015


commit 3c0348e6f034db2316b4a05779b00328ae39c003
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Apr 6 16:15:11 2015 +0200

    - fix building with cmake 3.1

 plplot-cmake31.patch | 25 +++++++++++++++++++++++++
 plplot.spec          |  2 ++
 2 files changed, 27 insertions(+)
---
diff --git a/plplot.spec b/plplot.spec
index 0585f22..9e38445 100644
--- a/plplot.spec
+++ b/plplot.spec
@@ -35,6 +35,7 @@ Patch4:		%{name}-nofonts.patch
 Patch5:		%{name}-adadirs.patch
 Patch6:		%{name}-ocamldir.patch
 Patch7:		%{name}-d.patch
+Patch8:		%{name}-cmake31.patch
 URL:		http://plplot.sourceforge.net/
 BuildRequires:	QtGui-devel >= 4
 BuildRequires:	QtSvg-devel >= 4
@@ -614,6 +615,7 @@ Biblioteka PLplot - przykłady do wiązania dla Pythona.
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 # "Posix" is reserved and can be set only automatically
 #%{__sed} -i -e 's/-version=Posix //' cmake/modules/language_support/cmake/Platform/Linux-dmd.cmake
diff --git a/plplot-cmake31.patch b/plplot-cmake31.patch
new file mode 100644
index 0000000..42c32cc
--- /dev/null
+++ b/plplot-cmake31.patch
@@ -0,0 +1,25 @@
+diff -up plplot-5.10.0/cmake/modules/pkg-config.cmake.cmake31 plplot-5.10.0/cmake/modules/pkg-config.cmake
+--- plplot-5.10.0/cmake/modules/pkg-config.cmake.cmake31	2014-02-05 22:06:07.000000000 -0700
++++ plplot-5.10.0/cmake/modules/pkg-config.cmake	2015-02-06 08:49:06.376911059 -0700
+@@ -1,6 +1,6 @@
+ # cmake/modules/pkg-config.cmake
+ #
+-# Copyright (C) 2006  Alan W. Irwin
++# Copyright (C) 2006-2015  Alan W. Irwin
+ #
+ # This file is part of PLplot.
+ #
+@@ -94,7 +94,12 @@ macro(pkg_check_pkgconfig _package _incl
+     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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/plplot.git/commitdiff/3c0348e6f034db2316b4a05779b00328ae39c003



More information about the pld-cvs-commit mailing list