From 47d206e149e88201333b5ca8fe55c30e2b1a8177 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Fri, 21 Jun 2019 04:11:54 +0200 Subject: [many ports] improvements for linux/wsl (#6730) * [many ports] improve compatibility with WSL and mixed case filesystems * [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there * [libharu] add compatibility with non-win32 platforms * [geogram] fix openblas on linux [clapack] better integration with linux environment [visit-struct] put cmake config file in the expected folder [geogram] remove trailing underscore to enable compatibility with OpenBLAS * [openblas] playing with underscore, without success * [openblas/lapack] fix library integration * [clapack] improve target handling in cmake module * [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs * [clapack,openblas] improve libraries integration * [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags * [suitesparse] improve integration with new lapack/openblas mechanism * [suitesparse] add no underscore postfix also for linux * [ceres] fix integration with newer openblas/lapack configs * [aws-c-event-stream] fix regression * [systemc] fix regression * [libwebp,geogram] trigger rebuild * [libwebp,pthread4w] fix regressions * [glbinding] fix cmake module installation * [globjects] disentangle unnecessary dependency from qt5 * [jasper] remove broken and unnecessary patches * [libwebp] fix regression * [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files * [clapack] correctly find dlls * [clapack] use a generic blas as dependency * [fizz,g2o] restore expected version * fix mistake * [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports * [libressl,openssl] do not try to build one if the other is already installed * [itk] update ref and patch to avoid regression * [libressl,openssl] implement full strategy to fix CI * [libwebp] disable components that are broken on macOS * [ogre] enable macOS build * [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169 * [ogre] add missing install command * [ffmpeg] enable wrapper for cmake module * [ffmpeg] add avresample module finder * [ffmpeg] improve module detection and exported symbols * [ffmpeg] add variables to cache * [thrift] remove unnecessary build option * [allegro5] fix shared/static inversion * [protobuf] cleanup * [libressl] cleanup * [moos-core] cleanup * commented features must not be separated from other features, otherwise vcpkg complains * [itk] fix regression * [shogun,itk] fix regressions * [ogre] fix regression * [opusfile] add compatibility with non-win32 * [itk] fix regression * [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile * add missing dependencies * [ismrmrd] fix regression * [ffmpeg] trigger rebuild * [clapack,openblas,libogg] fix regressions on macOS * [libtins] fix regression * force rebuild windows regressions, unable to reproduce locally * [mosquitto] enable non-win32 builds * [json-dto] force rebuild, unable to reproduce regression locally * [many ports] uniform naming and path length requests * fix regression * fix regression * [ffmpeg] fixes for downstream projects * clean up - thanks to reviewers * trigger rebuild of regressions on macOS * trigger rebuild of regressions on macOS - part2 * Add core back * Use VCPKG_CONCURRENCY * Add core back to suitesparse * Add core back to curl * Add core back to magnum * Add core back to magnum * Add core back to magnum * Add core back to cgal --- ports/libusb/CONTROL | 2 +- ports/libusb/portfile.cmake | 106 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 90 insertions(+), 18 deletions(-) (limited to 'ports/libusb') diff --git a/ports/libusb/CONTROL b/ports/libusb/CONTROL index ecd230144..e4229daed 100644 --- a/ports/libusb/CONTROL +++ b/ports/libusb/CONTROL @@ -1,4 +1,4 @@ Source: libusb -Version: 1.0.22-2 +Version: 1.0.22-3 Homepage: https://github.com/libusb/libusb Description: a cross-platform library to access USB devices diff --git a/ports/libusb/portfile.cmake b/ports/libusb/portfile.cmake index d2a96c73b..d5047841f 100644 --- a/ports/libusb/portfile.cmake +++ b/ports/libusb/portfile.cmake @@ -1,7 +1,11 @@ include(vcpkg_common_functions) -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP builds are currently not supported.") +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() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "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() vcpkg_from_github( @@ -11,28 +15,96 @@ vcpkg_from_github( SHA512 b1fed66aafa82490889ee488832c6884a95d38ce7b28fb7c3234b9bce1f749455d7b91cde397a0abc25101410edb13ab2f9832c59aa7b0ea8c19ba2cf4c63b00 HEAD_REF master PATCHES - "${CMAKE_CURRENT_LIST_DIR}/fix_c2001.patch" + fix_c2001.patch ) -if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(MSVS_VERSION 2017) -else() - set(MSVS_VERSION 2015) -endif() +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(MSVS_VERSION 2017) #they are abi compatible, so it should work + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(MSVS_VERSION 2017) + else() + set(MSVS_VERSION 2015) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(LIBUSB_PROJECT_TYPE dll) + else() + set(LIBUSB_PROJECT_TYPE static) + endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(LIBUSB_PROJECT_TYPE dll) + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj + LICENSE_SUBPATH COPYING + ) else() - set(LIBUSB_PROJECT_TYPE static) -endif() + set(BASH /bin/bash) -vcpkg_install_msbuild( - SOURCE_PATH ${SOURCE_PATH} - PROJECT_SUBPATH msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj - LICENSE_SUBPATH COPYING -) + 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() +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) -- cgit v1.2.3 From 883766c4cb3faa8d0abf5b654796dc4b628a4214 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Sat, 3 Aug 2019 04:31:02 +0800 Subject: [libusb]Fix using mismatched CRT_linkage/library_linkage issue. (#7465) --- ports/libusb/CONTROL | 2 +- ports/libusb/portfile.cmake | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'ports/libusb') diff --git a/ports/libusb/CONTROL b/ports/libusb/CONTROL index e4229daed..d8b7d7042 100644 --- a/ports/libusb/CONTROL +++ b/ports/libusb/CONTROL @@ -1,4 +1,4 @@ Source: libusb -Version: 1.0.22-3 +Version: 1.0.22-4 Homepage: https://github.com/libusb/libusb Description: a cross-platform library to access USB devices diff --git a/ports/libusb/portfile.cmake b/ports/libusb/portfile.cmake index d5047841f..9ab38c869 100644 --- a/ports/libusb/portfile.cmake +++ b/ports/libusb/portfile.cmake @@ -18,7 +18,7 @@ vcpkg_from_github( fix_c2001.patch ) -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_PLATFORM_TOOLSET MATCHES "v142") set(MSVS_VERSION 2017) #they are abi compatible, so it should work elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") @@ -29,8 +29,20 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(LIBUSB_PROJECT_TYPE dll) + if (VCPKG_CRT_LINKAGE STREQUAL static) + file(READ "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" PROJ_FILE) + string(REPLACE "MultiThreadedDLL" "MultiThreaded" PROJ_FILE "${PROJ_FILE}") + string(REPLACE "MultiThreadedDebugDLL" "MultiThreadedDebug" PROJ_FILE "${PROJ_FILE}") + file(WRITE "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" "${PROJ_FILE}") + endif() else() set(LIBUSB_PROJECT_TYPE static) + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + file(READ "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" PROJ_FILE) + string(REPLACE "MultiThreaded" "MultiThreadedDLL" PROJ_FILE "${PROJ_FILE}") + string(REPLACE "MultiThreadedDebug" "MultiThreadedDebugDLL" PROJ_FILE "${PROJ_FILE}") + file(WRITE "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" "${PROJ_FILE}") + endif() endif() vcpkg_install_msbuild( -- cgit v1.2.3 From 9d1048e612a115a3982f91e6f341abefcb02d726 Mon Sep 17 00:00:00 2001 From: Phoebe <925731795@qq.com> Date: Wed, 20 Nov 2019 03:02:13 +0800 Subject: [libusb] upgrade and support arm64 (#8976) --- ports/libusb/CONTROL | 2 +- ports/libusb/fix_c2001.patch | 92 -------------------------------------------- ports/libusb/portfile.cmake | 8 +--- 3 files changed, 3 insertions(+), 99 deletions(-) delete mode 100644 ports/libusb/fix_c2001.patch (limited to 'ports/libusb') diff --git a/ports/libusb/CONTROL b/ports/libusb/CONTROL index d8b7d7042..8e3516132 100644 --- a/ports/libusb/CONTROL +++ b/ports/libusb/CONTROL @@ -1,4 +1,4 @@ Source: libusb -Version: 1.0.22-4 +Version: 1.0.23 Homepage: https://github.com/libusb/libusb Description: a cross-platform library to access USB devices diff --git a/ports/libusb/fix_c2001.patch b/ports/libusb/fix_c2001.patch deleted file mode 100644 index 38c4774a1..000000000 --- a/ports/libusb/fix_c2001.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/msvc/libusb_dll_2015.vcxproj b/msvc/libusb_dll_2015.vcxproj -index ce562f1..e5a19fd 100644 ---- a/msvc/libusb_dll_2015.vcxproj -+++ b/msvc/libusb_dll_2015.vcxproj -@@ -53,10 +53,18 @@ - ProgramDatabase - Disabled - MultiThreadedDebugDLL -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - NDEBUG;%(PreprocessorDefinitions) - MultiThreadedDLL -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - libusb-1.0.rc;%(EmbedManagedResourceFile) -diff --git a/msvc/libusb_dll_2017.vcxproj b/msvc/libusb_dll_2017.vcxproj -index 8311300..f635aed 100644 ---- a/msvc/libusb_dll_2017.vcxproj -+++ b/msvc/libusb_dll_2017.vcxproj -@@ -53,10 +53,18 @@ - ProgramDatabase - Disabled - MultiThreadedDebugDLL -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - NDEBUG;%(PreprocessorDefinitions) - MultiThreadedDLL -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - libusb-1.0.rc;%(EmbedManagedResourceFile) -diff --git a/msvc/libusb_static_2015.vcxproj b/msvc/libusb_static_2015.vcxproj -index a182171..ce4cc66 100644 ---- a/msvc/libusb_static_2015.vcxproj -+++ b/msvc/libusb_static_2015.vcxproj -@@ -54,10 +54,18 @@ - ProgramDatabase - Disabled - MultiThreadedDebug -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - NDEBUG;%(PreprocessorDefinitions) - MultiThreaded -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - $(OutDir)libusb-1.0.lib -diff --git a/msvc/libusb_static_2017.vcxproj b/msvc/libusb_static_2017.vcxproj -index 1341693..8908450 100644 ---- a/msvc/libusb_static_2017.vcxproj -+++ b/msvc/libusb_static_2017.vcxproj -@@ -54,10 +54,18 @@ - ProgramDatabase - Disabled - MultiThreadedDebug -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - NDEBUG;%(PreprocessorDefinitions) - MultiThreaded -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) -+ /source-charset:utf-8 %(AdditionalOptions) - - - $(OutDir)libusb-1.0.lib diff --git a/ports/libusb/portfile.cmake b/ports/libusb/portfile.cmake index 9ab38c869..1beb053aa 100644 --- a/ports/libusb/portfile.cmake +++ b/ports/libusb/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - 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() @@ -11,11 +9,9 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libusb/libusb - REF v1.0.22 - SHA512 b1fed66aafa82490889ee488832c6884a95d38ce7b28fb7c3234b9bce1f749455d7b91cde397a0abc25101410edb13ab2f9832c59aa7b0ea8c19ba2cf4c63b00 + REF e782eeb2514266f6738e242cdcb18e3ae1ed06fa # v1.0.23 + SHA512 27cfff4bbf64d5ec5014acac0871ace74b6af76141bd951309206f4806e3e3f2c7ed32416f5b55fd18d033ca5494052eb2e50ed3cc0be10839be2bd4168a9d4c HEAD_REF master - PATCHES - fix_c2001.patch ) if(VCPKG_TARGET_IS_WINDOWS) -- cgit v1.2.3