[med-svn] [edflib] 01/02: add patch to fix hurd build failure
Fabian Klötzl
kloetzl-guest at moszumanska.debian.org
Tue Aug 22 08:29:36 UTC 2017
This is an automated email from the git hooks/post-receive script.
kloetzl-guest pushed a commit to branch master
in repository edflib.
commit 89af4063b31b94ed99285057e9146c87e655a714
Author: Fabian Klötzl <fabian at kloetzl.info>
Date: Tue Aug 22 10:25:43 2017 +0200
add patch to fix hurd build failure
---
debian/patches/properly-check-for-exp10.patch | 55 +++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 56 insertions(+)
diff --git a/debian/patches/properly-check-for-exp10.patch b/debian/patches/properly-check-for-exp10.patch
new file mode 100644
index 0000000..1f7d907
--- /dev/null
+++ b/debian/patches/properly-check-for-exp10.patch
@@ -0,0 +1,55 @@
+From: Fabian Klötzl <fabian at kloetzl.info>
+Date: Tue, 22 Aug 2017 10:18:47 +0200
+Subject: properly check for exp10
+
+---
+ CMakeLists.txt | 10 ++++++++++
+ sweep_generator.c | 7 -------
+ 2 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 64c423e..a5016f6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -21,6 +21,11 @@ set_target_properties(edf
+ ${LIBRARY_PROPERTIES}
+ )
+
++include(CheckSymbolExists)
++set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
++set(CMAKE_REQUIRED_LIBRARIES -lm)
++check_symbol_exists(exp10 "math.h" HAVE_EXP10)
++
+ install(FILES edflib.h
+ DESTINATION include
+ )
+@@ -44,6 +49,11 @@ target_link_libraries(test_generator edf)
+
+ add_executable(sweep_generator sweep_generator.c)
+ target_link_libraries(sweep_generator edf)
++if(HAVE_EXP10)
++ target_compile_definitions(sweep_generator PRIVATE expo=exp10)
++else()
++ target_compile_definitions(sweep_generator PRIVATE expo=__exp10)
++endif()
+
+ if(UNIX)
+ target_link_libraries(sine_generator m)
+diff --git a/sweep_generator.c b/sweep_generator.c
+index 3d27a14..58ff201 100644
+--- a/sweep_generator.c
++++ b/sweep_generator.c
+@@ -74,13 +74,6 @@ int main(int argc, char *argv[])
+ char str[256];
+
+
+-#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__)
+-#define expo __exp10
+-#else
+-#define expo exp10
+-#endif
+-
+-
+ #ifdef BDF_FORMAT
+ hdl = edfopen_file_writeonly("freq_sweep.bdf", EDFLIB_FILETYPE_BDFPLUS, chns);
+ #else
diff --git a/debian/patches/series b/debian/patches/series
index 0363711..fbb04ad 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
addcmake.patch
+properly-check-for-exp10.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/edflib.git
More information about the debian-med-commit
mailing list