diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2018-08-29 17:01:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-29 17:01:58 -0700 |
| commit | 5c90aeeb5d00d6cebb154e3b3177575063b7f702 (patch) | |
| tree | ec1358c03f0b759635b36545de950d7ccc30e900 | |
| parent | 1f290f4b8cd54808f60ff2c0db07bd3809c56cb2 (diff) | |
| parent | 711034e5834a1ffb937d09640c51bf29497752bd (diff) | |
| download | vcpkg-5c90aeeb5d00d6cebb154e3b3177575063b7f702.tar.gz vcpkg-5c90aeeb5d00d6cebb154e3b3177575063b7f702.zip | |
Merge pull request #4163 from icedream2linxi/pr/icu-support-static-build
[icu] Support for compiling static libraries.
| -rw-r--r-- | ports/icu/CONTROL | 2 | ||||
| -rw-r--r-- | ports/icu/portfile.cmake | 18 | ||||
| -rw-r--r-- | ports/icu/remove-MD-from-configure.patch | 18 |
3 files changed, 25 insertions, 13 deletions
diff --git a/ports/icu/CONTROL b/ports/icu/CONTROL index 1fc3d39cc..602e4341a 100644 --- a/ports/icu/CONTROL +++ b/ports/icu/CONTROL @@ -1,3 +1,3 @@ Source: icu
-Version: 61.1-2
+Version: 61.1-3
Description: Mature and widely used Unicode and localization library.
diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index ee558d886..9e3d9c48b 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -1,19 +1,9 @@ -# 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)
-#
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
message(FATAL_ERROR "Error: UWP builds are currently not supported.")
endif()
include(vcpkg_common_functions)
+
set(VERSION 61.1)
set(VERSION2 61_1)
set(ICU_VERSION_MAJOR 61)
@@ -28,7 +18,9 @@ vcpkg_download_distfile( vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/icu-${VERSION})
vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch)
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch
+ ${CMAKE_CURRENT_LIST_DIR}/remove-MD-from-configure.patch
+)
set(CONFIGURE_OPTIONS "--disable-samples --disable-tests")
@@ -44,6 +36,8 @@ set(CONFIGURE_OPTIONS_DEBUG "--enable-debug --disable-release --prefix=${CURREN if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(BASH bash)
+ set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -fPIC")
+ set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -fPIC")
# Configure release
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
diff --git a/ports/icu/remove-MD-from-configure.patch b/ports/icu/remove-MD-from-configure.patch new file mode 100644 index 000000000..d35205ebf --- /dev/null +++ b/ports/icu/remove-MD-from-configure.patch @@ -0,0 +1,18 @@ +diff -urN a/source/runConfigureICU b/source/runConfigureICU +--- a/source/runConfigureICU 2018-03-26 21:38:44.000000000 +0800 ++++ b/source/runConfigureICU 2018-08-26 09:04:53.197454400 +0800 +@@ -322,10 +322,10 @@ + THE_COMP="Microsoft Visual C++" + CC=cl; export CC + CXX=cl; export CXX +- RELEASE_CFLAGS='-Gy -MD' +- RELEASE_CXXFLAGS='-Gy -MD' +- DEBUG_CFLAGS='-Zi -MDd' +- DEBUG_CXXFLAGS='-Zi -MDd' ++ RELEASE_CFLAGS='-Gy' ++ RELEASE_CXXFLAGS='-Gy' ++ DEBUG_CFLAGS='-Zi' ++ DEBUG_CXXFLAGS='-Zi' + DEBUG_LDFLAGS='-DEBUG' + ;; + *BSD) |
