[cantor] recent libgfortran-related commits breaks cantor-R support (kde#314253)

Rex Dieter rdieter at fedoraproject.org
Thu Feb 7 14:12:05 UTC 2013


commit 687175c5b5be7b921354da46516d0bc42263d52e
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Thu Feb 7 08:11:50 2013 -0600

    recent libgfortran-related commits breaks cantor-R support (kde#314253)

 ...gfortran-library-before-using-it-uncondit.patch |   61 --------------------
 0002-Rlapack-needs-libgfortran.patch               |   34 -----------
 0003-Actually-make-my-check-work.patch             |   50 ----------------
 cantor-libgfortran_fix.patch                       |   34 +++++++++++
 cantor.spec                                        |   16 ++---
 5 files changed, 41 insertions(+), 154 deletions(-)
---
diff --git a/cantor-libgfortran_fix.patch b/cantor-libgfortran_fix.patch
new file mode 100644
index 0000000..ff034a2
--- /dev/null
+++ b/cantor-libgfortran_fix.patch
@@ -0,0 +1,34 @@
+diff --git a/cmake/FindR.cmake b/cmake/FindR.cmake
+index 11f4aff..6303417 100644
+--- a/cmake/FindR.cmake
++++ b/cmake/FindR.cmake
+@@ -70,13 +70,26 @@ IF(R_EXECUTABLE)
+     #MESSAGE(STATUS "Yes, ${R_LAPACK_LIBRARY} exists")
+     SET(R_LIBRARIES ${R_LIBRARIES} ${R_LAPACK_LIBRARY})
+     IF(NOT WIN32)
+-      FIND_LIBRARY(GFORTRAN_LIBRARY
+-        gfortran)
++      # Query gfortran to get the libgfortran.so path
++      FIND_PROGRAM(_GFORTRAN_EXECUTABLE NAMES gfortran)
++      IF(_GFORTRAN_EXECUTABLE)
++        EXECUTE_PROCESS(COMMAND ${_GFORTRAN_EXECUTABLE} -print-file-name=libgfortran.so
++                        OUTPUT_VARIABLE _libgfortran_path
++                        OUTPUT_STRIP_TRAILING_WHITESPACE
++                       )
++      ENDIF()
++      IF(EXISTS ${_libgfortran_path})
++        SET(GFORTRAN_LIBRARY ${_libgfortran_path})
++      ELSE()
++        # if libgfortran wasn't found at this point, the installation is probably broken
++        # Let's try to find the library nonetheless.
++        FIND_LIBRARY(GFORTRAN_LIBRARY gfortran)
++      ENDIF()
+       IF (GFORTRAN_LIBRARY)
+         # needed when linking to Rlapack on linux for some unknown reason.
+         # apparently not needed on windows (let's see, when it comes back to bite us, though)
+         # and compiling on windows is hard enough even without requiring libgfortran, too.
+-        SET(R_LIBRARIES ${R_LIBRARIES} gfortran)
++        SET(R_LIBRARIES ${R_LIBRARIES} ${GFORTRAN_LIBRARY})
+       ELSE (GFORTRAN_LIBRARY)
+         MESSAGE(STATUS "gfortran is needed for Rlapack but it could not be found")
+         SET(ABORT_CONFIG TRUE)
diff --git a/cantor.spec b/cantor.spec
index 2d1b9a5..8ff5c82 100644
--- a/cantor.spec
+++ b/cantor.spec
@@ -1,7 +1,7 @@
 Name:    cantor 
 Summary: KDE Frontend to Mathematical Software 
 Version: 4.10.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 License: GPLv2+
 URL:     https://projects.kde.org/projects/kde/kdeedu/cantor
@@ -14,11 +14,8 @@ URL:     https://projects.kde.org/projects/kde/kdeedu/cantor
 Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz
 
 ## upstream patches
-# revert these wrt looking for libgfortran for now, it breaks R support for us
-# https://bugs.kde.org/314253
-Patch101: 0001-Search-the-gfortran-library-before-using-it-uncondit.patch
-Patch102: 0002-Rlapack-needs-libgfortran.patch
-Patch103: 0003-Actually-make-my-check-work.patch
+# proper ligfortran buildfix for http://bugs.kde.org/314253
+Patch100: cantor-libgfortran_fix.patch
 
 BuildRequires: analitza-devel >= %{version}
 BuildRequires: desktop-file-utils
@@ -64,9 +61,7 @@ Requires: kdelibs4-devel
 %prep
 %setup -q
 
-%patch103 -p1 -R -b .0003
-%patch102 -p1 -R -b .0002
-%patch101 -p1 -R -b .0001
+%patch100 -p1 -b .libgfortran_fix
 
 
 %build
@@ -145,6 +140,9 @@ fi
 
 
 %changelog
+* Thu Feb 07 2013 Rex Dieter <rdieter at fedoraproject.org> 4.10.0-2
+- recent libgfortran-related commits breaks cantor-R support (kde#314253)
+
 * Fri Feb 01 2013 Rex Dieter <rdieter at fedoraproject.org> - 4.10.0-1
 - 4.10.0
 


More information about the scm-commits mailing list