aboutsummaryrefslogtreecommitdiff
path: root/ports/libffi
diff options
context:
space:
mode:
authorStefano Sinigardi <stesinigardi@hotmail.com>2019-10-07 19:35:13 +0200
committerCurtis J Bezault <curtbezault@gmail.com>2019-10-07 10:35:13 -0700
commit726c11148105a97aef39bec024fdb7c140b1b154 (patch)
tree26bd2aee0c13a8351b259cc4ffffaf0efededb4e /ports/libffi
parente86ff2cc54bda9e9ee322ab69141e7113d5c40a9 (diff)
downloadvcpkg-726c11148105a97aef39bec024fdb7c140b1b154.tar.gz
vcpkg-726c11148105a97aef39bec024fdb7c140b1b154.zip
[vcpkg] fatal_error when patch fails to apply (#8087)
vcpkg will now fail on failure to apply patches except when using `--head`.
Diffstat (limited to 'ports/libffi')
-rw-r--r--ports/libffi/CONTROL2
-rw-r--r--ports/libffi/portfile.cmake15
2 files changed, 9 insertions, 8 deletions
diff --git a/ports/libffi/CONTROL b/ports/libffi/CONTROL
index b393491e1..2fb2301a9 100644
--- a/ports/libffi/CONTROL
+++ b/ports/libffi/CONTROL
@@ -1,4 +1,4 @@
Source: libffi
-Version: 3.1-5
+Version: 3.1-6
Homepage: https://github.com/libffi/libffi
Description: Portable, high level programming interface to various calling conventions
diff --git a/ports/libffi/portfile.cmake b/ports/libffi/portfile.cmake
index bbb4daf83..bc3084e74 100644
--- a/ports/libffi/portfile.cmake
+++ b/ports/libffi/portfile.cmake
@@ -30,13 +30,14 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
-if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
- vcpkg_apply_patches(
- SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/auto-define-static-macro.patch
- )
-endif()
+file(READ ${CURRENT_PACKAGES_DIR}/include/ffi.h FFI_H)
+string(REPLACE "/* *know* they are going to link with the static library. */"
+"/* *know* they are going to link with the static library. */
+
+#define FFI_BUILDING
+
+" FFI_H "${FFI_H}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/include/ffi.h "${FFI_H}")
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libffi)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libffi/LICENSE ${CURRENT_PACKAGES_DIR}/share/libffi/copyright)