From fdbd3b5ee89c06b47d33e30a3bd31f55e8fb1a39 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Fri, 30 Aug 2019 09:09:41 -0700 Subject: Avoid naming nonstandard to retrieve a NaN constant, as that header is no longer #includable from C. (#7979) --- ports/plplot/portfile.cmake | 1 + ports/plplot/use-math-h-nan.patch | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 ports/plplot/use-math-h-nan.patch (limited to 'ports/plplot') 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 ++ ++#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 -- cgit v1.2.3 From 47c6b3f557f305969bb271d10ad4b0b0d936ad23 Mon Sep 17 00:00:00 2001 From: zi-m <53815290+zi-m@users.noreply.github.com> Date: Sat, 5 Oct 2019 00:53:43 +0200 Subject: fix find_package(wxWidgets) issue in release build (#8405) --- ports/plplot/0005-wxwidgets-fix-rel-lib-dir.patch | 23 +++++++++++++++++++++++ ports/plplot/CONTROL | 2 +- ports/plplot/portfile.cmake | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ports/plplot/0005-wxwidgets-fix-rel-lib-dir.patch (limited to 'ports/plplot') diff --git a/ports/plplot/0005-wxwidgets-fix-rel-lib-dir.patch b/ports/plplot/0005-wxwidgets-fix-rel-lib-dir.patch new file mode 100644 index 000000000..7ebe79f11 --- /dev/null +++ b/ports/plplot/0005-wxwidgets-fix-rel-lib-dir.patch @@ -0,0 +1,23 @@ +diff --git a/cmake/modules/FindwxWidgets.cmake b/cmake/modules/FindwxWidgets.cmake +index eaaa358..a68683c 100644 +--- a/cmake/modules/FindwxWidgets.cmake ++++ b/cmake/modules/FindwxWidgets.cmake +@@ -516,13 +516,11 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") + endif() + endif() + if(VCPKG_TARGET_TRIPLET) +- find_library(wxWidgets_LIB_DIR +- NAMES +- wxmsw31ud_core.lib +- wxmsw31u_core.lib +- PATHS +- DOC "Path to wxWidgets libraries" +- ) ++ if(CMAKE_BUILD_TYPE STREQUAL "Debug") ++ find_library(wxWidgets_LIB_DIR NAMES wxmsw31ud_core.lib DOC "Path to wxWidgets libraries") ++ else() ++ find_library(wxWidgets_LIB_DIR NAMES wxmsw31u_core.lib DOC "Path to wxWidgets libraries") ++ endif() + get_filename_component(wxWidgets_LIB_DIR ${wxWidgets_LIB_DIR} DIRECTORY) + elseif(BUILD_SHARED_LIBS) + find_path(wxWidgets_LIB_DIR diff --git a/ports/plplot/CONTROL b/ports/plplot/CONTROL index 71bdb1a51..b70c5d176 100644 --- a/ports/plplot/CONTROL +++ b/ports/plplot/CONTROL @@ -1,5 +1,5 @@ Source: plplot -Version: 5.13.0-2 +Version: 5.13.0-3 Build-Depends: freetype, zlib, libpng, bzip2 Description: PLplot is a cross-platform software package for creating scientific plots whose (UTF-8) plot symbols and text are limited in practice only by what Unicode-aware system fonts are installed on a user's computer. diff --git a/ports/plplot/portfile.cmake b/ports/plplot/portfile.cmake index 1efd8f5a4..46781da07 100644 --- a/ports/plplot/portfile.cmake +++ b/ports/plplot/portfile.cmake @@ -18,6 +18,7 @@ vcpkg_extract_source_archive_ex( "${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" + "0005-wxwidgets-fix-rel-lib-dir.patch" ) set(BUILD_with_wxwidgets OFF) -- cgit v1.2.3