[cantor] revert upstream commits that breaks build
Rex Dieter
rdieter at fedoraproject.org
Fri Feb 1 13:09:49 UTC 2013
commit c2f6055c458f03db817b9618093c0fd8aad3296c
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Fri Feb 1 07:08:46 2013 -0600
revert upstream commits that breaks build
Revert upstream commits that breaks build (for now), until some
better, proper fix is found.
...gfortran-library-before-using-it-uncondit.patch | 61 ++++++++++++++++++++
0002-Rlapack-needs-libgfortran.patch | 34 +++++++++++
0003-Actually-make-my-check-work.patch | 50 ++++++++++++++++
cantor.spec | 11 +++-
4 files changed, 155 insertions(+), 1 deletions(-)
---
diff --git a/0001-Search-the-gfortran-library-before-using-it-uncondit.patch b/0001-Search-the-gfortran-library-before-using-it-uncondit.patch
new file mode 100644
index 0000000..9d4f54f
--- /dev/null
+++ b/0001-Search-the-gfortran-library-before-using-it-uncondit.patch
@@ -0,0 +1,61 @@
+From 6e95493628e6ec6bef4d9ec9122b67ca0351b2a0 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid at kde.org>
+Date: Mon, 21 Jan 2013 23:15:12 +0100
+Subject: [PATCH 1/4] Search the gfortran library before using it
+ unconditionally
+
+Hope it fixes cantor build in build.kde.org
+---
+ cmake/FindR.cmake | 18 +++++++++++-------
+ 1 file changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/cmake/FindR.cmake b/cmake/FindR.cmake
+index 0022f90..63d0387 100644
+--- a/cmake/FindR.cmake
++++ b/cmake/FindR.cmake
+@@ -1,4 +1,4 @@
+-# - Try to find R
++# - Try to find R
+ # Once done this will define
+ #
+ # R_FOUND - system has R
+@@ -40,7 +40,7 @@ IF(R_EXECUTABLE)
+ MESSAGE(STATUS "R_Home not findable via R. Guessing")
+ ENDIF(NOT R_INCLUDE_DIR)
+
+- FIND_PATH(R_INCLUDE_DIR R.h)
++ FIND_PATH(R_INCLUDE_DIR R.h)
+
+ # check for existence of libR.so
+
+@@ -69,10 +69,14 @@ IF(R_EXECUTABLE)
+ #MESSAGE(STATUS "Yes, ${R_LAPACK_LIBRARY} exists")
+ SET(R_LIBRARIES ${R_LIBRARIES} ${R_LAPACK_LIBRARY})
+ IF(NOT WIN32)
+- # 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)
++ FIND_LIBRARY(GFORTRAN_LIBRARY
++ gfortran)
++ 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)
++ endif (GFORTRAN_LIBRARY)
+ ENDIF(NOT WIN32)
+ ENDIF(NOT R_LAPACK_LIBRARY)
+
+@@ -94,7 +98,7 @@ IF(R_EXECUTABLE)
+ ENDIF( R_EXECUTABLE )
+
+ INCLUDE(FindPackageHandleStandardArgs)
+-FIND_PACKAGE_HANDLE_STANDARD_ARGS(R DEFAULT_MSG
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(R DEFAULT_MSG
+ R_EXECUTABLE R_INCLUDE_DIR R_R_LIBRARY)
+
+ MARK_AS_ADVANCED(R_INCLUDE_DIR R_R_LIBRARY R_LAPACK_LIBRARY R_BLAS_LIBRARY)
+--
+1.8.1
+
diff --git a/0002-Rlapack-needs-libgfortran.patch b/0002-Rlapack-needs-libgfortran.patch
new file mode 100644
index 0000000..d2746c6
--- /dev/null
+++ b/0002-Rlapack-needs-libgfortran.patch
@@ -0,0 +1,34 @@
+From 41f812a7698fb965e7ec2d5499fb66a6b87f48b7 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid at kde.org>
+Date: Mon, 21 Jan 2013 23:25:56 +0100
+Subject: [PATCH 2/4] Rlapack needs libgfortran
+
+so if no gfortran assume r is not found
+---
+ cmake/FindR.cmake | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/FindR.cmake b/cmake/FindR.cmake
+index 63d0387..f0dcec4 100644
+--- a/cmake/FindR.cmake
++++ b/cmake/FindR.cmake
+@@ -71,12 +71,14 @@ IF(R_EXECUTABLE)
+ IF(NOT WIN32)
+ FIND_LIBRARY(GFORTRAN_LIBRARY
+ gfortran)
+- if (GFORTRAN_LIBRARY)
++ 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)
+- endif (GFORTRAN_LIBRARY)
++ ELSE (GFORTRAN_LIBRARY)
++ SET(R_FOUND false)
++ ENDIF (GFORTRAN_LIBRARY)
+ ENDIF(NOT WIN32)
+ ENDIF(NOT R_LAPACK_LIBRARY)
+
+--
+1.8.1
+
diff --git a/0003-Actually-make-my-check-work.patch b/0003-Actually-make-my-check-work.patch
new file mode 100644
index 0000000..a20f933
--- /dev/null
+++ b/0003-Actually-make-my-check-work.patch
@@ -0,0 +1,50 @@
+From cc26da79e51f4826a9b34ae034fc40704b2748e9 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid at kde.org>
+Date: Mon, 21 Jan 2013 23:36:06 +0100
+Subject: [PATCH 3/4] Actually make my check work
+
+---
+ cmake/FindR.cmake | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/cmake/FindR.cmake b/cmake/FindR.cmake
+index f0dcec4..11f4aff 100644
+--- a/cmake/FindR.cmake
++++ b/cmake/FindR.cmake
+@@ -10,6 +10,7 @@
+ # find the R binary
+ FIND_PROGRAM(R_EXECUTABLE R)
+
++SET(ABORT_CONFIG FALSE)
+ IF(R_EXECUTABLE)
+
+ # find R_HOME
+@@ -77,7 +78,8 @@ IF(R_EXECUTABLE)
+ # and compiling on windows is hard enough even without requiring libgfortran, too.
+ SET(R_LIBRARIES ${R_LIBRARIES} gfortran)
+ ELSE (GFORTRAN_LIBRARY)
+- SET(R_FOUND false)
++ MESSAGE(STATUS "gfortran is needed for Rlapack but it could not be found")
++ SET(ABORT_CONFIG TRUE)
+ ENDIF (GFORTRAN_LIBRARY)
+ ENDIF(NOT WIN32)
+ ENDIF(NOT R_LAPACK_LIBRARY)
+@@ -99,8 +101,12 @@ IF(R_EXECUTABLE)
+
+ ENDIF( R_EXECUTABLE )
+
+-INCLUDE(FindPackageHandleStandardArgs)
+-FIND_PACKAGE_HANDLE_STANDARD_ARGS(R DEFAULT_MSG
++IF(ABORT_CONFIG)
++ SET(R_FOUND FALSE)
++ELSE(ABORT_CONFIG)
++ INCLUDE(FindPackageHandleStandardArgs)
++ FIND_PACKAGE_HANDLE_STANDARD_ARGS(R DEFAULT_MSG
+ R_EXECUTABLE R_INCLUDE_DIR R_R_LIBRARY)
+
+-MARK_AS_ADVANCED(R_INCLUDE_DIR R_R_LIBRARY R_LAPACK_LIBRARY R_BLAS_LIBRARY)
++ MARK_AS_ADVANCED(R_INCLUDE_DIR R_R_LIBRARY R_LAPACK_LIBRARY R_BLAS_LIBRARY)
++ENDIF(ABORT_CONFIG)
+--
+1.8.1
+
diff --git a/cantor.spec b/cantor.spec
index 0d6cb09..0a9b9f6 100644
--- a/cantor.spec
+++ b/cantor.spec
@@ -13,9 +13,14 @@ URL: https://projects.kde.org/projects/kde/kdeedu/cantor
%endif
Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz
+## upstream patches
+# revert these wrt looking for libgfortran for now, it breaks the build for us
+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
+
BuildRequires: analitza-devel >= %{version}
BuildRequires: desktop-file-utils
-BuildRequires: gcc-gfortran
BuildRequires: kdelibs4-devel >= %{version}
BuildRequires: pkgconfig(eigen2)
BuildRequires: pkgconfig(libqalculate)
@@ -58,6 +63,10 @@ Requires: kdelibs4-devel
%prep
%setup -q
+%patch103 -p1 -R -b .0003
+%patch102 -p1 -R -b .0002
+%patch101 -p1 -R -b .0001
+
%build
mkdir -p %{_target_platform}
More information about the scm-commits
mailing list