[libgpiod] Arm support cxx bindings (#25845)

* [libgpiod] change arm64 to arm and add cxx bindings

* [libgpiod] formatting

* Chages as suggested in pr

* Chages as suggested in pr

* fix versions

* using simpler way of setting feature

* added arm64 back

* Add parens and quotes.

Co-authored-by: Billy O'Neal <bion@microsoft.com>
This commit is contained in:
Woefie 2022-08-13 00:41:10 +02:00 committed by GitHub
parent 9b618499f6
commit cf221d35eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 10 deletions

View File

@ -17,26 +17,32 @@ vcpkg_cmake_get_vars(cmake_vars_file)
include("${cmake_vars_file}")
if (VCPKG_DETECTED_CMAKE_CROSSCOMPILING STREQUAL "TRUE")
list(APPEND OPTIONS CC=${VCPKG_DETECTED_CMAKE_C_COMPILER})
if (VCPKG_TARGET_IS_LINUX AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
list(APPEND OPTIONS "CC=${VCPKG_DETECTED_CMAKE_C_COMPILER}")
if (VCPKG_TARGET_IS_LINUX AND (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm"))
list(APPEND OPTIONS ac_cv_func_malloc_0_nonnull=yes)
list(APPEND OPTIONS ac_cv_func_realloc_0_nonnull=yes)
endif()
endif()
if ("cxx-bindings" IN_LIST FEATURES)
set(USE_CXX_BINDINGS yes)
else()
set(USE_CXX_BINDINGS no)
endif()
vcpkg_configure_make(
AUTOCONFIG
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${OPTIONS}
--enable-tools=no
--enable-tests=no
--enable-bindings-cxx=no
--enable-bindings-cxx=${USE_CXX_BINDINGS}
--enable-bindings-python=no
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,15 +1,20 @@
{
"name": "libgpiod",
"version": "1.6.3",
"port-version": 1,
"port-version": 2,
"description": "C library and tools for interacting with the linux GPIO character device",
"homepage": "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git",
"license": "LGPL-2.1-or-later",
"supports": "linux & (x64 | arm64)",
"supports": "linux & (x64 | arm)",
"dependencies": [
{
"name": "vcpkg-cmake-get-vars",
"host": true
}
]
],
"features": {
"cxx-bindings": {
"description": "Make available cxx bindings"
}
}
}

View File

@ -3678,7 +3678,7 @@
},
"libgpiod": {
"baseline": "1.6.3",
"port-version": 1
"port-version": 2
},
"libgpod": {
"baseline": "2019-08-29",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "effc79de6dafb6ef6762bd2863a222c6090881e8",
"version": "1.6.3",
"port-version": 2
},
{
"git-tree": "014bb3350492c4259151f00b3419e2054f707401",
"version": "1.6.3",