aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorautoantwort <41973254+autoantwort@users.noreply.github.com>2021-04-02 23:01:50 +0200
committerGitHub <noreply@github.com>2021-04-02 14:01:50 -0700
commit45bc3d367a86352c7f97bf8b86bbe03a7f75a679 (patch)
treea5914cd0ef520438ed8f7744151c9f4d795fa5e9 /ports
parent92a3c70f1d03dd174c913f30bd634eb7ff7d246c (diff)
downloadvcpkg-45bc3d367a86352c7f97bf8b86bbe03a7f75a679.tar.gz
vcpkg-45bc3d367a86352c7f97bf8b86bbe03a7f75a679.zip
[libffi] Fix processors (#16285)
* [libffi] fix build on apple silicon * [libffi] add version files * [libffi] changes * [libffi] add version files * [libffi] Rearrange target conditional list Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'ports')
-rw-r--r--ports/libffi/CMakeLists.txt24
-rw-r--r--ports/libffi/CONTROL5
-rw-r--r--ports/libffi/vcpkg.json7
3 files changed, 18 insertions, 18 deletions
diff --git a/ports/libffi/CMakeLists.txt b/ports/libffi/CMakeLists.txt
index c9eba2f13..bfdd2e60b 100644
--- a/ports/libffi/CMakeLists.txt
+++ b/ports/libffi/CMakeLists.txt
@@ -11,23 +11,15 @@ endif()
# config variables for ffi.h.in
set(VERSION 3.3)
-set(KNOWN_PROCESSORS x86 x86_64 AMD64 ARM ARM64 i386 armv7l armv7-a aarch64)
+set(KNOWN_PROCESSORS x86 x86_64 amd64 arm arm64 i386 armv7l armv7-a aarch64)
-if(NOT CMAKE_SYSTEM_PROCESSOR IN_LIST KNOWN_PROCESSORS)
+string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" lower_system_processor)
+
+if(NOT lower_system_processor IN_LIST KNOWN_PROCESSORS)
message(FATAL_ERROR "Unknown processor: ${CMAKE_SYSTEM_PROCESSOR}")
endif()
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM")
- set(TARGET ARM)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7l")
- set(TARGET ARM)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7-a")
- set(TARGET ARM)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
- set(TARGET ARM64)
-elseif(CMAKE_SYSTEM_NAME MATCHES "BSD" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
- set(TARGET X86_FREEBSD)
-elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
+if(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(TARGET ARM_WIN32)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(TARGET ARM_WIN64)
@@ -35,6 +27,12 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUA
set(TARGET X86_WIN32)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(TARGET X86_WIN64)
+elseif(lower_system_processor MATCHES "arm64|aarch64")
+ set(TARGET ARM64)
+elseif(lower_system_processor MATCHES "arm")
+ set(TARGET ARM)
+elseif(CMAKE_SYSTEM_NAME MATCHES "BSD" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(TARGET X86_FREEBSD)
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(TARGET X86_DARWIN)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
diff --git a/ports/libffi/CONTROL b/ports/libffi/CONTROL
deleted file mode 100644
index 7ba4813a3..000000000
--- a/ports/libffi/CONTROL
+++ /dev/null
@@ -1,5 +0,0 @@
-Source: libffi
-Version: 3.3
-Port-Version: 7
-Homepage: https://github.com/libffi/libffi
-Description: Portable, high level programming interface to various calling conventions
diff --git a/ports/libffi/vcpkg.json b/ports/libffi/vcpkg.json
new file mode 100644
index 000000000..8934328b4
--- /dev/null
+++ b/ports/libffi/vcpkg.json
@@ -0,0 +1,7 @@
+{
+ "name": "libffi",
+ "version": "3.3",
+ "port-version": 8,
+ "description": "Portable, high level programming interface to various calling conventions",
+ "homepage": "https://github.com/libffi/libffi"
+}