aboutsummaryrefslogtreecommitdiff
path: root/ports/plplot
diff options
context:
space:
mode:
authorNagy-Egri Máté Ferenc <csiga.biga@aol.com>2018-03-24 00:24:04 +0100
committerRobert Schumacher <roschuma@microsoft.com>2018-03-23 16:24:04 -0700
commit15cb53b9ddd2d86fa9b7c5cdfc67b04ee87ac884 (patch)
tree545d70a2a883736e6041fbd4797111e859f7b8a6 /ports/plplot
parent6c690a22837bff0804e7ea4c9b2934cf97cd2211 (diff)
downloadvcpkg-15cb53b9ddd2d86fa9b7c5cdfc67b04ee87ac884.tar.gz
vcpkg-15cb53b9ddd2d86fa9b7c5cdfc67b04ee87ac884.zip
Add port: PLplot (#3117)
* Initial commit - added plplot files * Added INTERFACE_INCLUDE_DIRECTORY to libplplot * Fix installation layout * Static linkage of plotting drivers (no need for PATH) * .patch file instead of overwrite * [plplot] Improve handling of cmake scripts. Avoid DLLS_WITHOUT_LIBS. Disable unused dependencies and require some.
Diffstat (limited to 'ports/plplot')
-rw-r--r--ports/plplot/CONTROL8
-rw-r--r--ports/plplot/install-interface-include-directories.patch13
-rw-r--r--ports/plplot/portfile.cmake71
3 files changed, 92 insertions, 0 deletions
diff --git a/ports/plplot/CONTROL b/ports/plplot/CONTROL
new file mode 100644
index 000000000..c278778b0
--- /dev/null
+++ b/ports/plplot/CONTROL
@@ -0,0 +1,8 @@
+Source: plplot
+Version: 5.13.0-1
+Build-Depends: freetype, zlib, libpng, bzip2
+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.
+
+Feature: wxwidgets
+Build-Depends: wxwidgets
+Description: plplot wxwidgets module \ No newline at end of file
diff --git a/ports/plplot/install-interface-include-directories.patch b/ports/plplot/install-interface-include-directories.patch
new file mode 100644
index 000000000..3e124b5d0
--- /dev/null
+++ b/ports/plplot/install-interface-include-directories.patch
@@ -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)
diff --git a/ports/plplot/portfile.cmake b/ports/plplot/portfile.cmake
new file mode 100644
index 000000000..372a59bba
--- /dev/null
+++ b/ports/plplot/portfile.cmake
@@ -0,0 +1,71 @@
+include(vcpkg_common_functions)
+
+set(PLPLOT_VERSION 5.13.0)
+set(PLPLOT_HASH 1d5cb5da17d4bde6d675585bff1f8dcb581719249a0b2687867e767703f8dab0870e7ea44b9549a497f4ac0141a3cabf6761c49520c0e2b26ffe581468512cbb)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/plplot-${PLPLOT_VERSION})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://sourceforge.net/projects/plplot/files/plplot/${PLPLOT_VERSION}%20Source/plplot-${PLPLOT_VERSION}.tar.gz/download"
+ FILENAME "plplot-${PLPLOT_VERSION}.tar.gz"
+ SHA512 ${PLPLOT_HASH}
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+set(BUILD_with_wxwidgets OFF)
+if("wxwidgets" IN_LIST FEATURES)
+ set(BUILD_with_wxwidgets ON)
+endif()
+
+# Patch build scripts
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/install-interface-include-directories.patch"
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DENABLE_tcl=OFF
+ -DPL_HAVE_QHULL=OFF
+ -DENABLE_qt=OFF
+ -DPLPLOT_USE_QT5=OFF
+ -DENABLE_ocaml=OFF
+ -DPL_DOUBLE=ON
+ -DENABLE_wxwidgets=${ENABLE_wxwidgets}
+ -DPLD_wxpng=${ENABLE_wxwidgets}
+ -DPLD_wxwidgets=${ENABLE_wxwidgets}
+ -DENABLE_DYNDRIVERS=OFF
+ -DDATA_DIR=${CURRENT_PACKAGES_DIR}/share/plplot
+ OPTIONS_DEBUG
+ -DDRV_DIR=${CURRENT_PACKAGES_DIR}/debug/bin
+ OPTIONS_RELEASE
+ -DDRV_DIR=${CURRENT_PACKAGES_DIR}/bin
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/plplot)
+
+# Remove unnecessary tool
+file(REMOVE
+ ${CURRENT_PACKAGES_DIR}/debug/bin/pltek.exe
+ ${CURRENT_PACKAGES_DIR}/bin/pltek.exe
+)
+
+# Remove unwanted and duplicate directories
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+)
+
+file(INSTALL
+ ${SOURCE_PATH}/Copyright
+ DESTINATION ${CURRENT_PACKAGES_DIR}/share/plplot
+ RENAME copyright
+)
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/share
+)