From 735bc7045e8b35b7cb64179e9d4742cbf04ee1d1 Mon Sep 17 00:00:00 2001 From: Jackie Ng Date: Tue, 11 Apr 2017 21:58:14 +1000 Subject: Add xalan-c port --- ports/xalan-c/0001-ALLOW_RTCc_IN_STL.patch | 65 ++++++++++++++++++++++++++++++ ports/xalan-c/CONTROL | 4 ++ ports/xalan-c/portfile.cmake | 61 ++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 ports/xalan-c/0001-ALLOW_RTCc_IN_STL.patch create mode 100644 ports/xalan-c/CONTROL create mode 100644 ports/xalan-c/portfile.cmake diff --git a/ports/xalan-c/0001-ALLOW_RTCc_IN_STL.patch b/ports/xalan-c/0001-ALLOW_RTCc_IN_STL.patch new file mode 100644 index 000000000..a01096b0d --- /dev/null +++ b/ports/xalan-c/0001-ALLOW_RTCc_IN_STL.patch @@ -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 @@ + + Disabled + $(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\src\;$(OutDir)Nls\Include;%(AdditionalIncludeDirectories) +- XALAN_BUILD_DLL;XALAN_INMEM_MSG_LOADER;%(PreprocessorDefinitions) ++ _ALLOW_RTCc_IN_STL;XALAN_BUILD_DLL;XALAN_INMEM_MSG_LOADER;%(PreprocessorDefinitions) + true + true + EnableFastChecks +@@ -197,7 +197,7 @@ + + Disabled + $(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\src\;$(OutDir)Nls\Include;%(AdditionalIncludeDirectories) +- XALAN_BUILD_DLL;XALAN_INMEM_MSG_LOADER;%(PreprocessorDefinitions) ++ _ALLOW_RTCc_IN_STL;XALAN_BUILD_DLL;XALAN_INMEM_MSG_LOADER;%(PreprocessorDefinitions) + true + true + EnableFastChecks +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 @@ + + Disabled + $(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\..\src;%(AdditionalIncludeDirectories) ++ _ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions) + true + true + EnableFastChecks +@@ -191,7 +192,7 @@ + + Disabled + $(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\..\src;%(AdditionalIncludeDirectories) +- %(PreprocessorDefinitions) ++ _ALLOW_RTCc_IN_STL;%(PreprocessorDefinitions) + true + true + EnableFastChecks +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 @@ + Disabled + false + $(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\..\src;$(OutDir)Nls\Include;%(AdditionalIncludeDirectories) +- XALAN_XALANMSGLIB_BUILD_DLL;%(PreprocessorDefinitions) ++ _ALLOW_RTCc_IN_STL;XALAN_XALANMSGLIB_BUILD_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + true +@@ -170,7 +170,7 @@ + Disabled + false + $(XERCESCROOT)\include;$(XERCESCROOT)\src;..\..\..\..\..\src;$(OutDir)Nls\Include;%(AdditionalIncludeDirectories) +- XALAN_XALANMSGLIB_BUILD_DLL;%(PreprocessorDefinitions) ++ _ALLOW_RTCc_IN_STL;XALAN_XALANMSGLIB_BUILD_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + true diff --git a/ports/xalan-c/CONTROL b/ports/xalan-c/CONTROL new file mode 100644 index 000000000..188c6bd44 --- /dev/null +++ b/ports/xalan-c/CONTROL @@ -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 diff --git a/ports/xalan-c/portfile.cmake b/ports/xalan-c/portfile.cmake new file mode 100644 index 000000000..bc92562b5 --- /dev/null +++ b/ports/xalan-c/portfile.cmake @@ -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 = +# 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() \ No newline at end of file -- cgit v1.2.3 From c70da3bc3aecb56c7b10d26e9d6417330a128451 Mon Sep 17 00:00:00 2001 From: Jackie Ng Date: Sat, 22 Apr 2017 02:37:28 +1000 Subject: [xalan-c] Need to build XalanMsgLib so that LocalMsgIndex.hpp is generated and to make sure this header is copied to /include/xalanc/PlatformSupport --- ports/xalan-c/portfile.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ports/xalan-c/portfile.cmake b/ports/xalan-c/portfile.cmake index bc92562b5..ac076475e 100644 --- a/ports/xalan-c/portfile.cmake +++ b/ports/xalan-c/portfile.cmake @@ -39,6 +39,13 @@ vcpkg_build_msbuild( # 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) +# This is needed to generate the required LocalMsgIndex.hpp header +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/c/projects/Win32/VC10/Utils/XalanMsgLib/XalanMsgLib.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) @@ -48,6 +55,10 @@ file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Release/Xalan-C_1.lib DESTIN file(COPY ${SOURCE_PATH}/c/src/xalanc DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.hpp) +# LocalMsgIndex.hpp is here +file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Release/Nls/Include/LocalMsgIndex.hpp + DESTINATION ${CURRENT_PACKAGES_DIR}/include/xalanc/PlatformSupport) + 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) -- cgit v1.2.3 From 6242e8f7bd76b82a062ccf4146d44e571a189dbc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 23 Apr 2017 08:35:13 -0700 Subject: [xalan-c] Add check for static/static --- ports/xalan-c/CONTROL | 2 +- ports/xalan-c/portfile.cmake | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ports/xalan-c/CONTROL b/ports/xalan-c/CONTROL index 188c6bd44..5936fc2f5 100644 --- a/ports/xalan-c/CONTROL +++ b/ports/xalan-c/CONTROL @@ -1,4 +1,4 @@ Source: xalan-c -Version: 1.11 +Version: 1.11-1 Description: Xalan is an XSLT processor for transforming XML documents into HTML, text, or other XML document types Build-Depends: xerces-c diff --git a/ports/xalan-c/portfile.cmake b/ports/xalan-c/portfile.cmake index ac076475e..55dd9f143 100644 --- a/ports/xalan-c/portfile.cmake +++ b/ports/xalan-c/portfile.cmake @@ -10,6 +10,15 @@ # VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) # +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(STATUS "Only DLL builds are currently supported.") + set(VCPKG_LIBRARY_LINKAGE "dynamic") +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Only dynamic linking against the CRT is currently supported.") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xalan-c-1.11) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 17328c13491bde5c472bbb7b04a907f1c2144398 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 23 Apr 2017 08:56:36 -0700 Subject: [atlmfc] Add dummy port to detect atl presence in VS --- ports/atlmfc/CONTROL | 3 +++ ports/atlmfc/portfile.cmake | 10 ++++++++++ ports/xalan-c/CONTROL | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 ports/atlmfc/CONTROL create mode 100644 ports/atlmfc/portfile.cmake diff --git a/ports/atlmfc/CONTROL b/ports/atlmfc/CONTROL new file mode 100644 index 000000000..aff5c97aa --- /dev/null +++ b/ports/atlmfc/CONTROL @@ -0,0 +1,3 @@ +Source: atlmfc +Version: 0 +Description: a stub package that ensures VS has ATL/MFC installed. diff --git a/ports/atlmfc/portfile.cmake b/ports/atlmfc/portfile.cmake new file mode 100644 index 000000000..d11235dcc --- /dev/null +++ b/ports/atlmfc/portfile.cmake @@ -0,0 +1,10 @@ +find_path(AFXRES_H + NAMES afxres.h + PATHS $ENV{INCLUDE} +) + +if(NOT AFXRES_H) + message(FATAL_ERROR "Unable to locate 'afxres.h'. Ensure you have installed the ATL/MFC component of Visual Studio.") +endif() + +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/xalan-c/CONTROL b/ports/xalan-c/CONTROL index 5936fc2f5..314ea1ecd 100644 --- a/ports/xalan-c/CONTROL +++ b/ports/xalan-c/CONTROL @@ -1,4 +1,4 @@ Source: xalan-c Version: 1.11-1 Description: Xalan is an XSLT processor for transforming XML documents into HTML, text, or other XML document types -Build-Depends: xerces-c +Build-Depends: xerces-c, atlmfc -- cgit v1.2.3