summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/gdl/files/0.9.2-semaphore.patch')
-rw-r--r--dev-lang/gdl/files/0.9.2-semaphore.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/dev-lang/gdl/files/0.9.2-semaphore.patch b/dev-lang/gdl/files/0.9.2-semaphore.patch
new file mode 100644
index 000000000000..f2a28042f8d1
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.2-semaphore.patch
@@ -0,0 +1,22 @@
+--- gdl-0.9.2/CMakeLists.txt 2011-11-06 22:39:45.000000000 +0000
++++ gdl-0.9.2/CMakeLists.txt.new 2012-06-21 00:02:42.000000000 +0100
+@@ -217,6 +217,19 @@
+ add_definitions(${OpenMP_CXX_FLAGS})
+ set(LIBRARIES ${LIBRARIES} ${OpenMP_CXX_FLAGS})
+ endif(OPENMP_FOUND)
++else(OPENMP)
++ # we need to define those semaphore posix symbols, do it with threads libs
++ find_package(Threads)
++ if(THREADS_FOUND)
++ set(LIBRARIES ${LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
++ else(THREADS_FOUND)
++ check_library_exists(rt sem_unlink "" HAVE_RT)
++ if(HAVE_RT)
++ set(LIBRARIES ${LIBRARIES} rt)
++ else(HAVE_RT)
++ message(FATAL_ERROR "Missing a POSIX semaphore symbols (rt or threads).\n")
++ endif(HAVE_RT)
++ endif(THREADS_FOUND)
+ endif(OPENMP)
+
+ # GSL MANDATORY