aboutsummaryrefslogtreecommitdiff
path: root/ports/libffi
diff options
context:
space:
mode:
authorLars Glud <larshg@gmail.com>2021-10-07 12:22:47 +0200
committerGitHub <noreply@github.com>2021-10-07 03:22:47 -0700
commit92770f60d0262a2fee7f121d795e60c9dc135855 (patch)
treebec7c4955cf635f8b366bd987bfa7b4d97bd0857 /ports/libffi
parentb1e54e881bf317f5ce3b58020a8e53a5a4c3ad19 (diff)
downloadvcpkg-92770f60d0262a2fee7f121d795e60c9dc135855.tar.gz
vcpkg-92770f60d0262a2fee7f121d795e60c9dc135855.zip
[libffi] Don't replace string in file that doesn't exist. (#20554)
* Don't replace string in file that doesn't exist. * Update per bot. * Update per bot again. * Address comments.
Diffstat (limited to 'ports/libffi')
-rw-r--r--ports/libffi/portfile.cmake19
-rw-r--r--ports/libffi/vcpkg.json14
2 files changed, 24 insertions, 9 deletions
diff --git a/ports/libffi/portfile.cmake b/ports/libffi/portfile.cmake
index ba5d4d88c..4f6a7b99a 100644
--- a/ports/libffi/portfile.cmake
+++ b/ports/libffi/portfile.cmake
@@ -11,7 +11,7 @@ vcpkg_from_github(
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/libffiConfig.cmake.in" DESTINATION "${SOURCE_PATH}")
-vcpkg_configure_cmake(
+vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
OPTIONS
@@ -20,7 +20,7 @@ vcpkg_configure_cmake(
-DFFI_SKIP_HEADERS=ON
)
-vcpkg_install_cmake()
+vcpkg_cmake_install()
# Create pkgconfig file
set(PACKAGE_VERSION ${VERSION})
@@ -43,12 +43,17 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
endif()
vcpkg_copy_pdbs()
-vcpkg_fixup_cmake_targets()
+vcpkg_cmake_config_fixup()
+
if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
- vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libffi.pc"
- "-lffi" "-llibffi")
- vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libffi.pc"
- "-lffi" "-llibffi")
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libffi.pc"
+ "-lffi" "-llibffi")
+ endif()
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libffi.pc"
+ "-lffi" "-llibffi")
+ endif()
endif()
vcpkg_fixup_pkgconfig()
diff --git a/ports/libffi/vcpkg.json b/ports/libffi/vcpkg.json
index 80481cdb7..4525cee7b 100644
--- a/ports/libffi/vcpkg.json
+++ b/ports/libffi/vcpkg.json
@@ -1,7 +1,17 @@
{
"name": "libffi",
"version": "3.4.2",
- "port-version": 1,
+ "port-version": 2,
"description": "Portable, high level programming interface to various calling conventions",
- "homepage": "https://github.com/libffi/libffi"
+ "homepage": "https://github.com/libffi/libffi",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
}