diff --git a/.github/secrets/ios/Certificates_ios_dist.p12.gpg b/.github/secrets/ios/Certificates_ios_dist.p12.gpg index 724e59163..35d7fe59c 100644 Binary files a/.github/secrets/ios/Certificates_ios_dist.p12.gpg and b/.github/secrets/ios/Certificates_ios_dist.p12.gpg differ diff --git a/.github/secrets/ios/LutraConsultingLtdInputAppStore.mobileprovision.gpg b/.github/secrets/ios/LutraConsultingLtdInputAppStore.mobileprovision.gpg index 1dd1fa490..2310c5598 100644 Binary files a/.github/secrets/ios/LutraConsultingLtdInputAppStore.mobileprovision.gpg and b/.github/secrets/ios/LutraConsultingLtdInputAppStore.mobileprovision.gpg differ diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index c1976fe7e..1fd3228ba 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -35,20 +35,19 @@ jobs: ANDROID_ABI: 'arm64-v8a' BUILD_OFFSET: 50 - runs-on: macos-15 + runs-on: macos-26 env: NDK_VERSION: 'r27' # '27.2.12479018' NDK_VERSION_FULL: r27c JDK_VERSION: 17 - SDK_PLATFORM: android-35 - ANDROIDAPI: 24 + SDK_PLATFORM: android-36 VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' - SDK_BUILD_TOOLS: 34.0.0 - CMAKE_VERSION: '3.31.6' + SDK_BUILD_TOOLS: 36.0.0 + CMAKE_VERSION: '4.3.2' QT_ANDROID_KEYSTORE_ALIAS: input QT_ANDROID_KEYSTORE_KEY_PASS: ${{ secrets.INPUTKEYSTORE_STOREPASS }} QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.INPUTKEYSTORE_STOREPASS }} - XC_VERSION: ${{ '16.2' }} + XC_VERSION: ${{ '26.4.1' }} VCPKG_ROOT: '${{ github.workspace }}/vcpkg' LC_ALL: 'en_US.UTF-8' #fastlane LANG: 'en_US.UTF-8' #fastlane @@ -97,7 +96,7 @@ jobs: cmakeVersion: ${{ env.CMAKE_VERSION }} - name: Setup XCode - uses: maxim-lobanov/setup-xcode@v1.6.0 + uses: maxim-lobanov/setup-xcode@v1.7.0 with: xcode-version: ${{ env.XC_VERSION }} @@ -126,13 +125,15 @@ jobs: add-to-path: true - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: java-version: ${{ env.JDK_VERSION }} distribution: zulu - name: Setup Android SDK - uses: malinskiy/action-android/install-sdk@release/0.1.7 + uses: android-actions/setup-android@v4 + with: + packages: '' - name: Install Android Tools run: | diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index a03edd9d1..355591cc2 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -17,10 +17,6 @@ on: types: - published -env: - QT_VERSION: '6.8.3' # use scripts/update_qt_version.bash to change - CACHE_VERSION: 0 - jobs: code_style_cpp: name: C++ code convention check diff --git a/.github/workflows/gallery.yml b/.github/workflows/gallery.yml index ac4791d60..7b8804c3f 100644 --- a/.github/workflows/gallery.yml +++ b/.github/workflows/gallery.yml @@ -20,15 +20,14 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-15, windows-2022] + os: [ubuntu-latest, macos-26, windows-latest] runs-on: ${{ matrix.os }} env: - QT_VERSION: '6.8.3' # use scripts/update_qt_version.bash to change + QT_VERSION: '6.10.3' GITHUB_TOKEN: ${{ secrets.INPUTAPP_BOT_GITHUB_TOKEN }} CACHE_VERSION: 1 - XC_VERSION: ${{ '16.2' }} # macos-only + XC_VERSION: ${{ '26.4.1' }} # macos-only VS_VERSION: "2022" # win-only - QT_ARCH: "win64_msvc2022_64" # win-only steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml index acc317d50..7f196134f 100644 --- a/.github/workflows/i18n.yml +++ b/.github/workflows/i18n.yml @@ -11,7 +11,7 @@ jobs: if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate ')) runs-on: ubuntu-latest env: - QT_VERSION: '6.8.3' # use scripts/update_qt_version.bash to change + QT_VERSION: '6.10.3' steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 9f47cf57c..5eb881dd3 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -20,14 +20,13 @@ on: - published env: - CMAKE_VERSION: '3.31.6' + CMAKE_VERSION: '4.3.2' VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' VCPKG_ROOT: '${{ github.workspace }}/vcpkg' - XC_VERSION: ${{ '16.4' }} - DEPLOYMENT_TARGET: '14.0' + XC_VERSION: ${{ '26.4.1' }} TRIPLET: arm64-ios IOS_PROVISIONING_PROFILE_UUID: 59aaa8d7-516a-4592-8c58-d7d1c1f81610 - KEYCHAIN: ${{ 'inputapp.keychain' }} + KEYCHAIN: ${{ 'mmapp.keychain' }} concurrency: group: ci-${{github.ref}}-ios @@ -36,7 +35,7 @@ concurrency: jobs: ios_build: if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate ')) - runs-on: macos-15 + runs-on: macos-26 steps: - name: Checkout uses: actions/checkout@v6 @@ -57,7 +56,7 @@ jobs: cmakeVersion: ${{ env.CMAKE_VERSION }} - name: Setup XCode - uses: maxim-lobanov/setup-xcode@v1.6.0 + uses: maxim-lobanov/setup-xcode@v1.7.0 with: xcode-version: ${{ env.XC_VERSION }} @@ -163,7 +162,6 @@ jobs: -D CMAKE_CXX_VISIBILITY_PRESET=hidden \ -D CMAKE_SYSTEM_NAME=iOS \ -D CMAKE_SYSTEM_PROCESSOR=aarch64 \ - -D CMAKE_OSX_DEPLOYMENT_TARGET=${{ env.DEPLOYMENT_TARGET }} \ -DIOS=TRUE \ -DUSE_MM_SERVER_API_KEY=TRUE \ -DUSE_KEYCHAIN=No \ diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 659870eda..b693dc24a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -20,7 +20,7 @@ on: - published env: - CMAKE_VERSION: '3.31.6' + CMAKE_VERSION: '4.3.2' VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' VCPKG_ROOT: "${{ github.workspace }}/vcpkg" TRIPLET: x64-linux @@ -32,7 +32,7 @@ concurrency: jobs: linux_build: if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate ')) - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v6 @@ -47,10 +47,11 @@ jobs: sudo apt-get update -y sudo apt-get install -y \ - gperf autopoint '^libxcb.*-dev' libx11-xcb-dev libegl1-mesa libegl1-mesa-dev \ + gperf autopoint '^libxcb.*-dev' libx11-xcb-dev libegl1-mesa-dev \ libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev \ - autoconf-archive libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libfuse2 \ - bison flex lcov nasm libxrandr-dev xvfb + autoconf-archive libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libfuse2t64 \ + lcov nasm libxrandr-dev mono-complete xvfb libltdl-dev libwayland-dev libwayland-egl-backend-dev \ + wayland-protocols # Required to run unit tests on linux echo "QT_QPA_PLATFORM=offscreen" >> $GITHUB_ENV @@ -95,7 +96,9 @@ jobs: - name: Setup NuGet Credentials shell: bash run: | - mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \ + ${{ env.VCPKG_ROOT }}/vcpkg fetch nuget + + mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | head -n 1` \ sources add \ -source "https://nuget.pkg.github.com/merginmaps/index.json" \ -storepasswordincleartext \ @@ -103,7 +106,7 @@ jobs: -username "mergin-maps-bot" \ -password "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" - mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \ + mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | head -n 1` \ setapikey "${{ secrets.MERGIN_MAPS_BOT_GITHUB_TOKEN }}" \ -source "https://nuget.pkg.github.com/merginmaps/index.json" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index b0c1fb8b8..3417ab130 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -19,11 +19,10 @@ on: - published env: - CMAKE_VERSION: '3.31.6' + CMAKE_VERSION: '4.3.2' VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' VCPKG_ROOT: '${{ github.workspace }}/vcpkg' - XC_VERSION: ${{ '16.4' }} - DEPLOYMENT_TARGET: '11.0' + XC_VERSION: ${{ '26.4.1' }} TRIPLET: arm64-osx concurrency: @@ -33,7 +32,7 @@ concurrency: jobs: macos_build: if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate ')) - runs-on: macos-15 + runs-on: macos-26 steps: - name: Checkout uses: actions/checkout@v6 @@ -54,7 +53,7 @@ jobs: cmakeVersion: ${{ env.CMAKE_VERSION }} - name: Setup XCode - uses: maxim-lobanov/setup-xcode@v1.6.0 + uses: maxim-lobanov/setup-xcode@v1.7.0 with: xcode-version: ${{ env.XC_VERSION }} diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 09b3ea203..6a5e6c099 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -25,13 +25,13 @@ concurrency: jobs: win64_build: if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate ')) - runs-on: windows-2022 + runs-on: windows-2025 env: VS_VERSION: "2022" # we can't reference other variables within, so make sure the year in path is same as VS_VERSION VCINSTALLDIR: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/" - CMAKE_VERSION: '3.31.6' + CMAKE_VERSION: '4.3.2' VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' TRIPLET: x64-windows CMAKE_GENERATOR: "Visual Studio 17 2022" # see https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md @@ -56,8 +56,8 @@ jobs: uses: lukka/get-cmake@latest with: cmakeVersion: ${{ env.CMAKE_VERSION }} - - - name: Install ccache + + - name: Install NSIS shell: cmd run: | choco install nsis @@ -141,40 +141,40 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^ -S ${{ steps.vars.outputs.WORKSPACE_DIR }}/mm ^ -B . - + - name: Build app shell: cmd run: | cd build-mm - + set PATH=${{ env.VCPKG_ROOT }};%PATH% - + cmake --build ${{ github.workspace }}\build-mm --config Release --verbose IF NOT EXIST Release\MerginMaps.exe (echo err_MERGINMAPS_BUILD & exit /b 1) - + - name: Install app shell: cmd run: | - cd build-mm - cmake --install ${{ github.workspace }}\build-mm --config Release --verbose - - mkdir C:\mm-package - mkdir C:\mm-package\stage - robocopy ${{ steps.vars.outputs.WORKSPACE_DIR }}/install-mm C:\mm-package\stage /E /NFL - dir C:\mm-package\stage + cd build-mm + cmake --install ${{ github.workspace }}\build-mm --config Release --verbose + + mkdir C:\mm-package + mkdir C:\mm-package\stage + robocopy ${{ steps.vars.outputs.WORKSPACE_DIR }}/install-mm C:\mm-package\stage /E /NFL + dir C:\mm-package\stage - name: Get TimeStamp id: time uses: josStorer/get-current-time@v2.0.2 with: format: 'YYYYMMDD' - + - name: Create package shell: cmd run: | - makensis.exe mm\scripts\MM_win.nsi - xcopy C:\mm-package\merginmaps-app-win-x86_64.exe mergin-maps-mobile-win64-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.exe* /Y + "C:\Program Files (x86)\NSIS\makensis.exe" mm\scripts\MM_win.nsi + xcopy C:\mm-package\merginmaps-app-win-x86_64.exe mergin-maps-mobile-win64-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.exe* /Y - name: Upload Sdk in Artifacts uses: actions/upload-artifact@v6 @@ -182,4 +182,3 @@ jobs: path: mergin-maps-mobile-win64-${{ steps.time.outputs.formattedTime }}-${{ github.run_number }}.exe name: Mergin Maps ${{ env.MM_VERSION_CODE }} win64 if-no-files-found: error - diff --git a/CMakeLists.txt b/CMakeLists.txt index b43b4e1e3..1dd161f6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ if (ANDROID_ABI) set(ANDROID_ARM_NEON ON) # Target/Minimum API levels for Android, used as MerginMaps target properties - set(MM_ANDROID_TARGET_SDK_VERSION "35") + set(MM_ANDROID_TARGET_SDK_VERSION "36") set(MM_ANDROID_MIN_SDK_VERSION "${ANDROIDAPI}") set(MM_ANDROID_NDK_PATH "$ENV{ANDROID_NDK_HOME}") if (NOT MM_ANDROID_NDK_PATH) @@ -182,13 +182,19 @@ find_package( REQUIRED ) -# Qt by default assumes that cmake files live in `lib/cmake`. Point to `share` instead. -# See -# https://github.com/qt/qtbase/blob/39290c508e2c7fa816c6f79b3eb284adc0cad3c0/src/corelib/Qt6AndroidMacros.cmake#L1016C16-L1026 if (ANDROID) - get_filename_component( - QT_ANDROID_PATH_CMAKE_DIR_${ANDROID_ABI} "${Qt6_DIR}/.." ABSOLUTE + # Android requires access to private headers for AndroidUtils + find_package( + Qt6 + COMPONENTS CorePrivate + REQUIRED ) + + # Qt by default assumes that cmake files live in `lib/cmake`. Point to `share` instead. + # See + # https://github.com/qt/qtbase/blob/7ddbc87d8e14ce51d2957ea72d0a6077593d5ff4/src/corelib/Qt6AndroidMacros.cmake#L1281-L1296 + cmake_path(SET QT_ANDROID_PATH_CMAKE_DIR_${ANDROID_ABI} "${Qt6_DIR}/..") + cmake_path(ABSOLUTE_PATH QT_ANDROID_PATH_CMAKE_DIR_${ANDROID_ABI} NORMALIZE) message( STATUS "QT_ANDROID_PATH_CMAKE_DIR_${ANDROID_ABI}: ${QT_ANDROID_PATH_CMAKE_DIR_${ANDROID_ABI}}" diff --git a/INSTALL.md b/INSTALL.md index 386ae2ca3..370cd3427 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -139,7 +139,7 @@ Steps to build and run mobile app: bison flex lcov nasm libxrandr-dev xvfb ``` - Also install CMake 3.x, Ninja and ccache + Also install CMake, Ninja and ccache 2. Install vcpkg and checkout to correct version from file `VCPKG_BASELINE` Read [vcpkg](#vcpkg) section. @@ -426,7 +426,7 @@ mobile app for Android on Windows, please help us to update this section. 1. Setup development environment - XCode - - install deps, see requirements in `.github/workflows/ios.yml`. Most specifically cmake 3.x, ninja, bison and flex (on PATH) + - install deps, see requirements in `.github/workflows/ios.yml`. Most specifically cmake, ninja, bison and flex (on PATH) - if you want to build for production, you need development certificates. These are not needed for local development, signing is handled automatically (see IOS_USE_PRODUCTION_SIGNING cmake variable for more info). You can get the certificates by following: - Get device UDID: either iTunes or about this mac->system report->USB->find iPAD (Serial Number) - Create dev iOS certificate for development @@ -506,12 +506,7 @@ Once the project is opened, build it from Xcode. ``` brew install cmake automake bison flex gnu-sed autoconf-archive libtool ninja pkg-config ``` - install cmake 3.x - Note: - - cmake 4.0.1 is broken (empty -isysroot) - - TODO test with cmake 4.0.3 which is today's - 2. Install vcpkg and checkout to correct version from file `VCPKG_BASELINE` Read [vcpkg](#vcpkg) section. diff --git a/VCPKG_BASELINE b/VCPKG_BASELINE index 6e42e8238..7b562fde9 100644 --- a/VCPKG_BASELINE +++ b/VCPKG_BASELINE @@ -1 +1 @@ -d6995a0cf3cafda5e9e52749fad075dd62bfd90c \ No newline at end of file +a78b96b07eb590c59bde5db0f4b260bda45ba92d \ No newline at end of file diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index c2c2e8a0a..16dddc3b5 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -439,7 +439,7 @@ if (IOS) PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "LutraConsultingLtd.Input.AppStore" XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY - "iPhone Distribution: LUTRA CONSULTING LIMITED (79QMH2QRAH)" + "Apple Distribution: LUTRA CONSULTING LIMITED (79QMH2QRAH)" XCODE_ATTRIBUTE_CODE_SIGN_STYLE "Manual" ) message(STATUS "Using manual code sign with production certificate") @@ -484,6 +484,10 @@ target_link_libraries( Qt6::Widgets ) +if (ANDROID) + target_link_libraries(MerginMaps PRIVATE Qt6::CorePrivate) +endif () + if (HAVE_BLUETOOTH) target_link_libraries(MerginMaps PUBLIC Qt6::Bluetooth) endif () diff --git a/app/androidutils.cpp b/app/androidutils.cpp index 03a3e85c1..c6fe3c9e6 100644 --- a/app/androidutils.cpp +++ b/app/androidutils.cpp @@ -186,40 +186,6 @@ QString AndroidUtils::getDeviceModel() return deviceModel; } -QVector AndroidUtils::getSafeArea() -{ - QVector ret; - -#ifdef ANDROID - const auto activity = QJniObject( QNativeInterface::QAndroidApplication::context() ); - const auto safeArrayStringObj = activity.callMethod( "getSafeArea", "()Ljava/lang/String;" ); - - if ( safeArrayStringObj.isValid() ) - { - const QString safeArrayString = safeArrayStringObj.toString(); - - QStringList stringParts = safeArrayString.split( "," ); - if ( stringParts.length() != 4 ) - { - CoreUtils::log( "SafeArea", "Android returned malformed string from getSafeArea method" ); - return ret; - } - - const int top = stringParts[0].toInt(); // top inset - const int right = stringParts[1].toInt(); // right inset - const int bottom = stringParts[2].toInt(); // bottom inset - const int left = stringParts[3].toInt(); // left inset - - ret << top << right << bottom << left; - return ret; - } - - CoreUtils::log( "SafeArea", "Android returned null from getSafeArea method" ); - return ret; -#endif - return ret; -} - void AndroidUtils::hideSplashScreen() { #ifdef ANDROID diff --git a/app/androidutils.h b/app/androidutils.h index f5f3752bf..b98e7a44f 100644 --- a/app/androidutils.h +++ b/app/androidutils.h @@ -58,8 +58,6 @@ class AndroidUtils: public QObject static QString getManufacturer(); static QString getDeviceModel(); - Q_INVOKABLE QVector getSafeArea(); - static void hideSplashScreen(); /** diff --git a/app/bluetoothdiscoverymodel.cpp b/app/bluetoothdiscoverymodel.cpp index 4f692a26e..b97a9e4a0 100644 --- a/app/bluetoothdiscoverymodel.cpp +++ b/app/bluetoothdiscoverymodel.cpp @@ -108,7 +108,7 @@ void BluetoothDiscoveryModel::setDiscovering( bool discovering ) if ( discovering ) { mDiscoveryAgent->start(); - CoreUtils::log( QStringLiteral( "Bluetooth discovery" ), QStringLiteral( "Started discovering devices, method %1" ).arg( mDiscoveryAgent->supportedDiscoveryMethods() ) ); + CoreUtils::log( QStringLiteral( "Bluetooth discovery" ), QStringLiteral( "Started discovering devices, method %1" ).arg( static_cast( mDiscoveryAgent->supportedDiscoveryMethods() ) ) ); } else { diff --git a/app/guidelinecontroller.cpp b/app/guidelinecontroller.cpp index e683f752a..ce9151ebe 100644 --- a/app/guidelinecontroller.cpp +++ b/app/guidelinecontroller.cpp @@ -128,16 +128,16 @@ void GuidelineController::buildGuideline() { // we are adding new point to the end/beginning QgsGeometry guideline; - QgsLineString *line; + const QgsLineString *line; if ( mRealGeometry.isMultipart() ) { - QgsMultiLineString *multiLine = qgsgeometry_cast( mRealGeometry.constGet() ); + const QgsMultiLineString *multiLine = qgsgeometry_cast( mRealGeometry.constGet() ); line = multiLine->lineStringN( mActivePart ); } else { - line = qgsgeometry_cast( mRealGeometry.constGet() ); + line = qgsgeometry_cast( mRealGeometry.constGet() ); } if ( !line ) diff --git a/app/ios/iosutils.cpp b/app/ios/iosutils.cpp index e261ac7c6..c2612978c 100644 --- a/app/ios/iosutils.cpp +++ b/app/ios/iosutils.cpp @@ -59,14 +59,6 @@ QString IosUtils::readExif( const QString &filepath, const QString &tag ) #endif } -QVector IosUtils::getSafeArea() -{ -#ifdef Q_OS_IOS - return getSafeAreaImpl(); -#endif - return QVector(); -} - QString IosUtils::getManufacturer() { #ifdef Q_OS_IOS diff --git a/app/ios/iosutils.h b/app/ios/iosutils.h index 9bcb0b474..1a6e06aa9 100644 --- a/app/ios/iosutils.h +++ b/app/ios/iosutils.h @@ -40,8 +40,6 @@ class IosUtils: public QObject IOSImagePicker *imagePicker() const; static QString readExif( const QString &filepath, const QString &tag ); - Q_INVOKABLE QVector getSafeArea(); - Q_INVOKABLE static bool openFile( const QString &filePath ); static Q_INVOKABLE QString getManufacturer(); @@ -68,8 +66,6 @@ class IosUtils: public QObject */ void setIdleTimerDisabled(); - QVector getSafeAreaImpl(); - static QString getManufacturerImpl(); static QString getDeviceModelImpl(); static bool openFileImpl( const QString &filePath ); diff --git a/app/ios/iosutils.mm b/app/ios/iosutils.mm index 23e4b0856..163b5ffc5 100644 --- a/app/ios/iosutils.mm +++ b/app/ios/iosutils.mm @@ -26,26 +26,6 @@ [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; } -QVector IosUtils::getSafeAreaImpl() -{ - QVector ret; - - if ( @available( iOS 11.0, * ) ) - { - UIWindow *window = UIApplication.sharedApplication.windows.firstObject; - - int top = window.safeAreaInsets.top; - int right = window.safeAreaInsets.right; - int bottom = window.safeAreaInsets.bottom; - int left = window.safeAreaInsets.left; - - ret << top << right << bottom << left; - return ret; - } - - return ret; -} - QString IosUtils::getManufacturerImpl() { return "APPLE INC."; diff --git a/app/main.cpp b/app/main.cpp index e91cb18ec..164adaaf6 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -812,46 +812,6 @@ int main( int argc, char *argv[] ) engine.rootContext()->setContextProperty( "__version", version ); - // Set safe areas for mobile devices -#ifdef ANDROID - auto safeAreaInsets = androidUtils.getSafeArea(); - - if ( safeAreaInsets.length() == 4 ) - { - // Values from Android API must be scaled with dpr - qreal dpr = QGuiApplication::primaryScreen()->devicePixelRatio(); - style->setSafeAreaTop( safeAreaInsets[0] / dpr ); - style->setSafeAreaRight( safeAreaInsets[1] / dpr ); - style->setSafeAreaBottom( safeAreaInsets[2] / dpr ); - style->setSafeAreaLeft( safeAreaInsets[3] / dpr ); - } -#elif defined( Q_OS_IOS ) - - // - // After migration to Qt 6.8.3, we can no longer reliably read the safe area on app startup (on iOS). - // It appears the UIWindow is not fully initialized, returning zero safe area insets. - // However, the window is correctly initialized once the event loop begins processing events. - // Therefore, we delay the safe area retrieval until after the event loop starts. - // This is a temporary workaround and might be replaced in the future by - // the more robust approach described in https://www.qt.io/blog/expanded-client-areas-and-safe-areas-in-qt-6.9. - // - - const int SAFE_AREA_REFRESH_DELAY_MS = 10; - - QTimer::singleShot( SAFE_AREA_REFRESH_DELAY_MS, &lambdaContext, [&iosUtils, &style]() - { - auto safeAreaInsets = iosUtils.getSafeArea(); - - if ( safeAreaInsets.length() == 4 ) - { - style->setSafeAreaTop( safeAreaInsets[0] ); - style->setSafeAreaRight( safeAreaInsets[1] ); - style->setSafeAreaBottom( safeAreaInsets[2] ); - style->setSafeAreaLeft( safeAreaInsets[3] ); - } - } ); - -#endif // Set simulated position for desktop builds #ifdef DESKTOP_OS @@ -914,6 +874,22 @@ int main( int argc, char *argv[] ) if ( QQuickWindow *quickWindow = qobject_cast( object ) ) { quickWindow->setIcon( QIcon( logoUrl ) ); + +#if defined( ANDROID ) || defined( Q_OS_IOS ) + // Qt 6.9+ provides QWindow::safeAreaMargins() natively for both Android and iOS. + + auto applyMargins = [style, quickWindow]() + { + const QMargins m = quickWindow->safeAreaMargins(); + style->setSafeAreaTop( m.top() ); + style->setSafeAreaRight( m.right() ); + style->setSafeAreaBottom( m.bottom() ); + style->setSafeAreaLeft( m.left() ); + }; + + QObject::connect( quickWindow, &QWindow::safeAreaMarginsChanged, &lambdaContext, applyMargins ); + QTimer::singleShot( 10, &lambdaContext, applyMargins ); +#endif } #ifdef DESKTOP_OS diff --git a/app/maptools/recordingmaptool.cpp b/app/maptools/recordingmaptool.cpp index d4e98e9bb..289d755ef 100644 --- a/app/maptools/recordingmaptool.cpp +++ b/app/maptools/recordingmaptool.cpp @@ -137,12 +137,12 @@ void RecordingMapTool::addPoint( const QgsPoint &point ) if ( mActiveRing == 0 ) { - r = qgsgeometry_cast( poly->exteriorRing() ); + r = qgsgeometry_cast( poly->exteriorRing()->clone() ); } else { // interior rings starts indexing from 0 - r = qgsgeometry_cast( poly->interiorRing( mActiveRing - 1 ) ); + r = qgsgeometry_cast( poly->interiorRing( mActiveRing - 1 )->clone() ); } if ( !r ) diff --git a/app/position/tracking/positiontrackingmanager.cpp b/app/position/tracking/positiontrackingmanager.cpp index 39d47104f..131e5baf2 100644 --- a/app/position/tracking/positiontrackingmanager.cpp +++ b/app/position/tracking/positiontrackingmanager.cpp @@ -48,8 +48,8 @@ void PositionTrackingManager::addPoint( const QgsPoint &position ) void PositionTrackingManager::addPoints( const QList &positions ) { // get points from the previous geometry - QgsLineString *oldLine = nullptr; - oldLine = qgsgeometry_cast( mTrackedGeometry.constGet() ); + const QgsLineString *oldLine = nullptr; + oldLine = qgsgeometry_cast( mTrackedGeometry.constGet() ); if ( !oldLine ) { diff --git a/app/projectwizard.cpp b/app/projectwizard.cpp index 41310a972..6bf680a5e 100644 --- a/app/projectwizard.cpp +++ b/app/projectwizard.cpp @@ -146,7 +146,7 @@ QgsVectorLayer *ProjectWizard::createTrackingLayer( const QString &trackingGpkgP symbolProps["line_width_unit"] = "MM"; symbolProps["line_color"] = QgsSymbolLayerUtils::encodeColor( QColor( "#FFA500" ) ); - layer->setRenderer( new QgsSingleSymbolRenderer( QgsLineSymbol::createSimple( symbolProps ) ) ); + layer->setRenderer( new QgsSingleSymbolRenderer( QgsLineSymbol::createSimple( symbolProps ).release() ) ); layer->setReadOnly( false ); layer->setFlags( QgsMapLayer::Identifiable | QgsMapLayer::Searchable | QgsMapLayer::Removable ); diff --git a/app/qml/components/MMPage.qml b/app/qml/components/MMPage.qml index 4328e88da..d2da1cbc8 100644 --- a/app/qml/components/MMPage.qml +++ b/app/qml/components/MMPage.qml @@ -27,6 +27,13 @@ Page { enum BottomMarginPolicy { UseMargin, PaintBehindSystemBar } + // Qt 6.9+ Page automatically adds safe area margins as padding. + // MMPageHeader and page content already handle safe areas manually. + topPadding: 0 + bottomPadding: 0 + leftPadding: 0 + rightPadding: 0 + implicitHeight: ApplicationWindow.window?.height ?? 0 implicitWidth: ApplicationWindow.window?.width ?? 0 diff --git a/app/qml/form/MMFormController.qml b/app/qml/form/MMFormController.qml index c0abccd6d..6b098ac52 100644 --- a/app/qml/form/MMFormController.qml +++ b/app/qml/form/MMFormController.qml @@ -59,6 +59,13 @@ Item { Drawer { id: drawer + // Qt 6.9+ Popup/Drawer automatically applies safe area margins as padding. + // MMFormPage and MMPreviewDrawer already handle safe areas manually. + topPadding: 0 + bottomPadding: 0 + leftPadding: 0 + rightPadding: 0 + StateGroup { id: statesManager diff --git a/app/qml/form/MMFormPage.qml b/app/qml/form/MMFormPage.qml index fe13097ba..8a1cf0037 100644 --- a/app/qml/form/MMFormPage.qml +++ b/app/qml/form/MMFormPage.qml @@ -24,6 +24,14 @@ import "../dialogs" Page { id: root + // Qt 6.9+ Page automatically adds safe area margins as padding. + // MMPageHeader and MMToolbar already handle safe areas manually, so + // we set them to zero to avoid double-applying the insets. + topPadding: 0 + bottomPadding: 0 + leftPadding: 0 + rightPadding: 0 + /** * When feature in the form is saved. */ diff --git a/app/qml/layers/MMLayerDetailPage.qml b/app/qml/layers/MMLayerDetailPage.qml index cc9ff8380..9f29d5dc8 100644 --- a/app/qml/layers/MMLayerDetailPage.qml +++ b/app/qml/layers/MMLayerDetailPage.qml @@ -20,6 +20,12 @@ import "../inputs" Page { id: root + // Qt 6.9+ auto-applies safe area padding; child MMPage instances handle it manually. + topPadding: 0 + bottomPadding: 0 + leftPadding: 0 + rightPadding: 0 + signal close() signal featureClicked( var featurePair ) signal addFeatureClicked( var targetLayer ) diff --git a/app/qml/main.qml b/app/qml/main.qml index 8c77c4610..cfeedeb51 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -52,10 +52,13 @@ ApplicationWindow { title: "Mergin Maps" // Do not translate - readonly property bool isPortraitOrientation: ( Screen.primaryOrientation === Qt.PortraitOrientation - || Screen.primaryOrientation === Qt.InvertedPortraitOrientation ) - - onIsPortraitOrientationChanged: recalculateSafeArea() + // Qt 6.9+ ApplicationWindow automatically adds safe area margins as padding to its + // contentItem. Since this app manages safe areas manually via __style, + // we override the automatic padding to avoid double-applying the insets. + topPadding: 0 + bottomPadding: 0 + leftPadding: 0 + rightPadding: 0 // start window where it was closed last time onXChanged: storeWindowPosition() @@ -1231,31 +1234,6 @@ ApplicationWindow { } } - function recalculateSafeArea() { - let safeArea = [] - - // Should be merged in future with the same code in main.cpp - if ( Qt.platform.os === "ios" ) { - safeArea = Array.from( __iosUtils.getSafeArea() ) - } - else if ( Qt.platform.os === "android" ) { - safeArea = Array.from( __androidUtils.getSafeArea() ) - - // Values from Android API must be divided by dpr - safeArea[0] = safeArea[0] / Screen.devicePixelRatio - safeArea[1] = safeArea[1] / Screen.devicePixelRatio - safeArea[2] = safeArea[2] / Screen.devicePixelRatio - safeArea[3] = safeArea[3] / Screen.devicePixelRatio - } - - if ( safeArea.length === 4 ) { - __style.safeAreaTop = safeArea[0] - __style.safeAreaRight = safeArea[1] - __style.safeAreaBottom = safeArea[2] - __style.safeAreaLeft = safeArea[3] - } - } - function storeWindowPosition() { if ( Qt.platform.os !== "ios" && Qt.platform.os !== "android") { diff --git a/app/test/testmaptools.cpp b/app/test/testmaptools.cpp index d714938a4..0afccd79f 100644 --- a/app/test/testmaptools.cpp +++ b/app/test/testmaptools.cpp @@ -2267,9 +2267,9 @@ void TestMapTools::testVerticesStructure() // We want to test case when last part is a line, not polygon. // As QGIS automatically close unclosed rings we need to alter geometry // manually and remove one point from the exterior ring of the part 3. - QgsMultiPolygon *multiPolygon = qgsgeometry_cast( multipolygonringsdataGEO.constGet() ); - QgsPolygon *poly = multiPolygon->polygonN( 2 ); - QgsLineString *ring = qgsgeometry_cast( poly->exteriorRing() ); + const QgsMultiPolygon *multiPolygon = qgsgeometry_cast( multipolygonringsdataGEO.constGet() ); + const QgsPolygon *poly = multiPolygon->polygonN( 2 ); + QgsLineString *ring = qgsgeometry_cast( poly->exteriorRing()->clone() ); QgsPointSequence points; ring->points( points ); points.removeLast(); @@ -2409,9 +2409,9 @@ void TestMapTools::testVerticesStructure() QgsGeometry multipolygoninvaliddataGEO = QgsGeometry::fromMultiPolygonXY( multipolygoninvaliddata ); // We want to test case when 2nd part is a line, not polygon. // As QGIS automatically close unclosed rings we need to alter geometry - multiPolygon = qgsgeometry_cast( multipolygoninvaliddataGEO.constGet() ); + multiPolygon = qgsgeometry_cast( multipolygoninvaliddataGEO.constGet() ); poly = multiPolygon->polygonN( 1 ); - ring = qgsgeometry_cast( poly->exteriorRing() ); + ring = qgsgeometry_cast( poly->exteriorRing()->clone() ); ring->points( points ); points.removeLast(); ring->setPoints( points ); diff --git a/cmake_templates/build.gradle.in b/cmake_templates/build.gradle.in index 5a39d2f6b..a97e036c0 100644 --- a/cmake_templates/build.gradle.in +++ b/cmake_templates/build.gradle.in @@ -7,7 +7,8 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:8.6.0' + //noinspection AndroidGradlePluginVersion + classpath 'com.android.tools.build:gradle:8.11.1' } } @@ -18,13 +19,12 @@ repositories { apply plugin: qtGradlePluginType - dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) implementation "androidx.appcompat:appcompat:1.7.1" - implementation "androidx.core:core:1.13.1" - implementation "androidx.core:core-splashscreen:1.0.1" - implementation "androidx.exifinterface:exifinterface:1.4.1" + implementation "androidx.core:core:1.16.0" + implementation "androidx.core:core-splashscreen:1.2.0" + implementation "androidx.exifinterface:exifinterface:1.4.2" implementation "com.google.android.gms:play-services-location:21.3.0" } @@ -36,6 +36,7 @@ android { * - qtAndroidDir - holds the path to qt android files * needed to build any Qt application * on Android. + * - qtGradlePluginType - whether to build an app or a library * * are defined in gradle.properties file. This file is * updated by QtCreator and androiddeployqt tools. @@ -45,12 +46,10 @@ android { namespace 'uk.co.lutraconsulting' compileSdkVersion androidCompileSdkVersion buildToolsVersion androidBuildToolsVersion - ndkVersion androidNdkVersion + ndkVersion = androidNdkVersion // don't get rid of this line as it inflates the final bundle size 5x ndkPath '@MM_ANDROID_NDK_PATH@' - packagingOptions.jniLibs.useLegacyPackaging true - sourceSets { main { manifest.srcFile 'AndroidManifest.xml' @@ -66,27 +65,27 @@ android { tasks.withType(JavaCompile) { options.incremental = true + options.compilerArgs += ['-Xlint:all'] } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } lintOptions { - abortOnError false + abortOnError = false } - // Do not compress Qt binary resources file aaptOptions { + // Do not compress Qt binary resources file noCompress 'rcc' } defaultConfig { - resConfigs "en" + resConfig "en" minSdkVersion qtMinSdkVersion targetSdkVersion qtTargetSdkVersion ndk.abiFilters = qtTargetAbiList.split(",") - ndk.debugSymbolLevel "SYMBOL_TABLE" } } diff --git a/scripts/ci/ios/exportOptions.plist b/scripts/ci/ios/exportOptions.plist index 372eedf93..34c1a0b27 100644 --- a/scripts/ci/ios/exportOptions.plist +++ b/scripts/ci/ios/exportOptions.plist @@ -14,7 +14,7 @@ LutraConsultingLtd.Input.AppStore signingCertificate - iPhone Distribution: LUTRA CONSULTING LIMITED (79QMH2QRAH) + Apple Distribution: LUTRA CONSULTING LIMITED (79QMH2QRAH) signingStyle manual teamID diff --git a/vcpkg.json b/vcpkg.json index ba8124308..521e2f821 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -84,7 +84,13 @@ }, { "name": "qtbase", - "default-features": false + "default-features": false, + "features": [ + { + "name": "wayland", + "platform": "linux" + } + ] }, "qtconnectivity", "qtdeclarative", @@ -93,11 +99,20 @@ "qtlocation", { "name": "qtmultimedia", + "default-features": false, "features": [ { "name": "ffmpeg", "platform": "linux | android | windows" }, + { + "name": "pipewire", + "platform": "linux" + }, + { + "name": "pulseaudio", + "platform": "linux" + }, "qml" ] }, @@ -114,11 +129,17 @@ "default-features": false } ], - "builtin-baseline": "d6995a0cf3cafda5e9e52749fad075dd62bfd90c", + "builtin-baseline": "a78b96b07eb590c59bde5db0f4b260bda45ba92d", "overrides": [ { - "name": "openssl", - "version": "3.3.2" + "$comment": "Required for QCA to work properly", + "name": "openssl", + "version": "3.3.2" + }, + { + "$comment": "Issue in newer version https://github.com/qgis/QGIS/pull/63196", + "name": "libspatialindex", + "version": "2.0.0" } ] } diff --git a/vcpkg/ports/README.md b/vcpkg/ports/README.md index 0217a3d12..57a033688 100644 --- a/vcpkg/ports/README.md +++ b/vcpkg/ports/README.md @@ -1,10 +1,8 @@ - Geodiff - no official port in vcpkg -- libb2 - bug, see: https://github.com/microsoft/vcpkg/issues/43326#issuecomment-2827154631 -- qca - we needed 2.3.9, there is 2.3.7 in main repo +- pcre2 - patch missing `_init`/`_fini` symbols causing lld linker errors on Android +- libpq - ios fix for OS detection, we change the detected OS to darwin +- libspatialite - fix build failing on racing condition for ios builds, force sequential build for some directories +- qca - we needed 2.3.10, there is 2.3.7 in main repo - qgis - no official port in vcpkg -- qtbase - https://github.com/microsoft/vcpkg/issues/39832#issuecomment-2221449238 -- qtdeclarative - unknown -- qtkeychain-qt6 - official port uses qt5 -- qtmultimedia - unknown -- qtpositioning - unknown -- gstreamer - unknown (linux build ffmpeg?) \ No newline at end of file +- qtdeclarative - optimization to decrease package size +- qtpositioning - Android service fix & iOS orthometric position hack diff --git a/vcpkg/ports/geodiff/portfile.cmake b/vcpkg/ports/geodiff/portfile.cmake index e3ca1ab10..325eb70ef 100644 --- a/vcpkg/ports/geodiff/portfile.cmake +++ b/vcpkg/ports/geodiff/portfile.cmake @@ -1,7 +1,7 @@ # Be sure to update both of these versions together. -set(GEODIFF_VERSION 2.0.2) +set(GEODIFF_VERSION 2.2.0) set(GEODIFF_HASH - 290f10ec1a0d419d13996e915d02b7d226f23359c2745a72a1a286d439bed3afdf536d5bb8771c3d4fb3df2d56ac5c0d4c7f178ee31493f4bf02d597c8b9a878 + b6ddd579dc446e6c22b520f4f94c49dbef42bba9deca55848acbd2b4993ae1236304cd1f07f4f7de91267901495bfb60d76668e8152625125778697cb57faabf ) vcpkg_from_github( @@ -25,14 +25,22 @@ else () list(APPEND GEODIFF_LINK_OPTIONS -DBUILD_SHARED=ON) endif () +set(GEODIFF_OPTIONS + -DENABLE_TESTS=OFF + -DBUILD_TOOLS=OFF + -DWITH_POSTGRESQL=OFF + ${GEODIFF_LINK_OPTIONS} +) + +if (VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS) + list(APPEND GEODIFF_OPTIONS "-DCMAKE_CXX_FLAGS=-Wno-error=deprecated-literal-operator") +endif () + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/geodiff OPTIONS - -DENABLE_TESTS=OFF - -DBUILD_TOOLS=OFF - -DWITH_POSTGRESQL=OFF - ${GEODIFF_LINK_OPTIONS} + ${GEODIFF_OPTIONS} ) vcpkg_install_cmake() diff --git a/vcpkg/ports/geodiff/vcpkg.json b/vcpkg/ports/geodiff/vcpkg.json index 7381d738c..12fd4ec85 100644 --- a/vcpkg/ports/geodiff/vcpkg.json +++ b/vcpkg/ports/geodiff/vcpkg.json @@ -1,6 +1,6 @@ { "name": "geodiff", - "version": "2.0.2", + "version": "2.2.0", "port-version": 2, "description": "Library for handling diffs for geospatial data", "homepage": "https://github.com/MerginMaps/geodiff", diff --git a/vcpkg/ports/gstreamer/base-must-be-enabled.patch b/vcpkg/ports/gstreamer/base-must-be-enabled.patch deleted file mode 100644 index 5a4d3abeb..000000000 --- a/vcpkg/ports/gstreamer/base-must-be-enabled.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/meson.build b/meson.build -index 6d07929..df015cb 100644 ---- a/meson.build -+++ b/meson.build -@@ -159,7 +159,7 @@ foreach sp : subprojects - subproj = subproject(project_name, required: is_required, default_options: default_options) - endif - -- if project_name == 'gst-plugins-base' -+ if project_name == 'gst-plugins-base' and subproj.found() - gst_base_orc_req = subproj.get_variable('orc_req', '') - if gst_base_orc_req != orc_req - error('orc_req is "@0@" but it should be "@1@" from subprojects/gst-plugins-base/meson.build' diff --git a/vcpkg/ports/gstreamer/fix-bz2-windows-debug-dependency.patch b/vcpkg/ports/gstreamer/fix-bz2-windows-debug-dependency.patch deleted file mode 100644 index 2be3d28ae..000000000 --- a/vcpkg/ports/gstreamer/fix-bz2-windows-debug-dependency.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/subprojects/gst-plugins-bad/ext/bz2/meson.build b/subprojects/gst-plugins-bad/ext/bz2/meson.build -index 08d1596..be5fa02 100644 ---- a/subprojects/gst-plugins-bad/ext/bz2/meson.build -+++ b/subprojects/gst-plugins-bad/ext/bz2/meson.build -@@ -4,7 +4,7 @@ bz2_sources = [ - 'gstbz2enc.c', - ] - --bz2_dep = cc.find_library('bz2', required : get_option('bz2')) -+bz2_dep = dependency('bzip2', required : get_option('bz2')) - - if bz2_dep.found() and cc.has_header_symbol('bzlib.h', 'BZ2_bzlibVersion') - gstbz2 = library('gstbz2', -diff --git a/subprojects/gst-plugins-good/gst/matroska/meson.build b/subprojects/gst-plugins-good/gst/matroska/meson.build -index d8a6a96..dd03de2 100644 ---- a/subprojects/gst-plugins-good/gst/matroska/meson.build -+++ b/subprojects/gst-plugins-good/gst/matroska/meson.build -@@ -12,7 +12,7 @@ matroska_sources = [ - 'lzo.c', - ] - --bz2_dep = cc.find_library('bz2', required : get_option('bz2')) -+bz2_dep = dependency('bzip2', required : get_option('bz2')) - cdata.set('HAVE_BZ2', bz2_dep.found() and cc.has_header('bzlib.h')) - - gstmatroska = library('gstmatroska', diff --git a/vcpkg/ports/gstreamer/fix-clang-cl-bad.patch b/vcpkg/ports/gstreamer/fix-clang-cl-bad.patch deleted file mode 100644 index c3eeaf1e0..000000000 --- a/vcpkg/ports/gstreamer/fix-clang-cl-bad.patch +++ /dev/null @@ -1,111 +0,0 @@ -diff --git a/subprojects/gst-plugins-bad/ext/dts/meson.build b/subprojects/gst-plugins-bad/ext/dts/meson.build -index c4868a4..6b34cb7 100644 ---- a/subprojects/gst-plugins-bad/ext/dts/meson.build -+++ b/subprojects/gst-plugins-bad/ext/dts/meson.build -@@ -20,7 +20,7 @@ if not dca_dep.found() - endif - - no_warn_c_args = [] --if cc.get_id() != 'msvc' -+if cc.get_argument_syntax() != 'msvc' - # autotools didn't use the libdca pkg-config cflags, and they - # can point to a non-existing location (/usr/include/dca) - no_warn_c_args = ['-Wno-missing-include-dirs'] -diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build -index 160080a..6acf110 100644 ---- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build -+++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build -@@ -158,7 +158,7 @@ endif - - # MinGW 32bits compiler seems to be complaining about redundant-decls - # when ComPtr is in use. Let's just disable the warning --if cc.get_id() != 'msvc' -+if cc.get_argument_syntax() != 'msvc' - extra_args = cc.get_supported_arguments([ - '-Wno-redundant-decls', - ]) -diff --git a/subprojects/gst-plugins-bad/meson.build b/subprojects/gst-plugins-bad/meson.build -index 84eeb17..1743f41 100644 ---- a/subprojects/gst-plugins-bad/meson.build -+++ b/subprojects/gst-plugins-bad/meson.build -@@ -54,7 +54,7 @@ endif - - cdata = configuration_data() - cdata.set('ENABLE_NLS', 1) - --if cc.get_id() == 'msvc' -+if cc.get_argument_syntax() == 'msvc' - msvc_args = [ - # Ignore several spurious warnings for things gstreamer does very commonly - # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it -diff --git a/subprojects/gst-plugins-bad/sys/asio/meson.build b/subprojects/gst-plugins-bad/sys/asio/meson.build -index c61ad4e..b30793c 100644 ---- a/subprojects/gst-plugins-bad/sys/asio/meson.build -+++ b/subprojects/gst-plugins-bad/sys/asio/meson.build -@@ -15,7 +15,7 @@ endif - - # FIXME: non-msvc is not tested, and unlikely supported yet because of - # tool-chain issue --if cxx.get_id() != 'msvc' -+if cxx.get_argument_syntax() != 'msvc' - if asio_option.enabled() - error('asio plugin can only be built with MSVC') - else -diff --git a/subprojects/gst-plugins-bad/sys/d3d11/meson.build b/subprojects/gst-plugins-bad/sys/d3d11/meson.build -index 1368b79..8dd3b30 100644 ---- a/subprojects/gst-plugins-bad/sys/d3d11/meson.build -+++ b/subprojects/gst-plugins-bad/sys/d3d11/meson.build -@@ -96,7 +96,7 @@ endif - - # MinGW 32bits compiler seems to be complaining about redundant-decls - # when ComPtr is in use. Let's just disable the warning --if cc.get_id() != 'msvc' -+if cc.get_argument_syntax() != 'msvc' - extra_mingw_args = cc.get_supported_arguments([ - '-Wno-redundant-decls', - ]) -diff --git a/subprojects/gst-plugins-bad/sys/decklink/meson.build b/subprojects/gst-plugins-bad/sys/decklink/meson.build -index d869e79a4..c7b37a7c6 100644 ---- a/subprojects/gst-plugins-bad/sys/decklink/meson.build -+++ b/subprojects/gst-plugins-bad/sys/decklink/meson.build -@@ -18,7 +18,7 @@ decklink_libs = [] - - if host_system == 'windows' - decklink_sources += ['win/DeckLinkAPIDispatch.cpp', 'win/DeckLinkAPI_i.c'] -- if cxx.get_id() == 'msvc' -+ if cxx.get_argument_syntax() == 'msvc' - # FIXME: Use commsuppwd.lib for debug builds? - comutil_dep = cxx.find_library('comsuppw', required : get_option('decklink')) - if comutil_dep.found() -diff --git a/subprojects/gst-plugins-bad/sys/mediafoundation/meson.build b/subprojects/gst-plugins-bad/sys/mediafoundation/meson.build -index 6b9a059..40713ce 100644 ---- a/subprojects/gst-plugins-bad/sys/mediafoundation/meson.build -+++ b/subprojects/gst-plugins-bad/sys/mediafoundation/meson.build -@@ -54,7 +54,7 @@ if host_system != 'windows' or mf_option.disabled() - subdir_done() - endif - --if cc.get_id() != 'msvc' -+if cc.get_argument_syntax() != 'msvc' - if mf_option.enabled() - error('mediafoundation plugin can only be built with MSVC') - endif -diff --git a/subprojects/gst-plugins-bad/sys/msdk/meson.build b/subprojects/gst-plugins-bad/sys/msdk/meson.build -index 659b96c..92e6bc4 100644 ---- a/subprojects/gst-plugins-bad/sys/msdk/meson.build -+++ b/subprojects/gst-plugins-bad/sys/msdk/meson.build -@@ -176,12 +176,12 @@ if use_onevpl and have_mfx_ver205 - endif - - if host_machine.system() == 'windows' -- if cc.get_id() != 'msvc' and msdk_option.enabled() -+ if cc.get_argument_syntax() != 'msvc' and msdk_option.enabled() - error('msdk plugin can only be built with MSVC') - endif - legacy_stdio_dep = cc.find_library('legacy_stdio_definitions', required: get_option('msdk')) - msdk_deps = declare_dependency(dependencies: [gstd3d11_dep, legacy_stdio_dep]) -- msdk_deps_found = gstd3d11_dep.found() and legacy_stdio_dep.found() and cc.get_id() == 'msvc' -+ msdk_deps_found = d3d11_dep.found() and legacy_stdio_dep.found() and cc.get_argument_syntax() == 'msvc' - else - libdl_dep = cc.find_library('dl', required: get_option('msdk')) - libgudev_dep = dependency('gudev-1.0', required: get_option('msdk')) diff --git a/vcpkg/ports/gstreamer/fix-clang-cl-base.patch b/vcpkg/ports/gstreamer/fix-clang-cl-base.patch deleted file mode 100644 index 227a7e05b..000000000 --- a/vcpkg/ports/gstreamer/fix-clang-cl-base.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/subprojects/gst-plugins-base/meson.build b/subprojects/gst-plugins-base/meson.build -index c040bc9..ce9071c 100644 ---- a/subprojects/gst-plugins-base/meson.build -+++ b/subprojects/gst-plugins-base/meson.build -@@ -51,7 +51,7 @@ gst_libraries = [] - - cc = meson.get_compiler('c') - --if cc.get_id() == 'msvc' -+if cc.get_argument_syntax() == 'msvc' - msvc_args = [ - # Ignore several spurious warnings for things gstreamer does very commonly - # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it diff --git a/vcpkg/ports/gstreamer/fix-clang-cl-good.patch b/vcpkg/ports/gstreamer/fix-clang-cl-good.patch deleted file mode 100644 index 10be6030a..000000000 --- a/vcpkg/ports/gstreamer/fix-clang-cl-good.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/subprojects/gst-plugins-good/meson.build b/subprojects/gst-plugins-good/meson.build -index 64705379f..0c55b9732 100644 ---- a/subprojects/gst-plugins-good/meson.build -+++ b/subprojects/gst-plugins-good/meson.build -@@ -30,7 +30,7 @@ plugins = [] - cc = meson.get_compiler('c') - host_system = host_machine.system() - --if cc.get_id() == 'msvc' -+if cc.get_argument_syntax() == 'msvc' - msvc_args = [ - # Ignore several spurious warnings for things gstreamer does very commonly - # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it -@@ -183,7 +183,7 @@ cdata.set('SIZEOF_OFF_T', cc.sizeof('off_t')) - # Here be fixmes. - # FIXME: check if this is correct - cdata.set('HAVE_CPU_X86_64', host_machine.cpu() == 'amd64') --cdata.set('HAVE_GCC_ASM', cc.get_id() != 'msvc') -+cdata.set('HAVE_GCC_ASM', cc.get_argument_syntax() != 'msvc') - cdata.set_quoted('VERSION', gst_version) - cdata.set_quoted('PACKAGE_VERSION', gst_version) - cdata.set_quoted('GST_LICENSE', 'LGPL') diff --git a/vcpkg/ports/gstreamer/fix-clang-cl-gstreamer.patch b/vcpkg/ports/gstreamer/fix-clang-cl-gstreamer.patch deleted file mode 100644 index a89167b30..000000000 --- a/vcpkg/ports/gstreamer/fix-clang-cl-gstreamer.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/subprojects/gstreamer/gst/parse/meson.build b/subprojects/gstreamer/gst/parse/meson.build -index b79a07c..891f907 100644 ---- a/subprojects/gstreamer/gst/parse/meson.build -+++ b/subprojects/gstreamer/gst/parse/meson.build -@@ -16,7 +16,7 @@ else - endif - - flex_cdata.set('FLEX', flex.full_path()) --if cc.get_id() == 'msvc' -+if cc.get_argument_syntax() == 'msvc' - flex_cdata.set('FLEX_ARGS', '--nounistd') - else - flex_cdata.set('FLEX_ARGS', '') -diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build -index 941bedc..cd37a40 100644 ---- a/subprojects/gstreamer/meson.build -+++ b/subprojects/gstreamer/meson.build -@@ -47,7 +47,7 @@ endif - - cdata = configuration_data() - --if cc.get_id() == 'msvc' -+if cc.get_argument_syntax() == 'msvc' - msvc_args = [ - # Ignore several spurious warnings for things gstreamer does very commonly - # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it -@@ -347,8 +347,10 @@ static __uint128_t v2 = 10; - static __uint128_t u; - u = v1 / v2; - }''' --if cc.compiles(uint128_t_src, name : '__uint128_t available') -- cdata.set('HAVE_UINT128_T', 1) -+if cc.get_argument_syntax() != 'msvc' -+ if cc.compiles(uint128_t_src, name : '__uint128_t available') -+ cdata.set('HAVE_UINT128_T', 1) -+ endif - endif - - # All supported platforms have long long now diff --git a/vcpkg/ports/gstreamer/fix-clang-cl-ugly.patch b/vcpkg/ports/gstreamer/fix-clang-cl-ugly.patch deleted file mode 100644 index 100b6a7b6..000000000 --- a/vcpkg/ports/gstreamer/fix-clang-cl-ugly.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/subprojects/gst-plugins-ugly/meson.build b/subprojects/gst-plugins-ugly/meson.build -index 14be48c4c..83d019874 100644 ---- a/subprojects/gst-plugins-ugly/meson.build -+++ b/subprojects/gst-plugins-ugly/meson.build -@@ -31,7 +31,7 @@ if have_cxx - cxx = meson.get_compiler('cpp') - endif - --if cc.get_id() == 'msvc' -+if cc.get_argument_syntax() == 'msvc' - msvc_args = [ - # Ignore several spurious warnings for things gstreamer does very commonly - # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it diff --git a/vcpkg/ports/gstreamer/fix-clang-cl.patch b/vcpkg/ports/gstreamer/fix-clang-cl.patch deleted file mode 100644 index ac00b9e13..000000000 --- a/vcpkg/ports/gstreamer/fix-clang-cl.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/meson.build b/meson.build -index 1316366ed..daeaf3cb1 100644 ---- a/meson.build -+++ b/meson.build -@@ -62,7 +62,7 @@ endif - # Ensure that MSVC interprets all source code as UTF-8. Only do this when we're - # not a subproject, because subprojects are not allowed to call - # add_global_arguments(). --if not meson.is_subproject() and cc.get_id() == 'msvc' -+if not meson.is_subproject() and cc.get_argument_syntax() == 'msvc' - add_global_arguments( - cc.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8 - language: ['c', 'cpp']) -@@ -316,7 +316,7 @@ if get_option('default_library') == 'static' - if cc.has_link_argument(link_arg) - gstfull_link_args += link_arg - link_deps += symbol_map -- elif cc.get_id() == 'msvc' -+ elif cc.get_argument_syntax() == 'msvc' - warning('FIXME: Provide a def file to publish the public symbols') - else - warning('FIXME: Linker does not support the supplied version script (' + symbol_map + '), please disable the "gst-full-version-script" option') diff --git a/vcpkg/ports/gstreamer/gstreamer-disable-no-unused.patch b/vcpkg/ports/gstreamer/gstreamer-disable-no-unused.patch deleted file mode 100644 index 971d80295..000000000 --- a/vcpkg/ports/gstreamer/gstreamer-disable-no-unused.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build -index bed8c4e..772809e 100644 ---- a/subprojects/gstreamer/meson.build -+++ b/subprojects/gstreamer/meson.build -@@ -435,8 +435,8 @@ if cc.has_header('execinfo.h') - endif - endif - - gst_debug = get_option('gst_debug') --if not gst_debug -+if not gst_debug and cc.has_argument('-Wno-unused') - add_project_arguments(['-Wno-unused'], language: 'c') - endif - diff --git a/vcpkg/ports/gstreamer/no-downloads.patch b/vcpkg/ports/gstreamer/no-downloads.patch deleted file mode 100644 index caf128021..000000000 --- a/vcpkg/ports/gstreamer/no-downloads.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/meson.build b/meson.build -index df015cb..93cf7e9 100644 ---- a/meson.build -+++ b/meson.build -@@ -105,12 +105,6 @@ subprojects = [ - ['gst-plugins-rs', { 'option': get_option('rs'), 'build-hotdoc': true, 'match_gst_version': false}], - ] - --if build_system == 'windows' -- subproject('win-flex-bison-binaries') -- subproject('win-nasm') --elif build_system == 'darwin' -- subproject('macos-bison-binary') --endif - - orc_option = get_option('orc') - # There is a check below to keep this in sync with subprojects/gst-plugins-base/meson.build diff --git a/vcpkg/ports/gstreamer/plugin-base-disable-no-unused.patch b/vcpkg/ports/gstreamer/plugin-base-disable-no-unused.patch deleted file mode 100644 index f8c249d96..000000000 --- a/vcpkg/ports/gstreamer/plugin-base-disable-no-unused.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/subprojects/gst-plugins-base/meson.build b/subprojects/gst-plugins-base/meson.build -index 9b00253..495671e 100644 ---- a/subprojects/gst-plugins-base/meson.build -+++ b/subprojects/gst-plugins-base/meson.build -@@ -388,10 +388,11 @@ int32x4_t testfunc(int16_t *a, int16_t *b) { - endif - endif - -+build_system = build_machine.system() - if gst_dep.type_name() == 'internal' - gst_proj = subproject('gstreamer') - -- if not gst_proj.get_variable('gst_debug') -+ if not gst_proj.get_variable('gst_debug') and build_system != 'windows' - message('GStreamer debug system is disabled') - add_project_arguments('-Wno-unused', language: 'c') - else -@@ -404,7 +405,7 @@ else - #include - #ifdef GST_DISABLE_GST_DEBUG - #error "debugging disabled, make compiler fail" --#endif''' , dependencies: gst_dep) -+#endif''' , dependencies: gst_dep) and build_system != 'windows' - message('GStreamer debug system is disabled') - add_project_arguments('-Wno-unused', language: 'c') - else diff --git a/vcpkg/ports/gstreamer/plugins-base-x11.patch b/vcpkg/ports/gstreamer/plugins-base-x11.patch deleted file mode 100644 index f42551948..000000000 --- a/vcpkg/ports/gstreamer/plugins-base-x11.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/subprojects/gst-plugins-base/meson.build b/subprojects/gst-plugins-base/meson.build -index 9b00253a0f..e3c3a0d920 100644 ---- a/subprojects/gst-plugins-base/meson.build -+++ b/subprojects/gst-plugins-base/meson.build -@@ -316,7 +316,7 @@ else - gtk_quartz_dep = dependency('', required : false) - endif - --core_conf.set('HAVE_X11', x11_dep.found()) -+core_conf.set('HAVE_X11', false) - core_conf.set('HAVE_GIO_UNIX_2_0', giounix_dep.found()) - - if gio_dep.type_name() == 'pkgconfig' diff --git a/vcpkg/ports/gstreamer/portfile.cmake b/vcpkg/ports/gstreamer/portfile.cmake deleted file mode 100644 index 1bebdb2b9..000000000 --- a/vcpkg/ports/gstreamer/portfile.cmake +++ /dev/null @@ -1,542 +0,0 @@ -if (VCPKG_TARGET_IS_WINDOWS) - set(PATCHES plugin-base-disable-no-unused.patch) -endif () - -vcpkg_from_gitlab( - GITLAB_URL - https://gitlab.freedesktop.org - OUT_SOURCE_PATH - SOURCE_PATH - REPO - gstreamer/gstreamer - REF - "${VERSION}" - SHA512 - 0d69896d0a83452320df0d0f56c710df1365a259cd3f48dc7cd4df18d45b27caea7174aafa15ae5eb8637ccdef192c1047185b369b7232db4eaacbc57ffaaa22 - HEAD_REF - main - PATCHES - fix-clang-cl.patch - fix-clang-cl-gstreamer.patch - fix-clang-cl-base.patch - fix-clang-cl-good.patch - fix-clang-cl-bad.patch - fix-clang-cl-ugly.patch - gstreamer-disable-no-unused.patch - srtp_fix.patch - fix-bz2-windows-debug-dependency.patch - base-must-be-enabled.patch - no-downloads.patch - ${PATCHES} -) - -vcpkg_find_acquire_program(FLEX) -vcpkg_find_acquire_program(BISON) -vcpkg_find_acquire_program(NASM) - -if (VCPKG_TARGET_IS_OSX) - # In Darwin platform, there can be an old version of `bison`, Which can't be used for - # `gst-build`. It requires 2.4+ - execute_process(COMMAND ${BISON} --version OUTPUT_VARIABLE BISON_OUTPUT) - string( - REGEX MATCH - "([0-9]+)\\.([0-9]+)\\.([0-9]+)" - BISON_VERSION - "${BISON_OUTPUT}" - ) - set(BISON_MAJOR ${CMAKE_MATCH_1}) - set(BISON_MINOR ${CMAKE_MATCH_2}) - message(STATUS "Using bison: ${BISON_MAJOR}.${BISON_MINOR}.${CMAKE_MATCH_3}") - if (NOT (BISON_MAJOR GREATER_EQUAL 2 AND BISON_MINOR GREATER_EQUAL 4)) - message( - WARNING - "'bison' upgrade is required. Please check the https://stackoverflow.com/a/35161881" - ) - endif () -endif () - -# General features -vcpkg_check_features( - OUT_FEATURE_OPTIONS - FEATURE_OPTIONS - FEATURES - gpl - gpl - libav - libav - nls - nls - ges - ges - plugins-base - base - gl-graphene - gst-plugins-base:gl-graphene - alsa - gst-plugins-base:alsa - ogg - gst-plugins-base:ogg - opus-base - gst-plugins-base:opus - pango - gst-plugins-base:pango - vorbis - gst-plugins-base:vorbis - x11-base - gst-plugins-base:x11 - x11-base - gst-plugins-base:xshm - plugins-good - good - bzip2-good - gst-plugins-good:bz2 - cairo - gst-plugins-good:cairo - flac - gst-plugins-good:flac - gdk-pixbuf - gst-plugins-good:gdk-pixbuf - jpeg - gst-plugins-good:jpeg - mpg123 - gst-plugins-good:mpg123 - png - gst-plugins-good:png - speex - gst-plugins-good:speex - taglib - gst-plugins-good:taglib - vpx - gst-plugins-good:vpx - plugins-ugly - ugly - x264 - gst-plugins-ugly:x264 - plugins-bad - bad - aes - gst-plugins-bad:aes - aom - gst-plugins-bad:aom - assrender - gst-plugins-bad:assrender - bzip2-bad - gst-plugins-bad:bz2 - chromaprint - gst-plugins-bad:chromaprint - closedcaption - gst-plugins-bad:closedcaption - colormanagement - gst-plugins-bad:colormanagement - dash - gst-plugins-bad:dash - dc1394 - gst-plugins-bad:dc1394 - dtls - gst-plugins-bad:dtls - faad - gst-plugins-bad:faad - fdkaac - gst-plugins-bad:fdkaac - fluidsynth - gst-plugins-bad:fluidsynth - libde265 - gst-plugins-bad:libde265 - microdns - gst-plugins-bad:microdns - modplug - gst-plugins-bad:modplug - nvcodec - gst-plugins-bad:nvcodec - openal - gst-plugins-bad:openal - openh264 - gst-plugins-bad:openh264 - openjpeg - gst-plugins-bad:openjpeg - openmpt - gst-plugins-bad:openmpt - opus-bad - gst-plugins-bad:opus - smoothstreaming - gst-plugins-bad:smoothstreaming - sndfile - gst-plugins-bad:sndfile - soundtouch - gst-plugins-bad:soundtouch - srt - gst-plugins-bad:srt - srtp - gst-plugins-bad:srtp - webp - gst-plugins-bad:webp - webrtc - gst-plugins-bad:webrtc - wildmidi - gst-plugins-bad:wildmidi - x11-bad - gst-plugins-bad:x11 - x265 - gst-plugins-bad:x265 - asio - gst-plugins-bad:asio -) - -string( - REPLACE "OFF" - "disabled" - FEATURE_OPTIONS - "${FEATURE_OPTIONS}" -) -string( - REPLACE "ON" - "enabled" - FEATURE_OPTIONS - "${FEATURE_OPTIONS}" -) - -if (VCPKG_TARGET_IS_WINDOWS) - set(PLUGIN_BASE_WINDOW_SYSTEM win32) - set(PLUGIN_BASE_GL_PLATFORM wgl) -else () - set(PLUGIN_BASE_WINDOW_SYSTEM auto) - set(PLUGIN_BASE_GL_PLATFORM auto) -endif () - -if ("asio" IN_LIST FEATURES) - set(PLUGIN_BAD_ASIO_SDK_PATH ${CURRENT_INSTALLED_DIR}/include/asiosdk) -else () - set(PLUGIN_BAD_ASIO_SDK_PATH "") -endif () - -# -# References -# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.20.4/subprojects/gstreamer/meson_options.txt -# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.20.4/subprojects/gst-plugins-base/meson_options.txt -# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.20.4/subprojects/gst-plugins-good/meson_options.txt -# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.20.4/subprojects/gst-plugins-ugly/meson_options.txt -# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.20.4/subprojects/gst-plugins-bad/meson_options.txt -# -# Rationale for added options Common options are added below systematically Feature -# options are added below only if the feature needs an external dependency Feature options -# that are dependent on the operating system type (like wasapi or osxaudio) are set to -# auto Every other feature options are made available if the dependency is available on -# vcpkg and if the plugin has managed to build during tests -# - -vcpkg_configure_meson( - SOURCE_PATH - "${SOURCE_PATH}" - OPTIONS - ${FEATURE_OPTIONS} - # General options - -Dpython=disabled - -Dlibnice=disabled - -Ddevtools=disabled - -Drtsp_server=disabled - -Domx=disabled - -Dvaapi=disabled - -Dsharp=disabled - -Drs=disabled - -Dgst-examples=disabled - -Dtls=disabled - -Dqt5=disabled - # Common options - -Dtests=disabled - -Dexamples=disabled - -Dintrospection=disabled - -Dorc=disabled # gstreamer requires a specific version of orc which is not available in - # vcpkg - -Ddoc=disabled - -Dgtk_doc=disabled - # gstreamer - -Dgstreamer:check=disabled - -Dgstreamer:libunwind=disabled - -Dgstreamer:libdw=disabled - -Dgstreamer:dbghelp=disabled - -Dgstreamer:bash-completion=disabled - -Dgstreamer:coretracers=disabled - -Dgstreamer:benchmarks=disabled - -Dgstreamer:gst_debug=true - # gst-plugins-base - -Dgst-plugins-base:gl_winsys=${PLUGIN_BASE_WINDOW_SYSTEM} - -Dgst-plugins-base:gl_platform=${PLUGIN_BASE_GL_PLATFORM} - -Dgst-plugins-base:cdparanoia=disabled - -Dgst-plugins-base:libvisual=disabled - -Dgst-plugins-base:theora=disabled - -Dgst-plugins-base:tremor=disabled - -Dgst-plugins-base:xvideo=disabled - # gst-plugins-good - -Dgst-plugins-good:aalib=disabled - -Dgst-plugins-good:directsound=auto - -Dgst-plugins-good:dv=disabled - -Dgst-plugins-good:dv1394=disabled - -Dgst-plugins-good:gtk3=disabled # GTK version 3 only - -Dgst-plugins-good:jack=disabled - -Dgst-plugins-good:lame=disabled - -Dgst-plugins-good:libcaca=disabled - -Dgst-plugins-good:oss=disabled - -Dgst-plugins-good:oss4=disabled - -Dgst-plugins-good:osxaudio=auto - -Dgst-plugins-good:osxvideo=auto - -Dgst-plugins-good:pulse=auto - -Dgst-plugins-good:qt5=disabled - -Dgst-plugins-good:shout2=disabled - # -Dgst-plugins-good:soup=disabled - -Dgst-plugins-good:twolame=disabled - -Dgst-plugins-good:waveform=auto - -Dgst-plugins-good:wavpack=disabled # Error during plugin build - # gst-plugins-ugly - -Dgst-plugins-ugly:a52dec=disabled - -Dgst-plugins-ugly:amrnb=disabled - -Dgst-plugins-ugly:amrwbdec=disabled - -Dgst-plugins-ugly:cdio=disabled - -Dgst-plugins-ugly:dvdread=disabled - -Dgst-plugins-ugly:mpeg2dec=disabled # libmpeg2 not found - -Dgst-plugins-ugly:sidplay=disabled - # gst-plugins-bad - -Dgst-plugins-bad:avtp=disabled - -Dgst-plugins-bad:androidmedia=auto - -Dgst-plugins-bad:applemedia=auto - -Dgst-plugins-bad:asio-sdk-path=${PLUGIN_BAD_ASIO_SDK_PATH} - -Dgst-plugins-bad:bluez=disabled - -Dgst-plugins-bad:bs2b=disabled - -Dgst-plugins-bad:curl=disabled # Error during plugin build - -Dgst-plugins-bad:curl-ssh2=disabled - -Dgst-plugins-bad:d3dvideosink=auto - -Dgst-plugins-bad:d3d11=auto - -Dgst-plugins-bad:decklink=disabled - -Dgst-plugins-bad:directfb=disabled - -Dgst-plugins-bad:directsound=auto - -Dgst-plugins-bad:dts=disabled - -Dgst-plugins-bad:dvb=auto - -Dgst-plugins-bad:faac=disabled - -Dgst-plugins-bad:fbdev=auto - -Dgst-plugins-bad:flite=disabled - -Dgst-plugins-bad:gl=auto - -Dgst-plugins-bad:gme=disabled - -Dgst-plugins-bad:gs=disabled # Error during plugin configuration (abseil pkg-config - # file missing) - -Dgst-plugins-bad:gsm=disabled - -Dgst-plugins-bad:ipcpipeline=auto - -Dgst-plugins-bad:iqa=disabled - -Dgst-plugins-bad:kate=disabled - -Dgst-plugins-bad:kms=disabled - -Dgst-plugins-bad:ladspa=disabled - -Dgst-plugins-bad:ldac=disabled - -Dgst-plugins-bad:lv2=disabled # Error during plugin configuration (lilv pkg-config file - # missing) - -Dgst-plugins-bad:mediafoundation=auto - -Dgst-plugins-bad:mpeg2enc=disabled - -Dgst-plugins-bad:mplex=disabled - -Dgst-plugins-bad:msdk=disabled - -Dgst-plugins-bad:musepack=disabled - -Dgst-plugins-bad:neon=disabled - -Dgst-plugins-bad:onnx=disabled # libonnxruntime not found - -Dgst-plugins-bad:openaptx=disabled - -Dgst-plugins-bad:opencv=disabled # opencv not found - -Dgst-plugins-bad:openexr=disabled # OpenEXR::IlmImf target not found - -Dgst-plugins-bad:openni2=disabled # libopenni2 not found - -Dgst-plugins-bad:opensles=disabled - -Dgst-plugins-bad:qroverlay=disabled - -Dgst-plugins-bad:resindvd=disabled - -Dgst-plugins-bad:rsvg=disabled # librsvg-2.0 not found - -Dgst-plugins-bad:rtmp=disabled # librtmp not found - -Dgst-plugins-bad:sbc=disabled - -Dgst-plugins-bad:sctp=auto - -Dgst-plugins-bad:shm=disabled - -Dgst-plugins-bad:spandsp=disabled - -Dgst-plugins-bad:svthevcenc=disabled - -Dgst-plugins-bad:teletext=disabled - -Dgst-plugins-bad:tinyalsa=disabled - -Dgst-plugins-bad:transcode=disabled - -Dgst-plugins-bad:ttml=disabled - -Dgst-plugins-bad:uvch264=disabled - -Dgst-plugins-bad:va=disabled - -Dgst-plugins-bad:voaacenc=disabled - -Dgst-plugins-bad:voamrwbenc=disabled - -Dgst-plugins-bad:vulkan=auto - -Dgst-plugins-bad:wasapi=auto - -Dgst-plugins-bad:wasapi2=auto - -Dgst-plugins-bad:wayland=auto - -Dgst-plugins-bad:winks=disabled - -Dgst-plugins-bad:winscreencap=auto - -Dgst-plugins-bad:zbar=disabled # Error during plugin build - -Dgst-plugins-bad:zxing=disabled # Error during plugin build - -Dgst-plugins-bad:wpe=disabled - -Dgst-plugins-bad:magicleap=disabled - -Dgst-plugins-bad:v4l2codecs=disabled - -Dgst-plugins-bad:isac=disabled - OPTIONS_RELEASE - -Dgobject-cast-checks=disabled - -Dglib-asserts=disabled - -Dglib-checks=disabled - -Dgstreamer:extra-checks=disabled - ADDITIONAL_BINARIES - flex='${FLEX}' - bison='${BISON}' - nasm='${NASM}' - glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' - glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' -) - -vcpkg_install_meson() - -# Remove duplicated GL headers (we already have `opengl-registry`) -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/KHR" - "${CURRENT_PACKAGES_DIR}/include/GL" -) - -if (NOT VCPKG_TARGET_IS_LINUX AND "plugins-base" IN_LIST FEATURES) - file(RENAME "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/include/gst/gl/gstglconfig.h" - "${CURRENT_PACKAGES_DIR}/include/gstreamer-1.0/gst/gl/gstglconfig.h" - ) -endif () - -list( - APPEND - GST_BIN_TOOLS - gst-inspect-1.0 - gst-launch-1.0 - gst-stats-1.0 - gst-typefind-1.0 -) -list(APPEND GST_LIBEXEC_TOOLS gst-plugin-scanner) - -if ("ges" IN_LIST FEATURES) - list(APPEND GST_BIN_TOOLS ges-launch-1.0) -endif () - -if ("plugins-base" IN_LIST FEATURES) - list( - APPEND - GST_BIN_TOOLS - gst-device-monitor-1.0 - gst-discoverer-1.0 - gst-play-1.0 - ) -endif () - -if ("plugins-bad" IN_LIST FEATURES) - list(APPEND GST_BIN_TOOLS gst-transcoder-1.0) -endif () - -vcpkg_copy_tools(TOOL_NAMES ${GST_BIN_TOOLS} AUTO_CLEAN) - -vcpkg_copy_tools( - TOOL_NAMES - ${GST_LIBEXEC_TOOLS} - SEARCH_DIR - "${CURRENT_PACKAGES_DIR}/libexec/gstreamer-1.0" - AUTO_CLEAN -) - -file( - REMOVE_RECURSE - "${CURRENT_PACKAGES_DIR}/debug/share" - "${CURRENT_PACKAGES_DIR}/debug/libexec" - "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/include" - "${CURRENT_PACKAGES_DIR}/libexec" - "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/include" - "${CURRENT_PACKAGES_DIR}/share/gdb" -) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - # Move plugin pkg-config files - file(GLOB pc_files "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/pkgconfig/*") - file(COPY ${pc_files} DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") - file(GLOB pc_files_dbg "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/pkgconfig/*") - file(COPY ${pc_files_dbg} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/pkgconfig/" - "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/pkgconfig/" - ) - - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin") - set(PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}") - set(SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}") - file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/${PREFIX}gstreamer-full-1.0${SUFFIX}" - "${CURRENT_PACKAGES_DIR}/lib/${PREFIX}gstreamer-full-1.0${SUFFIX}" - ) - vcpkg_replace_string( - "${CURRENT_PACKAGES_DIR}/include/gstreamer-1.0/gst/gstconfig.h" - "!defined(GST_STATIC_COMPILATION)" "0" - ) -endif () - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - # move plugins to ${prefix}/plugins/${PORT} instead of ${prefix}/lib/gstreamer-1.0 - if (NOT VCPKG_BUILD_TYPE) - file( - GLOB - DBG_BINS - "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/*.pdb" - ) - file(COPY ${DBG_BINS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/plugins/${PORT}") - endif () - file( - GLOB - REL_BINS - "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/*.pdb" - ) - file(COPY ${REL_BINS} DESTINATION "${CURRENT_PACKAGES_DIR}/plugins/${PORT}") - file(REMOVE ${DBG_BINS} ${REL_BINS}) - if (NOT VCPKG_TARGET_IS_WINDOWS) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0" - "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0" - ) - endif () - - set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gstreamer-1.0.pc") - if (EXISTS "${_file}") - file(READ "${_file}" _contents) - string( - REPLACE [[toolsdir=${exec_prefix}/bin]] - "toolsdir=\${prefix}/../tools/${PORT}" - _contents - "${_contents}" - ) - string( - REPLACE [[pluginscannerdir=${libexecdir}/gstreamer-1.0]] - "pluginscannerdir=\${prefix}/../tools/${PORT}" - _contents - "${_contents}" - ) - string( - REPLACE [[pluginsdir=${libdir}/gstreamer-1.0]] - "pluginsdir=\${prefix}/plugins/${PORT}" - _contents - "${_contents}" - ) - file(WRITE "${_file}" "${_contents}") - endif () - - set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gstreamer-1.0.pc") - if (EXISTS "${_file}") - file(READ "${_file}" _contents) - string( - REPLACE [[toolsdir=${exec_prefix}/bin]] - "toolsdir=\${prefix}/tools/${PORT}" - _contents - "${_contents}" - ) - string( - REPLACE [[pluginscannerdir=${libexecdir}/gstreamer-1.0]] - "pluginscannerdir=\${prefix}/tools/${PORT}" - _contents - "${_contents}" - ) - string( - REPLACE [[pluginsdir=${libdir}/gstreamer-1.0]] - "pluginsdir=\${prefix}/plugins/${PORT}" - _contents - "${_contents}" - ) - file(WRITE "${_file}" "${_contents}") - endif () -endif () - -vcpkg_fixup_pkgconfig() - -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/vcpkg/ports/gstreamer/remove_x264_define.patch b/vcpkg/ports/gstreamer/remove_x264_define.patch deleted file mode 100644 index 044fb926b..000000000 --- a/vcpkg/ports/gstreamer/remove_x264_define.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/ext/x264/gstx264enc.h b/ext/x264/gstx264enc.h -index 6cbfc5c3d..ba7845b20 100644 ---- a/ext/x264/gstx264enc.h -+++ b/ext/x264/gstx264enc.h -@@ -31,13 +31,6 @@ - #include - #endif - --/* The x264.h header says this isn't needed with MinGW, but sometimes the -- * compiler is unable to correctly do the pointer indirection for us, which -- * leads to a segfault when you try to dereference any const values provided -- * by x264.dll. See: https://bugzilla.gnome.org/show_bug.cgi?id=779249 */ --#if defined(_WIN32) && !defined(X264_API_IMPORTS) --# define X264_API_IMPORTS --#endif - #include - - G_BEGIN_DECLS diff --git a/vcpkg/ports/gstreamer/srtp_fix.patch b/vcpkg/ports/gstreamer/srtp_fix.patch deleted file mode 100644 index ed4601d45..000000000 --- a/vcpkg/ports/gstreamer/srtp_fix.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/subprojects/gst-plugins-bad/ext/srtp/meson.build b/subprojects/gst-plugins-bad/ext/srtp/meson.build -index 49eed5b..db5aed0 100644 ---- a/subprojects/gst-plugins-bad/ext/srtp/meson.build -+++ b/subprojects/gst-plugins-bad/ext/srtp/meson.build -@@ -6,13 +6,15 @@ srtp_sources = [ - 'gstsrtpenc.c', - ] - -+gst_plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') -+ - srtp_cargs = [] - if get_option('srtp').disabled() - srtp_dep = dependency('', required : false) - subdir_done() - endif - --srtp_dep = dependency('libsrtp2', version : '>= 2.1.0', required : false) -+srtp_dep = dependency('libSRTP', modules: ['libSRTP::srtp2'], version : '>= 2.1.0', required : false) - if srtp_dep.found() - srtp_cargs += ['-DHAVE_SRTP2'] - else -@@ -38,7 +40,7 @@ if srtp_dep.found() - include_directories : [configinc], - dependencies : [gstrtp_dep, gstvideo_dep, srtp_dep], - install : true, -- install_dir : plugins_install_dir, -+ install_dir : gst_plugins_install_dir, - ) - plugins += [gstsrtp] - endif diff --git a/vcpkg/ports/gstreamer/vcpkg.json b/vcpkg/ports/gstreamer/vcpkg.json deleted file mode 100644 index af363911b..000000000 --- a/vcpkg/ports/gstreamer/vcpkg.json +++ /dev/null @@ -1,841 +0,0 @@ -{ - "name": "gstreamer", - "version": "1.22.5", - "port-version": 8, - "description": "GStreamer open-source multimedia framework core library", - "homepage": "https://gstreamer.freedesktop.org/", - "license": "LGPL-2.0-only", - "supports": "!uwp & !xbox", - "dependencies": [ - "glib", - { - "name": "glib", - "host": true - }, - { - "name": "opengl", - "platform": "windows | osx" - }, - { - "name": "vcpkg-tool-meson", - "host": true - } - ], - "default-features": [ - "plugins-base" - ], - "features": { - "aes": { - "description": "Enable support for AES encryption/decryption", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "openssl" - ] - }, - "alsa": { - "description": "Enable support for ALSA (Advanced Linux Sound Architecture)", - "supports": "linux", - "dependencies": [ - { - "name": "alsa", - "platform": "linux" - }, - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - } - ] - }, - "aom": { - "description": "Enable support for the Alliance for Open Media (AOM) AV1 encoder and decoder", - "supports": "!windows", - "dependencies": [ - "aom", - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - } - ] - }, - "asio": { - "description": "Enable support for the Steinberg Audio Streaming Input Output (ASIO) library (Windows only)", - "dependencies": [ - { - "name": "asiosdk", - "platform": "windows" - }, - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - } - ] - }, - "assrender": { - "description": "Enable support for the ASS/SSA subtitle renderer", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libass" - ] - }, - "bzip2-bad": { - "description": "Enable bzip2 stream compression in bad plugins", - "dependencies": [ - "bzip2", - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - } - ] - }, - "bzip2-good": { - "description": "Enable bzip2 stream compression in good plugins", - "dependencies": [ - "bzip2", - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-good" - ] - } - ] - }, - "cairo": { - "description": "Enable support for the cairo graphics library", - "dependencies": [ - { - "name": "cairo", - "features": [ - "gobject" - ] - }, - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-good" - ] - } - ] - }, - "chromaprint": { - "description": "Enable support for the Chromaprint audio fingerprint library", - "dependencies": [ - "chromaprint", - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - } - ] - }, - "closedcaption": { - "description": "Enable support for the closed caption extractor, decoder, and overlay", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "pango" - ] - }, - "colormanagement": { - "description": "Enable support for the color management correction", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "lcms" - ] - }, - "dash": { - "description": "Enable support for the DASH demuxer", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libxml2" - ] - }, - "dc1394": { - "description": "Enable support for the libdc1394 IIDC camera source", - "supports": "!windows", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libdc1394" - ] - }, - "dtls": { - "description": "Enable support for the DTLS encoder and decoder", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "openssl" - ] - }, - "faad": { - "description": "Enable support for the free AAC audio decoder (GPL licensed)", - "dependencies": [ - "faad2", - { - "name": "gstreamer", - "default-features": false, - "features": [ - "gpl", - "plugins-bad" - ] - } - ] - }, - "fdkaac": { - "description": "Enable support for the Fraunhofer AAC audio codec", - "dependencies": [ - "fdk-aac", - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - } - ] - }, - "flac": { - "description": "Enable support for FLAC: Free Lossless Audio Codec", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "ogg", - "plugins-good" - ] - }, - "libflac" - ] - }, - "fluidsynth": { - "description": "Enable support for the Fluidsynth MIDI decoder", - "supports": "!windows", - "dependencies": [ - { - "name": "fluidsynth", - "platform": "!windows" - }, - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - } - ] - }, - "gdk-pixbuf": { - "description": "Enable support for gdk-pixbuf image loader", - "dependencies": [ - "gdk-pixbuf", - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-good" - ] - } - ] - }, - "ges": { - "description": "Enable support for GStreamer Editing Services", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - } - ] - }, - "gl-graphene": { - "description": "Use Graphene in OpenGL plugin", - "dependencies": [ - "graphene", - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - } - ] - }, - "gpl": { - "description": "Allow build of plugins that have (A)GPL-licensed dependencies", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - } - ] - }, - "jpeg": { - "description": "Enable support for the JPEG file format", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base", - "plugins-good" - ] - }, - "libjpeg-turbo" - ] - }, - "libav": { - "description": "libav plugins", - "dependencies": [ - { - "name": "ffmpeg", - "default-features": false - }, - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - } - ] - }, - "libde265": { - "description": "Enable support for the HEVC/H.265 video decoder", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libde265" - ] - }, - "microdns": { - "description": "Enable support for the microdns device provider", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libmicrodns" - ] - }, - "modplug": { - "description": "Enable support for the ModPlug audio decoder", - "supports": "!uwp", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - { - "name": "libmodplug", - "platform": "!uwp" - } - ] - }, - "mpg123": { - "description": "Enable support for the MPG123 decoding library", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-good" - ] - }, - "mpg123" - ] - }, - "nls": { - "description": "National language support", - "dependencies": [ - "gettext", - { - "name": "gettext", - "host": true, - "default-features": false, - "features": [ - "tools" - ] - }, - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - } - ] - }, - "nvcodec": { - "description": "Enable support for the NVCODEC encoders and decoders", - "supports": "!osx & !ios & !android & !emscripten", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - } - ] - }, - "ogg": { - "description": "Enable support for the Ogg container format (commonly used by Vorbis, Theora and flac)", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - }, - "libogg" - ] - }, - "openal": { - "description": "Enable support for the OpenAL audio library", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "openal-soft" - ] - }, - "openh264": { - "description": "Enable support for the OpenH264 codec", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "openh264" - ] - }, - "openjpeg": { - "description": "Enable support for the JPEG2000 codec", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "openjpeg" - ] - }, - "openmpt": { - "description": "Enable support for the OpenMPT codec", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libopenmpt" - ] - }, - "opus-bad": { - "description": "Enable support for the Opus codec in bad plugins", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "opus" - ] - }, - "opus-base": { - "description": "Enable support for the Opus codec in base plugins", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - }, - "opus" - ] - }, - "pango": { - "description": "Enable support for pango font rendering", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - }, - "pango" - ] - }, - "plugins-bad": { - "description": "'Bad' GStreamer plugins and helper libraries", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - } - ] - }, - "plugins-base": { - "description": "'Base' GStreamer plugins and helper libraries", - "dependencies": [ - "zlib" - ] - }, - "plugins-good": { - "description": "'Good' GStreamer plugins and helper libraries", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - }, - "zlib" - ] - }, - "plugins-ugly": { - "description": "'Ugly' GStreamer plugins and helper libraries", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - } - ] - }, - "png": { - "description": "Enable support for the PNG image format", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-good" - ] - }, - "libpng" - ] - }, - "smoothstreaming": { - "description": "Enable support for the Microsoft Smooth Streaming format", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libxml2" - ] - }, - "sndfile": { - "description": "Enable support for the SndFile file reader/writer", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libsndfile" - ] - }, - "soundtouch": { - "description": "Enable support for the SoundTouch audio processing library", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "soundtouch" - ] - }, - "soup": { - "description": "Enable support for the soup plugin", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-good" - ] - }, - "libsoup" - ] - }, - "speex": { - "description": "Enable support for the speex codec", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-good" - ] - }, - "speex" - ] - }, - "srt": { - "description": "Enable support for the SRT protocol", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libsrt" - ] - }, - "srtp": { - "description": "Enable support for the SRTP protocol", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libsrtp" - ] - }, - "taglib": { - "description": "Enable support for the taglib library", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-good" - ] - }, - "taglib" - ] - }, - "vorbis": { - "description": "Enable support for the OggVorbis audio codec", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "ogg", - "plugins-base" - ] - }, - "libvorbis" - ] - }, - "vpx": { - "description": "Enable support for the VP8 and VP9 codecs", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-good" - ] - }, - "libvpx" - ] - }, - "webp": { - "description": "Enable support for WebP image format", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libwebp" - ] - }, - "webrtc": { - "description": "Enable support for WebRTC", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libnice" - ] - }, - "wildmidi": { - "description": "Enable support for the WildMIDI synthesizer", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "wildmidi" - ] - }, - "x11-bad": { - "description": "Enable support for X11 in bad plugins", - "supports": "!windows", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-bad" - ] - }, - "libxkbcommon", - "xcb" - ] - }, - "x11-base": { - "description": "Enable support for X11 in base plugins", - "supports": "!windows", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-good" - ] - }, - "libx11", - "libxext" - ] - }, - "x264": { - "description": "Enable support for the x264 encoder (GPL license)", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "gpl", - "plugins-ugly" - ] - }, - "x264" - ] - }, - "x265": { - "description": "Enable support for the x265 encoder (GPL license)", - "dependencies": [ - { - "name": "gstreamer", - "default-features": false, - "features": [ - "gpl", - "plugins-bad" - ] - }, - "x265" - ] - } - } -} diff --git a/vcpkg/ports/libb2/README b/vcpkg/ports/libb2/README deleted file mode 100644 index 4dfe72179..000000000 --- a/vcpkg/ports/libb2/README +++ /dev/null @@ -1 +0,0 @@ -https://github.com/microsoft/vcpkg/issues/43326 \ No newline at end of file diff --git a/vcpkg/ports/libb2/portfile.cmake b/vcpkg/ports/libb2/portfile.cmake deleted file mode 100644 index 012f9360a..000000000 --- a/vcpkg/ports/libb2/portfile.cmake +++ /dev/null @@ -1,39 +0,0 @@ -vcpkg_from_github( - OUT_SOURCE_PATH - SOURCE_PATH - REPO - BLAKE2/libb2 - REF - 2c5142f12a2cd52f3ee0a43e50a3a76f75badf85 - SHA512 - cf29cf9391ae37a978eb6618de6f856f3defa622b8f56c2d5a519ab34fd5e4d91f3bb868601a44e9c9164a2992e80dde188ccc4d1605dffbdf93687336226f8d - HEAD_REF - master -) - -set(OPTIONS) -if (CMAKE_HOST_WIN32) - set(OPTIONS --disable-native) # requires cpuid -endif () - -vcpkg_configure_make( - AUTOCONFIG - SOURCE_PATH - ${SOURCE_PATH} - OPTIONS - ax_cv_check_cflags___O3=no # see - # https://github.com/microsoft/vcpkg/pull/17912#issuecomment-840514179 - ${OPTIONS} -) -vcpkg_install_make() -vcpkg_fixup_pkgconfig() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -vcpkg_copy_pdbs() - -file( - INSTALL ${SOURCE_PATH}/COPYING - DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} - RENAME copyright -) diff --git a/vcpkg/ports/libb2/vcpkg.json b/vcpkg/ports/libb2/vcpkg.json deleted file mode 100644 index e8ef8ec05..000000000 --- a/vcpkg/ports/libb2/vcpkg.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "libb2", - "version": "0.98.1", - "port-version": 6, - "description": "C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp", - "homepage": "https://github.com/BLAKE2/libb2", - "supports": "!windows" -} diff --git a/vcpkg/ports/libpq/ios-detection.patch b/vcpkg/ports/libpq/ios-detection.patch new file mode 100644 index 000000000..71e5d5dcb --- /dev/null +++ b/vcpkg/ports/libpq/ios-detection.patch @@ -0,0 +1,14 @@ +diff --git a/meson.build b/meson.build +index 34456b36bbf..ed64e289512 100644 +--- a/meson.build ++++ b/meson.build +@@ -189,6 +189,9 @@ elif host_system == 'android' + # while android isn't quite a normal linux, it seems close enough + # for our purposes so far + host_system = 'linux' ++elif host_system == 'ios' ++ # map iOS as darwin ++ host_system = 'darwin' + endif + + # meson's system names don't quite map to our "traditional" names. In some diff --git a/vcpkg/ports/libpq/ios-system-unavailable.patch b/vcpkg/ports/libpq/ios-system-unavailable.patch new file mode 100644 index 000000000..222c46456 --- /dev/null +++ b/vcpkg/ports/libpq/ios-system-unavailable.patch @@ -0,0 +1,17 @@ +diff --git a/src/fe_utils/archive.c b/src/fe_utils/archive.c +index 5de3617cb29..5be21760ef2 100644 +--- a/src/fe_utils/archive.c ++++ b/src/fe_utils/archive.c +@@ -54,7 +54,12 @@ RestoreArchivedFile(const char *path, const char *xlogfname, + * archival storage. + */ + fflush(NULL); ++#if defined(__APPLE__) && defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) ++ /* system() is not available on iOS */ ++ rc = -1; ++#else + rc = system(xlogRestoreCmd); ++#endif + pfree(xlogRestoreCmd); + + if (rc == 0) diff --git a/vcpkg/ports/libpq/libintl.diff b/vcpkg/ports/libpq/libintl.diff new file mode 100644 index 000000000..a5d116731 --- /dev/null +++ b/vcpkg/ports/libpq/libintl.diff @@ -0,0 +1,17 @@ +diff --git a/meson.build b/meson.build +index dd7ca47..8e0964a 100644 +--- a/meson.build ++++ b/meson.build +@@ -3023,6 +3023,12 @@ if not nlsopt.disabled() + endif + + if libintl.found() ++ if build_system == 'windows' ++ iconv_dep = cc.find_library('iconv', required: false, dirs: test_lib_d) ++ if iconv_dep.found() ++ libintl = declare_dependency(dependencies: [libintl, iconv_dep]) ++ endif ++ endif + i18n = import('i18n') + cdata.set('ENABLE_NLS', 1) + endif diff --git a/vcpkg/ports/libpq/libpq-and-client-tools.diff b/vcpkg/ports/libpq/libpq-and-client-tools.diff new file mode 100644 index 000000000..2f0cddb90 --- /dev/null +++ b/vcpkg/ports/libpq/libpq-and-client-tools.diff @@ -0,0 +1,127 @@ +diff --git a/config/meson.build b/config/meson.build +index ab19c38..b6203b5 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -1,3 +1,4 @@ ++subdir_done() + install_data( + 'install-sh', 'missing', + install_dir: dir_pgxs / 'config' +diff --git a/meson.build b/meson.build +index 4016033..dd7ca47 100644 +--- a/meson.build ++++ b/meson.build +@@ -3381,6 +3381,10 @@ test_install_libs = [] + + subdir('src') + ++contrib_data_dir = dir_data_extension ++ ++if false # skip for vcpkg port ++ + subdir('contrib') + + subdir('src/test') +@@ -3924,6 +3928,7 @@ if not meson.is_subproject() + endif + endif + ++endif # skip for vcpkg port libpq + + + ############################################################### +diff --git a/meson_options.txt b/meson_options.txt +index 06bf562..5505bfd 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,3 +1,6 @@ ++option('tools', type: 'feature', value: 'disabled', ++ description: 'Enable tool executables') ++ + # Copyright (c) 2022-2025, PostgreSQL Global Development Group + + # Data layout influencing options +diff --git a/src/backend/meson.build b/src/backend/meson.build +index 2b0db21..75d8f68 100644 +--- a/src/backend/meson.build ++++ b/src/backend/meson.build +@@ -40,6 +40,8 @@ subdir('po', if_found: libintl) + backend_link_args = [] + backend_link_depends = [] + ++subdir_done() ++if false # skip for vcpkg port + + # On windows when compiling with msvc we need to make postgres export all its + # symbols so that extension libraries can use them. For that we need to scan +@@ -140,6 +142,8 @@ postgres = executable('postgres', + + backend_targets += postgres + ++endif # skip for vcpkg port ++ + pg_mod_c_args = cflags_mod + pg_mod_cpp_args = cxxflags_mod + pg_mod_link_args = ldflags_sl + ldflags_mod +@@ -187,6 +191,7 @@ pg_test_mod_args = pg_mod_args + { + } + + ++subdir_done() + + # Shared modules that, on some system, link against the server binary. Only + # enter these after we defined the server build. +diff --git a/src/bin/meson.build b/src/bin/meson.build +index b33cb6c..b08941f 100644 +--- a/src/bin/meson.build ++++ b/src/bin/meson.build +@@ -1,24 +1,13 @@ + # Copyright (c) 2022-2025, PostgreSQL Global Development Group + +-subdir('initdb') ++# vcpkg: Reduced to documented "Client applications" (and scripts) ++# Cf. https://www.postgresql.org/docs/current/reference-client.html + subdir('pg_amcheck') +-subdir('pg_archivecleanup') + subdir('pg_basebackup') +-subdir('pg_checksums') + subdir('pg_combinebackup') + subdir('pg_config') +-subdir('pg_controldata') +-subdir('pg_ctl') + subdir('pg_dump') +-subdir('pg_resetwal') +-subdir('pg_rewind') +-subdir('pg_test_fsync') +-subdir('pg_test_timing') +-subdir('pg_upgrade') + subdir('pg_verifybackup') +-subdir('pg_waldump') +-subdir('pg_walsummary') + subdir('pgbench') +-subdir('pgevent') + subdir('psql') + subdir('scripts') +diff --git a/src/meson.build b/src/meson.build +index f098f9f..28eb09c 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -3,12 +3,18 @@ + # libraries that other subsystems might depend upon first, in their respective + # dependency order + ++subdir('interfaces') ++if not get_option('tools').disabled() ++ + subdir('timezone') + + subdir('backend') + + subdir('bin') + ++endif ++subdir_done() ++ + subdir('pl') + + subdir('interfaces') diff --git a/vcpkg/ports/libpq/library-linkage.diff b/vcpkg/ports/libpq/library-linkage.diff new file mode 100644 index 000000000..6c3c260d3 --- /dev/null +++ b/vcpkg/ports/libpq/library-linkage.diff @@ -0,0 +1,241 @@ +diff --git a/meson.build b/meson.build +index 6e1c867..4016033 100644 +--- a/meson.build ++++ b/meson.build +@@ -3293,6 +3293,12 @@ frontend_shlib_code = declare_dependency( + dependencies: [shlib_code, os_deps, libintl], + ) + ++if get_option('default_library') == 'shared' ++ frontend_lib_code = frontend_shlib_code ++else ++ frontend_lib_code = frontend_stlib_code ++endif ++ + # For frontend code that doesn't use fe_utils - this mainly exists for libpq's + # tests, which are defined before fe_utils is defined, as fe_utils depends on + # libpq. +@@ -3326,7 +3332,7 @@ subdir('src/interfaces/libpq-oauth') + # for frontend binaries + frontend_code = declare_dependency( + include_directories: [postgres_inc], +- link_with: [fe_utils, common_static, pgport_static], ++ link_with: [fe_utils, common_default, pgport_default], + sources: generated_headers, + dependencies: [os_deps, libintl], + ) +diff --git a/src/bin/initdb/meson.build b/src/bin/initdb/meson.build +index 06958e3..a25abd1 100644 +--- a/src/bin/initdb/meson.build ++++ b/src/bin/initdb/meson.build +@@ -20,7 +20,7 @@ initdb = executable('initdb', + # from libpq, else we have risks of version skew if we run with a libpq + # shared library from a different PG version. Define + # USE_PRIVATE_ENCODING_FUNCS to ensure that that happens. +- c_args: ['-DUSE_PRIVATE_ENCODING_FUNCS'], ++ # But vcpkg cannot build the libs with this definition. + dependencies: [frontend_code, libpq, icu, icu_i18n], + kwargs: default_bin_args, + ) +diff --git a/src/bin/pg_combinebackup/meson.build b/src/bin/pg_combinebackup/meson.build +index bbc4c57..9ea8597 100644 +--- a/src/bin/pg_combinebackup/meson.build ++++ b/src/bin/pg_combinebackup/meson.build +@@ -17,7 +17,7 @@ endif + + pg_combinebackup = executable('pg_combinebackup', + pg_combinebackup_sources, +- dependencies: [frontend_code], ++ dependencies: [frontend_code, libpq], + kwargs: default_bin_args, + ) + bin_targets += pg_combinebackup +diff --git a/src/common/meson.build b/src/common/meson.build +index 1540ba6..e29d594 100644 +--- a/src/common/meson.build ++++ b/src/common/meson.build +@@ -114,6 +114,8 @@ common_sources_frontend_shlib += files( + ) + + common_sources_excluded_shlib = files( ++) ++common_sources_frontend_shlib += files( + 'fe_memutils.c', + 'logging.c', + ) +@@ -144,7 +146,7 @@ pgcommon_variants = { + 'dependencies': [frontend_common_code], + # Files in libpgcommon.a should use/export the "xxx_private" versions + # of pg_char_to_encoding() and friends. +- 'c_args': ['-DUSE_PRIVATE_ENCODING_FUNCS'], ++ # But vcpkg's static library linkage must not add the private suffix + }, + '_shlib': default_lib_args + { + 'pic': true, +@@ -159,6 +161,19 @@ pgcommon_variants = { + + foreach name, opts : pgcommon_variants + ++ if name == '_srv' ++ pgcommon += {name: disabler()} ++ continue ++ endif ++ if name == '' and get_option('default_library') == 'shared' ++ pgcommon += {name: disabler()} ++ continue ++ endif ++ if name == '_shlib' and get_option('default_library') == 'static' ++ pgcommon += {name: disabler()} ++ continue ++ endif ++ + # Build internal static libraries for sets of files that need to be built + # with different cflags + cflag_libs = [] +@@ -195,6 +210,7 @@ foreach name, opts : pgcommon_variants + } + ) + pgcommon += {name: lib} ++ common_default = lib + endforeach + + common_srv = pgcommon['_srv'] +diff --git a/src/interfaces/ecpg/compatlib/meson.build b/src/interfaces/ecpg/compatlib/meson.build +index 56e0a21..e3c8675 100644 +--- a/src/interfaces/ecpg/compatlib/meson.build ++++ b/src/interfaces/ecpg/compatlib/meson.build +@@ -41,11 +41,17 @@ ecpg_compat_so = shared_library('libecpg_compat', + ) + ecpg_targets += ecpg_compat_so + ++if get_option('default_library') == 'shared' ++ ecpg_compat_libraries = ecpg_compat_so ++else ++ ecpg_compat_libraries = ecpg_compat_st ++endif ++ + pkgconfig.generate( + name: 'libecpg_compat', + description: 'PostgreSQL libecpg_compat library', + url: pg_url, +- libraries: ecpg_compat_so, +- libraries_private: [frontend_stlib_code, thread_dep], ++ libraries: ecpg_compat_libraries, ++ libraries_private: [frontend_lib_code, thread_dep], + requires_private: ['libecpg', 'libpgtypes'], + ) +diff --git a/src/interfaces/ecpg/ecpglib/meson.build b/src/interfaces/ecpg/ecpglib/meson.build +index 8f478c6..fbae057 100644 +--- a/src/interfaces/ecpg/ecpglib/meson.build ++++ b/src/interfaces/ecpg/ecpglib/meson.build +@@ -52,12 +52,18 @@ ecpglib_so = shared_library('libecpg', + ) + ecpg_targets += ecpglib_so + ++if get_option('default_library') == 'shared' ++ ecpglib_libraries = ecpglib_so ++else ++ ecpglib_libraries = ecpglib_st ++endif ++ + pkgconfig.generate( + name: 'libecpg', + description: 'PostgreSQL libecpg library', + url: pg_url, +- libraries: ecpglib_so, +- libraries_private: [frontend_stlib_code, thread_dep], ++ libraries: ecpglib_libraries, ++ libraries_private: [frontend_lib_code, thread_dep], + requires_private: ['libpgtypes', 'libpq'], + ) + +diff --git a/src/interfaces/ecpg/pgtypeslib/meson.build b/src/interfaces/ecpg/pgtypeslib/meson.build +index 02301ec..e695b98 100644 +--- a/src/interfaces/ecpg/pgtypeslib/meson.build ++++ b/src/interfaces/ecpg/pgtypeslib/meson.build +@@ -46,10 +46,16 @@ ecpg_pgtypes_so = shared_library('libpgtypes', + ) + ecpg_targets += ecpg_pgtypes_so + ++if get_option('default_library') == 'shared' ++ ecpg_pgtypes_libraries = ecpg_pgtypes_so ++else ++ ecpg_pgtypes_libraries = ecpg_pgtypes_st ++endif ++ + pkgconfig.generate( + name: 'libpgtypes', + description: 'PostgreSQL libpgtypes library', + url: pg_url, +- libraries: ecpg_pgtypes_so, +- libraries_private: [frontend_stlib_code], ++ libraries: ecpg_pgtypes_libraries, ++ libraries_private: [frontend_lib_code], + ) +diff --git a/src/interfaces/libpq/meson.build b/src/interfaces/libpq/meson.build +index a74e885..7354286 100644 +--- a/src/interfaces/libpq/meson.build ++++ b/src/interfaces/libpq/meson.build +@@ -60,7 +60,7 @@ libpq_so_c_args = ['-DUSE_DYNAMIC_OAUTH'] + libpq_st = static_library('libpq', + libpq_sources, + include_directories: [libpq_inc], +- c_args: libpq_c_args, ++ c_args: libpq_c_args + ['-DFRONTEND'], + c_pch: pch_postgres_fe_h, + dependencies: [frontend_stlib_code, libpq_deps], + kwargs: default_lib_args, +@@ -80,13 +80,19 @@ libpq_so = shared_library('libpq', + kwargs: default_lib_args, + ) + ++if get_option('default_library') == 'shared' ++ libpq_link_with = [libpq_so] ++else ++ libpq_link_with = [libpq_st] ++endif ++ + libpq = declare_dependency( +- link_with: [libpq_so], ++ link_with: libpq_link_with, + include_directories: [include_directories('.')] + ) + + private_deps = [ +- frontend_stlib_code, ++ frontend_lib_code, + libpq_deps, + ] + +diff --git a/src/port/meson.build b/src/port/meson.build +index fc7b059..3b8cf40 100644 +--- a/src/port/meson.build ++++ b/src/port/meson.build +@@ -167,6 +167,19 @@ pgport_variants = { + + foreach name, opts : pgport_variants + ++ if name == '_srv' ++ pgport += {name: disabler()} ++ continue ++ endif ++ if name == '' and get_option('default_library') == 'shared' ++ pgport += {name: disabler()} ++ continue ++ endif ++ if name == '_shlib' and get_option('default_library') == 'static' ++ pgport += {name: disabler()} ++ continue ++ endif ++ + # Build internal static libraries for sets of files that need to be built + # with different cflags + cflag_libs = [] +@@ -196,6 +209,7 @@ foreach name, opts : pgport_variants + } + ) + pgport += {name: lib} ++ pgport_default = lib + endforeach + + pgport_srv = pgport['_srv'] diff --git a/vcpkg/ports/libpq/portfile.cmake b/vcpkg/ports/libpq/portfile.cmake new file mode 100644 index 000000000..ff839162e --- /dev/null +++ b/vcpkg/ports/libpq/portfile.cmake @@ -0,0 +1,112 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.postgresql.org/pub/source/v${VERSION}/postgresql-${VERSION}.tar.bz2" + "https://www.mirrorservice.org/sites/ftp.postgresql.org/source/v${VERSION}/postgresql-${VERSION}.tar.bz2" + FILENAME "postgresql-${VERSION}.tar.bz2" + SHA512 fdbe6d726f46738cf14acab96e5c05f7d65aefe78563281b416bb14a27c7c42e4df921e26b32816a5030ddbe506b95767e2c74a35afc589916504df38d1cb11c +) + +vcpkg_extract_source_archive( + SOURCE_PATH + ARCHIVE "${ARCHIVE}" + PATCHES + library-linkage.diff + libpq-and-client-tools.diff + libintl.diff + zic.diff + windows/macro-def.patch + windows/spin_delay.patch + windows/getopt.patch + ios-detection.patch + ios-system-unavailable.patch +) + +file(GLOB _py3_include_path "${CURRENT_HOST_INSTALLED_DIR}/include/python3*") +string(REGEX MATCH "python3\\.([0-9]+)" _python_version_tmp "${_py3_include_path}") +set(PYTHON_VERSION_MINOR "${CMAKE_MATCH_1}") + +vcpkg_cmake_get_vars(cmake_vars_file) +include("${cmake_vars_file}") + +vcpkg_find_acquire_program(BISON) +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(PERL) + +vcpkg_list(SET MESON_OPTIONS_RELEASE) +vcpkg_list(SET MESON_OPTIONS) +foreach(option IN ITEMS icu lz4 zlib zstd) + if(option IN_LIST FEATURES) + list(APPEND MESON_OPTIONS -D${option}=enabled) + endif() +endforeach() + +if("openssl" IN_LIST FEATURES) + list(APPEND MESON_OPTIONS -Dssl=openssl) +else() + list(APPEND MESON_OPTIONS -Dssl=none) +endif() + +if("nls" IN_LIST FEATURES) + list(APPEND MESON_OPTIONS -Dnls=enabled) +endif() + +if("client" IN_LIST FEATURES) + list(APPEND MESON_OPTIONS_RELEASE -Dtools=enabled) + if(VCPKG_CROSSCOMPILING) + list(APPEND MESON_OPTIONS "-DZIC=${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}/zic${VCPKG_HOST_EXECUTABLE_SUFFIX}") + endif() +endif() + +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -Dauto_features=disabled + ${MESON_OPTIONS} + # cannot use ADDITIONAL_BINARIES for "native" programs + "-DBISON=['${BISON}']" + "-DFLEX=['${FLEX}']" + "-DPERL=${PERL}" + OPTIONS_RELEASE + ${MESON_OPTIONS_RELEASE} +) +vcpkg_install_meson() +vcpkg_fixup_pkgconfig() + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB pc_files "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc") + foreach(file IN LISTS pc_files) + vcpkg_replace_string("${file}" " -l(pq|pg|ecpg)" " -llib\\1" REGEX) + endforeach() +endif() + +vcpkg_copy_tools(TOOL_NAMES ecpg AUTO_CLEAN) +if("client" IN_LIST FEATURES) + if(NOT VCPKG_CROSSCOMPILING) + vcpkg_copy_tools(TOOL_NAMES zic AUTO_CLEAN DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}") + endif() + vcpkg_copy_tools( + TOOL_NAMES + clusterdb createdb createuser + dropdb dropuser + pg_amcheck + pg_basebackup pgbench + pg_combinebackup pg_config pg_createsubscriber + pg_dump pg_dumpall + pg_isready + pg_receivewal pg_recvlogical pg_restore + pg_verifybackup + psql + reindexdb + vacuumdb + AUTO_CLEAN + ) +endif() + + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/postgresql/vcpkg-cmake-wrapper.cmake" @ONLY) +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYRIGHT") diff --git a/vcpkg/ports/libpq/usage b/vcpkg/ports/libpq/usage new file mode 100644 index 000000000..1f36ee18b --- /dev/null +++ b/vcpkg/ports/libpq/usage @@ -0,0 +1,4 @@ +libpq provides CMake integration: + + find_package(PostgreSQL REQUIRED) + target_link_libraries(main PRIVATE PostgreSQL::PostgreSQL) diff --git a/vcpkg/ports/libpq/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/libpq/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..fdb714590 --- /dev/null +++ b/vcpkg/ports/libpq/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,69 @@ +find_library(PostgreSQL_LIBRARY_RELEASE NAMES pq libpq NAMES_PER_DIR PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH REQUIRED) +find_library(PostgreSQL_LIBRARY_DEBUG NAMES pq libpq NAMES_PER_DIR PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH) +_find_package(${ARGS}) +if(PostgreSQL_FOUND AND NOT "@VCPKG_TARGET_IS_WINDOWS@") + find_library(PostgreSQL_DL_LIBRARY NAMES dl) + if(PostgreSQL_DL_LIBRARY) + list(APPEND PostgreSQL_LIBRARIES "dl") + if(TARGET PostgreSQL::PostgreSQL) + set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl") + endif() + endif() +endif() +if(PostgreSQL_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + include(SelectLibraryConfigurations) + foreach(LIB_ITEM pgport pgcommon) + find_library(PostgreSQL_${LIB_ITEM}_LIBRARY_RELEASE + NAMES ${LIB_ITEM} lib${LIB_ITEM} + NAMES_PER_DIR + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH + ) + if(TARGET PostgreSQL::PostgreSQL AND PostgreSQL_${LIB_ITEM}_LIBRARY_RELEASE) + set_property( + TARGET PostgreSQL::PostgreSQL + APPEND PROPERTY INTERFACE_LINK_LIBRARIES "\$<\$>:${PostgreSQL_${LIB_ITEM}_LIBRARY_RELEASE}>" + ) + endif() + + find_library(PostgreSQL_${LIB_ITEM}_LIBRARY_DEBUG + NAMES ${LIB_ITEM} lib${LIB_ITEM} + NAMES_PER_DIR + PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH + ) + if(TARGET PostgreSQL::PostgreSQL AND PostgreSQL_${LIB_ITEM}_LIBRARY_DEBUG) + set_property( + TARGET PostgreSQL::PostgreSQL + APPEND PROPERTY INTERFACE_LINK_LIBRARIES "\$<\$:${PostgreSQL_${LIB_ITEM}_LIBRARY_DEBUG}>" + ) + endif() + + if (PostgreSQL_${LIB_ITEM}_LIBRARY_RELEASE OR PostgreSQL_${LIB_ITEM}_LIBRARY_DEBUG) + select_library_configurations(PostgreSQL_${LIB_ITEM}) + list(APPEND PostgreSQL_LIBRARIES ${PostgreSQL_${LIB_ITEM}_LIBRARY}) + endif() + endforeach() + if(WIN32) + if(TARGET PostgreSQL::PostgreSQL) + set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "secur32.lib") + endif() + list(APPEND PostgreSQL_LIBRARIES secur32.lib) + endif() + cmake_policy(PUSH) + cmake_policy(SET CMP0057 NEW) + set(Z_VCPKG_PORT_FEATURES "@FEATURES@") + if("openssl" IN_LIST Z_VCPKG_PORT_FEATURES) + find_package(OpenSSL REQUIRED) + if(TARGET PostgreSQL::PostgreSQL) + set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "OpenSSL::SSL") + endif() + list(APPEND PostgreSQL_LIBRARIES ${OPENSSL_LIBRARIES}) + endif() + if(WIN32) + if(TARGET PostgreSQL::PostgreSQL) + set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "wldap32.lib") + endif() + list(APPEND PostgreSQL_LIBRARIES wldap32.lib) + endif() + unset(Z_VCPKG_PORT_FEATURES) + cmake_policy(POP) +endif() diff --git a/vcpkg/ports/libpq/vcpkg.json b/vcpkg/ports/libpq/vcpkg.json new file mode 100644 index 000000000..ef00d2cb9 --- /dev/null +++ b/vcpkg/ports/libpq/vcpkg.json @@ -0,0 +1,114 @@ +{ + "name": "libpq", + "version": "18.3", + "port-version": 1, + "description": "The official database access API of postgresql", + "homepage": "https://www.postgresql.org/", + "license": "PostgreSQL", + "supports": "!uwp & !emscripten", + "dependencies": [ + { + "name": "vcpkg-cmake-get-vars", + "host": true + }, + { + "name": "vcpkg-tool-meson", + "host": true + } + ], + "default-features": [ + "lz4", + "openssl", + "zlib" + ], + "features": { + "all": { + "description": "Build all supported features", + "dependencies": [ + { + "name": "libpq", + "features": [ + "client", + "icu", + "lz4", + "nls", + "openssl", + "zlib", + "zstd" + ] + }, + { + "name": "libpq", + "features": [ + "readline" + ], + "platform": "!windows" + } + ] + }, + "client": { + "description": "Build all client tools and libraries", + "dependencies": [ + { + "name": "libpq", + "host": true, + "default-features": false, + "features": [ + "client" + ] + } + ] + }, + "icu": { + "description": "Build with support for the ICU library", + "dependencies": [ + "icu" + ] + }, + "lz4": { + "description": "Use lz4", + "dependencies": [ + "lz4" + ] + }, + "nls": { + "description": "Native Language Support", + "supports": "!osx", + "dependencies": [ + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "gettext-libintl" + ] + }, + "openssl": { + "description": "support for encrypted client connections and random number generation on platforms that do not have \"/dev/urandom\" (except windows)", + "dependencies": [ + "openssl" + ] + }, + "readline": { + "description": "Use readline", + "supports": "!windows, mingw", + "dependencies": [ + "readline" + ] + }, + "zlib": { + "description": "Use zlib", + "dependencies": [ + "zlib" + ] + }, + "zstd": { + "description": "Use zstd", + "dependencies": [ + "zstd" + ] + } + } +} diff --git a/vcpkg/ports/libpq/windows/getopt.patch b/vcpkg/ports/libpq/windows/getopt.patch new file mode 100644 index 000000000..c6e0126a3 --- /dev/null +++ b/vcpkg/ports/libpq/windows/getopt.patch @@ -0,0 +1,14 @@ +diff --git a/meson.build b/meson.build +index 34456b3..052e8c8 100644 +--- a/meson.build ++++ b/meson.build +@@ -2650,6 +2650,9 @@ foreach header : header_checks + description: 'Define to 1 if you have the <@0@> header file.'.format(header)) + endforeach + ++if cc.get_id() == 'msvc' ++ cdata.set('HAVE_GETOPT_H', false) ++endif + + decl_checks = [ + ['F_FULLFSYNC', 'fcntl.h'], diff --git a/vcpkg/ports/libpq/windows/macro-def.patch b/vcpkg/ports/libpq/windows/macro-def.patch new file mode 100644 index 000000000..7eb508d88 --- /dev/null +++ b/vcpkg/ports/libpq/windows/macro-def.patch @@ -0,0 +1,18 @@ +diff --git a/src/include/common/checksum_helper.h b/src/include/common/checksum_helper.h +index cac7570ea..d0ca1243c 100644 +--- a/src/include/common/checksum_helper.h ++++ b/src/include/common/checksum_helper.h +@@ -28,7 +28,13 @@ + */ + typedef enum pg_checksum_type + { ++#pragma push_macro("CHECKSUM_TYPE_NONE") ++#ifdef CHECKSUM_TYPE_NONE ++// winioctl.h defines CHECKSUM_TYPE_NONE to 0 as a macro. ++#undef CHECKSUM_TYPE_NONE ++#endif + CHECKSUM_TYPE_NONE, ++#pragma pop_macro("CHECKSUM_TYPE_NONE") + CHECKSUM_TYPE_CRC32C, + CHECKSUM_TYPE_SHA224, + CHECKSUM_TYPE_SHA256, diff --git a/vcpkg/ports/libpq/windows/spin_delay.patch b/vcpkg/ports/libpq/windows/spin_delay.patch new file mode 100644 index 000000000..163e8e6ef --- /dev/null +++ b/vcpkg/ports/libpq/windows/spin_delay.patch @@ -0,0 +1,24 @@ +diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h +index 4d3ffc7..658b1a1 100644 +--- a/src/include/storage/s_lock.h ++++ b/src/include/storage/s_lock.h +@@ -953,12 +953,18 @@ typedef LONG slock_t; + /* If using Visual C++ on Win64, inline assembly is unavailable. + * Use a _mm_pause intrinsic instead of rep nop. + */ +-#if defined(_WIN64) ++#if defined(_M_X64) && !defined(_M_ARM64EC) + static __forceinline void + spin_delay(void) + { + _mm_pause(); + } ++#elif defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) ++static __forceinline void ++spin_delay(void) ++{ ++ __yield(); ++} + #else + static __forceinline void + spin_delay(void) diff --git a/vcpkg/ports/libpq/zic.diff b/vcpkg/ports/libpq/zic.diff new file mode 100644 index 000000000..737182f2d --- /dev/null +++ b/vcpkg/ports/libpq/zic.diff @@ -0,0 +1,22 @@ +diff --git a/src/timezone/meson.build b/src/timezone/meson.build +index ad9f6f6..bb06082 100644 +--- a/src/timezone/meson.build ++++ b/src/timezone/meson.build +@@ -27,7 +27,7 @@ if get_option('system_tzdata') == '' + # FIXME: For cross builds, it would need a native built libpgport/pgcommon to + # build our zic. But for that we'd need to run a good chunk of the configure + # tests both natively and cross. Unclear if it's worth it. +- if meson.is_cross_build() ++ if meson.is_cross_build() or get_option('ZIC') != 'zic' + zic = find_program(get_option('ZIC'), native: true, required: true) + else + if host_system == 'windows' +@@ -38,7 +38,7 @@ if get_option('system_tzdata') == '' + + zic = executable('zic', zic_sources, + dependencies: [frontend_code], +- kwargs: default_bin_args + {'install': false} ++ kwargs: default_bin_args + {'install': true} + ) + endif + diff --git a/vcpkg/ports/libspatialite/android-builtin-iconv.diff b/vcpkg/ports/libspatialite/android-builtin-iconv.diff new file mode 100644 index 000000000..db0792657 --- /dev/null +++ b/vcpkg/ports/libspatialite/android-builtin-iconv.diff @@ -0,0 +1,35 @@ +diff --git a/src/gaiaaux/gg_utf8.c b/src/gaiaaux/gg_utf8.c +index f11e604..620696e 100644 +--- a/src/gaiaaux/gg_utf8.c ++++ b/src/gaiaaux/gg_utf8.c +@@ -73,7 +73,7 @@ extern const char *locale_charset (void); + #include + #endif /* end localcharset */ + #else /* not MINGW32 - WIN32 */ +-#if defined(__APPLE__) || defined(__ANDROID__) ++#if defined(__APPLE__) || (defined(__ANDROID__) && __ANDROID_API__ < 28) + #include + #include + #else /* neither Mac OsX nor Android */ +@@ -89,7 +89,7 @@ gaiaGetLocaleCharset () + #if defined(__MINGW32__) || defined(_WIN32) + return locale_charset (); + #else /* not MINGW32 - WIN32 */ +-#if defined(__APPLE__) || defined(__ANDROID__) ++#if defined(__APPLE__) || (defined(__ANDROID__) && __ANDROID_API__ < 28) + return locale_charset (); + #else /* neither Mac OsX nor Android */ + return nl_langinfo (CODESET); +diff --git a/src/gaiageo/gg_shape.c b/src/gaiageo/gg_shape.c +index 8917535..e5e0240 100644 +--- a/src/gaiageo/gg_shape.c ++++ b/src/gaiageo/gg_shape.c +@@ -75,7 +75,7 @@ extern const char *locale_charset (void); + #include + #endif /* end localcharset */ + #else /* not MINGW32 */ +-#if defined(__APPLE__) || defined(__ANDROID__) ++#if defined(__APPLE__) || (defined(__ANDROID__) && __ANDROID_API__ < 28) + #include + #include + #else /* neither Mac OsX nor Android */ diff --git a/vcpkg/ports/libspatialite/fix-linux-configure.patch b/vcpkg/ports/libspatialite/fix-linux-configure.patch new file mode 100644 index 000000000..afb54db06 --- /dev/null +++ b/vcpkg/ports/libspatialite/fix-linux-configure.patch @@ -0,0 +1,30 @@ +diff --git a/configure.ac b/configure.ac +index ead87caff..47abb90f0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -302,6 +302,7 @@ if test x"$enable_geos" != "xno"; then + #----------------------------------------------------------------------- + # --with-geosconfig + # ++ if 0; then + AC_ARG_WITH([geosconfig], + [AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])], + [GEOSCONFIG="$withval"], [GEOSCONFIG=""]) +@@ -327,14 +328,17 @@ if test x"$enable_geos" != "xno"; then + # Ensure that we can parse geos_c.h + CPPFLAGS_SAVE="$CPPFLAGS" + CPPFLAGS="$GEOS_CFLAGS" ++ fi + AC_CHECK_HEADERS([geos_c.h],, [AC_MSG_ERROR([could not find geos_c.h - you may need to specify the directory of a geos-config file using --with-geosconfig])]) ++ if 0; then + CPPFLAGS="$CPPFLAGS_SAVE" + # Ensure we can link against libgeos_c + LIBS_SAVE="$LIBS" + LIBS="$GEOS_LDFLAGS" + AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.3.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig])) + LIBS="$LIBS_SAVE" + LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c" ++ fi + + #----------------------------------------------------------------------- + # --enable-controlpoints diff --git a/vcpkg/ports/libspatialite/fix-makefiles.patch b/vcpkg/ports/libspatialite/fix-makefiles.patch new file mode 100644 index 000000000..167faa1b7 --- /dev/null +++ b/vcpkg/ports/libspatialite/fix-makefiles.patch @@ -0,0 +1,43 @@ +diff --git a/makefile.vc b/makefile.vc +index 9ae0b83..2a80b03 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -100,7 +100,8 @@ CFLAGS = /nologo -I.\src\headers -I.\src\topology \ + + default: all + +-all: spatialite.lib spatialite_i.lib ++WANT_LIB = spatialite.lib ++all: $(WANT_LIB) + #$(EXIF_LOADER_EXE) + + spatialite.lib: $(LIBOBJ) +@@ -112,10 +113,7 @@ $(SPATIALITE_DLL): spatialite_i.lib + spatialite_i.lib: $(LIBOBJ) + link /dll /out:$(SPATIALITE_DLL) \ + /implib:spatialite_i.lib $(LIBOBJ) \ +- C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \ +- C:\OSGeo4W\lib\sqlite3_i.lib C:\OSGeo4W\lib\zlib.lib \ +- C:\OSGeo4W\lib\libxml2.lib C:\OSGeo4W\lib\librttopo.lib ++ $(LIBS) + if exist $(SPATIALITE_DLL).manifest mt -manifest \ + $(SPATIALITE_DLL).manifest -outputresource:$(SPATIALITE_DLL);2 + +@@ -146,12 +144,14 @@ clean: + + install: all + -mkdir $(INSTDIR) +- -mkdir $(INSTDIR)\bin + -mkdir $(INSTDIR)\lib + -mkdir $(INSTDIR)\include + -mkdir $(INSTDIR)\include\spatialite ++!IF "$(WANT_LIB)" == "spatialite_i.lib" ++ -mkdir $(INSTDIR)\bin + copy *.dll $(INSTDIR)\bin +- copy *.lib $(INSTDIR)\lib ++!ENDIF ++ copy /Y $(WANT_LIB) $(INSTDIR)\lib\spatialite.lib + copy src\headers\spatialite.h $(INSTDIR)\include + copy src\headers\spatialite\*.h $(INSTDIR)\include\spatialite + diff --git a/vcpkg/ports/libspatialite/fix-mingw.patch b/vcpkg/ports/libspatialite/fix-mingw.patch new file mode 100644 index 000000000..abbe3520a --- /dev/null +++ b/vcpkg/ports/libspatialite/fix-mingw.patch @@ -0,0 +1,11 @@ +diff --color -ur a/configure.ac b/configure.ac +--- a/configure.ac 2022-07-21 17:23:50.490298108 +0200 ++++ b/configure.ac 2022-07-21 17:25:45.671489524 +0200 +@@ -116,7 +116,6 @@ + + # Checks for installed libraries + # AC_CHECK_LIB(sqlite3,sqlite3_prepare_v2,,AC_MSG_ERROR(['libsqlite3' is required but it doesn't seem to be installed on this system.]),-lm) +-AC_CHECK_LIB(z,inflateInit_,,AC_MSG_ERROR(['libz' is required but it doesn't seem to be installed on this system.]),-lm) + + AC_CONFIG_FILES([Makefile \ + src/Makefile \ diff --git a/vcpkg/ports/libspatialite/fix-utf8-source.patch b/vcpkg/ports/libspatialite/fix-utf8-source.patch new file mode 100644 index 000000000..76dcf77a5 --- /dev/null +++ b/vcpkg/ports/libspatialite/fix-utf8-source.patch @@ -0,0 +1,32 @@ +diff --git a/src/srsinit/epsg_inlined_21.c b/src/srsinit/epsg_inlined_21.c +index 94aa9d4..457b38a 100644 +--- a/src/srsinit/epsg_inlined_21.c ++++ b/src/srsinit/epsg_inlined_21.c +@@ -619,9 +619,9 @@ initialize_epsg_21 (int filter, struct epsg_defs **first, struct epsg_defs **las + add_srs_wkt (p, 27, + "lic, Chad, Chile, China, Christmas Island, Cocos (Keelin"); + add_srs_wkt (p, 28, +- "g) Islands, Comoros, Congo, Cook Islands, Costa Rica, CÃ"); ++ "g) Islands, Comoros, Congo, Cook Islands, Costa Rica, Cô"); + add_srs_wkt (p, 29, +- "´te d'Ivoire (Ivory Coast), Croatia, Cuba, Curacao, Cypr"); ++ "te d'Ivoire (Ivory Coast), Croatia, Cuba, Curacao, Cypr"); + add_srs_wkt (p, 30, + "us, Czechia, Denmark, Djibouti, Dominica, Dominican Repu"); + add_srs_wkt (p, 31, +diff --git a/src/srsinit/epsg_inlined_25.c b/src/srsinit/epsg_inlined_25.c +index 1071eb1..a09cb8c 100644 +--- a/src/srsinit/epsg_inlined_25.c ++++ b/src/srsinit/epsg_inlined_25.c +@@ -3180,9 +3180,9 @@ initialize_epsg_25 (int filter, struct epsg_defs **first, struct epsg_defs **las + add_srs_wkt (p, 26, + "lic, Chad, Chile, China, Christmas Island, Cocos (Keelin"); + add_srs_wkt (p, 27, +- "g) Islands, Comoros, Congo, Cook Islands, Costa Rica, CÃ"); ++ "g) Islands, Comoros, Congo, Cook Islands, Costa Rica, Cô"); + add_srs_wkt (p, 28, +- "´te d'Ivoire (Ivory Coast), Croatia, Cuba, Curacao, Cypr"); ++ "te d'Ivoire (Ivory Coast), Croatia, Cuba, Curacao, Cypr"); + add_srs_wkt (p, 29, + "us, Czechia, Denmark, Djibouti, Dominica, Dominican Repu"); + add_srs_wkt (p, 30, diff --git a/vcpkg/ports/libspatialite/gaiaconfig-msvc.patch b/vcpkg/ports/libspatialite/gaiaconfig-msvc.patch new file mode 100644 index 000000000..3bf276d70 --- /dev/null +++ b/vcpkg/ports/libspatialite/gaiaconfig-msvc.patch @@ -0,0 +1,31 @@ +diff --git a/src/headers/spatialite/gaiaconfig-msvc.h b/src/headers/spatialite/gaiaconfig-msvc.h +index 37f0bd1..0053258 100644 +--- a/src/headers/spatialite/gaiaconfig-msvc.h ++++ b/src/headers/spatialite/gaiaconfig-msvc.h +@@ -2,7 +2,7 @@ + /* ./src/headers/spatialite/gaiaconfig-msvc.h.in - manually maintained */ + + /* Should be defined in order to enable GCP support. */ +-#define ENABLE_GCP 1 ++// #define ENABLE_GCP 1 + + /* Should be defined in order to enable GeoPackage support. */ + #define ENABLE_GEOPACKAGE 1 +@@ -11,7 +11,7 @@ + #define ENABLE_LIBXML2 1 + + /* Should be defined in order to enable RTTOPO support. */ +-#define ENABLE_RTTOPO 1 ++// #define ENABLE_RTTOPO 1 + + /* Should be defined in order to enable GEOS_370 support. */ + #define GEOS_370 1 +@@ -32,7 +32,7 @@ + /* #undef OMIT_FREEXL */ + + /* Should be defined in order to disable GEOCALLBACKS support. */ +-#define OMIT_GEOCALLBACKS 1 ++// #define OMIT_GEOCALLBACKS 1 + + /* Should be defined in order to disable GEOS support. */ + /* #undef OMIT_GEOS */ diff --git a/vcpkg/ports/libspatialite/libxml2-no-http.diff b/vcpkg/ports/libspatialite/libxml2-no-http.diff new file mode 100644 index 000000000..22402750a --- /dev/null +++ b/vcpkg/ports/libspatialite/libxml2-no-http.diff @@ -0,0 +1,34 @@ +diff --git a/configure.ac b/configure.ac +index 3a4f288..d9ba65f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -441,6 +441,15 @@ if test x"$enable_libxml2" != "xno"; then + AC_SUBST(LIBXML2_CFLAGS) + AC_SUBST(LIBXML2_LIBS) + AC_DEFINE(ENABLE_LIBXML2) ++ LIBS_SAVE="$LIBS" ++ LIBS="$LIBXML2_LIBS" ++ AC_SEARCH_LIBS(xmlNanoHTTPCleanup, [], [has_nanohttp="yes"], [has_nanohttp="no"]) ++ if test "x$has_nanohttp" != "xno"; then ++ CPPFLAGS="$CFLAGS -DLIBXML2_HAS_NANOHTTP" ++ else ++ AC_MSG_WARN([No http support found in 'libxml2']) ++ fi ++ LIBS="$LIBS_SAVE" + fi + + #----------------------------------------------------------------------- +diff --git a/src/wfs/wfs_in.c b/src/wfs/wfs_in.c +index fe07a0d..93dd778 100644 +--- a/src/wfs/wfs_in.c ++++ b/src/wfs/wfs_in.c +@@ -4637,7 +4637,9 @@ SPATIALITE_DECLARE void + reset_wfs_http_connection (void) + { + /* Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settings */ ++#if defined LIBXML2_HAS_NANOHTTP /* removed in 2.15.0, and optional before */ + xmlNanoHTTPCleanup (); ++#endif + } + + #else /* LIBXML2 isn't enabled */ diff --git a/vcpkg/ports/libspatialite/portfile.cmake b/vcpkg/ports/libspatialite/portfile.cmake new file mode 100644 index 000000000..e65216303 --- /dev/null +++ b/vcpkg/ports/libspatialite/portfile.cmake @@ -0,0 +1,239 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${VERSION}.tar.gz" + FILENAME "libspatialite-${VERSION}.tar.gz" + SHA512 2745b373e31cea58623224def6090c491b58409803bb71231450dfa2cfdf3aafc3fc6f680585d55d085008f8cf362c3062ae67ffc7d80257775a22eb81ef1e57 +) + +vcpkg_extract_source_archive(SOURCE_PATH + ARCHIVE "${ARCHIVE}" + PATCHES + fix-makefiles.patch + fix-linux-configure.patch + gaiaconfig-msvc.patch + fix-mingw.patch + fix-utf8-source.patch + android-builtin-iconv.diff + # https://groups.google.com/g/spatialite-users/c/FLBqJNIDkNQ + # https://groups.google.com/g/spatialite-users/c/nyT4iAJbttY + libxml2-no-http.diff +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS unused + FEATURES + freexl ENABLE_FREEXL + gcp ENABLE_GCP + rttopo ENABLE_RTTOPO +) + +set(pkg_config_modules geos libxml-2.0 proj sqlite3 zlib) +if(ENABLE_FREEXL) + list(APPEND pkg_config_modules freexl) +endif() +if(ENABLE_RTTOPO) + list(APPEND pkg_config_modules rttopo) +endif() + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + x_vcpkg_pkgconfig_get_modules( + PREFIX PKGCONFIG + MODULES --msvc-syntax ${pkg_config_modules} + CFLAGS + LIBS + ) + + # cherry-picked from Makefile.vc (CFLAGS) and nmake.opt (OPTFLAGS) + set(CFLAGS "/fp:precise /W4 /D_CRT_SECURE_NO_WARNINGS /DYY_NO_UNISTD_H -I./src/headers -I./src/topology -I.") + set(WANT_LIB spatialite.lib) + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(APPEND CFLAGS " /DDLL_EXPORT") + set(WANT_LIB spatialite_i.lib) + endif() + if(NOT ENABLE_FREEXL) + string(APPEND CFLAGS " /DOMIT_FREEXL") + endif() + if(ENABLE_GCP) + string(APPEND CFLAGS " /DENABLE_GCP") + endif() + if(ENABLE_RTTOPO) + string(APPEND CFLAGS " /DENABLE_RTTOPO") + endif() + + set(SYSTEM_LIBS "iconv.lib charset.lib") + + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR) + + vcpkg_install_nmake( + SOURCE_PATH "${SOURCE_PATH}" + CL_LANGUAGE C + OPTIONS + "WANT_LIB=${WANT_LIB}" + OPTIONS_RELEASE + "CFLAGS=${CFLAGS} ${PKGCONFIG_CFLAGS_RELEASE}" + "LIBS=${PKGCONFIG_LIBS_RELEASE} ${SYSTEM_LIBS}" + "INSTDIR=${INST_DIR}" + OPTIONS_DEBUG + "CFLAGS=${CFLAGS} ${PKGCONFIG_CFLAGS_DEBUG}" + "LIBS=${PKGCONFIG_LIBS_DEBUG} ${SYSTEM_LIBS}" + "INSTDIR=${INST_DIR}\\debug" + ) + vcpkg_copy_pdbs() + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + file(GLOB_RECURSE headers "${CURRENT_PACKAGES_DIR}/include/*.h") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + foreach(file IN LISTS headers) + vcpkg_replace_string("${file}" "#ifdef DLL_EXPORT" "#if 0" IGNORE_UNCHANGED) + endforeach() + else() + foreach(file IN LISTS headers) + vcpkg_replace_string("${file}" "#ifdef DLL_EXPORT" "#if 1" IGNORE_UNCHANGED) + vcpkg_replace_string("${file}" "__declspec(dllexport)" "__declspec(dllimport)" IGNORE_UNCHANGED) + endforeach() + endif() + + set(infile "${SOURCE_PATH}/spatialite.pc.in") + set(libdir [[${prefix}/lib]]) + set(exec_prefix [[${prefix}]]) + list(JOIN pkg_config_modules " " requires_private) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(includedir [[${prefix}/include]]) + set(outfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/spatialite.pc") + configure_file("${infile}" "${outfile}" @ONLY) + vcpkg_replace_string("${outfile}" "Libs:" "Requires.private: ${requires_private}\nLibs.private: -liconv -lcharset\nLibs:") + vcpkg_replace_string("${outfile}" " -lm" " ") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(includedir [[${prefix}/../include]]) + set(outfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/spatialite.pc") + configure_file("${infile}" "${outfile}" @ONLY) + vcpkg_replace_string("${outfile}" "Libs:" "Requires.private: ${requires_private}\nLibs.private: -liconv -lcharset\nLibs:") + vcpkg_replace_string("${outfile}" " -lm" " ") + endif() +else() + if(ENABLE_FREEXL) + set(FREEXL_OPTION "--enable-freexl") + else() + set(FREEXL_OPTION "--disable-freexl") + endif() + if(ENABLE_GCP) + set(GCP_OPTION "--enable-gcp") + else() + set(GCP_OPTION "--disable-gcp") + endif() + if(ENABLE_GEOCALLBACKS) + set(GEOCALLBACKS_OPTION "--enable-geocallbacks") + else() + set(GEOCALLBACKS_OPTION "--disable-geocallbacks") + endif() + if(ENABLE_RTTOPO) + set(RTTOPO_OPTION "--enable-rttopo") + else() + set(RTTOPO_OPTION "--disable-rttopo") + endif() + list(REMOVE_ITEM pkg_config_modules libxml2) # handled properly by configure + x_vcpkg_pkgconfig_get_modules( + PREFIX PKGCONFIG + MODULES ${pkg_config_modules} + LIBS + ) + if(VCPKG_TARGET_IS_MINGW) + # Avoid system libs (as detected by cmake) in exported pc files + set(SYSTEM_LIBS "") + elseif(VCPKG_TARGET_IS_ANDROID) + set(SYSTEM_LIBS "\$LIBS -llog") + else() + set(SYSTEM_LIBS "\$LIBS") + endif() + # libspatialite needs some targets literally + if(VCPKG_TARGET_IS_ANDROID) + set(TARGET_ALIAS "--target=android") + elseif(VCPKG_TARGET_IS_MINGW) + set(TARGET_ALIAS "--target=mingw32") + elseif(VCPKG_TARGET_IS_OSX) + set(TARGET_ALIAS "--target=macosx") + else() + set(TARGET_ALIAS "") + endif() + vcpkg_make_configure( + SOURCE_PATH "${SOURCE_PATH}" + AUTORECONF + OPTIONS + ${TARGET_ALIAS} + ${FREEXL_OPTION} + ${GCP_OPTION} + ${RTTOPO_OPTION} + "--disable-examples" + "--disable-minizip" + "cross_compiling=yes" # avoid conftest rpath trouble + OPTIONS_DEBUG + "LIBS=${PKGCONFIG_LIBS_DEBUG} ${SYSTEM_LIBS}" + OPTIONS_RELEASE + "LIBS=${PKGCONFIG_LIBS_RELEASE} ${SYSTEM_LIBS}" + ) + + # automake adds the basedir of the generated config to `DEFAULT_INCLUDES`, + # but libspatialite uses `#include `. + file(GLOB_RECURSE makefiles + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Makefile" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Makefile" + ) + foreach(makefile IN LISTS makefiles) + vcpkg_replace_string("${makefile}" " -I$(top_builddir)/./src/headers/spatialite" " -I$(top_builddir)/./src/headers" IGNORE_UNCHANGED) + endforeach() + + # On iOS libtool has no shared library support and falls back to static archives + # for both lib.la and .la in every src/ subdirectory, naming both + # .libs/lib.a and causing a parallel build race. Serialize all of them. + if(VCPKG_TARGET_IS_IOS) + file(GLOB ios_makefiles + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*/Makefile" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*/Makefile" + ) + foreach(makefile IN LISTS ios_makefiles) + file(READ "${makefile}" _contents) + string(REPLACE "\nnoinst_LTLIBRARIES = " "\n.NOTPARALLEL:\nnoinst_LTLIBRARIES = " _contents "${_contents}") + file(WRITE "${makefile}" "${_contents}") + endforeach() + endif() + + vcpkg_make_install() + + if(VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/plugins/${PORT}") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/mod_spatialite.dll" "${CURRENT_PACKAGES_DIR}/plugins/${PORT}/mod_spatialite.dll") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/plugins/${PORT}") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/mod_spatialite.dll" "${CURRENT_PACKAGES_DIR}/debug/plugins/${PORT}/mod_spatialite.dll") + endif() + endif() +endif() + +vcpkg_fixup_pkgconfig() + +# Handle copyright +set(outfile "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") +if(NOT ENABLE_GCP AND NOT ENABLE_RTTOPO) + file(READ "${SOURCE_PATH}/COPYING" mpl) + file(WRITE "${outfile}" + "SpatiaLite[${FEATURES}] is licensed under the MPL tri-license terms;\n" + "you are free to choose the best-fit license between:\n" + "- the MPL 1.1\n" + "- the GPL v2.0 or any subsequent version\n" + "- the LGPL v2.1 or any subsequent version.\n\n" + "# MPL 1.1 (from COPYING)\n\n" + "${mpl}\n" + ) +else() + file(WRITE "${outfile}" + "SpatiaLite[${FEATURES}] is licensed under:\n" + "the GPL v2.0 or any subsequent version.\n\n" + ) +endif() +file(READ "${SOURCE_PATH}/src/control_points/COPYING" gpl) +file(APPEND "${outfile}" + "# GPL v2.0 (from src/control_points/COPYING)\n\n" + "${gpl}\n" +) diff --git a/vcpkg/ports/libspatialite/vcpkg.json b/vcpkg/ports/libspatialite/vcpkg.json new file mode 100644 index 000000000..e2d22e057 --- /dev/null +++ b/vcpkg/ports/libspatialite/vcpkg.json @@ -0,0 +1,55 @@ +{ + "name": "libspatialite", + "version": "5.1.0", + "port-version": 6, + "description": "SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.", + "homepage": "https://www.gaia-gis.it/fossil/libspatialite/index", + "license": null, + "supports": "!uwp", + "dependencies": [ + "geos", + "libiconv", + { + "name": "libxml2", + "default-features": false + }, + "proj", + { + "name": "sqlite3", + "default-features": false, + "features": [ + "rtree" + ] + }, + { + "name": "vcpkg-make", + "host": true, + "platform": "!windows | mingw" + }, + { + "name": "vcpkg-pkgconfig-get-modules", + "host": true + }, + "zlib" + ], + "default-features": [ + "freexl" + ], + "features": { + "freexl": { + "description": "FreeXL spreadsheet file support.", + "dependencies": [ + "freexl" + ] + }, + "gcp": { + "description": "Ground control points support. This feature reduces the license options to GPLv2+." + }, + "rttopo": { + "description": "RTTOPO support. This feature reduces the license options to GPLv2+.", + "dependencies": [ + "librttopo" + ] + } + } +} diff --git a/vcpkg/ports/pcre2/fix-lld-version-script.patch b/vcpkg/ports/pcre2/fix-lld-version-script.patch new file mode 100644 index 000000000..59c32b6af --- /dev/null +++ b/vcpkg/ports/pcre2/fix-lld-version-script.patch @@ -0,0 +1,56 @@ +diff --git a/src/libpcre2-16.sym b/src/libpcre2-16.sym +index fd5257db..a404f926 100644 +--- a/src/libpcre2-16.sym ++++ b/src/libpcre2-16.sym +@@ -80,9 +80,6 @@ PCRE2_10.47 { + pcre2_substring_list_get_16; + pcre2_substring_nametable_scan_16; + pcre2_substring_number_from_name_16; +- local: +- _fini; +- _init; + }; + + # PCRE2_10.48 {} PCRE2_10.47; +diff --git a/src/libpcre2-32.sym b/src/libpcre2-32.sym +index d4606c2b..d65f7848 100644 +--- a/src/libpcre2-32.sym ++++ b/src/libpcre2-32.sym +@@ -80,9 +80,6 @@ PCRE2_10.47 { + pcre2_substring_list_get_32; + pcre2_substring_nametable_scan_32; + pcre2_substring_number_from_name_32; +- local: +- _fini; +- _init; + }; + + # PCRE2_10.48 {} PCRE2_10.47; +diff --git a/src/libpcre2-8.sym b/src/libpcre2-8.sym +index 368b4e44..7b06ed21 100644 +--- a/src/libpcre2-8.sym ++++ b/src/libpcre2-8.sym +@@ -80,9 +80,6 @@ PCRE2_10.47 { + pcre2_substring_list_get_8; + pcre2_substring_nametable_scan_8; + pcre2_substring_number_from_name_8; +- local: +- _fini; +- _init; + }; + + # PCRE2_10.48 {} PCRE2_10.47; +diff --git a/src/libpcre2-posix.sym b/src/libpcre2-posix.sym +index 04a56cf6..675c4a2a 100644 +--- a/src/libpcre2-posix.sym ++++ b/src/libpcre2-posix.sym +@@ -5,9 +5,6 @@ PCRE2_10.47 { + pcre2_regerror; + pcre2_regexec; + pcre2_regfree; +- local: +- _fini; +- _init; + }; + + # PCRE2_10.48 {} PCRE2_10.47; diff --git a/vcpkg/ports/pcre2/no-static-suffix.patch b/vcpkg/ports/pcre2/no-static-suffix.patch new file mode 100644 index 000000000..4c81e96e0 --- /dev/null +++ b/vcpkg/ports/pcre2/no-static-suffix.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 523bdcb..9d5d1a4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -942,8 +942,8 @@ if(PCRE2_BUILD_PCRE2_8) + list(APPEND TARGETS pcre2-posix-static) + + if(MSVC) +- set_target_properties(pcre2-8-static PROPERTIES OUTPUT_NAME pcre2-8-static) +- set_target_properties(pcre2-posix-static PROPERTIES OUTPUT_NAME pcre2-posix-static) ++ set_target_properties(pcre2-8-static PROPERTIES OUTPUT_NAME pcre2-8) ++ set_target_properties(pcre2-posix-static PROPERTIES OUTPUT_NAME pcre2-posix) + else() + set_target_properties(pcre2-8-static PROPERTIES OUTPUT_NAME pcre2-8) + set_target_properties(pcre2-posix-static PROPERTIES OUTPUT_NAME pcre2-posix) +@@ -1049,7 +1049,7 @@ if(PCRE2_BUILD_PCRE2_16) + list(APPEND TARGETS pcre2-16-static) + + if(MSVC) +- set_target_properties(pcre2-16-static PROPERTIES OUTPUT_NAME pcre2-16-static) ++ set_target_properties(pcre2-16-static PROPERTIES OUTPUT_NAME pcre2-16) + else() + set_target_properties(pcre2-16-static PROPERTIES OUTPUT_NAME pcre2-16) + endif() +@@ -1127,7 +1127,7 @@ if(PCRE2_BUILD_PCRE2_32) + list(APPEND TARGETS pcre2-32-static) + + if(MSVC) +- set_target_properties(pcre2-32-static PROPERTIES OUTPUT_NAME pcre2-32-static) ++ set_target_properties(pcre2-32-static PROPERTIES OUTPUT_NAME pcre2-32) + else() + set_target_properties(pcre2-32-static PROPERTIES OUTPUT_NAME pcre2-32) + endif() diff --git a/vcpkg/ports/pcre2/pcre2-10.35_fix-uwp.patch b/vcpkg/ports/pcre2/pcre2-10.35_fix-uwp.patch new file mode 100644 index 000000000..16d8d7711 --- /dev/null +++ b/vcpkg/ports/pcre2/pcre2-10.35_fix-uwp.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c970996..523bdcb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -894,6 +894,7 @@ endif() + + if(MSVC) + add_compile_definitions(_CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS) ++ add_compile_options(/wd4146) + endif() + + set(TARGETS) diff --git a/vcpkg/ports/pcre2/portfile.cmake b/vcpkg/ports/pcre2/portfile.cmake new file mode 100644 index 000000000..46d5a9321 --- /dev/null +++ b/vcpkg/ports/pcre2/portfile.cmake @@ -0,0 +1,145 @@ +vcpkg_from_github( + OUT_SOURCE_PATH + SOURCE_PATH + REPO + PCRE2Project/pcre2 + REF + "pcre2-${VERSION}" + SHA512 + 4deef8ce95711e65fe07624e6b2aace794594adb15e8363a0279a7b947bf5c75a5858fbdc5251d0a28a7ca97ae8bba561aa5f85805d5c07d417d3e7b3b3486a4 + HEAD_REF + master + PATCHES + pcre2-10.35_fix-uwp.patch + no-static-suffix.patch + # TODO: remove with version 10.48, the issue should be fixed + fix-lld-version-script.patch +) + +vcpkg_from_github( + OUT_SOURCE_PATH + SLJIT_SOURCE_PATH + REPO + zherczeg/sljit + REF + 45f910b78c6605ebf5b53d3ec7cb00f2312fe417 + SHA512 + c05c83cc762f430c01e2aaf876aaac41a70b67ed8b91bc81102ad527c8921c5e75b41bab35bb8237dd5f53fecd7b8f31206865efffce2ea0a1aa9c87079fc643 + HEAD_REF + main +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/deps/sljit") +file(MAKE_DIRECTORY "${SOURCE_PATH}/deps") +file(RENAME "${SLJIT_SOURCE_PATH}" "${SOURCE_PATH}/deps/sljit") + +string( + COMPARE EQUAL + "${VCPKG_LIBRARY_LINKAGE}" + "static" + BUILD_STATIC +) +string( + COMPARE EQUAL + "${VCPKG_LIBRARY_LINKAGE}" + "dynamic" + INSTALL_PDB +) +string( + COMPARE EQUAL + "${VCPKG_CRT_LINKAGE}" + "static" + BUILD_STATIC_CRT +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS + FEATURE_OPTIONS + FEATURES + jit + PCRE2_SUPPORT_JIT +) + +vcpkg_cmake_configure( + SOURCE_PATH + "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DBUILD_STATIC_LIBS=${BUILD_STATIC} + -DPCRE2_STATIC_RUNTIME=${BUILD_STATIC_CRT} + -DPCRE2_BUILD_PCRE2_8=ON + -DPCRE2_BUILD_PCRE2_16=ON + -DPCRE2_BUILD_PCRE2_32=ON + -DPCRE2_SUPPORT_UNICODE=ON + -DPCRE2_BUILD_TESTS=OFF + -DPCRE2_BUILD_PCRE2GREP=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=ON + -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Readline=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Editline=ON + -DINSTALL_MSVC_PDB=${INSTALL_PDB} +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +file(READ "${CURRENT_PACKAGES_DIR}/include/pcre2.h" PCRE2_H) +if (BUILD_STATIC) + string( + REPLACE "defined(PCRE2_STATIC)" + "1" + PCRE2_H + "${PCRE2_H}" + ) +else () + string( + REPLACE "defined(PCRE2_STATIC)" + "0" + PCRE2_H + "${PCRE2_H}" + ) +endif () +file(WRITE "${CURRENT_PACKAGES_DIR}/include/pcre2.h" "${PCRE2_H}") + +vcpkg_fixup_pkgconfig() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) + +file( + REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/man" + "${CURRENT_PACKAGES_DIR}/share/doc" + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/man" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/pcre2") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/pcre2-config" + "${CURRENT_PACKAGES_DIR}/tools/pcre2/pcre2-config" +) +vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/tools/pcre2/pcre2-config" "${CURRENT_PACKAGES_DIR}" + [[$(cd "$(dirname "$0")/../.."; pwd -P)]] +) +if (NOT VCPKG_BUILD_TYPE) + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/pcre2/debug") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/pcre2-config" + "${CURRENT_PACKAGES_DIR}/tools/pcre2/debug/pcre2-config" + ) + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/tools/pcre2/debug/pcre2-config" + "${CURRENT_PACKAGES_DIR}/debug" [[$(cd "$(dirname "$0")/../../../debug"; pwd -P)]] + ) + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/tools/pcre2/debug/pcre2-config" [[${prefix}/include]] + [[${prefix}/../include]] + ) +endif () +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin") +endif () + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" +) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/vcpkg/ports/pcre2/usage b/vcpkg/ports/pcre2/usage new file mode 100644 index 000000000..a23aadd33 --- /dev/null +++ b/vcpkg/ports/pcre2/usage @@ -0,0 +1,6 @@ +The package pcre2 is compatible with built-in CMake targets: + + # Each component imports a target: + # TARGETS: PCRE2::8BIT PCRE2::16BIT PCRE2::32BIT PCRE2::POSIX + find_package(pcre2 CONFIG REQUIRED) + target_link_libraries(main PRIVATE PCRE2::8BIT PCRE2::16BIT PCRE2::32BIT PCRE2::POSIX) diff --git a/vcpkg/ports/pcre2/vcpkg.json b/vcpkg/ports/pcre2/vcpkg.json new file mode 100644 index 000000000..55e1d20d4 --- /dev/null +++ b/vcpkg/ports/pcre2/vcpkg.json @@ -0,0 +1,38 @@ +{ + "name": "pcre2", + "version": "10.47", + "description": "Regular Expression pattern matching using the same syntax and semantics as Perl 5.", + "homepage": "https://github.com/PCRE2Project/pcre2", + "license": "BSD-3-Clause", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "platform-default-features" + ], + "features": { + "jit": { + "description": "Enable support for Just-In-Time compiling regex matchers", + "supports": "!emscripten & !ios" + }, + "platform-default-features": { + "description": "Enable default features", + "dependencies": [ + { + "name": "pcre2", + "features": [ + "jit" + ], + "platform": "!emscripten & !ios" + } + ] + } + } +} diff --git a/vcpkg/ports/qca/connect_fix.patch b/vcpkg/ports/qca/connect_fix.patch deleted file mode 100644 index 0a2aa1377..000000000 --- a/vcpkg/ports/qca/connect_fix.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/src/qca_safeobj.h b/src/qca_safeobj.h -index 5c47adad..20570b27 100644 ---- a/src/qca_safeobj.h -+++ b/src/qca_safeobj.h -@@ -57,7 +57,7 @@ public Q_SLOTS: - } - - Q_SIGNALS: -- void activated(); -+ void activated(QSocketDescriptor socket, QSocketNotifier::Type type); - - private: - QSocketNotifier *sn; -diff --git a/src/support/qpipe.cpp b/src/support/qpipe.cpp -index 122e96a8..2d9d8ab7 100644 ---- a/src/support/qpipe.cpp -+++ b/src/support/qpipe.cpp -@@ -1075,8 +1075,10 @@ public Q_SLOTS: - #endif - } - -- void sn_read_activated() -+ void sn_read_activated(QSocketDescriptor socket, QSocketNotifier::Type type) - { -+ Q_UNUSED(socket) -+ Q_UNUSED(type) - #ifdef Q_OS_UNIX - if (blockReadNotify) - return; diff --git a/vcpkg/ports/qca/ios.patch b/vcpkg/ports/qca/ios.patch deleted file mode 100644 index 06d53bd2c..000000000 --- a/vcpkg/ports/qca/ios.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 47773219..0e2b90ac 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -52,7 +52,7 @@ SET( SOURCES - - IF (WIN32) - SET( SOURCES ${SOURCES} qca_systemstore_win.cpp ) --elseif(APPLE AND NOT IOS) -+elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set( SOURCES ${SOURCES} qca_systemstore_mac.cpp) - else() - SET( SOURCES ${SOURCES} qca_systemstore_flatfile.cpp ) diff --git a/vcpkg/ports/qgis/cmakelists.patch b/vcpkg/ports/qgis/cmakelists.patch index d2b22c7d2..67ae46bb9 100644 --- a/vcpkg/ports/qgis/cmakelists.patch +++ b/vcpkg/ports/qgis/cmakelists.patch @@ -1,14 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8dedb77f592..9f7ebbde85d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -387,6 +387,7 @@ if(WITH_CORE) +@@ -449,6 +449,7 @@ if(WITH_CORE) message(STATUS "Found Geos: ${GEOS_VERSION} ${GEOS_DIR}") find_package(GDAL REQUIRED) message(STATUS "Found GDAL: ${GDAL_VERSION} ${GDAL_DIR}") + set(GDAL_LIBRARY ${GDAL_LIBRARIES}) find_package(EXPAT REQUIRED) - find_package(Spatialindex REQUIRED) - find_package(LibZip REQUIRED) -@@ -409,7 +410,8 @@ if(WITH_CORE) + set (WITH_INTERNAL_SPATIALINDEX FALSE CACHE BOOL "Determines whether spatialindex should be built from internal copy") + IF(WITH_INTERNAL_SPATIALINDEX) +@@ -480,7 +481,8 @@ if(WITH_CORE) find_package(ZLIB REQUIRED) # for decompression of vector tiles in MBTiles file message(STATUS "Found zlib: ${ZLIB_LIBRARIES}") @@ -18,22 +20,23 @@ # optional if (WITH_POSTGRESQL) -@@ -604,6 +606,10 @@ if(WITH_CORE) +@@ -675,6 +677,10 @@ if(WITH_CORE) else() find_package(Qt5Keychain CONFIG REQUIRED) endif() + set(QTKEYCHAIN_INCLUDE_DIR ${QTKEYCHAIN_INCLUDE_DIRS}/qt6keychain) + set(QTKEYCHAIN_LIBRARY ${QTKEYCHAIN_LIBRARIES}) -+ set(QTKEYCHAIN_FOUND ${Qt6Keychain_FOUND}) -+ ++ set(QTKEYCHAIN_FOUND ${Qt6Keychain_FOUND}) ++ # Master password hash and authentication encryption find_package(QCA REQUIRED) # Check for runtime dependency of qca-ossl plugin -@@ -818,6 +824,7 @@ endif() - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") +@@ -886,6 +892,7 @@ if(MSVC) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:8388608") # disable macros that offend std::numeric_limits::min()/max() add_definitions(-DNOMINMAX) + add_definitions(/bigobj) endif() - # Prevent build when Qt api deprecated before this Qt version is used: + if(BUILD_WITH_QT6) + \ No newline at end of file diff --git a/vcpkg/ports/qgis/point-cloud-guard.patch b/vcpkg/ports/qgis/point-cloud-guard.patch new file mode 100644 index 000000000..d03f8a4d5 --- /dev/null +++ b/vcpkg/ports/qgis/point-cloud-guard.patch @@ -0,0 +1,239 @@ +diff --git a/external/lazperf/lazperf_base.hpp b/external/lazperf/lazperf_base.hpp +index 864ca2c2f7d..234af5a50ec 100644 +--- a/external/lazperf/lazperf_base.hpp ++++ b/external/lazperf/lazperf_base.hpp +@@ -7,8 +7,12 @@ + #define LAZPERF_VERSION 3.0.0 + + #ifdef _WIN32 ++#if WITH_EPT || WITH_COPC + #define LAZPERF_EXPORT __declspec(dllexport) + #else ++#define LAZPERF_EXPORT ++#endif ++#else + // This may not be necessary. The GCC doc says it take __declspec((dllexport)) + #define LAZPERF_EXPORT __attribute__((visibility ("default"))) + #endif +diff --git a/src/core/pointcloud/qgscopcpointcloudindex.h b/src/core/pointcloud/qgscopcpointcloudindex.h +index 2b18d53ce89..f68682d8c39 100644 +--- a/src/core/pointcloud/qgscopcpointcloudindex.h ++++ b/src/core/pointcloud/qgscopcpointcloudindex.h +@@ -32,7 +32,9 @@ + #include "qgspointcloudstatistics.h" + + #include "qgslazinfo.h" ++#if WITH_EPT || WITH_COPC + #include "lazperf/vlr.hpp" ++#endif + + ///@cond PRIVATE + #define SIP_NO_FILE +@@ -109,7 +111,9 @@ class CORE_EXPORT QgsCopcPointCloudIndex: public QgsAbstractPointCloudIndex + bool mIsValid = false; + Qgis::PointCloudAccessType mAccessType = Qgis::PointCloudAccessType::Local; + mutable std::ifstream mCopcFile; ++#if WITH_EPT || WITH_COPC + mutable lazperf::copc_info_vlr mCopcInfoVlr; ++#endif + mutable QHash> mHierarchyNodePos; //!< Additional data hierarchy for COPC + + mutable QMutex mFileMutex; +diff --git a/src/core/pointcloud/qgspointcloudeditingindex.cpp b/src/core/pointcloud/qgspointcloudeditingindex.cpp +index 40aecdc9a1f..76280678ba0 100644 +--- a/src/core/pointcloud/qgspointcloudeditingindex.cpp ++++ b/src/core/pointcloud/qgspointcloudeditingindex.cpp +@@ -118,8 +118,11 @@ std::unique_ptr< QgsPointCloudBlock > QgsPointCloudEditingIndex::nodeData( const + QgsCopcPointCloudIndex *copcIndex = static_cast( mIndex.get() ); + + int pointCount = copcIndex->mHierarchy.value( n ); +- ++#if WITH_EPT || WITH_COPC + return QgsLazDecoder::decompressCopc( rawBlockData, *copcIndex->mLazInfo.get(), pointCount, requestAttributes, filterExpression, filterRect ); ++#else ++ return {}; ++#endif + } + else + { +@@ -172,6 +175,7 @@ bool QgsPointCloudEditingIndex::commitChanges( QString *errorMessage ) + QFileInfo fileInfo( mUri ); + const QString outputFilename = fileInfo.dir().filePath( fileInfo.baseName() + QStringLiteral( "-update.copc.laz" ) ); + ++#if WITH_EPT || WITH_COPC + if ( !QgsCopcUpdate::writeUpdatedFile( mUri, outputFilename, updatedChunks, errorMessage ) ) + { + return false; +@@ -180,6 +184,7 @@ bool QgsPointCloudEditingIndex::commitChanges( QString *errorMessage ) + // reset the underlying index - we will reload it at the end + QgsCopcPointCloudIndex *copcIndex = static_cast( mIndex.get() ); + copcIndex->reset(); ++#endif + + const QString originalFilename = fileInfo.dir().filePath( fileInfo.baseName() + QStringLiteral( "-original.copc.laz" ) ); + if ( !QFile::rename( mUri, originalFilename ) ) +@@ -209,8 +214,10 @@ bool QgsPointCloudEditingIndex::commitChanges( QString *errorMessage ) + + mEditedNodeData.clear(); + ++#if WITH_EPT || WITH_COPC + // now let's reload + copcIndex->load( mUri ); ++#endif + + return true; + } +diff --git a/src/core/pointcloud/qgspointcloudlayer.cpp b/src/core/pointcloud/qgspointcloudlayer.cpp +index d7147110757..9c58ccf9f20 100644 +--- a/src/core/pointcloud/qgspointcloudlayer.cpp ++++ b/src/core/pointcloud/qgspointcloudlayer.cpp +@@ -45,7 +45,9 @@ + #include "qgsthreadingutils.h" + #include "qgspointcloudlayerprofilegenerator.h" + #include "qgspointcloudlayerundocommand.h" ++#if WITH_EPT || WITH_COPC + #include "qgsvirtualpointcloudprovider.h" ++#endif + + + #include +@@ -960,6 +962,7 @@ void QgsPointCloudLayer::loadIndexesForRenderContext( QgsRenderContext &renderer + } + + const QVector subIndex = mDataProvider->subIndexes(); ++#if WITH_EPT || WITH_COPC + if ( const QgsVirtualPointCloudProvider *vpcProvider = dynamic_cast( mDataProvider.get() ) ) + { + for ( int i = 0; i < subIndex.size(); ++i ) +@@ -976,6 +979,7 @@ void QgsPointCloudLayer::loadIndexesForRenderContext( QgsRenderContext &renderer + } + } + } ++#endif + } + } + +diff --git a/src/core/pointcloud/qgspointcloudlayereditutils.cpp b/src/core/pointcloud/qgspointcloudlayereditutils.cpp +index 94704bb5351..f29b9dedace 100644 +--- a/src/core/pointcloud/qgspointcloudlayereditutils.cpp ++++ b/src/core/pointcloud/qgspointcloudlayereditutils.cpp +@@ -19,9 +19,10 @@ + #include "qgscopcpointcloudindex.h" + #include + ++#if WITH_EPT || WITH_COPC + #include + #include +- ++#endif + + static void updatePoint( char *pointBuffer, int pointFormat, const QString &attributeName, double newValue ) + { +@@ -141,6 +142,7 @@ QByteArray QgsPointCloudLayerEditUtils::updateChunkValues( QgsCopcPointCloudInde + pointCount = copcIndex->mHierarchy[n]; + } + ++#if WITH_EPT || WITH_COPC + lazperf::header14 header = copcIndex->mLazInfo->header(); + + lazperf::reader::chunk_decompressor decompressor( header.pointFormat(), header.ebCount(), chunkData.constData() ); +@@ -169,6 +171,9 @@ QByteArray QgsPointCloudLayerEditUtils::updateChunkValues( QgsCopcPointCloudInde + + std::vector data = compressor.done(); + return QByteArray( ( const char * ) data.data(), ( int ) data.size() ); // QByteArray makes a deep copy ++#else ++ return {}; ++#endif + } + + bool QgsPointCloudLayerEditUtils::isAttributeValueValid( const QgsPointCloudAttribute &attribute, double value ) +diff --git a/src/core/pointcloud/qgspointcloudlayerelevationproperties.cpp b/src/core/pointcloud/qgspointcloudlayerelevationproperties.cpp +index de43f05bebd..64580b10524 100644 +--- a/src/core/pointcloud/qgspointcloudlayerelevationproperties.cpp ++++ b/src/core/pointcloud/qgspointcloudlayerelevationproperties.cpp +@@ -21,7 +21,9 @@ + #include "qgsapplication.h" + #include "qgscolorschemeregistry.h" + #include "qgscolorutils.h" ++#if WITH_EPT || WITH_COPC + #include "qgsvirtualpointcloudprovider.h" ++#endif + + QgsPointCloudLayerElevationProperties::QgsPointCloudLayerElevationProperties( QObject *parent ) + : QgsMapLayerElevationProperties( parent ) +@@ -138,6 +140,7 @@ QgsDoubleRange QgsPointCloudLayerElevationProperties::calculateZRange( QgsMapLay + zMax = stats.maximum( QStringLiteral( "Z" ) ); + } + // try to fetch the elevation properties from virtual point cloud metadata ++#if WITH_EPT || WITH_COPC + else if ( QgsVirtualPointCloudProvider *virtualProvider = dynamic_cast< QgsVirtualPointCloudProvider * >( pcLayer->dataProvider() ) ) + { + for ( QgsPointCloudSubIndex subIndex : virtualProvider->subIndexes() ) +@@ -148,6 +151,7 @@ QgsDoubleRange QgsPointCloudLayerElevationProperties::calculateZRange( QgsMapLay + zMax = std::isnan( zMax ) ? newRange.upper() : std::max( zMax, newRange.upper() ); + } + } ++#endif + + if ( !std::isnan( zMin ) && !std::isnan( zMax ) ) + { +diff --git a/src/core/pointcloud/qgspointcloudlayerrenderer.cpp b/src/core/pointcloud/qgspointcloudlayerrenderer.cpp +index ac38367f6de..f0426ce9bc8 100644 +--- a/src/core/pointcloud/qgspointcloudlayerrenderer.cpp ++++ b/src/core/pointcloud/qgspointcloudlayerrenderer.cpp +@@ -36,7 +36,9 @@ + #include "qgspointcloudrequest.h" + #include "qgsrendercontext.h" + #include "qgsruntimeprofiler.h" ++#if WITH_EPT || WITH_COPC + #include "qgsvirtualpointcloudprovider.h" ++#endif + + #include + +@@ -77,6 +79,7 @@ QgsPointCloudLayerRenderer::QgsPointCloudLayerRenderer( QgsPointCloudLayer *laye + mZScale = elevationProps->zScale(); + } + ++ #if WITH_EPT || WITH_COPC + if ( const QgsVirtualPointCloudProvider *vpcProvider = dynamic_cast( layer->dataProvider() ) ) + { + mIsVpc = true; +@@ -84,6 +87,7 @@ QgsPointCloudLayerRenderer::QgsPointCloudLayerRenderer( QgsPointCloudLayer *laye + mAverageSubIndexHeight = vpcProvider->averageSubIndexHeight(); + mOverviewIndex = vpcProvider->overview(); + } ++ #endif + + mCloudExtent = layer->dataProvider()->polygonBounds(); + +diff --git a/src/core/pointcloud/qgspointcloudlayerundocommand.cpp b/src/core/pointcloud/qgspointcloudlayerundocommand.cpp +index 816ebb4564b..b5652c751ea 100644 +--- a/src/core/pointcloud/qgspointcloudlayerundocommand.cpp ++++ b/src/core/pointcloud/qgspointcloudlayerundocommand.cpp +@@ -100,6 +100,7 @@ void QgsPointCloudLayerUndoCommandChangeAttribute::redo() + + void QgsPointCloudLayerUndoCommandChangeAttribute::undoRedoPrivate( bool isUndo ) + { ++#if WITH_EPT || WITH_COPC + QgsEventTracing::ScopedEvent _trace( QStringLiteral( "PointCloud" ), QStringLiteral( "QgsPointCloudLayerUndoCommand::undoRedoPrivate" ) ); + QgsPointCloudEditingIndex *editIndex = dynamic_cast( mLayer->index().get() ); + QgsCopcPointCloudIndex *copcIndex = dynamic_cast( editIndex->backingIndex().get() ); +@@ -141,4 +142,5 @@ void QgsPointCloudLayerUndoCommandChangeAttribute::undoRedoPrivate( bool isUndo + { + emit mLayer->chunkAttributeValuesChanged( it.key() ); + } ++#endif + } +diff --git a/src/core/pointcloud/qgspointcloudrenderer.cpp b/src/core/pointcloud/qgspointcloudrenderer.cpp +index c27e90b0a77..0db83906c63 100644 +--- a/src/core/pointcloud/qgspointcloudrenderer.cpp ++++ b/src/core/pointcloud/qgspointcloudrenderer.cpp +@@ -25,7 +25,6 @@ + #include "qgslogger.h" + #include "qgscircle.h" + #include "qgsunittypes.h" +-#include "qgsvirtualpointcloudprovider.h" + + #include + #include diff --git a/vcpkg/ports/qgis/portfile.cmake b/vcpkg/ports/qgis/portfile.cmake index b335a3e56..d98e62100 100644 --- a/vcpkg/ports/qgis/portfile.cmake +++ b/vcpkg/ports/qgis/portfile.cmake @@ -1,6 +1,6 @@ -set(QGIS_REF 55d788f1f80183bd52fd8045c1fbed5e6260f194) # final-3_40_4 +set(QGIS_REF 565fe70bd9e0b3f95e89bffbfbed33a97b71edce) # final-3_44_10 set(QGIS_SHA512 - 6eb3e2259fda72f7e2e8203d951b891963d52d47128793af02dfa989a467ba5524ab7a1019b4cf4acfd9e70c21635bd7b8577dc452d5cf7b98fcf7ce03d97b9f + 3bc4908c04a54be29829f052d09e4b16ca31d469f205ab96514b57024ebdce69bdb669438fd141bb1112b03e6f70291ae253635e282df0434560f2217e5008c6 ) vcpkg_from_github( @@ -18,6 +18,9 @@ vcpkg_from_github( libxml2.patch qgis4-project-properties.patch qgis4_url_encoding.patch + snapping-casting.patch + qflags-qstring-arg.patch + point-cloud-guard.patch ) file(REMOVE ${SOURCE_PATH}/cmake/FindQtKeychain.cmake) @@ -36,39 +39,27 @@ vcpkg_add_to_path(${PYTHON3_PATH}/Scripts) set(PYTHON_EXECUTABLE ${PYTHON3}) list(APPEND QGIS_OPTIONS -DFORCE_STATIC_LIBS:BOOL=ON) -list(APPEND QGIS_OPTIONS -DWITH_SPATIALITE:BOOL=ON) list(APPEND QGIS_OPTIONS -DBUILD_WITH_QT6:BOOL=ON) list(APPEND QGIS_OPTIONS -DENABLE_TESTS:BOOL=OFF) list(APPEND QGIS_OPTIONS -DWITH_QTWEBKIT:BOOL=OFF) list(APPEND QGIS_OPTIONS -DWITH_GRASS7:BOOL=OFF) -list(APPEND QGIS_OPTIONS -DWITH_QSPATIALITE:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_GRASS8:BOOL=OFF) list(APPEND QGIS_OPTIONS -DUSE_OPENCL:BOOL=OFF) list(APPEND QGIS_OPTIONS -DWITH_BINDINGS:BOOL=OFF) list(APPEND QGIS_OPTIONS -DWITH_GUI:BOOL=OFF) list(APPEND QGIS_OPTIONS -DWITH_DESKTOP:BOOL=OFF) -list(APPEND QGIS_OPTIONS -DWITH_CUSTOM_WIDGETS:BOOL=OFF) -list(APPEND QGIS_OPTIONS -DWITH_SERVER_PLUGINS:BOOL=OFF) -list(APPEND QGIS_OPTIONS -DWITH_SERVER:BOOL=OFF) list(APPEND QGIS_OPTIONS -DWITH_QGIS_PROCESS:BOOL=OFF) -list(APPEND QGIS_OPTIONS -DWITH_PDAL:BOOL=OFF) -list(APPEND QGIS_OPTIONS -DWITH_EPT:BOOL=OFF) list(APPEND QGIS_OPTIONS -DWITH_3D:BOOL=OFF) list(APPEND QGIS_OPTIONS -DWITH_DRACO:BOOL=OFF) -list(APPEND QGIS_OPTIONS -DWITH_COPC=OFF) -list(APPEND QGIS_OPTIONS -DWITH_ANALYSIS=OFF) -list(APPEND QGIS_OPTIONS -DWITH_GRASS=OFF) -list(APPEND QGIS_OPTIONS -DWITH_GEOREFERENCER:BOOL=OFF) -list(APPEND QGIS_OPTIONS -DWITH_QTMOBILITY:BOOL=OFF) -list(APPEND QGIS_OPTIONS -DENABLE_TESTS=OFF) -list(APPEND QGIS_OPTIONS -DWITH_QWTPOLAR=OFF) -list(APPEND QGIS_OPTIONS -DWITH_GUI=OFF) -list(APPEND QGIS_OPTIONS -DWITH_APIDOC=OFF) -list(APPEND QGIS_OPTIONS -DWITH_ASTYLE=OFF) -list(APPEND QGIS_OPTIONS -DWITH_QT5SERIALPORT=OFF) -list(APPEND QGIS_OPTIONS -DWITH_QUICK:BOOL=OFF) -list(APPEND QGIS_OPTIONS -DQGIS_MACAPP_FRAMEWORK=FALSE) -list(APPEND QGIS_OPTIONS -DWITH_QTSERIALPORT=FALSE) +list(APPEND QGIS_OPTIONS -DWITH_COPC:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_PDAL:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_EPT:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_ANALYSIS:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_GUI:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DQGIS_MACAPP_FRAMEWORK:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_QTSERIALPORT:BOOL=OFF) +list(APPEND QGIS_OPTIONS -DWITH_INTERNAL_POLY2TRI:BOOL=OFF) # Configure debug and release library paths macro ( @@ -222,8 +213,6 @@ if (VCPKG_TARGET_IS_WINDOWS) ) endif () -list(APPEND QGIS_OPTIONS "-DWITH_INTERNAL_POLY2TRI:BOOL=OFF") - if (VCPKG_CROSSCOMPILING) list(APPEND QGIS_OPTIONS -DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR}) list(APPEND QGIS_OPTIONS @@ -407,7 +396,7 @@ if (QGIS_CMAKE_PATH_DEBUG) endif () file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE # Added for debug porpose +file(REMOVE_RECURSE # Added for debug purpose ${CURRENT_PACKAGES_DIR}/debug/share ) diff --git a/vcpkg/ports/qgis/qflags-qstring-arg.patch b/vcpkg/ports/qgis/qflags-qstring-arg.patch new file mode 100644 index 000000000..1db8c63e6 --- /dev/null +++ b/vcpkg/ports/qgis/qflags-qstring-arg.patch @@ -0,0 +1,62 @@ +diff --git a/src/core/providers/gdal/qgsgdalprovider.cpp b/src/core/providers/gdal/qgsgdalprovider.cpp +index 9078011d516..fb5f4bdd5ff 100644 +--- a/src/core/providers/gdal/qgsgdalprovider.cpp ++++ b/src/core/providers/gdal/qgsgdalprovider.cpp +@@ -3166,7 +3166,7 @@ QgsRasterBandStats QgsGdalProvider::bandStatistics( int bandNo, Qgis::RasterBand + | Qgis::RasterBandStatistic::Range | Qgis::RasterBandStatistic::Mean + | Qgis::RasterBandStatistic::StdDev; + +- QgsDebugMsgLevel( QStringLiteral( "theStats = %1 supportedStats = %2" ).arg( stats, 0, 2 ).arg( supportedStats, 0, 2 ), 2 ); ++ QgsDebugMsgLevel( QStringLiteral( "theStats = %1 supportedStats = %2" ).arg( static_cast( stats ), 0, 2 ).arg( static_cast( supportedStats ), 0, 2 ), 2 ); + + if ( myRasterBandStats.extent != extent() || + ( stats & ( ~supportedStats ) ) ) +diff --git a/src/core/raster/qgsrasterinterface.cpp b/src/core/raster/qgsrasterinterface.cpp +index bbd88574da0..942ea6c444e 100644 +--- a/src/core/raster/qgsrasterinterface.cpp ++++ b/src/core/raster/qgsrasterinterface.cpp +@@ -101,7 +101,7 @@ bool QgsRasterInterface::hasStatistics( int bandNo, + const QgsRectangle &extent, + int sampleSize ) + { +- QgsDebugMsgLevel( QStringLiteral( "theBandNo = %1 stats = %2 sampleSize = %3" ).arg( bandNo ).arg( stats ).arg( sampleSize ), 4 ); ++ QgsDebugMsgLevel( QStringLiteral( "theBandNo = %1 stats = %2 sampleSize = %3" ).arg( bandNo ).arg( static_cast( stats ) ).arg( sampleSize ), 4 ); + if ( mStatistics.isEmpty() ) return false; + + QgsRasterBandStats myRasterBandStats; +@@ -124,7 +124,7 @@ QgsRasterBandStats QgsRasterInterface::bandStatistics( int bandNo, + const QgsRectangle &extent, + int sampleSize, QgsRasterBlockFeedback *feedback ) + { +- QgsDebugMsgLevel( QStringLiteral( "theBandNo = %1 stats = %2 sampleSize = %3" ).arg( bandNo ).arg( stats ).arg( sampleSize ), 4 ); ++ QgsDebugMsgLevel( QStringLiteral( "theBandNo = %1 stats = %2 sampleSize = %3" ).arg( bandNo ).arg( static_cast( stats ) ).arg( sampleSize ), 4 ); + + // TODO: null values set on raster layer!!! + +diff --git a/src/providers/wms/qgswmsprovider.cpp b/src/providers/wms/qgswmsprovider.cpp +index 4e7ba49ba19..7b5d7b1f327 100644 +--- a/src/providers/wms/qgswmsprovider.cpp ++++ b/src/providers/wms/qgswmsprovider.cpp +@@ -2351,7 +2351,7 @@ Qgis::RasterInterfaceCapabilities QgsWmsProvider::capabilities() const + capability |= Qgis::RasterInterfaceCapability::Prefetch; + } + +- QgsDebugMsgLevel( QStringLiteral( "capability = %1" ).arg( capability ), 2 ); ++ QgsDebugMsgLevel( QStringLiteral( "capability = %1" ).arg( static_cast( capability ) ), 2 ); + return capability; + } + +diff --git a/tests/bench/main.cpp b/tests/bench/main.cpp +index 3c085cbefd6..2f329d60984 100644 +--- a/tests/bench/main.cpp ++++ b/tests/bench/main.cpp +@@ -503,7 +503,7 @@ int main( int argc, char *argv[] ) + return 1; + } + } +- QgsDebugMsgLevel( QStringLiteral( "hints: %1" ).arg( hints ), 1 ); ++ QgsDebugMsgLevel( QStringLiteral( "hints: %1" ).arg( static_cast( hints ) ), 1 ); + qbench->setRenderHints( hints ); + } + + \ No newline at end of file diff --git a/vcpkg/ports/qgis/qgis4_url_encoding.patch b/vcpkg/ports/qgis/qgis4_url_encoding.patch index 6d1854015..a53169c5b 100644 --- a/vcpkg/ports/qgis/qgis4_url_encoding.patch +++ b/vcpkg/ports/qgis/qgis4_url_encoding.patch @@ -423,10 +423,10 @@ index e539eb0be69..d73454fa428 100644 diff --git a/tests/src/core/testqgsvectortilelayer.cpp b/tests/src/core/testqgsvectortilelayer.cpp -index 4a5f82f0b0d..99c0b503c30 100644 +index abbca2a1aed..450cc5c2eb0 100644 --- a/tests/src/core/testqgsvectortilelayer.cpp +++ b/tests/src/core/testqgsvectortilelayer.cpp -@@ -256,11 +256,12 @@ void TestQgsVectorTileLayer::testMbtilesProviderMetadata() +@@ -260,11 +260,12 @@ void TestQgsVectorTileLayer::testMbtilesProviderMetadata() QCOMPARE( vectorTileMetadata->validLayerTypesForUri( QStringLiteral( "type=mbtiles&url=%1/vector_tile/mbtiles_vt.mbtiles" ).arg( TEST_DATA_DIR ) ), { Qgis::LayerType::VectorTile } ); // query sublayers @@ -440,7 +440,7 @@ index 4a5f82f0b0d..99c0b503c30 100644 QCOMPARE( sublayers.at( 0 ).type(), Qgis::LayerType::VectorTile ); QVERIFY( !sublayers.at( 0 ).skippedContainerScan() ); QVERIFY( !QgsProviderUtils::sublayerDetailsAreIncomplete( sublayers ) ); -@@ -269,7 +270,7 @@ void TestQgsVectorTileLayer::testMbtilesProviderMetadata() +@@ -273,7 +274,7 @@ void TestQgsVectorTileLayer::testMbtilesProviderMetadata() QCOMPARE( sublayers.size(), 1 ); QCOMPARE( sublayers.at( 0 ).providerKey(), QStringLiteral( "mbtilesvectortiles" ) ); QCOMPARE( sublayers.at( 0 ).name(), QStringLiteral( "mbtiles_vt" ) ); @@ -449,7 +449,7 @@ index 4a5f82f0b0d..99c0b503c30 100644 QCOMPARE( sublayers.at( 0 ).type(), Qgis::LayerType::VectorTile ); QVERIFY( !sublayers.at( 0 ).skippedContainerScan() ); -@@ -278,7 +279,7 @@ void TestQgsVectorTileLayer::testMbtilesProviderMetadata() +@@ -282,7 +283,7 @@ void TestQgsVectorTileLayer::testMbtilesProviderMetadata() QCOMPARE( sublayers.size(), 1 ); QCOMPARE( sublayers.at( 0 ).providerKey(), QStringLiteral( "mbtilesvectortiles" ) ); QCOMPARE( sublayers.at( 0 ).name(), QStringLiteral( "mbtiles_vt" ) ); @@ -458,7 +458,7 @@ index 4a5f82f0b0d..99c0b503c30 100644 QCOMPARE( sublayers.at( 0 ).type(), Qgis::LayerType::VectorTile ); QVERIFY( sublayers.at( 0 ).skippedContainerScan() ); QVERIFY( QgsProviderUtils::sublayerDetailsAreIncomplete( sublayers ) ); -@@ -287,17 +288,19 @@ void TestQgsVectorTileLayer::testMbtilesProviderMetadata() +@@ -291,17 +292,19 @@ void TestQgsVectorTileLayer::testMbtilesProviderMetadata() QCOMPARE( sublayers.size(), 1 ); QCOMPARE( sublayers.at( 0 ).providerKey(), QStringLiteral( "mbtilesvectortiles" ) ); QCOMPARE( sublayers.at( 0 ).name(), QStringLiteral( "mbtiles_vt" ) ); @@ -480,7 +480,7 @@ index 4a5f82f0b0d..99c0b503c30 100644 QCOMPARE( sublayers.at( 0 ).type(), Qgis::LayerType::VectorTile ); QVERIFY( sublayers.at( 0 ).skippedContainerScan() ); -@@ -328,8 +331,9 @@ void TestQgsVectorTileLayer::test_relativePathsMbTiles() +@@ -332,8 +335,9 @@ void TestQgsVectorTileLayer::test_relativePathsMbTiles() QgsReadWriteContext contextRel; contextRel.setPathResolver( QgsPathResolver( QStringLiteral( TEST_DATA_DIR ) + QStringLiteral( "/project.qgs" ) ) ); const QgsReadWriteContext contextAbs; @@ -489,9 +489,9 @@ index 4a5f82f0b0d..99c0b503c30 100644 - const QString srcMbtiles = QStringLiteral( "type=mbtiles&url=%1/vector_tile/mbtiles_vt.mbtiles" ).arg( TEST_DATA_DIR ); + const QString srcMbtiles = QStringLiteral( "type=mbtiles&url=%1" ).arg( localMbtilesPath ); - std::unique_ptr layer = std::make_unique( srcMbtiles ); + auto layer = std::make_unique( srcMbtiles ); QVERIFY( layer->isValid() ); -@@ -337,7 +341,7 @@ void TestQgsVectorTileLayer::test_relativePathsMbTiles() +@@ -341,7 +345,7 @@ void TestQgsVectorTileLayer::test_relativePathsMbTiles() // encode source: converting absolute paths to relative const QString srcMbtilesRel = layer->encodedSource( srcMbtiles, contextRel ); @@ -500,7 +500,7 @@ index 4a5f82f0b0d..99c0b503c30 100644 // encode source: keeping absolute paths QCOMPARE( layer->encodedSource( srcMbtiles, contextAbs ), srcMbtiles ); -@@ -377,15 +381,15 @@ void TestQgsVectorTileLayer::test_relativePathsXyz() +@@ -392,15 +396,15 @@ void TestQgsVectorTileLayer::test_relativePathsXyz() contextRel.setPathResolver( QgsPathResolver( "/home/qgis/project.qgs" ) ); const QgsReadWriteContext contextAbs; @@ -509,7 +509,7 @@ index 4a5f82f0b0d..99c0b503c30 100644 + const QString srcXyzLocal = "type=xyz&url=file%3A%2F%2F%2Fhome%2Fqgis%2F%7Bz%7D%2F%7Bx%7D%2F%7By%7D.pbf"; + const QString srcXyzRemote = "type=xyz&url=http%3A%2F%2Fwww.example.com%2F%7Bz%7D%2F%7Bx%7D%2F%7By%7D.pbf"; - std::unique_ptr layer = std::make_unique( srcXyzLocal ); + auto layer = std::make_unique( srcXyzLocal ); QCOMPARE( layer->providerType(), QStringLiteral( "xyzvectortiles" ) ); // encode source: converting absolute paths to relative @@ -519,7 +519,7 @@ index 4a5f82f0b0d..99c0b503c30 100644 QCOMPARE( layer->encodedSource( srcXyzRemote, contextRel ), srcXyzRemote ); // encode source: keeping absolute paths -@@ -421,7 +425,8 @@ void TestQgsVectorTileLayer::test_absoluteRelativeUriXyz() +@@ -436,7 +440,8 @@ void TestQgsVectorTileLayer::test_absoluteRelativeUriXyz() QString absoluteUri = dsAbs.encodedUri(); QString relativeUri = dsRel.encodedUri(); @@ -529,7 +529,7 @@ index 4a5f82f0b0d..99c0b503c30 100644 QCOMPARE( vectorTileMetadata->relativeToAbsoluteUri( relativeUri, context ), absoluteUri ); } -@@ -443,23 +448,23 @@ void TestQgsVectorTileLayer::testVtpkProviderMetadata() +@@ -458,23 +463,23 @@ void TestQgsVectorTileLayer::testVtpkProviderMetadata() QVERIFY( vectorTileMetadata->querySublayers( QStringLiteral( "type=vtpk&url=%1/points.shp" ).arg( TEST_DATA_DIR ) ).isEmpty() ); // vtpk uris @@ -570,7 +570,7 @@ index 4a5f82f0b0d..99c0b503c30 100644 // test that vtpk provider is the preferred provider for vtpk files QList candidates = QgsProviderRegistry::instance()->preferredProvidersForUri( QStringLiteral( "type=vtpk&url=%1/testvtpk.vtpk" ).arg( TEST_DATA_DIR ) ); -@@ -485,7 +490,9 @@ void TestQgsVectorTileLayer::test_relativePathsVtpk() +@@ -500,7 +505,9 @@ void TestQgsVectorTileLayer::test_relativePathsVtpk() contextRel.setPathResolver( QgsPathResolver( QStringLiteral( TEST_DATA_DIR ) + QStringLiteral( "/project.qgs" ) ) ); const QgsReadWriteContext contextAbs; @@ -579,9 +579,9 @@ index 4a5f82f0b0d..99c0b503c30 100644 + + const QString srcVtpk = QStringLiteral( "type=vtpk&url=%1" ).arg( localVtpkPath ); - std::unique_ptr layer = std::make_unique( srcVtpk ); + auto layer = std::make_unique( srcVtpk ); QVERIFY( layer->isValid() ); -@@ -493,7 +500,7 @@ void TestQgsVectorTileLayer::test_relativePathsVtpk() +@@ -508,7 +515,7 @@ void TestQgsVectorTileLayer::test_relativePathsVtpk() // encode source: converting absolute paths to relative const QString srcVtpkRel = layer->encodedSource( srcVtpk, contextRel ); @@ -783,3 +783,4 @@ index 792325c642b..5aa2ab3bd9f 100644 } void TestQgsServerWmsParameters::percent_encoding() + \ No newline at end of file diff --git a/vcpkg/ports/qgis/snapping-casting.patch b/vcpkg/ports/qgis/snapping-casting.patch new file mode 100644 index 000000000..13aa48cfd --- /dev/null +++ b/vcpkg/ports/qgis/snapping-casting.patch @@ -0,0 +1,13 @@ +diff --git a/src/core/qgssnappingutils.cpp b/src/core/qgssnappingutils.cpp +index 8f2f33a05dd..5530773eac3 100644 +--- a/src/core/qgssnappingutils.cpp ++++ b/src/core/qgssnappingutils.cpp +@@ -646,7 +646,7 @@ QString QgsSnappingUtils::dump() + msg += QString( "layer : %1\n" + "config: %2 tolerance %3 %4\n" ) + .arg( layer.layer->name() ) +- .arg( layer.type ).arg( layer.tolerance ).arg( static_cast( layer.unit ) ); ++ .arg( static_cast( layer.type ) ).arg( layer.tolerance ).arg( static_cast( layer.unit ) ); + + if ( mStrategy == IndexAlwaysFull || mStrategy == IndexHybrid || mStrategy == IndexExtent ) + { diff --git a/vcpkg/ports/qgis/vcpkg.json b/vcpkg/ports/qgis/vcpkg.json index 0e065be7f..b1b482933 100644 --- a/vcpkg/ports/qgis/vcpkg.json +++ b/vcpkg/ports/qgis/vcpkg.json @@ -1,6 +1,6 @@ { "name": "qgis", - "version": "3.40.4", + "version": "3.44.10", "port-version": 0, "homepage": "https://qgis.org", "description": "QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)", diff --git a/vcpkg/ports/qtbase/GLIB2-static.patch b/vcpkg/ports/qtbase/GLIB2-static.patch deleted file mode 100644 index c384b741c..000000000 --- a/vcpkg/ports/qtbase/GLIB2-static.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake -index 24a194c..91c8e41 100644 ---- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake -+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake -@@ -95,6 +95,18 @@ find_library(GLIB2_GIO_LIBRARIES - HINTS ${PC_GIO_LIBDIR} - ) - -+pkg_check_modules(PC_GMODULE QUIET gmodule-2.0) -+ -+find_path(GLIB2_GMODULE_INCLUDE_DIRS -+ NAMES gmodule.h -+ HINTS ${PC_GMODULE} -+ PATH_SUFFIXES glib-2.0) -+ -+find_library(GLIB2_GMODULE_LIBRARIES -+ NAMES gmodule-2.0 -+ HINTS ${PC_GMODULE} -+) -+ - # search the glibconfig.h include dir under the same root where the library is found - get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH) - -@@ -126,6 +138,11 @@ if(GLIB2_GIO_LIBRARIES AND GLIB2_GIO_INCLUDE_DIRS) - set(GLIB2_GIO_FOUND TRUE) - endif() - -+if(GLIB2_GMODULE_LIBRARIES AND GLIB2_GMODULE_INCLUDE_DIRS) -+ set(GLIB2_GMODULE_FOUND TRUE) -+endif() -+ -+ - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(GLIB2 - REQUIRED_VARS GLIB2_LIBRARIES GTHREAD2_LIBRARIES GLIB2_INCLUDE_DIRS -@@ -137,6 +154,16 @@ if(GLIB2_FOUND AND NOT TARGET GLIB2::GLIB2) - IMPORTED_LOCATION "${GLIB2_LIBRARIES}" - INTERFACE_LINK_LIBRARIES "${GTHREAD2_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_INCLUDE_DIRS}") -+ #vcpkg specific -+ pkg_check_modules(PC_PCRE2_8BIT QUIET libpcre2-8) -+ find_library(PCRE2_8BIT_LIBRARIES -+ NAMES pcre2-8 -+ HINTS ${PC_PCRE2_8BIT} -+ ) -+ target_link_libraries(GLIB2::GLIB2 INTERFACE ${PCRE2_8BIT_LIBRARIES}) -+ find_package(Iconv) -+ find_package(Intl) -+ target_link_libraries(GLIB2::GLIB2 INTERFACE Intl::Intl Iconv::Iconv) - endif() - - if(GLIB2_GOBJECT_FOUND AND NOT TARGET GLIB2::GOBJECT) -@@ -153,12 +180,21 @@ if(GLIB2_GIO_FOUND AND NOT TARGET GLIB2::GIO) - INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_GIO_INCLUDE_DIRS}") - endif() - -+if(GLIB2_GMODULE_FOUND AND NOT TARGET GLIB2::GMODULE) -+ add_library(GLIB2::GMODULE UNKNOWN IMPORTED) -+ set_target_properties(GLIB2::GMODULE PROPERTIES -+ IMPORTED_LOCATION "${GLIB2_GMODULE_LIBRARIES}" -+ INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_GMODULE_INCLUDE_DIRS}") -+endif() -+ -+ - mark_as_advanced(GLIB2_INCLUDE_DIRS GLIB2_INCLUDE_DIR - GLIB2_LIBRARIES GLIB2_LIBRARY - GLIB2_GOBJECT_INCLUDE_DIRS GLIB2_GOBJECT_INCLUDE_DIR - GLIB2_GOBJECT_LIBRARIES GLIB2_GOBJECT_LIBRARY - GLIB2_GIO_INCLUDE_DIRS GLIB2_GIO_INCLUDE_DIR -- GLIB2_GIO_LIBRARIES GLIB2_GIO_LIBRARY) -+ GLIB2_GIO_LIBRARIES GLIB2_GIO_LIBRARY -+ GLIB2_GMODULE_LIBRARIES GLIB2_GMODULE_INCLUDE_DIRS) - - include(FeatureSummary) - set_package_properties(GLIB2 PROPERTIES diff --git a/vcpkg/ports/qtbase/allow_outside_prefix.patch b/vcpkg/ports/qtbase/allow_outside_prefix.patch deleted file mode 100644 index eeb503bcb..000000000 --- a/vcpkg/ports/qtbase/allow_outside_prefix.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/cmake/QtBuildPathsHelpers.cmake b/cmake/QtBuildPathsHelpers.cmake -index bd186c28b..2c1994d2e 100644 ---- a/cmake/QtBuildPathsHelpers.cmake -+++ b/cmake/QtBuildPathsHelpers.cmake -@@ -141,11 +141,9 @@ function(qt_configure_process_path name default docstring) - elseif(rel_path MATCHES "^\.\./") - # INSTALL_SYSCONFDIR is allowed to be outside the prefix. - if(NOT name STREQUAL "INSTALL_SYSCONFDIR") -- message(FATAL_ERROR -- "Path component '${name}' is outside computed install prefix: ${rel_path} ") - endif() - # Keep the absolute path. - set(new_value "${${name}}") - else() - # Use the canonicalized path. - set(new_value "${rel_path}") - diff --git a/vcpkg/ports/qtbase/clang-cl_QGADGET_fix.diff b/vcpkg/ports/qtbase/clang-cl_QGADGET_fix.diff deleted file mode 100644 index e400649b4..000000000 --- a/vcpkg/ports/qtbase/clang-cl_QGADGET_fix.diff +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h -index e40cd85..ba68a01 100644 ---- a/src/corelib/kernel/qmetatype.h -+++ b/src/corelib/kernel/qmetatype.h -@@ -18,6 +18,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -826,7 +829,13 @@ - struct IsGadgetHelper { enum { IsRealGadget = false, IsGadgetOrDerivedFrom = false }; }; - - template -+#if defined(__clang__) && (__clang_major__ > 11) -+ // Clang does not reject T::QtGadgetHelper as ambiguous if a class inherits from two QGADGETS -+ // but is not a QGADGET itself -+ struct IsGadgetHelper> -+#else - struct IsGadgetHelper -+#endif - { - template - static char checkType(void (X::*)()); -@@ -841,7 +850,11 @@ - struct IsPointerToGadgetHelper { enum { IsRealGadget = false, IsGadgetOrDerivedFrom = false }; }; - - template -+#if defined(__clang__) && (__clang_major__ > 11) -+ struct IsPointerToGadgetHelper> -+#else - struct IsPointerToGadgetHelper -+#endif - { - using BaseType = T; - template diff --git a/vcpkg/ports/qtbase/clang-cl_source_location.patch b/vcpkg/ports/qtbase/clang-cl_source_location.patch deleted file mode 100644 index 5155fb4bb..000000000 --- a/vcpkg/ports/qtbase/clang-cl_source_location.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h -index 823b2057b..4a8cd4fa8 100644 ---- a/src/corelib/kernel/qproperty.h -+++ b/src/corelib/kernel/qproperty.h -@@ -16,8 +16,8 @@ - - #include - --#if __has_include() && __cplusplus >= 202002L && !defined(Q_QDOC) -+#if __has_include() && __cplusplus >= 202002L && !defined(Q_QDOC) && ( (defined(__cpp_consteval) && defined(_MSC_VER)) || !defined(_MSC_VER) ) - #include - #if defined(__cpp_lib_source_location) - #define QT_SOURCE_LOCATION_NAMESPACE std - #define QT_PROPERTY_COLLECT_BINDING_LOCATION diff --git a/vcpkg/ports/qtbase/cmake/qt_install_copyright.cmake b/vcpkg/ports/qtbase/cmake/qt_install_copyright.cmake deleted file mode 100644 index 4a7084b5d..000000000 --- a/vcpkg/ports/qtbase/cmake/qt_install_copyright.cmake +++ /dev/null @@ -1,31 +0,0 @@ -include_guard(GLOBAL) - -# Could probably be the beginning of a vcpkg_install_copyright? -function (qt_install_copyright SOURCE_PATH) - # Find the relevant license file and install it - if (EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") - elseif (EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") - elseif (EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") - elseif (EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") - elseif (EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") - elseif (EXISTS "${SOURCE_PATH}/LICENSE.FDL") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.FDL") - endif () - if (LICENSE_PATH) - file( - INSTALL "${LICENSE_PATH}" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" - RENAME copyright - ) - elseif (EXISTS "${SOURCE_PATH}/LICENSES") - file(GLOB LICENSES "${SOURCE_PATH}/LICENSES/*") - vcpkg_install_copyright(FILE_LIST ${LICENSES}) - else () - message(WARNING "No license/copyright file found!") - endif () -endfunction () diff --git a/vcpkg/ports/qtbase/cmake/qt_install_submodule.cmake b/vcpkg/ports/qtbase/cmake/qt_install_submodule.cmake deleted file mode 100644 index 586a71bc6..000000000 --- a/vcpkg/ports/qtbase/cmake/qt_install_submodule.cmake +++ /dev/null @@ -1,582 +0,0 @@ -include_guard(GLOBAL) - -include("${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-cmake/vcpkg-port-config.cmake") -include("${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-cmake-config/vcpkg-port-config.cmake") -include("${CMAKE_CURRENT_LIST_DIR}/qt_install_copyright.cmake") - -if (NOT DEFINED QT6_DIRECTORY_PREFIX) - set(QT6_DIRECTORY_PREFIX "Qt6/") -endif () - -if (VCPKG_TARGET_IS_ANDROID AND NOT ANDROID_SDK_ROOT) - message( - FATAL_ERROR - "${PORT} requires ANDROID_SDK_ROOT to be set. Consider adding it to the triplet." - ) -endif () - -function (qt_download_submodule_impl) - cmake_parse_arguments( - PARSE_ARGV - 0 - "_qarg" - "" - "SUBMODULE" - "PATCHES" - ) - - if ("${_qarg_SUBMODULE}" IN_LIST QT_FROM_QT_GIT) - # qtinterfaceframework is not available in the release, so we fall back to a `git - # clone`. - vcpkg_from_git( - OUT_SOURCE_PATH - SOURCE_PATH - URL - "https://code.qt.io/qt/${_qarg_SUBMODULE}.git" - REF - "${${_qarg_SUBMODULE}_REF}" - PATCHES - ${_qarg_PATCHES} - ) - if (PORT STREQUAL "qttools") # Keep this for beta & rc's - vcpkg_from_git( - OUT_SOURCE_PATH - SOURCE_PATH_QLITEHTML - URL - https://code.qt.io/playground/qlitehtml.git - REF - "${${PORT}_qlitehtml_REF}" - FETCH_REF - master - HEAD_REF - master - ) - # port 'litehtml' is not in vcpkg! - vcpkg_from_github( - OUT_SOURCE_PATH - SOURCE_PATH_LITEHTML - REPO - litehtml/litehtml - REF - "${${PORT}_litehtml_REF}" - SHA512 - "${${PORT}_litehtml_HASH}" - HEAD_REF - master - ) - file(COPY "${SOURCE_PATH_QLITEHTML}/" - DESTINATION "${SOURCE_PATH}/src/assistant/qlitehtml" - ) - file(COPY "${SOURCE_PATH_LITEHTML}/" - DESTINATION "${SOURCE_PATH}/src/assistant/qlitehtml/src/3rdparty/litehtml" - ) - elseif (PORT STREQUAL "qtwebengine") - vcpkg_from_git( - OUT_SOURCE_PATH - SOURCE_PATH_WEBENGINE - URL - https://code.qt.io/qt/qtwebengine-chromium.git - REF - "${${PORT}_chromium_REF}" - ) - if (NOT EXISTS "${SOURCE_PATH}/src/3rdparty/chromium") - file(RENAME "${SOURCE_PATH_WEBENGINE}/chromium" - "${SOURCE_PATH}/src/3rdparty/chromium" - ) - endif () - if (NOT EXISTS "${SOURCE_PATH}/src/3rdparty/gn") - file(RENAME "${SOURCE_PATH_WEBENGINE}/gn" "${SOURCE_PATH}/src/3rdparty/gn") - endif () - endif () - else () - if (VCPKG_USE_HEAD_VERSION) - set(sha512 SKIP_SHA512) - elseif (NOT DEFINED "${_qarg_SUBMODULE}_HASH") - message( - FATAL_ERROR - "No information for ${_qarg_SUBMODULE} -- add it to QT_PORTS and run qtbase in QT_UPDATE_VERSION mode first" - ) - else () - set(sha512 SHA512 "${${_qarg_SUBMODULE}_HASH}") - endif () - - qt_get_url_filename("${_qarg_SUBMODULE}" urls filename) - vcpkg_download_distfile( - archive - URLS - ${urls} - FILENAME - "${filename}" - ${sha512} - ) - vcpkg_extract_source_archive( - SOURCE_PATH - ARCHIVE - "${archive}" - PATCHES - ${_qarg_PATCHES} - ) - endif () - set(SOURCE_PATH - "${SOURCE_PATH}" - PARENT_SCOPE - ) -endfunction () - -function (qt_download_submodule) - cmake_parse_arguments( - PARSE_ARGV - 0 - "_qarg" - "" - "" - "PATCHES" - ) - - qt_download_submodule_impl( - SUBMODULE - "${PORT}" - PATCHES - ${_qarg_PATCHES} - ) - - set(SOURCE_PATH - "${SOURCE_PATH}" - PARENT_SCOPE - ) -endfunction () - -function (qt_cmake_configure) - cmake_parse_arguments( - PARSE_ARGV - 0 - "_qarg" - "DISABLE_NINJA;DISABLE_PARALLEL_CONFIGURE" - "" - "TOOL_NAMES;OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;OPTIONS_MAYBE_UNUSED" - ) - - vcpkg_find_acquire_program(PERL) # Perl is probably required by all qt ports for syncqt - get_filename_component(PERL_PATH ${PERL} DIRECTORY) - vcpkg_add_to_path(${PERL_PATH}) - if (NOT - PORT - STREQUAL - "qtwebengine" - OR QT_IS_LATEST - ) # qtwebengine requires python2; since 6.3 python3 - vcpkg_find_acquire_program(PYTHON3) # Python is required by some qt ports - get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) - vcpkg_add_to_path(${PYTHON3_PATH}) - endif () - - if (NOT - PORT - MATCHES - "^qtbase" - ) - list(APPEND _qarg_OPTIONS - "-DQT_SYNCQT:PATH=${CURRENT_HOST_INSTALLED_DIR}/tools/Qt6/bin/syncqt.pl" - ) - endif () - set(PERL_OPTION "-DHOST_PERL:PATH=${PERL}") - - set(ninja_option "") - if (_qarg_DISABLE_NINJA) - set(ninja_option WINDOWS_USE_MSBUILD) - endif () - - set(disable_parallel "") - if (_qarg_DISABLE_PARALLEL_CONFIGURE) - set(disable_parallel DISABLE_PARALLEL_CONFIGURE) - endif () - - if (VCPKG_CROSSCOMPILING) - list(APPEND _qarg_OPTIONS "-DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR}") - list(APPEND _qarg_OPTIONS - "-DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share" - ) - endif () - - # Disable warning for CMAKE_(REQUIRE|DISABLE)_FIND_PACKAGE_ - string( - REGEX MATCHALL - "CMAKE_DISABLE_FIND_PACKAGE_[^:=]+" - disabled_find_package - "${_qarg_OPTIONS}" - ) - list(APPEND _qarg_OPTIONS_MAYBE_UNUSED ${disabled_find_package}) - - string( - REGEX MATCHALL - "CMAKE_REQUIRE_FIND_PACKAGE_[^:=]+(:BOOL)?=OFF" - require_find_package - "${_qarg_OPTIONS}" - ) - list(TRANSFORM require_find_package REPLACE "(:BOOL)?=OFF" "") - list(APPEND _qarg_OPTIONS_MAYBE_UNUSED ${require_find_package}) - - # Disable unused warnings for disabled features. Qt might decide to not emit the feature - # variables if other features are deactivated. - string( - REGEX MATCHALL - "(QT_)?FEATURE_[^:=]+(:BOOL)?=OFF" - disabled_features - "${_qarg_OPTIONS}" - ) - list(TRANSFORM disabled_features REPLACE "(:BOOL)?=OFF" "") - list(APPEND _qarg_OPTIONS_MAYBE_UNUSED ${disabled_features}) - - list(APPEND _qarg_OPTIONS "-DQT_NO_FORCE_SET_CMAKE_BUILD_TYPE:BOOL=ON") - - if (VCPKG_TARGET_IS_ANDROID) - list(APPEND _qarg_OPTIONS "-DANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}") - endif () - - if (NOT - PORT - MATCHES - "qtbase" - ) - list(APPEND _qarg_OPTIONS - "-DQT_MKSPECS_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share/Qt6/mkspecs" - ) - endif () - - if (NOT DEFINED VCPKG_OSX_DEPLOYMENT_TARGET) - list(APPEND _qarg_OPTIONS "-DCMAKE_OSX_DEPLOYMENT_TARGET=14") - endif () - - vcpkg_cmake_configure( - SOURCE_PATH - "${SOURCE_PATH}" - ${ninja_option} - ${disable_parallel} - OPTIONS - -DQT_FORCE_WARN_APPLE_SDK_AND_XCODE_CHECK=ON - -DQT_NO_FORCE_SET_CMAKE_BUILD_TYPE:BOOL=ON - -DQT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS:BOOL=ON # We don't want Qt to mess with - # users toolchain settings. - -DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON # Because Qt doesn't correctly scope - # find_package calls. - # -DQT_HOST_PATH= # For crosscompiling - # -DQT_PLATFORM_DEFINITION_DIR=mkspecs/win32-msvc -DQT_QMAKE_TARGET_MKSPEC=win32-msvc - # -DQT_USE_CCACHE - -DQT_BUILD_EXAMPLES:BOOL=OFF - -DQT_BUILD_TESTS:BOOL=OFF - -DQT_BUILD_BENCHMARKS:BOOL=OFF - ${PERL_OPTION} - -DINSTALL_BINDIR:STRING=bin - -DINSTALL_LIBEXECDIR:STRING=bin - -DINSTALL_PLUGINSDIR:STRING=${qt_plugindir} - -DINSTALL_QMLDIR:STRING=${qt_qmldir} - ${_qarg_OPTIONS} - OPTIONS_RELEASE - ${_qarg_OPTIONS_RELEASE} - -DINSTALL_DOCDIR:STRING=doc/${QT6_DIRECTORY_PREFIX} - -DINSTALL_INCLUDEDIR:STRING=include/${QT6_DIRECTORY_PREFIX} - -DINSTALL_DESCRIPTIONSDIR:STRING=share/Qt6/modules - -DINSTALL_MKSPECSDIR:STRING=share/Qt6/mkspecs - -DINSTALL_TRANSLATIONSDIR:STRING=translations/${QT6_DIRECTORY_PREFIX} - OPTIONS_DEBUG - # -DFEATURE_debug:BOOL=ON only needed by qtbase and auto detected? - -DINSTALL_DOCDIR:STRING=../doc/${QT6_DIRECTORY_PREFIX} - -DINSTALL_INCLUDEDIR:STRING=../include/${QT6_DIRECTORY_PREFIX} - -DINSTALL_TRANSLATIONSDIR:STRING=../translations/${QT6_DIRECTORY_PREFIX} - -DINSTALL_DESCRIPTIONSDIR:STRING=../share/Qt6/modules - -DINSTALL_MKSPECSDIR:STRING=../share/Qt6/mkspecs - ${_qarg_OPTIONS_DEBUG} - MAYBE_UNUSED_VARIABLES - INSTALL_BINDIR - INSTALL_DOCDIR - INSTALL_LIBEXECDIR - INSTALL_QMLDIR # No qml files - INSTALL_TRANSLATIONSDIR # No translations - INSTALL_PLUGINSDIR # No plugins - INSTALL_DESCRIPTIONSDIR - INSTALL_INCLUDEDIR - HOST_PERL - QT_SYNCQT - QT_NO_FORCE_SET_CMAKE_BUILD_TYPE - QT_FORCE_WARN_APPLE_SDK_AND_XCODE_CHECK - ${_qarg_OPTIONS_MAYBE_UNUSED} - INPUT_bundled_xcb_xinput - INPUT_freetype - INPUT_harfbuzz - INPUT_libjpeg - INPUT_libmd4c - INPUT_libpng - INPUT_opengl - INPUT_openssl - INPUT_xcb - INPUT_xkbcommon - ) - set(Z_VCPKG_CMAKE_GENERATOR - "${Z_VCPKG_CMAKE_GENERATOR}" - PARENT_SCOPE - ) -endfunction () - -function (qt_fix_prl_files) - file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}/lib" package_dir) - file(TO_CMAKE_PATH "${package_dir}/lib" lib_path) - file(TO_CMAKE_PATH "${package_dir}/include/Qt6" include_path) - file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}" install_prefix) - file( - GLOB_RECURSE - prl_files - "${CURRENT_PACKAGES_DIR}/*.prl" - "${CURRENT_PACKAGES_DIR}/*.pri" - ) - foreach (prl_file IN LISTS prl_files) - file(READ "${prl_file}" _contents) - string( - REPLACE "${lib_path}" - "\$\$[QT_INSTALL_LIBS]" - _contents - "${_contents}" - ) - string( - REPLACE "${include_path}" - "\$\$[QT_INSTALL_HEADERS]" - _contents - "${_contents}" - ) - string( - REPLACE "${install_prefix}" - "\$\$[QT_INSTALL_PREFIX]" - _contents - "${_contents}" - ) - string( - REPLACE "[QT_INSTALL_PREFIX]/lib/objects-Debug" - "[QT_INSTALL_LIBS]/objects-Debug" - _contents - "${_contents}" - ) - string( - REPLACE "[QT_INSTALL_PREFIX]/Qt6/qml" - "[QT_INSTALL_QML]" - _contents - "${_contents}" - ) - # Note: This only works without an extra if case since QT_INSTALL_PREFIX is the same - # for debug and release - file(WRITE "${prl_file}" "${_contents}") - endforeach () -endfunction () - -function (qt_fixup_and_cleanup) - cmake_parse_arguments( - PARSE_ARGV - 0 - "_qarg" - "" - "" - "TOOL_NAMES" - ) - vcpkg_copy_pdbs() - - # Handle PRL files - qt_fix_prl_files() - - # Handle CMake files. - set(COMPONENTS) - file( - GLOB COMPONENTS_OR_FILES - LIST_DIRECTORIES true - "${CURRENT_PACKAGES_DIR}/share/Qt6*" - ) - list(REMOVE_ITEM COMPONENTS_OR_FILES "${CURRENT_PACKAGES_DIR}/share/Qt6") - foreach (_glob IN LISTS COMPONENTS_OR_FILES) - if (IS_DIRECTORY "${_glob}") - string( - REPLACE "${CURRENT_PACKAGES_DIR}/share/Qt6" - "" - _component - "${_glob}" - ) - debug_message("Adding cmake component: '${_component}'") - list(APPEND COMPONENTS ${_component}) - endif () - endforeach () - - foreach (_comp IN LISTS COMPONENTS) - if (EXISTS "${CURRENT_PACKAGES_DIR}/share/Qt6${_comp}") - vcpkg_cmake_config_fixup( - PACKAGE_NAME - "Qt6${_comp}" - CONFIG_PATH - "share/Qt6${_comp}" - TOOLS_PATH - "tools/Qt6/bin" - ) - # Would rather put it into share/cmake as before but the import_prefix correction in - # vcpkg_cmake_config_fixup is working against that. - else () - message(STATUS "WARNING: Qt component ${_comp} not found/built!") - endif () - endforeach () - # fix debug plugin paths (should probably be fixed in vcpkg_cmake_config_fixup) - file(GLOB_RECURSE DEBUG_CMAKE_TARGETS - "${CURRENT_PACKAGES_DIR}/share/**/*Targets-debug.cmake" - ) - debug_message("DEBUG_CMAKE_TARGETS:${DEBUG_CMAKE_TARGETS}") - foreach (_debug_target IN LISTS DEBUG_CMAKE_TARGETS) - vcpkg_replace_string( - "${_debug_target}" - "{_IMPORT_PREFIX}/${qt_plugindir}" - "{_IMPORT_PREFIX}/debug/${qt_plugindir}" - IGNORE_UNCHANGED - ) - vcpkg_replace_string( - "${_debug_target}" - "{_IMPORT_PREFIX}/${qt_qmldir}" - "{_IMPORT_PREFIX}/debug/${qt_qmldir}" - IGNORE_UNCHANGED - ) - endforeach () - - file(GLOB_RECURSE STATIC_CMAKE_TARGETS - "${CURRENT_PACKAGES_DIR}/share/Qt6Qml/QmlPlugins/*.cmake" - ) - foreach (_plugin_target IN LISTS STATIC_CMAKE_TARGETS) - # restore a single get_filename_component which was remove by vcpkg_cmake_config_fixup - vcpkg_replace_string( - "${_plugin_target}" - [[get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)]] - "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" - IGNORE_UNCHANGED - ) - endforeach () - - set(qt_tooldest "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") - set(qt_searchdir "${CURRENT_PACKAGES_DIR}/bin") - # Handle Tools - foreach (_tool IN LISTS _qarg_TOOL_NAMES) - if (NOT EXISTS - "${CURRENT_PACKAGES_DIR}/bin/${_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" - ) - debug_message("Removed '${_tool}' from copy tools list since it was not found!") - list(REMOVE_ITEM _qarg_TOOL_NAMES ${_tool}) - endif () - endforeach () - if (_qarg_TOOL_NAMES) - set(tool_names ${_qarg_TOOL_NAMES}) - vcpkg_copy_tools( - TOOL_NAMES - ${tool_names} - SEARCH_DIR - "${qt_searchdir}" - DESTINATION - "${qt_tooldest}" - AUTO_CLEAN - ) - endif () - - if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - if (EXISTS "${CURRENT_PACKAGES_DIR}/bin/") - file(COPY "${CURRENT_PACKAGES_DIR}/bin/" - DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin" - ) - endif () - file( - GLOB_RECURSE _installed_dll_files - RELATIVE "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin" - "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin/*.dll" - ) - foreach (_dll_to_remove IN LISTS _installed_dll_files) - file(GLOB_RECURSE _packaged_dll_file - "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${_dll_to_remove}" - ) - if (EXISTS "${_packaged_dll_file}") - file(REMOVE "${_packaged_dll_file}") - endif () - endforeach () - file( - GLOB_RECURSE _folders - LIST_DIRECTORIES true - "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/**/" - ) - file(GLOB_RECURSE _files "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/**/") - if (_files) - list(REMOVE_ITEM _folders ${_files}) - endif () - foreach (_dir IN LISTS _folders) - if (NOT - "${_remaining_dll_files}" - MATCHES - "${_dir}" - ) - file(REMOVE_RECURSE "${_dir}") - endif () - endforeach () - endif () - file( - REMOVE_RECURSE - "${CURRENT_PACKAGES_DIR}/debug/lib/cmake/" - "${CURRENT_PACKAGES_DIR}/debug/share" - "${CURRENT_PACKAGES_DIR}/lib/cmake/" - "${CURRENT_PACKAGES_DIR}/debug/include" - ) - - if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(GLOB_RECURSE _bin_files "${CURRENT_PACKAGES_DIR}/bin/*") - if (NOT - _bin_files - STREQUAL - "" - ) - message(STATUS "Remaining files in bin: '${_bin_files}'") - else () # Only clean if empty otherwise let vcpkg throw and error. - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/" - "${CURRENT_PACKAGES_DIR}/debug/bin/" - ) - endif () - endif () - - vcpkg_fixup_pkgconfig() -endfunction () - -function (qt_install_submodule) - cmake_parse_arguments( - PARSE_ARGV - 0 - "_qis" - "DISABLE_NINJA" - "" - "PATCHES;TOOL_NAMES;CONFIGURE_OPTIONS;CONFIGURE_OPTIONS_DEBUG;CONFIGURE_OPTIONS_RELEASE;CONFIGURE_OPTIONS_MAYBE_UNUSED" - ) - - set(qt_plugindir ${QT6_DIRECTORY_PREFIX}plugins) - set(qt_qmldir ${QT6_DIRECTORY_PREFIX}qml) - - qt_download_submodule(PATCHES ${_qis_PATCHES}) - - if (_qis_DISABLE_NINJA) - set(_opt DISABLE_NINJA) - endif () - qt_cmake_configure( - ${_opt} - OPTIONS - ${_qis_CONFIGURE_OPTIONS} - OPTIONS_DEBUG - ${_qis_CONFIGURE_OPTIONS_DEBUG} - OPTIONS_RELEASE - ${_qis_CONFIGURE_OPTIONS_RELEASE} - OPTIONS_MAYBE_UNUSED - ${_qis_CONFIGURE_OPTIONS_MAYBE_UNUSED} - ) - - vcpkg_cmake_install(ADD_BIN_TO_PATH) - - qt_fixup_and_cleanup(TOOL_NAMES ${_qis_TOOL_NAMES}) - - qt_install_copyright("${SOURCE_PATH}") - set(SOURCE_PATH - "${SOURCE_PATH}" - PARENT_SCOPE - ) -endfunction () - -include("${CMAKE_CURRENT_LIST_DIR}/qt_port_details.cmake") diff --git a/vcpkg/ports/qtbase/cmake/qt_port_data.cmake b/vcpkg/ports/qtbase/cmake/qt_port_data.cmake deleted file mode 100644 index 5e49d55b6..000000000 --- a/vcpkg/ports/qtbase/cmake/qt_port_data.cmake +++ /dev/null @@ -1,136 +0,0 @@ -set(qtbase_HASH - "ef364f939f23b622f67d21833c2dbf1fb74531d9a1e25b6d2e94ea5d747a40f20c6c3a24abef1e9710287366b7cb54dd090350d315601317779235c20743cc81" -) -set(qttools_HASH - "77141b310f63932678f28682c490ccc75776493994d96582d546545c17937605efac312c008c75fda991b78c369320d0a2c4b543b568a459cc90051d1ed2b9da" -) -set(qtdeclarative_HASH - "75c9fdc8ba26ef95ae8ff0c82b18589b74d7ff3065e86e5bd8427bc36336e569eaa22fa07863f99d0592eec0c1a69c3409c7b3941eae14361ff523c058e56084" -) -set(qtsvg_HASH - "213af7fdf92fb64c9b824dbe044f51d89e661ccc02c17cf109e65b962a7b1de84c71e1b1b58d6cad0cc9fccee80b97efe9ebcab3491b478fb9b64bcfd33986a4" -) -set(qt5compat_HASH - "e049508efda201e5d12a2dc0e023fc096611b18810f695be213a26bfbf8cdda1ae04c353c2a8b9be0c30b014e3d4f9280921acd1e8ec3834cd309143de82f570" -) -set(qtshadertools_HASH - "5f326bb097e09f9f9259b550ccf5fb05634d748eebf8b8c416225e3cd328c2b532c764a41b98a4d47633be446edaeaa3d4e5da1f4951b31e3da6ddc4392a47fc" -) -set(qtquicktimeline_HASH - "3f9aef0eb8b495cda9bcab22e7f544e9dd1894e556e162654c87903406cd3c73820f54a543bc3861d49c7863d2fc8d92f79bb8e90cdcc23a99cf64bbeb816885" -) -set(qtquick3d_HASH - "5a5c04dfd1581905fb0b40cb35ef9e7370ffaf451287d84a9d444c0871f495ecfe59c8ab15cacc8e7314af45c16598fad5e63cd9466384c5ba245ad0c28315f2" -) -set(qttranslations_HASH - "d5df6136d3f66c93c0dd6d98c7a467c8b939d7bf5c90b5acff69262163c1e7cccc0c4f2f83b5ef06179601578b4a109f2f0c76c3897a31d3fb2567995fc55328" -) -set(qtwayland_HASH - "2edb6d3e85c06bcf689c3acfcc38b6ff0505569dfeec8bfb5a434fad563087ff917875ea56e639405af3cca8adc98206ab9f68dfaf8e2449300d010ffbb16699" -) -set(qtdoc_HASH - "839fbff235f67ade032f25120fbd7f394d272bf752dfe982c202cb8b6cf411a1bc949f5035b2c1062468e40632b2061ac611c771d35567dd5970b013ff2090f8" -) -set(qtcoap_HASH - "ce51ea39b7946b85cacddd3ebfe3a92615f31b032a779b799113c1e97aecdd3906e4fdc066296b0c0a369f4a023df4c951cc18dd47d2713e173118f2bd055cff" -) -set(qtopcua_HASH - "ac11aab0f9333a4b666c9c523f5d74140bd52e236ed14cfce3dbfc030516b1cc654761048a7fd9e4238a9f1e0e47a72c6f2f8e98173f27042c6cdbb348c8d6d9" -) -set(qtimageformats_HASH - "174bddd49dac507b7a2c9f1e1f7b384bff9ac515891ee49fd72acfa944b503cf5bd26acf388203e7d14b1f147b07ccbc2da992f71d51b7a18151245efc53a3a2" -) -set(qtmqtt_HASH - "1934405a8e6b7188ce710e89eaf7ae00f1e1516b803b773ec95b962368a8da3967bac29dfe2a4377a76d0f8b9bf47599f566d7130eff311f38af2041d0c40a88" -) -set(qtnetworkauth_HASH - "8f9f25883534af6ce7029a6c96501de3e944c8c6c3021f185c3a932653b4e4c40b3a0f8bc210d3ee175b690721a99b3d42de2f6fa9d1dbd1b730abf22fc48455" -) -set(qt3d_HASH - "8316fbe5a39bc5113da4759e195a55c57d8340021a39576939c0a4a604f47b4edb3c0206f914d4a3177ff09471d1f3475ffc4c2fa935ed8d98a166e310bc78b4" -) -set(qtactiveqt_HASH - "d49c16f4e055bcf389c719ae0e33a6ae0ef54f2433211f14864774c3694f82361783d18db6996b6f5abd52f5ac7f791b0eab015c946ceaa3ddfb9ef6abf64f19" -) -set(qtdatavis3d_HASH - "a5d0cf5c223a5baa69dc7fc59b131eb3b971dc3701d20e81bf7e86ccb6e8f4d20a82079e514d1269091fa014896167d52912e3940210fd546a8a55439c75509a" -) -set(qtdeviceutilities_HASH - "b32222c52169832a30a1d6bf0b19e5adc15bc9b1c7c12e4613ea73eba73b00528969f8a87830d0a9bf61663547ff263e2e0d6e5f4bc37b8624c3f96d9cbc51b6" -) -set(qtlottie_HASH - "c663b830210359bd738a3ab2ae84d956646c249e199acac194c1ec725b3eb1acb2392eef0a9b252e8ece0adad104932d4f7207903e49ec041287618d3a6f9894" -) -set(qtscxml_HASH - "c0138fc338b2d12fb4bcbba2c852b44e4257c56850f22af46d452871fb9bd9465bd824d86cd7e7772ef62b8ed48515790b496e1e873aa335deae8e25789cb4d0" -) -set(qtvirtualkeyboard_HASH - "a128c8210eec799d81c76b20e32e3c09ccb345d822b5c59b1fbf0960a1e2bec50c43140d86aaae9419a1fc514fc3e14bd283f612bf9133676db1a21e7217f528" -) -set(qtcharts_HASH - "84b372c8b52aea580b2b9727775753345affa80b73e0be843e65f7331bb809187d7183d93fdaf543197860210bc4e006f3a707663a160cf8ae05b37871abac7e" -) -set(qtconnectivity_HASH - "5508f3fc57679a4f986f430dcd19c5da15af663a677d27c9cc6aba81629f4a6e1954be31c5d2a44ba22366d7731ff105d2eaa3a0565b3b02baea0f498c547733" -) -set(qtpositioning_HASH - "8899b4bf8096211fca37f7a7855ae2c6f79d770602105d76a98b580ad8e2f2f55096095bd7f935f6f9ac36e23135e7594cf3c2e5b760c979560a108d43d57784" -) -set(qtlocation_HASH - "c7cbd76b6b8b7d09387c7da0e6630959ae66f0c8af2cd26b255e86ec36c6efeec59e4af7b34faa05f2fa035d4dd075d13a8dd0bccaefac48d391b4fa786769c0" -) -set(qtmultimedia_HASH - "2f001888b44274583dcd5bc6f467cf18efbb1a711f29d6baf354071199772ee49d835922f2fa0e9770898d42decddf04b379d8f05d1dfd923c5f9d58e3c7fcd8" -) -set(qtremoteobjects_HASH - "5845afc5ea4894fa788ce07a89348bd5027c0cceca65dce99a6bf437b396c71f25e8e7374401c8d10fd88be2303766c6df29b62e826f4d5ba38971a042dd7b06" -) -set(qtsensors_HASH - "88e9277aefdc609bda881cb836dfdc04d29a32a4e09998d67e2ebe7ec6f94aff508fb39c2b624f00bcc85ddccd61bb5ed3ffcc953dd28d00ef559d50e6104ae4" -) -set(qtserialbus_HASH - "b0ce725382c15048913204e6173dd899af6f8233ff3a098f497dea6a3d9d2cd436ad7944165398fba59f92098f7e38e7c3c5efa47a7ffeec2bf3a464ae9d4539" -) -set(qtserialport_HASH - "343537aedd9c84dd5d6889d45babff181d7ef05927fd9cfdbb9389066f8860e2522bc059ca2c5c9af4c88bca255e0fc40b5eea84b93c970123a94afc803a638d" -) -set(qtwebchannel_HASH - "156d3d1f7e1a0b0df8c103db010cd8e40717e6fcf27dd20c27ca22900ae377a8da8bc86a9ec1d65765defb68032469415c345a571e9a3dcbc3919603972d01d6" -) -set(qtwebengine_HASH - "01e8988c76ff40ca5e38f76e90791d7ef708c29f2e9f8e83ca8604b6335fbecdee71473678a63633ec1edec85088256b20e56a618ca95748ccbe1e7b9673c298" -) -set(qtwebsockets_HASH - "7453c6657e9885393d57df3ebaf9d3ad12237b5fb848ac3547cc6c6ed607562d58564667a7fd10133d4cdb94151aa5c21660e33c7f48f01a4061001a47f85b60" -) -set(qtwebview_HASH - "af16c85d76e55e3c39c747995b3c46354efe5f5a3e111df36f9b169ab8fe3ac878cfe223ee47aef9aa8bc302c7383fc9b1f9682c63034e42def3714b28a0aabf" -) -set(qtinterfaceframework_REF "373322fc654e875cb56828de554dfdda96e9fb4e") -set(qtapplicationmanager_HASH - "7d404ac3f98d29004009d87996779a0c5c86b976e864257cd3a9018d84db8bc07bcedc74f0b15443f90b487d2229fdb7b80d1ae082b0fc8dea30f682b58cea1a" -) -set(qtlanguageserver_HASH - "8b55a3558de28d6c2c61bf52e8f10d1a67cc6890fdd3846db99f6c766fd22fef1793687b88b146f5a64971d60eef4357409b893c91310d1b9abec883ab35c2bc" -) -set(qthttpserver_HASH - "4e99164e285ed4e8ae64a4af2c717fc22a7b5934ac5a78fe3adbb04e29109d1294e9917aa089b9cb9e5492bdf7fad4888c837374c2fef691ea7294bccbe7b01a" -) -set(qtquick3dphysics_HASH - "e8948f84e337bc4c496ba67f047c809ece8d74a3d2af388227c902b765a1d2969f86be2ebaaa89f271c4b73d2cf5151a4c488ff7dc4f4a965d5f6a4de052784a" -) -set(qtspeech_HASH - "6434ccf743604bf4ac4bc31b26c7dbc7f765ec95174f0d9047bec822292f85e6b21ace825b52ce60bd388d9c333d427b206209f78c612782701567bb7d271e6d" -) -set(qtgrpc_HASH - "488c7e6a20cd9c267b44923c317e545e71543f68153228a4fee1fa9c0a2f6d3e212db9482962999bb80e87313a1a851b787759852089f17dca8add7040627c55" -) -set(qtquickeffectmaker_HASH - "cdcee80a0bf7347ef9b63acc277ce6ef134128ba56f247008803d9444a9e0713e23205ed0f9ecf2b7752d82183acb471a2589c8b0ec914259a22395f94755bfa" -) -set(qtgraphs_HASH - "c1803e68e065fc4ed7de68e65f5dc86a0b926768779c0de57a7f4af46506f019c27d47095f87eb1516011868262d6654817c478e130739477658a3dbcef2fb35" -) - -# Keep for beta/rc set(qttools_qlitehtml_REF bd70f93ce41443a6a90a269531393f575685283e) -# set(qtwebengine_chromium_REF 0b138dc30d0aec7930c76a2595065629948ad9f7) diff --git a/vcpkg/ports/qtbase/cmake/qt_port_details.cmake b/vcpkg/ports/qtbase/cmake/qt_port_details.cmake deleted file mode 100644 index e6d330979..000000000 --- a/vcpkg/ports/qtbase/cmake/qt_port_details.cmake +++ /dev/null @@ -1,245 +0,0 @@ -# Steps to update the qt6 ports 1. Change QT_VERSION below to the new version 2. Set -# QT_UPDATE_VERSION to 1 3. Add any new Qt modules to QT_PORTS 4. Run a build of `qtbase` -# 5. Fix any intermediate failures by adding the module into QT_FROM_GITHUB, -# QT_FROM_GITHUB_BRANCH, or QT_FROM_QT_GIT as appropriate 6. The build should fail with -# "Done downloading version and emitting hashes." This will have changed out the -# vcpkg.json versions of the qt ports and rewritten qt_port_data.cmake 7. Set -# QT_UPDATE_VERSION back to 0 - -set(QT_VERSION 6.8.3) -set(QT_DEV_BRANCH 0) - -set(QT_UPDATE_VERSION 0) - -if (PORT MATCHES "(qtquickcontrols2)") - set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - return() -endif () - -# Setting up the git tag. - -set(QT_PORTS - qt - qtbase - qttools - qtdeclarative - qtsvg - qt5compat - qtshadertools - qtquicktimeline - qtquick3d - qttranslations - qtwayland - qtdoc - qtcoap - qtopcua - qtimageformats - qtmqtt - qtnetworkauth - qt3d -) -# qtquickcontrols2 -> moved into qtdeclarative -if (QT_VERSION VERSION_GREATER_EQUAL 6.1) - list( - APPEND - QT_PORTS - # New in 6.1 - qtactiveqt - qtdatavis3d - qtdeviceutilities - qtlottie - qtscxml - qtvirtualkeyboard - qtcharts - ) -endif () -if (QT_VERSION VERSION_GREATER_EQUAL 6.2) - list( - APPEND - QT_PORTS - # New in 6.2 - qtconnectivity - qtpositioning - qtlocation # back in 6.5 as tech preview - qtmultimedia - qtremoteobjects - qtsensors - qtserialbus - qtserialport - qtwebchannel - qtwebengine - qtwebsockets - qtwebview - ) -endif () -if (QT_VERSION VERSION_GREATER_EQUAL 6.2.2) - list( - APPEND - QT_PORTS - # New in 6.2.2 - qtinterfaceframework - qtapplicationmanager - ) -endif () -if (QT_VERSION VERSION_GREATER_EQUAL 6.3.0) - list(APPEND QT_PORTS - # New in 6.3.0 - qtlanguageserver - ) -endif () -if (QT_VERSION VERSION_GREATER_EQUAL 6.4.0) - list( - APPEND - QT_PORTS - # New in 6.4.0 - qthttpserver - qtquick3dphysics - qtspeech - ) -endif () -if (QT_VERSION VERSION_GREATER_EQUAL 6.5.0) - list( - APPEND - QT_PORTS - # New in 6.5.0 - qtgrpc - qtquickeffectmaker - ) -endif () -if (QT_VERSION VERSION_GREATER_EQUAL 6.6.0) - list( - APPEND - QT_PORTS - # New in 6.6.0 - qtgraphs - # qtvncserver # only commercial qtinsighttracker - ) -endif () -# qtinsighttracker qtvncserver qtgraphs - -# 1. By default, modules come from the official release -# 2. These modules are mirrored to github and have tags matching the release -set(QT_FROM_GITHUB - qtcoap - qtopcua - qtmqtt - qtapplicationmanager -) -# 1. These modules are mirrored to github and have branches matching the release -set(QT_FROM_GITHUB_BRANCH qtdeviceutilities) -# 1. These modules are not mirrored to github and not part of the release -set(QT_FROM_QT_GIT qtinterfaceframework) -# For beta releases uncomment the next two lines and comment the lines with -# QT_FROM_GITHUB, QT_FROM_GITHUB_BRANCH, QT_FROM_QT_GIT set(QT_FROM_QT_GIT ${QT_PORTS}) -# list(POP_FRONT QT_FROM_QT_GIT) - -function ( - qt_get_url_filename - qt_port - out_urls - out_filename -) - if ("${qt_port}" IN_LIST QT_FROM_GITHUB) - set(urls "https://github.com/qt/${qt_port}/archive/v${QT_VERSION}.tar.gz") - set(filename "qt-${qt_port}-v${QT_VERSION}.tar.gz") - elseif ("${qt_port}" IN_LIST QT_FROM_GITHUB_BRANCH) - set(urls "https://github.com/qt/${qt_port}/archive/${QT_VERSION}.tar.gz") - set(filename "qt-${qt_port}-${QT_VERSION}.tar.gz") - else () - string( - SUBSTRING "${QT_VERSION}" - 0 - 3 - qt_major_minor - ) - - if (NOT QT_DEV_BRANCH) - set(branch_subpath "archive") - else () - set(branch_subpath "development_releases") - endif () - - set(filename "${qt_port}-everywhere-src-${QT_VERSION}.tar.xz") - set(mirrors "https://download.qt.io/" "https://mirrors.ocf.berkeley.edu/qt/") - set(url_subpath - "${branch_subpath}/qt/${qt_major_minor}/${QT_VERSION}/submodules/${filename}" - ) - list(TRANSFORM mirrors APPEND "${url_subpath}" OUTPUT_VARIABLE urls) - endif () - set(${out_urls} - ${urls} - PARENT_SCOPE - ) - set(${out_filename} - "${filename}" - PARENT_SCOPE - ) -endfunction () - -if (QT_UPDATE_VERSION) - if (NOT - PORT - STREQUAL - "qtbase" - ) - message(FATAL_ERROR "QT_UPDATE_VERSION must be used from the root 'qtbase' package") - endif () - set(VCPKG_USE_HEAD_VERSION 1) - set(msg - "" - CACHE INTERNAL "" - ) - foreach (qt_port IN LISTS QT_PORTS) - set(port_json "${CMAKE_CURRENT_LIST_DIR}/../../${qt_port}/vcpkg.json") - file(READ "${port_json}" _control_contents) - string( - REGEX - REPLACE "\"version(-(string|semver))?\": [^\n]+\n" - "\"version\": \"${QT_VERSION}\",\n" - _control_contents - "${_control_contents}" - ) - string( - REGEX - REPLACE "\"port-version\": [^\n]+\n" - "" - _control_contents - "${_control_contents}" - ) - file(WRITE "${port_json}" "${_control_contents}") - if (qt_port STREQUAL "qt") - continue() - endif () - if ("${qt_port}" IN_LIST QT_FROM_QT_GIT) - vcpkg_find_acquire_program(GIT) - execute_process( - COMMAND "${GIT}" ls-remote -t "https://code.qt.io/cgit/qt/${qt_port}.git" - "v${QT_VERSION}" OUTPUT_VARIABLE out - ) - string( - SUBSTRING "${out}" - 0 - 40 - tag_sha - ) - string(APPEND msg "set(${qt_port}_REF ${tag_sha})\n") - else () - qt_get_url_filename("${qt_port}" urls filename) - vcpkg_download_distfile( - archive - URLS - ${urls} - FILENAME - "${filename}" - SKIP_SHA512 - ) - file(SHA512 "${archive}" hash) - string(APPEND msg "set(${qt_port}_HASH \"${hash}\")\n") - endif () - endforeach () - message("${msg}") - file(WRITE "${CMAKE_CURRENT_LIST_DIR}/qt_port_data_new.cmake" "${msg}") - message(FATAL_ERROR "Done downloading version and emitting hashes.") -endif () - -include("${CMAKE_CURRENT_LIST_DIR}/qt_port_data.cmake") diff --git a/vcpkg/ports/qtbase/config_install.patch b/vcpkg/ports/qtbase/config_install.patch deleted file mode 100644 index fdfc70330..000000000 --- a/vcpkg/ports/qtbase/config_install.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/QtBuildPathsHelpers.cmake b/cmake/QtBuildPathsHelpers.cmake -index bd186c28b..edee52e8b 100644 ---- a/cmake/QtBuildPathsHelpers.cmake -+++ b/cmake/QtBuildPathsHelpers.cmake -@@ -100,7 +100,7 @@ function(qt_internal_set_up_global_paths) - if(QT_CONFIG_INSTALL_DIR) - string(APPEND QT_CONFIG_INSTALL_DIR "/") - endif() -- string(APPEND QT_CONFIG_INSTALL_DIR ${__config_path_part}) -+ string(APPEND QT_CONFIG_INSTALL_DIR "share") - - set(QT_BUILD_DIR "${QT_BUILD_DIR}" PARENT_SCOPE) - set(QT_INSTALL_DIR "${QT_INSTALL_DIR}" PARENT_SCOPE) diff --git a/vcpkg/ports/qtbase/dont_force_cmakecache_latest.patch b/vcpkg/ports/qtbase/dont_force_cmakecache_latest.patch deleted file mode 100644 index 752cefe6d..000000000 --- a/vcpkg/ports/qtbase/dont_force_cmakecache_latest.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake -index 4f8106dfa..bec5c402e 100644 ---- a/cmake/QtPostProcessHelpers.cmake -+++ b/cmake/QtPostProcessHelpers.cmake -@@ -414,7 +414,7 @@ function(qt_generate_install_prefixes out_var) - - foreach(var ${vars}) - get_property(docstring CACHE "${var}" PROPERTY HELPSTRING) -- string(APPEND content "set(${var} \"${${var}}\" CACHE STRING \"${docstring}\" FORCE)\n") -+ string(APPEND content "set(${var} \"${${var}}\" CACHE STRING \"${docstring}\")\n") - endforeach() - - set(${out_var} "${content}" PARENT_SCOPE) diff --git a/vcpkg/ports/qtbase/env.patch b/vcpkg/ports/qtbase/env.patch deleted file mode 100644 index 6a3716759..000000000 --- a/vcpkg/ports/qtbase/env.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake -index 279ab07dd..951fd3d36 100644 ---- a/cmake/QtTestHelpers.cmake -+++ b/cmake/QtTestHelpers.cmake -@@ -653,9 +653,9 @@ function(qt_internal_collect_command_environment out_path out_plugin_path) - # The regular CMAKE_INSTALL_PREFIX can be different for example when building standalone tests. - # Any given CMAKE_INSTALL_PREFIX takes priority over qt_relocatable_install_prefix for the - # PATH environment variable. -- set(install_prefixes "${CMAKE_INSTALL_PREFIX}") -+ set(install_prefixes "${CMAKE_INSTALL_PREFIX}$<$:/debug>") - if(QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX) -- list(APPEND install_prefixes "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}") -+ list(APPEND install_prefixes "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}$<$:/debug>") - endif() - - file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" test_env_path) diff --git a/vcpkg/ports/qtbase/fix-host-aliasing.patch b/vcpkg/ports/qtbase/fix-host-aliasing.patch deleted file mode 100644 index 1823a351d..000000000 --- a/vcpkg/ports/qtbase/fix-host-aliasing.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/cmake/QtTargetHelpers.cmake b/cmake/QtTargetHelpers.cmake -index 180ec33..a03e3b1 100644 ---- a/cmake/QtTargetHelpers.cmake -+++ b/cmake/QtTargetHelpers.cmake -@@ -281,10 +281,10 @@ function(qt_internal_add_target_aliases target) - set_target_properties("${target}" PROPERTIES _qt_versionfull_alias "${versionfull_alias}") - - get_target_property(type "${target}" TYPE) -- if (type STREQUAL EXECUTABLE) -+ if (type STREQUAL EXECUTABLE AND NOT TARGET "${versionfull_alias}") - add_executable("${versionless_alias}" ALIAS "${target}") - add_executable("${versionfull_alias}" ALIAS "${target}") -- else() -+ elseif(NOT type STREQUAL EXECUTABLE) - add_library("${versionless_alias}" ALIAS "${target}") - add_library("${versionfull_alias}" ALIAS "${target}") - endif() diff --git a/vcpkg/ports/qtbase/fix-link-lib-discovery.patch b/vcpkg/ports/qtbase/fix-link-lib-discovery.patch deleted file mode 100644 index 339d25490..000000000 --- a/vcpkg/ports/qtbase/fix-link-lib-discovery.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake -index b6f1242..eaa4d65 100644 ---- a/cmake/QtPriHelpers.cmake -+++ b/cmake/QtPriHelpers.cmake -@@ -37,6 +37,7 @@ function(qt_generate_qmake_libraries_pri_content module_name output_root_dir out - get_target_property(lib_target_type ${lib_target} TYPE) - if(lib_target_type MATCHES "^(INTERFACE|UNKNOWN)_LIBRARY") - get_target_property(iface_libs ${lib_target} INTERFACE_LINK_LIBRARIES) -+ string(REGEX REPLACE [[\$]+)>]] "\\1" iface_libs "${iface_libs}") - if(iface_libs) - list(PREPEND lib_targets ${iface_libs}) - endif() diff --git a/vcpkg/ports/qtbase/fix_cmake_build.patch b/vcpkg/ports/qtbase/fix_cmake_build.patch deleted file mode 100644 index 65410e3fc..000000000 --- a/vcpkg/ports/qtbase/fix_cmake_build.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in -index ffc9d90f8..0b3a7d59e 100644 ---- a/cmake/QtBuildInternalsExtra.cmake.in -+++ b/cmake/QtBuildInternalsExtra.cmake.in -@@ -51,8 +51,8 @@ endif() - set(QT_WILL_INSTALL @QT_WILL_INSTALL@ CACHE BOOL - "Boolean indicating if doing a Qt prefix build (vs non-prefix build)." FORCE) - --set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH --"A path to the source tree of the previously configured QtBase project." FORCE) -+# set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH -+# "A path to the source tree of the previously configured QtBase project." FORCE) - - # Propagate decision of building tests and examples to other repositories. - set(QT_BUILD_TESTS @QT_BUILD_TESTS@ CACHE BOOL "Build the testing tree.") diff --git a/vcpkg/ports/qtbase/fix_deploy_windows.patch b/vcpkg/ports/qtbase/fix_deploy_windows.patch deleted file mode 100644 index 2d2f46ff0..000000000 --- a/vcpkg/ports/qtbase/fix_deploy_windows.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake -index 8a0d07feac..0e6a720c20 100644 ---- a/src/corelib/Qt6CoreMacros.cmake -+++ b/src/corelib/Qt6CoreMacros.cmake -@@ -2977,17 +2977,19 @@ function(_qt_internal_setup_deploy_support) - if(CMAKE_HOST_WIN32) -+ if(CMAKE_CROSSCOMPILING AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") -- if(CMAKE_CROSSCOMPILING) - set(qt_paths_ext ".bat") -+ elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") -+ set(qt_paths_ext ".debug.bat") - else() - set(qt_paths_ext ".exe") - endif() - else() - set(qt_paths_ext "") - endif() - - - - set(target_qtpaths_path "") -- set(qtpaths_prefix "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_BINS}") -+ set(qtpaths_prefix "${QT6_INSTALL_PREFIX}/tools/Qt6/bin") - get_property(qt_major_version TARGET "${target}" PROPERTY INTERFACE_QT_MAJOR_VERSION) - if(qt_major_version) - set(target_qtpaths_with_major_version_path diff --git a/vcpkg/ports/qtbase/fix_egl.patch b/vcpkg/ports/qtbase/fix_egl.patch deleted file mode 100644 index 786831068..000000000 --- a/vcpkg/ports/qtbase/fix_egl.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake -index eafbc1ff9..dd4068838 100644 ---- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake -+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake -@@ -82,6 +82,7 @@ find_path(EGL_INCLUDE_DIR - find_library(EGL_LIBRARY - NAMES - EGL -+ libEGL # required to find angle on windows within vcpkg. - HINTS - ${PKG_EGL_LIBRARY_DIRS} - ) diff --git a/vcpkg/ports/qtbase/fix_egl_2.patch b/vcpkg/ports/qtbase/fix_egl_2.patch deleted file mode 100644 index 78b1c360f..000000000 --- a/vcpkg/ports/qtbase/fix_egl_2.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake -index db48f79b9..4b1686132 100644 ---- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake -+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake -@@ -116,7 +116,7 @@ if(EGL_INCLUDE_DIR) - unset(_EGL_version_lines) - endif() - --cmake_push_check_state(RESET) -+cmake_push_check_state() # To be able to fix the compile check in vcpkg-cmake-wrapper - list(APPEND CMAKE_REQUIRED_LIBRARIES "${EGL_LIBRARY}") - list(APPEND CMAKE_REQUIRED_INCLUDES "${EGL_INCLUDE_DIR}") - list(APPEND CMAKE_REQUIRED_DEFINITIONS "${EGL_DEFINITIONS}") diff --git a/vcpkg/ports/qtbase/harfbuzz.patch b/vcpkg/ports/qtbase/harfbuzz.patch deleted file mode 100644 index a2f8e7424..000000000 --- a/vcpkg/ports/qtbase/harfbuzz.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/FindWrapSystemHarfbuzz.cmake b/cmake/FindWrapSystemHarfbuzz.cmake -index 3cb44aa76..9bf0d7165 100644 ---- a/cmake/FindWrapSystemHarfbuzz.cmake -+++ b/cmake/FindWrapSystemHarfbuzz.cmake -@@ -6,7 +6,7 @@ if(TARGET WrapSystemHarfbuzz::WrapSystemHarfbuzz) - endif() - set(WrapSystemHarfbuzz_REQUIRED_VARS __harfbuzz_found) - --find_package(harfbuzz ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} QUIET) -+find_package(harfbuzz QUIET) # VCPKG is missing the version file for harfbuzz. - - # Gentoo has some buggy version of a harfbuzz Config file. Check if include paths are valid. - set(__harfbuzz_target_name "harfbuzz::harfbuzz") diff --git a/vcpkg/ports/qtbase/installed_dir.patch b/vcpkg/ports/qtbase/installed_dir.patch deleted file mode 100644 index 918673141..000000000 --- a/vcpkg/ports/qtbase/installed_dir.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in -index 6e37ae02..e7e84468 100644 ---- a/cmake/qt.toolchain.cmake.in -+++ b/cmake/qt.toolchain.cmake.in -@@ -65,6 +65,10 @@ get_filename_component(QT_TOOLCHAIN_RELOCATABLE_INSTALL_PREFIX - # one level higher is what we're looking for. - get_filename_component(QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE) - -+get_filename_component(vcpkg_installed_dir -+ ${CMAKE_CURRENT_LIST_DIR}/../../../ -+ ABSOLUTE) -+ - # REROOT_PATH_ISSUE_MARKER - # There's a subdirectory check in cmake's cmFindCommon::RerootPaths() function, that doesn't handle - # the case of CMAKE_PREFIX_PATH == CMAKE_FIND_ROOT_PATH for a particular pair of entries. diff --git a/vcpkg/ports/qtbase/macdeployqt-symlinks.patch b/vcpkg/ports/qtbase/macdeployqt-symlinks.patch deleted file mode 100644 index ce6fe71f6..000000000 --- a/vcpkg/ports/qtbase/macdeployqt-symlinks.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp -index 6ff269b..caffd44 100644 ---- a/src/tools/macdeployqt/shared/shared.cpp -+++ b/src/tools/macdeployqt/shared/shared.cpp -@@ -1,4 +1,5 @@ - // Copyright (C) 2016 The Qt Company Ltd. -+ - // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - #include - #include -@@ -85,7 +86,21 @@ - } - } - -- if (QFile::copy(from, to)) { -+ QFileInfo fromFileInfo(from); -+ -+ if (fromFileInfo.isSymLink()) { -+ const QString fromSymLinkTarget = fromFileInfo.absoluteDir().relativeFilePath(fromFileInfo.symLinkTarget()); -+ if (QFile::link(fromSymLinkTarget, to)) { -+ return copyFilePrintStatus(fromFileInfo.absoluteDir().absoluteFilePath(fromSymLinkTarget), QFileInfo(to).absoluteDir().absoluteFilePath(fromSymLinkTarget)); -+ } -+ else { -+ LogError() << "symlink copy failed from" << from; -+ LogError() << " to" << to; -+ return false; -+ } -+ -+ } -+ else if (QFile::copy(from, to)) { - QFile dest(to); - dest.setPermissions(dest.permissions() | QFile::WriteOwner | QFile::WriteUser); - LogNormal() << " copied:" << from; diff --git a/vcpkg/ports/qtbase/portfile.cmake b/vcpkg/ports/qtbase/portfile.cmake deleted file mode 100644 index 2f1fca59e..000000000 --- a/vcpkg/ports/qtbase/portfile.cmake +++ /dev/null @@ -1,885 +0,0 @@ -# Reminder for myself and everybody else: Qt cross module dependency information within -# the Qt respository is wrong and/or incomplete. Always check the toplevel CMakeLists.txt -# for the find_package call and search for linkage against the Qt:: targets Often enough -# certain (bigger) dependencies are only used to build examples and/or tests. As such -# getting the correct dependency information relevant for vcpkg requires a manual -# search/check -set(QT_IS_LATEST ON) - -# All above goes into the qt_port_hashes in the future -include("${CMAKE_CURRENT_LIST_DIR}/cmake/qt_install_submodule.cmake") - -set(${PORT}_PATCHES - allow_outside_prefix.patch - config_install.patch - fix_cmake_build.patch - harfbuzz.patch - fix_egl.patch - fix_egl_2.patch - installed_dir.patch - GLIB2-static.patch # alternative is to force pkg-config - clang-cl_source_location.patch - clang-cl_QGADGET_fix.diff - fix-host-aliasing.patch - fix_deploy_windows.patch - fix-link-lib-discovery.patch - macdeployqt-symlinks.patch -) - -if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) - list(APPEND ${PORT}_PATCHES env.patch) -endif () - -list(APPEND ${PORT}_PATCHES dont_force_cmakecache_latest.patch) - -if (VCPKG_TARGET_IS_WINDOWS - AND NOT - "doubleconversion" - IN_LIST - FEATURES -) - message(FATAL_ERROR "${PORT} requires feature doubleconversion on windows!") -endif () - -if (VCPKG_TARGET_IS_LINUX) - message( - WARNING - "qtbase currently requires packages from the system package manager. " - "They can be installed on Ubuntu systems via sudo apt-get install " - "'^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev " - "libxkbcommon-x11-dev libegl1-mesa-dev." - ) -endif () - -# Features can be found via searching for qt_feature in all configure.cmake files in the -# source: The files also contain information about the Platform for which it is searched -# Always use FEATURE_ in vcpkg_cmake_configure (using QT_FEATURE_X overrides Qts -# condition check for the feature.) Theoretically there is a feature for every widget to -# enable/disable it but that is way to much for vcpkg - -set(input_vars - doubleconversion - freetype - harfbuzz - libb2 - jpeg - libmd4c - png - sql-sqlite -) -set(INPUT_OPTIONS) -foreach (_input IN LISTS input_vars) - if (_input MATCHES "(png|jpeg)") - list(APPEND INPUT_OPTIONS -DINPUT_lib${_input}:STRING=) - elseif (_input MATCHES "(sql-sqlite)") # Not yet used by the cmake build - - else () - list(APPEND INPUT_OPTIONS -DINPUT_${_input}:STRING=) - endif () - if ("${_input}" IN_LIST FEATURES) - string(APPEND INPUT_OPTIONS system) - elseif (_input STREQUAL "libb2" AND NOT VCPKG_TARGET_IS_WINDOWS) - string(APPEND INPUT_OPTIONS system) - elseif (_input STREQUAL "libmd4c") - string(APPEND INPUT_OPTIONS qt) # libmd4c is not yet in VCPKG (but required by - # qtdeclarative) - else () - string(APPEND INPUT_OPTIONS no) - endif () -endforeach () - -# General features: - -vcpkg_check_features( - OUT_FEATURE_OPTIONS - FEATURE_OPTIONS - FEATURES - "appstore-compliant" - FEATURE_appstore_compliant - "zstd" - FEATURE_zstd - "framework" - FEATURE_framework - "concurrent" - FEATURE_concurrent - "concurrent" - FEATURE_future - "dbus" - FEATURE_dbus - "gui" - FEATURE_gui - "thread" - FEATURE_thread - "network" - FEATURE_network - "sql" - FEATURE_sql - "widgets" - FEATURE_widgets - # "xml" FEATURE_xml # Required to build moc - "testlib" - FEATURE_testlib - "zstd" - CMAKE_REQUIRE_FIND_PACKAGE_zstd - ${require_features} - INVERTED_FEATURES - "zstd" - CMAKE_DISABLE_FIND_PACKAGE_ZSTD - "dbus" - CMAKE_DISABLE_FIND_PACKAGE_WrapDBus1 -) - -list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libudev:BOOL=ON) -list(APPEND FEATURE_OPTIONS -DFEATURE_xml:BOOL=ON) - -if ("dbus" IN_LIST FEATURES AND VCPKG_TARGET_IS_LINUX) - list(APPEND FEATURE_OPTIONS -DINPUT_dbus=linked) -elseif ("dbus" IN_LIST FEATURES) - list(APPEND FEATURE_OPTIONS -DINPUT_dbus=runtime) -else () - list(APPEND FEATURE_OPTIONS -DINPUT_dbus=no) -endif () - -if (VCPKG_QT_NAMESPACE) - list(APPEND FEATURE_OPTIONS "-DQT_NAMESPACE:STRING=${VCPKG_QT_NAMESPACE}") -endif () - -# Corelib features: -vcpkg_check_features( - OUT_FEATURE_OPTIONS - FEATURE_CORE_OPTIONS - FEATURES - "doubleconversion" - FEATURE_doubleconversion - "glib" - FEATURE_glib - "icu" - FEATURE_icu - "pcre2" - FEATURE_pcre2 - # "icu" CMAKE_REQUIRE_FIND_PACKAGE_ICU - "glib" - CMAKE_REQUIRE_FIND_PACKAGE_GLIB2 - INVERTED_FEATURES - # "doubleconversion" CMAKE_DISABLE_FIND_PACKAGE_WrapDoubleConversion # Required - # "pcre2" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemPCRE2 # Bug in qt cannot - # be deactivated - "icu" - CMAKE_DISABLE_FIND_PACKAGE_ICU - "glib" - CMAKE_DISABLE_FIND_PACKAGE_GLIB2 -) - -list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_LTTngUST:BOOL=ON) -list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_PPS:BOOL=ON) -list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Slog2:BOOL=ON) -list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libsystemd:BOOL=ON) -list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapBacktrace:BOOL=ON) -# list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapAtomic:BOOL=ON) # -# Cannot be disabled on x64 platforms list(APPEND FEATURE_CORE_OPTIONS -# -DCMAKE_DISABLE_FIND_PACKAGE_WrapRt:BOOL=ON) # Cannot be disabled on osx - -if (VCPKG_TARGET_IS_ANDROID) - list(APPEND FEATURE_CORE_OPTIONS -DFEATURE_getentropy:BOOL=OFF) -endif () - -# Network features: -vcpkg_check_features( - OUT_FEATURE_OPTIONS - FEATURE_NET_OPTIONS - FEATURES - "openssl" - FEATURE_openssl - "brotli" - FEATURE_brotli - "securetransport" - FEATURE_securetransport - "dnslookup" - FEATURE_dnslookup - # "brotli" CMAKE_REQUIRE_FIND_PACKAGE_WrapBrotli "openssl" - # CMAKE_REQUIRE_FIND_PACKAGE_WrapOpenSSL - INVERTED_FEATURES - "brotli" - CMAKE_DISABLE_FIND_PACKAGE_WrapBrotli - "openssl" - CMAKE_DISABLE_FIND_PACKAGE_WrapOpenSSL - "dnslookup" - CMAKE_DISABLE_FIND_PACKAGE_WrapResolve -) - -if ("openssl" IN_LIST FEATURES) - list(APPEND FEATURE_NET_OPTIONS -DINPUT_openssl=linked) -else () - list(APPEND FEATURE_NET_OPTIONS -DINPUT_openssl=no) -endif () - -if ("dnslookup" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) - list(APPEND FEATURE_NET_OPTIONS -DFEATURE_libresolv:BOOL=ON) -endif () - -list(APPEND FEATURE_NET_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libproxy:BOOL=ON) -list(APPEND FEATURE_NET_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GSSAPI:BOOL=ON) - -# Gui features: -vcpkg_check_features( - OUT_FEATURE_OPTIONS - FEATURE_GUI_OPTIONS - FEATURES - "freetype" - FEATURE_freetype # required on windows - "harfbuzz" - FEATURE_harfbuzz - "fontconfig" - FEATURE_fontconfig # NOT WINDOWS - "jpeg" - FEATURE_jpeg - "png" - FEATURE_png - "opengl" - FEATURE_opengl - "xlib" - FEATURE_xlib - "xkb" - FEATURE_xkbcommon - "xcb" - FEATURE_xcb - "xcb-xlib" - FEATURE_xcb_xlib - "xkbcommon-x11" - FEATURE_xkbcommon_x11 - "xrender" - FEATURE_xrender # requires FEATURE_xcb_native_painting; otherwise disabled. - "xrender" - FEATURE_xcb_native_painting # experimental - "gles2" - FEATURE_opengles2 - "gles3" - FEATURE_opengles3 - # Cannot be required since Qt will look in CONFIG mode first but is controlled via - # CMAKE_DISABLE_FIND_PACKAGE_Vulkan below "vulkan" - # CMAKE_REQUIRE_FIND_PACKAGE_WrapVulkanHeaders - "egl" - FEATURE_egl - # "fontconfig" CMAKE_REQUIRE_FIND_PACKAGE_Fontconfig "harfbuzz" - # CMAKE_REQUIRE_FIND_PACKAGE_WrapSystemHarfbuzz "jpeg" CMAKE_REQUIRE_FIND_PACKAGE_JPEG - # "png" CMAKE_REQUIRE_FIND_PACKAGE_PNG "xlib" - # CMAKE_REQUIRE_FIND_PACKAGE_X11 "xkb" CMAKE_REQUIRE_FIND_PACKAGE_XKB "xcb" - # CMAKE_REQUIRE_FIND_PACKAGE_XCB "xcb-xlib" CMAKE_REQUIRE_FIND_PACKAGE_X11_XCB - # "xkbcommon-x11" CMAKE_REQUIRE_FIND_PACKAGE_XKB_COMMON_X11 "xrender" - # CMAKE_REQUIRE_FIND_PACKAGE_XRender - INVERTED_FEATURES - "vulkan" - CMAKE_DISABLE_FIND_PACKAGE_Vulkan - "opengl" - CMAKE_DISABLE_FIND_PACKAGE_WrapOpenGL - "egl" - CMAKE_DISABLE_FIND_PACKAGE_EGL - "gles2" - CMAKE_DISABLE_FIND_PACKAGE_GLESv2 - "gles3" - CMAKE_DISABLE_FIND_PACKAGE_GLESv3 - "fontconfig" - CMAKE_DISABLE_FIND_PACKAGE_Fontconfig - # "freetype" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemFreetype # Bug in qt cannot - # be deactivated - "harfbuzz" - CMAKE_DISABLE_FIND_PACKAGE_WrapSystemHarfbuzz - "jpeg" - CMAKE_DISABLE_FIND_PACKAGE_JPEG - # "png" CMAKE_DISABLE_FIND_PACKAGE_PNG # Unable to disable if Freetype - # requires it - "xlib" - CMAKE_DISABLE_FIND_PACKAGE_X11 - "xkb" - CMAKE_DISABLE_FIND_PACKAGE_XKB - "xcb" - CMAKE_DISABLE_FIND_PACKAGE_XCB - "xcb-xlib" - CMAKE_DISABLE_FIND_PACKAGE_X11_XCB - "xkbcommon-x11" - CMAKE_DISABLE_FIND_PACKAGE_XKB_COMMON_X11 - "xrender" - CMAKE_DISABLE_FIND_PACKAGE_XRender - # There are more X features but I am unsure how to safely disable them! Most of them - # seem to be found automaticall with find_package(X11) -) - -if ("gles2" IN_LIST FEATURES) - list(APPEND FEATURE_GUI_OPTIONS -DINPUT_opengl='es2') - list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengl_desktop=OFF) -endif () - -if (NOT - "opengl" - IN_LIST - FEATURES - AND NOT - "gles2" - IN_LIST - FEATURES -) - list(APPEND FEATURE_GUI_OPTIONS -DINPUT_opengl='no') - list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengl_desktop=OFF) - list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengl_dynamic=OFF) -endif () - -if ("xcb" IN_LIST FEATURES) - list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xcb=yes) -else () - list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xcb=no) -endif () -if ("xkb" IN_LIST FEATURES) - list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xkbcommon=yes) -else () - list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xkbcommon=no) -endif () - -# Disable OpenGL ES 3.1 and 3.2 -list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengles31:BOOL=OFF) -list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengles32:BOOL=OFF) - -list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_ATSPI2:BOOL=ON) -list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_DirectFB:BOOL=ON) -list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libdrm:BOOL=ON) -list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_gbm:BOOL=ON) -list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libinput:BOOL=ON) -list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Mtdev:BOOL=ON) -list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Tslib:BOOL=ON) -# sql-drivers features: - -vcpkg_check_features( - OUT_FEATURE_OPTIONS - FEATURE_SQLDRIVERS_OPTIONS - FEATURES - "sql-sqlite" - FEATURE_system_sqlite - "sql-odbc" - FEATURE_sql_odbc - "sql-mysql" - FEATURE_sql_mysql - "sql-oci" - FEATURE_sql_oci - # "sql-psql" CMAKE_REQUIRE_FIND_PACKAGE_PostgreSQL "sql-sqlite" - # CMAKE_REQUIRE_FIND_PACKAGE_SQLite3 - INVERTED_FEATURES - "sql-psql" - CMAKE_DISABLE_FIND_PACKAGE_PostgreSQL - "sql-sqlite" - CMAKE_DISABLE_FIND_PACKAGE_SQLite3 - "sql-odbc" - CMAKE_DISABLE_FIND_PACKAGE_ODBC - "sql-mysql" - CMAKE_DISABLE_FIND_PACKAGE_MySQL - "sql-oci" - CMAKE_DISABLE_FIND_PACKAGE_Oracle -) - -set(DB_LIST DB2 Interbase Mimer) -foreach (_db IN LISTS DB_LIST) - list(APPEND FEATURE_SQLDRIVERS_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${_db}:BOOL=ON) -endforeach () - -# printsupport features: -vcpkg_check_features( - OUT_FEATURE_OPTIONS - FEATURE_PRINTSUPPORT_OPTIONS - FEATURES - "cups" - FEATURE_cups - INVERTED_FEATURES - "cups" - CMAKE_DISABLE_FIND_PACKAGE_Cups -) - -vcpkg_check_features( - OUT_FEATURE_OPTIONS - FEATURE_WIDGETS_OPTIONS - FEATURES - "gtk3" - FEATURE_gtk3 - INVERTED_FEATURES - "gtk3" - CMAKE_DISABLE_FIND_PACKAGE_GTK3 -) - -set(TOOL_NAMES - androiddeployqt - androidtestrunner - cmake_automoc_parser - moc - qdbuscpp2xml - qdbusxml2cpp - qlalr - qmake - qmake6 - qvkgen - rcc - tracegen - uic - qtpaths - qtpaths6 - windeployqt - windeployqt6 - macdeployqt - macdeployqt6 - androiddeployqt6 - syncqt - tracepointgen -) - -qt_install_submodule( - PATCHES - ${${PORT}_PATCHES} - TOOL_NAMES - ${TOOL_NAMES} - CONFIGURE_OPTIONS - # --trace-expand - ${FEATURE_OPTIONS} - ${FEATURE_CORE_OPTIONS} - ${FEATURE_NET_OPTIONS} - ${FEATURE_GUI_OPTIONS} - ${FEATURE_SQLDRIVERS_OPTIONS} - ${FEATURE_PRINTSUPPORT_OPTIONS} - ${FEATURE_WIDGETS_OPTIONS} - ${INPUT_OPTIONS} - -DQT_USE_BUNDLED_BundledFreetype:BOOL=FALSE - -DQT_USE_BUNDLED_BundledHarfbuzz:BOOL=FALSE - -DQT_USE_BUNDLED_BundledLibpng:BOOL=FALSE - -DQT_USE_BUNDLED_BundledPcre2:BOOL=FALSE - -DINPUT_bundled_xcb_xinput:STRING=no - -DFEATURE_force_debug_info:BOOL=ON - -DFEATURE_relocatable:BOOL=ON - CONFIGURE_OPTIONS_RELEASE - CONFIGURE_OPTIONS_DEBUG - -DFEATURE_debug:BOOL=ON - CONFIGURE_OPTIONS_MAYBE_UNUSED - FEATURE_appstore_compliant # only used for android/ios -) - -# Install CMake helper scripts -file(COPY "${CMAKE_CURRENT_LIST_DIR}/cmake/" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" -) - -file( - CONFIGURE - OUTPUT - "${CURRENT_PACKAGES_DIR}/share/${PORT}/port_status.cmake" - CONTENT - "set(qtbase_with_icu ${FEATURE_icu})\n" -) - -set(other_files - qt-cmake - qt-cmake-create - qt-cmake-private - qt-cmake-standalone-test - qt-configure-module - qt-internal-configure-tests - qt-cmake-create - qt-internal-configure-examples - qt-internal-configure-tests - qmake - qmake6 - qtpaths - qtpaths6 -) - -if (CMAKE_HOST_WIN32) - set(script_suffix ".bat") -else () - set(script_suffix "") -endif () -list(TRANSFORM other_files APPEND "${script_suffix}") - -list( - APPEND - other_files - android_cmakelist_patcher.sh - android_emulator_launcher.sh - ensure_pro_file.cmake - qt-android-runner.py - qt-cmake-private-install.cmake - qt-testrunner.py - qt-wasmtestrunner.py - sanitizer-testrunner.py - syncqt.pl - target_qt.conf -) - -foreach (_config debug release) - if (_config MATCHES "debug") - set(path_suffix debug/) - else () - set(path_suffix) - endif () - if (NOT EXISTS "${CURRENT_PACKAGES_DIR}/${path_suffix}bin") - continue() - endif () - file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${path_suffix}") - foreach (other_file IN LISTS other_files) - if (EXISTS "${CURRENT_PACKAGES_DIR}/${path_suffix}bin/${other_file}") - set(target_file "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${path_suffix}${other_file}") - file(RENAME "${CURRENT_PACKAGES_DIR}/${path_suffix}bin/${other_file}" - "${target_file}" - ) - file(READ "${target_file}" _contents) - if (_config MATCHES "debug") - string( - REPLACE "..\\share\\" - "..\\..\\..\\..\\share\\" - _contents - "${_contents}" - ) - string( - REPLACE "../share/" - "../../../../share/" - _contents - "${_contents}" - ) - else () - string( - REPLACE "..\\share\\" - "..\\..\\..\\share\\" - _contents - "${_contents}" - ) - string( - REPLACE "../share/" - "../../../share/" - _contents - "${_contents}" - ) - endif () - string( - REGEX - REPLACE "set cmake_path=[^\n]+\n" - "set cmake_path=cmake\n" - _contents - "${_contents}" - ) - string( - REGEX - REPLACE "original_cmake_path=[^\n]+\n" - "original_cmake_path=does-not-exist\n" - _contents - "${_contents}" - ) - file(WRITE "${target_file}" "${_contents}") - endif () - endforeach () -endforeach () - -# Fixup qt.toolchain.cmake -set(qttoolchain "${CURRENT_PACKAGES_DIR}/share/Qt6/qt.toolchain.cmake") -file(READ "${qttoolchain}" toolchain_contents) -string( - REGEX - REPLACE "set\\\(__qt_initially_configured_toolchain_file [^\\\n]+\\\n" - "" - toolchain_contents - "${toolchain_contents}" -) -string( - REGEX - REPLACE "set\\\(__qt_chainload_toolchain_file [^\\\n]+\\\n" - "set(__qt_chainload_toolchain_file \"\${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}\")" - toolchain_contents - "${toolchain_contents}" -) -string( - REGEX - REPLACE "set\\\(VCPKG_CHAINLOAD_TOOLCHAIN_FILE [^\\\n]+\\\n" - "" - toolchain_contents - "${toolchain_contents}" -) -string( - REGEX - REPLACE "set\\\(__qt_initial_c_compiler [^\\\n]+\\\n" - "" - toolchain_contents - "${toolchain_contents}" -) -string( - REGEX - REPLACE "set\\\(__qt_initial_cxx_compiler [^\\\n]+\\\n" - "" - toolchain_contents - "${toolchain_contents}" -) -string( - REPLACE "${CURRENT_HOST_INSTALLED_DIR}" - "\${vcpkg_installed_dir}/${HOST_TRIPLET}" - toolchain_contents - "${toolchain_contents}" -) -file(WRITE "${qttoolchain}" "${toolchain_contents}") - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS) - if (VCPKG_CROSSCOMPILING) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/qmake" - "${CURRENT_PACKAGES_DIR}/debug/bin/qmake" - ) # qmake has been moved so this is the qmake helper script - endif () - file(GLOB_RECURSE _bin_files "${CURRENT_PACKAGES_DIR}/bin/*") - if (NOT _bin_files) # Only clean if empty otherwise let vcpkg throw and error. - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/" - "${CURRENT_PACKAGES_DIR}/debug/bin/" - ) - else () - message(STATUS "Files in '/bin':${_bin_files}") - endif () -endif () - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/QtBuildInternals") - -if (NOT VCPKG_TARGET_IS_OSX) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/macos") -endif () -if (NOT VCPKG_TARGET_IS_IOS) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/ios") -endif () - -file( - RELATIVE_PATH - installed_to_host - "${CURRENT_INSTALLED_DIR}" - "${CURRENT_HOST_INSTALLED_DIR}" -) -file( - RELATIVE_PATH - host_to_installed - "${CURRENT_HOST_INSTALLED_DIR}" - "${CURRENT_INSTALLED_DIR}" -) -if (installed_to_host) - string(APPEND installed_to_host "/") - string(APPEND host_to_installed "/") -endif () -set(_file "${CMAKE_CURRENT_LIST_DIR}/qt.conf.in") -set(REL_PATH "") -set(REL_HOST_TO_DATA "\${CURRENT_INSTALLED_DIR}/") -configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/qt_release.conf" @ONLY -)# For vcpkg-qmake -set(BACKUP_CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}") -set(BACKUP_CURRENT_HOST_INSTALLED_DIR "${CURRENT_HOST_INSTALLED_DIR}") -set(CURRENT_INSTALLED_DIR "./../../../") -set(CURRENT_HOST_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}${installed_to_host}") - -# Configure installed qt.conf -set(REL_HOST_TO_DATA "${host_to_installed}") -configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qt.conf") -set(REL_PATH debug/) -configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qt.debug.conf") - -set(CURRENT_INSTALLED_DIR "${BACKUP_CURRENT_INSTALLED_DIR}") -set(CURRENT_HOST_INSTALLED_DIR "${BACKUP_CURRENT_HOST_INSTALLED_DIR}") -set(REL_HOST_TO_DATA "\${CURRENT_INSTALLED_DIR}/") -configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/qt_debug.conf" @ONLY -)# For vcpkg-qmake - -set(target_qt_conf "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/target_qt.conf") -if (EXISTS "${target_qt_conf}") - file(READ "${target_qt_conf}" qt_conf_contents) - string( - REGEX - REPLACE "Prefix=[^\n]+" - "Prefix=./../../../" - qt_conf_contents - ${qt_conf_contents} - ) - string( - REGEX - REPLACE "HostData=[^\n]+" - "HostData=./../${TARGET_TRIPLET}/share/Qt6" - qt_conf_contents - ${qt_conf_contents} - ) - string( - REGEX - REPLACE "HostPrefix=[^\n]+" - "HostPrefix=./../../../../${_HOST_TRIPLET}" - qt_conf_contents - ${qt_conf_contents} - ) - file(WRITE "${target_qt_conf}" "${qt_conf_contents}") - if (NOT VCPKG_BUILD_TYPE) - set(target_qt_conf_debug "${CURRENT_PACKAGES_DIR}/tools/Qt6/target_qt_debug.conf") - configure_file("${target_qt_conf}" "${target_qt_conf_debug}" COPYONLY) - file(READ "${target_qt_conf_debug}" qt_conf_contents) - string( - REGEX - REPLACE "=(bin|lib|Qt6/plugins|Qt6/qml)" - "=debug/\\1" - qt_conf_contents - ${qt_conf_contents} - ) - file(WRITE "${target_qt_conf_debug}" "${qt_conf_contents}") - - configure_file( - "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake${script_suffix}" - "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake.debug${script_suffix}" COPYONLY - ) - vcpkg_replace_string( - "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake.debug${script_suffix}" - "target_qt.conf" "target_qt_debug.conf" - ) - endif () -endif () - -if (VCPKG_TARGET_IS_EMSCRIPTEN) - vcpkg_replace_string( - "${CURRENT_PACKAGES_DIR}/share/Qt6Core/Qt6WasmMacros.cmake" - "_qt_test_emscripten_version()" "" - ) # this is missing a include(QtPublicWasmToolchainHelpers) -endif () - -if (VCPKG_TARGET_IS_WINDOWS) - set(_DLL_FILES - brotlicommon - brotlidec - bz2 - freetype - harfbuzz - libpng16 - ) - set(DLLS_TO_COPY "") - foreach (_file IN LISTS _DLL_FILES) - if (EXISTS "${CURRENT_INSTALLED_DIR}/bin/${_file}.dll") - list(APPEND DLLS_TO_COPY "${CURRENT_INSTALLED_DIR}/bin/${_file}.dll") - endif () - endforeach () - file(COPY ${DLLS_TO_COPY} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") -endif () - -set(hostinfofile "${CURRENT_PACKAGES_DIR}/share/Qt6HostInfo/Qt6HostInfoConfig.cmake") -file(READ "${hostinfofile}" _contents) -string( - REPLACE [[set(QT6_HOST_INFO_LIBEXECDIR "bin")]] - [[set(QT6_HOST_INFO_LIBEXECDIR "tools/Qt6/bin")]] - _contents - "${_contents}" -) -string( - REPLACE [[set(QT6_HOST_INFO_BINDIR "bin")]] - [[set(QT6_HOST_INFO_BINDIR "tools/Qt6/bin")]] - _contents - "${_contents}" -) -file(WRITE "${hostinfofile}" "${_contents}") - -# MANUAL FIX - see https://github.com/microsoft/vcpkg/issues/44792 -if (NOT VCPKG_CROSSCOMPILING - OR EXISTS - "${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreToolsAdditionalTargetInfo.cmake" -) - vcpkg_replace_string( - "${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreToolsAdditionalTargetInfo.cmake" - "CMAKE_CURRENT_LIST_DIR}/../../bin/syncqt" - "CMAKE_CURRENT_LIST_DIR}/../../tools/Qt6/bin/syncqt" - IGNORE_UNCHANGED - ) - vcpkg_replace_string( - "${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreToolsAdditionalTargetInfo.cmake" - "PACKAGE_PREFIX_DIR}/bin/syncqt" - "PACKAGE_PREFIX_DIR}/tools/Qt6/bin/syncqt" - IGNORE_UNCHANGED - ) -endif () - -set(configfile - "${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreToolsTargets-debug.cmake" -) -if (EXISTS "${configfile}") - file(READ "${configfile}" _contents) - if (EXISTS "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake.exe") - file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/qmake.debug.bat" - DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin" - ) - string( - REPLACE [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qmake.exe"]] - [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qmake.debug.bat"]] - _contents - "${_contents}" - ) - endif () - if (EXISTS "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qtpaths.exe") - file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/qtpaths.debug.bat" - DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin" - ) - string( - REPLACE [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qtpaths.exe"]] - [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qtpaths.debug.bat"]] - _contents - "${_contents}" - ) - endif () - if (EXISTS "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/windeployqt.exe") - file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/windeployqt.debug.bat" - DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin" - ) - string( - REPLACE [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/windeployqt.exe"]] - [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/windeployqt.debug.bat"]] - _contents - "${_contents}" - ) - endif () - file(WRITE "${configfile}" "${_contents}") -endif () - -if (VCPKG_CROSSCOMPILING) - vcpkg_replace_string( - "${CURRENT_PACKAGES_DIR}/share/Qt6/Qt6Dependencies.cmake" - "${CURRENT_HOST_INSTALLED_DIR}" "\${CMAKE_CURRENT_LIST_DIR}/../../../${HOST_TRIPLET}" - ) -endif () - -function (remove_original_cmake_path file) - file(READ "${file}" _contents) - string( - REGEX - REPLACE "original_cmake_path=[^\n]*" - "original_cmake_path=''" - _contents - "${_contents}" - ) - file(WRITE "${file}" "${_contents}") -endfunction () - -if (NOT VCPKG_TARGET_IS_WINDOWS AND NOT CMAKE_HOST_WIN32) - foreach (file "qt-cmake${script_suffix}" "qt-cmake-private${script_suffix}") - remove_original_cmake_path("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${file}") - if (NOT VCPKG_BUILD_TYPE) - remove_original_cmake_path("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/debug/${file}") - endif () - endforeach () -endif () - -if (VCPKG_TARGET_IS_WINDOWS) - # dlls owned but not automatically installed by qtbase this is required to avoid - # ownership troubles in downstream qt modules - set(qtbase_owned_dlls - double-conversion.dll - icudt74.dll - icuin74.dll - icuuc74.dll - libcrypto-3-${VCPKG_TARGET_ARCHITECTURE}.dll - libcrypto-3.dll # for x86 - pcre2-16.dll - zlib1.dll - zstd.dll - ) - if ("dbus" IN_LIST FEATURES) - list(APPEND qtbase_owned_dlls dbus-1-3.dll) - endif () - list(TRANSFORM qtbase_owned_dlls PREPEND "${CURRENT_INSTALLED_DIR}/bin/") - foreach (dll IN LISTS qtbase_owned_dlls) - if (NOT EXISTS "${dll}") # Need to remove non-existant dlls since dependencies could - # have been build statically - list(REMOVE_ITEM qtbase_owned_dlls "${dll}") - endif () - endforeach () - file(COPY ${qtbase_owned_dlls} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin") -endif () diff --git a/vcpkg/ports/qtbase/qmake.debug.bat b/vcpkg/ports/qtbase/qmake.debug.bat deleted file mode 100644 index a7ed903a3..000000000 --- a/vcpkg/ports/qtbase/qmake.debug.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -"%0\..\qmake.exe" -qtconf "%0\..\qt.debug.conf" %* diff --git a/vcpkg/ports/qtbase/qt.conf.in b/vcpkg/ports/qtbase/qt.conf.in deleted file mode 100644 index 8e76b8f6d..000000000 --- a/vcpkg/ports/qtbase/qt.conf.in +++ /dev/null @@ -1,31 +0,0 @@ -[DevicePaths] -Prefix=${CURRENT_INSTALLED_DIR} -Headers=include/@QT6_DIRECTORY_PREFIX@ -Libraries=@REL_PATH@lib -Plugins=@REL_PATH@@QT6_DIRECTORY_PREFIX@plugins -Qml2Imports=@REL_PATH@@QT6_DIRECTORY_PREFIX@qml -Documentation=doc/@QT6_DIRECTORY_PREFIX@ -Binaries=@REL_PATH@bin -LibraryExecutables=tools/Qt6/bin -ArchData=share/Qt6 -Data=share/Qt6 -Translations=translations/@QT6_DIRECTORY_PREFIX@ -Examples=share/examples/@QT6_DIRECTORY_PREFIX@ -[Paths] -Prefix=${CURRENT_INSTALLED_DIR} -Headers=include/@QT6_DIRECTORY_PREFIX@ -Libraries=@REL_PATH@lib -Plugins=@REL_PATH@@QT6_DIRECTORY_PREFIX@plugins -Qml2Imports=@REL_PATH@@QT6_DIRECTORY_PREFIX@qml -Documentation=doc/@QT6_DIRECTORY_PREFIX@ -Binaries=@REL_PATH@bin -LibraryExecutables=tools/Qt6/bin -ArchData=share/Qt6 -Data=share/Qt6 -Translations=translations/@QT6_DIRECTORY_PREFIX@ -Examples=share/examples/@QT6_DIRECTORY_PREFIX@ -HostPrefix=${CURRENT_HOST_INSTALLED_DIR} -HostData=@REL_HOST_TO_DATA@share/Qt6 -HostBinaries=@REL_PATH@bin -HostLibraries=@REL_PATH@lib -HostLibraryExecutables=tools/Qt6/bin diff --git a/vcpkg/ports/qtbase/qtpaths.debug.bat b/vcpkg/ports/qtbase/qtpaths.debug.bat deleted file mode 100644 index 4fef8e754..000000000 --- a/vcpkg/ports/qtbase/qtpaths.debug.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -"%0\..\qtpaths.exe" --qtconf "%0\..\qt.debug.conf" %* diff --git a/vcpkg/ports/qtbase/vcpkg.json b/vcpkg/ports/qtbase/vcpkg.json deleted file mode 100644 index 2cbacaba3..000000000 --- a/vcpkg/ports/qtbase/vcpkg.json +++ /dev/null @@ -1,570 +0,0 @@ -{ - "name": "qtbase", - "version": "6.8.3", - "port-version": 1, - "description": "Qt Base (Core, Gui, Widgets, Network, ...)", - "homepage": "https://www.qt.io/", - "license": null, - "supports": "!uwp", - "dependencies": [ - { - "name": "libb2", - "platform": "!windows" - }, - { - "name": "pcre2", - "default-features": false - }, - { - "name": "qtbase", - "host": true, - "default-features": false - }, - { - "name": "qtbase", - "default-features": false, - "features": [ - "doubleconversion" - ] - }, - { - "name": "qtbase", - "default-features": false, - "features": [ - "cups" - ], - "platform": "osx" - }, - { - "name": "qtbase", - "default-features": false, - "features": [ - "thread" - ], - "platform": "osx" - }, - { - "name": "qtbase", - "default-features": false, - "features": [ - "pcre2" - ], - "platform": "windows & static" - }, - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - "zlib" - ], - "default-features": [ - { - "name": "appstore-compliant", - "platform": "uwp" - }, - "brotli", - "concurrent", - { - "name": "dbus", - "platform": "!(static & windows)" - }, - "dnslookup", - "doubleconversion", - { - "name": "egl", - "platform": "linux" - }, - { - "name": "egl", - "platform": "android" - }, - { - "name": "fontconfig", - "platform": "linux" - }, - "freetype", - { - "name": "gles2", - "platform": "android" - }, - "gui", - "harfbuzz", - "icu", - "jpeg", - "network", - { - "name": "opengl", - "platform": "!ios" - }, - { - "name": "openssl", - "platform": "!ios" - }, - "pcre2", - "png", - { - "name": "securetransport", - "platform": "ios" - }, - "sql", - "sql-psql", - "sql-sqlite", - "testlib", - "thread", - "widgets", - { - "name": "xcb", - "platform": "linux" - }, - { - "name": "xcb-xlib", - "platform": "linux" - }, - { - "name": "xrender", - "platform": "linux" - }, - "zstd" - ], - "features": { - "appstore-compliant": { - "description": "Disable code that is not allowed in platform app stores. This is on by default for platforms which require distribution through an app store by default, in particular Android, iOS, tvOS, and watchOS." - }, - "brotli": { - "description": "Support for downloading and decompressing resources compressed with Brotli through QNetworkAccessManager.", - "dependencies": [ - "brotli", - { - "name": "qtbase", - "default-features": false, - "features": [ - "network" - ] - } - ] - }, - "concurrent": { - "description": "Provides a high-level multi-threading API. Qt Concurrent", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "thread" - ] - } - ] - }, - "cups": { - "description": "Provides support for the Common Unix Printing System.", - "supports": "linux | osx" - }, - "dbus": { - "description": "Qt D-Bus", - "dependencies": [ - { - "name": "dbus", - "default-features": false - }, - { - "name": "qtbase", - "host": true, - "default-features": false, - "features": [ - "dbus" - ] - }, - { - "name": "qtbase", - "default-features": false, - "features": [ - "thread" - ] - } - ] - }, - "dnslookup": { - "description": "Enable DNS lookup support", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "network" - ] - } - ] - }, - "doubleconversion": { - "description": "Enable double conversion support", - "dependencies": [ - "double-conversion" - ] - }, - "egl": { - "description": "EGL", - "supports": "linux", - "dependencies": [ - "egl" - ] - }, - "fontconfig": { - "description": "Use fontconfig", - "dependencies": [ - "fontconfig", - { - "name": "qtbase", - "default-features": false, - "features": [ - "gui" - ] - } - ] - }, - "framework": { - "description": "MAC framework build", - "supports": "osx & !static" - }, - "freetype": { - "description": "Supports the FreeType 2 font engine (and its supported font formats).", - "dependencies": [ - { - "name": "freetype", - "default-features": false - } - ] - }, - "gles2": { - "description": "OpenGL ES 2.0", - "supports": "!windows & !osx", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "gui" - ] - } - ] - }, - "gles3": { - "description": "OpenGL ES 3.0", - "supports": "!windows & !osx", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "gles2" - ] - } - ] - }, - "glib": { - "description": "GLib", - "dependencies": [ - "glib" - ] - }, - "gtk3": { - "description": "GTK3 platform theme plugin", - "supports": "linux", - "dependencies": [ - "gtk3", - { - "name": "qtbase", - "default-features": false, - "features": [ - "glib" - ] - } - ] - }, - "gui": { - "description": "Qt Gui", - "dependencies": [ - { - "name": "opengl", - "platform": "!ios" - }, - { - "name": "qtbase", - "default-features": false, - "features": [ - "freetype" - ] - }, - { - "name": "qtbase", - "default-features": false, - "features": [ - "opengl" - ], - "platform": "osx" - }, - { - "name": "qtbase", - "default-features": false, - "features": [ - "thread" - ], - "platform": "windows" - } - ] - }, - "harfbuzz": { - "description": "Use harfbuzz", - "dependencies": [ - "harfbuzz", - { - "name": "qtbase", - "default-features": false, - "features": [ - "gui" - ] - } - ] - }, - "icu": { - "description": "Enable ICU support", - "dependencies": [ - "icu" - ] - }, - "jpeg": { - "description": "Enable JPEG", - "dependencies": [ - "libjpeg-turbo", - { - "name": "qtbase", - "default-features": false, - "features": [ - "gui" - ] - } - ] - }, - "network": { - "description": "Qt Network" - }, - "opengl": { - "description": "OpenGL", - "dependencies": [ - "opengl", - { - "name": "qtbase", - "default-features": false, - "features": [ - "gui" - ] - } - ] - }, - "openssl": { - "description": "Enable OpenSSL", - "dependencies": [ - "openssl", - { - "name": "qtbase", - "default-features": false, - "features": [ - "network" - ] - } - ] - }, - "pcre2": { - "description": "Enable PCRE2 support", - "dependencies": [ - { - "name": "pcre2", - "default-features": false - } - ] - }, - "png": { - "description": "Enable PNG", - "dependencies": [ - "libpng", - { - "name": "qtbase", - "default-features": false, - "features": [ - "gui" - ] - } - ] - }, - "securetransport": { - "description": "Enable Secure Transport", - "supports": "ios | osx" - }, - "sql": { - "description": "Qt Sql", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "concurrent" - ] - } - ] - }, - "sql-mysql": { - "description": "Enable SQL Driver MySQL", - "dependencies": [ - "libmysql", - { - "name": "qtbase", - "default-features": false, - "features": [ - "sql" - ] - } - ] - }, - "sql-oci": { - "description": "Enable SQL Driver Oracle OCI", - "dependencies": [ - "ocilib", - { - "name": "qtbase", - "default-features": false, - "features": [ - "sql" - ] - } - ] - }, - "sql-odbc": { - "description": "Enable SQL Driver odbc", - "supports": "windows", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "sql" - ] - } - ] - }, - "sql-psql": { - "description": "Enable SQL Driver psql", - "dependencies": [ - "libpq", - { - "name": "qtbase", - "default-features": false, - "features": [ - "sql" - ] - } - ] - }, - "sql-sqlite": { - "description": "Enable SQL Driver sqlite", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "sql" - ] - }, - "sqlite3" - ] - }, - "testlib": { - "description": "Qt Testlib" - }, - "thread": { - "description": "Thread support; provides QThread and related classes." - }, - "vulkan": { - "description": "Enable Vulkan support", - "dependencies": [ - "vulkan" - ] - }, - "widgets": { - "description": "Qt Widgets", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "gui" - ] - } - ] - }, - "xcb": { - "description": "XCB", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "concurrent", - "xkbcommon-x11", - "xlib" - ] - } - ] - }, - "xcb-xlib": { - "description": "xcb-xlib", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "xlib" - ] - } - ] - }, - "xkb": { - "description": "XKB" - }, - "xkbcommon-x11": { - "description": "xkbcommon_x11", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "xkb" - ] - } - ] - }, - "xlib": { - "description": "XLib" - }, - "xrender": { - "description": "XRender for native painting", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "xcb" - ] - } - ] - }, - "zstd": { - "description": "Zstandard support", - "dependencies": [ - "zstd" - ] - } - } -} diff --git a/vcpkg/ports/qtbase/windeployqt.debug.bat b/vcpkg/ports/qtbase/windeployqt.debug.bat deleted file mode 100644 index 234bb4383..000000000 --- a/vcpkg/ports/qtbase/windeployqt.debug.bat +++ /dev/null @@ -1,10 +0,0 @@ -@echo off -setlocal enabledelayedexpansion -set mypath=%~dp0 -set mypath=%mypath:~0,-1% -set BAKCD=!CD! -cd /D "%mypath%\..\..\..\debug\bin" -set PATH=!CD!;%PATH% -cd /D "%BAKCD%" -"%mypath%\windeployqt6.exe" --qtpaths "%mypath%\qtpaths.debug.bat" %* -endlocal diff --git a/vcpkg/ports/qtdeclarative/port.data.cmake b/vcpkg/ports/qtdeclarative/port.data.cmake new file mode 100644 index 000000000..6991c8c4c --- /dev/null +++ b/vcpkg/ports/qtdeclarative/port.data.cmake @@ -0,0 +1,7 @@ +set(qtdeclarative_HASH + "187a525b73595e7c4d89c98be657df4f480114957649813aa9ecd3fba23f56f20c8804f2ab507d83a5fb6120a2c6c36751fe5c80f43f9feb6c3479a733fb6684" +) +set(qtdeclarative_URL + "https://download.qt.io/archive/qt/6.10/6.10.3/submodules/qtdeclarative-everywhere-src-6.10.3.tar.xz;https://mirrors.ocf.berkeley.edu/qt/archive/qt/6.10/6.10.3/submodules/qtdeclarative-everywhere-src-6.10.3.tar.xz" +) +set(qtdeclarative_FILENAME "qtdeclarative-everywhere-src-6.10.3.tar.xz") diff --git a/vcpkg/ports/qtdeclarative/portfile.cmake b/vcpkg/ports/qtdeclarative/portfile.cmake index e25092041..833ca308b 100644 --- a/vcpkg/ports/qtdeclarative/portfile.cmake +++ b/vcpkg/ports/qtdeclarative/portfile.cmake @@ -33,7 +33,8 @@ qt_install_submodule( TOOL_NAMES ${TOOL_NAMES} CONFIGURE_OPTIONS - -DFEATURE_quickcontrols2_fusion:BOOL=ON + # space and load time optimization, we don't compile styles that are not used + -DFEATURE_quickcontrols2_fusion:BOOL=OFF -DFEATURE_quickcontrols2_material:BOOL=ON -DFEATURE_quickcontrols2_imagine:BOOL=OFF -DFEATURE_quickcontrols2_universal:BOOL=OFF diff --git a/vcpkg/ports/qtdeclarative/vcpkg.json b/vcpkg/ports/qtdeclarative/vcpkg.json index fe1561e83..2083031d4 100644 --- a/vcpkg/ports/qtdeclarative/vcpkg.json +++ b/vcpkg/ports/qtdeclarative/vcpkg.json @@ -1,6 +1,6 @@ { "name": "qtdeclarative", - "version": "6.8.3", + "version": "6.10.3", "description": "Qt Declarative (Quick 2)", "homepage": "https://www.qt.io/", "license": null, diff --git a/vcpkg/ports/qtkeychain-qt6/portfile.cmake b/vcpkg/ports/qtkeychain-qt6/portfile.cmake deleted file mode 100644 index 74cb50aa7..000000000 --- a/vcpkg/ports/qtkeychain-qt6/portfile.cmake +++ /dev/null @@ -1,74 +0,0 @@ -message( - WARNING - "qtkeychain is a third-party extension to Qt and is not affiliated with The Qt Company" -) - -vcpkg_from_github( - OUT_SOURCE_PATH - SOURCE_PATH - REPO - frankosterfeld/qtkeychain - REF - "${VERSION}" - SHA512 - d1d87553db94bf54da1373016a847476e6cd608db6d427ed72532658e2272501daf45d7c9976efdde2f26ab3810ba9dbfec2518d46dee5a76ecaa369bfee2e4a - HEAD_REF - master -) - -if (VCPKG_CROSSCOMPILING) - list(APPEND QTKEYCHAIN_OPTIONS -DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR}) - list(APPEND QTKEYCHAIN_OPTIONS - -DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share - ) - # remove when https://github.com/microsoft/vcpkg/pull/16111 is merged - if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 AND VCPKG_TARGET_IS_WINDOWS) - list( - APPEND - QTKEYCHAIN_OPTIONS - -DCMAKE_CROSSCOMPILING=ON - -DCMAKE_SYSTEM_PROCESSOR:STRING=ARM64 - -DCMAKE_SYSTEM_NAME:STRING=Windows - ) - endif () -endif () - -list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TEST_APPLICATION:BOOL=OFF) -list(APPEND QTKEYCHAIN_OPTIONS -DLIBSECRET_SUPPORT:BOOL=OFF) - -# FIXME: Why does build translations fail on arm64-windows? -if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) - list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=OFF) -else () - list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=ON) -endif () - -vcpkg_cmake_configure( - DISABLE_PARALLEL_CONFIGURE - SOURCE_PATH - ${SOURCE_PATH} - OPTIONS - -DBUILD_WITH_QT6=ON - ${QTKEYCHAIN_OPTIONS} -) -vcpkg_cmake_install() - -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup( - CONFIG_PATH - lib/cmake/Qt6Keychain - PACKAGE_NAME - Qt6Keychain -) - -# Remove unneeded dirs -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" - "${CURRENT_PACKAGES_DIR}/debug/share" -) - -# Handle copyright -file( - INSTALL "${SOURCE_PATH}/COPYING" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" - RENAME copyright -) diff --git a/vcpkg/ports/qtkeychain-qt6/vcpkg.json b/vcpkg/ports/qtkeychain-qt6/vcpkg.json deleted file mode 100644 index dd42992d0..000000000 --- a/vcpkg/ports/qtkeychain-qt6/vcpkg.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "qtkeychain-qt6", - "version": "0.14.3", - "port-version": 0, - "description": "(Unaffiliated with Qt) Platform-independent Qt6 API for storing passwords securely", - "homepage": "https://github.com/frankosterfeld/qtkeychain", - "license": "BSD-3-Clause", - "dependencies": [ - { - "name": "qtbase", - "default-features": false - }, - { - "name": "qttools", - "host": true, - "features": [ - "linguist" - ] - }, - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - } - ] -} \ No newline at end of file diff --git a/vcpkg/ports/qtmultimedia/ffmpeg-compile-def.patch b/vcpkg/ports/qtmultimedia/ffmpeg-compile-def.patch deleted file mode 100644 index 95e531510..000000000 --- a/vcpkg/ports/qtmultimedia/ffmpeg-compile-def.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/plugins/multimedia/ffmpeg/CMakeLists.txt b/src/plugins/multimedia/ffmpeg/CMakeLists.txt -index 77c459a..af5229e 100644 ---- a/src/plugins/multimedia/ffmpeg/CMakeLists.txt -+++ b/src/plugins/multimedia/ffmpeg/CMakeLists.txt -@@ -273,7 +273,7 @@ if(BUILD_SHARED_LIBS) - else() - foreach(ffmpeg_lib IN LISTS ffmpeg_libs) - qt_internal_add_target_include_dirs(FFmpegMediaPluginImplPrivate ${ffmpeg_lib}) -- target_include_directories(FFmpegMediaPluginImplPrivate PUBLIC -+ target_compile_definitions(FFmpegMediaPluginImplPrivate PUBLIC - "$") - endforeach() - endif() diff --git a/vcpkg/ports/qtmultimedia/fix_avfoundation_target.patch b/vcpkg/ports/qtmultimedia/fix_avfoundation_target.patch deleted file mode 100644 index 943bc4798..000000000 --- a/vcpkg/ports/qtmultimedia/fix_avfoundation_target.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/plugins/multimedia/darwin/CMakeLists.txt b/src/plugins/multimedia/darwin/CMakeLists.txt -index a1a0cb1..242ceac 100644 ---- a/src/plugins/multimedia/darwin/CMakeLists.txt -+++ b/src/plugins/multimedia/darwin/CMakeLists.txt -@@ -34,6 +34,6 @@ qt_internal_add_plugin(QDarwinMediaPlugin - ${FWMetal} - ${FWQuartzCore} -- AVFoundation::AVFoundation -+ ${FWAVFoundation} - ) - - qt_internal_extend_target(QDarwinMediaPlugin CONDITION NOT TVOS diff --git a/vcpkg/ports/qtmultimedia/portfile.cmake b/vcpkg/ports/qtmultimedia/portfile.cmake deleted file mode 100644 index 7c86ac46e..000000000 --- a/vcpkg/ports/qtmultimedia/portfile.cmake +++ /dev/null @@ -1,109 +0,0 @@ -set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") -include("${SCRIPT_PATH}/qt_install_submodule.cmake") - -set(${PORT}_PATCHES - static_find_modules.patch - fix_avfoundation_target.patch - remove-static-ssl-stub.patch - private_libs.patch - ffmpeg-compile-def.patch -) - -vcpkg_check_features( - OUT_FEATURE_OPTIONS - FEATURE_OPTIONS - FEATURES - "qml" - CMAKE_REQUIRE_FIND_PACKAGE_Qt6Quick - "widgets" - CMAKE_REQUIRE_FIND_PACKAGE_Qt6Widgets - INVERTED_FEATURES - "qml" - CMAKE_DISABLE_FIND_PACKAGE_Qt6Quick - "widgets" - CMAKE_DISABLE_FIND_PACKAGE_Qt6Widgets - "gstreamer" - CMAKE_DISABLE_FIND_PACKAGE_GStreamer - "ffmpeg" - CMAKE_DISABLE_FIND_PACKAGE_FFmpeg - # Features not yet added in the manifest: - "vaapi" - CMAKE_DISABLE_FIND_PACKAGE_VAAPI # not in vpckg -) - -set(unused "") -if ("gstreamer" IN_LIST FEATURES) - list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer='yes'") -else () - list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer='no'") - list( - APPEND - unused - INPUT_gstreamer_gl - INPUT_gstreamer_photography - ) -endif () -list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer_gl='no'") -list(APPEND FEATURE_OPTIONS "-DINPUT_gstreamer_photography='no'") - -if (VCPKG_TARGET_IS_WINDOWS) - list(APPEND FEATURE_OPTIONS "-DFEATURE_wmf=ON") -else () - list(APPEND FEATURE_OPTIONS "-DFEATURE_wmf=OFF") -endif () - -if ("ffmpeg" IN_LIST FEATURES) - # Note: Requires pulsadio on linux and wmfsdk on windows - list(APPEND FEATURE_OPTIONS "-DINPUT_ffmpeg='yes'") - if (VCPKG_TARGET_IS_WINDOWS - OR VCPKG_TARGET_IS_OSX - OR VCPKG_TARGET_IS_ANDROID - ) - list(APPEND FEATURE_OPTIONS "-DINPUT_pulseaudio='no'") - else () - list(APPEND FEATURE_OPTIONS "-DINPUT_pulseaudio='yes'") - endif () -else () - list(APPEND FEATURE_OPTIONS "-DINPUT_ffmpeg='no'") - list(APPEND FEATURE_OPTIONS "-DINPUT_pulseaudio='no'") -endif () - -# alsa is not ready -if (NOT - "ffmpeg" - IN_LIST - FEATURES - AND NOT - "gstreamer" - IN_LIST - FEATURES - AND VCPKG_TARGET_IS_LINUX -) - # list(APPEND FEATURE_OPTIONS "-DFEATURE_alsa=ON") # alsa is experimental so don't - # activate it (also missing the dep on it.) - message(FATAL_ERROR "You need to activate at least one backend.") -else () - list(APPEND FEATURE_OPTIONS "-DFEATURE_alsa=OFF") -endif () - -qt_install_submodule( - PATCHES - ${${PORT}_PATCHES} - CONFIGURE_OPTIONS - --trace-expand - ${FEATURE_OPTIONS} - -DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON - CONFIGURE_OPTIONS_RELEASE - CONFIGURE_OPTIONS_DEBUG - CONFIGURE_OPTIONS_MAYBE_UNUSED - ${unused} -) - -if ("gstreamer" IN_LIST FEATURES AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_replace_string( - "${CURRENT_PACKAGES_DIR}/share/Qt6Multimedia/Qt6QGstreamerMediaPluginDependencies.cmake" - "GStreamer\;FALSE\;\;\;;GStreamer\;FALSE\;\;App\;;GStreamer\;FALSE\;\;\;Gl" - "GStreamer\;FALSE\;\;\;;GStreamer\;FALSE\;\;App\;;GStreamer\;FALSE\;\;\;Gl;EGL\;FALSE\;\;\;" - IGNORE_UNCHANGED - ) -endif () diff --git a/vcpkg/ports/qtmultimedia/private_libs.patch b/vcpkg/ports/qtmultimedia/private_libs.patch deleted file mode 100644 index 3ffc253f4..000000000 --- a/vcpkg/ports/qtmultimedia/private_libs.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake -index 6316dde..54f807b 100644 ---- a/cmake/FindFFmpeg.cmake -+++ b/cmake/FindFFmpeg.cmake -@@ -264,9 +264,11 @@ function(__ffmpeg_internal_set_dependencies _component) - string(REGEX MATCHALL "${prefix_l}[^ ]+" libs_dependency ${out}) - string(REGEX MATCHALL "[^ ]+${suffix_lib}" libs_dependency_lib ${out}) - -- string(REGEX REPLACE ".*Libs.private:([^\n\r]+).*" "\\1" out "${pcfile}") -- string(REGEX MATCHALL "${prefix_l}[^ ]+" libs_private_dependency ${out}) -- string(REGEX MATCHALL "[^ ]+${suffix_lib}" libs_private_dependency_lib ${out}) -+ if(out MATCHES "Libs.private:") -+ string(REGEX REPLACE ".*Libs.private:([^\n\r]+).*" "\\1" out "${pcfile}") -+ string(REGEX MATCHALL "${prefix_l}[^ ]+" libs_private_dependency ${out}) -+ string(REGEX MATCHALL "[^ ]+${suffix_lib}" libs_private_dependency_lib ${out}) -+ endif() - - list(APPEND deps_no_suffix ${libs_dependency} ${libs_private_dependency}) - foreach(dependency ${deps_no_suffix}) diff --git a/vcpkg/ports/qtmultimedia/remove-static-ssl-stub.patch b/vcpkg/ports/qtmultimedia/remove-static-ssl-stub.patch deleted file mode 100644 index b74b66c3d..000000000 --- a/vcpkg/ports/qtmultimedia/remove-static-ssl-stub.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/plugins/multimedia/ffmpeg/cmake/QtAddFFmpegStubs.cmake b/src/plugins/multimedia/ffmpeg/cmake/QtAddFFmpegStubs.cmake -index 5778ae4d23..8c0df4b44d 100644 ---- a/src/plugins/multimedia/ffmpeg/cmake/QtAddFFmpegStubs.cmake -+++ b/src/plugins/multimedia/ffmpeg/cmake/QtAddFFmpegStubs.cmake -@@ -70,7 +70,10 @@ macro(qt_internal_multimedia_find_openssl_soversion) - if (NOT OPENSSL_SSL_LIBRARY) - message(FATAL_ERROR "OPENSSL_SSL_LIBRARY is not found") - endif() -- -+ set(openssl_is_shared ON) -+ if(OPENSSL_SSL_LIBRARY MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$") -+ set(openssl_is_shared OFF) -+ endif() - get_filename_component(ssl_lib_realpath "${OPENSSL_SSL_LIBRARY}" REALPATH) - - string(REGEX MATCH "[0-9]+(\\.[0-9]+)*[a-z]?$" ssl_soversion "${ssl_lib_realpath}") -@@ -187,6 +190,9 @@ function(qt_internal_multimedia_add_ffmpeg_stubs) - - if (ffmpeg_has_openssl) - qt_internal_multimedia_find_openssl_soversion() -+ if(NOT openssl_is_shared) -+ list(REMOVE_ITEM FFMPEG_STUBS ssl crypto) -+ endif() - endif() - - foreach (stub ${FFMPEG_STUBS}) diff --git a/vcpkg/ports/qtmultimedia/static_find_modules.patch b/vcpkg/ports/qtmultimedia/static_find_modules.patch deleted file mode 100644 index 1fc348de6..000000000 --- a/vcpkg/ports/qtmultimedia/static_find_modules.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake -index 47d8769..46a5c9b 100644 ---- a/cmake/FindFFmpeg.cmake -+++ b/cmake/FindFFmpeg.cmake -@@ -215,7 +215,7 @@ foreach (_component ${FFmpeg_FIND_COMPONENTS}) - find_component(${_component} "lib${library}" ${library} "lib${library}/${library}.h") - - if (${_component}_FOUND) -- list(APPEND FFMPEG_LIBRARIES ${${_component}_LIBRARY_NAME}) -+ list(APPEND FFMPEG_LIBRARIES ${${_component}_LIBRARY}) - list(APPEND FFMPEG_DEFINITIONS ${${_component}_DEFINITIONS}) - list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIR}) - list(APPEND FFMPEG_LIBRARY_DIRS ${${_component}_LIBRARY_DIR}) -@@ -306,18 +306,19 @@ endfunction() - string(TOLOWER ${_component} _lowerComponent) - if (NOT TARGET FFmpeg::${_lowerComponent}) -- add_library(FFmpeg::${_lowerComponent} INTERFACE IMPORTED) -+ add_library(FFmpeg::${_lowerComponent} UNKNOWN IMPORTED) - set_target_properties(FFmpeg::${_lowerComponent} PROPERTIES - INTERFACE_COMPILE_OPTIONS "${${_component}_DEFINITIONS}" - INTERFACE_INCLUDE_DIRECTORIES ${${_component}_INCLUDE_DIR} -- INTERFACE_LINK_LIBRARIES "${${_component}_LIBRARY_NAME}" -- INTERFACE_LINK_DIRECTORIES "${${_component}_LIBRARY_DIR}" -+ IMPORTED_LOCATION "${${_component}_LIBRARY}" - ) - - __ffmpeg_internal_set_dependencies(${_component}) -- target_link_libraries(FFmpeg::${_lowerComponent} INTERFACE "${${_component}_LIBRARY_NAME}") -+ if(WIN32 AND _lowerComponent STREQUAL "avutil") -+ target_link_libraries(FFmpeg::${_lowerComponent} INTERFACE "Bcrypt.lib") -+ endif() - if (UNIX AND NOT APPLE) - target_link_options(FFmpeg::${_lowerComponent} INTERFACE "-Wl,--exclude-libs=lib${_lowerComponent}") - endif () - endif() - endif() - endforeach () -@@ -361,14 +364,18 @@ if (shared_libs_desired AND NOT FFMPEG_SHARED_COMPONENTS) - endif() - - if (NOT TARGET FFmpeg::FFmpeg) -- add_library(FFmpeg INTERFACE) -+ add_library(FFmpeg INTERFACE IMPORTED) - set_target_properties(FFmpeg PROPERTIES - INTERFACE_COMPILE_OPTIONS "${FFMPEG_DEFINITIONS}" - INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_INCLUDE_DIRS}" -- INTERFACE_LINK_LIBRARIES "${FFMPEG_LIBRARIES}" - INTERFACE_LINK_DIRECTORIES "${FFMPEG_LIBRARY_DIRS}" - ) -+ target_link_libraries(FFmpeg INTERFACE ${FFMPEG_LIBRARIES}) -- add_library(FFmpeg::FFmpeg ALIAS FFmpeg) -+ if(WIN32) -+ target_link_libraries(FFmpeg INTERFACE "Bcrypt.lib") -+ endif() -+ add_library(FFmpeg::FFmpeg INTERFACE IMPORTED) -+ target_link_libraries(FFmpeg::FFmpeg INTERFACE FFmpeg) - endif() - - # Compile the list of required vars -diff --git a/cmake/FindGObject.cmake b/cmake/FindGObject.cmake -index 19a8a67..09e95d1 100644 ---- a/cmake/FindGObject.cmake -+++ b/cmake/FindGObject.cmake -@@ -13,8 +13,8 @@ - # ``GObject::GObject`` - # The gobject-2.0 library - --include(CMakeFindDependencyMacro) --find_dependency(GLIB2) -+find_package(GLIB2) -+find_package(libffi) - qt_internal_disable_find_package_global_promotion(GLIB2::GLIB2) - - if(NOT TARGET GObject::GObject) -@@ -40,6 +40,7 @@ if(NOT TARGET GObject::GObject) - target_link_libraries(GObject::GObject INTERFACE - ${GObject_LIBRARY} - GLIB2::GLIB2 -+ libffi - ) - endif() - include(FindPackageHandleStandardArgs) diff --git a/vcpkg/ports/qtmultimedia/vcpkg.json b/vcpkg/ports/qtmultimedia/vcpkg.json deleted file mode 100644 index 63349c87a..000000000 --- a/vcpkg/ports/qtmultimedia/vcpkg.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "qtmultimedia", - "version": "6.8.3", - "description": "Qt Multimedia is an add-on module that provides a rich set of QML types and C++ classes to handle multimedia content.", - "homepage": "https://www.qt.io/", - "license": null, - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "concurrent", - "gui", - "network" - ] - }, - { - "name": "qtshadertools", - "default-features": false - } - ], - "default-features": [ - "widgets" - ], - "features": { - "ffmpeg": { - "description": "Build with ffmpeg", - "dependencies": [ - { - "name": "ffmpeg", - "default-features": false, - "features": [ - "avcodec", - "avdevice", - "avformat", - "swresample", - "swscale" - ] - }, - { - "name": "pulseaudio", - "platform": "linux" - }, - { - "name": "qtdeclarative", - "default-features": false - } - ] - }, - "gstreamer": { - "description": "Build with gstreamer", - "supports": "linux", - "dependencies": [ - "egl", - { - "name": "gstreamer", - "default-features": false, - "features": [ - "plugins-base" - ] - } - ] - }, - "qml": { - "description": "Build QML imports", - "dependencies": [ - { - "name": "qtdeclarative", - "default-features": false - } - ] - }, - "widgets": { - "description": "Build Multimedia Widgets", - "dependencies": [ - { - "name": "qtbase", - "default-features": false, - "features": [ - "widgets" - ] - } - ] - } - } -} diff --git a/vcpkg/ports/qtpositioning/android15_altitude_fix.patch b/vcpkg/ports/qtpositioning/android15_altitude_fix.patch deleted file mode 100644 index 453b830a2..000000000 --- a/vcpkg/ports/qtpositioning/android15_altitude_fix.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/src/plugins/position/android/jar/src/org/qtproject/qt/android/positioning/QtPositioning.java b/src/plugins/position/android/jar/src/org/qtproject/qt/android/positioning/QtPositioning.java -index e4163b09..afb2889e 100644 ---- a/src/plugins/position/android/jar/src/org/qtproject/qt/android/positioning/QtPositioning.java -+++ b/src/plugins/position/android/jar/src/org/qtproject/qt/android/positioning/QtPositioning.java -@@ -112,6 +112,8 @@ class QtPositioning implements LocationListener - static private void addMslAltitude(Location location) - { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { -+ if (location.hasMslAltitude()) // Nothing to be done -+ return; - if (altitudeConverter == null) - altitudeConverter = new AltitudeConverter(); - try { -diff --git a/src/plugins/position/android/src/jnipositioning.cpp b/src/plugins/position/android/src/jnipositioning.cpp -index 2b2919fa..0abc2cad 100644 ---- a/src/plugins/position/android/src/jnipositioning.cpp -+++ b/src/plugins/position/android/src/jnipositioning.cpp -@@ -220,7 +220,7 @@ namespace AndroidPositioning { - return ret; - } - -- QGeoPositionInfo positionInfoFromJavaLocation(const jobject &location) -+ QGeoPositionInfo positionInfoFromJavaLocation(const jobject &location, bool useAltConverter) - { - QGeoPositionInfo info; - -@@ -241,8 +241,11 @@ namespace AndroidPositioning { - coordinate.setAltitude(value); - } - // MSL altitude, available in API Level 34+. -- // It will be available only if we requested it when starting updates. -- if (QNativeInterface::QAndroidApplication::sdkVersion() >= 34) { -+ // In API Level 34 it was available only if we manually added it. -+ // In API Level 35 (and potentially later), it's automatically added -+ // to the location object, so we need to use it *only* when the user -+ // set the relevant plugin parameter. -+ if (useAltConverter && QNativeInterface::QAndroidApplication::sdkVersion() >= 34) { - attributeExists = jniObject.callMethod("hasMslAltitude"); - if (attributeExists) { - const jdouble value = jniObject.callMethod("getMslAltitudeMeters"); -@@ -451,7 +454,7 @@ namespace AndroidPositioning { - if (location == nullptr) - return QGeoPositionInfo(); - -- const QGeoPositionInfo info = positionInfoFromJavaLocation(location); -+ const QGeoPositionInfo info = positionInfoFromJavaLocation(location, useAltitudeConverter); - - return info; - } -@@ -615,7 +618,6 @@ static void positionUpdated(JNIEnv *env, jobject thiz, QtJniTypes::Location loca - { - Q_UNUSED(env); - Q_UNUSED(thiz); -- QGeoPositionInfo info = AndroidPositioning::positionInfoFromJavaLocation(location.object()); - - QGeoPositionInfoSourceAndroid *source = AndroidPositioning::idToPosSource()->value(androidClassKey); - if (!source) { -@@ -623,6 +625,10 @@ static void positionUpdated(JNIEnv *env, jobject thiz, QtJniTypes::Location loca - return; - } - -+ const bool useAltitudeConverter = source->useAltitudeConverter(); -+ QGeoPositionInfo info = -+ AndroidPositioning::positionInfoFromJavaLocation(location.object(), useAltitudeConverter); -+ - //we need to invoke indirectly as the Looper thread is likely to be not the same thread - if (!isSingleUpdate) - QMetaObject::invokeMethod(source, "processPositionUpdate", Qt::AutoConnection, diff --git a/vcpkg/ports/qtpositioning/devendor-poly2tri.patch b/vcpkg/ports/qtpositioning/devendor-poly2tri.patch index 85e18ca98..003b42da6 100644 --- a/vcpkg/ports/qtpositioning/devendor-poly2tri.patch +++ b/vcpkg/ports/qtpositioning/devendor-poly2tri.patch @@ -35,3 +35,4 @@ diff --color -Naur a/src/CMakeLists.txt b/src/CMakeLists.txt add_subdirectory(3rdparty/clipper) add_subdirectory(3rdparty/clip2tri) add_subdirectory(positioning) + \ No newline at end of file diff --git a/vcpkg/ports/qtpositioning/foregroundservice.patch b/vcpkg/ports/qtpositioning/foregroundservice.patch index 640f85297..fbe6bb8e1 100644 --- a/vcpkg/ports/qtpositioning/foregroundservice.patch +++ b/vcpkg/ports/qtpositioning/foregroundservice.patch @@ -1,8 +1,8 @@ diff --git a/src/plugins/position/android/src/jnipositioning.cpp b/src/plugins/position/android/src/jnipositioning.cpp -index 2b2919f..bc42c2e 100644 +index 0abc2ca..9d160a9 100644 --- a/src/plugins/position/android/src/jnipositioning.cpp +++ b/src/plugins/position/android/src/jnipositioning.cpp -@@ -589,10 +589,6 @@ namespace AndroidPositioning { +@@ -592,10 +592,6 @@ namespace AndroidPositioning { { QLocationPermission permission; @@ -13,3 +13,4 @@ index 2b2919f..bc42c2e 100644 bool permitted = false; if (accuracy & AccuracyType::Precise) { permission.setAccuracy(QLocationPermission::Precise); + \ No newline at end of file diff --git a/vcpkg/ports/qtpositioning/ios_orthometric_altitude.patch b/vcpkg/ports/qtpositioning/ios_orthometric_altitude.patch index 9421028fe..4dda3d390 100644 --- a/vcpkg/ports/qtpositioning/ios_orthometric_altitude.patch +++ b/vcpkg/ports/qtpositioning/ios_orthometric_altitude.patch @@ -1,12 +1,11 @@ diff --git a/src/plugins/position/corelocation/qgeopositioninfosource_cl.mm b/src/plugins/position/corelocation/qgeopositioninfosource_cl.mm -index 95d51a86..bdb8641b 100644 +index 95d51a8..656a5d2 100644 --- a/src/plugins/position/corelocation/qgeopositioninfosource_cl.mm +++ b/src/plugins/position/corelocation/qgeopositioninfosource_cl.mm -@@ -47,12 +47,31 @@ - NSTimeInterval locationTimeStamp = [newLocation.timestamp timeIntervalSince1970]; +@@ -48,11 +48,31 @@ const QDateTime timeStamp = QDateTime::fromMSecsSinceEpoch(qRound64(locationTimeStamp * 1000), QTimeZone::UTC); -- + + // The ellipsoidalAltitude property can be populated depending on the manufacturer, we either use this and apply + // transformation with our geoid model or just propagate the geoid elevation from the mocked location + double availableAltitude; @@ -36,3 +35,4 @@ index 95d51a86..bdb8641b 100644 if (newLocation.horizontalAccuracy >= 0) location.setAttribute(QGeoPositionInfo::HorizontalAccuracy, newLocation.horizontalAccuracy); if (newLocation.verticalAccuracy >= 0) + \ No newline at end of file diff --git a/vcpkg/ports/qtpositioning/port.data.cmake b/vcpkg/ports/qtpositioning/port.data.cmake new file mode 100644 index 000000000..94477d34b --- /dev/null +++ b/vcpkg/ports/qtpositioning/port.data.cmake @@ -0,0 +1,7 @@ +set(qtpositioning_HASH + "52d6ebca4e2921776402895fed6c8cc81c50d274215c783bf499cdd37935c29b6027e203d717cffcc30c5be3d79081285112509b4dbe81355d8d02acb4a35c25" +) +set(qtpositioning_URL + "https://download.qt.io/archive/qt/6.10/6.10.3/submodules/qtpositioning-everywhere-src-6.10.3.tar.xz;https://mirrors.ocf.berkeley.edu/qt/archive/qt/6.10/6.10.3/submodules/qtpositioning-everywhere-src-6.10.3.tar.xz" +) +set(qtpositioning_FILENAME "qtpositioning-everywhere-src-6.10.3.tar.xz") diff --git a/vcpkg/ports/qtpositioning/portfile.cmake b/vcpkg/ports/qtpositioning/portfile.cmake index fb5cd2827..0266c3620 100644 --- a/vcpkg/ports/qtpositioning/portfile.cmake +++ b/vcpkg/ports/qtpositioning/portfile.cmake @@ -1,13 +1,8 @@ set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") include("${SCRIPT_PATH}/qt_install_submodule.cmake") -set(${PORT}_PATCHES - devendor-poly2tri.patch - foregroundservice.patch - ios_orthometric_altitude.patch - # TODO: The android patch should be removed after migration to Qt 6.9+ as it is a - # backport of their bugfix - android15_altitude_fix.patch +set(${PORT}_PATCHES devendor-poly2tri.patch foregroundservice.patch + ios_orthometric_altitude.patch ) vcpkg_check_features( diff --git a/vcpkg/ports/qtpositioning/vcpkg.json b/vcpkg/ports/qtpositioning/vcpkg.json index 6634396a5..e227d6841 100644 --- a/vcpkg/ports/qtpositioning/vcpkg.json +++ b/vcpkg/ports/qtpositioning/vcpkg.json @@ -1,6 +1,6 @@ { "name": "qtpositioning", - "version": "6.8.3", + "version": "6.10.3", "description": "The Qt Positioning API provides positioning information via QML and C++ interfaces.", "homepage": "https://www.qt.io/", "license": null, diff --git a/vcpkg/triplets/arm-android.cmake b/vcpkg/triplets/arm-android.cmake index 67e1f11d5..6ec3ed7c1 100644 --- a/vcpkg/triplets/arm-android.cmake +++ b/vcpkg/triplets/arm-android.cmake @@ -19,6 +19,7 @@ set(VCPKG_CMAKE_CONFIGURE_OPTIONS -DANDROID_ABI=armeabi-v7a -DANDROID_ARM_NEON=O set(ANDROIDAPI "28") # when changed change CMakeLists.txt set(ANDROID_PLATFORM "android-${ANDROIDAPI}") set(ANDROID_NDK_PLATFORM "android-${ANDROIDAPI}") +set(VCPKG_CMAKE_SYSTEM_VERSION "${ANDROIDAPI}") set(ANDROID_STL "c++_shared") if (NOT DEFINED ENV{ANDROID_SDK_ROOT}) diff --git a/vcpkg/triplets/arm64-ios.cmake b/vcpkg/triplets/arm64-ios.cmake index b3d21737e..43c0c08e9 100644 --- a/vcpkg/triplets/arm64-ios.cmake +++ b/vcpkg/triplets/arm64-ios.cmake @@ -5,6 +5,7 @@ set(VCPKG_CMAKE_SYSTEM_NAME iOS) set(VCPKG_OSX_ARCHITECTURES arm64) set(VCPKG_OSX_DEPLOYMENT_TARGET 16.0) +set(VCPKG_MAKE_BUILD_TRIPLET "--host=aarch64-apple-ios${VCPKG_OSX_DEPLOYMENT_TARGET}") set(VCPKG_BUILD_TYPE release) set(VCPKG_CXX_FLAGS "-fvisibility=hidden")