mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 15:33:11 +08:00
Add xalan-c port
This commit is contained in:
parent
37b250abb8
commit
735bc7045e
65
ports/xalan-c/0001-ALLOW_RTCc_IN_STL.patch
Normal file
65
ports/xalan-c/0001-ALLOW_RTCc_IN_STL.patch
Normal file
@ -0,0 +1,65 @@
|
||||
diff --git a/c/Projects/Win32/VC10/AllInOne/AllInOne.vcxproj b/c/Projects/Win32/VC10/AllInOne/AllInOne.vcxproj
|
||||
index 5a9d6a0..a0d12e8 100644
|
||||
--- a/c/Projects/Win32/VC10/AllInOne/AllInOne.vcxproj
|
||||
+++ b/c/Projects/Win32/VC10/AllInOne/AllInOne.vcxproj
|
||||
@@ -159,7 +159,7 @@
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\src\;$(OutDir)Nls\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
- <PreprocessorDefinitions>XALAN_BUILD_DLL;XALAN_INMEM_MSG_LOADER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>_ALLOW_RTCc_IN_STL;XALAN_BUILD_DLL;XALAN_INMEM_MSG_LOADER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
@@ -197,7 +197,7 @@
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\src\;$(OutDir)Nls\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
- <PreprocessorDefinitions>XALAN_BUILD_DLL;XALAN_INMEM_MSG_LOADER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>_ALLOW_RTCc_IN_STL;XALAN_BUILD_DLL;XALAN_INMEM_MSG_LOADER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
diff --git a/c/Projects/Win32/VC10/Utils/MsgCreator/MsgCreator.vcxproj b/c/Projects/Win32/VC10/Utils/MsgCreator/MsgCreator.vcxproj
|
||||
index 27958b5..9f7767b 100644
|
||||
--- a/c/Projects/Win32/VC10/Utils/MsgCreator/MsgCreator.vcxproj
|
||||
+++ b/c/Projects/Win32/VC10/Utils/MsgCreator/MsgCreator.vcxproj
|
||||
@@ -159,6 +159,7 @@
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <PreprocessorDefinitions>_ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
@@ -191,7 +192,7 @@
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
- <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>_ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
diff --git a/c/Projects/Win32/VC10/Utils/XalanMsgLib/XalanMsgLib.vcxproj b/c/Projects/Win32/VC10/Utils/XalanMsgLib/XalanMsgLib.vcxproj
|
||||
index facbbc1..53b83a8 100644
|
||||
--- a/c/Projects/Win32/VC10/Utils/XalanMsgLib/XalanMsgLib.vcxproj
|
||||
+++ b/c/Projects/Win32/VC10/Utils/XalanMsgLib/XalanMsgLib.vcxproj
|
||||
@@ -144,7 +144,7 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>$(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\..\src;$(OutDir)Nls\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
- <PreprocessorDefinitions>XALAN_XALANMSGLIB_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>_ALLOW_RTCc_IN_STL;XALAN_XALANMSGLIB_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<SmallerTypeCheck>true</SmallerTypeCheck>
|
||||
@@ -170,7 +170,7 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>$(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\..\src;$(OutDir)Nls\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
- <PreprocessorDefinitions>XALAN_XALANMSGLIB_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>_ALLOW_RTCc_IN_STL;XALAN_XALANMSGLIB_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<SmallerTypeCheck>true</SmallerTypeCheck>
|
4
ports/xalan-c/CONTROL
Normal file
4
ports/xalan-c/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: xalan-c
|
||||
Version: 1.11
|
||||
Description: Xalan is an XSLT processor for transforming XML documents into HTML, text, or other XML document types
|
||||
Build-Depends: xerces-c
|
61
ports/xalan-c/portfile.cmake
Normal file
61
ports/xalan-c/portfile.cmake
Normal file
@ -0,0 +1,61 @@
|
||||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xalan-c-1.11)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://www-us.apache.org/dist/xalan/xalan-c/sources/xalan_c-1.11-src.zip"
|
||||
FILENAME "xalan_c-1.11-src.zip"
|
||||
SHA512 2e79a2c8f755c9660ffc94b26b6bd4b140685e05a88d8e5abb19a2f271383a3f2f398b173ef403f65dc33af75206214bd21ac012c39b4c0051b3a9f61f642fe6
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-ALLOW_RTCc_IN_STL.patch")
|
||||
|
||||
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")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
|
||||
endif()
|
||||
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/c/projects/Win32/VC10/AllInOne/AllInOne.vcxproj
|
||||
PLATFORM ${BUILD_ARCH}
|
||||
# Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891
|
||||
OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Debug/XalanMessages_1_11D.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Debug/Xalan-C_1_11D.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Debug/Xalan-C_1D.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Release/XalanMessages_1_11.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Release/Xalan-C_1_11.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Release/Xalan-C_1.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/c/src/xalanc DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.hpp)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/NLS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/util/MsgLoaders/ICU/resources)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/TestXSLT)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/XalanExe)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/XPathCAPI)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/c/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/xalan-c)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/xalan-c/LICENSE ${CURRENT_PACKAGES_DIR}/share/xalan-c/copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
Loading…
Reference in New Issue
Block a user