aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobk2824 <13680319+bobk2824@users.noreply.github.com>2018-10-25 15:00:40 -0400
committerRobert Schumacher <roschuma@microsoft.com>2018-10-25 12:00:40 -0700
commita4403276a26ff231f5cb84ffd867df69aaf610ec (patch)
treecc85fe459206b19a2735c732d19bd927cefae51c
parent4bc01b00e0eb9bfe486535148858337e1ff2dbbd (diff)
downloadvcpkg-a4403276a26ff231f5cb84ffd867df69aaf610ec.tar.gz
vcpkg-a4403276a26ff231f5cb84ffd867df69aaf610ec.zip
New package: Native Windows C++ library for EMC ECS S3 REST support (#4035)
* [ecsutil] Initial commit of 1.0.1.2 * [ecsutil] Simplify and use vcpkg_install_msbuild * [ecsutil] Commit missing patch * [ecsutil] Remove empty bin directories
-rw-r--r--ports/ecsutil/CONTROL4
-rw-r--r--ports/ecsutil/disable-setversion.patch36
-rw-r--r--ports/ecsutil/portfile.cmake52
3 files changed, 92 insertions, 0 deletions
diff --git a/ports/ecsutil/CONTROL b/ports/ecsutil/CONTROL
new file mode 100644
index 000000000..fada181ac
--- /dev/null
+++ b/ports/ecsutil/CONTROL
@@ -0,0 +1,4 @@
+Source: ecsutil
+Version: 1.0.1.2-1
+Description: Native Windows SDK for accessing ECS via the S3 HTTP protocol.
+Build-Depends: atlmfc
diff --git a/ports/ecsutil/disable-setversion.patch b/ports/ecsutil/disable-setversion.patch
new file mode 100644
index 000000000..2899a0108
--- /dev/null
+++ b/ports/ecsutil/disable-setversion.patch
@@ -0,0 +1,36 @@
+diff --git a/ECSUtil/ECSUtil.vcxproj b/ECSUtil/ECSUtil.vcxproj
+index 05c5726..f8ac64e 100644
+--- a/ECSUtil/ECSUtil.vcxproj
++++ b/ECSUtil/ECSUtil.vcxproj
+@@ -274,7 +274,6 @@
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <PostBuildEvent>
+- <Command>$(SolutionDir)bin\setversion.exe /getversion "#define ECSUTIL_VERSION" "$(SolutionDir)ECSUtil\Version.h" $(OutDir)ECSUtil.dll</Command>
+ </PostBuildEvent>
+ <PostBuildEvent>
+ <Message>set version resource in DLL from source file</Message>
+@@ -361,7 +360,6 @@
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <PostBuildEvent>
+- <Command>$(SolutionDir)bin\setversion.exe /getversion "#define ECSUTIL_VERSION" "$(SolutionDir)ECSUtil\Version.h" $(OutDir)ECSUtil.dll</Command>
+ </PostBuildEvent>
+ <PostBuildEvent>
+ <Message>set version resource in DLL from source file</Message>
+@@ -445,7 +443,6 @@
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <PostBuildEvent>
+- <Command>$(SolutionDir)bin\setversion.exe /getversion "#define ECSUTIL_VERSION" "$(SolutionDir)ECSUtil\Version.h" $(OutDir)ECSUtil.dll</Command>
+ </PostBuildEvent>
+ <PostBuildEvent>
+ <Message>set version resource in DLL from source file</Message>
+@@ -541,7 +538,6 @@
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <PostBuildEvent>
+- <Command>$(SolutionDir)bin\setversion.exe /getversion "#define ECSUTIL_VERSION" "$(SolutionDir)ECSUtil\Version.h" $(OutDir)ECSUtil.dll</Command>
+ </PostBuildEvent>
+ <PostBuildEvent>
+ <Message>set version resource in DLL from source file</Message>
diff --git a/ports/ecsutil/portfile.cmake b/ports/ecsutil/portfile.cmake
new file mode 100644
index 000000000..4a8e48b2b
--- /dev/null
+++ b/ports/ecsutil/portfile.cmake
@@ -0,0 +1,52 @@
+include(vcpkg_common_functions)
+
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(PLATFORM x86)
+elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(PLATFORM x64)
+else()
+ message(FATAL_ERROR "Unsupported architecture")
+endif()
+
+if(VCPKG_CMAKE_SYSTEM_NAME)
+ message(FATAL_ERROR "Unsupported platform. ECSUTIL currently only supports windows desktop.")
+endif()
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ set(ECSUtil_CONFIGURATION_RELEASE Release)
+ set(ECSUtil_CONFIGURATION_DEBUG Debug)
+else()
+ if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ set(ECSUtil_CONFIGURATION_RELEASE "Release Lib")
+ set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib")
+ else()
+ set(ECSUtil_CONFIGURATION_RELEASE "Release Lib Static")
+ set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib Static")
+ endif()
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO EMCECS/ecs-object-client-windows-cpp
+ REF v1.0.1.2
+ SHA512 ee6c9086111f9cb4a3b9b0645a6a8921bae1d3e8fba0d054d824935b0ff82a57db5c1476183202694afe33f89bfc47db1ef91696a739a1a43a1e2411e4361e6f
+ HEAD_REF master
+ PATCHES disable-setversion.patch
+)
+
+vcpkg_install_msbuild(
+ SOURCE_PATH ${SOURCE_PATH}
+ PROJECT_SUBPATH ECSUtil.sln
+ PLATFORM ${PLATFORM}
+ LICENSE_SUBPATH license.txt
+ TARGET ECSUtil
+ RELEASE_CONFIGURATION ${ECSUtil_CONFIGURATION_RELEASE}
+ DEBUG_CONFIGURATION ${ECSUtil_CONFIGURATION_DEBUG}
+)
+
+file(COPY ${SOURCE_PATH}/ECSUtil DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/ECSUtil/res ${CURRENT_PACKAGES_DIR}/tools)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/NatvisAddIn.dll ${CURRENT_PACKAGES_DIR}/debug/bin/NatvisAddIn.dll)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()