rpms/plplot/devel plplot-5.9.4-transform_version.patch, NONE, 1.1 plplot.spec, 1.84, 1.85

Orion Poplawski orion at fedoraproject.org
Wed Aug 26 16:36:38 UTC 2009


Author: orion

Update of /cvs/pkgs/rpms/plplot/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24300

Modified Files:
	plplot.spec 
Added Files:
	plplot-5.9.4-transform_version.patch 
Log Message:
* Wed Aug 26 2009 - Orion Poplawski <orion at cora.nwra.com> - 5.9.4-7
- Add patch from svn to support pdl 2.4.4_05
- Force using gfortran


plplot-5.9.4-transform_version.patch:
 plplot.cmake |   50 +++++++++++++++++++++++++++++++++++---------------
 1 file changed, 35 insertions(+), 15 deletions(-)

--- NEW FILE plplot-5.9.4-transform_version.patch ---
--- plplot-5.9.4/cmake/modules/plplot.cmake.transform_version	2009-05-10 13:37:17.000000000 -0600
+++ plplot-5.9.4/cmake/modules/plplot.cmake	2009-08-26 10:33:56.174638294 -0600
@@ -30,21 +30,41 @@
 
 # Useful macros....
 
-macro(TRANSFORM_VERSION _numerical_result _version)
-# _version must be a period-delimited triplet string of the form
-# "major.minor.patch".
-# This macro transforms that into a numerical result that can be compared.
-if(${_version} MATCHES "^[0-9]*\\.[0-9]*\\.[0-9]*$")
-  string(REGEX REPLACE "^([0-9]*)\\.[0-9]*\\.[0-9]*$" "\\1" _major ${_version})
-  string(REGEX REPLACE "^[0-9]*\\.([0-9]*)\\.[0-9]*$" "\\1" _minor ${_version})
-  string(REGEX REPLACE "^[0-9]*\\.[0-9]*\\.([0-9]*)$" "\\1" _patch ${_version})
-  math(EXPR ${_numerical_result}
-  "${_major}*1000000 + ${_minor}*1000 + ${_patch}
-  ")
-else(${_version} MATCHES "^[0-9]*\\.[0-9]*\\.[0-9]*$")
-  set(${_numerical_result} 0)
-endif(${_version} MATCHES "^[0-9]*\\.[0-9]*\\.[0-9]*$")
-endmacro(TRANSFORM_VERSION)
+function(TRANSFORM_VERSION numerical_result version)
+  # internal_version ignores everything in version after any character that
+  # is not 0-9 or ".".  This should take care of the case when there is
+  # some non-numerical data in the patch version.
+  #message(STATUS "DEBUG: version = ${version}")
+  string(REGEX REPLACE "^([0-9.]+).*$" "\\1" internal_version ${version})
+
+  # internal_version is normally a period-delimited triplet string of the form
+  # "major.minor.patch", but patch and/or minor could be missing.
+  # Transform internal_version into a numerical result that can be compared.
+  string(REGEX REPLACE "^([0-9]*).+$" "\\1" major ${internal_version})
+  string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" minor ${internal_version})
+  string(REGEX REPLACE "^[0-9]*\\.[0-9]*\\.([0-9]*)$" "\\1" patch ${internal_version})
+
+  if(NOT patch MATCHES "[0-9]+")
+    set(patch 0)
+  endif(NOT patch MATCHES "[0-9]+")
+  
+  if(NOT minor MATCHES "[0-9]+")
+    set(minor 0)
+  endif(NOT minor MATCHES "[0-9]+")
+  
+  if(NOT major MATCHES "[0-9]+")
+    set(major 0)
+  endif(NOT major MATCHES "[0-9]+")
+  #message(STATUS "DEBUG: internal_version = ${internal_version}")
+  #message(STATUS "DEBUG: major = ${major}")
+  #message(STATUS "DEBUG: minor= ${minor}")
+  #message(STATUS "DEBUG: patch = ${patch}")
+  math(EXPR internal_numerical_result
+    "${major}*1000000 + ${minor}*1000 + ${patch}"
+    )
+  #message(STATUS "DEBUG: ${numerical_result} = ${internal_numerical_result}")
+  set(${numerical_result} ${internal_numerical_result} PARENT_SCOPE)
+endfunction(TRANSFORM_VERSION)
 
 macro(split_libraries_list _list _list_general _list_debug _list_optimized)
   # Macro for splitting a libraries list into its keyword denoted general,


Index: plplot.spec
===================================================================
RCS file: /cvs/pkgs/rpms/plplot/devel/plplot.spec,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -p -r1.84 -r1.85
--- plplot.spec	26 Aug 2009 09:47:03 -0000	1.84
+++ plplot.spec	26 Aug 2009 16:36:38 -0000	1.85
@@ -10,7 +10,7 @@
 
 Name:           plplot
 Version:        5.9.4
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Library of functions for making scientific plots
 
 Group:          Applications/Engineering
@@ -20,6 +20,7 @@ Source0:        http://downloads.sourcef
 Patch1:         plplot-5.9.3-multiarch.patch
 Patch2:         plplot-5.9.2-info.patch
 Patch3:         plplot-5.9.4-octave32.patch
+Patch4:         plplot-5.9.4-transform_version.patch
 Patch5:         plplot-5.9.3-test.patch
 Patch6:         plplot-5.7.3-jni.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -258,6 +259,7 @@ Requires:       pkgconfig
 %patch1 -p1 -b .multiarch
 %patch2 -p1 -b .info
 %patch3 -p1 -b .octave32
+%patch4 -p1 -b .transform_version
 %patch5 -p1 -b .test
 %patch6 -p1 -b .jni
 # Convert to UTF-8
@@ -279,6 +281,7 @@ export FFLAGS="$RPM_OPT_FLAGS"
 unset TERM
 %cmake .. \
 	-DCMAKE_SKIP_RPATH:BOOL=OFF \
+	-DCMAKE_Fortran_COMPILER:FILEPATH=%{_bindir}/gfortran \
 	-DUSE_RPATH:BOOL=OFF \
         -DENABLE_ada:BOOL=ON \
         -DHAVE_ADA_2007:BOOL=ON \
@@ -599,6 +602,10 @@ fi
 
 
 %changelog
+* Wed Aug 26 2009 - Orion Poplawski <orion at cora.nwra.com> - 5.9.4-7
+- Add patch from svn to support pdl 2.4.4_05
+- Force using gfortran
+
 * Wed Aug 26 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 5.9.4-6
 - Build with perl package re-enabled
 




More information about the fedora-extras-commits mailing list