refresh patches; enable openmp
authorAlastair McKinstry <mckinstry@debian.org>
Wed, 17 Apr 2019 13:18:03 +0000 (14:18 +0100)
committerAlastair McKinstry <mckinstry@debian.org>
Wed, 17 Apr 2019 13:18:03 +0000 (14:18 +0100)
debian/patches/CMakeLists.patch
debian/patches/pthread-fix.patch

index ff19a4c334765f22f047a01aeee01aa6b39a7856..0b80552e294077eced3414e88562bf219a283e9e 100644 (file)
@@ -1,8 +1,8 @@
-Index: mathgl-2.4/CMakeLists.txt
+Index: mathgl-2.4.3/CMakeLists.txt
 ===================================================================
---- mathgl-2.4.orig/CMakeLists.txt
-+++ mathgl-2.4/CMakeLists.txt
-@@ -145,7 +145,7 @@ if(WIN32)
+--- mathgl-2.4.3.orig/CMakeLists.txt
++++ mathgl-2.4.3/CMakeLists.txt
+@@ -157,7 +157,7 @@ if(WIN32)
  endif(WIN32)
  
  option(enable-double "Enable double precision in MathGL library" ON)
@@ -11,19 +11,16 @@ Index: mathgl-2.4/CMakeLists.txt
  option(enable-opengl "Enable OpenGL support" ON)
  option(enable-all-docs "Enable all documentation building")
  #option(enable-doc "Enable documentation building")
-@@ -153,9 +153,9 @@ option(enable-all "Enable all core featu
+@@ -165,7 +165,7 @@ option(enable-all "Enable all core featu
  option(enable-all-widgets "Enable all Widgets")
  option(enable-all-swig "Enable all SWIG based interfaces")
  option(enable-rvalue "Enable move constructor support (need C++11)" OFF)
 -option(enable-pthread "Enable POSIX threads support" OFF)
 +option(enable-pthread "Enable POSIX threads support" ON)
- option(enable-pthr-widget "Enable POSIX threads for widgets" ON)
--option(enable-openmp "Enable OpenMP support" ON)
-+option(enable-openmp "Enable OpenMP support" OFF)
- if(enable-pthread AND enable-openmp)
-       message(SEND_ERROR "You can't enable POSIX threads and OpenMP at the same time!")
-@@ -163,7 +163,7 @@ endif(enable-pthread AND enable-openmp)
+ if(MSVC)
+       option(enable-pthr-widget "Enable POSIX threads for widgets" OFF)
+ else(MSVC)
+@@ -180,7 +180,7 @@ endif(enable-pthread AND enable-openmp)
  
  option(enable-lgpl "Enable only LGPL part of MathGL")
  option(enable-mgl2 "Use names 'libmgl2-*' instead of 'libmgl-*'")
@@ -32,7 +29,7 @@ Index: mathgl-2.4/CMakeLists.txt
  option(enable-doc-site "Enable HTML documentation for website")
  #CMAKE_DEPENDENT_OPTION(enable-doc-site "Enable HTML documentation for website" OFF "NOT enable-all-docs" ON)
  CMAKE_DEPENDENT_OPTION(enable-doc-html "Enable HTML documentation" OFF "NOT enable-all-docs" ON)
-@@ -177,19 +177,19 @@ CMAKE_DEPENDENT_OPTION(enable-mgltex "En
+@@ -194,19 +194,19 @@ CMAKE_DEPENDENT_OPTION(enable-mgltex "En
  
  CMAKE_DEPENDENT_OPTION(enable-zlib "Enable zlib support" ON "NOT enable-all" ON)
  CMAKE_DEPENDENT_OPTION(enable-png "Enable png support" ON "NOT enable-all" ON)
@@ -63,7 +60,7 @@ Index: mathgl-2.4/CMakeLists.txt
  
  # msvc fwprintf print char* for the specifier of "%s" format
  if(MSVC AND MSVC_VERSION GREATER 1899)
-@@ -226,11 +226,11 @@ if(enable-qt4 OR enable-qt5)
+@@ -243,11 +243,11 @@ if(enable-qt4 OR enable-qt5)
  #     endif(NOT enable-opengl)
  endif(enable-qt4 OR enable-qt5)
  
index 8f54691adf1e3883f2a4691aed27fd7e86f46d25..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,16 +0,0 @@
-Index: mathgl-2.4.1/src/canvas.cpp
-===================================================================
---- mathgl-2.4.1.orig/src/canvas.cpp
-+++ mathgl-2.4.1/src/canvas.cpp
-@@ -1219,9 +1219,9 @@ void mglCanvas::Pop()
- {\r
-       B = stack.back(); \r
- #if MGL_HAVE_PTHREAD\r
--      pthread_mutex_lock(&m);\r
-+      pthread_mutex_lock(&mutexStk);\r
-       stack.pop_back();\r
--      pthread_mutex_unlock(&m);\r
-+      pthread_mutex_unlock(&mutexStk);\r
- #else\r
- #pragma omp critical(stk)\r
-       stack.pop_back();\r