aboutsummaryrefslogtreecommitdiff
path: root/ports/plplot
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@hamburg.de>2019-09-20 12:24:23 +0200
committerAlexander Neumann <alexander.neumann@hamburg.de>2019-09-20 12:24:23 +0200
commit5b1e426929b40a9b60809284993b424b841a28fc (patch)
treebd12300ad859bababb7d4acc03700fd31949fddc /ports/plplot
parent279e25aecfe30f55296881ea9b0236c1d6ee030a (diff)
parent358ec0954d9b71b0def4fd4b4dbafdd0b8478d81 (diff)
downloadvcpkg-5b1e426929b40a9b60809284993b424b841a28fc.tar.gz
vcpkg-5b1e426929b40a9b60809284993b424b841a28fc.zip
Merge remote-tracking branch 'upstream/master' into path_separator
# Conflicts: # scripts/cmake/vcpkg_common_definitions.cmake
Diffstat (limited to 'ports/plplot')
-rw-r--r--ports/plplot/portfile.cmake1
-rw-r--r--ports/plplot/use-math-h-nan.patch28
2 files changed, 29 insertions, 0 deletions
diff --git a/ports/plplot/portfile.cmake b/ports/plplot/portfile.cmake
index c98c8253b..1efd8f5a4 100644
--- a/ports/plplot/portfile.cmake
+++ b/ports/plplot/portfile.cmake
@@ -17,6 +17,7 @@ vcpkg_extract_source_archive_ex(
"${CMAKE_CURRENT_LIST_DIR}/0001-findwxwidgets-fixes.patch"
"${CMAKE_CURRENT_LIST_DIR}/0002-wxwidgets-dev-fixes.patch"
"${CMAKE_CURRENT_LIST_DIR}/install-interface-include-directories.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/use-math-h-nan.patch"
)
set(BUILD_with_wxwidgets OFF)
diff --git a/ports/plplot/use-math-h-nan.patch b/ports/plplot/use-math-h-nan.patch
new file mode 100644
index 000000000..1f3987730
--- /dev/null
+++ b/ports/plplot/use-math-h-nan.patch
@@ -0,0 +1,28 @@
+diff --git "a/lib/csa/nan.h" "b/lib/csa/nan.h"
+index 29fd3d2f..7f16e8c8 100644
+--- "a/lib/csa/nan.h"
++++ "b/lib/csa/nan.h"
+@@ -19,6 +19,16 @@
+ #if !defined ( _NAN_H )
+ #define _NAN_H
+
++// Try to use the implementation-provided NAN constant:
++
++#include <math.h>
++
++#if defined(NAN)
++
++#define NaN ((double)NAN)
++
++#else // ^^^ implementation provides NAN // implementation does not provide NAN vvv
++
+ #if ( defined ( __GNUC__ ) && !defined ( __ICC ) ) || defined ( __BORLANDC__ )
+
+ static const double NaN = 0.0 / 0.0;
+@@ -63,4 +73,6 @@ static const long long lNaN = ( (unsigned long long) 1 << 63 ) - 1;
+
+ #endif
+
++#endif // defined(NAN)
++
+ #endif