diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/gppanel | |
Diffstat (limited to 'vcpkg/ports/gppanel')
| -rw-r--r-- | vcpkg/ports/gppanel/00001-fix-build.patch | 24 | ||||
| -rw-r--r-- | vcpkg/ports/gppanel/CMakeLists.txt | 32 | ||||
| -rw-r--r-- | vcpkg/ports/gppanel/fix-missing-headers.patch | 14 | ||||
| -rw-r--r-- | vcpkg/ports/gppanel/portfile.cmake | 30 | ||||
| -rw-r--r-- | vcpkg/ports/gppanel/use-complex-header.patch | 14 | ||||
| -rw-r--r-- | vcpkg/ports/gppanel/vcpkg.json | 20 |
6 files changed, 134 insertions, 0 deletions
diff --git a/vcpkg/ports/gppanel/00001-fix-build.patch b/vcpkg/ports/gppanel/00001-fix-build.patch new file mode 100644 index 0000000..bf394d6 --- /dev/null +++ b/vcpkg/ports/gppanel/00001-fix-build.patch @@ -0,0 +1,24 @@ +diff --git a/gpPanel/gpPanel.cpp b/gpPanel/gpPanel.cpp +index 7af20b5..908523c 100644 +--- a/gpPanel/gpPanel.cpp ++++ b/gpPanel/gpPanel.cpp +@@ -720,8 +720,8 @@ void gpPanel::OnMenuItemPrintPreview(wxCommandEvent& event) + gpLayer_s *gp = GetLayerByMenuId(event.GetId() ); + if(gp==NULL)return; + +- mpPrintout *plotPrint = new mpPrintout(gp->m_plot, gp->layer->GetName()); +- mpPrintout *plotPrintPreview = new mpPrintout(gp->m_plot, gp->layer->GetName()); ++ mpPrintout *plotPrint = new mpPrintout(gp->m_plot, gp->layer->GetName().c_str()); ++ mpPrintout *plotPrintPreview = new mpPrintout(gp->m_plot, gp->layer->GetName().c_str()); + + wxPrintPreview *preview = new wxPrintPreview(plotPrintPreview, plotPrint); + +@@ -765,7 +765,7 @@ void gpPanel::OnMenuItemSaveScreenshot(wxCommandEvent& event) + if(index!=-1) + { + wxString reso = aChoices.Item(index); +- if( reso.CompareTo(_("custom")) == 0 ){ ++ if( reso.CompareTo(_("custom").c_str()) == 0 ){ + reso = wxGetTextFromUser(_("Write image resolution (format: [width]x[height]"), _("Custom resolution for image"), _("640x480"), this); + } + if(reso.Find('x') != -1) diff --git a/vcpkg/ports/gppanel/CMakeLists.txt b/vcpkg/ports/gppanel/CMakeLists.txt new file mode 100644 index 0000000..e300f28 --- /dev/null +++ b/vcpkg/ports/gppanel/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.13) +project(gpPanel CXX) + +set(wxWidgets_EXCLUDE_COMMON_LIBRARIES TRUE) +find_package(wxWidgets REQUIRED COMPONENTS core base) +include(${wxWidgets_USE_FILE}) + +file(GLOB_RECURSE SOURCES "gpPanel/*.cpp") +file(GLOB HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/include" "include/*.h") + +add_library(gpPanel STATIC ${SOURCES}) +target_compile_definitions(gpPanel PRIVATE _CRT_SECURE_NO_WARNINGS) + +target_include_directories(gpPanel PUBLIC + $<INSTALL_INTERFACE:include> + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> +) + +target_link_libraries(gpPanel PRIVATE ${wxWidgets_LIBRARIES}) + +install(TARGETS gpPanel EXPORT gpPanel-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(EXPORT gpPanel-config DESTINATION share/cmake/gpPanel) + +foreach(HEADER ${HEADERS}) + get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) + install(FILES include/${HEADER} DESTINATION include/gpPanel/${HEADER_DIR}) +endforeach() diff --git a/vcpkg/ports/gppanel/fix-missing-headers.patch b/vcpkg/ports/gppanel/fix-missing-headers.patch new file mode 100644 index 0000000..6247498 --- /dev/null +++ b/vcpkg/ports/gppanel/fix-missing-headers.patch @@ -0,0 +1,14 @@ +diff --git a/include/baseXYData.h b/include/baseXYData.h +index 2877e4f..f018b35 100644 +--- a/include/baseXYData.h ++++ b/include/baseXYData.h +@@ -5,6 +5,9 @@ + #include "CMinMax.h" + #include "xyMultimapLabel.h" + #include <deque> ++#include <time.h> ++#include <vector> ++#include <limits> + + //This possible to handle a lot of data quicker + //plot just second 1000 point to display.. diff --git a/vcpkg/ports/gppanel/portfile.cmake b/vcpkg/ports/gppanel/portfile.cmake new file mode 100644 index 0000000..47befcc --- /dev/null +++ b/vcpkg/ports/gppanel/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO woollybah/gppanel + REF f58a9028f7c9a8e9b4324ff2165951f558365f90 + SHA512 4ec5fbef4c487d351c60f48b0c0e41c5d077989ab96f827b9fd5ef01c167d50f39a313bd82db1b5df19d14025983e83db4d19cc4048c1c50fc8ef9128de15575 + HEAD_REF master + PATCHES + 00001-fix-build.patch + use-complex-header.patch + fix-missing-headers.patch # https://github.com/woollybah/gppanel/pull/5 +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DCMAKE_CXX_STANDARD=11 +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/gpPanel) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/gppanel/copyright COPYONLY) diff --git a/vcpkg/ports/gppanel/use-complex-header.patch b/vcpkg/ports/gppanel/use-complex-header.patch new file mode 100644 index 0000000..aa9c553 --- /dev/null +++ b/vcpkg/ports/gppanel/use-complex-header.patch @@ -0,0 +1,14 @@ +diff --git a/include/Fourier.h b/include/Fourier.h +index af55d2a..4283be8 100644 +--- a/include/Fourier.h ++++ b/include/Fourier.h +@@ -13,7 +13,8 @@ + //============================================================================== + // FORWARD DECLARATION + //============================================================================== +-namespace std { template<class T> class complex; } ++#include <complex> ++ + #define SQUARE(real,imag) sqrt((real)*(real)+(imag)*(imag)) + + //============================================================================== diff --git a/vcpkg/ports/gppanel/vcpkg.json b/vcpkg/ports/gppanel/vcpkg.json new file mode 100644 index 0000000..6b6d2db --- /dev/null +++ b/vcpkg/ports/gppanel/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "gppanel", + "version-date": "2020-05-20", + "port-version": 4, + "description": "gpPanel is chart library for wxWidget. It inheritance from wxPanel and use modified wxMathPlot library at chart engine.", + "homepage": "https://github.com/woollybah/gppanel", + "license": "GPL-2.0-or-later WITH WxWindows-exception-3.1", + "supports": "!xbox", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "wxwidgets" + ] +} |