aboutsummaryrefslogtreecommitdiff
path: root/ports/xerces-c
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@codelibre.net>2018-10-24 20:50:57 +0100
committerRobert Schumacher <roschuma@microsoft.com>2018-10-24 12:50:57 -0700
commit6f2bc84506cb5be7511c63f76458f81ad0be44b6 (patch)
treed3b99146581f810f91fd854e5ca12ca3cde84f8f /ports/xerces-c
parentbe7cd6877353057ecbcf3c22888e5c19308b58ad (diff)
downloadvcpkg-6f2bc84506cb5be7511c63f76458f81ad0be44b6.tar.gz
vcpkg-6f2bc84506cb5be7511c63f76458f81ad0be44b6.zip
[xerces-c] Update to 3.2.2 (#4246)
* [xerces-c] Update to 3.2.2 * [xalan-c] Build against xerces-c 3.2.2 and include extra patches * [xalan-c] Use new vcpkg_extract_source_archive_ex() * [xerces-c] Use vcpkg_fixup_cmake_targets * [xerces-c] Disable vcpkg_test_cmake due to misbehavior in x64 * [xerces-c] Remove bin directory when building static * [xalan-c] Modernize
Diffstat (limited to 'ports/xerces-c')
-rw-r--r--ports/xerces-c/CONTROL2
-rw-r--r--ports/xerces-c/portfile.cmake78
2 files changed, 37 insertions, 43 deletions
diff --git a/ports/xerces-c/CONTROL b/ports/xerces-c/CONTROL
index 81a76c325..3ba79b1e8 100644
--- a/ports/xerces-c/CONTROL
+++ b/ports/xerces-c/CONTROL
@@ -1,3 +1,3 @@
Source: xerces-c
-Version: 3.1.4-3
+Version: 3.2.2-4
Description: Xerces-C++ is a XML parser, for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs.
diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake
index c0a4166fb..0976bbbd3 100644
--- a/ports/xerces-c/portfile.cmake
+++ b/ports/xerces-c/portfile.cmake
@@ -1,58 +1,52 @@
-# Common Ambient Variables:
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# TARGET_TRIPLET is the current triplet (x86-windows, etc)
-# PORT is the current port name (zlib, etc)
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-#
-
include(vcpkg_common_functions)
-if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
- message(STATUS "Static libraries not supported; building dynamic instead")
- set(VCPKG_LIBRARY_LINKAGE "dynamic")
-endif()
-if (VCPKG_CRT_LINKAGE STREQUAL "static")
- message(STATUS "Static linking against the CRT not supported; building dynamic instead")
- set(VCPKG_CRT_LINKAGE "dynamic")
-endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/xerces-c
- REF Xerces-C_3_1_4
- SHA512 6dc3e4bb68bc32a0e8ec6dcc7ec67e21239a79c909d08ccc16c96dc5de4e73800993d1c09f589606925507baf0b2a9bf6037d28c84dae826935bf1f7a151071e
- HEAD_REF master
+ REF Xerces-C_3_2_2
+ SHA512 66f60fe9194376ac0ca99d13ea5bce23ada86e0261dde30686c21ceb5499e754dab8eb0a98adadd83522bda62709377715501f6dac49763e3a686f9171cc63ea
+ HEAD_REF trunk
)
-if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
- set(BUILD_ARCH "Win32")
- set(OUTPUT_DIR "Win32")
-elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
- set(BUILD_ARCH "x64")
- set(OUTPUT_DIR "Win64")
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake)
+ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/xercesc)
else()
- message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
+ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XercesC TARGET_PATH share/xercesc)
endif()
-vcpkg_build_msbuild(
- #PROJECT_PATH ${SOURCE_PATH}/projects/Win32/VC14/xerces-all/xerces-all.sln
- PROJECT_PATH ${SOURCE_PATH}/projects/Win32/VC14/xerces-all/xercesLib/xercesLib.vcxproj
- PLATFORM ${BUILD_ARCH})
-
-file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Debug/xerces-c_3_1D.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
-file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Debug/xerces-c_3D.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
-file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Release/xerces-c_3_1.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
-file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Release/xerces-c_3.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+else()
+ file(GLOB release_exe "${CURRENT_PACKAGES_DIR}/bin/*.exe")
+ file(GLOB debug_exe "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
+ if(release_exe OR debug_exe)
+ file(REMOVE ${release_exe} ${debug_exe})
+ endif()
+endif()
-file(COPY ${SOURCE_PATH}/src/xercesc DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.hpp)
-# Certain headers under xercesc/util include .c files, so we need these copied over as well
-file(COPY ${SOURCE_PATH}/src/xercesc DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.c)
+file(READ ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake _contents)
+string(REPLACE
+ "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)"
+ "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)"
+ _contents
+ "${_contents}"
+)
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake "${_contents}")
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xercesc/NLS)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xercesc/util/MsgLoaders/ICU/resources)
+file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/debug/include"
+ "${CURRENT_PACKAGES_DIR}/debug/share"
+)
# Handle copyright
-file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/xerces-c)
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/xerces-c)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/xerces-c/LICENSE ${CURRENT_PACKAGES_DIR}/share/xerces-c/copyright)
-vcpkg_copy_pdbs() \ No newline at end of file
+vcpkg_copy_pdbs()