From a5ff5cdf2f6611358c9cfdf9c8460d0eed683a90 Mon Sep 17 00:00:00 2001 From: autoantwort <41973254+autoantwort@users.noreply.github.com> Date: Sat, 13 Nov 2021 01:40:14 +0100 Subject: [PATCH] [plplot] no absolute paths (#21303) --- ports/plplot/portfile.cmake | 46 ++++++++++++++++++++----------------- ports/plplot/vcpkg.json | 12 ++++++++-- versions/baseline.json | 2 +- versions/p-/plplot.json | 5 ++++ 4 files changed, 41 insertions(+), 24 deletions(-) diff --git a/ports/plplot/portfile.cmake b/ports/plplot/portfile.cmake index cc4b7a433a..da70bbe4e6 100644 --- a/ports/plplot/portfile.cmake +++ b/ports/plplot/portfile.cmake @@ -15,14 +15,14 @@ vcpkg_from_sourceforge( fix-pkg-config.patch ) -set(BUILD_with_wxwidgets OFF) -if("wxwidgets" IN_LIST FEATURES) - set(BUILD_with_wxwidgets ON) -endif() +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + wxwidgets BUILD_with_wxwidgets +) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DENABLE_tcl=OFF -DENABLE_d=OFF @@ -31,41 +31,45 @@ vcpkg_configure_cmake( -DPL_HAVE_QHULL=OFF -DPLPLOT_USE_QT5=OFF -DPL_DOUBLE=ON - -DPLD_wxwidgets=${BUILD_with_wxwidgets} -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_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/plplot) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/plplot) + +if(EXISTS "${CURRENT_PACKAGES_DIR}/share/plplot/examples/plplot-test-interactive.sh") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/plplot/examples/plplot-test-interactive.sh" "${CURRENT_PACKAGES_DIR}/share/plplot" "../") +endif() # 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 + "${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 + "${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}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -vcpkg_fixup_pkgconfig() +file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +vcpkg_fixup_pkgconfig() diff --git a/ports/plplot/vcpkg.json b/ports/plplot/vcpkg.json index 80eed11923..6f71973180 100644 --- a/ports/plplot/vcpkg.json +++ b/ports/plplot/vcpkg.json @@ -1,12 +1,20 @@ { "name": "plplot", - "version-string": "5.13.0", - "port-version": 11, + "version-semver": "5.13.0", + "port-version": 12, "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": { diff --git a/versions/baseline.json b/versions/baseline.json index 175beace4e..9c3aa29401 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5258,7 +5258,7 @@ }, "plplot": { "baseline": "5.13.0", - "port-version": 11 + "port-version": 12 }, "plustache": { "baseline": "0.4.0", diff --git a/versions/p-/plplot.json b/versions/p-/plplot.json index ebcf8ac2b8..ca58d2291f 100644 --- a/versions/p-/plplot.json +++ b/versions/p-/plplot.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "81172e3761f2638245de863b13d8e13cbf08188d", + "version-semver": "5.13.0", + "port-version": 12 + }, { "git-tree": "ad6d85b2cc702beabe146047209cb580174ceea8", "version-string": "5.13.0",