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/jkqtplotter | |
Diffstat (limited to 'vcpkg/ports/jkqtplotter')
| -rw-r--r-- | vcpkg/ports/jkqtplotter/fix-cmake.patch | 52 | ||||
| -rw-r--r-- | vcpkg/ports/jkqtplotter/fix-cmake2.patch | 14 | ||||
| -rw-r--r-- | vcpkg/ports/jkqtplotter/portfile.cmake | 131 | ||||
| -rw-r--r-- | vcpkg/ports/jkqtplotter/vcpkg.json | 40 |
4 files changed, 237 insertions, 0 deletions
diff --git a/vcpkg/ports/jkqtplotter/fix-cmake.patch b/vcpkg/ports/jkqtplotter/fix-cmake.patch new file mode 100644 index 0000000..2141695 --- /dev/null +++ b/vcpkg/ports/jkqtplotter/fix-cmake.patch @@ -0,0 +1,52 @@ +diff --git a/cmake/FindCImg.cmake b/cmake/FindCImg.cmake +index 38a929e7a..3e8424a9f 100644 +--- a/cmake/FindCImg.cmake ++++ b/cmake/FindCImg.cmake +@@ -83,10 +83,10 @@ if (CIMG_FOUND) + endif (X11_Xrandr_FOUND) + + ### PThread is required when using X11 display engine ### +- find_package (PTHREAD QUIET) +- if (PTHREAD_FOUND) +- set (CIMG_INCLUDE_DIRS ${CIMG_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS}) +- set (CIMG_LIBRARIES ${CIMG_LIBRARIES} ${PTHREAD_LIBRARIES}) ++ find_package (Threads QUIET) ++ if (Threads_FOUND) ++ set (CIMG_INCLUDE_DIRS ${CIMG_INCLUDE_DIRS}) ++ set (CIMG_LIBRARIES ${CIMG_LIBRARIES} Threads::Threads) + message(STATUS "FindCImg.cmake: pthread found") + else (PTHREAD_FOUND) + message(STATUS "!!! FindCIMG.cmake !!! pthread NOT found. pthread required by cimg for running X11.") +@@ -100,15 +100,15 @@ if (CIMG_FOUND) + endif (X11_FOUND) + else (UNIX OR APPLE) + if (WIN32) +- find_package(GDI QUIET) +- if (GDI_FOUND) +- set (CIMG_LIBRARIES ${CIMG_LIBRARIES} ${GDI_LIBRARIES}) ++ find_library(GDI_LIBRARY gdi32) ++ if (GDI_LIBRARY) ++ set (CIMG_LIBRARIES ${CIMG_LIBRARIES} ${GDI_LIBRARY}) + message(STATUS "FindCImg.cmake: GDI found") +- else (GDI_FOUND) ++ else (GDI_LIBRARY) + message(STATUS "!!! FindCIMG.cmake !!! GDI NOT found.") + message(WARNING "FindCImg.cmake: display disabled") + set (CIMG_DEFINITIONS ${CIMG_DEFINITIONS} -Dcimg_display=0) +- endif (GDI_FOUND) ++ endif (GDI_LIBRARY) + endif (WIN32) + endif (UNIX OR APPLE) + +diff --git a/cmake/jkqtplotter_deployqt.cmake b/cmake/jkqtplotter_deployqt.cmake +index 5a8574591..5dbc8a51d 100644 +--- a/cmake/jkqtplotter_deployqt.cmake ++++ b/cmake/jkqtplotter_deployqt.cmake +@@ -1,6 +1,6 @@ + function(jkqtplotter_deployqt TARGET_NAME) + #use windeploy +- if (WIN32) ++ if (WIN32 AND 0) + # install system runtime lib + include( InstallRequiredSystemLibraries ) + if( CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ) diff --git a/vcpkg/ports/jkqtplotter/fix-cmake2.patch b/vcpkg/ports/jkqtplotter/fix-cmake2.patch new file mode 100644 index 0000000..5aa7ec3 --- /dev/null +++ b/vcpkg/ports/jkqtplotter/fix-cmake2.patch @@ -0,0 +1,14 @@ +
+diff --git a/lib/jkqtmath/CMakeLists.txt b/lib/jkqtmath/CMakeLists.txt +index 716254ac8..835b4e8cb 100644 +--- a/lib/jkqtmath/CMakeLists.txt ++++ b/lib/jkqtmath/CMakeLists.txt +@@ -110,7 +110,7 @@ endif() + if(JKQtPlotter_BUILD_STATIC_LIBS) + add_library(${lib_name} STATIC ${SOURCES} ${HEADERS}) + JKQtCommon_setDefaultLibOptions(${lib_name}) +- target_link_libraries(${libsh_name} PUBLIC JKQTCommonLib) ++ target_link_libraries(${lib_name} PUBLIC JKQTCommonLib) + set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}") + write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake + VERSION ${PROJECT_VERSION} diff --git a/vcpkg/ports/jkqtplotter/portfile.cmake b/vcpkg/ports/jkqtplotter/portfile.cmake new file mode 100644 index 0000000..f595e84 --- /dev/null +++ b/vcpkg/ports/jkqtplotter/portfile.cmake @@ -0,0 +1,131 @@ +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" JKQtPlotter_BUILD_SHARED_LIBS)
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" JKQtPlotter_BUILD_STATIC_LIBS)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO jkriege2/JKQtPlotter
+ REF a9bfcab4b96cd7bdeac30902f5d7a31b765c522b
+ SHA512 04b20eb66c833eac5dcd6a50c966217380b0f3a6e70092e36b80197b94d1ea2858b2b9f09aec5e02df2effab5b9b17059436589d727060bba3601ec1342278a9
+ HEAD_REF master
+ PATCHES
+ fix-cmake.patch
+ fix-cmake2.patch
+)
+
+vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "add_subdirectory(doc)" "")
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ "examples" JKQtPlotter_BUILD_EXAMPLES
+ "tools" JKQtPlotter_BUILD_TOOLS
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DJKQtPlotter_BUILD_SHARED_LIBS=${JKQtPlotter_BUILD_SHARED_LIBS}
+ -DJKQtPlotter_BUILD_STATIC_LIBS=${JKQtPlotter_BUILD_STATIC_LIBS}
+ ${FEATURE_OPTIONS}
+ -DCMAKE_IGNORE_PATH=${CURRENT_INSTALLED_DIR}/share/cmake/Qt5
+ -DCIMG_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
+ -DCMAKE_DISABLE_FIND_PACKAGE_OpenCV:BOOL=ON # only used for some examples
+ -DOpenCV_FOUND:BOOL=FALSE # wrong find_package call with QUITE instead of QUIET
+ MAYBE_UNUSED_VARIABLES
+ OpenCV_FOUND
+)
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake)
+
+vcpkg_copy_pdbs()
+set(tools "")
+if("tools" IN_LIST FEATURES)
+ list(APPEND tools
+ jkqtmathtext_render
+ jkqtplotter_doc_imagegenerator
+ )
+endif()
+if("examples" IN_LIST FEATURES)
+ list(APPEND tools
+ jkqtplot_test
+ jkqtptest_advplotstyling
+ jkqtptest_barchart
+ jkqtptest_boxplot
+ jkqtptest_contourplot
+ jkqtptest_datastore
+ jkqtptest_datastore_groupedstat
+ jkqtptest_datastore_iterators
+ jkqtptest_datastore_regression
+ jkqtptest_datastore_statistics
+ jkqtptest_datastore_statistics_2d
+ jkqtptest_dateaxes
+ jkqtptest_distributionplot
+ jkqtptest_errorbarstyles
+ jkqtptest_evalcurve
+ jkqtptest_filledgraphs
+ jkqtptest_functionplot
+ jkqtptest_geometric
+ jkqtptest_geo_arrows
+ jkqtptest_geo_simple
+ jkqtptest_imageplot
+ jkqtptest_imageplot_cimg
+ jkqtptest_imageplot_modifier
+ jkqtptest_imageplot_nodatastore
+ jkqtptest_imageplot_userpal
+ jkqtptest_impulsesplot
+ jkqtptest_jkqtfastplotter_test
+ jkqtptest_jkqtmathtext_simpletest
+ jkqtptest_jkqtmathtext_test
+ jkqtptest_logaxes
+ jkqtptest_mandelbrot
+ jkqtptest_parametriccurve
+ jkqtptest_paramscatterplot
+ jkqtptest_paramscatterplot_image
+ jkqtptest_parsedfunctionplot
+ jkqtptest_rgbimageplot
+ jkqtptest_rgbimageplot_cimg
+ jkqtptest_rgbimageplot_qt
+ jkqtptest_simpletest
+ jkqtptest_speed
+ jkqtptest_stackedbars
+ jkqtptest_stepplots
+ jkqtptest_styledboxplot
+ jkqtptest_styling
+ jkqtptest_symbols_and_errors
+ jkqtptest_symbols_and_styles
+ jkqtptest_ui
+ jkqtptest_user_interaction
+ jkqtptest_violinplot
+ jkqtptest_wiggleplots
+ jkqtptest_barchart_customdrawfunctor
+ jkqtptest_barchart_errorbars
+ jkqtptest_barchart_functorfill
+ jkqtptest_barchart_twocolor
+ jkqtptest_filledgraphs_errors
+ jkqtptest_geo_coordinateaxis0
+ jkqtptest_multiplot
+ jkqtptest_paramscatterplot_customsymbol
+ jkqtptest_scatter
+ jkqtptest_scatter_customsymbol
+ jkqtptest_second_axis
+ )
+endif()
+
+
+
+if(tools)
+ vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN)
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+endif()
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/doc" "${CURRENT_PACKAGES_DIR}/debug/doc")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_install_copyright(FILE_LIST
+ "${SOURCE_PATH}/LICENSE"
+ "${SOURCE_PATH}/lib/jkqtmathtext/resources/firaMath/LICENSE"
+ "${SOURCE_PATH}/lib/jkqtmathtext/resources/xits/OFL.txt"
+)
diff --git a/vcpkg/ports/jkqtplotter/vcpkg.json b/vcpkg/ports/jkqtplotter/vcpkg.json new file mode 100644 index 0000000..b393e50 --- /dev/null +++ b/vcpkg/ports/jkqtplotter/vcpkg.json @@ -0,0 +1,40 @@ +{ + "name": "jkqtplotter", + "version-date": "2023-10-24", + "port-version": 1, + "description": "A Qt Plotting Library", + "license": null, + "dependencies": [ + "cimg", + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui", + "jpeg", + "opengl", + "png", + "widgets" + ] + }, + "qtsvg", + { + "name": "vcpkg-cmake", + "host": true, + "default-features": false + }, + { + "name": "vcpkg-cmake-config", + "host": true, + "default-features": false + } + ], + "features": { + "examples": { + "description": "Build examples" + }, + "tools": { + "description": "Build tools" + } + } +} |