early-access version 2853
This commit is contained in:
71
externals/vcpkg/ports/plplot/0001-findwxwidgets-fixes.patch
vendored
Executable file
71
externals/vcpkg/ports/plplot/0001-findwxwidgets-fixes.patch
vendored
Executable file
@@ -0,0 +1,71 @@
|
||||
diff --git a/cmake/modules/FindwxWidgets.cmake b/cmake/modules/FindwxWidgets.cmake
|
||||
index 4d3a2d1..c83d8a6 100644
|
||||
--- a/cmake/modules/FindwxWidgets.cmake
|
||||
+++ b/cmake/modules/FindwxWidgets.cmake
|
||||
@@ -515,7 +515,14 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
set(_WX_ARCH _x64)
|
||||
endif()
|
||||
endif()
|
||||
- if(BUILD_SHARED_LIBS)
|
||||
+
|
||||
+ include(SelectLibraryConfigurations)
|
||||
+ find_library(wxWidgets_LIB_DIR_LIBRARY_RELEASE NAMES wxmsw31u_core)
|
||||
+ find_library(wxWidgets_LIB_DIR_LIBRARY_DEBUG NAMES wxmsw31ud_core)
|
||||
+ select_library_configurations(wxWidgets_LIB_DIR)
|
||||
+ get_filename_component(wxWidgets_LIB_DIR ${wxWidgets_LIB_DIR} DIRECTORY)
|
||||
+ if(0)
|
||||
+ if(BUILD_SHARED_LIBS)
|
||||
find_path(wxWidgets_LIB_DIR
|
||||
NAMES
|
||||
msw/wx/setup.h
|
||||
@@ -554,6 +561,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
endif()
|
||||
+ endif()
|
||||
unset(_WX_TOOL)
|
||||
unset(_WX_TOOLVER)
|
||||
unset(_WX_ARCH)
|
||||
@@ -571,7 +579,9 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
set(wxWidgets_DEFINITIONS WXUSINGDLL)
|
||||
DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}")
|
||||
endif()
|
||||
-
|
||||
+ if(BUILD_SHARED_LIBS)
|
||||
+ set(wxWidgets_DEFINITIONS WXUSINGDLL)
|
||||
+ endif(BUILD_SHARED_LIBS)
|
||||
# Search for available configuration types.
|
||||
foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw)
|
||||
set(WX_${CFG}_FOUND FALSE)
|
||||
@@ -583,6 +593,13 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
endforeach()
|
||||
DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}")
|
||||
|
||||
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
+ set(WX_CONFIGURATION "mswud")
|
||||
+ else()
|
||||
+ set(WX_CONFIGURATION "mswu")
|
||||
+ endif()
|
||||
+ set(WX_${WX_CONFIGURATION}_FOUND TRUE)
|
||||
+
|
||||
if(WX_CONFIGURATION)
|
||||
set(wxWidgets_FOUND TRUE)
|
||||
|
||||
@@ -616,6 +633,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG)
|
||||
|
||||
# Set wxWidgets lib setup include directory.
|
||||
+ set(wxWidgets_INCLUDE_DIRS "${wxWidgets_ROOT_DIR}/include")
|
||||
+ if(0)
|
||||
if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
|
||||
set(wxWidgets_INCLUDE_DIRS
|
||||
${WX_LIB_DIR}/${wxWidgets_CONFIGURATION})
|
||||
@@ -623,7 +642,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
DBG_MSG("wxWidgets_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.")
|
||||
set(wxWidgets_FOUND FALSE)
|
||||
endif()
|
||||
-
|
||||
+ endif()
|
||||
# Set wxWidgets main include directory.
|
||||
if(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
|
||||
list(APPEND wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include)
|
12
externals/vcpkg/ports/plplot/0002-wxwidgets-dev-fixes.patch
vendored
Executable file
12
externals/vcpkg/ports/plplot/0002-wxwidgets-dev-fixes.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/drivers/wxwidgets_dev.cpp b/drivers/wxwidgets_dev.cpp
|
||||
index f025bd8..f5881b1 100644
|
||||
--- a/drivers/wxwidgets_dev.cpp
|
||||
+++ b/drivers/wxwidgets_dev.cpp
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
// Headers needed for Rand
|
||||
#ifdef WIN32
|
||||
+#define _WINSOCKAPI_
|
||||
// This include must occur before any other include of stdlib.h due to
|
||||
// the #define _CRT_RAND_S
|
||||
#define _CRT_RAND_S
|
17
externals/vcpkg/ports/plplot/fix-pkg-config.patch
vendored
Executable file
17
externals/vcpkg/ports/plplot/fix-pkg-config.patch
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
diff --git a/cmake/modules/psttf.cmake b/cmake/modules/psttf.cmake
|
||||
index 950f41b..6c20af5 100644
|
||||
--- a/cmake/modules/psttf.cmake
|
||||
+++ b/cmake/modules/psttf.cmake
|
||||
@@ -56,7 +56,11 @@ if(PLD_psttf)
|
||||
endif(PLD_psttf)
|
||||
|
||||
if(PLD_psttf)
|
||||
- pkg_check_pkgconfig("lasi;pango;pangoft2" includedir libdir linkflags cflags version _PSTTF)
|
||||
+ set(PKG_LIST lasi pango pangoft2)
|
||||
+ foreach (SELECTED_PKG ${PKG_LIST})
|
||||
+ pkg_check_pkgconfig("${SELECTED_PKG}" includedir libdir linkflags cflags version _PSTTF)
|
||||
+ endforeach()
|
||||
+
|
||||
if(linkflags)
|
||||
#blank-separated required.
|
||||
string(REGEX REPLACE ";" " " psttf_COMPILE_FLAGS "${cflags}")
|
23
externals/vcpkg/ports/plplot/fix_utils.patch
vendored
Executable file
23
externals/vcpkg/ports/plplot/fix_utils.patch
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
|
||||
index 59cfe20..b936dad 100644
|
||||
--- a/utils/CMakeLists.txt
|
||||
+++ b/utils/CMakeLists.txt
|
||||
@@ -75,7 +75,8 @@ add_executable(parity_bit_check parity_bit_check.c)
|
||||
if(ENABLE_wxwidgets AND NOT OLD_WXWIDGETS)
|
||||
# Build wxwidgets applications with same wxwidgets compile and link flags
|
||||
# as used with the PLplot wxwidgets device driver.
|
||||
-
|
||||
+ find_package(JPEG REQUIRED)
|
||||
+ find_package(TIFF REQUIRED)
|
||||
set(wxPLViewer_SRCS wxplviewer.cpp wxplframe.cpp ${CMAKE_SOURCE_DIR}/drivers/wxwidgets_comms.cpp)
|
||||
set_source_files_properties(${wxPLViewer_SRCS}
|
||||
PROPERTIES COMPILE_FLAGS "${wxwidgets_COMPILE_FLAGS}")
|
||||
@@ -90,7 +91,7 @@ if(ENABLE_wxwidgets AND NOT OLD_WXWIDGETS)
|
||||
COMPILE_DEFINITIONS "USINGDLL"
|
||||
)
|
||||
endif(BUILD_SHARED_LIBS)
|
||||
- target_link_libraries(wxPLViewer plplotwxwidgets plplotcxx ${wxwidgets_LINK_FLAGS} ${MATH_LIB} ${RT_LIB})
|
||||
+ target_link_libraries(wxPLViewer plplotwxwidgets plplotcxx ${wxwidgets_LINK_FLAGS} ${MATH_LIB} ${RT_LIB} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES})
|
||||
|
||||
if(USE_RPATH)
|
||||
# Assume that plplotwxwidgets and plplotcxx have the same install location as plplot
|
13
externals/vcpkg/ports/plplot/install-interface-include-directories.patch
vendored
Executable file
13
externals/vcpkg/ports/plplot/install-interface-include-directories.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index d81b6a7..6b51809 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -181,6 +181,8 @@ include_directories(
|
||||
add_library(plplot ${plplot_LIB_SRCS})
|
||||
add_dependencies(plplot plhershey-unicode.h_built)
|
||||
|
||||
+target_include_directories(plplot INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
+
|
||||
# Deal with external libraries.
|
||||
set(LIB_INSTALL_RPATH ${LIB_DIR})
|
||||
set(libplplot_LINK_LIBRARIES)
|
71
externals/vcpkg/ports/plplot/portfile.cmake
vendored
Executable file
71
externals/vcpkg/ports/plplot/portfile.cmake
vendored
Executable file
@@ -0,0 +1,71 @@
|
||||
set(PLPLOT_VERSION 5.13.0)
|
||||
|
||||
vcpkg_from_sourceforge(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO plplot/plplot
|
||||
REF ${PLPLOT_VERSION}%20Source
|
||||
FILENAME "plplot-${PLPLOT_VERSION}.tar.gz"
|
||||
SHA512 1d5cb5da17d4bde6d675585bff1f8dcb581719249a0b2687867e767703f8dab0870e7ea44b9549a497f4ac0141a3cabf6761c49520c0e2b26ffe581468512cbb
|
||||
PATCHES
|
||||
0001-findwxwidgets-fixes.patch
|
||||
0002-wxwidgets-dev-fixes.patch
|
||||
install-interface-include-directories.patch
|
||||
use-math-h-nan.patch
|
||||
fix_utils.patch
|
||||
fix-pkg-config.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
wxwidgets PLD_wxwidgets
|
||||
wxwidgets ENABLE_wxwidgets
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DDEFAULT_NO_BINDINGS=ON
|
||||
-DENABLE_cxx=ON
|
||||
-DPL_HAVE_QHULL=OFF
|
||||
-DPLPLOT_USE_QT5=OFF
|
||||
-DPL_DOUBLE=ON
|
||||
-DENABLE_DYNDRIVERS=OFF
|
||||
-DDATA_DIR=${CURRENT_PACKAGES_DIR}/share/plplot
|
||||
${FEATURE_OPTIONS}
|
||||
OPTIONS_DEBUG
|
||||
-DDRV_DIR=${CURRENT_PACKAGES_DIR}/debug/bin
|
||||
OPTIONS_RELEASE
|
||||
-DDRV_DIR=${CURRENT_PACKAGES_DIR}/bin
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/plplot)
|
||||
|
||||
# Remove unnecessary tool
|
||||
file(REMOVE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/bin/pltek.exe"
|
||||
"${CURRENT_PACKAGES_DIR}/bin/pltek.exe"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/bin/wxPLViewer.exe"
|
||||
"${CURRENT_PACKAGES_DIR}/bin/wxPLViewer.exe"
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
message(STATUS "Static build: Removing the full bin directory.")
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/bin"
|
||||
"${CURRENT_PACKAGES_DIR}/bin"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Remove unwanted and duplicate directories
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/plplot/examples")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
28
externals/vcpkg/ports/plplot/use-math-h-nan.patch
vendored
Executable file
28
externals/vcpkg/ports/plplot/use-math-h-nan.patch
vendored
Executable file
@@ -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
|
28
externals/vcpkg/ports/plplot/vcpkg.json
vendored
Executable file
28
externals/vcpkg/ports/plplot/vcpkg.json
vendored
Executable file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "plplot",
|
||||
"version-semver": "5.13.0",
|
||||
"port-version": 15,
|
||||
"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.",
|
||||
"dependencies": [
|
||||
"bzip2",
|
||||
"freetype",
|
||||
"libpng",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"features": {
|
||||
"wxwidgets": {
|
||||
"description": "plplot wxwidgets module",
|
||||
"dependencies": [
|
||||
"wxwidgets"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user