aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2019-03-28 16:27:35 -0700
committerGitHub <noreply@github.com>2019-03-28 16:27:35 -0700
commit4ce30f90ae7a399e994abe83a7e38e32b1c5f49d (patch)
treef3d9d1481c4fdc6e3a5310380f9b001bd88975b9
parent2601164fa9405f9911e48fc443859dbec1b1a4fb (diff)
downloadvcpkg-4ce30f90ae7a399e994abe83a7e38e32b1c5f49d.tar.gz
vcpkg-4ce30f90ae7a399e994abe83a7e38e32b1c5f49d.zip
[freetype] fix issue #5774 (#5853)
* load 0005-Fix-DLL-EXPORTS.patch * Create 0005-Fix-DLL-EXPORTS.patch * [freetype] cleanup whitespace
-rw-r--r--ports/freetype/0005-Fix-DLL-EXPORTS.patch13
-rw-r--r--ports/freetype/portfile.cmake19
2 files changed, 30 insertions, 2 deletions
diff --git a/ports/freetype/0005-Fix-DLL-EXPORTS.patch b/ports/freetype/0005-Fix-DLL-EXPORTS.patch
new file mode 100644
index 000000000..96abaffb7
--- /dev/null
+++ b/ports/freetype/0005-Fix-DLL-EXPORTS.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dd8a878..75f9ab7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -141,7 +141,7 @@ set(VERSION_PATCH "1")
+ # Increment REVISION.
+ set(LIBRARY_VERSION "6.16.0")
+ set(LIBRARY_SOVERSION "6")
+-
++ADD_DEFINITIONS(-DDLL_EXPORT)
+ # These options mean "require x and complain if not found". They'll get
+ # optionally found anyway. Use `-DCMAKE_DISABLE_FIND_PACKAGE_x=TRUE` to disable
+ # searching for a packge entirely (x is the CMake package name, so "BZip2"
diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake
index 683c60eb6..73cb6b317 100644
--- a/ports/freetype/portfile.cmake
+++ b/ports/freetype/portfile.cmake
@@ -6,7 +6,9 @@ vcpkg_download_distfile(ARCHIVE
FILENAME "freetype-${FT_VERSION}.tar.bz2"
SHA512 856766e1f3f4c7dc8afb2b5ee991138c8b642c6a6e5e007cd2bc04ae58bde827f082557cf41bf541d97e8485f7fd064d10390d1ee597f19d1daed6c152e27708
)
-vcpkg_extract_source_archive_ex(
+
+if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic")
+ vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${FT_VERSION}
@@ -15,7 +17,20 @@ vcpkg_extract_source_archive_ex(
0002-Add-CONFIG_INSTALL_PATH-option.patch
0003-Fix-UWP.patch
0004-Fix-DLL-install.patch
-)
+ )
+else()
+ vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ REF ${FT_VERSION}
+ PATCHES
+ 0001-Fix-install-command.patch
+ 0002-Add-CONFIG_INSTALL_PATH-option.patch
+ 0003-Fix-UWP.patch
+ 0004-Fix-DLL-install.patch
+ 0005-Fix-DLL-EXPORTS.patch
+ )
+endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}