diff options
| author | Phoebe <20694052+PhoebeHui@users.noreply.github.com> | 2020-07-30 02:22:12 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-29 11:22:12 -0700 |
| commit | a2d3782198a715a3ded943a86d9dd8f7ff95abf7 (patch) | |
| tree | 706c20cb537b73301e63367f2de364841129ca29 /ports/libusb | |
| parent | 0babd2ff240a3f500dba4deeecab2df96b57437d (diff) | |
| download | vcpkg-a2d3782198a715a3ded943a86d9dd8f7ff95abf7.tar.gz vcpkg-a2d3782198a715a3ded943a86d9dd8f7ff95abf7.zip | |
[libusb] Fix issue to support linux (#9561)
* [libusb] support linux
* Add Supports
* Using vcpkg_configure_make instead
* Revert to install headers in windows
* Fix failures in libftd1
* Update treehopper
* Add failed ports in ci baseline file
* Revert to remove azure-kinect-sensor-sdk:x64-windows-static=fail in baseline file
* Resolve conflicts
Co-authored-by: PhoebeHui <v-phma@microsoft.com>
Diffstat (limited to 'ports/libusb')
| -rw-r--r-- | ports/libusb/CONTROL | 3 | ||||
| -rw-r--r-- | ports/libusb/portfile.cmake | 78 |
2 files changed, 10 insertions, 71 deletions
diff --git a/ports/libusb/CONTROL b/ports/libusb/CONTROL index 8e3516132..863b2d08b 100644 --- a/ports/libusb/CONTROL +++ b/ports/libusb/CONTROL @@ -1,4 +1,5 @@ Source: libusb -Version: 1.0.23 +Version: 1.0.23-1 Homepage: https://github.com/libusb/libusb Description: a cross-platform library to access USB devices +Supports: !uwp diff --git a/ports/libusb/portfile.cmake b/ports/libusb/portfile.cmake index 1beb053aa..00bdbae79 100644 --- a/ports/libusb/portfile.cmake +++ b/ports/libusb/portfile.cmake @@ -1,8 +1,6 @@ -if (VCPKG_CMAKE_SYSTEM_NAME) - message(FATAL_ERROR "Error: the port is unsupported on your platform. Please open an issue on github.com/Microsoft/vcpkg to request a fix") -endif() +vcpkg_fail_port_install(ON_TARGET "uwp") -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(VCPKG_TARGET_IS_LINUX) message("${PORT} currently requires the following tools and libraries from the system package manager:\n autoreconf\n libudev\n\nThese can be installed on Ubuntu systems via apt-get install autoreconf libudev-dev") endif() @@ -46,73 +44,13 @@ if(VCPKG_TARGET_IS_WINDOWS) PROJECT_SUBPATH msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj LICENSE_SUBPATH COPYING ) + file(INSTALL ${SOURCE_PATH}/libusb/libusb.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/libusb-1.0) else() - set(BASH /bin/bash) - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - # Copy sources - message(STATUS "Copying source files...") - file(GLOB PORT_SOURCE_FILES ${SOURCE_PATH}/*) - foreach(SOURCE_FILE ${PORT_SOURCE_FILES}) - file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - endforeach() - message(STATUS "Copying source files... done") - # Configure release - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"./autogen.sh\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"./configure --prefix=${CURRENT_PACKAGES_DIR}\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - # Copy sources - message(STATUS "Copying source files...") - file(GLOB PORT_SOURCE_FILES ${SOURCE_PATH}/*) - foreach(SOURCE_FILE ${PORT_SOURCE_FILES}) - file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - endforeach() - message(STATUS "Copying source files... done") - # Configure debug - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"./autogen.sh\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"./configure --prefix=${CURRENT_PACKAGES_DIR}/debug\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - # Build release - message(STATUS "Package ${TARGET_TRIPLET}-rel") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"make install\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - message(STATUS "Package ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - # Build debug - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - execute_process( - COMMAND "${BASH} --noprofile --norc -c \"make install\"" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") - endif() + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + ) + vcpkg_install_make() endif() -file(INSTALL - ${SOURCE_PATH}/libusb/libusb.h - DESTINATION ${CURRENT_PACKAGES_DIR}/include/libusb-1.0 -) - file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
