aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-02-27 13:02:45 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2017-02-27 13:02:45 -0800
commitb0cffd5355c0426a85f98ede487a6244634bb25f (patch)
treed9893e390f86d87cf573e21d73ea5e84ab3eb48f
parent0c17b066d012aaed4559b0a07f26043483b8b6c9 (diff)
parent577fa80c6e982b3722598b25c82631d6d0af3d22 (diff)
downloadvcpkg-b0cffd5355c0426a85f98ede487a6244634bb25f.tar.gz
vcpkg-b0cffd5355c0426a85f98ede487a6244634bb25f.zip
Merge branch 'ab-acx-pugixml'
-rw-r--r--ports/pugixml/CONTROL3
-rw-r--r--ports/pugixml/portfile.cmake28
-rw-r--r--ports/pugixml/pugixmlapi.patch13
3 files changed, 44 insertions, 0 deletions
diff --git a/ports/pugixml/CONTROL b/ports/pugixml/CONTROL
new file mode 100644
index 000000000..298d433b2
--- /dev/null
+++ b/ports/pugixml/CONTROL
@@ -0,0 +1,3 @@
+Source: pugixml
+Version: 1.8.1
+Description: C++ XML processing library
diff --git a/ports/pugixml/portfile.cmake b/ports/pugixml/portfile.cmake
new file mode 100644
index 000000000..4fcbec84b
--- /dev/null
+++ b/ports/pugixml/portfile.cmake
@@ -0,0 +1,28 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pugixml-1.8)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/zeux/pugixml/releases/download/v1.8.1/pugixml-1.8.1.zip"
+ FILENAME "pugixml-1.8.1.zip"
+ SHA512 683fe224a9bcac032d78cb44d03915a3766d2faa588f3a8486b5719f26eeba3e17d447edf70e1907f51f8649ffb4607b6badd1365e4c15cf24279bf577dc853e
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/pugixmlapi.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DBUILD_DEFINES="PUGIXML_API=__declspec\(dllexport\)"
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pugixml RENAME copyright) \ No newline at end of file
diff --git a/ports/pugixml/pugixmlapi.patch b/ports/pugixml/pugixmlapi.patch
new file mode 100644
index 000000000..177664dbe
--- /dev/null
+++ b/ports/pugixml/pugixmlapi.patch
@@ -0,0 +1,13 @@
+diff --git a/src/pugixml.hpp b/src/pugixml.hpp
+index 4d76bfa..75a4f8a 100644
+--- a/src/pugixml.hpp
++++ b/src/pugixml.hpp
+@@ -50,7 +50,7 @@
+
+ // If no API is defined, assume default
+ #ifndef PUGIXML_API
+-# define PUGIXML_API
++# define PUGIXML_API __declspec(dllimport)
+ #endif
+
+ // If no API for classes is defined, assume default