[clapack] 04/04: Try to use Debian packaged f2c

Andreas Tille tille at debian.org
Mon May 23 10:04:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository clapack.

commit 50abc6615c1326f61398ef037dd38cbbefc1fc88
Author: Andreas Tille <tille at debian.org>
Date:   Mon May 23 11:41:00 2016 +0200

    Try to use Debian packaged f2c
---
 debian/cmake/Modules/FindF2C.cmake           | 40 ++++++++++++++++++++++++++++
 debian/control                               |  3 ++-
 debian/patches/series                        |  1 +
 debian/patches/use_debian_packaged_f2c.patch | 19 +++++++++++++
 4 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/debian/cmake/Modules/FindF2C.cmake b/debian/cmake/Modules/FindF2C.cmake
new file mode 100644
index 0000000..0ee8e3e
--- /dev/null
+++ b/debian/cmake/Modules/FindF2C.cmake
@@ -0,0 +1,40 @@
+# Copyright 2013 Ettercap Development Team.
+#
+# Distributed under GPL licnse.
+#
+
+# Look for the header file
+FIND_PATH(F2C_INCLUDE_DIR NAMES f2c.h)
+MARK_AS_ADVANCED(F2C_INCLUDE_DIR)
+
+# Look for the library.
+FIND_LIBRARY(F2C_LIBRARY NAMES 
+    f2c
+)
+MARK_AS_ADVANCED(F2C_LIBRARY)
+
+# Make sure we've got an include dir.
+if(NOT F2C_INCLUDE_DIR)
+  if(F2C_FIND_REQUIRED AND NOT F2C_FIND_QUIETLY)
+    message(FATAL_ERROR "Could not find f2c include directory.")
+  endif()
+  return()
+endif()
+
+if(NOT F2C_LIBRARY)
+  if(F2C_FIND_REQUIRED AND NOT F2C_FIND_QUIETLY)
+    message(FATAL_ERROR "Could not find f2c library.")
+  endif()
+  return()
+endif()
+
+#handle the QUIETLY and REQUIRED arguments and set F2C_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(debian/cmake/Modules/FindF2C.cmake)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(F2C DEFAULT_MSG F2C_LIBRARY F2C_INCLUDE_DIR)
+
+if(F2C_FOUND)
+	set(F2C_LIBRARY ${F2C_LIBRARY})
+	set(F2C_INCLUDE_DIR ${F2C_INCLUDE_DIR})
+        set(F2C_VERSION_STRING ${F2C_VERSION_STRING})
+endif(F2C_FOUND)
diff --git a/debian/control b/debian/control
index 20cbb2d..cbfd896 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,8 @@ Section: libs
 Priority: optional
 Build-Depends: debhelper (>= 9),
                cmake,
-               d-shlibs
+               d-shlibs,
+               libf2c2-dev
 Standards-Version: 3.9.8
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/clapack.git
 Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/clapack.git
diff --git a/debian/patches/series b/debian/patches/series
index f473e4d..96e77fc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ format-security.patch
 skip_tests_triggering_stack_overflow.patch
 create_shared_libs.patch
 soname.patch
+use_debian_packaged_f2c.patch
diff --git a/debian/patches/use_debian_packaged_f2c.patch b/debian/patches/use_debian_packaged_f2c.patch
new file mode 100644
index 0000000..c843267
--- /dev/null
+++ b/debian/patches/use_debian_packaged_f2c.patch
@@ -0,0 +1,19 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,7 +18,6 @@ if(NOT USE_BLAS_WRAP)
+   add_definitions(-DNO_BLAS_WRAP)
+ endif()
+ include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE)
+-add_subdirectory(F2CLIBS)
+ add_subdirectory(BLAS)
+ add_subdirectory(SRC)
+ add_subdirectory(TESTING)
+@@ -27,7 +26,7 @@ set(CPACK_PACKAGE_VERSION_MAJOR 3)
+ set(CPACK_PACKAGE_VERSION_MINOR 2)
+ set(CPACK_PACKAGE_VERSION_PATCH 1)
+ include(CPack)
+-export(TARGETS f2c cblas cblas_static clapack clapack_static FILE clapack-targets.cmake)
++export(TARGETS cblas cblas_static clapack clapack_static FILE clapack-targets.cmake)
+ configure_file(${CLAPACK_SOURCE_DIR}/clapack-config-version.cmake.in
+   ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY)
+ configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clapack.git



More information about the debian-science-commits mailing list