Skip to content

Commit

Permalink
[plplot] no absolute paths (#21303)
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort authored Nov 13, 2021
1 parent 56136f5 commit a5ff5cd
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 24 deletions.
46 changes: 25 additions & 21 deletions ports/plplot/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

vcpkg_fixup_pkgconfig()
vcpkg_fixup_pkgconfig()
12 changes: 10 additions & 2 deletions ports/plplot/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5258,7 +5258,7 @@
},
"plplot": {
"baseline": "5.13.0",
"port-version": 11
"port-version": 12
},
"plustache": {
"baseline": "0.4.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/plplot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "81172e3761f2638245de863b13d8e13cbf08188d",
"version-semver": "5.13.0",
"port-version": 12
},
{
"git-tree": "ad6d85b2cc702beabe146047209cb580174ceea8",
"version-string": "5.13.0",
Expand Down

0 comments on commit a5ff5cd

Please sign in to comment.