From e0eb787ab070f65af96cf2fa907a475357461f09 Mon Sep 17 00:00:00 2001 From: Peter Petrik Date: Tue, 1 Aug 2023 14:34:21 +0200 Subject: [PATCH] initial cleaning --- .github/workflows/android.yml | 164 +-- .github/workflows/ios.yml | 134 +-- .github/workflows/linux.yml | 101 +- .github/workflows/mac.yml | 109 +- .github/workflows/win.yml | 3 +- README.md | 76 +- android/config.conf.default | 36 - android/distribute.sh | 935 ------------------ android/recipes/curl/recipe.sh | 72 -- android/recipes/exiv2/recipe.sh | 60 -- android/recipes/expat/patches/expat.patch | 90 -- android/recipes/expat/recipe.sh | 62 -- android/recipes/freexl/patches/freexl.patch | 44 - android/recipes/freexl/recipe.sh | 61 -- android/recipes/gdal/patches/configure.patch | 47 - android/recipes/gdal/recipe.sh | 108 -- android/recipes/geodiff/recipe.sh | 70 -- android/recipes/geos/patches/geos.patch | 46 - android/recipes/geos/recipe.sh | 62 -- android/recipes/iconv/recipe.sh | 65 -- android/recipes/jpeg/patches/CMakeLists.txt | 76 -- android/recipes/jpeg/patches/cpl_port.h | 13 - android/recipes/jpeg/patches/jerror.patch | 11 - android/recipes/jpeg/recipe.sh | 76 -- .../patches/spatialindex.patch | 14 - android/recipes/libspatialindex/recipe.sh | 60 -- .../libspatialite/patches/configure.patch | 78 -- android/recipes/libspatialite/recipe.sh | 81 -- android/recipes/libtasn1/recipe.sh | 63 -- android/recipes/libtiff/patches/notools.patch | 19 - android/recipes/libtiff/recipe.sh | 78 -- android/recipes/libzip/recipe.sh | 61 -- android/recipes/openssl/recipe.sh | 40 - .../postgresql/patches/configure.patch | 70 -- android/recipes/postgresql/recipe.sh | 83 -- android/recipes/proj/recipe.sh | 68 -- android/recipes/protobuf/recipe.sh | 84 -- android/recipes/qca/recipe.sh | 66 -- android/recipes/qgis/recipe.sh | 120 --- android/recipes/qtkeychain/recipe.sh | 62 -- android/recipes/sqlite3/recipe.sh | 66 -- android/recipes/webp/recipe.sh | 70 -- android/recipes/zxing/recipe.sh | 59 -- android/tools/depscan | 67 -- android/tools/depsort.py | 199 ---- ios/config.conf.default | 26 - ios/distribute.sh | 803 --------------- ios/recipes/curl/recipe.sh | 74 -- ios/recipes/exiv2/recipe.sh | 60 -- ios/recipes/expat/recipe.sh | 58 -- ios/recipes/freexl/recipe.sh | 57 -- ios/recipes/gdal/patches/configure.patch | 47 - ios/recipes/gdal/recipe.sh | 111 --- ios/recipes/geodiff/recipe.sh | 65 -- ios/recipes/geos/recipe.sh | 64 -- ios/recipes/iconv/patches/charset.patch | 13 - ios/recipes/iconv/patches/iconv.patch | 13 - ios/recipes/iconv/recipe.sh | 66 -- ios/recipes/jpeg/patches/CMakeLists.txt | 76 -- ios/recipes/jpeg/patches/cpl_port.h | 13 - ios/recipes/jpeg/patches/jerror.patch | 11 - ios/recipes/jpeg/recipe.sh | 77 -- .../patches/spatialindex.patch | 14 - ios/recipes/libspatialindex/recipe.sh | 63 -- .../libspatialite/patches/config.patch | 46 - ios/recipes/libspatialite/recipe.sh | 80 -- ios/recipes/libtasn1/recipe.sh | 59 -- ios/recipes/libtiff/patches/notools.patch | 19 - ios/recipes/libtiff/recipe.sh | 79 -- ios/recipes/libzip/patches/cmake.patch | 17 - ios/recipes/libzip/patches/cmake2.patch | 13 - ios/recipes/libzip/recipe.sh | 70 -- ios/recipes/poly2tri/recipe.sh | 56 -- ios/recipes/postgresql/recipe.sh | 66 -- ios/recipes/proj/recipe.sh | 74 -- ios/recipes/protobuf/recipe.sh | 88 -- ios/recipes/qca/recipe.sh | 69 -- ios/recipes/qgis/recipe.sh | 151 --- ios/recipes/qtkeychain/recipe.sh | 61 -- ios/recipes/sqlite3/recipe.sh | 68 -- ios/recipes/webp/recipe.sh | 71 -- ios/recipes/zxing/recipe.sh | 54 - ios/tools/depsort.py | 199 ---- ios/tools/ios.toolchain.cmake | 725 -------------- linux/config.conf.default | 5 - linux/distribute.sh | 580 ----------- linux/recipes/gdal/recipe.sh | 83 -- linux/recipes/geodiff/recipe.sh | 61 -- linux/recipes/libspatialite/recipe.sh | 68 -- linux/recipes/proj/recipe.sh | 66 -- linux/recipes/qca/recipe.sh | 65 -- linux/recipes/qgis/recipe.sh | 77 -- linux/recipes/qtkeychain/recipe.sh | 61 -- linux/recipes/zxing/recipe.sh | 60 -- linux/tools/depsort.py | 199 ---- mac/config.conf.default | 10 - mac/distribute.sh | 645 ------------ mac/recipes/curl/recipe.sh | 74 -- mac/recipes/exiv2/recipe.sh | 64 -- mac/recipes/expat/recipe.sh | 61 -- mac/recipes/freexl/recipe.sh | 58 -- mac/recipes/gdal/patches/configure.patch | 47 - mac/recipes/gdal/recipe.sh | 108 -- mac/recipes/geodiff/recipe.sh | 65 -- mac/recipes/geos/recipe.sh | 61 -- mac/recipes/jpeg/patches/CMakeLists.txt | 76 -- mac/recipes/jpeg/patches/cpl_port.h | 13 - mac/recipes/jpeg/patches/jerror.patch | 11 - mac/recipes/jpeg/recipe.sh | 76 -- .../patches/spatialindex.patch | 14 - .../patches/temporaryfile.patch | 34 - mac/recipes/libspatialindex/recipe.sh | 67 -- mac/recipes/libspatialite/recipe.sh | 80 -- mac/recipes/libtasn1/recipe.sh | 58 -- mac/recipes/libtiff/patches/notools.patch | 19 - mac/recipes/libtiff/recipe.sh | 82 -- mac/recipes/libzip/recipe.sh | 67 -- mac/recipes/postgresql/recipe.sh | 68 -- mac/recipes/proj/recipe.sh | 76 -- mac/recipes/protobuf/recipe.sh | 70 -- mac/recipes/qca/recipe.sh | 71 -- mac/recipes/qgis/recipe.sh | 91 -- mac/recipes/qtkeychain/recipe.sh | 64 -- mac/recipes/sqlite3/recipe.sh | 69 -- mac/recipes/webp/recipe.sh | 62 -- mac/recipes/zxing/recipe.sh | 62 -- mac/tools/depsort.py | 199 ---- .../ports/exiv2/fix-find_expat.patch | 64 ++ .../ports/exiv2/ios.patch | 0 vcpkg-overlay/ports/exiv2/portfile.cmake | 77 ++ .../ports/exiv2/vcpkg-cmake-wrapper.cmake | 16 + vcpkg-overlay/ports/exiv2/vcpkg.json | 52 + vcpkg-overlay/ports/json-c/pkgconfig.patch | 13 + vcpkg-overlay/ports/json-c/portfile.cmake | 24 + vcpkg-overlay/ports/json-c/vcpkg.json | 7 + .../ports/libiconv/0002-Config-for-MSVC.patch | 14 + .../ports/libiconv/0003-Add-export.patch | 12 + .../ports/libiconv/0004-ModuleFileName.patch | 13 + vcpkg-overlay/ports/libiconv/portfile.cmake | 53 + vcpkg-overlay/ports/libiconv/usage | 4 + .../ports/libiconv/vcpkg-cmake-wrapper.cmake | 21 + vcpkg-overlay/ports/libiconv/vcpkg.json | 7 + vcpkg-overlay/triplets/arm-android.cmake | 12 + vcpkg-overlay/triplets/arm64-android.cmake | 12 + vcpkg-overlay/triplets/arm64-ios.cmake | 13 + vcpkg-overlay/triplets/x64-linux.cmake | 8 + vcpkg-overlay/triplets/x64-osx.cmake | 9 + vcpkg-overlay/triplets/x64-windows.cmake | 1 + vcpkg-test/vcpkg.json | 2 +- versions.conf | 119 --- 150 files changed, 770 insertions(+), 11535 deletions(-) delete mode 100644 android/config.conf.default delete mode 100755 android/distribute.sh delete mode 100755 android/recipes/curl/recipe.sh delete mode 100755 android/recipes/exiv2/recipe.sh delete mode 100644 android/recipes/expat/patches/expat.patch delete mode 100755 android/recipes/expat/recipe.sh delete mode 100644 android/recipes/freexl/patches/freexl.patch delete mode 100755 android/recipes/freexl/recipe.sh delete mode 100644 android/recipes/gdal/patches/configure.patch delete mode 100755 android/recipes/gdal/recipe.sh delete mode 100755 android/recipes/geodiff/recipe.sh delete mode 100644 android/recipes/geos/patches/geos.patch delete mode 100755 android/recipes/geos/recipe.sh delete mode 100755 android/recipes/iconv/recipe.sh delete mode 100644 android/recipes/jpeg/patches/CMakeLists.txt delete mode 100644 android/recipes/jpeg/patches/cpl_port.h delete mode 100644 android/recipes/jpeg/patches/jerror.patch delete mode 100755 android/recipes/jpeg/recipe.sh delete mode 100644 android/recipes/libspatialindex/patches/spatialindex.patch delete mode 100755 android/recipes/libspatialindex/recipe.sh delete mode 100644 android/recipes/libspatialite/patches/configure.patch delete mode 100755 android/recipes/libspatialite/recipe.sh delete mode 100755 android/recipes/libtasn1/recipe.sh delete mode 100644 android/recipes/libtiff/patches/notools.patch delete mode 100755 android/recipes/libtiff/recipe.sh delete mode 100755 android/recipes/libzip/recipe.sh delete mode 100755 android/recipes/openssl/recipe.sh delete mode 100644 android/recipes/postgresql/patches/configure.patch delete mode 100755 android/recipes/postgresql/recipe.sh delete mode 100755 android/recipes/proj/recipe.sh delete mode 100755 android/recipes/protobuf/recipe.sh delete mode 100755 android/recipes/qca/recipe.sh delete mode 100755 android/recipes/qgis/recipe.sh delete mode 100755 android/recipes/qtkeychain/recipe.sh delete mode 100755 android/recipes/sqlite3/recipe.sh delete mode 100755 android/recipes/webp/recipe.sh delete mode 100755 android/recipes/zxing/recipe.sh delete mode 100755 android/tools/depscan delete mode 100755 android/tools/depsort.py delete mode 100644 ios/config.conf.default delete mode 100755 ios/distribute.sh delete mode 100755 ios/recipes/curl/recipe.sh delete mode 100755 ios/recipes/exiv2/recipe.sh delete mode 100755 ios/recipes/expat/recipe.sh delete mode 100755 ios/recipes/freexl/recipe.sh delete mode 100644 ios/recipes/gdal/patches/configure.patch delete mode 100755 ios/recipes/gdal/recipe.sh delete mode 100755 ios/recipes/geodiff/recipe.sh delete mode 100755 ios/recipes/geos/recipe.sh delete mode 100644 ios/recipes/iconv/patches/charset.patch delete mode 100644 ios/recipes/iconv/patches/iconv.patch delete mode 100755 ios/recipes/iconv/recipe.sh delete mode 100644 ios/recipes/jpeg/patches/CMakeLists.txt delete mode 100644 ios/recipes/jpeg/patches/cpl_port.h delete mode 100644 ios/recipes/jpeg/patches/jerror.patch delete mode 100755 ios/recipes/jpeg/recipe.sh delete mode 100644 ios/recipes/libspatialindex/patches/spatialindex.patch delete mode 100755 ios/recipes/libspatialindex/recipe.sh delete mode 100644 ios/recipes/libspatialite/patches/config.patch delete mode 100755 ios/recipes/libspatialite/recipe.sh delete mode 100755 ios/recipes/libtasn1/recipe.sh delete mode 100644 ios/recipes/libtiff/patches/notools.patch delete mode 100755 ios/recipes/libtiff/recipe.sh delete mode 100644 ios/recipes/libzip/patches/cmake.patch delete mode 100644 ios/recipes/libzip/patches/cmake2.patch delete mode 100755 ios/recipes/libzip/recipe.sh delete mode 100755 ios/recipes/poly2tri/recipe.sh delete mode 100755 ios/recipes/postgresql/recipe.sh delete mode 100755 ios/recipes/proj/recipe.sh delete mode 100755 ios/recipes/protobuf/recipe.sh delete mode 100755 ios/recipes/qca/recipe.sh delete mode 100755 ios/recipes/qgis/recipe.sh delete mode 100755 ios/recipes/qtkeychain/recipe.sh delete mode 100755 ios/recipes/sqlite3/recipe.sh delete mode 100755 ios/recipes/webp/recipe.sh delete mode 100755 ios/recipes/zxing/recipe.sh delete mode 100755 ios/tools/depsort.py delete mode 100644 ios/tools/ios.toolchain.cmake delete mode 100644 linux/config.conf.default delete mode 100755 linux/distribute.sh delete mode 100755 linux/recipes/gdal/recipe.sh delete mode 100755 linux/recipes/geodiff/recipe.sh delete mode 100755 linux/recipes/libspatialite/recipe.sh delete mode 100755 linux/recipes/proj/recipe.sh delete mode 100755 linux/recipes/qca/recipe.sh delete mode 100755 linux/recipes/qgis/recipe.sh delete mode 100755 linux/recipes/qtkeychain/recipe.sh delete mode 100755 linux/recipes/zxing/recipe.sh delete mode 100755 linux/tools/depsort.py delete mode 100644 mac/config.conf.default delete mode 100755 mac/distribute.sh delete mode 100755 mac/recipes/curl/recipe.sh delete mode 100755 mac/recipes/exiv2/recipe.sh delete mode 100755 mac/recipes/expat/recipe.sh delete mode 100755 mac/recipes/freexl/recipe.sh delete mode 100644 mac/recipes/gdal/patches/configure.patch delete mode 100755 mac/recipes/gdal/recipe.sh delete mode 100755 mac/recipes/geodiff/recipe.sh delete mode 100755 mac/recipes/geos/recipe.sh delete mode 100644 mac/recipes/jpeg/patches/CMakeLists.txt delete mode 100644 mac/recipes/jpeg/patches/cpl_port.h delete mode 100644 mac/recipes/jpeg/patches/jerror.patch delete mode 100755 mac/recipes/jpeg/recipe.sh delete mode 100644 mac/recipes/libspatialindex/patches/spatialindex.patch delete mode 100644 mac/recipes/libspatialindex/patches/temporaryfile.patch delete mode 100755 mac/recipes/libspatialindex/recipe.sh delete mode 100755 mac/recipes/libspatialite/recipe.sh delete mode 100755 mac/recipes/libtasn1/recipe.sh delete mode 100644 mac/recipes/libtiff/patches/notools.patch delete mode 100755 mac/recipes/libtiff/recipe.sh delete mode 100755 mac/recipes/libzip/recipe.sh delete mode 100755 mac/recipes/postgresql/recipe.sh delete mode 100755 mac/recipes/proj/recipe.sh delete mode 100755 mac/recipes/protobuf/recipe.sh delete mode 100755 mac/recipes/qca/recipe.sh delete mode 100755 mac/recipes/qgis/recipe.sh delete mode 100755 mac/recipes/qtkeychain/recipe.sh delete mode 100755 mac/recipes/sqlite3/recipe.sh delete mode 100755 mac/recipes/webp/recipe.sh delete mode 100755 mac/recipes/zxing/recipe.sh delete mode 100755 mac/tools/depsort.py create mode 100644 vcpkg-overlay/ports/exiv2/fix-find_expat.patch rename ios/recipes/exiv2/patches/exiv2.patch => vcpkg-overlay/ports/exiv2/ios.patch (100%) create mode 100644 vcpkg-overlay/ports/exiv2/portfile.cmake create mode 100644 vcpkg-overlay/ports/exiv2/vcpkg-cmake-wrapper.cmake create mode 100644 vcpkg-overlay/ports/exiv2/vcpkg.json create mode 100644 vcpkg-overlay/ports/json-c/pkgconfig.patch create mode 100644 vcpkg-overlay/ports/json-c/portfile.cmake create mode 100644 vcpkg-overlay/ports/json-c/vcpkg.json create mode 100644 vcpkg-overlay/ports/libiconv/0002-Config-for-MSVC.patch create mode 100644 vcpkg-overlay/ports/libiconv/0003-Add-export.patch create mode 100644 vcpkg-overlay/ports/libiconv/0004-ModuleFileName.patch create mode 100644 vcpkg-overlay/ports/libiconv/portfile.cmake create mode 100644 vcpkg-overlay/ports/libiconv/usage create mode 100644 vcpkg-overlay/ports/libiconv/vcpkg-cmake-wrapper.cmake create mode 100644 vcpkg-overlay/ports/libiconv/vcpkg.json create mode 100644 vcpkg-overlay/triplets/arm-android.cmake create mode 100644 vcpkg-overlay/triplets/arm64-android.cmake create mode 100644 vcpkg-overlay/triplets/arm64-ios.cmake create mode 100644 vcpkg-overlay/triplets/x64-linux.cmake create mode 100644 vcpkg-overlay/triplets/x64-osx.cmake delete mode 100644 versions.conf diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 2b322e62..8682e2a1 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -3,16 +3,24 @@ name: Build android (on MacOS) on: push: paths: - - 'android/**' + - 'vcpkg-test/**' + - 'vcpkg-overlay/**' - '.github/workflows/android.yml' - - 'versions.conf' release: types: - published +concurrency: + group: ci-${{github.ref}}-android + cancel-in-progress: true + jobs: android_build: + strategy: + fail-fast: false + matrix: + arch: [arm, amd64] runs-on: macos-12 env: QT_VERSION: '6.5.2' @@ -23,50 +31,51 @@ jobs: SDK_PLATFORM: android-33 SDK_BUILD_TOOLS: 33.0.1 CACHE_VERSION: 0 - ARCHES: "armeabi-v7a arm64-v8a" + QT_CACHE_VERSION: 0 XC_VERSION: ${{ '14.2' }} + VCPKG_BASELINE: "d765306b074717dea8dc1c4723e1b025acb61c2d" # compatible with vcpkg.json baseline + VCPKG_ROOT: "/Users/runner/vcpkg-root" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Select latest Xcode run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app" - - - name: Check deps versions change - run: | - CHECKSUM=$( md5 -r versions.conf | cut -d ' ' -f1 ) - echo "DEPS_CHECKSUM=$CHECKSUM" >> $GITHUB_ENV - - name: Prepare build cache for branch/tag - # use a fork of actions/cache@v2 to upload cache even when the build or test failed - uses: pat-s/always-upload-cache@v2.1.5 + - uses: seanmiddleditch/gha-setup-ninja@master + + - uses: nttld/setup-ndk@v1 + id: setup-ndk with: - path: ${{ github.workspace }}/build - # The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/, and for tags it is refs/tags/ - key: cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.QT_VERSION }}-${{ github.ref }}-${{ github.sha }} - restore-keys: | - cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.QT_VERSION }}-${{ github.ref }}- - cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.QT_VERSION }}-refs/heads/master- - - - name: Install Build Dependencies + ndk-version: ${{ env.NDK_VERSION_FULL }} + add-to-path: true + + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: ${{ env.JDK_VERSION }} + distribution: zulu + + - name: Setup Android SDK + uses: malinskiy/action-android/install-sdk@release/0.1.2 + + - name: Install Android Tools run: | - echo "Versions checksum: ${{ env.DEPS_CHECKSUM }}" - brew install bison flex automake shtool gtk-doc patchelf - echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH - echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH - pip3 install -U pip - pip3 install aqtinstall + sdkmanager --licenses && sdkmanager --verbose "platforms;${SDK_PLATFORM}" "build-tools;${SDK_BUILD_TOOLS}" tools platform-tools - - name: Cache Qt - id: cache-qt - uses: pat-s/always-upload-cache@v2.1.5 + - name: Restore cached QT + id: cache-qt-restore + uses: actions/cache/restore@v3 with: path: ${{ github.workspace }}/Qt - key: ${{ runner.os }}-QtCache-v3-${{ env.QT_VERSION }}-android - + key: ${{ runner.os }}-QtCache-v${{ env.QT_CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ matrix.arch }} + - name: Install Qt if: steps.cache-qt.outputs.cache-hit != 'true' run: | + pip3 install -U pip + pip3 install aqtinstall + python3 -m aqt install-qt \ mac android ${{ env.QT_VERSION }} android_arm64_v8a \ -m qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools \ @@ -83,48 +92,65 @@ jobs: -O ${{ github.workspace }}/Qt ls -la ${{ github.workspace }}/Qt/${{ env.QT_VERSION }} - - # Android SDK & NDK - - uses: nttld/setup-ndk@v1 - id: setup-ndk - with: - ndk-version: ${{ env.NDK_VERSION_FULL }} - add-to-path: true - - name: Set up JDK - uses: actions/setup-java@v2 + - name: Save cached Qt + uses: actions/cache/save@v3 + if: always() + id: cache-qt-save with: - java-version: ${{ env.JDK_VERSION }} - distribution: zulu + path: ${{ github.workspace }}/Qt + key: ${{ runner.os }}-QtCache-v${{ env.QT_CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ matrix.arch }} - - name: Setup Android SDK - uses: malinskiy/action-android/install-sdk@release/0.1.2 + - name: Restore cached vcpkg build folder + id: cache-vcpkg-restore + uses: actions/cache/restore@v3 + with: + path: ${{ env.VCPKG_ROOT }}/${{ matrix.arch }} + key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ matrix.arch }} - - name: Install Android Tools + - name: Clone vcpkg + if: steps.cache-vcpkg-restore.outputs.cache-hit != 'true' run: | - sdkmanager --licenses && sdkmanager --verbose "platforms;${SDK_PLATFORM}" "build-tools;${SDK_BUILD_TOOLS}" tools platform-tools - - # Build SDK - - name: Export config.conf + mkdir -p "${{ env.VCPKG_ROOT }}" + cd "${{ env.VCPKG_ROOT }}" + git init + git remote add origin https://github.com/microsoft/vcpkg.git + git pull origin master + git checkout $VCPKG_BASELINE + + - name: Build SDK ${{ matrix.arch }}-android run: | - touch ./android/config.conf - echo -e "export QT_VERSION=${{ env.QT_VERSION }}" >> ./android/config.conf - echo -e "export ROOT_OUT_PATH=${{ github.workspace }}/build" >> ./android/config.conf - echo -e "export ANDROIDSDK=${ANDROID_HOME}" >> ./android/config.conf - echo -e "export ANDROIDNDK=${{ steps.setup-ndk.outputs.ndk-path }}" >> ./android/config.conf - echo -e "export ANDROIDNDKVER=${{ env.NDK_VERSION }}" >> ./android/config.conf - echo -e "export QT_ANDROID_BASE=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}" >> ./android/config.conf - echo -e "export ANDROIDAPI=${{ env.ANDROIDAPI }}" >> ./android/config.conf - echo -e "export ARCHES=("\""${{ env.ARCHES }}"\"")" >> ./android/config.conf - cat ./android/config.conf - - echo "NDK: ${{ steps.setup-ndk.outputs.ndk-path }}" - ls ${{ steps.setup-ndk.outputs.ndk-path }} - echo "SDK: ${ANDROID_HOME}" - - - name: Build Sdk + mkdir -p ${{ github.workspace }}/build/${{ matrix.arch }} + cd ${{ github.workspace }}/build/${{ matrix.arch }} + cmake -B ${{ github.workspace }}/build/${{ matrix.arch }} \ + -S ${{ github.workspace }}/vcpkg-test \ + -DCMAKE_MODULE_PATH:PATH="${{ github.workspace }}/vcpkg-test/cmake" \ + -DCMAKE_TOOLCHAIN_FILE:PATH="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" \ + -G Ninja \ + -DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-android \ + -DVCPKG_OVERLAY_TRIPLETS:PATH="${{ github.workspace }}/vcpkg-overlay/triplets" \ + -DVCPKG_OVERLAY_PORTS="${{ github.workspace }}/vcpkg-overlay/ports" + + - name: Upload build logs on deps failure + uses: actions/upload-artifact@v3 + if: failure() + with: + name: build-logs-${{ matrix.arch }}-android + path: | + ${{ env.VCPKG_ROOT }}/buildtrees/**/*.log + + - name: Save cached vcpkg build folder + uses: actions/cache/save@v3 + if: always() + id: cache-vcpkg-save + with: + path: ${{ env.VCPKG_ROOT }}/${{ matrix.arch }} + key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ matrix.arch }} + + - name: Build Test App run: | - ./android/distribute.sh -mqgis + cd ${{ github.workspace }}/build/${{ matrix.arch }} + ninja - name: Get TimeStamp id: time @@ -135,9 +161,9 @@ jobs: - name: Create package run: | - SDK_TAR=input-sdk-qt-${{ env.QT_VERSION }}-android-${{ runner.os }}-${{ steps.time.outputs.time }}-${{ github.run_number }}.tar.gz + SDK_TAR=input-sdk-qt-${{ env.QT_VERSION }}-${{ matrix.arch }}-android-${{ runner.os }}-${{ steps.time.outputs.time }}-${{ github.run_number }}.tar.gz echo "SDK_TAR=${SDK_TAR}" >> $GITHUB_ENV - cd ${{ github.workspace }}/build/stage + cd ${{ github.workspace }}/${{ matrix.arch }}/vcpkg_installed/${{ matrix.arch }}-android/ tar -c -z --exclude=*.pyc -f ${{ github.workspace }}/${SDK_TAR} ./ - name: Upload Sdk in Artifacts @@ -149,7 +175,7 @@ jobs: if: ${{ github.ref == 'refs/heads/master' }} uses: ncipollo/release-action@v1 with: - tag: android-${{ runner.os }}-${{ steps.time.outputs.time }}-${{ github.run_number }} + tag: ${{ matrix.arch }}-android-${{ runner.os }}-${{ steps.time.outputs.time }}-${{ github.run_number }} allowUpdates: true artifacts: ${{ env.SDK_TAR }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index af2e6a7e..9cec3e81 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -3,66 +3,51 @@ name: Build ios on: push: paths: - - 'ios/**' + - 'vcpkg-test/**' + - 'vcpkg-overlay/**' - '.github/workflows/ios.yml' - - 'versions.conf' + release: types: - published +concurrency: + group: ci-${{github.ref}}-ios + cancel-in-progress: true + jobs: ios_build: runs-on: macos-12 env: IOS_MIN_SDK_VERSION: '14.0' # iOS Deployment target QT_VERSION: '6.5.2' - ARCHES: 'arm64' - CACHE_VERSION: 1 + ARCH: 'arm64' + CACHE_VERSION: 0 XC_VERSION: ${{ '14.2' }} + VCPKG_BASELINE: "d765306b074717dea8dc1c4723e1b025acb61c2d" # compatible with vcpkg.json baseline + VCPKG_ROOT: "/Users/runner/vcpkg-root" # Looks like there is more space on C: than on D: drive (~14GB) steps: - uses: actions/checkout@v2 - name: Select latest Xcode run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app" - - - name: Check deps versions change - run: | - CHECKSUM=$( md5 -r versions.conf | cut -d ' ' -f1 ) - echo "DEPS_CHECKSUM=$CHECKSUM" >> $GITHUB_ENV - - name: Prepare build cache for branch/tag - # use a fork of actions/cache@v2 to upload cache even when the build or test failed - uses: pat-s/always-upload-cache@v2.1.5 - with: - path: ${{ github.workspace }}/build - # The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/, and for tags it is refs/tags/ - key: cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.QT_VERSION }}-${{ github.ref }}-${{ env.IOS_MIN_SDK_VERSION }}-${{ github.sha }} - restore-keys: | - cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.QT_VERSION }}-${{ github.ref }}-${{ env.IOS_MIN_SDK_VERSION }}- - cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.QT_VERSION }}-refs/heads/master-${{ env.IOS_MIN_SDK_VERSION }}- - - - name: Install Build Dependencies - run: | - echo "Versions checksum: ${{ env.DEPS_CHECKSUM }}" - brew install bison flex automake shtool gtk-doc cmake - echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH - echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH - pip3 install -U pip - pip3 install aqtinstall - - # cannot use install-qt-action@v3 due to missing input-sdk/Qt/6.3.x/macos/bin/qmake - # see also https://github.com/miurahr/aqtinstall/issues/503 - - name: Cache Qt - id: cache-qt - uses: pat-s/always-upload-cache@v2.1.5 + - uses: seanmiddleditch/gha-setup-ninja@master + + - name: Restore cached QT + id: cache-qt-restore + uses: actions/cache/restore@v3 with: path: ${{ github.workspace }}/Qt - key: ${{ runner.os }}-QtCache-v2-${{ env.QT_VERSION }}-ios - + key: ${{ runner.os }}-QtCache-v${{ env.QT_CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ matrix.arch }} + - name: Install Qt if: steps.cache-qt.outputs.cache-hit != 'true' run: | + pip3 install -U pip + pip3 install aqtinstall + python3 -m aqt install-qt \ mac ios ${{ env.QT_VERSION }} \ -m qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools \ @@ -72,28 +57,67 @@ jobs: mac desktop ${{ env.QT_VERSION }} \ -m qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools \ -O ${{ github.workspace }}/Qt - - ls -la ${{ github.workspace }}/Qt + ls -la ${{ github.workspace }}/Qt/${{ env.QT_VERSION }} - - - name: Export config.conf + + - name: Save cached Qt + uses: actions/cache/save@v3 + if: always() + id: cache-qt-save + with: + path: ${{ github.workspace }}/Qt + key: ${{ runner.os }}-QtCache-v${{ env.QT_CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ matrix.arch }} + + - name: Restore cached vcpkg build folder + id: cache-vcpkg-restore + uses: actions/cache/restore@v3 + with: + path: ${{ env.VCPKG_ROOT }}/${{ env.ARCH }} + key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }} + + - name: Clone vcpkg + if: steps.cache-vcpkg-restore.outputs.cache-hit != 'true' run: | - touch ./ios/config.conf - echo -e "export QT_VERSION=${{ env.QT_VERSION }}" >> ./ios/config.conf - echo -e "export ROOT_OUT_PATH=${{ github.workspace }}/build" >> ./ios/config.conf - echo -e "export IOS_MIN_SDK_VERSION=${{ env.IOS_MIN_SDK_VERSION }}" >> ./ios/config.conf - echo -e "export QT_BASE=${{ github.workspace }}/Qt/${{ env.QT_VERSION }}" >> ./ios/config.conf - echo -e "export MACOSX_DEPLOYMENT_TARGET=${{ env.IOS_MIN_SDK_VERSION }}" >> ./ios/config.conf - echo -e "export ARCHES=("\""${{ env.ARCHES }}"\"")" >> ./ios/config.conf - cat ./ios/config.conf - - ${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/ios/bin/qmake --version - which cmake - cmake --version - - - name: Build Sdk + mkdir -p "${{ env.VCPKG_ROOT }}" + cd "${{ env.VCPKG_ROOT }}" + git init + git remote add origin https://github.com/microsoft/vcpkg.git + git pull origin master + git checkout $VCPKG_BASELINE + + - name: Build SDK ${{ env.ARCH }}-ios + run: | + mkdir -p ${{ github.workspace }}/build/${{ env.ARCH }} + cd ${{ github.workspace }}/build/${{ env.ARCH }} + cmake -B ${{ github.workspace }}/build/${{ env.ARCH }} \ + -S ${{ github.workspace }}/vcpkg-test \ + -DCMAKE_MODULE_PATH:PATH="${{ github.workspace }}/vcpkg-test/cmake" \ + -DCMAKE_TOOLCHAIN_FILE:PATH="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" \ + -G Ninja \ + -DVCPKG_TARGET_TRIPLET=${{ env.ARCH }}-ios \ + -DVCPKG_OVERLAY_TRIPLETS:PATH="${{ github.workspace }}/vcpkg-overlay/triplets" \ + -DVCPKG_OVERLAY_PORTS="${{ github.workspace }}/vcpkg-overlay/ports" + + - name: Upload build logs on deps failure + uses: actions/upload-artifact@v3 + if: failure() + with: + name: build-logs-${{ env.ARCH }}-ios + path: | + ${{ env.VCPKG_ROOT }}/buildtrees/**/*.log + + - name: Save cached vcpkg build folder + uses: actions/cache/save@v3 + if: always() + id: cache-vcpkg-save + with: + path: ${{ env.VCPKG_ROOT }}/${{ env.ARCH }} + key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }} + + - name: Build Test App run: | - ./ios/distribute.sh -mqgis + cd ${{ github.workspace }}/build/${{ env.ARCH }} + ninja - name: Get TimeStamp id: time diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 6b93987f..fb0dbfe8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -3,52 +3,34 @@ name: Build Linux on: push: paths: - - 'linux/**' + - 'vcpkg-test/**' + - 'vcpkg-overlay/**' - '.github/workflows/linux.yml' - - 'versions.conf' + release: types: - published +concurrency: + group: ci-${{github.ref}}-linux + cancel-in-progress: true + jobs: linux_build: runs-on: ubuntu-22.04 if: github.repository == 'merginmaps/input-sdk' env: - ARCH: 'linux-x86_64' + ARCH: 'x64' UBUNTU_VERSION: 2204 QT_VERSION: '6.5.2' CACHE_VERSION: 0 + VCPKG_BASELINE: "d765306b074717dea8dc1c4723e1b025acb61c2d" # compatible with vcpkg.json baseline + VCPKG_ROOT: "C:/vcpkg-root" # Looks like there is more space on C: than on D: drive (~14GB) steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Check deps versions change - run: | - CHECKSUM=$( md5sum versions.conf | cut -d ' ' -f1 ) - echo "DEPS_CHECKSUM=$CHECKSUM" >> $GITHUB_ENV - - - name: Prepare build cache for branch/tag - # use a fork of actions/cache@v2 to upload cache even when the build or test failed - uses: pat-s/always-upload-cache@v2.1.5 - with: - path: ${{ github.workspace }}/build - # The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/, and for tags it is refs/tags/ - key: cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.UBUNTU_VERSION }}-${{ github.ref }}-${{ github.sha }} - restore-keys: | - cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.UBUNTU_VERSION }}-${{ github.ref }}- - cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.UBUNTU_VERSION }}-refs/heads/master- - - - name: Install Build Dependencies - run: | - echo "Versions checksum: ${{ env.DEPS_CHECKSUM }}" - sudo apt-get install -y bison ca-certificates ccache cmake cmake-curses-gui dh-python expect flex flip \ - git graphviz libexiv2-dev libexpat1-dev libfcgi-dev libgeos-dev \ - libgsl-dev libfreexl-dev libpq-dev libprotobuf-dev \ - libspatialindex-dev libsqlite3-dev libyaml-tiny-perl \ - libzip-dev libzstd-dev lighttpd locales ninja-build \ - pkg-config poppler-utils protobuf-compiler python3-all-dev \ - spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb + - uses: seanmiddleditch/gha-setup-ninja@master - name: Install Qt uses: jurplel/install-qt-action@v3 @@ -60,17 +42,62 @@ jobs: cache: true cache-key-prefix: ${{ runner.os }}-QtCache-v2-${{ env.QT_VERSION }}-lnx - - name: Export config.conf + - name: Restore cached vcpkg build folder + id: cache-vcpkg-restore + uses: actions/cache/restore@v3 + with: + path: ${{ env.VCPKG_ROOT }}/${{ env.ARCH }} + key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }} + + - name: Clone vcpkg + if: steps.cache-vcpkg-restore.outputs.cache-hit != 'true' run: | - touch ./linux/config.conf - echo -e "export ROOT_OUT_PATH=${{ github.workspace }}/build" >> ./linux/config.conf - echo -e "export ARCHES=("\""${{ env.ARCH }}"\"")" >> ./linux/config.conf - cat ./linux/config.conf + mkdir -p "${{ env.VCPKG_ROOT }}" + cd "${{ env.VCPKG_ROOT }}" + git init + git remote add origin https://github.com/microsoft/vcpkg.git + git pull origin master + git checkout $VCPKG_BASELINE - - name: Build Sdk + - name: Build SDK ${{ env.ARCH }}-linux run: | - ./linux/distribute.sh -mqgis + mkdir -p ${{ github.workspace }}/build/${{ env.ARCH }} + cd ${{ github.workspace }}/build/${{ env.ARCH }} + cmake -B ${{ github.workspace }}/build/${{ env.ARCH }} \ + -S ${{ github.workspace }}/vcpkg-test \ + -DCMAKE_MODULE_PATH:PATH="${{ github.workspace }}/vcpkg-test/cmake" \ + -DCMAKE_TOOLCHAIN_FILE:PATH="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" \ + -G Ninja \ + -DVCPKG_TARGET_TRIPLET=${{ env.ARCH }}-linux \ + -DVCPKG_OVERLAY_TRIPLETS:PATH="${{ github.workspace }}/vcpkg-overlay/triplets" \ + -DVCPKG_OVERLAY_PORTS="${{ github.workspace }}/vcpkg-overlay/ports" + - name: Upload build logs on deps failure + uses: actions/upload-artifact@v3 + if: failure() + with: + name: build-logs-${{ env.ARCH }}-linux + path: | + ${{ env.VCPKG_ROOT }}/buildtrees/**/*.log + + - name: Save cached vcpkg build folder + uses: actions/cache/save@v3 + if: always() + id: cache-vcpkg-save + with: + path: ${{ env.VCPKG_ROOT }}/${{ env.ARCH }} + key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }} + + - name: Build Test App + run: | + cd ${{ github.workspace }}/build/${{ env.ARCH }} + ninja + + - name: Run Tests + run: | + cd ${{ github.workspace }}/build/${{ env.ARCH }} + ls -la + - name: Get TimeStamp id: time uses: nanzm/get-time-action@v1.1 diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index fd71122a..71c88cd5 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -3,53 +3,38 @@ name: Build macOS on: push: paths: - - 'mac/**' + - 'vcpkg-test/**' + - 'vcpkg-overlay/**' - '.github/workflows/mac.yml' - - 'versions.conf' + release: types: - published +concurrency: + group: ci-${{github.ref}}-mac + cancel-in-progress: true + jobs: mac_os_build: runs-on: macos-12 if: github.repository == 'merginmaps/input-sdk' env: QT_VERSION: 6.5.2 - ARCHES: 'mac' - CACHE_VERSION: 1 + ARCH: 'x64' + CACHE_VERSION: 0 MACOSX_DEPLOYMENT_TARGET: 10.15.0 XC_VERSION: ${{ '14.2' }} + VCPKG_BASELINE: "d765306b074717dea8dc1c4723e1b025acb61c2d" # compatible with vcpkg.json baseline + VCPKG_ROOT: "/Users/runner/vcpkg-root" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Select latest Xcode run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app" - - - name: Check deps versions change - run: | - CHECKSUM=`md5 -r versions.conf | cut -d\ -f1` - echo "DEPS_CHECKSUM=$CHECKSUM" >> $GITHUB_ENV - - - name: Prepare build cache for branch/tag - # use a fork of actions/cache@v2 to upload cache even when the build or test failed - uses: pat-s/always-upload-cache@v2.1.5 - with: - path: ${{ github.workspace }}/build - # The branch or tag ref that triggered the workflow run. For branches this in the format refs/heads/, and for tags it is refs/tags/ - key: cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.QT_VERSION }}-${{ github.ref }}-${{ github.sha }} - restore-keys: | - cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.QT_VERSION }}-${{ github.ref }}- - cache-${{ env.DEPS_CHECKSUM }}-v${{ env.CACHE_VERSION }}-${{ env.QT_VERSION }}-refs/heads/master- - - - name: Install Build Dependencies - run: | - echo "Versions checksum: ${{ env.DEPS_CHECKSUM }}" - brew install bison flex automake shtool gtk-doc cmake - echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH - echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH + - uses: seanmiddleditch/gha-setup-ninja@master - name: Install Qt uses: jurplel/install-qt-action@v3 @@ -61,19 +46,65 @@ jobs: cache: true cache-key-prefix: ${{ runner.os }}-QtCache-v1-${{ env.QT_VERSION }}-mac - - name: Export config.conf + - name: Restore cached vcpkg build folder + id: cache-vcpkg-restore + uses: actions/cache/restore@v3 + with: + path: ${{ env.VCPKG_ROOT }}/${{ env.ARCH }} + key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }} + + - name: Clone vcpkg + if: steps.cache-vcpkg-restore.outputs.cache-hit != 'true' + run: | + mkdir -p "${{ env.VCPKG_ROOT }}" + cd "${{ env.VCPKG_ROOT }}" + git init + git remote add origin https://github.com/microsoft/vcpkg.git + git pull origin master + git checkout $VCPKG_BASELINE + + - name: Build SDK ${{ env.ARCH }}-osx run: | - touch ./mac/config.conf - echo -e "export QT_VERSION=${{ env.QT_VERSION }}" >> ./mac/config.conf - echo -e "export QT_BASE="/opt/Qt/${{ env.QT_BASE }}/macos"" >> ./mac/config.conf - echo -e "export ROOT_OUT_PATH=${{ github.workspace }}/build" >> ./mac/config.conf - echo -e "export ARCHES=("\""${{ env.ARCHES }}"\"")" >> ./mac/config.conf - echo -e "export MACOSX_DEPLOYMENT_TARGET=("\""${{ env.MACOSX_DEPLOYMENT_TARGET }}"\"")" >> ./mac/config.conf - cat ./mac/config.conf - - - name: Build Sdk + mkdir -p ${{ github.workspace }}/build/${{ env.ARCH }} + cd ${{ github.workspace }}/build/${{ env.ARCH }} + cmake -B ${{ github.workspace }}/build/${{ env.ARCH }} \ + -S ${{ github.workspace }}/vcpkg-test \ + -DCMAKE_MODULE_PATH:PATH="${{ github.workspace }}/vcpkg-test/cmake" \ + -DCMAKE_TOOLCHAIN_FILE:PATH="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" \ + -G Ninja \ + -DVCPKG_TARGET_TRIPLET=${{ env.ARCH }}-osx \ + -DVCPKG_OVERLAY_TRIPLETS:PATH="${{ github.workspace }}/vcpkg-overlay/triplets" \ + -DVCPKG_OVERLAY_PORTS="${{ github.workspace }}/vcpkg-overlay/ports" + + - name: Upload build logs on deps failure + uses: actions/upload-artifact@v3 + if: failure() + with: + name: build-logs-${{ env.ARCH }}-osx + path: | + ${{ env.VCPKG_ROOT }}/buildtrees/**/*.log + + - name: Save cached vcpkg build folder + uses: actions/cache/save@v3 + if: always() + id: cache-vcpkg-save + with: + path: ${{ env.VCPKG_ROOT }}/${{ env.ARCH }} + key: ${{ runner.os }}-vcpkg-v${{ env.CACHE_VERSION }}-qt-${{ env.QT_VERSION }}-${{ env.ARCH }} + + - name: Build Test App + run: | + cd ${{ github.workspace }}/build/${{ env.ARCH }} + ninja + + - name: Run Tests + run: | + cd ${{ github.workspace }}/build/${{ env.ARCH }} + ls -la + + - name: Create GDAL supported formats run: | - ./mac/distribute.sh -mqgis + echo "TODO" - name: Get TimeStamp id: time diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 0218e433..b77f034e 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -6,6 +6,7 @@ on: - 'vcpkg-test/**' - 'vcpkg-overlay/**' - '.github/workflows/win.yml' + release: types: - published @@ -34,7 +35,7 @@ jobs: steps: - run: Get-PSDrive - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Prepare vars id: vars diff --git a/README.md b/README.md index 3d45bcfb..616aae96 100644 --- a/README.md +++ b/README.md @@ -6,28 +6,37 @@ # input-sdk -SDK for building [Mergin Maps Input app](https://github.com/merginmaps/input) for mobile devices +SDK for building [Mergin Maps Input app](https://github.com/merginmaps/input) for mobile devices based on VCPG ecosystem -Mergin Maps Input app makes surveying of geospatial data easy. You can design your survey project in QGIS with custom forms. - -Click here to download the app on your Android or iOS devices [merginmaps.com](http://merginmaps.com) +[Mergin Maps](http://merginmaps.com) makes surveying of geospatial data easy and it is powered by QGIS.
Join our community chat
and ask questions!

-# Tips +# Usage + +Download, extract and use prebuild SDKs for various arch/platforms from Github Releases/Artefacts. + +# Release +The release is automatically created from each build on master. + +# Development + +- Install Cmake, Vcpkg, Qt and compiler and other platform/arch prerequisities +- Run VCPKG to build dependancies (can take hours) +- Run test app to verify your build + +## Tips - how to do diff `diff -rupN file.orig file` - how to do diff from GIT `git diff master` -- find SHA512 hash (vcpkg): `shasum -a 512 myfile.tar.gz` +- find SHA512 hash for vcpkg: `shasum -a 512 myfile.tar.gz` -# Android +## Android -Download prebuild android SDKs from the GitHub Artifacts +TODO # Windows -You can download prebuild android SDKs from the GitHub Artifacts. If you want local build, you should: - - install cmake, vcpkg, Visual Studio and Qt and add to PATH ``` set ROOT_DIR=C:\Users\Peter\repo @@ -52,50 +61,19 @@ cmake --build %BUILD_DIR% --config Release --verbose - the resulting build tree is then located at `%BUILD_DIR%\vcpkg_installed` -# iOS +## iOS -Download prebuild iOS SDKs from the GitHub Artifacts +TODO -## Manual Build -1. you need to have Qt installed -2. copy and modify config.conf.default to config.conf with your setup -3. run `distribute.sh -mqgis` +## MacOS -- if you want armv7 and different SDK, you may try to build QT yourself (not tested) -- all libraries are STATIC, due to some limitation for iOS platform (distribution on AppStore, Qt -distribution for iOS, etc.) -- sometimes you need to debug from XCode (generated project); use RelWithDb, not full debug build +TODO -# MacOS +## Linux -Download prebuild mac SDKs from the GitHub Artifacts - -## Manual Build -1. you need to have Qt installed (with Qt Connectivity, Qt Multimedia, Qt Positioning, Qt Sensort, Qt5 Compatibility Module) -2. copy and modify config.conf.default to config.conf with your setup -3. run `distribute.sh -mqgis` - -# Linux - -We use Ubuntu LTS for building. Download prebuild ubuntu SDKs from the GitHub Artifacts - -## Manual Build -1. you need to have Qt installed (with Qt Connectivity, Qt Multimedia, Qt Positioning, Qt Sensort, Qt5 Compatibility Module) -2. Check `.github/workflows/linux.yml` for list of apt packages to install -2. copy and modify config.conf.default to config.conf with your setup -3. run `distribute.sh -mqgis` - -## CI - -the release is automatically created from each build on master. See tagged releases which have the SDK as artefact +TODO # License & Acknowledgement -The project is originally based on https://github.com/opengisch/OSGeo4A -and https://github.com/rabits/dockerfiles - -- [Dockerfiles](https://github.com/rabits/dockerfiles) Apache-2.0, rabits.org -- [distribute.sh](https://github.com/opengisch/OSGeo4A/blob/master/LICENSE-for-distribute-sh) MIT license, Copyright (c) 2010-2013 Kivy Team and other contributors -- [Dockerfiles & recipes](https://github.com/opengisch/OSGeo4A) MIT license -- [iOS toolchain](https://github.com/leetal/ios-cmake/blob/) -- [vcpkg](https://github.com/microsoft/vcpkg/blob/master/LICENSE.txt) MIT License +The project use [vcpkg](https://github.com/microsoft/vcpkg/blob/master/LICENSE.txt) framework and build various open-source libraries to SDK as dependencies, +including QGIS core library, GDAL, proj, geos and others. diff --git a/android/config.conf.default b/android/config.conf.default deleted file mode 100644 index 714d7d86..00000000 --- a/android/config.conf.default +++ /dev/null @@ -1,36 +0,0 @@ -export ROOT_OUT_PATH= - -### Currently suggested versions #### -# should be downloaded from https://dl.google.com/android/repository/android-ndk-r25b-darwin.zip -export ANDROIDNDKVER=r25 -export ANDROIDAPI=24 # == CMake's ANDROID_NATIVE_API_LEVEL == gradle's minSdkVersion == Dockerfile ANDROID_NDK_PLATFORM - -#### PATHS #### -export ANDROIDSDK="/path/to/android-sdk" -export ANDROIDNDK="/path/to/android-ndk" -export QT_ANDROID_BASE="/path/to/qt/sdk/Qt/6.5.2" - -# For example: -# export ANDROIDSDK="/opt/android/sdk" -# export ANDROIDNDK="/opt/android-ndk-r25b/" - -# QGIS needs a bison 3. On MacOS you may need -# to install one with e.g. homebrew or qgis_deps -# and add it to the path -# export PATH=":$PATH" - -### LOCAL SOURCES ### -# To use local sourcecode instead of the configured URL: -# export O4A_[module]_DIR=/usr/src/mymodulesource like this -# export O4A_qgis_DIR="/path/to/repository/qgis/QGIS" - -### BUILD ### -# Available architectures: -# - armeabi-v7a -# - arm64-v8a -export ARCHES=("armeabi-v7a") -#export ARCHES=("arm64-v8a") - -# By default all cores will be used to build -# Use this option to override -# export CORES=4 diff --git a/android/distribute.sh b/android/distribute.sh deleted file mode 100755 index 78410ded..00000000 --- a/android/distribute.sh +++ /dev/null @@ -1,935 +0,0 @@ -#!/bin/bash - -# By default use all available cores, override in config.conf if desired -if [ -f /proc/cpuinfo ]; then - CORES=$(cat /proc/cpuinfo | grep processor | wc -l) -else - # on MacOS there is no such file - if hash sysctl 2>/dev/null; then - CORES=$(sysctl -n hw.ncpu) - else - echo "Unable to determine number of cpu cores, using single core. Override this in config.conf" - CORES=1 - fi -fi - -# Load configuration -source `dirname $0`/config.conf -source `dirname $0`/../versions.conf - -# Modules -DEBUG=0 -MODULES= - -if [ "X$ROOT_OUT_PATH" == "X" ]; then - error "you need ROOT_OUT_PATH argument in config.conf" -fi - -if [ "X$QT_ANDROID_BASE" == "X" ]; then - error "you need QT_ANDROID_BASE argument in config.conf" -fi - -# Resolve Python path -PYTHON="$(which python3)" -if [ "X$PYTHON" == "X" ]; then - error "Unable to find python3" - exit 1 -fi - -# Check patchelf is present -PATCHELF="$(which patchelf)" -if [ "X$PATCHELF" == "X" ]; then - error "Unable to find patchelf" - exit 1 -fi - -# Paths -ROOT_PATH="$(dirname $($PYTHON -c 'from __future__ import print_function; import os,sys;print(os.path.realpath(sys.argv[1]))' $0))" -STAGE_PATH="${ROOT_OUT_PATH}/stage/$ARCH" -NATIVE_STAGE_PATH="${ROOT_OUT_PATH}/stage/native" -RECIPES_PATH="$ROOT_PATH/recipes" -BUILD_PATH="${ROOT_OUT_PATH}/build" -LIBS_PATH="${ROOT_OUT_PATH}/build/libs" -PACKAGES_PATH="${PACKAGES_PATH:-$ROOT_OUT_PATH/.packages}" - -mkdir -p $STAGE_PATH - -# Tools -export LIBLINK_PATH="$BUILD_PATH/objects" -export LIBLINK="$ROOT_PATH/src/tools/liblink" - -MD5SUM=$(which md5sum) -if [ "X$MD5SUM" == "X" ]; then - MD5SUM=$(which md5) - if [ "X$MD5SUM" == "X" ]; then - error "you need at least md5sum or md5 installed." - exit 1 - else - MD5SUM="$MD5SUM -r" - fi -fi - -WGET=$(which wget) -if [ "X$WGET" == "X" ]; then - WGET=$(which curl) - if [ "X$WGET" == "X" ]; then - error "you need at least wget or curl installed." - exit 1 - else - WGET="$WGET -L -o" - fi - WHEAD="curl -L -I" -else - WGET="$WGET -O" - WHEAD="wget --spider -q -S" -fi - -case $OSTYPE in - darwin*) - SED="sed -i .orig" - ;; - *) - SED="sed -i" - ;; -esac - - -# Internals -CRED="\x1b[31;01m" -CBLUE="\x1b[34;01m" -CGRAY="\x1b[30;01m" -CRESET="\x1b[39;49;00m" -DO_CLEAN_BUILD=0 -DO_SET_X=0 - -function fold_push() { - echo "::group::${1}" -} - -function fold_pop() { - echo "::endgroup::" -} - -function try () { - "$@" || exit -1 -} - -function info() { - echo -e "$CBLUE"$@"$CRESET"; -} - -function error() { - echo -e "$CRED"$@"$CRESET"; -} - -function debug() { - echo -e "$CGRAY"$@"$CRESET"; -} - -function get_directory() { - case $1 in - *.tar.gz) directory=$(basename $1 .tar.gz) ;; - *.tar.xz) directory=$(basename $1 .tar.xz) ;; - *.tgz) directory=$(basename $1 .tgz) ;; - *.tar.bz2) directory=$(basename $1 .tar.bz2) ;; - *.tbz2) directory=$(basename $1 .tbz2) ;; - *.zip) directory=$(basename $1 .zip) ;; - *) - error "Unknown file extension $1" - exit -1 - ;; - esac - echo $directory -} - -function push_native() { - info "Entering NATIVE environment" - - # save for pop - export OLD_PATH=$PATH - export OLD_CFLAGS=$CFLAGS - export OLD_CXXFLAGS=$CXXFLAGS - export OLD_LDFLAGS=$LDFLAGS - export OLD_CC=$CC - export OLD_CXX=$CXX - export OLD_AR=$AR - export OLD_RANLIB=$RANLIB - export OLD_STRIP=$STRIP - export OLD_MAKE=$MAKE - export OLD_LD=$LD - export OLD_CMAKECMD=$CMAKECMD - export OLD_ANDROID_CMAKE_LINKER_FLAGS=$ANDROID_CMAKE_LINKER_FLAGS - - unset CC - unset CXX - unset CPP - unset LD - unset CFLAGS - unset CXXFLAGS - unset CPPFLAGS - unset LDFLAGS - unset RANLIB - unset TOOLCHAIN_FULL_PREFIX - unset TOOLCHAIN_SHORT_PREFIX - unset TOOLCHAIN_PREFIX - unset TOOLCHAIN_BASEDIR - unset QT_ARCH_PREFIX - unset ANDROID_SYSTEM - unset ANDROID_CMAKE_LINKER_FLAGS - export PATH=$OLD_PATH - unset AR - unset RANLIB - unset STRIP - unset READELF - unset CMAKECMD - unset MAKE - unset MAKESMP - unset ANDROID_NDK_ROOT - unset ANDROID_NDK -} - -function push_arm() { - info "Entering in ${ARCH} environment" - - # save for pop - export OLD_PATH=$PATH - export OLD_CFLAGS=$CFLAGS - export OLD_CXXFLAGS=$CXXFLAGS - export OLD_LDFLAGS=$LDFLAGS - export OLD_CC=$CC - export OLD_CXX=$CXX - export OLD_AR=$AR - export OLD_RANLIB=$RANLIB - export OLD_STRIP=$STRIP - export OLD_MAKE=$MAKE - export OLD_LD=$LD - export OLD_CMAKECMD=$CMAKECMD - export OLD_ANDROID_CMAKE_LINKER_FLAGS=$ANDROID_CMAKE_LINKER_FLAGS - export OLD_QT_BASE=$QT_BASE - - # this must be something depending of the API level of Android - PYPLATFORM=$($PYTHON -c 'from __future__ import print_function; import sys; print(sys.platform)') - if [ "$PYPLATFORM" == "linux2" ]; then - PYPLATFORM="linux" - QT_HOST_PLATFORM="linux" - elif [ "$PYPLATFORM" == "linux3" ]; then - PYPLATFORM="linux" - QT_HOST_PLATFORM="linux" - elif [ "$PYPLATFORM" == "darwin" ]; then - PYPLATFORM="darwin" - QT_HOST_PLATFORM="macos" - else - echo "Not supported HOST plaform" - exit 1; - fi - - # Setup compiler toolchain based on CPU architecture - if [ "X${ARCH}" == "Xarmeabi-v7a" ]; then - export TOOLCHAIN_FULL_PREFIX=armv7a-linux-androideabi${ANDROIDAPI} - export TOOLCHAIN_SHORT_PREFIX=llvm - export TOOLCHAIN_PREFIX=arm-linux-androideabi - export TOOLCHAIN_BASEDIR=arm-linux-androideabi - export QT_ARCH_PREFIX=armv7 - export ANDROID_SYSTEM=android - export QT_BASE=$QT_ANDROID_BASE/android_armv7 - elif [ "X${ARCH}" == "Xarm64-v8a" ]; then - export TOOLCHAIN_FULL_PREFIX=aarch64-linux-android${ANDROIDAPI} - export TOOLCHAIN_SHORT_PREFIX=llvm - export TOOLCHAIN_PREFIX=aarch64-linux-android - export TOOLCHAIN_BASEDIR=aarch64-linux-android - export QT_ARCH_PREFIX=arm64 # watch out when changing this, openssl depends on it - export ANDROID_SYSTEM=android64 - export QT_BASE=$QT_ANDROID_BASE/android_arm64_v8a - else - echo "Error: Please report issue to enable support for arch (${ARCH})." - exit 1 - fi - - export QT_PATH="$QT_BASE" - export QT_HOST_PATH="$QT_ANDROID_BASE/$QT_HOST_PLATFORM" - - if [ ! -d "$QT_PATH" ]; then - echo "Error: QT_PATH $QT_PATH missing" - exit 1 - fi - - if [ ! -d "$QT_HOST_PATH" ]; then - echo "Error: QT_HOST_PATH $QT_HOST_PATH missing" - exit 1 - fi - - # if [ ! -d "$ANDROIDNDK/sources/cxx-stl/llvm-libc++/libs/$ARCH" ]; then - # echo "Error: $ANDROIDNDK error 1." - # exit 1 - # fi - - if [ ! -d "$ANDROIDNDK/toolchains/llvm/prebuilt/$PYPLATFORM-x86_64/sysroot/usr/lib/$TOOLCHAIN_BASEDIR/$ANDROIDAPI" ]; then - echo "Error: $ANDROIDNDK error 2." - exit 1 - fi - - if [ ! -d "$ANDROIDNDK/toolchains/llvm/prebuilt/$PYPLATFORM-x86_64/bin/" ]; then - echo "Error: $ANDROIDNDK error 3." - exit 1 - fi - - if [ ! -d "$ANDROIDNDK/toolchains/llvm/prebuilt/$PYPLATFORM-x86_64/sysroot/usr/lib/$TOOLCHAIN_BASEDIR/$ANDROIDAPI" ]; then - echo "Error: $ANDROIDNDK error 4." - exit 1 - fi - - export CFLAGS="-DANDROID -fomit-frame-pointer -I$STAGE_PATH/include" - export CFLAGS="$CFLAGS -Wno-unused-command-line-argument -Wno-macro-redefined" - # export CFLAGS="$CFLAGS -L$ANDROIDNDK/sources/cxx-stl/llvm-libc++/libs/$ARCH" - export CFLAGS="$CFLAGS -U__ANDROID_MIN_SDK_VERSION__" - export CFLAGS="$CFLAGS -D__ANDROID_MIN_SDK_VERSION__=$ANDROIDAPI" - export CFLAGS="$CFLAGS -U__ANDROID_API_" - export CFLAGS="$CFLAGS -D__ANDROID_API__=$ANDROIDAPI" - export LDFLAGS="-lm -L$STAGE_PATH/lib" - # export LDFLAGS="$LDFLAGS -L$ANDROIDNDK/sources/cxx-stl/llvm-libc++/libs/$ARCH" - export LDFLAGS="$LDFLAGS -L$ANDROIDNDK/toolchains/llvm/prebuilt/$PYPLATFORM-x86_64/sysroot/usr/lib/$TOOLCHAIN_BASEDIR/$ANDROIDAPI" - - if [ "X${ARCH}" == "Xarmeabi-v7a" ]; then - # make sure that symbols from the following system libs are not exported - on 32-bit ARM this was causing crashes when unwinding - # stack when handling c++ exceptions. In our case, sqlite3.so exported some unwinding-related symbols which were being picked up - # by libproj.so and causing havoc. - # https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md#Unwinding - # https://github.com/android/ndk/issues/785 - # https://github.com/android/ndk/issues/379 - # https://github.com/merginmaps/input/issues/641 - export LDFLAGS="$LDFLAGS -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libunwind.a" - fi - - export CFLAGS="$CFLAGS -fPIC" - export CXXFLAGS="$CFLAGS" - export CPPFLAGS="$CFLAGS" - - export ANDROID_CMAKE_LINKER_FLAGS="" - # for libGLESv2.so and similar - ANDROID_CMAKE_LINKER_FLAGS="$ANDROID_CMAKE_LINKER_FLAGS;-Wl,-rpath=$ANDROIDNDK/toolchains/llvm/prebuilt/$PYPLATFORM-x86_64/sysroot/usr/lib/$TOOLCHAIN_BASEDIR/$ANDROIDAPI" - - # folder with libc++_shared.so - # ANDROID_CMAKE_LINKER_FLAGS="$ANDROID_CMAKE_LINKER_FLAGS;-Wl,-rpath=$ANDROIDNDK/sources/cxx-stl/llvm-libc++/libs/$ARCH" - - # keep in sync with CMake's -DANDROID_STL=c++_shared - export LDFLAGS="$LDFLAGS -Wl,-lc++_shared" - - ANDROID_CMAKE_LINKER_FLAGS="$ANDROID_CMAKE_LINKER_FLAGS;-Wl,-rpath=$STAGE_PATH/lib" - export LDFLAGS="$LDFLAGS -Wl,-rpath=$STAGE_PATH/lib" - - ANDROID_CMAKE_LINKER_FLAGS="$ANDROID_CMAKE_LINKER_FLAGS;-Wl,-llog" - - # for libQt6*.so - ANDROID_CMAKE_LINKER_FLAGS="$ANDROID_CMAKE_LINKER_FLAGS;-Wl,-rpath=$QT_BASE/lib" - - export PATH="$ANDROIDNDK/toolchains/llvm/prebuilt/$PYPLATFORM-x86_64/bin/:$ANDROIDSDK/tools:$ANDROIDNDK:$QT_BASE/bin:$PATH" - - # search compiler in the path, to fail now instead of later. - CC=$(which ${TOOLCHAIN_FULL_PREFIX}-clang) - if [ "X$CC" == "X" ]; then - error "Unable to find compiler ($TOOLCHAIN_FULL_PREFIX-clang) !!" - error "1. Ensure that SDK/NDK paths are correct" - error "2. Ensure that you've the Android API $ANDROIDAPI SDK Platform (via android tool)" - exit 1 - else - debug "Compiler found at $CC" - fi - - export CC="$TOOLCHAIN_FULL_PREFIX-clang $CFLAGS" - export CXX="$TOOLCHAIN_FULL_PREFIX-clang++ $CXXFLAGS" - export AR="$TOOLCHAIN_SHORT_PREFIX-ar" - export RANLIB="$TOOLCHAIN_SHORT_PREFIX-ranlib" - export LD="$TOOLCHAIN_SHORT_PREFIX-ld" - export STRIP="$TOOLCHAIN_SHORT_PREFIX-strip" - export MAKESMP="make -j$CORES" - export MAKE="make" - export READELF="$TOOLCHAIN_SHORT_PREFIX-readelf" - - IS_AR=$(which $AR) - if [ "X$IS_AR" == "X" ]; then - error "you need $AR on PATH $PATH" - exit 1 - fi - - # see https://developer.android.com/ndk/guides/cmake#variables - # https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-android - export CMAKECMD="cmake" - export CMAKECMD="$CMAKECMD -DANDROID_LINKER_FLAGS=$ANDROID_CMAKE_LINKER_FLAGS" - if [ $DEBUG -eq 1 ]; then - CMAKECMD="${CMAKECMD} -DCMAKE_BUILD_TYPE=RelWithDebInfo" - else - CMAKECMD="${CMAKECMD} -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE=-g0" - fi - # official toolchain adds -g by default! - # see https://github.com/android/ndk/issues/243 - CMAKECMD="$CMAKECMD -DCMAKE_TOOLCHAIN_FILE=$ANDROIDNDK/build/cmake/android.toolchain.cmake" - export CMAKECMD="$CMAKECMD -DCMAKE_FIND_ROOT_PATH:PATH=$ANDROID_NDK;$QT_BASE;$BUILD_PATH;$STAGE_PATH" - export CMAKECMD="$CMAKECMD -DCMAKE_PREFIX_PATH=${QT_BASE}" - export CMAKECMD="$CMAKECMD -DANDROID_ABI=$ARCH -DANDROID_NDK=$ANDROID_NDK -DANDROID_PLATFORM=android-$ANDROIDAPI -DANDROID=ON -DANDROID_STL=c++_shared" - export CMAKECMD="$CMAKECMD -DQt6_DIR:PATH=$QT_BASE/lib/cmake -DQT_HOST_PATH=$QT_HOST_PATH" - - # Looks like iOS doesn't have these, but requires them for Qt6::Core - export CMAKECMD="$CMAKECMD -DQt6CoreTools_DIR:PATH=$QT_HOST_PATH/lib/cmake/Qt6CoreTools" - export CMAKECMD="$CMAKECMD -DQt6LinguistTools_DIR:PATH=$QT_HOST_PATH/lib/cmake/Qt6LinguistTools" - export CMAKECMD="$CMAKECMD -DQt6WidgetsTools_DIR:PATH=$QT_HOST_PATH/lib/cmake/Qt6WidgetsTools" - export CMAKECMD="$CMAKECMD -DQt6GuiTools_DIR:PATH=$QT_HOST_PATH/lib/cmake/Qt6GuiTools" - - # export environment for Qt - export ANDROID_NDK_ROOT=$ANDROIDNDK - # and for cmake - export ANDROID_NDK=$ANDROIDNDK -} - -function pop_arm() { - info "Leaving ${ARCH} environment" - export PATH=$OLD_PATH - export CFLAGS=$OLD_CFLAGS - export CXXFLAGS=$OLD_CXXFLAGS - export LDFLAGS=$OLD_LDFLAGS - export CC=$OLD_CC - export CXX=$OLD_CXX - export AR=$OLD_AR - export LD=$OLD_LD - export RANLIB=$OLD_RANLIB - export STRIP=$OLD_STRIP - export MAKE=$OLD_MAKE - export CMAKECMD=$OLD_CMAKECMD - export ANDROID_CMAKE_LINKER_FLAGS=$OLD_ANDROID_CMAKE_LINKER_FLAGS - export QT_BASE=$OLD_QT_BASE -} - -function usage() { - echo "Android dependencies of InputApp - distribute.sh" - echo - echo "Usage: ./distribute.sh [options]" - echo - echo " -h Show this help" - echo " -l Show a list of available modules" - echo " -m 'mod1 mod2' Modules to include" - echo " -f Restart from scratch (remove the current build)" - echo " -x display expanded values (execute 'set -x')" - echo - echo "For developers:" - echo " -u 'mod1 mod2' Modules to update (if already compiled)" - echo - exit 0 -} - -# Check installation state of a debian package list. -# Return all missing packages. -function check_pkg_deb_installed() { - PKGS=$1 - MISSING_PKGS="" - for PKG in $PKGS; do - CHECK=$(dpkg -s $PKG 2>&1) - if [ $? -eq 1 ]; then - MISSING_PKGS="$PKG $MISSING_PKGS" - fi - done - if [ "X$MISSING_PKGS" != "X" ]; then - error "Packages missing: $MISSING_PKGS" - error "It might break the compilation, except if you installed thoses packages manually." - fi -} - -function check_build_deps() { - # on MacOS there is no lsb_release command - if hash lsb_release 2>/dev/null; then - DIST=$(lsb_release -is) - info "Check build dependencies for $DIST" - case $DIST in - Debian|Ubuntu|LinuxMint) - # see https://doc.qt.io/qt-5/android-getting-started.html#64-bit-linux - check_pkg_deb_installed "build-essential zlib1g-dev cython" - ;; - *) - debug "Avoid check build dependencies, unknown platform $DIST" - ;; - esac - else - debug "Avoid check build dependencies, unknown platform" - fi -} - -function run_prepare() { - info "Check environment" - if [ "X$ANDROIDSDK" == "X" ]; then - error "No ANDROIDSDK environment set, abort" - exit -1 - fi - if [ ! -d "$ANDROIDSDK" ]; then - echo "ANDROIDSDK=$ANDROIDSDK" - error "ANDROIDSDK path is invalid, it must be a directory. abort." - exit 1 - fi - - if [ "X$ANDROIDNDK" == "X" ]; then - error "No ANDROIDNDK environment set, abort" - exit -1 - fi - if [ ! -d "$ANDROIDNDK" ]; then - echo "ANDROIDNDK=$ANDROIDNDK" - error "ANDROIDNDK path is invalid, it must be a directory. abort." - exit 1 - fi - - if [ "X$ANDROIDAPI" == "X" ]; then - export ANDROIDAPI=14 - fi - - if [ "X$MODULES" == "X" ]; then - usage - exit 0 - fi - - debug "SDK located at $ANDROIDSDK" - debug "NDK located at $ANDROIDNDK" - debug "NDK version is $ANDROIDNDKVER" - debug "API level set to $ANDROIDAPI" - if [ "X${ARCH}" == "Xx86" ]; then - export SHORTARCH="x86" - elif [ "X${ARCH}" == "Xarmeabi-v7a" ]; then - export SHORTARCH="arm" - elif [ "X${ARCH}" == "Xarm64-v8a" ]; then - export SHORTARCH="arm64" - else - echo "Error: Please report issue to enable support for newer arch (${ARCH})." - exit 1 - fi - - info "Check mandatory tools" - # ensure that some tools are existing - for tool in tar bzip2 unzip make gcc g++; do - which $tool &>/dev/null - if [ $? -ne 0 ]; then - error "Tool $tool is missing" - exit -1 - fi - done - - if [ $DO_CLEAN_BUILD -eq 1 ]; then - info "Cleaning build" - try rm -rf $STAGE_PATH - try rm -rf $BUILD_PATH - try rm -rf $SRC_PATH/obj - try rm -rf $SRC_PATH/libs - try rm -rf $NATIVE_STAGE_PATH - fi - - info "Distribution will be located at $STAGE_PATH" - if [ -e "$STAGE_PATH" ]; then - info "The directory $STAGE_PATH already exist" - info "Will continue using and possibly overwrite what is in there" - fi - try mkdir -p "$STAGE_PATH" - - # create build directory if not found - test -d $PACKAGES_PATH || mkdir -p $PACKAGES_PATH - test -d $BUILD_PATH || mkdir -p $BUILD_PATH - test -d $NATIVE_STAGE_PATH || mkdir -p $NATIVE_STAGE_PATH - test -d $LIBS_PATH || mkdir -p $LIBS_PATH - - # check arm env - push_arm - debug "PATH is $PATH" - pop_arm -} - -function in_array() { - term="$1" - shift - i=0 - for key in $@; do - if [ $term == $key ]; then - return $i - fi - i=$(($i + 1)) - done - return 255 -} - -function run_source_modules() { - # preprocess version modules - needed=($MODULES) - while [ ${#needed[*]} -ne 0 ]; do - - # pop module from the needed list - module=${needed[0]} - unset needed[0] - needed=( ${needed[@]} ) - - # is a version is specified ? - items=( ${module//==/ } ) - module=${items[0]} - version=${items[1]} - if [ ! -z "$version" ]; then - info "Specific version detected for $module: $version" - eval "VERSION_$module=$version" - fi - done - - - needed=($MODULES) - declare -a processed - declare -a pymodules - processed=() - - fn_deps='.deps' - fn_optional_deps='.optional-deps' - - > $fn_deps - > $fn_optional_deps - - while [ ${#needed[*]} -ne 0 ]; do - - # pop module from the needed list - module=${needed[0]} - original_module=${needed[0]} - unset needed[0] - needed=( ${needed[@]} ) - - # split the version if exist - items=( ${module//==/ } ) - module=${items[0]} - version=${items[1]} - - # check if the module have already been declared - in_array $module "${processed[@]}" - if [ $? -ne 255 ]; then - debug "Ignored $module, already processed" - continue; - fi - - # add this module as done - processed=( ${processed[@]} $module ) - - # read recipe - debug "Read $module recipe" - recipe=$RECIPES_PATH/$module/recipe.sh - if [ ! -f $recipe ]; then - error "Recipe $module does not exist, adding the module as pure-python package" - pymodules+=($original_module) - continue; - fi - source $RECIPES_PATH/$module/recipe.sh - - # if a version has been specified by the user, the md5 will not - # correspond at all. so deactivate it. - if [ ! -z "$version" ]; then - debug "Deactivate MD5 test for $module, due to specific version" - eval "MD5_$module=" - fi - - # append current module deps to the needed - deps=$(echo \$"{DEPS_$module[@]}") - eval deps=($deps) - optional_deps=$(echo \$"{DEPS_OPTIONAL_$module[@]}") - eval optional_deps=($optional_deps) - if [ ${#deps[*]} -gt 0 ]; then - debug "Module $module depend on" ${deps[@]} - needed=( ${needed[@]} ${deps[@]} ) - echo $module ${deps[@]} >> $fn_deps - else - echo $module >> $fn_deps - fi - if [ ${#optional_deps[*]} -gt 0 ]; then - echo $module ${optional_deps[@]} >> $fn_optional_deps - fi - done - - info `pwd` - MODULES="$($PYTHON tools/depsort.py --optional $fn_optional_deps < $fn_deps)" - - info "Modules changed to $MODULES" - - PYMODULES="${pymodules[@]}" - - info "Pure-Python modules changed to $PYMODULES" -} - -function run_get_packages() { - info "Run get packages" - - if [ ! -f "$ROOT_OUT_PATH/.packages/config.sub" ]; then - $WGET $ROOT_OUT_PATH/.packages/config.sub "http://git.savannah.gnu.org/cgit/config.git/plain/config.sub" - $WGET $ROOT_OUT_PATH/.packages/config.guess "http://git.savannah.gnu.org/cgit/config.git/plain/config.guess" - fi - - for module in $MODULES; do - # download dependencies for this module - # check if there is not an overload from environment - module_dir=$(eval "echo \$O4A_${module}_DIR") - if [ "$module_dir" ] - then - debug "\$O4A_${module}_DIR is not empty, linking $module_dir dir instead of downloading" - directory=$(eval "echo \$BUILD_${module}") - if [ -e $directory ]; then - try rm -rf "$directory" - fi - try mkdir -p "$directory" - try rmdir "$directory" - try ln -s "$module_dir" "$directory" - continue - fi - debug "Download package for $module" - fold_push "download ${module}" - - url="URL_$module" - url=${!url} - - md5="MD5_$module" - md5=${!md5} - - if [ ! -d "$BUILD_PATH/$module" ]; then - try mkdir -p $BUILD_PATH/$module - fi - - if [ ! -d "$PACKAGES_PATH/$module" ]; then - try mkdir -p "$PACKAGES_PATH/$module" - fi - - if [ "X$url" == "X" ]; then - debug "No package for $module" - continue - fi - - filename=${url//?dl=1/} - filename=${filename//\/download/} - filename=$(basename $filename) - marker_filename=".mark-$filename" - do_download=1 - - cd "$PACKAGES_PATH/$module" - - # check if the file is already present - if [ -f $filename ]; then - # if the marker has not been set, it might be cause of a invalid download. - if [ ! -f $marker_filename ]; then - rm $filename - elif [ -n "$md5" ]; then - # check if the md5 is correct - current_md5=$($MD5SUM $filename | cut -d\ -f1) - if [ "X$current_md5" == "X$md5" ]; then - # correct, no need to download - do_download=0 - else - # invalid download, remove the file - error "Module $module have invalid md5, redownload." - rm $filename - fi - else - do_download=0 - fi - fi - - if [ -z "$md5" ]; then - if [ "X$DO_CLEAN_BUILD" == "X1" ]; then - do_download=1 - elif [ ! -f $filename ]; then - do_download=1 - fi - fi - - # download if needed - if [ $do_download -eq 1 ]; then - info "Downloading $url" - try rm -f $marker_filename - try $WGET $filename $url - touch $marker_filename - else - debug "Module $module already downloaded" - fi - - # check md5 - if [ -n "$md5" ]; then - current_md5=$($MD5SUM $filename | cut -d\ -f1) - if [ "X$current_md5" != "X$md5" ]; then - error "File $filename md5 check failed (got $current_md5 instead of $md5)." - error "Ensure the file is correctly downloaded, and update MD5S_$module" - exit -1 - fi - fi - - # if already decompress, forget it - cd $BUILD_PATH/$module - directory=$(get_directory $filename) - if [ -d "$directory" ]; then - continue - fi - - # decompress - pfilename=$PACKAGES_PATH/$module/$filename - info "Extract $pfilename" - case $pfilename in - *.tar.gz|*.tgz ) - try tar xzf $pfilename - root_directory=$(basename $(try tar tzf $pfilename|head -n1)) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - *.tar.bz2|*.tbz2 ) - try tar xjf $pfilename - root_directory=$(basename $(try tar tjf $pfilename|head -n1)) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - *.zip ) - try unzip $pfilename - root_directory=$(basename $(try unzip -l $pfilename|sed -n 5p|awk '{print $4}')) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - * ) - try tar xf $pfilename - root_directory=$(basename $(try tar xf $pfilename|head -n1)) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - esac - fold_pop - done -} - -function run_prebuild() { - info "Run prebuild" - cd $BUILD_PATH - for module in $MODULES; do - fn=$(echo prebuild_$module) - debug "Call $fn" - $fn - done -} - -function run_build() { - info "Run build" - - modules_update=($MODULES_UPDATE) - - cd $BUILD_PATH - - for module in $MODULES; do - fold_push "building ${module}" - - fn="build_$module" - shouldbuildfn="shouldbuild_$module" - MARKER_FN="$BUILD_PATH/.mark-$module" - - # if the module should be updated, then remove the marker. - in_array $module "${modules_update[@]}" - if [ $? -ne 255 ]; then - debug "$module detected to be updated" - rm -f "$MARKER_FN" - fi - - # if shouldbuild_$module exist, call it to see if the module want to be - # built again - DO_BUILD=1 - if [ "$(type -t $shouldbuildfn)" == "function" ]; then - $shouldbuildfn - fi - - # if the module should be build, or if the marker is not present, - # do the build - if [ "X$DO_BUILD" == "X1" ] || [ ! -f "$MARKER_FN" ]; then - debug "Call $fn" - rm -f "$MARKER_FN" - $fn - touch "$MARKER_FN" - else - debug "Skipped $fn" - fi - - # run postbuild - info "Run postbuild $module" - fn=$(echo postbuild_$module) - debug "Call $fn" - - fold_pop - done -} - - -function run() { - check_build_deps - for ARCH in ${ARCHES[@]}; do - cd ${ROOT_PATH} - STAGE_PATH="${ROOT_OUT_PATH}/stage/$ARCH" - run_prepare - run_source_modules - run_get_packages - run_prebuild - run_build - done - info "All done !" -} - -function list_modules() { - modules=$(find recipes -iname 'recipe.sh' | cut -d/ -f2 | sort -u | xargs echo) - echo "Available modules: $modules" - exit 0 -} - -# Do the build -while getopts ":hCvlfxim:a:u:d:s:g" opt; do - case $opt in - h) - usage - ;; - l) - list_modules - ;; - s) - run_prepare - run_source_modules - push_arm - bash - pop_arm - exit 0 - ;; - a) - LAYOUT="$OPTARG" - ;; - i) - INSTALL=1 - ;; - g) - DEBUG=1 - echo "Requesting debug binaries" - ;; - m) - MODULES="$OPTARG" - ;; - u) - MODULES_UPDATE="$OPTARG" - ;; - f) - DO_CLEAN_BUILD=1 - ;; - x) - DO_SET_X=1 - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - exit 1 - ;; - :) - echo "Option -$OPTARG requires an argument." >&2 - exit 1 - ;; - - *) - echo "=> $OPTARG" - ;; - esac -done - -if [ $DO_SET_X -eq 1 ]; then - info "Set -x for displaying expanded values" - set -x -fi - -run diff --git a/android/recipes/curl/recipe.sh b/android/recipes/curl/recipe.sh deleted file mode 100755 index f89078fe..00000000 --- a/android/recipes/curl/recipe.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_curl=(openssl) - -# default build path -BUILD_curl=$BUILD_PATH/curl/$(get_directory $URL_curl) - -# default recipe path -RECIPE_curl=$RECIPES_PATH/curl - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_curl() { - cd $BUILD_curl - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_curl() { - # If lib is newer than the sourcecode skip build - if [ $BUILD_PATH/curl/build-$ARCH/lib/libcurl.a -nt $BUILD_curl/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_curl() { - try mkdir -p $BUILD_PATH/curl/build-$ARCH - try cd $BUILD_PATH/curl/build-$ARCH - push_arm - - try ${CMAKECMD} \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_TESTING=OFF \ - -DBUILD_SHARED_LIBS=FALSE \ - -DBUILD_CURL_EXE=OFF \ - -DCURL_USE_LIBSSH2=OFF \ - -DCURL_USE_LIBSSH=OFF \ - -DCURL_ZSTD=OFF \ - -DCURL_BROTLI=OFF \ - -DCURL_DISABLE_LDAP=ON \ - -DCURL_USE_OPENLDAP=OFF \ - -DUSE_QUICHE=OFF \ - -DUSE_NGTCP2=OFF \ - -DUSE_NGHTTP2=OFF \ - -DUSE_ZLIB=OFF \ - -DOPENSSL_SSL_LIBRARY=$STAGE_PATH/lib/libssl_3.so \ - -DOPENSSL_CRYPTO_LIBRARY=$STAGE_PATH/lib/libcrypto_3.so \ - -DOPENSSL_INCLUDE_DIR=$STAGE_PATH/include \ - $BUILD_curl - - try $MAKESMP - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_curl() { - if [ ! -f ${STAGE_PATH}/lib/libcurl.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/exiv2/recipe.sh b/android/recipes/exiv2/recipe.sh deleted file mode 100755 index 15f4d551..00000000 --- a/android/recipes/exiv2/recipe.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_exiv2=(expat iconv) - -# default build path -BUILD_exiv2=$BUILD_PATH/exiv2/$(get_directory $URL_exiv2) - -# default recipe path -RECIPE_exiv2=$RECIPES_PATH/exiv2 - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_exiv2() { - cd $BUILD_exiv2 - - # check marker - if [ -f .patched ]; then - return - fi - - # try patch -p1 < $RECIPE_exiv2/patches/exiv2.patch - - touch .patched -} - -function shouldbuild_exiv2() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libexiv2.a -nt $BUILD_exiv2/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_exiv2() { - try mkdir -p $BUILD_PATH/exiv2/build-$ARCH - try cd $BUILD_PATH/exiv2/build-$ARCH - push_arm - try $CMAKECMD \ - -DBUILD_SHARED_LIBS=OFF \ - -DEXIV2_BUILD_EXIV2_COMMAND=OFF \ - -DEXIV2_BUILD_SAMPLES=OFF \ - -DEXIV2_BUILD_UNIT_TESTS=OFF \ - -DEXIV2_BUILD_DOC=OFF \ - -DEXIV2_ENABLE_NLS=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - $BUILD_exiv2 - try $MAKESMP install - pop_arm -} - -# function called after all the compile have been done -function postbuild_exiv2() { - if [ ! -f ${STAGE_PATH}/lib/libexiv2.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/expat/patches/expat.patch b/android/recipes/expat/patches/expat.patch deleted file mode 100644 index 799f9c19..00000000 --- a/android/recipes/expat/patches/expat.patch +++ /dev/null @@ -1,90 +0,0 @@ ---- a/configure -+++ b/configure -@@ -8181,14 +8181,25 @@ - linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; -+ -+ - - # This must be Linux ELF. - linux*) - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ case $host_os in -+ # This must be Linux Android ELF. -+ linux-android*) -+ library_names_spec='$libname${shared_ext}' -+ soname_spec='${libname}${shared_ext}' -+ ;; -+ *) -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ ;; -+ esac - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no -@@ -12147,8 +12158,17 @@ - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ case $host_os in -+ # This must be Linux Android ELF. -+ linux-android*) -+ library_names_spec='$libname${shared_ext}' -+ soname_spec='${libname}${shared_ext}' -+ ;; -+ *) -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ ;; -+ esac - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no -@@ -14734,8 +14754,17 @@ - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ case $host_os in -+ # This must be Linux Android ELF. -+ linux-android*) -+ library_names_spec='$libname${shared_ext}' -+ soname_spec='${libname}${shared_ext}' -+ ;; -+ *) -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ ;; -+ esac - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no -@@ -17333,8 +17362,17 @@ - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ case $host_os in -+ # This must be Linux Android ELF. -+ linux-android*) -+ library_names_spec='$libname${shared_ext}' -+ soname_spec='${libname}${shared_ext}' -+ ;; -+ *) -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ ;; -+ esac - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no diff --git a/android/recipes/expat/recipe.sh b/android/recipes/expat/recipe.sh deleted file mode 100755 index f2b4110f..00000000 --- a/android/recipes/expat/recipe.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_expat=() - -# default build path -BUILD_expat=$BUILD_PATH/expat/$(get_directory $URL_expat) - -# default recipe path -RECIPE_expat=$RECIPES_PATH/expat - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_expat() { - cd $BUILD_expat - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_expat/conftools - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_expat/conftools - # try patch -p1 < $RECIPE_expat/patches/expat.patch - - touch .patched -} - -function shouldbuild_expat() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libexpat.a -nt $BUILD_expat/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_expat() { - try mkdir -p $BUILD_PATH/expat/build-$ARCH - try cd $BUILD_PATH/expat/build-$ARCH - - push_arm - - try $BUILD_expat/configure \ - --prefix=$STAGE_PATH \ - --host=$TOOLCHAIN_PREFIX \ - --build=x86_64 \ - --disable-shared - - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_expat() { - if [ ! -f ${STAGE_PATH}/lib/libexpat.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/freexl/patches/freexl.patch b/android/recipes/freexl/patches/freexl.patch deleted file mode 100644 index 91f94adf..00000000 --- a/android/recipes/freexl/patches/freexl.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/configure b/configure -index 0bca8b1..deb40a2 100755 ---- a/configure -+++ b/configure -@@ -11971,8 +11971,17 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ case $host_os in -+ # This must be Linux Android ELF. -+ linux-android*) -+ library_names_spec='$libname${shared_ext}' -+ soname_spec='${libname}${shared_ext}' -+ ;; -+ *) -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ ;; -+ esac - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no -@@ -15808,8 +15817,17 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ case $host_os in -+ # This must be Linux Android ELF. -+ linux-android*) -+ library_names_spec='$libname${shared_ext}' -+ soname_spec='${libname}${shared_ext}' -+ ;; -+ *) -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ ;; -+ esac - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no diff --git a/android/recipes/freexl/recipe.sh b/android/recipes/freexl/recipe.sh deleted file mode 100755 index 00446252..00000000 --- a/android/recipes/freexl/recipe.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_freexl=(iconv) - -# default build path -BUILD_freexl=$BUILD_PATH/freexl/$(get_directory $URL_freexl) - -# default recipe path -RECIPE_freexl=$RECIPES_PATH/freexl - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_freexl() { - cd $BUILD_freexl - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_freexl - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_freexl - try patch -p1 < $RECIPE_freexl/patches/freexl.patch - - touch .patched -} - -function shouldbuild_freexl() { - if [ -f $STAGE_PATH/lib/libfreexl.a ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_freexl() { - try mkdir -p $BUILD_PATH/freexl/build-$ARCH - try cd $BUILD_PATH/freexl/build-$ARCH - push_arm - - export LDFLAGS="$LDFLAGS -liconv" - try $BUILD_freexl/configure \ - --prefix=$STAGE_PATH \ - --host=$TOOLCHAIN_PREFIX \ - --build=x86_64 \ - --disable-shared - - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_freexl() { - if [ ! -f ${STAGE_PATH}/lib/libfreexl.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/gdal/patches/configure.patch b/android/recipes/gdal/patches/configure.patch deleted file mode 100644 index b284bce1..00000000 --- a/android/recipes/gdal/patches/configure.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/configure 2022-02-18 10:31:24.000000000 +0100 -+++ b/configure 2022-02-18 11:01:15.000000000 +0100 -@@ -36559,7 +36559,7 @@ if ${ac_cv_lib_curl_curl_global_init+:} - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lcurl `$LIBCURL_CONFIG --libs` $LIBS" -+LIBS="-lcurl -lssl_3 -lcrypto_3 `$LIBCURL_CONFIG --libs` $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -37012,7 +37012,7 @@ done - if test "$ac_cv_header_sqlite3_h" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spatialite.h in /usr/include or /usr/local/include" >&5 - $as_echo_n "checking for spatialite.h in /usr/include or /usr/local/include... " >&6; } -- if test -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then -+ if true; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 - $as_echo "found" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spatialite_init in -lspatialite" >&5 -@@ -37021,7 +37021,7 @@ if ${ac_cv_lib_spatialite_spatialite_ini - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lspatialite -lsqlite3 $LIBS" -+LIBS="-lspatialite -lsqlite3 -lgeos_c -lgeos -lfreexl $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -39073,7 +39073,7 @@ $as_echo "$as_me: WARNING: GEOS was foun - - HAVE_GEOS="no" - -- GEOS_LIBS="`${GEOS_CONFIG} --ldflags` -lgeos_c" -+ GEOS_LIBS="`${GEOS_CONFIG} --ldflags` -lgeos_c -lgeos" - GEOS_CFLAGS="`${GEOS_CONFIG} --cflags`" - GEOS_VERSION="`${GEOS_CONFIG} --version`" - -@@ -39088,7 +39088,7 @@ if ${ac_cv_lib_geos_c_GEOSversion+:} fal - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lgeos_c -+LIBS="-lgeos_c -lgeos - $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ \ No newline at end of file diff --git a/android/recipes/gdal/recipe.sh b/android/recipes/gdal/recipe.sh deleted file mode 100755 index ab2d0923..00000000 --- a/android/recipes/gdal/recipe.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_gdal=(iconv sqlite3 geos postgresql expat proj webp curl libspatialite libtiff) - -# default build path -BUILD_gdal=$BUILD_PATH/gdal/$(get_directory $URL_gdal) - -# default recipe path -RECIPE_gdal=$RECIPES_PATH/gdal - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_gdal() { - cd $BUILD_gdal - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_gdal - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_gdal - - try patch -p1 < $RECIPE_gdal/patches/configure.patch - - touch .patched -} - -function shouldbuild_gdal() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libgdal.a -nt $BUILD_gdal/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_gdal() { - try rsync -a $BUILD_gdal/ $BUILD_PATH/gdal/build-$ARCH/ - try cd $BUILD_PATH/gdal/build-$ARCH - - push_arm - - GDAL_FLAGS="--disable-shared" - if [ $DEBUG -eq 1 ]; then - info "Building DEBUG version of GDAL!!" - GDAL_FLAGS="$GDAL_FLAGS --enable-debug" - fi - - export CFLAGS="${CFLAGS} -Wno-error=implicit-function-declaration" - - # so the configure script can check that static libraries linkage is ok - export LDFLAGS="$LDFLAGS -lgeos_c -lgeos -lcurl -lssl_3 -lcrypto_3" - export LDFLAGS="$LDFLAGS -ltiff -lwebp -ljpeg" - - # We have external JPEG, but still with renamed symbols - export CFLAGS="${CFLAGS} -DRENAME_INTERNAL_LIBJPEG_SYMBOLS" - export CPPFLAGS="${CPPFLAGS} -DRENAME_INTERNAL_LIBJPEG_SYMBOLS" - - # Undefined symbols for architecture arm64: "_png_do_expand_palette_rgb8_neon" - export CFLAGS="${CFLAGS} -DPNG_ARM_NEON_OPT=0" - export CPPFLAGS="${CPPFLAGS} -DPNG_ARM_NEON_OPT=0" - - try ./configure \ - --host=$TOOLCHAIN_PREFIX \ - --build=x86_64 \ - --prefix=$STAGE_PATH \ - --with-sqlite3=$STAGE_PATH \ - --with-webp=$STAGE_PATH \ - --with-curl=$STAGE_PATH \ - --with-spatialite=yes \ - --with-geos=$STAGE_PATH/bin/geos-config \ - --with-pg=no \ - --with-expat=$STAGE_PATH \ - --with-libtiff=$STAGE_PATH \ - --with-rename-internal-libgeotiff-symbols=yes \ - --with-rename-internal-shapelib-symbols=yes \ - --with-proj-extra-lib-for-test="-ltiff -lwebp -ljpeg" \ - --with-poppler=no \ - --with-zstd=no \ - --with-pcre=no \ - --with-lz4=no \ - --with-pcre2=no \ - --with-podofo=no \ - --with-pdfium=no \ - --with-proj=$STAGE_PATH \ - --with-jpeg=$STAGE_PATH \ - --with-png=internal \ - --disable-driver-mrf \ - $GDAL_FLAGS - - try $MAKESMP static-lib - try $MAKESMP install-static-lib - - try cp ./apps/*.h $STAGE_PATH/include/ - - pop_arm -} - -# function called after all the compile have been done -function postbuild_gdal() { - if [ ! -f ${STAGE_PATH}/lib/libgdal.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/geodiff/recipe.sh b/android/recipes/geodiff/recipe.sh deleted file mode 100755 index 28590cc2..00000000 --- a/android/recipes/geodiff/recipe.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_geodiff=(sqlite3) - -# default build path -BUILD_geodiff=$BUILD_PATH/geodiff/$(get_directory $URL_geodiff) - -# default recipe path -RECIPE_geodiff=$RECIPES_PATH/geodiff - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_geodiff() { - cd $BUILD_geodiff - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_geodiff() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libgeodiff.a -nt $BUILD_geodiff/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_geodiff() { - try mkdir -p $BUILD_PATH/geodiff/build-$ARCH - try cd $BUILD_PATH/geodiff/build-$ARCH - - # we use CMAKE < 3.12 on the ubuntu-20.04, so - # FindSQLite3 is not yet part of the package - # and also transitional - # try mkdir -p $BUILD_geodiff/geodiff/cmake/ - # try cp $RECIPE_geodiff/FindSQLite3.cmake $BUILD_geodiff/geodiff/cmake/ - - push_arm - - try $CMAKECMD \ - -DCMAKE_MODULE_PATH:PATH=$BUILD_geodiff/geodiff/cmake \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DENABLE_TESTS=OFF \ - -DBUILD_TOOLS=OFF \ - -DBUILD_STATIC=ON \ - -DBUILD_SHARED=OFF \ - -DWITH_POSTGRESQL=OFF \ - -DSQLITE3_INCLUDE_DIR=$STAGE_PATH/include \ - -DSQLITE3_LIBRARY=$STAGE_PATH/lib/libsqlite3.a \ - $BUILD_geodiff/geodiff - - try $MAKESMP - try $MAKESMP install - pop_arm -} - -# function called after all the compile have been done -function postbuild_geodiff() { - if [ ! -f ${STAGE_PATH}/lib/libgeodiff.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/geos/patches/geos.patch b/android/recipes/geos/patches/geos.patch deleted file mode 100644 index 08ad8536..00000000 --- a/android/recipes/geos/patches/geos.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -rupN orig/capi/CMakeLists.txt new/capi/CMakeLists.txt ---- orig/capi/CMakeLists.txt 2014-11-30 15:49:25.078555486 +0100 -+++ new/capi/CMakeLists.txt 2014-11-30 16:06:19.134887151 +0100 -@@ -33,11 +33,17 @@ if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK) - VERSION ${CAPI_VERSION} - CLEAN_DIRECT_OUTPUT 1) - else() -- set_target_properties(geos_c -- PROPERTIES -- VERSION ${CAPI_VERSION} -- SOVERSION ${CAPI_SOVERSION} -- CLEAN_DIRECT_OUTPUT 1) -+ if (ANDROID) -+ set_target_properties(geos_c -+ PROPERTIES -+ CLEAN_DIRECT_OUTPUT 1) -+ else() -+ set_target_properties(geos_c -+ PROPERTIES -+ VERSION ${CAPI_VERSION} -+ SOVERSION ${CAPI_SOVERSION} -+ CLEAN_DIRECT_OUTPUT 1) -+ endif() - endif() - - endif() -diff -rupN orig/src/CMakeLists.txt new/src/CMakeLists.txt ---- orig/src/CMakeLists.txt 2017-02-14 12:27:51.046377391 +0100 -+++ new/src/CMakeLists.txt 2017-02-14 12:29:13.280316592 +0100 -@@ -67,9 +67,14 @@ else() - set_target_properties(geos - PROPERTIES - DEFINE_SYMBOL GEOS_DLL_EXPORT -- VERSION ${VERSION} - CLEAN_DIRECT_OUTPUT 1) - -+ if(NOT ANDROID) -+ set_target_properties(geos -+ VERSION ${VERSION} -+ ) -+ endif() -+ - install(TARGETS geos - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib -\ No newline at end of file diff --git a/android/recipes/geos/recipe.sh b/android/recipes/geos/recipe.sh deleted file mode 100755 index 5737747c..00000000 --- a/android/recipes/geos/recipe.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_geos=() - -# default build path -BUILD_geos=$BUILD_PATH/geos/$(get_directory $URL_geos) - -# default recipe path -RECIPE_geos=$RECIPES_PATH/geos - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_geos() { - cd $BUILD_geos - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_geos - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_geos - - touch .patched -} - -function shouldbuild_geos() { - # If lib is newer than the sourcecode skip build - if [ $BUILD_PATH/geos/build-$ARCH/lib/libgeos.a -nt $BUILD_geos/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_geos() { - try mkdir -p $BUILD_PATH/geos/build-$ARCH - try cd $BUILD_PATH/geos/build-$ARCH - push_arm - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DDISABLE_GEOS_INLINE=ON \ - -DBUILD_SHARED_LIBS=FALSE \ - -DBUILD_TESTING=OFF \ - $BUILD_geos - - echo '#define GEOS_SVN_REVISION 0' > $BUILD_PATH/geos/build-$ARCH/geos_svn_revision.h - try $MAKESMP - try $MAKESMP install - pop_arm -} - -# function called after all the compile have been done -function postbuild_geos() { - if [ ! -f ${STAGE_PATH}/lib/libgeos.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/iconv/recipe.sh b/android/recipes/iconv/recipe.sh deleted file mode 100755 index dacbc82c..00000000 --- a/android/recipes/iconv/recipe.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_iconv=() - -# default build path -BUILD_iconv=$BUILD_PATH/iconv/$(get_directory $URL_iconv) - -# default recipe path -RECIPE_iconv=$RECIPES_PATH/iconv - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_iconv() { - cd $BUILD_iconv - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_iconv/build-aux - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_iconv/build-aux - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_iconv/libcharset/build-aux - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_iconv/libcharset/build-aux - - touch .patched -} - -function shouldbuild_iconv() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libiconv.a -nt $BUILD_iconv/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_iconv() { - try mkdir -p $BUILD_PATH/iconv/build-$ARCH - try cd $BUILD_PATH/iconv/build-$ARCH - - push_arm - - try $BUILD_iconv/configure \ - --prefix=$STAGE_PATH \ - --host=$TOOLCHAIN_PREFIX \ - --build=x86_64 \ - --enable-shared=no - - try $MAKESMP - try make install - - - pop_arm -} - -# function called after all the compile have been done -function postbuild_iconv() { - if [ ! -f ${STAGE_PATH}/lib/libiconv.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/jpeg/patches/CMakeLists.txt b/android/recipes/jpeg/patches/CMakeLists.txt deleted file mode 100644 index a46ba2cf..00000000 --- a/android/recipes/jpeg/patches/CMakeLists.txt +++ /dev/null @@ -1,76 +0,0 @@ -# see https://github.com/OSGeo/gdal/blob/master/frmts/jpeg/libjpeg/CMakeLists.txt -cmake_minimum_required(VERSION 3.6) -project(JPEG) - -add_library( - jpeg STATIC - jcapimin.c - jchuff.h - jconfig.h - jdapimin.c - jdct.h - jdmarker.c - jdtrans.c - jidctflt.c - jmemmgr.c - jquant2.c - jcapistd.c - jcinit.c - jcparam.c - jdapistd.c - jddctmgr.c - jdmaster.c - jerror.c - jidctfst.c - jmemsys.h - jutils.c - jccoefct.c - jcmainct.c - jcphuff.c - jdatadst.c - jdhuff.c - jdmerge.c - jerror.h - jidctint.c - jmorecfg.h - jversion.h - jccolor.c - jcmarker.c - jcprepct.c - jdatasrc.c - jdhuff.h - jdphuff.c - jfdctflt.c - jidctred.c - jpegint.h - jcdctmgr.c - jcmaster.c - jcsample.c - jdcoefct.c - jdinput.c - jdpostct.c - jfdctfst.c - jinclude.h - jpeglib.h - jchuff.c - jcomapi.c - jctrans.c - jdcolor.c - jdmainct.c - jdsample.c - jfdctint.c - jmemnobs.c - jquant1.c) - -target_include_directories(jpeg PRIVATE $ $/..) -# target_compile_options(libjpeg PRIVATE ${GDAL_C_WARNING_FLAGS} ${GDAL_SOFTWARNFLAGS}) - -target_compile_definitions(jpeg PRIVATE -DDEFAULT_MAX_MEM=500000000L) -if (RENAME_INTERNAL_JPEG_SYMBOLS) - target_compile_definitions(jpeg PUBLIC -DRENAME_INTERNAL_LIBJPEG_SYMBOLS) -endif () - -# produce position independent code, default is on when building a shared library -# option(GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE "Set ON to produce -fPIC code" ${BUILD_SHARED_LIBS}) -# set_property(TARGET jpeg PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) -# target_sources(${GDAL_LIB_TARGET_NAME} PRIVATE $) \ No newline at end of file diff --git a/android/recipes/jpeg/patches/cpl_port.h b/android/recipes/jpeg/patches/cpl_port.h deleted file mode 100644 index 30fe1669..00000000 --- a/android/recipes/jpeg/patches/cpl_port.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef CPL_BASE_H_INCLUDED_TWEAKED -#define CPL_BASE_H_INCLUDED_TWEAKED - -#if defined(__GNUC__) && __GNUC__ >= 4 -/** Qualifier for an argument that is unused */ -# define CPL_UNUSED __attribute((__unused__)) -#else -/* TODO: add cases for other compilers */ -/** Qualifier for an argument that is unused */ -# define CPL_UNUSED -#endif - -#endif /* ndef CPL_BASE_H_INCLUDED_TWEAKED */ \ No newline at end of file diff --git a/android/recipes/jpeg/patches/jerror.patch b/android/recipes/jpeg/patches/jerror.patch deleted file mode 100644 index d51a32b1..00000000 --- a/android/recipes/jpeg/patches/jerror.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/frmts/jpeg/libjpeg/jerror.c -+++ b/frmts/jpeg/libjpeg/jerror.c -@@ -47,6 +47,8 @@ - - #ifdef NEED_12_BIT_NAMES - #define jpeg_std_message_table jpeg_std_message_table_12 -+#elif defined(RENAME_INTERNAL_LIBJPEG_SYMBOLS) -+#define jpeg_std_message_table gdal_jpeg_std_message_table - #endif - - #define JMESSAGE(code,string) string , \ No newline at end of file diff --git a/android/recipes/jpeg/recipe.sh b/android/recipes/jpeg/recipe.sh deleted file mode 100755 index b9eda7e6..00000000 --- a/android/recipes/jpeg/recipe.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - - -# version of your package in ../../../versions.conf - - -# dependencies of this recipe -DEPS_jpeg=() - -# default build path -BUILD_jpeg=$BUILD_PATH/jpeg/$(get_directory $URL_jpeg) - -# default recipe path -RECIPE_jpeg=$RECIPES_PATH/jpeg - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_jpeg() { - cd $BUILD_jpeg - - # check marker - if [ -f .patched ]; then - return - fi - - # so it is not picked by install step! - try cp $RECIPE_jpeg/patches/cpl_port.h $BUILD_jpeg/frmts/jpeg/ - - try rm $BUILD_jpeg/frmts/jpeg/libjpeg/CMakeLists.txt - try cp $RECIPE_jpeg/patches/CMakeLists.txt $BUILD_jpeg/frmts/jpeg/libjpeg/ - - # https://github.com/OSGeo/gdal/pull/6725 - try patch -p1 < $RECIPE_jpeg/patches/jerror.patch - - touch .patched -} - -function shouldbuild_jpeg() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libjpeg.a -nt $BUILD_jpeg/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_jpeg() { - try mkdir -p $BUILD_PATH/jpeg/build-$ARCH - try cd $BUILD_PATH/jpeg/build-$ARCH - - push_arm - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - -DRENAME_INTERNAL_JPEG_SYMBOLS=ON \ - $BUILD_jpeg/frmts/jpeg/libjpeg/ - - check_file_configuration CMakeCache.txt - - try $MAKESMP - - try mkdir -p ${STAGE_PATH}/lib/ - try cp $BUILD_PATH/jpeg/build-$ARCH/libjpeg.a ${STAGE_PATH}/lib/ - try mkdir -p ${STAGE_PATH}/include/ - try cp $BUILD_jpeg/frmts/jpeg/libjpeg/*.h ${STAGE_PATH}/include/ - - pop_arm -} - -# function called after all the compile have been done -function postbuild_jpeg() { - if [ ! -f ${STAGE_PATH}/lib/libjpeg.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/libspatialindex/patches/spatialindex.patch b/android/recipes/libspatialindex/patches/spatialindex.patch deleted file mode 100644 index a93948d3..00000000 --- a/android/recipes/libspatialindex/patches/spatialindex.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -188,9 +188,9 @@ set(SIDX_SOURCES - #endif() - - -+add_library(${SIDX_LIB_NAME} STATIC ${SIDX_SOURCES}) --add_library(${SIDX_LIB_NAME} ${SIDX_SOURCES}) - -+add_library(${SIDX_C_LIB_NAME} STATIC ${SIDX_CAPI_CPP}) --add_library(${SIDX_C_LIB_NAME} ${SIDX_CAPI_CPP}) - - target_link_libraries(${SIDX_C_LIB_NAME} - ${SIDX_LIB_NAME} \ No newline at end of file diff --git a/android/recipes/libspatialindex/recipe.sh b/android/recipes/libspatialindex/recipe.sh deleted file mode 100755 index 59115822..00000000 --- a/android/recipes/libspatialindex/recipe.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libspatialindex=() - -# default build path -BUILD_libspatialindex=$BUILD_PATH/libspatialindex/$(get_directory $URL_libspatialindex) - -# default recipe path -RECIPE_libspatialindex=$RECIPES_PATH/libspatialindex - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libspatialindex() { - cd $BUILD_libspatialindex - - # check marker - if [ -f .patched ]; then - return - fi - - - try patch -p1 < $RECIPE_libspatialindex/patches/spatialindex.patch - - touch .patched -} - -function shouldbuild_libspatialindex() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libspatialindex.a -nt $BUILD_libspatialindex/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libspatialindex() { - try mkdir -p $BUILD_PATH/libspatialindex/build-$ARCH - try cd $BUILD_PATH/libspatialindex/build-$ARCH - - push_arm - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - $BUILD_libspatialindex - - try $MAKESMP - try $MAKESMP install - pop_arm -} - -# function called after all the compile have been done -function postbuild_libspatialindex() { - if [ ! -f ${STAGE_PATH}/lib/libspatialindex.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/libspatialite/patches/configure.patch b/android/recipes/libspatialite/patches/configure.patch deleted file mode 100644 index f576d5f0..00000000 --- a/android/recipes/libspatialite/patches/configure.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/configure 2022-08-05 11:23:16.000000000 +0200 -+++ b/configure 2022-08-05 11:23:37.000000000 +0200 -@@ -12535,8 +12535,17 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ case $host_os in -+ # This must be Linux Android ELF. -+ linux-android*) -+ library_names_spec='$libname${shared_ext}' -+ soname_spec='${libname}${shared_ext}' -+ ;; -+ *) -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ ;; -+ esac - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no -@@ -16372,8 +16381,17 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ case $host_os in -+ # This must be Linux Android ELF. -+ linux-android*) -+ library_names_spec='$libname${shared_ext}' -+ soname_spec='${libname}${shared_ext}' -+ ;; -+ *) -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ ;; -+ esac - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no -@@ -17617,7 +17635,7 @@ $as_echo_n "checking for library contain - if ${ac_cv_search_proj_normalize_for_visualization+:} false; then : - $as_echo_n "(cached) " >&6 - else -- ac_func_search_save_LIBS=$LIBS -+ ac_func_search_save_LIBS="$LIBS -ltiff -lwebp -ljpeg" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -17696,7 +17714,7 @@ for ac_lib in '' proj; do - ac_res="none required" - else - ac_res=-l$ac_lib -- LIBS="-l$ac_lib -lm -lpthread -lsqlite3 $ac_func_search_save_LIBS" -+ LIBS="-l$ac_lib -lm -lsqlite3 -ltiff -lwebp -ljpeg $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_pj_init_plus=$ac_res -@@ -18210,7 +18228,7 @@ done - - CPPFLAGS="$CPPFLAGS_SAVE" - # Ensure we can link against libgeos_c -- LIBS_SAVE="$LIBS" -+ LIBS_SAVE="$LIBS -lgeos" - LIBS="$GEOS_LDFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing GEOSCoveredBy" >&5 - $as_echo_n "checking for library containing GEOSCoveredBy... " >&6; } -@@ -18241,7 +18259,7 @@ for ac_lib in '' geos_c; do - ac_res="none required" - else - ac_res=-l$ac_lib -- LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ LIBS="-l$ac_lib -lgeos $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_GEOSCoveredBy=$ac_res diff --git a/android/recipes/libspatialite/recipe.sh b/android/recipes/libspatialite/recipe.sh deleted file mode 100755 index 5008acd7..00000000 --- a/android/recipes/libspatialite/recipe.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libspatialite=(sqlite3 proj iconv freexl geos) - -# default build path -BUILD_libspatialite=$BUILD_PATH/libspatialite/$(get_directory $URL_libspatialite) - -# default recipe path -RECIPE_libspatialite=$RECIPES_PATH/libspatialite - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libspatialite() { - cd $BUILD_libspatialite - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_libspatialite - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_libspatialite - - try patch -p1 < $RECIPE_libspatialite/patches/configure.patch - - touch .patched -} - -function shouldbuild_libspatialite() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libspatialite.a -nt $BUILD_libspatialite/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libspatialite() { - try rsync -a $BUILD_libspatialite/ $BUILD_PATH/libspatialite/build-$ARCH/ - try cd $BUILD_PATH/libspatialite/build-$ARCH - push_arm - - # so the configure script can check that geos library is ok - export LDFLAGS="$LDFLAGS -lgeos_c -lgeos -liconv" - export LDFLAGS="$LDFLAGS -lproj -ltiff -lwebp -ljpeg" - - rm $BUILD_libspatialite/config.h - rm $BUILD_libspatialite/src/headers/spatialite/gaiaconfig.h - - export CFLAGS="$CFLAGS -I$BUILD_PATH/libspatialite/build-$ARCH/src/headers" - - try $BUILD_libspatialite/configure \ - --prefix=$STAGE_PATH \ - --host=$TOOLCHAIN_PREFIX \ - --build=x86_64 \ - --target=android \ - --with-geosconfig=$STAGE_PATH/bin/geos-config \ - --enable-libxml2=no \ - --disable-examples \ - --enable-proj=yes \ - --enable-gcp=no \ - --enable-minizip=no \ - --disable-shared \ - --enable-rttopo=no \ - --enable-static=yes \ - --disable-dependency-tracking - - try $MAKESMP - try $MAKESMP install - pop_arm -} - -# function called after all the compile have been done -function postbuild_libspatialite() { - if [ ! -f ${STAGE_PATH}/lib/libspatialite.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/libtasn1/recipe.sh b/android/recipes/libtasn1/recipe.sh deleted file mode 100755 index f37777c1..00000000 --- a/android/recipes/libtasn1/recipe.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libtasn1=() - -# default build path -BUILD_libtasn1=$BUILD_PATH/libtasn1/$(get_directory $URL_libtasn1) - -# default recipe path -RECIPE_libtasn1=$RECIPES_PATH/libtasn1 - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libtasn1() { - cd $BUILD_libtasn1 - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_libtasn1" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_libtasn1" - - touch .patched -} - -function shouldbuild_libtasn1() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libtasn1.a -nt $BUILD_libtasn1/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libtasn1() { - push_arm - - try mkdir -p $BUILD_PATH/libtasn1/build-$ARCH - try cd $BUILD_PATH/libtasn1/build-$ARCH - - export CFLAGS="${CFLAGS} -Wno-error=implicit-function-declaration" - - try $BUILD_libtasn1/configure --disable-doc --disable-valgrind-tests --prefix=$STAGE_PATH \ - --host=$TOOLCHAIN_PREFIX \ - --build=x86_64 \ - --disable-shared --disable-gcc-warnings --disable-silent-rules - - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_libtasn1() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libtasn1.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/libtiff/patches/notools.patch b/android/recipes/libtiff/patches/notools.patch deleted file mode 100644 index ff8bb534..00000000 --- a/android/recipes/libtiff/patches/notools.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/CMakeLists.txt 2022-08-03 11:24:47.000000000 +0200 -+++ b/CMakeLists.txt 2022-08-03 11:28:07.000000000 +0200 -@@ -137,12 +137,12 @@ include(Release) - # Process subdirectories - add_subdirectory(port) - add_subdirectory(libtiff) --add_subdirectory(tools) --add_subdirectory(test) -+# add_subdirectory(tools) -+# add_subdirectory(test) - add_subdirectory(contrib) - add_subdirectory(build) --add_subdirectory(man) --add_subdirectory(html) -+# add_subdirectory(man) -+# add_subdirectory(html) - - - message(STATUS "") diff --git a/android/recipes/libtiff/recipe.sh b/android/recipes/libtiff/recipe.sh deleted file mode 100755 index 7f3d314f..00000000 --- a/android/recipes/libtiff/recipe.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - - -# dependencies of this recipe -DEPS_libtiff=(webp libzip jpeg) - - -# default build path -BUILD_libtiff=$BUILD_PATH/libtiff/$(get_directory $URL_libtiff) - -# default recipe path -RECIPE_libtiff=$RECIPES_PATH/libtiff - - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libtiff() { - cd $BUILD_libtiff - - # check marker - if [ -f .patched ]; then - return - fi - - try patch -p1 < $RECIPE_libtiff/patches/notools.patch - - touch .patched -} - -# function called before build_libtiff -# set DO_BUILD=0 if you know that it does not require a rebuild -function shouldbuild_libtiff() { -# If lib is newer than the sourcecode skip build - if [ "${STAGE_PATH}/lib/libtiff.a" -nt $BUILD_libtiff/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libtiff() { - try mkdir -p $BUILD_PATH/libtiff/build-$ARCH - try cd $BUILD_PATH/libtiff/build-$ARCH - - push_arm - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - -DWEBP_SUPPORT=BOOL:ON \ - -DLZMA_SUPPORT=BOOL:OFF \ - -DZSTD_SUPPORT=BOOL:OFF \ - -DZSTD_FOUND=OFF \ - -DLERC_SUPPORT=BOOL:OFF \ - -DJPEG_SUPPORT=BOOL:ON \ - -DZIP_SUPPORT=BOOL:ON \ - -DCMAKE_CXX_FLAGS=-DRENAME_INTERNAL_LIBJPEG_SYMBOLS \ - -DCMAKE_C_FLAGS=-DRENAME_INTERNAL_LIBJPEG_SYMBOLS \ - -DBUILD_DOCS=OFF \ - -DBUILD_CONTRIB=OFF \ - -DBUILD_TESTS=OFF \ - -DCMAKE_DISABLE_FIND_PACKAGE_ZSTD=ON \ - -DJPEG_INCLUDE_DIR=$STAGE_PATH/include \ - -DJPEG_LIBRARY=$STAGE_PATH/lib/libjpeg.a \ - -DANDROID=TRUE \ - $BUILD_libtiff - - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_libtiff() { - if [ ! -f ${STAGE_PATH}/lib/libtiff.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/libzip/recipe.sh b/android/recipes/libzip/recipe.sh deleted file mode 100755 index 4b6ba406..00000000 --- a/android/recipes/libzip/recipe.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libzip=() - -# default build path -BUILD_libzip=$BUILD_PATH/libzip/$(get_directory $URL_libzip) - -# default recipe path -RECIPE_libzip=$RECIPES_PATH/libzip - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libzip() { - cd $BUILD_libzip - - # check marker - if [ -f .patched ]; then - return - fi -} - -function shouldbuild_libzip() { - # If lib is newer than the sourcecode skip build - if [ -f $STAGE_PATH/lib/libzip.a ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libzip() { - try mkdir -p $BUILD_PATH/libzip/build-$ARCH - try cd $BUILD_PATH/libzip/build-$ARCH - push_arm - - # configure - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_TESTS=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_TOOLS=OFF \ - -DBUILD_REGRESS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_DOC=OFF \ - $BUILD_libzip - - # try $MAKESMP - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_libzip() { - if [ ! -f ${STAGE_PATH}/lib/libzip.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/openssl/recipe.sh b/android/recipes/openssl/recipe.sh deleted file mode 100755 index c6f40bfa..00000000 --- a/android/recipes/openssl/recipe.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_openssl=() - -# default build path -BUILD_openssl=$BUILD_PATH/openssl/$(get_directory $URL_openssl) - -# function called for preparing source code if needed -function prebuild_openssl() { - touch .patched -} - -function shouldbuild_openssl() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libssl_3.so -nt $BUILD_openssl/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_openssl() { - cd $BUILD_openssl - try mkdir -p ${STAGE_PATH}/include/openssl - try mkdir -p ${STAGE_PATH}/lib - - try cp ssl_3/include/openssl/* ${STAGE_PATH}/include/openssl/ - try cp ssl_3/${ARCH}/libssl_3.so ${STAGE_PATH}/lib/ - try cp ssl_3/${ARCH}/libcrypto_3.so ${STAGE_PATH}/lib/ -} - -# function called after all the compile have been done -function postbuild_openssl() { - if [ ! -f ${STAGE_PATH}/lib/libssl_3.so ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/postgresql/patches/configure.patch b/android/recipes/postgresql/patches/configure.patch deleted file mode 100644 index e156c20a..00000000 --- a/android/recipes/postgresql/patches/configure.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- a/configure -+++ b/configure -@@ -12906,7 +12906,7 @@ _ACEOF - return 0; - } - _ACEOF --for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do -+for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto_3'; do - if test -z "$ac_lib"; then - ac_res="none required" - else -@@ -13008,13 +13008,13 @@ $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>co - $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h - - if test "$PORTNAME" != "win32"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5 --$as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto_3" >&5 -+$as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto_3... " >&6; } - if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lcrypto $LIBS" -+LIBS="-lcrypto_3 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -13049,19 +13049,19 @@ _ACEOF - #define HAVE_LIBCRYPTO 1 - _ACEOF - -- LIBS="-lcrypto $LIBS" -+ LIBS="-lcrypto_3 $LIBS" - - else - as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5 - fi - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5 --$as_echo_n "checking for SSL_new in -lssl... " >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl_3" >&5 -+$as_echo_n "checking for SSL_new in -lssl_3... " >&6; } - if ${ac_cv_lib_ssl_SSL_new+:} false; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lssl $LIBS" -+LIBS="-lssl_3 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -13096,7 +13096,7 @@ _ACEOF - #define HAVE_LIBSSL 1 - _ACEOF - -- LIBS="-lssl $LIBS" -+ LIBS="-lssl_3 $LIBS" - - else - as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 -@@ -13999,7 +13999,7 @@ fi - fi - - --for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h -+for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" \ No newline at end of file diff --git a/android/recipes/postgresql/recipe.sh b/android/recipes/postgresql/recipe.sh deleted file mode 100755 index 4d7091c9..00000000 --- a/android/recipes/postgresql/recipe.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_postgresql=(iconv openssl) - -# default build path -BUILD_postgresql=$BUILD_PATH/postgresql/$(get_directory $URL_postgresql) - -# default recipe path -RECIPE_postgresql=$RECIPES_PATH/postgresql - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_postgresql() { - cd $BUILD_postgresql - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_postgresql/conftools - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_postgresql/conftools - - try patch -p1 < $RECIPE_postgresql/patches/configure.patch - if [ $ANDROIDAPI -ge 26 ]; then - # remove langinfo.h removal from configure - # nl_langinfo introduced in ANDROIDAPI >= 26 - # https://github.com/KhronosGroup/SPIRV-Cross/issues/891 - echo "check postgresql recipe" - exit 1 - fi - - touch .patched -} - -function shouldbuild_postgresql() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libpq.a -nt $BUILD_postgresql/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_postgresql() { - try mkdir -p $BUILD_PATH/postgresql/build-$ARCH - try cd $BUILD_PATH/postgresql/build-$ARCH - - push_arm - CFLAGS="$CFLAGS -fno-builtin" \ - - USE_DEV_URANDOM=1 \ - try $BUILD_postgresql/configure \ - --prefix=$STAGE_PATH \ - --host=arm-linux-androideabi \ - --build=x86_64 \ - --without-readline \ - --with-openssl \ - --disable-shared - - try $MAKESMP -C src/interfaces/libpq - - #simulate make install - echo "installing libpq" - try cp -v $BUILD_postgresql/src/include/postgres_ext.h $STAGE_PATH/include - try cp -v $BUILD_postgresql/src/interfaces/libpq/libpq-fe.h $STAGE_PATH/include - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/include/pg_config_ext.h $STAGE_PATH/include/ - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/interfaces/libpq/libpq.a $STAGE_PATH/lib/ - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/common/libpgcommon.a $STAGE_PATH/lib/ - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/port/libpgport.a $STAGE_PATH/lib/ - - pop_arm -} - -# function called after all the compile have been done -function postbuild_postgresql() { - if [ ! -f ${STAGE_PATH}/lib/libpq.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/proj/recipe.sh b/android/recipes/proj/recipe.sh deleted file mode 100755 index ac5c6eb9..00000000 --- a/android/recipes/proj/recipe.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_proj=(sqlite3 libtiff) - -# default build path -BUILD_proj=$BUILD_PATH/proj/$(get_directory $URL_proj) - -# default recipe path -RECIPE_proj=$RECIPES_PATH/proj - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_proj() { - cd $BUILD_proj - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_proj() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libproj.a -nt $BUILD_proj/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_proj() { - try mkdir -p $BUILD_PATH/proj/build-$ARCH - try cd $BUILD_PATH/proj/build-$ARCH - - push_arm - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_TESTING=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DEXE_SQLITE3=`which sqlite3` \ - -DSQLITE3_INCLUDE_DIR=$STAGE_PATH/include \ - -DSQLITE3_LIBRARY=$STAGE_PATH/lib/libsqlite3.a \ - -DTIFF_INCLUDE_DIR=$STAGE_PATH/include \ - -DTIFF_LIBRARY=$STAGE_PATH/lib/libtiff.a \ - -DBUILD_APPS=OFF \ - -DENABLE_TIFF=ON \ - -DENABLE_CURL=OFF \ - -DPROJ_CMAKE_SUBDIR=share/cmake/proj4 \ - -DPROJ_DATA_SUBDIR=share/proj \ - -DPROJ_LIB_ENV_VAR_TRIED_LAST=OFF \ - $BUILD_proj - - try $MAKESMP install - pop_arm -} - -# function called after all the compile have been done -function postbuild_proj() { - if [ ! -f ${STAGE_PATH}/lib/libproj.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/protobuf/recipe.sh b/android/recipes/protobuf/recipe.sh deleted file mode 100755 index 2fb4d17d..00000000 --- a/android/recipes/protobuf/recipe.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash - -# dependencies of this recipe -DEPS_protobuf=() - -# default build path -BUILD_protobuf=$BUILD_PATH/protobuf/$(get_directory $URL_protobuf) - -# default recipe path -RECIPE_protobuf=$RECIPES_PATH/protobuf - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_protobuf() { - cd $BUILD_protobuf - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_protobuf() { - if [ -f ${STAGE_PATH}/lib/libprotobuf.a ]; then - DO_BUILD=0 - fi -} - -function build_native_protobuf() { - # also we need to build protobuf native executable, - # since we need to create C++ files - # from .proto files at build time for QGIS - try mkdir -p $BUILD_PATH/protobuf/build-native/ - try cd $BUILD_PATH/protobuf/build-native - - push_native - - try cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -Dprotobuf_BUILD_TESTS=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH=$NATIVE_STAGE_PATH \ - $BUILD_protobuf/cmake - - try make -j$CORES - try make install - - pop_arm -} - -# function called to build the source code -function build_android_protobuf() { - #try rsync -a $BUILD_protobuf/ $BUILD_PATH/protobuf/build-$ARCH/ - try mkdir -p $BUILD_PATH/protobuf/build-$ARCH/ - try cd $BUILD_PATH/protobuf/build-$ARCH - push_arm - - try $CMAKECMD \ - -Dprotobuf_BUILD_TESTS=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - -Dprotobuf_BUILD_PROTOC_BINARIES=OFF \ - $BUILD_protobuf/cmake - - try $MAKESMP libprotobuf - try $MAKESMP libprotobuf-lite - try $MAKE install - - pop_arm -} - -function build_protobuf() { - build_native_protobuf - build_android_protobuf -} - -# function called after all the compile have been done -function postbuild_protobuf() { - if [ ! -f ${STAGE_PATH}/lib/libprotobuf.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/qca/recipe.sh b/android/recipes/qca/recipe.sh deleted file mode 100755 index f7d65c95..00000000 --- a/android/recipes/qca/recipe.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qca=(openssl) - -# default build path -BUILD_qca=$BUILD_PATH/qca/$(get_directory $URL_qca) - -# default recipe path -RECIPE_qca=$RECIPES_PATH/qca - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_qca() { - cd $BUILD_qca - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qca() { - if [ -f $STAGE_PATH/lib/libqca-qt6.a ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_qca() { - try mkdir -p $BUILD_qca/build-$ARCH - try cd $BUILD_qca/build-$ARCH - - push_arm - - # configure - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DQT6=ON \ - -DBUILD_TESTS=OFF \ - -DBUILD_TOOLS=OFF \ - -DWITH_nss_PLUGIN=OFF \ - -DWITH_pkcs11_PLUGIN=OFF \ - -DWITH_gnupg_PLUGIN=OFF \ - -DWITH_gcrypt_PLUGIN=OFF \ - -DWITH_botan_PLUGIN=NO \ - -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE \ - -DLIBRARY_TYPE=STATIC \ - -DBUILD_SHARED_LIBS=OFF \ - $BUILD_qca - - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_qca() { - if [ ! -f $STAGE_PATH/lib/libqca-qt6.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/qgis/recipe.sh b/android/recipes/qgis/recipe.sh deleted file mode 100755 index 28f69fa0..00000000 --- a/android/recipes/qgis/recipe.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qgis=(libtasn1 gdal qca libspatialindex libspatialite expat postgresql libzip qtkeychain exiv2 geodiff protobuf zxing) - -# default build path -BUILD_qgis=$BUILD_PATH/qgis/$(get_directory $URL_qgis) - -# default recipe path -RECIPE_qgis=$RECIPES_PATH/qgis - -function prebuild_qgis() { - cd $BUILD_qgis - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qgis() { - if [ ${STAGE_PATH}/lib/libqgis_core.a -nt $BUILD_qgis/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_qgis() { - try mkdir -p $BUILD_PATH/qgis/build-$ARCH - try cd $BUILD_PATH/qgis/build-$ARCH - - push_arm - - try $CMAKECMD \ - -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=TRUE \ - -DWITH_DESKTOP=OFF \ - -DWITH_EPT=OFF \ - -DWITH_PDAL=OFF \ - -DWITH_COPC=OFF \ - -DWITH_ANALYSIS=OFF \ - -DDISABLE_DEPRECATED=ON \ - -DWITH_QTWEBKIT=OFF \ - -DFORCE_STATIC_LIBS=TRUE \ - -DQT_LRELEASE_EXECUTABLE=`which lrelease` \ - -DFLEX_EXECUTABLE=`which flex` \ - -DBISON_EXECUTABLE=`which bison` \ - -DGDAL_CONFIG=$STAGE_PATH/bin/gdal-config \ - -DGDAL_CONFIG_PREFER_FWTOOLS_PAT=/bin_safe \ - -DGDAL_CONFIG_PREFER_PATH=$STAGE_PATH/bin \ - -DGDAL_INCLUDE_DIR=$STAGE_PATH/include \ - -DGDAL_LIBRARY=$STAGE_PATH/lib/libgdal.a \ - -DGEOS_CONFIG=$STAGE_PATH/bin/geos-config \ - -DGEOS_CONFIG_PREFER_PATH=$STAGE_PATH/bin \ - -DGEOS_INCLUDE_DIR=$STAGE_PATH/include \ - -DGEOS_LIBRARY=$STAGE_PATH/lib/libgeos_c.a \ - -DGEOS_LIB_NAME_WITH_PREFIX=-lgeos_c \ - -DICONV_INCLUDE_DIR=$STAGE_PATH/include \ - -DICONV_LIBRARY=$STAGE_PATH/lib/libiconv.a \ - -DSQLITE3_INCLUDE_DIR=$STAGE_PATH/include \ - -DSQLITE3_LIBRARY=$STAGE_PATH/lib/libsqlite3.a \ - -DPOSTGRES_CONFIG= \ - -DPOSTGRES_CONFIG_PREFER_PATH= \ - -DPOSTGRES_INCLUDE_DIR=$STAGE_PATH/include \ - -DPOSTGRES_LIBRARY=$STAGE_PATH/lib/libpq.a \ - -DPYTHON_EXECUTABLE=`which python3` \ - -DWITH_BINDINGS=OFF \ - -DWITH_GRASS=OFF \ - -DWITH_GEOREFERENCER=OFF \ - -DWITH_QTMOBILITY=OFF \ - -DWITH_QUICK=OFF \ - -DLIBTASN1_INCLUDE_DIR=$STAGE_PATH/include \ - -DLIBTASN1_LIBRARY=$STAGE_PATH/lib/libtasn1.a \ - -DQCA_INCLUDE_DIR=$STAGE_PATH/include/Qca-qt6/QtCrypto \ - -DQCA_LIBRARY=$STAGE_PATH/lib/libqca-qt6.a \ - -DQTKEYCHAIN_INCLUDE_DIR=$STAGE_PATH/include/qt6keychain \ - -DQTKEYCHAIN_LIBRARY=$STAGE_PATH/lib/libqt6keychain.a \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_WITH_QT6=ON \ - -DENABLE_TESTS=OFF \ - -DEXPAT_INCLUDE_DIR=$STAGE_PATH/include \ - -DEXPAT_LIBRARY=$STAGE_PATH/lib/libexpat.a \ - -DWITH_INTERNAL_QWTPOLAR=OFF \ - -DWITH_QWTPOLAR=OFF \ - -DWITH_GUI=OFF \ - -DSPATIALINDEX_LIBRARY=$STAGE_PATH/lib/libspatialindex.a \ - -DWITH_APIDOC=OFF \ - -DWITH_ASTYLE=OFF \ - -DWITH_QUICK=OFF \ - -DWITH_QTSERIALPORT=OFF \ - -DWITH_QT5SERIALPORT=OFF \ - -DWITH_3D=OFF \ - -DNATIVE_CRSSYNC_BIN=/usr/bin/true \ - -DWITH_QGIS_PROCESS=OFF \ - -DProtobuf_PROTOC_EXECUTABLE:FILEPATH=$NATIVE_STAGE_PATH/bin/protoc \ - -DProtobuf_INCLUDE_DIRS:PATH=$STAGE_PATH/include \ - -DProtobuf_LIBRARY=$STAGE_PATH/lib/libprotobuf.a \ - -DProtobuf_LITE_LIBRARY=$STAGE_PATH/lib/libprotobuf-lite.a \ - -DProtobuf_PROTOC_LIBRARY=$STAGE_PATH/lib/libprotoc.a \ - -DWITH_QSPATIALITE=OFF \ - $BUILD_qgis - - try $MAKESMP VERBOSE=1 - try $MAKESMP install - pop_arm - - # bundle QGIS's find packages too - try mkdir -p $STAGE_PATH/cmake/ - try cp -Rf $BUILD_qgis/cmake/* $STAGE_PATH/cmake/ -} - -# function called after all the compile have been done -function postbuild_qgis() { - if [ ! -f ${STAGE_PATH}/lib/libqgis_core.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/qtkeychain/recipe.sh b/android/recipes/qtkeychain/recipe.sh deleted file mode 100755 index 572df126..00000000 --- a/android/recipes/qtkeychain/recipe.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qtkeychain=() - -# default build path -BUILD_qtkeychain=$BUILD_PATH/qtkeychain/$(get_directory $URL_qtkeychain) - -# default recipe path -RECIPE_qtkeychain=$RECIPES_PATH/qtkeychain - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_qtkeychain() { - cd $BUILD_qtkeychain - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qtkeychain() { - if [ -f $STAGE_PATH/lib/libqt6keychain.a ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_qtkeychain() { - try mkdir -p $BUILD_qtkeychain/build-$ARCH - try cd $BUILD_qtkeychain/build-$ARCH - - push_arm - - # configure - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_WITH_QT6=ON \ - -DBUILD_TEST_APPLICATION=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_TOOLS=OFF \ - -DWITH_nss_PLUGIN=OFF \ - -DWITH_pkcs11_PLUGIN=OFF \ - -DANDROID=TRUE \ - $BUILD_qtkeychain - - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_qtkeychain() { - if [ ! -f $STAGE_PATH/lib/libqt6keychain.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/sqlite3/recipe.sh b/android/recipes/sqlite3/recipe.sh deleted file mode 100755 index e904a426..00000000 --- a/android/recipes/sqlite3/recipe.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_sqlite3=(openssl) - -# default build path -BUILD_sqlite3=$BUILD_PATH/sqlite3/sqlite-autoconf-$URL_sqlite3_BASE - -# default recipe path -RECIPE_sqlite3=$RECIPES_PATH/sqlite3 - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_sqlite3() { - cd $BUILD_sqlite3 - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_sqlite3 - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_sqlite3 - - touch .patched -} - -function shouldbuild_sqlite3() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libsqlite3.a -nt $BUILD_sqlite3/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_sqlite3() { - try mkdir -p $BUILD_PATH/sqlite3/build-$ARCH - try cd $BUILD_PATH/sqlite3/build-$ARCH - - push_arm - - export CFLAGS="${CFLAGS} -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK" - export CFLAGS="${CFLAGS} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_MAX_VARIABLE_NUMBER=250000 -DSQLITE_ENABLE_FTS3=1" - export CFLAGS="${CFLAGS} -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_JSON1=1" - - try $BUILD_sqlite3/configure \ - --prefix=$STAGE_PATH \ - --host=$TOOLCHAIN_PREFIX \ - --build=x86_64 \ - --disable-shared \ - --enable-static - - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_sqlite3() { - if [ ! -f $STAGE_PATH/lib/libsqlite3.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/webp/recipe.sh b/android/recipes/webp/recipe.sh deleted file mode 100755 index 7e82ebde..00000000 --- a/android/recipes/webp/recipe.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_webp=() - -# default build path -BUILD_webp=$BUILD_PATH/webp/$(get_directory $URL_webp) - -# default recipe path -RECIPE_webp=$RECIPES_PATH/webp - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_webp() { - cd $BUILD_webp - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_webp() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libwebp.a -nt $BUILD_webp/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_webp() { - try mkdir -p $BUILD_PATH/webp/build-$ARCH - try cd $BUILD_PATH/webp/build-$ARCH - push_arm - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - -DWEBP_BUILD_GIF2WEBP=OFF \ - -DCMAKE_DISABLE_FIND_PACKAGE_GIF=TRUE \ - -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=TRUE \ - -DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE \ - -DCMAKE_DISABLE_FIND_PACKAGE_TIFF=TRUE \ - -DWEBP_BUILD_EXTRAS=FALSE \ - -DWEBP_BUILD_ANIM_UTILS=FALSE \ - -DWEBP_BUILD_CWEBP=FALSE \ - -DWEBP_BUILD_DWEBP=FALSE \ - -DWEBP_BUILD_GIF2WEBP=FALSE \ - -DWEBP_BUILD_IMG2WEBP=FALSE \ - -DWEBP_BUILD_VWEBP=FALSE \ - -DWEBP_BUILD_WEBPINFO=FALSE \ - -DWEBP_BUILD_WEBPMUX=FALSE \ - $BUILD_webp - - try $MAKESMP - try $MAKESMP install - pop_arm -} - -# function called after all the compile have been done -function postbuild_webp() { - if [ ! -f $STAGE_PATH/lib/libwebp.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/recipes/zxing/recipe.sh b/android/recipes/zxing/recipe.sh deleted file mode 100755 index 990072e6..00000000 --- a/android/recipes/zxing/recipe.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_zxing=() - -# default build path -BUILD_zxing=$BUILD_PATH/zxing/$(get_directory $URL_zxing) - -# default recipe path -RECIPE_zxing=$RECIPES_PATH/zxing - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_zxing() { - cd $BUILD_zxing - - # check marker - if [ -f .patched ]; then - return - fi -} - -function shouldbuild_zxing() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libZXing.a -nt $BUILD_zxing/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_zxing() { - try mkdir -p $BUILD_PATH/zxing/build-$ARCH - try cd $BUILD_PATH/zxing/build-$ARCH - push_arm - - # configure - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_BLACKBOX_TESTS=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_UNIT_TESTS=OFF \ - $BUILD_zxing - - try $MAKESMP - try $MAKE install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_zxing() { - if [ ! -f $STAGE_PATH/lib/libZXing.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/android/tools/depscan b/android/tools/depscan deleted file mode 100755 index 117b9978..00000000 --- a/android/tools/depscan +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function -import os -import sys -import subprocess -import re - -re_needso = re.compile(r'^.*\(NEEDED\)\s+Shared library: \[lib(.*)\.so\]\s*$') - -blacklist_libs = ( - 'c', - 'stdc++', - 'gnustl_shared', - 'dl', - 'python2.7', - 'sdl', - 'sdl_image', - 'sdl_ttf', - 'z', - 'm', - 'GLESv2', - 'jpeg', - 'png', - 'log', - 'Qt5PrintSupport', - 'Qt5Svg', - 'Qt5OpenGL', - 'Qt5Gui', - 'Qt5Widgets', - 'Qt5Core', - 'Qt5Concurrent', - 'Qt5Sql', - 'Qt5Xml', - 'Qt5Network', - 'Qt5Positioning', -) - -scanned_libs={} - -def scan_lib(sofile): - needed_libs = [] - print('Scanning ' + sofile) - fn = os.path.join(sys.argv[2], 'lib' + sofile + '.so') - out = subprocess.check_output([os.environ['READELF'], '-d', fn]) - for line in out.splitlines(): - needso = re_needso.match(line) - if needso: - lib = needso.group(1) - if lib in blacklist_libs: - continue - print(' * ' + lib) - needed_libs.append(lib) - - for lib in needed_libs: - if lib not in scanned_libs: - scan_lib(lib) - scanned_libs[lib]=1 - else: - scanned_libs[lib]+=1 - -scan_lib(sys.argv[1]) -print(' ***** FINAL RESULT ***** ') - -print('{:<15} {:<3}'.format('Lib','Count')) -for k, v in scanned_libs.iteritems(): - print("{:<15} {:<3}".format(k, v)) diff --git a/android/tools/depsort.py b/android/tools/depsort.py deleted file mode 100755 index 5149d280..00000000 --- a/android/tools/depsort.py +++ /dev/null @@ -1,199 +0,0 @@ -#! /usr/bin/env python2 - -import argparse -import sys - -class Graph(object): - def __init__(self): - # `graph`: dict that maps each package to a set of its dependencies. - self.graph = {} - - def add(self, dependent, dependency): - """Add a dependency relationship to the graph""" - self.graph.setdefault(dependent, set()) - self.graph.setdefault(dependency, set()) - if dependent != dependency: - self.graph[dependent].add(dependency) - - def add_optional(self, dependent, dependency): - """Add an optional (ordering only) dependency relationship to the graph - - Only call this after all mandatory requirements are added - """ - if dependent in self.graph and dependency in self.graph: - self.add(dependent, dependency) - - def find_order(self): - """Do a topological sort on a dependency graph - - :Parameters: - :Returns: - iterator, sorted items form first to last - """ - graph = dict((k, set(v)) for k, v in list(self.graph.items())) - while graph: - # Find all items without a parent - leftmost = [l for l, s in list(graph.items()) if not s] - if not leftmost: - raise ValueError('Dependency cycle detected! %s' % graph) - # If there is more than one, sort them for predictable order - leftmost.sort() - for result in leftmost: - # Yield and remove them from the graph - yield result - graph.pop(result) - for bset in list(graph.values()): - bset.discard(result) - - -def lines_to_relationships(lines): - """Do a topological sort from a list of space-separated lines - - :Parameters: - `lines`: Iterable of lines in the format - "dependent dependency_0 dependency_1 ... dependency_n" - - :Returns: - iterator of (dependent, dependency) tuples - """ - for line in lines: - line = line.split() - if line: - dependent = line[0] - for dependency in line: - yield dependent, dependency - - -def topo_sort_lines(lines, lines_optional=()): - """Do a topological sort from a list of space-separated lines - - :Parameters: - `lines`: Iterable of lines in the format - "dependent dependency_0 dependency_1 ... dependency_n" - - `lines`: Iterable of lines with *optional* (ordering-only) dependencies - "dependent dependency_0 dependency_1 ... dependency_n" - - :Returns: - string, Sorted dependencies, space-separated - """ - graph = Graph() - for dependent, dependency in lines_to_relationships(lines): - graph.add(dependent, dependency) - for dependent, dependency in lines_to_relationships(lines_optional): - graph.add_optional(dependent, dependency) - return ' '.join(graph.find_order()) - - -def test_depsort_1(): - lines = [ - 'c a', - 'b c', - 'd b', - 'w z', - 'a w', - ] - assert topo_sort_lines(lines) == 'z w a c b d' - - -def test_depsort_2(): - lines = [ - 'l k', - 'm l', - 'a k', - 'd a', - 'l d', - 's l', - 'm s', - ] - assert topo_sort_lines(lines) == 'k a d l s m' - - -def test_depsort_3(): - lines = [ - 'z a', - 's z', - 'z z', - 's s', - ] - assert topo_sort_lines(lines) == 'a z s' - - -def test_depsort_4(): - lines = [ - 'f d', - 'g f', - 'r f', - 't r', - 'y t', - 'g y', - ] - assert topo_sort_lines(lines) == 'd f r t y g' - - -def test_depsort_5(): - lines = [ - 'a b c d e f', - 'e f', - 'g', - ] - assert topo_sort_lines(lines) == 'b c d f g e a' - - -def test_depsort_6(): - lines = [ - ' numpy python ', - ' kivy pygame pyjnius android ', - ' python hostpython ', - ' pygame sdl ', - ' android pygame ', - ' pyjnius python ', - ' sdl python ', - ' hostpython ', - ] - assert topo_sort_lines(lines) == ( - 'hostpython python numpy pyjnius sdl pygame android kivy') - - -def test_depsort_optional_1(): - lines = [' myapp openssl python '] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'openssl python myapp' - - -def test_depsort_optional_2(): - lines = [' myapp openssl python '] - # Just for testing purposes, make openssl soft-depend on python - optional = ['openssl python'] - assert topo_sort_lines(lines, optional) == 'python openssl myapp' - - -def test_depsort_optional_3(): - lines = ['myapp openssl'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'openssl myapp' - - -def test_depsort_optional_4(): - lines = ['myapp python'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'python myapp' - - -def test_depsort_optional_4(): - lines = ['myapp'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'myapp' - - -def main(argv): - parser = argparse.ArgumentParser( - description="Sort dependencies given on standard input") - parser.add_argument('--optional', type=argparse.FileType('r'), - help='File with optional (ordering-only) dependencies') - args = parser.parse_args(argv[1:]) - return topo_sort_lines(sys.stdin, lines_optional=args.optional or []) - - -if __name__ == '__main__': - print(main(sys.argv)) diff --git a/ios/config.conf.default b/ios/config.conf.default deleted file mode 100644 index fd50a4dd..00000000 --- a/ios/config.conf.default +++ /dev/null @@ -1,26 +0,0 @@ -export QT_VERSION=6.5.2 - -export ROOT_OUT_PATH=/opt/INPUT/input-sdk-ios-DEV - -### SDK ##### -export IOS_MIN_SDK_VERSION="14.0" -export MACOSX_DEPLOYMENT_TARGET="14.0" - -#### PATHS #### -export QT_BASE="/opt/Qt/$QT_VERSION" - -# you need to use recent flex and bison -# so you can install them with homebrew or qgis_deps -# and uncomment the line below -# export PATH=":${PATH}" - -### LOCAL QGIS ### -# export O4iOS_qgis_DIR="/Users//Projects/QGIS" - -### BUILD ### -export ARCHES=("arm64") -# export ARCHES=("i386 x86_64 armv7 arm64") - -# By default all cores will be used to build -# Use this option to override -# export CORES=4 diff --git a/ios/distribute.sh b/ios/distribute.sh deleted file mode 100755 index 4994ba62..00000000 --- a/ios/distribute.sh +++ /dev/null @@ -1,803 +0,0 @@ -#!/bin/bash - -# Well, build tools are available only on MacOS -if [[ "$OSTYPE" == "darwin"* ]]; then - echo "Building iOSGeo for iOS" -else - echo "Unable to build iOS binaries on $OSTYPE" - exit 1; -fi - -XCODE_DEVELOPER="$(xcode-select -print-path)" -CORES=$(sysctl -n hw.ncpu) - -# Load configuration -if [ "X$IOS_CONFIG" == "X" ]; then - source `dirname $0`/config.conf -else - source `dirname $0`/$IOS_CONFIG -fi -source `dirname $0`/../versions.conf - -if [ "X$ROOT_OUT_PATH" == "X" ]; then - error "you need ROOT_OUT_PATH argument in config.conf" -fi - -if [ "X$QT_VERSION" == "X" ]; then - error "you need QT_VERSION argument in config.conf" -fi - -if [ ! -f "$QT_BASE/ios/bin/qmake" ]; then - echo "$QT_BASE/ios/bin/qmake does not exist" - exit 1 -fi - -if [ ! -f "$QT_BASE/macos/bin/qmake" ]; then - echo "$QT_BASE/macos/bin/qmake does not exist. Host QT required too!" - exit 1 -fi - - -# Paths -ROOT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -STAGE_PATH="${ROOT_OUT_PATH}/stage/$ARCH" -NATIVE_STAGE_PATH="${ROOT_OUT_PATH}/stage/native" -RECIPES_PATH="$ROOT_PATH/recipes" -BUILD_PATH="${ROOT_OUT_PATH}/build" -LIBS_PATH="${ROOT_OUT_PATH}/build/libs" -PACKAGES_PATH="${PACKAGES_PATH:-$ROOT_OUT_PATH/.packages}" - -MD5SUM=$(which md5sum) -if [ "X$MD5SUM" == "X" ]; then - MD5SUM=$(which md5) - if [ "X$MD5SUM" == "X" ]; then - echo "Error: you need at least md5sum or md5 installed." - exit 1 - else - MD5SUM="$MD5SUM -r" - fi -fi - -WGET=$(which wget) -if [ "X$WGET" == "X" ]; then - WGET=$(which curl) - if [ "X$WGET" == "X" ]; then - echo "Error: you need at least wget or curl installed." - exit 1 - else - WGET="$WGET -L -o" - fi - WHEAD="curl -L -I" -else - WGET="$WGET -O" - WHEAD="wget --spider -q -S" -fi - -SED="sed -i ''" - -AUTORECONF=$(which autoreconf) -if [ "X$AUTORECONF" == "X" ]; then - echo "Error: you need autoreconf installed (brew install automake)." - exit 1 -fi - -# Internals -CRED="\x1b[31;01m" -CBLUE="\x1b[34;01m" -CGRAY="\x1b[30;01m" -CRESET="\x1b[39;49;00m" -DO_CLEAN_BUILD=0 -DO_SET_X=0 -DEBUG=0 - -function fold_push() { - echo "::group::${1}" -} - -function fold_pop() { - echo "::endgroup::" -} - -function try () { - "$@" || exit -1 -} - -function info() { - echo -e "$CBLUE"$@"$CRESET"; -} - -function error() { - echo -e "$CRED"$@"$CRESET"; -} - -function debug() { - echo -e "$CGRAY"$@"$CRESET"; -} - -function get_directory() { - case $1 in - *.tar.gz) directory=$(basename $1 .tar.gz) ;; - *.tgz) directory=$(basename $1 .tgz) ;; - *.tar.bz2) directory=$(basename $1 .tar.bz2) ;; - *.tbz2) directory=$(basename $1 .tbz2) ;; - *.zip) directory=$(basename $1 .zip) ;; - *) - error "Unknown file extension $1" - exit -1 - ;; - esac - echo $directory -} - -function push_native() { - info "Entering NATIVE environment" - - # save for pop - export OLD_PATH=$PATH - export OLD_CFLAGS=$CFLAGS - export OLD_CXXFLAGS=$CXXFLAGS - export OLD_LDFLAGS=$LDFLAGS - export OLD_CC=$CC - export OLD_CXX=$CXX - export OLD_AR=$AR - export OLD_RANLIB=$RANLIB - export OLD_STRIP=$STRIP - export OLD_MAKE=$MAKE - export OLD_LD=$LD - export OLD_CMAKECMD=$CMAKECMD - export OLD_TOOLCHAIN_PREFIX=$TOOLCHAIN_PREFIX - - unset CC - unset CXX - unset CPP - unset LD - unset CFLAGS - unset CXXFLAGS - unset CPPFLAGS - unset LDFLAGS - unset RANLIB - unset QT_ARCH_PREFIX - export PATH=$OLD_PATH - unset AR - unset RANLIB - unset STRIP - unset CMAKECMD - unset MAKE - unset MAKESMP -} - -function push_arm() { - info "Entering in ${ARCH} environment" - - # save for pop - export OLD_PATH=$PATH - export OLD_CFLAGS=$CFLAGS - export OLD_CXXFLAGS=$CXXFLAGS - export OLD_LDFLAGS=$LDFLAGS - export OLD_CC=$CC - export OLD_CXX=$CXX - export OLD_MAKESMP=$MAKESMP - export OLD_MAKE=$MAKE - export OLD_LD=$LD - export OLD_PLATFORM=$PLATFORM - export OLD_SYSROOT=$SYSROOT - export OLD_TOOLCHAIN_PREFIX=$TOOLCHAIN_PREFIX - export OLD_CMAKECMD=$CMAKECMD - - if [ "$ARCH" == "i386" ] || [ "$ARCH" == "x86_64" ]; then - SDK="iphonesimulator" - if [ "$ARCH" == "x86_64" ]; then - TARGET="darwin64-x86_64-cc" - PLATFORM="SIMULATOR64" - else - TARGET="darwin-i386-cc" - PLATFORM="SIMULATOR" - fi - VERSION_MIN="-mios-simulator-version-min=${IOS_MIN_SDK_VERSION}" - echo "TODO: not tested!" - exit 1 - else - SDK="iphoneos" - PLATFORM="OS" - TARGET="iphoneos-cross" - VERSION_MIN="-miphoneos-version-min=${IOS_MIN_SDK_VERSION}" - VERSION_MIN="-miphoneos-version-min=${IOS_MIN_SDK_VERSION}" - fi - - export QT_PATH="$QT_BASE/ios" - export QT_HOST_PATH="$QT_BASE/macos" - - if [ ! -d "$QT_PATH" ]; then - echo "Error: QT_PATH $QT_PATH missing" - exit 1 - fi - - if [ ! -d "$QT_HOST_PATH" ]; then - echo "Error: QT_HOST_PATH $QT_HOST_PATH missing" - exit 1 - fi - - # Test QT libraries are compiled for this architecture - QT_ARCHS=`lipo -archs ${QT_PATH}/lib/libQt6Core.a` - if [[ $QT_ARCHS != *"$ARCH"* ]]; then - error "${QT_PATH}/lib/libQt6Core.a is available only for $QT_ARCHS, not $ARCH" - exit 1; - fi - - export PLATFORM=${PLATFORM} - export SYSROOT="$(xcrun --sdk $SDK --show-sdk-path)" - if [ ! -d $SYSROOT ]; then - error "unable to locate SDK $SDK" - exit 1; - fi - - # http://clang.llvm.org/docs/CrossCompilation.html#target-triple - # --- - if [ "${ARCH}" == "arm64" ];then - export TOOLCHAIN_PREFIX=aarch64-apple-darwin - else - export TOOLCHAIN_PREFIX=$ARCH-apple-darwin - fi - - CMAKE_TOOLCHAIN_FILE=$ROOT_PATH/tools/ios.toolchain.cmake - export CFLAGS="$CFLAGS -fobjc-nonfragile-abi -fobjc-legacy-dispatch -fPIC -arch ${ARCH} -isysroot $SYSROOT" - # TODO QtCrypto to QGIS, libxml2 to ? - export CFLAGS="${CFLAGS} -I$STAGE_PATH/include -I$SYSROOT/usr/include/libxml2 $VERSION_MIN" - export LDFLAGS="-arch ${ARCH} -isysroot $SYSROOT -L$STAGE_PATH/lib $VERSION_MIN" - export CXXFLAGS="${CFLAGS}" - export PATH="$SYSROOT/usr/bin:$QT_PATH/bin:${XCODE_DEVELOPER}/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH:/usr/bin" - - # make sure CFLAGS CPPFLAGS are in match with CMAKE settings from toolchain file - CMAKECMD="cmake" - if [ $DEBUG -eq 1 ]; then - CMAKECMD="${CMAKECMD} -DCMAKE_BUILD_TYPE=RelWithDebInfo" - else - CMAKECMD="${CMAKECMD} -DCMAKE_BUILD_TYPE=Release" - fi - CMAKECMD="${CMAKECMD} -DENABLE_VISIBILITY=0 -DARCHS=${ARCH} -DPLATFORM=${PLATFORM}" - CMAKECMD="${CMAKECMD} -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH" - CMAKECMD="${CMAKECMD} -DDEPLOYMENT_TARGET=${IOS_MIN_SDK_VERSION} -DQT_PATH=$QT_PATH -DQT_HOST_PATH=$QT_HOST_PATH" - CMAKECMD="$CMAKECMD -DCMAKE_PREFIX_PATH:PATH=$QT_PATH;$BUILD_PATH;$STAGE_PATH" - - # Looks like iOS doesn't have these, but requires them for Qt6::Core - CMAKECMD="$CMAKECMD -DQt6CoreTools_DIR:PATH=$QT_HOST_PATH/lib/cmake/Qt6CoreTools" - CMAKECMD="$CMAKECMD -DQt6LinguistTools_DIR:PATH=$QT_HOST_PATH/lib/cmake/Qt6LinguistTools" - CMAKECMD="$CMAKECMD -DQt6WidgetsTools_DIR:PATH=$QT_HOST_PATH/lib/cmake/Qt6WidgetsTools" - CMAKECMD="$CMAKECMD -DQt6GuiTools_DIR:PATH=$QT_HOST_PATH/lib/cmake/Qt6GuiTools" - - if false; then - CMAKECMD="${CMAKECMD} -DENABLE_BITCODE=1" - CFLAGS="${CFLAGS} -fembed-bitcode" - else - CMAKECMD="${CMAKECMD} -DENABLE_BITCODE=0" - CFLAGS="${CFLAGS} -headerpad_max_install_names" - fi - - if true; then - CMAKECMD="${CMAKECMD} -DENABLE_ARC=0" - CFLAGS="${CFLAGS} -fno-objc-arc" - else - CMAKECMD="${CMAKECMD} -DENABLE_ARC=1" - CFLAGS="${CFLAGS} -fobjc-arc" - fi - - export CC="/usr/bin/clang" - export CXX="/usr/bin/clang++" - export LD="/usr/bin/ld" - export MAKESMP="/usr/bin/make -j$CORES" - export MAKE="/usr/bin/make" - export CFLAGS=$CFLAGS - export CXXFLAGS="$CXXFLAGS" - - # CMAKECMD="${CMAKECMD} -DCMAKE_C_COMPILER=${CC}" - # CMAKECMD="${CMAKECMD} -DCMAKE_CXX_COMPILER=${CXX}" - - export CMAKECMD=$CMAKECMD - -} - -function pop_arm() { - info "Leaving ${ARCH} environment" - export PATH=$OLD_PATH - export CFLAGS=$OLD_CFLAGS - export CXXFLAGS=$OLD_CXXFLAGS - export LDFLAGS=$OLD_LDFLAGS - export CC=$OLD_CC - export CXX=$OLD_CXX - export MAKESMP=$OLD_MAKESMP - export MAKE=$OLD_MAKE - export LD=$OLD_LD - export PLATFORM=$OLD_PLATFORM - export SYSROOT=$OLD_SYSROOT - export TOOLCHAIN_PREFIX=$OLD_TOOLCHAIN_PREFIX - export CMAKECMD=$OLD_CMAKECMD -} - -function usage() { - echo "iOSGeo - distribute.sh" - echo - echo "Usage: ./distribute.sh [options]" - echo - echo " -h Show this help" - echo " -l Show a list of available modules" - echo " -m 'mod1 mod2' Modules to include" - echo " -f Restart from scratch (remove the current build)" - echo " -x display expanded values (execute 'set -x')" - echo - echo "For developers:" - echo " -u 'mod1 mod2' Modules to update (if already compiled)" - echo - exit 0 -} - -function run_prepare() { - info "Check environment" - if [ "X$QT_BASE" == "X" ]; then - error "No QT_BASE environment set, abort" - exit -1 - fi - - if [ "X$IOS_MIN_SDK_VERSION" == "X" ]; then - error "No IOS_MIN_SDK_VERSION environment set, abort" - exit -1 - fi - - if [ "X$MODULES" == "X" ]; then - usage - exit 0 - fi - - - info "QT located at $QT_BASE" - info "IOS MIN SDK version is $IOS_MIN_SDK_VERSION" - if [ "X$ARCH" == "Xi386" ] || [ "X$ARCH" == "Xx86_64" ]; then - info "Building for iOSSimulator" - else - info "Building for iOS" - fi - - info "Check mandatory tools" - # ensure that some tools are existing - for tool in tar bzip2 unzip; do - which $tool &>/dev/null - if [ $? -ne 0 ]; then - error "Tool $tool is missing" - exit -1 - fi - done - - if [ $DO_CLEAN_BUILD -eq 1 ]; then - info "Cleaning build" - try rm -rf $STAGE_PATH - try rm -rf $BUILD_PATH - try rm -rf $NATIVE_STAGE_PATH - fi - - info "Distribution will be located at $STAGE_PATH" - if [ -e "$STAGE_PATH" ]; then - info "The directory $STAGE_PATH already exist" - info "Will continue using and possibly overwrite what is in there" - fi - try mkdir -p "$STAGE_PATH" - - # create build directory if not found - test -d $PACKAGES_PATH || mkdir -p $PACKAGES_PATH - test -d $BUILD_PATH || mkdir -p $BUILD_PATH - test -d $LIBS_PATH || mkdir -p $LIBS_PATH - test -d $NATIVE_STAGE_PATH || mkdir -p $NATIVE_STAGE_PATH - - - # check arm env - push_arm - - # copy the build tools - mkdir -p $STAGE_PATH/tools - cp $ROOT_PATH/tools/ios.toolchain.cmake $STAGE_PATH/tools/ - - pop_arm -} - -function in_array() { - term="$1" - shift - i=0 - for key in $@; do - if [ $term == $key ]; then - return $i - fi - i=$(($i + 1)) - done - return 255 -} - -function run_source_modules() { - # preprocess version modules - needed=($MODULES) - while [ ${#needed[*]} -ne 0 ]; do - - # pop module from the needed list - module=${needed[0]} - unset needed[0] - needed=( ${needed[@]} ) - - # is a version is specified ? - items=( ${module//==/ } ) - module=${items[0]} - version=${items[1]} - if [ ! -z "$version" ]; then - info "Specific version detected for $module: $version" - eval "VERSION_$module=$version" - fi - done - - - needed=($MODULES) - declare -a processed - declare -a pymodules - processed=() - - fn_deps='.deps' - fn_optional_deps='.optional-deps' - - > $fn_deps - > $fn_optional_deps - - while [ ${#needed[*]} -ne 0 ]; do - - # pop module from the needed list - module=${needed[0]} - original_module=${needed[0]} - unset needed[0] - needed=( ${needed[@]} ) - - # split the version if exist - items=( ${module//==/ } ) - module=${items[0]} - version=${items[1]} - - # check if the module have already been declared - in_array $module "${processed[@]}" - if [ $? -ne 255 ]; then - debug "Ignored $module, already processed" - continue; - fi - - # add this module as done - processed=( ${processed[@]} $module ) - - # read recipe - debug "Read $module recipe" - recipe=$RECIPES_PATH/$module/recipe.sh - if [ ! -f $recipe ]; then - error "Recipe $module does not exist, adding the module as pure-python package" - pymodules+=($original_module) - continue; - fi - source $RECIPES_PATH/$module/recipe.sh - - # if a version has been specified by the user, the md5 will not - # correspond at all. so deactivate it. - if [ ! -z "$version" ]; then - debug "Deactivate MD5 test for $module, due to specific version" - eval "MD5_$module=" - fi - - # append current module deps to the needed - deps=$(echo \$"{DEPS_$module[@]}") - eval deps=($deps) - optional_deps=$(echo \$"{DEPS_OPTIONAL_$module[@]}") - eval optional_deps=($optional_deps) - if [ ${#deps[*]} -gt 0 ]; then - debug "Module $module depend on" ${deps[@]} - needed=( ${needed[@]} ${deps[@]} ) - echo $module ${deps[@]} >> $fn_deps - else - echo $module >> $fn_deps - fi - if [ ${#optional_deps[*]} -gt 0 ]; then - echo $module ${optional_deps[@]} >> $fn_optional_deps - fi - done - - info `pwd` - MODULES="$($PYTHON tools/depsort.py --optional $fn_optional_deps < $fn_deps)" - - info "Modules changed to $MODULES" - - PYMODULES="${pymodules[@]}" - - info "Pure-Python modules changed to $PYMODULES" -} - -function run_get_packages() { - info "Run get packages" - - if [ ! -f "$ROOT_OUT_PATH/.packages/config.sub" ]; then - $WGET $ROOT_OUT_PATH/.packages/config.sub "http://git.savannah.gnu.org/cgit/config.git/plain/config.sub" - $WGET $ROOT_OUT_PATH/.packages/config.guess "http://git.savannah.gnu.org/cgit/config.git/plain/config.guess" - fi - - for module in $MODULES; do - # download dependencies for this module - # check if there is not an overload from environment - module_dir=$(eval "echo \$O4iOS_${module}_DIR") - if [ "$module_dir" ] - then - debug "\$O4iOS_${module}_DIR is not empty, linking $module_dir dir instead of downloading" - directory=$(eval "echo \$BUILD_${module}") - if [ -e $directory ]; then - try rm -rf "$directory" - fi - try mkdir -p "$directory" - try rmdir "$directory" - try ln -s "$module_dir" "$directory" - continue - fi - debug "Download package for $module" - fold_push "download ${module}" - - url="URL_$module" - url=${!url} - md5="MD5_$module" - md5=${!md5} - - if [ ! -d "$BUILD_PATH/$module" ]; then - try mkdir -p $BUILD_PATH/$module - fi - - if [ ! -d "$PACKAGES_PATH/$module" ]; then - try mkdir -p "$PACKAGES_PATH/$module" - fi - - if [ "X$url" == "X" ]; then - debug "No package for $module" - continue - fi - - filename=${url//?dl=1/} - filename=${filename//\/download/} - filename=$(basename $filename) - marker_filename=".mark-$filename" - do_download=1 - - cd "$PACKAGES_PATH/$module" - - # check if the file is already present - if [ -f $filename ]; then - # if the marker has not been set, it might be cause of a invalid download. - if [ ! -f $marker_filename ]; then - rm $filename - elif [ -n "$md5" ]; then - # check if the md5 is correct - current_md5=$($MD5SUM $filename | cut -d\ -f1) - if [ "X$current_md5" == "X$md5" ]; then - # correct, no need to download - do_download=0 - else - # invalid download, remove the file - error "Module $module have invalid md5, redownload." - rm $filename - fi - else - do_download=0 - fi - fi - - # check if the file HEAD in case of, only if there is no MD5 to check. - check_headers=0 - if [ -z "$md5" ]; then - if [ "X$DO_CLEAN_BUILD" == "X1" ]; then - check_headers=1 - elif [ ! -f $filename ]; then - check_headers=1 - fi - fi - - if [ "X$check_headers" == "X1" ]; then - debug "Checking if $url changed" - $WHEAD $url &> .headers-$filename - $PYTHON "$ROOT_PATH/tools/check_headers.py" .headers-$filename .sig-$filename - if [ $? -ne 0 ]; then - do_download=1 - fi - fi - - # download if needed - if [ $do_download -eq 1 ]; then - info "Downloading $url" - try rm -f $marker_filename - try $WGET $filename $url - touch $marker_filename - else - debug "Module $module already downloaded" - fi - - # check md5 - if [ -n "$md5" ]; then - current_md5=$($MD5SUM $filename | cut -d\ -f1) - if [ "X$current_md5" != "X$md5" ]; then - error "File $filename md5 check failed (got $current_md5 instead of $md5)." - error "Ensure the file is correctly downloaded, and update MD5S_$module" - exit -1 - fi - fi - - # if already decompress, forget it - cd $BUILD_PATH/$module - directory=$(get_directory $filename) - if [ -d "$directory" ]; then - continue - fi - - # decompress - pfilename=$PACKAGES_PATH/$module/$filename - info "Extract $pfilename" - case $pfilename in - *.tar.gz|*.tgz ) - try tar xzf $pfilename - root_directory=$(basename $(try tar tzf $pfilename|head -n1)) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - *.tar.bz2|*.tbz2 ) - try tar xjf $pfilename - root_directory=$(basename $(try tar tjf $pfilename|head -n1)) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - *.zip ) - try unzip $pfilename - root_directory=$(basename $(try unzip -l $pfilename|sed -n 5p|awk '{print $4}')) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - esac - fold_pop - done -} - -function run_prebuild() { - info "Run prebuild" - cd $BUILD_PATH - for module in $MODULES; do - fn=$(echo prebuild_$module) - debug "Call $fn" - $fn - done -} - -function run_build() { - info "Run build" - - modules_update=($MODULES_UPDATE) - - cd $BUILD_PATH - - for module in $MODULES; do - fold_push "building ${module}" - fn="build_$module" - shouldbuildfn="shouldbuild_$module" - MARKER_FN="$BUILD_PATH/.mark-$module" - - # if the module should be updated, then remove the marker. - in_array $module "${modules_update[@]}" - if [ $? -ne 255 ]; then - debug "$module detected to be updated" - rm -f "$MARKER_FN" - fi - - # if shouldbuild_$module exist, call it to see if the module want to be - # built again - DO_BUILD=1 - if [ "$(type -t $shouldbuildfn)" == "function" ]; then - $shouldbuildfn - fi - - # if the module should be build, or if the marker is not present, - # do the build - if [ "X$DO_BUILD" == "X1" ] || [ ! -f "$MARKER_FN" ]; then - debug "Call $fn" - rm -f "$MARKER_FN" - $fn - touch "$MARKER_FN" - else - debug "Skipped $fn" - fi - fold_pop - done -} - -function run_postbuild() { - info "Run postbuild" - cd $BUILD_PATH - for module in $MODULES; do - fn=$(echo postbuild_$module) - debug "Call $fn" - $fn - done -} - -function run() { - for ARCH in ${ARCHES[@]}; do - cd ${ROOT_PATH} - STAGE_PATH="${ROOT_OUT_PATH}/stage/$ARCH" - run_prepare - run_source_modules - run_get_packages - run_prebuild - run_build - run_postbuild - done - info "Copy toolchain to bundle" - # see https://github.com/MerginMaps/input-sdk/issues/87 - try cp ${ROOT_PATH}/tools/ios.toolchain.cmake ${ROOT_OUT_PATH}/stage/ - - info "All done !" -} - -function list_modules() { - modules=$(find recipes -iname 'recipe.sh' | cut -d/ -f2 | sort -u | xargs echo) - echo "Available modules: $modules" - exit 0 -} - -# Do the build -while getopts ":hvlfxim:u:s:g" opt; do - case $opt in - h) - usage - ;; - l) - list_modules - ;; - s) - run_prepare - run_source_modules - push_arm - bash - pop_arm - exit 0 - ;; - i) - INSTALL=1 - ;; - g) - DEBUG=1 - echo "Requesting debug binaries" - ;; - m) - MODULES="$OPTARG" - ;; - u) - MODULES_UPDATE="$OPTARG" - ;; - f) - DO_CLEAN_BUILD=1 - ;; - x) - DO_SET_X=1 - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - exit 1 - ;; - :) - echo "Option -$OPTARG requires an argument." >&2 - exit 1 - ;; - - *) - echo "=> $OPTARG" - ;; - esac -done - -if [ $DO_SET_X -eq 1 ]; then - info "Set -x for displaying expanded values" - set -x -fi - -run diff --git a/ios/recipes/curl/recipe.sh b/ios/recipes/curl/recipe.sh deleted file mode 100755 index d1dcfc8a..00000000 --- a/ios/recipes/curl/recipe.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_curl=() - -# default build path -BUILD_curl=$BUILD_PATH/curl/$(get_directory $URL_curl) - -# default recipe path -RECIPE_curl=$RECIPES_PATH/curl - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_curl() { - cd $BUILD_curl - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_curl() { - # If lib is newer than the sourcecode skip build - if [ $BUILD_PATH/curl/build-$ARCH/lib/libcurl.a -nt $BUILD_curl/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_curl() { - try mkdir -p $BUILD_PATH/curl/build-$ARCH - try cd $BUILD_PATH/curl/build-$ARCH - - push_arm - - # use Apple's SecureTransport, not OpenSSL - try ${CMAKECMD} \ - -DBUILD_TESTING=OFF \ - -DBUILD_SHARED_LIBS=FALSE \ - -DBUILD_CURL_EXE=OFF \ - -DCURL_USE_LIBSSH2=OFF \ - -DCURL_USE_LIBSSH=OFF \ - -DCURL_ZSTD=OFF \ - -DCURL_BROTLI=OFF \ - -DCURL_DISABLE_LDAP=ON \ - -DCURL_USE_OPENLDAP=OFF \ - -DUSE_QUICHE=OFF \ - -DUSE_NGTCP2=OFF \ - -DUSE_NGHTTP2=OFF \ - -DCURL_ZLIB=OFF \ - -DIOS=TRUE \ - -DCURL_USE_OPENSSL=OFF \ - -DCURL_USE_SECTRANSP=ON \ - -DAPPLE=TRUE \ - $BUILD_curl - - try $MAKESMP - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_curl() { - if [ ! -f ${STAGE_PATH}/lib/libcurl.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/exiv2/recipe.sh b/ios/recipes/exiv2/recipe.sh deleted file mode 100755 index 44e5da95..00000000 --- a/ios/recipes/exiv2/recipe.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_exiv2=(expat) - -# default build path -BUILD_exiv2=$BUILD_PATH/exiv2/$(get_directory $URL_exiv2) - -# default recipe path -RECIPE_exiv2=$RECIPES_PATH/exiv2 - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_exiv2() { - cd $BUILD_exiv2 - - # check marker - if [ -f .patched ]; then - return - fi - - try patch -p1 < $RECIPE_exiv2/patches/exiv2.patch - - touch .patched -} - -function shouldbuild_exiv2() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libexiv2.a -nt $BUILD_exiv2/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_exiv2() { - try mkdir -p $BUILD_PATH/exiv2/build-$ARCH - try cd $BUILD_PATH/exiv2/build-$ARCH - push_arm - try $CMAKECMD \ - -DBUILD_SHARED_LIBS=OFF \ - -DEXIV2_BUILD_EXIV2_COMMAND=OFF \ - -DEXIV2_BUILD_SAMPLES=OFF \ - -DEXIV2_BUILD_UNIT_TESTS=OFF \ - -DEXIV2_BUILD_DOC=OFF \ - -DEXIV2_ENABLE_NLS=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - $BUILD_exiv2 - try $MAKESMP install - pop_arm -} - -# function called after all the compile have been done -function postbuild_exiv2() { - if [ ! -f ${STAGE_PATH}/lib/libexiv2.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} \ No newline at end of file diff --git a/ios/recipes/expat/recipe.sh b/ios/recipes/expat/recipe.sh deleted file mode 100755 index 189c9977..00000000 --- a/ios/recipes/expat/recipe.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_expat=() - -# default build path -BUILD_expat=$BUILD_PATH/expat/$(get_directory $URL_expat) - -# default recipe path -RECIPE_expat=$RECIPES_PATH/expat - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_expat() { - cd $BUILD_expat - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_expat/conftools/" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_expat/conftools/" - - touch .patched -} - -function shouldbuild_expat() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libexpat.a -nt $BUILD_expat/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_expat() { - try mkdir -p $BUILD_PATH/expat/build-$ARCH - try cd $BUILD_PATH/expat/build-$ARCH - push_arm - try $BUILD_expat/configure \ - --prefix=$STAGE_PATH \ - --host=${TOOLCHAIN_PREFIX} \ - --disable-shared - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_expat() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libexpat.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} \ No newline at end of file diff --git a/ios/recipes/freexl/recipe.sh b/ios/recipes/freexl/recipe.sh deleted file mode 100755 index d2feebc2..00000000 --- a/ios/recipes/freexl/recipe.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -# a library to extract valid data from within an Excel (.xls) spreadsheet - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_freexl=(iconv) - -# default build path -BUILD_freexl=$BUILD_PATH/freexl/$(get_directory $URL_freexl) - -# default recipe path -RECIPE_freexl=$RECIPES_PATH/freexl - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_freexl() { - cd $BUILD_freexl - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_freexl" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_freexl" - - touch .patched -} - -function shouldbuild_freexl() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libfreexl.a -nt $BUILD_freexl/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_freexl() { - try mkdir -p $BUILD_PATH/freexl/build-$ARCH - try cd $BUILD_PATH/freexl/build-$ARCH - push_arm - export LDFLAGS="$LDFLAGS -liconv" - try $BUILD_freexl/configure --prefix=$STAGE_PATH --host=${TOOLCHAIN_PREFIX} --disable-shared - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_freexl() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libfreexl.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/gdal/patches/configure.patch b/ios/recipes/gdal/patches/configure.patch deleted file mode 100644 index 95761f09..00000000 --- a/ios/recipes/gdal/patches/configure.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/configure 2022-02-18 10:31:24.000000000 +0100 -+++ b/configure 2022-02-18 11:01:15.000000000 +0100 -@@ -36559,7 +36559,7 @@ if ${ac_cv_lib_curl_curl_global_init+:} - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lcurl `$LIBCURL_CONFIG --libs` $LIBS" -+LIBS="-lcurl -framework Security -framework CoreFoundation -framework SystemConfiguration `$LIBCURL_CONFIG --libs` $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -37012,7 +37012,7 @@ done - if test "$ac_cv_header_sqlite3_h" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spatialite.h in /usr/include or /usr/local/include" >&5 - $as_echo_n "checking for spatialite.h in /usr/include or /usr/local/include... " >&6; } -- if test -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then -+ if true; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 - $as_echo "found" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spatialite_init in -lspatialite" >&5 -@@ -37021,7 +37021,7 @@ if ${ac_cv_lib_spatialite_spatialite_ini - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lspatialite -lsqlite3 $LIBS" -+LIBS="-lspatialite -lsqlite3 -lgeos_c -lgeos -lfreexl -lc++ $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -39073,7 +39073,7 @@ $as_echo "$as_me: WARNING: GEOS was foun - - HAVE_GEOS="no" - -- GEOS_LIBS="`${GEOS_CONFIG} --ldflags` -lgeos_c" -+ GEOS_LIBS="`${GEOS_CONFIG} --ldflags` -lgeos_c -lgeos -lc++" - GEOS_CFLAGS="`${GEOS_CONFIG} --cflags`" - GEOS_VERSION="`${GEOS_CONFIG} --version`" - -@@ -39088,7 +39088,7 @@ if ${ac_cv_lib_geos_c_GEOSversion+:} fal - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lgeos_c -+LIBS="-lgeos_c -lgeos -lc++ - $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ \ No newline at end of file diff --git a/ios/recipes/gdal/recipe.sh b/ios/recipes/gdal/recipe.sh deleted file mode 100755 index 04a3d593..00000000 --- a/ios/recipes/gdal/recipe.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_gdal=(iconv geos postgresql expat webp proj curl libspatialite libtiff jpeg) - -# default build path -BUILD_gdal=$BUILD_PATH/gdal/$(get_directory $URL_gdal) - -# default recipe path -RECIPE_gdal=$RECIPES_PATH/gdal - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_gdal() { - cd $BUILD_gdal - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_gdal" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_gdal" - - try patch -p1 < $RECIPE_gdal/patches/configure.patch - - touch .patched -} - -function shouldbuild_gdal() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libgdal.a -nt $BUILD_gdal/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_gdal() { - try rsync -a $BUILD_gdal/ $BUILD_PATH/gdal/build-$ARCH/ - try cd $BUILD_PATH/gdal/build-$ARCH - - push_arm - - export LDFLAGS="${LDFLAGS} -liconv" - export LDFLAGS="${LDFLAGS} -lgeos -framework Security -framework CoreFoundation -framework SystemConfiguration" - export LDFLAGS="$LDFLAGS -lc++ -ltiff -lwebp -ljpeg" - - export CFLAGS="${CFLAGS} -Wno-error=implicit-function-declaration" - - GDAL_FLAGS="--disable-shared" - if [ $DEBUG -eq 1 ]; then - info "Building DEBUG version of GDAL!!" - GDAL_FLAGS="$GDAL_FLAGS --enable-debug" - fi - - # png. by default -lpng is not found and internal is build. this causes crash in routine png_read_info - # during loading of Qt's components like CheckBox, ComboBox, etc, since the gdal's internal png lib is - # incompatible with Qt's required lib - # we can use /opt/Qt/5.13.1/ios//lib/libqtlibpng*, but there are no png.h headers in Qt's installation - - # We have external JPEG, but still with renamed symbols - # at runtime: Wrong JPEG library version: library is 62, caller expects 80 - # (GDAL tries to build internal JPEG library incompatible with Qt's internal JPEG lib) - # /opt/Qt/5.13.1/ios//plugins/imageformats/libqjpeg.a ... maybe use Qt's one? - # with-mrf=no \ # depends on jpeg - export CFLAGS="${CFLAGS} -DRENAME_INTERNAL_LIBJPEG_SYMBOLS" - export CPPFLAGS="${CPPFLAGS} -DRENAME_INTERNAL_LIBJPEG_SYMBOLS" - - # Undefined symbols for architecture arm64: "_png_do_expand_palette_rgb8_neon" - export CFLAGS="${CFLAGS} -DPNG_ARM_NEON_OPT=0" - export CPPFLAGS="${CPPFLAGS} -DPNG_ARM_NEON_OPT=0" - - try ./configure \ - --prefix=$STAGE_PATH \ - --host=${TOOLCHAIN_PREFIX} \ - --with-sqlite3=$SYSROOT \ - --with-geos=$STAGE_PATH/bin/geos-config \ - --with-pg=no \ - --with-expat=$STAGE_PATH \ - --with-spatialite=yes \ - --with-libtiff=$STAGE_PATH \ - --with-rename-internal-libgeotiff-symbols=yes \ - --with-rename-internal-shapelib-symbols=yes \ - --with-poppler=no \ - --with-podofo=no \ - --with-pdfium=no \ - --with-crypto=no \ - --with-proj=$STAGE_PATH \ - --with-jpeg=$STAGE_PATH \ - --disable-driver-mrf \ - --with-png=internal \ - $GDAL_FLAGS - - try $MAKESMP static-lib - try $MAKESMP install-static-lib - - try cp ./apps/*.h $STAGE_PATH/include/ - - pop_arm -} - -# function called after all the compile have been done -function postbuild_gdal() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libgdal.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/geodiff/recipe.sh b/ios/recipes/geodiff/recipe.sh deleted file mode 100755 index 168414e7..00000000 --- a/ios/recipes/geodiff/recipe.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_geodiff=(sqlite3) - -# default build path -BUILD_geodiff=$BUILD_PATH/geodiff/$(get_directory $URL_geodiff) - -# default recipe path -RECIPE_geodiff=$RECIPES_PATH/geodiff - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_geodiff() { - cd $BUILD_geodiff - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_geodiff() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libgeodiff.a -nt $BUILD_geodiff/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_geodiff() { - try mkdir -p $BUILD_PATH/geodiff/build-$ARCH - try cd $BUILD_PATH/geodiff/build-$ARCH - - push_arm - - try $CMAKECMD \ - -DCMAKE_MODULE_PATH:PATH=$BUILD_geodiff/geodiff/cmake \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DENABLE_TESTS=OFF \ - -DBUILD_TOOLS=OFF \ - -DBUILD_STATIC=ON \ - -DBUILD_SHARED=OFF \ - -DWITH_POSTGRESQL=OFF \ - -DSQLite3_INCLUDE_DIR=$STAGE_PATH/include \ - -DSQLite3_LIBRARY=$STAGE_PATH/lib/libsqlite3.a \ - $BUILD_geodiff/geodiff - - try $MAKESMP - try $MAKESMP install - pop_arm -} - -# function called after all the compile have been done -function postbuild_geodiff() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libgeodiff.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/geos/recipe.sh b/ios/recipes/geos/recipe.sh deleted file mode 100755 index 3a1c5563..00000000 --- a/ios/recipes/geos/recipe.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_geos=() - -# default build path -BUILD_geos=$BUILD_PATH/geos/$(get_directory $URL_geos) - -# default recipe path -RECIPE_geos=$RECIPES_PATH/geos - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_geos() { - cd $BUILD_geos - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_geos - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_geos - - touch .patched -} - -function shouldbuild_geos() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libgeos.a -nt $BUILD_geos/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_geos() { - try mkdir -p $BUILD_PATH/geos/build-$ARCH - try cd $BUILD_PATH/geos/build-$ARCH - push_arm - - try ${CMAKECMD} \ - -DANDROID=OFF \ - -DBUILD_TESTING=OFF \ - -DIOS=TRUE \ - -DBUILD_SHARED_LIBS=FALSE \ - $BUILD_geos - - echo '#define GEOS_SVN_REVISION 0' > $BUILD_PATH/geos/build-$ARCH/geos_svn_revision.h - try $MAKESMP - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_geos() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libgeos.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/iconv/patches/charset.patch b/ios/recipes/iconv/patches/charset.patch deleted file mode 100644 index cac3b971..00000000 --- a/ios/recipes/iconv/patches/charset.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/libcharset/configure 2018-10-15 12:54:41.000000000 +0200 -+++ b/libiconv-1.14/libcharset/configure 2018-10-15 12:55:06.000000000 +0200 -@@ -9847,8 +9847,8 @@ - version_type=darwin - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' -- soname_spec='${libname}${release}${major}$shared_ext' -+ library_names_spec='${libname}$shared_ext' -+ soname_spec='${libname}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' diff --git a/ios/recipes/iconv/patches/iconv.patch b/ios/recipes/iconv/patches/iconv.patch deleted file mode 100644 index 7997e326..00000000 --- a/ios/recipes/iconv/patches/iconv.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/configure 2018-10-15 12:52:22.000000000 +0200 -+++ b/configure 2018-10-15 12:52:39.000000000 +0200 -@@ -12015,8 +12015,8 @@ - version_type=darwin - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' -- soname_spec='${libname}${release}${major}$shared_ext' -+ library_names_spec='${libname}$shared_ext' -+ soname_spec='${libname}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' diff --git a/ios/recipes/iconv/recipe.sh b/ios/recipes/iconv/recipe.sh deleted file mode 100755 index 72393e0f..00000000 --- a/ios/recipes/iconv/recipe.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_iconv=() - -# default build path -BUILD_iconv=$BUILD_PATH/iconv/$(get_directory $URL_iconv) - -# default recipe path -RECIPE_iconv=$RECIPES_PATH/iconv - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_iconv() { - cd $BUILD_iconv - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_iconv/build-aux" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_iconv/build-aux" - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_iconv/libcharset/build-aux" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_iconv/libcharset/build-aux" - - touch .patched -} - -function shouldbuild_iconv() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libcharset.a -nt $BUILD_iconv/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_iconv() { - try mkdir -p $BUILD_PATH/iconv/build-$ARCH - try cd $BUILD_PATH/iconv/build-$ARCH - - push_arm - - try $BUILD_iconv/configure \ - --prefix=$STAGE_PATH \ - --host=${TOOLCHAIN_PREFIX} \ - --disable-shared - - # iconv library is present in iOS SDK, just build charset library that is missing - cd libcharset - try $MAKESMP - try make install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_iconv() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libcharset.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/jpeg/patches/CMakeLists.txt b/ios/recipes/jpeg/patches/CMakeLists.txt deleted file mode 100644 index a46ba2cf..00000000 --- a/ios/recipes/jpeg/patches/CMakeLists.txt +++ /dev/null @@ -1,76 +0,0 @@ -# see https://github.com/OSGeo/gdal/blob/master/frmts/jpeg/libjpeg/CMakeLists.txt -cmake_minimum_required(VERSION 3.6) -project(JPEG) - -add_library( - jpeg STATIC - jcapimin.c - jchuff.h - jconfig.h - jdapimin.c - jdct.h - jdmarker.c - jdtrans.c - jidctflt.c - jmemmgr.c - jquant2.c - jcapistd.c - jcinit.c - jcparam.c - jdapistd.c - jddctmgr.c - jdmaster.c - jerror.c - jidctfst.c - jmemsys.h - jutils.c - jccoefct.c - jcmainct.c - jcphuff.c - jdatadst.c - jdhuff.c - jdmerge.c - jerror.h - jidctint.c - jmorecfg.h - jversion.h - jccolor.c - jcmarker.c - jcprepct.c - jdatasrc.c - jdhuff.h - jdphuff.c - jfdctflt.c - jidctred.c - jpegint.h - jcdctmgr.c - jcmaster.c - jcsample.c - jdcoefct.c - jdinput.c - jdpostct.c - jfdctfst.c - jinclude.h - jpeglib.h - jchuff.c - jcomapi.c - jctrans.c - jdcolor.c - jdmainct.c - jdsample.c - jfdctint.c - jmemnobs.c - jquant1.c) - -target_include_directories(jpeg PRIVATE $ $/..) -# target_compile_options(libjpeg PRIVATE ${GDAL_C_WARNING_FLAGS} ${GDAL_SOFTWARNFLAGS}) - -target_compile_definitions(jpeg PRIVATE -DDEFAULT_MAX_MEM=500000000L) -if (RENAME_INTERNAL_JPEG_SYMBOLS) - target_compile_definitions(jpeg PUBLIC -DRENAME_INTERNAL_LIBJPEG_SYMBOLS) -endif () - -# produce position independent code, default is on when building a shared library -# option(GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE "Set ON to produce -fPIC code" ${BUILD_SHARED_LIBS}) -# set_property(TARGET jpeg PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) -# target_sources(${GDAL_LIB_TARGET_NAME} PRIVATE $) \ No newline at end of file diff --git a/ios/recipes/jpeg/patches/cpl_port.h b/ios/recipes/jpeg/patches/cpl_port.h deleted file mode 100644 index 30fe1669..00000000 --- a/ios/recipes/jpeg/patches/cpl_port.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef CPL_BASE_H_INCLUDED_TWEAKED -#define CPL_BASE_H_INCLUDED_TWEAKED - -#if defined(__GNUC__) && __GNUC__ >= 4 -/** Qualifier for an argument that is unused */ -# define CPL_UNUSED __attribute((__unused__)) -#else -/* TODO: add cases for other compilers */ -/** Qualifier for an argument that is unused */ -# define CPL_UNUSED -#endif - -#endif /* ndef CPL_BASE_H_INCLUDED_TWEAKED */ \ No newline at end of file diff --git a/ios/recipes/jpeg/patches/jerror.patch b/ios/recipes/jpeg/patches/jerror.patch deleted file mode 100644 index d51a32b1..00000000 --- a/ios/recipes/jpeg/patches/jerror.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/frmts/jpeg/libjpeg/jerror.c -+++ b/frmts/jpeg/libjpeg/jerror.c -@@ -47,6 +47,8 @@ - - #ifdef NEED_12_BIT_NAMES - #define jpeg_std_message_table jpeg_std_message_table_12 -+#elif defined(RENAME_INTERNAL_LIBJPEG_SYMBOLS) -+#define jpeg_std_message_table gdal_jpeg_std_message_table - #endif - - #define JMESSAGE(code,string) string , \ No newline at end of file diff --git a/ios/recipes/jpeg/recipe.sh b/ios/recipes/jpeg/recipe.sh deleted file mode 100755 index 9c669b24..00000000 --- a/ios/recipes/jpeg/recipe.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash - - -# version of your package in ../../../versions.conf - - -# dependencies of this recipe -DEPS_jpeg=() - -# default build path -BUILD_jpeg=$BUILD_PATH/jpeg/$(get_directory $URL_jpeg) - -# default recipe path -RECIPE_jpeg=$RECIPES_PATH/jpeg - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_jpeg() { - cd $BUILD_jpeg - - # check marker - if [ -f .patched ]; then - return - fi - - # so it is not picked by install step! - try cp $RECIPE_jpeg/patches/cpl_port.h $BUILD_jpeg/frmts/jpeg/ - - try rm $BUILD_jpeg/frmts/jpeg/libjpeg/CMakeLists.txt - try cp $RECIPE_jpeg/patches/CMakeLists.txt $BUILD_jpeg/frmts/jpeg/libjpeg/ - - # https://github.com/OSGeo/gdal/pull/6725 - try patch -p1 < $RECIPE_jpeg/patches/jerror.patch - - touch .patched -} - -function shouldbuild_jpeg() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libjpeg.a -nt $BUILD_jpeg/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_jpeg() { - try mkdir -p $BUILD_PATH/jpeg/build-$ARCH - try cd $BUILD_PATH/jpeg/build-$ARCH - - push_arm - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - -DRENAME_INTERNAL_JPEG_SYMBOLS=ON \ - $BUILD_jpeg/frmts/jpeg/libjpeg/ - - check_file_configuration CMakeCache.txt - - try $MAKESMP - - try mkdir -p ${STAGE_PATH}/lib/ - try cp $BUILD_PATH/jpeg/build-$ARCH/libjpeg.a ${STAGE_PATH}/lib/ - try mkdir -p ${STAGE_PATH}/include/ - try cp $BUILD_jpeg/frmts/jpeg/libjpeg/*.h ${STAGE_PATH}/include/ - - pop_arm -} - -# function called after all the compile have been done -function postbuild_jpeg() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libjpeg.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/libspatialindex/patches/spatialindex.patch b/ios/recipes/libspatialindex/patches/spatialindex.patch deleted file mode 100644 index a93948d3..00000000 --- a/ios/recipes/libspatialindex/patches/spatialindex.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -188,9 +188,9 @@ set(SIDX_SOURCES - #endif() - - -+add_library(${SIDX_LIB_NAME} STATIC ${SIDX_SOURCES}) --add_library(${SIDX_LIB_NAME} ${SIDX_SOURCES}) - -+add_library(${SIDX_C_LIB_NAME} STATIC ${SIDX_CAPI_CPP}) --add_library(${SIDX_C_LIB_NAME} ${SIDX_CAPI_CPP}) - - target_link_libraries(${SIDX_C_LIB_NAME} - ${SIDX_LIB_NAME} \ No newline at end of file diff --git a/ios/recipes/libspatialindex/recipe.sh b/ios/recipes/libspatialindex/recipe.sh deleted file mode 100755 index 9c775838..00000000 --- a/ios/recipes/libspatialindex/recipe.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libspatialindex=() - -# default build path -BUILD_libspatialindex=$BUILD_PATH/libspatialindex/$(get_directory $URL_libspatialindex) - -# default recipe path -RECIPE_libspatialindex=$RECIPES_PATH/libspatialindex - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libspatialindex() { - cd $BUILD_libspatialindex - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_libspatialindex" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_libspatialindex" - - try patch -p1 < $RECIPE_libspatialindex/patches/spatialindex.patch - - touch .patched -} - -function shouldbuild_libspatialindex() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libspatialindex.a -nt $BUILD_libspatialindex/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libspatialindex() { - try mkdir -p $BUILD_PATH/libspatialindex/build-$ARCH - try cd $BUILD_PATH/libspatialindex/build-$ARCH - - push_arm - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - $BUILD_libspatialindex - - try $MAKESMP - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_libspatialindex() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libspatialindex.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/libspatialite/patches/config.patch b/ios/recipes/libspatialite/patches/config.patch deleted file mode 100644 index c2009e89..00000000 --- a/ios/recipes/libspatialite/patches/config.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- a/configure 2022-05-17 14:24:24.000000000 +0200 -+++ b/configure 2022-05-17 14:25:11.000000000 +0200 -@@ -18266,8 +18266,8 @@ ac_res=$ac_cv_search_GEOSCoveredBy - if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - --else -- as_fn_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" "$LINENO" 5 -+#else -+# as_fn_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" "$LINENO" 5 - fi - - LIBS="$LIBS_SAVE" -@@ -18353,8 +18353,8 @@ ac_res=$ac_cv_search_GEOSDelaunayTriangu - if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - --else -- as_fn_error $? "'libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosadvanced parameter." "$LINENO" 5 -+#else -+# as_fn_error $? "'libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosadvanced parameter." "$LINENO" 5 - fi - - $as_echo "#define GEOS_ADVANCED 1" >>confdefs.h -@@ -18426,8 +18426,8 @@ ac_res=$ac_cv_search_GEOSContext_setErro - if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - --else -- as_fn_error $? "'libgeos_c' (>= v.3.5.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosreentrant parameter." "$LINENO" 5 -+#else -+# as_fn_error $? "'libgeos_c' (>= v.3.5.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosreentrant parameter." "$LINENO" 5 - fi - - $as_echo "#define GEOS_REENTRANT 1" >>confdefs.h -@@ -18515,8 +18515,8 @@ ac_res=$ac_cv_search_GEOSFrechetDistance - if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - --else -- as_fn_error $? "'libgeos_c' (>= v.3.7.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geos370 parameter." "$LINENO" 5 -+#else -+# as_fn_error $? "'libgeos_c' (>= v.3.7.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geos370 parameter." "$LINENO" 5 - fi - - $as_echo "#define GEOS_370 1" >>confdefs.h \ No newline at end of file diff --git a/ios/recipes/libspatialite/recipe.sh b/ios/recipes/libspatialite/recipe.sh deleted file mode 100755 index 84a3136f..00000000 --- a/ios/recipes/libspatialite/recipe.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -# sqlite3 is already in iOS SDK dir -DEPS_libspatialite=(proj iconv freexl geos) - -# default build path -BUILD_libspatialite=$BUILD_PATH/libspatialite/$(get_directory $URL_libspatialite) - -# default recipe path -RECIPE_libspatialite=$RECIPES_PATH/libspatialite - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libspatialite() { - cd $BUILD_libspatialite - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_libspatialite" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_libspatialite" - - try patch -p1 < $RECIPE_libspatialite/patches/config.patch - - touch .patched -} - -function shouldbuild_libspatialite() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libspatialite.a -nt $BUILD_libspatialite/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libspatialite() { - try mkdir -p $BUILD_PATH/libspatialite/build-$ARCH - try cd $BUILD_PATH/libspatialite/build-$ARCH - - push_arm - - rm $BUILD_libspatialite/config.h - rm $BUILD_libspatialite/src/headers/spatialite/gaiaconfig.h - - # so the configure script can check that proj library contains pj_init_plus - export LDFLAGS="$LDFLAGS -lc++ -ltiff -lwebp -ljpeg" - export CFLAGS="$CFLAGS -I$BUILD_PATH/libspatialite/build-$ARCH/src/headers" - - try $BUILD_libspatialite/configure \ - --prefix=$STAGE_PATH \ - --host=${TOOLCHAIN_PREFIX} \ - --with-geosconfig=$STAGE_PATH/bin/geos-config \ - --enable-libxml2=no \ - --disable-examples \ - --enable-proj=yes \ - --enable-gcp=no \ - --enable-minizip=no \ - --disable-shared \ - --enable-rttopo=no \ - --enable-static=yes - - try $MAKESMP - try make install &> install.log - - pop_arm -} - -# function called after all the compile have been done -function postbuild_libspatialite() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libspatialite.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/libtasn1/recipe.sh b/ios/recipes/libtasn1/recipe.sh deleted file mode 100755 index f60e16b7..00000000 --- a/ios/recipes/libtasn1/recipe.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libtasn1=() - -# default build path -BUILD_libtasn1=$BUILD_PATH/libtasn1/$(get_directory $URL_libtasn1) - -# default recipe path -RECIPE_libtasn1=$RECIPES_PATH/libtasn1 - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libtasn1() { - cd $BUILD_libtasn1 - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_libtasn1" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_libtasn1" - - touch .patched -} - -function shouldbuild_libtasn1() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libtasn1.a -nt $BUILD_libtasn1/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libtasn1() { - push_arm - - try mkdir -p $BUILD_PATH/libtasn1/build-$ARCH - try cd $BUILD_PATH/libtasn1/build-$ARCH - - export CFLAGS="${CFLAGS} -Wno-error=implicit-function-declaration" - - try $BUILD_libtasn1/configure --disable-doc --disable-valgrind-tests --prefix=$STAGE_PATH --host=${TOOLCHAIN_PREFIX} --disable-shared --disable-gcc-warnings --disable-silent-rules - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_libtasn1() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libtasn1.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/libtiff/patches/notools.patch b/ios/recipes/libtiff/patches/notools.patch deleted file mode 100644 index ff8bb534..00000000 --- a/ios/recipes/libtiff/patches/notools.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/CMakeLists.txt 2022-08-03 11:24:47.000000000 +0200 -+++ b/CMakeLists.txt 2022-08-03 11:28:07.000000000 +0200 -@@ -137,12 +137,12 @@ include(Release) - # Process subdirectories - add_subdirectory(port) - add_subdirectory(libtiff) --add_subdirectory(tools) --add_subdirectory(test) -+# add_subdirectory(tools) -+# add_subdirectory(test) - add_subdirectory(contrib) - add_subdirectory(build) --add_subdirectory(man) --add_subdirectory(html) -+# add_subdirectory(man) -+# add_subdirectory(html) - - - message(STATUS "") diff --git a/ios/recipes/libtiff/recipe.sh b/ios/recipes/libtiff/recipe.sh deleted file mode 100755 index dc8cd05f..00000000 --- a/ios/recipes/libtiff/recipe.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash - - -# dependencies of this recipe -DEPS_libtiff=(webp libzip jpeg) - - -# default build path -BUILD_libtiff=$BUILD_PATH/libtiff/$(get_directory $URL_libtiff) - -# default recipe path -RECIPE_libtiff=$RECIPES_PATH/libtiff - - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libtiff() { - cd $BUILD_libtiff - - # check marker - if [ -f .patched ]; then - return - fi - - try patch -p1 < $RECIPE_libtiff/patches/notools.patch - - touch .patched -} - -# function called before build_libtiff -# set DO_BUILD=0 if you know that it does not require a rebuild -function shouldbuild_libtiff() { -# If lib is newer than the sourcecode skip build - if [ "${STAGE_PATH}/lib/libtiff.a" -nt $BUILD_libtiff/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libtiff() { - try mkdir -p $BUILD_PATH/libtiff/build-$ARCH - try cd $BUILD_PATH/libtiff/build-$ARCH - - push_arm - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - -DWEBP_SUPPORT=BOOL:ON \ - -DLZMA_SUPPORT=BOOL:OFF \ - -DZSTD_SUPPORT=BOOL:OFF \ - -DZSTD_FOUND=OFF \ - -DLERC_SUPPORT=BOOL:OFF \ - -DJPEG_SUPPORT=BOOL:ON \ - -DZIP_SUPPORT=BOOL:ON \ - -DCMAKE_CXX_FLAGS=-DRENAME_INTERNAL_LIBJPEG_SYMBOLS \ - -DCMAKE_C_FLAGS=-DRENAME_INTERNAL_LIBJPEG_SYMBOLS \ - -DBUILD_DOCS=OFF \ - -DBUILD_CONTRIB=OFF \ - -DBUILD_TESTS=OFF \ - -DCMAKE_DISABLE_FIND_PACKAGE_ZSTD=ON \ - -DJPEG_INCLUDE_DIR=$STAGE_PATH/include \ - -DJPEG_LIBRARY=$STAGE_PATH/lib/libjpeg.a \ - -DIOS=TRUE \ - $BUILD_libtiff - - try $MAKESMP install VERBOSE=1 - - pop_arm -} - -# function called after all the compile have been done -function postbuild_libtiff() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libtiff.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/libzip/patches/cmake.patch b/ios/recipes/libzip/patches/cmake.patch deleted file mode 100644 index 254ea07b..00000000 --- a/ios/recipes/libzip/patches/cmake.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/CMakeLists.tx -+++ b/CMakeLists.txt -@@ -234,10 +234,10 @@ - - # Targets - ADD_SUBDIRECTORY(lib) --ADD_SUBDIRECTORY(man) -+# ADD_SUBDIRECTORY(man) --ADD_SUBDIRECTORY(src) --ADD_SUBDIRECTORY(regress) --ADD_SUBDIRECTORY(examples) -+# ADD_SUBDIRECTORY(src) -+# ADD_SUBDIRECTORY(regress) -+# ADD_SUBDIRECTORY(examples) - - # pkgconfig file - SET(prefix ${CMAKE_INSTALL_PREFIX}) diff --git a/ios/recipes/libzip/patches/cmake2.patch b/ios/recipes/libzip/patches/cmake2.patch deleted file mode 100644 index 5e94e3cf..00000000 --- a/ios/recipes/libzip/patches/cmake2.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/lib/CMakeLists.txt 2018-10-15 14:43:55.000000000 +0200 -+++ b/lib/CMakeLists.txt 2018-10-15 14:44:39.000000000 +0200 -@@ -209,9 +209,7 @@ - ) - ENDIF() - --ADD_LIBRARY(zip ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPTIONAL_FILES} ${LIBZIP_OPSYS_FILES}) --SET_TARGET_PROPERTIES(zip PROPERTIES VERSION 5.0 SOVERSION 5) --TARGET_LINK_LIBRARIES(zip ${ZLIB_LIBRARY} ${OPTIONAL_LIBRARY}) -+ADD_LIBRARY(zip STATIC ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPTIONAL_FILES} ${LIBZIP_OPSYS_FILES}) - INSTALL(TARGETS zip - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/ios/recipes/libzip/recipe.sh b/ios/recipes/libzip/recipe.sh deleted file mode 100755 index f390662d..00000000 --- a/ios/recipes/libzip/recipe.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libzip=() - -# default build path -BUILD_libzip=$BUILD_PATH/libzip/$(get_directory $URL_libzip) - -# default recipe path -RECIPE_libzip=$RECIPES_PATH/libzip - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libzip() { - cd $BUILD_libzip - - # check marker - if [ -f .patched ]; then - return - fi - - # NOTE TO MYSELF, on libzip master, src/examples/man... can be switched off - # by cmake option, so patch should not be needed any more - # try patch -p1 < $RECIPE_libzip/patches/cmake.patch - # try patch -p1 < $RECIPE_libzip/patches/cmake2.patch - - touch .patched -} - -function shouldbuild_libzip() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libzip.a -nt $BUILD_libzip/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libzip() { - try mkdir -p $BUILD_PATH/libzip/build-$ARCH - try cd $BUILD_PATH/libzip/build-$ARCH - - push_arm - - # configure - try ${CMAKECMD} \ - -DBUILD_TESTS=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DENABLE_OPENSSL=OFF \ - -DENABLE_GNUTLS=OFF \ - -DBUILD_TOOLS=OFF \ - -DBUILD_REGRESS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_DOC=OFF \ - -DIOS=TRUE \ - $BUILD_libzip - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_libzip() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libzip.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/poly2tri/recipe.sh b/ios/recipes/poly2tri/recipe.sh deleted file mode 100755 index 831cce65..00000000 --- a/ios/recipes/poly2tri/recipe.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_poly2tri=() - -# default build path -BUILD_poly2tri=$BUILD_PATH/poly2tri/$(get_directory $URL_poly2tri) - -# default recipe path -RECIPE_poly2tri=$RECIPES_PATH/poly2tri - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_poly2tri() { - cd $BUILD_poly2tri - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_poly2tri() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/include/poly2tri/poly2tri.h -nt $BUILD_poly2tri/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_poly2tri() { - try cd $BUILD_poly2tri - - push_arm - - try mkdir -p ${STAGE_PATH}/include/poly2tri - try cp src/3rdparty/poly2tri/poly2tri.h ${STAGE_PATH}/include/poly2tri/ - try mkdir -p ${STAGE_PATH}/include/poly2tri/sweep - try cp -R src/3rdparty/poly2tri/sweep/*.h ${STAGE_PATH}/include/poly2tri/sweep/ - try mkdir -p ${STAGE_PATH}/include/poly2tri/common - try cp -R src/3rdparty/poly2tri/common/*.h ${STAGE_PATH}/include/poly2tri/common/ - - pop_arm -} - -# function called after all the compile have been done -function postbuild_poly2tri() { - if [ ! -f "${STAGE_PATH}/include/poly2tri/poly2tri.h" ]; then - error "Library was not successfully build for ${ARCH}" - exit 1 - fi -} diff --git a/ios/recipes/postgresql/recipe.sh b/ios/recipes/postgresql/recipe.sh deleted file mode 100755 index f0c548db..00000000 --- a/ios/recipes/postgresql/recipe.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_postgresql=() - -# default build path -BUILD_postgresql=$BUILD_PATH/postgresql/$(get_directory $URL_postgresql) - -# default recipe path -RECIPE_postgresql=$RECIPES_PATH/postgresql - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_postgresql() { - cd $BUILD_postgresql - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_postgresql/conftools - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_postgresql/conftools - touch .patched -} - -function shouldbuild_postgresql() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libpq.a -nt $BUILD_postgresql/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_postgresql() { - try mkdir -p $BUILD_PATH/postgresql/build-$ARCH - try cd $BUILD_PATH/postgresql/build-$ARCH - - push_arm - - USE_DEV_URANDOM=1 \ - try $BUILD_postgresql/configure --prefix=$STAGE_PATH --host=${TOOLCHAIN_PREFIX} --without-readline --disable-shared - try $MAKESMP -C src/interfaces/libpq - - #simulate make install - echo "installing libpq" - try cp -v $BUILD_postgresql/src/include/postgres_ext.h $STAGE_PATH/include - try cp -v $BUILD_postgresql/src/interfaces/libpq/libpq-fe.h $STAGE_PATH/include - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/include/pg_config_ext.h $STAGE_PATH/include/ - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/interfaces/libpq/libpq.a $STAGE_PATH/lib/ - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/common/libpgcommon.a $STAGE_PATH/lib/ - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/port/libpgport.a $STAGE_PATH/lib/ - - pop_arm -} - -# function called after all the compile have been done -function postbuild_postgresql() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libpq.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/proj/recipe.sh b/ios/recipes/proj/recipe.sh deleted file mode 100755 index bd587666..00000000 --- a/ios/recipes/proj/recipe.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_proj=(sqlite3 libtiff) - -# default build path -BUILD_proj=$BUILD_PATH/proj/$(get_directory $URL_proj) - -# default recipe path -RECIPE_proj=$RECIPES_PATH/proj - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_proj() { - cd $BUILD_proj - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_proj" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_proj" - - touch .patched -} - -function shouldbuild_proj() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libproj.a -nt $BUILD_proj/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_proj() { - try mkdir -p $BUILD_PATH/proj/build-$ARCH - try cd $BUILD_PATH/proj/build-$ARCH - - push_arm - - echo "using native sqlite3" - which sqlite3 - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_TESTING=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DEXE_SQLITE3=`which sqlite3` \ - -DSQLITE3_INCLUDE_DIR=$STAGE_PATH/include \ - -DSQLITE3_LIBRARY=$STAGE_PATH/lib/libsqlite3.a \ - -DBUILD_APPS=OFF \ - -DENABLE_TIFF=ON \ - -DENABLE_CURL=OFF \ - -DPROJ_CMAKE_SUBDIR=share/cmake/proj4 \ - -DPROJ_DATA_SUBDIR=share/proj \ - -DPROJ_LIB_ENV_VAR_TRIED_LAST=OFF \ - $BUILD_proj - - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_proj() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libproj.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/protobuf/recipe.sh b/ios/recipes/protobuf/recipe.sh deleted file mode 100755 index ea088b3b..00000000 --- a/ios/recipes/protobuf/recipe.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_protobuf=() - -# default build path -BUILD_protobuf=$BUILD_PATH/protobuf/$(get_directory $URL_protobuf) - -# default recipe path -RECIPE_protobuf=$RECIPES_PATH/protobuf - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_protobuf() { - cd $BUILD_protobuf - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_protobuf" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_protobuf" - - touch .patched -} - -function shouldbuild_protobuf() { - if [ -f ${STAGE_PATH}/lib/libprotobuf.a ]; then - DO_BUILD=0 - fi -} - -function build_native_protobuf() { - # also we need to build protobuf native executable, - # since we need to create C++ files - # from .proto files at build time for QGIS - try mkdir -p $BUILD_PATH/protobuf/build-native/ - try cd $BUILD_PATH/protobuf/build-native - - push_native - - try cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -Dprotobuf_BUILD_TESTS=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH=$NATIVE_STAGE_PATH \ - $BUILD_protobuf/cmake - - try make -j$CORES - try make install - - pop_arm -} - -# function called to build the source code -function build_ios_protobuf() { - try mkdir -p $BUILD_PATH/protobuf/build-$ARCH/ - try cd $BUILD_PATH/protobuf/build-$ARCH - push_arm - - export CXXFLAGS="$CXXFLAGS -DNDEBUG" - export CPPFLAGS="$CXXFLAGS" - - try $BUILD_protobuf/configure \ - --prefix=$STAGE_PATH \ - --host=$TOOLCHAIN_PREFIX \ - --disable-debug \ - --disable-dependency-tracking \ - --disable-shared \ - --with-protoc=$NATIVE_STAGE_PATH/bin/protoc - - try $MAKESMP - try $MAKE install - - pop_arm -} - -function build_protobuf() { - build_native_protobuf - build_ios_protobuf -} - -# function called after all the compile have been done -function postbuild_protobuf() { - true -} diff --git a/ios/recipes/qca/recipe.sh b/ios/recipes/qca/recipe.sh deleted file mode 100755 index 2dd522e2..00000000 --- a/ios/recipes/qca/recipe.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qca=() - -# default build path -BUILD_qca=$BUILD_PATH/qca/$(get_directory $URL_qca) - -# default recipe path -RECIPE_qca=$RECIPES_PATH/qca - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_qca() { - cd $BUILD_qca - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qca() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libqca-qt6.a -nt $BUILD_qca/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_qca() { - try mkdir -p $BUILD_qca/build-$ARCH - try cd $BUILD_qca/build-$ARCH - - push_arm - - # configure - try ${CMAKECMD} \ - -DQT6=ON \ - -DBUILD_TESTS=OFF \ - -DBUILD_TOOLS=OFF \ - -DWITH_nss_PLUGIN=OFF \ - -DWITH_ossl_PLUGIN=OFF \ - -DWITH_pkcs11_PLUGIN=OFF \ - -DWITH_gnupg_PLUGIN=OFF \ - -DWITH_gcrypt_PLUGIN=OFF \ - -DOSX_FRAMEWORK=OFF \ - -DWITH_botan_PLUGIN=NO \ - -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE \ - -DLIBRARY_TYPE=STATIC \ - -DBUILD_SHARED_LIBS=OFF \ - $BUILD_qca - - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_qca() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libqca-qt6.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/qgis/recipe.sh b/ios/recipes/qgis/recipe.sh deleted file mode 100755 index bbbc85cb..00000000 --- a/ios/recipes/qgis/recipe.sh +++ /dev/null @@ -1,151 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qgis=(exiv2 protobuf libtasn1 gdal qca proj libspatialite libspatialindex expat postgresql libzip qtkeychain geodiff zxing geodiff poly2tri) - -# default build path -BUILD_qgis=$BUILD_PATH/qgis/$(get_directory $URL_qgis) - -# default recipe path -RECIPE_qgis=$RECIPES_PATH/qgis - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_qgis() { - cd $BUILD_qgis - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qgis() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/QGIS.app/Contents/Frameworks/qgis_core.framework/qgis_core -nt $BUILD_qgis/.patched ]; then - DO_BUILD=0 - fi -} - - -# function called to build the source code -function build_qgis() { - try mkdir -p $BUILD_PATH/qgis/build-$ARCH - try cd $BUILD_PATH/qgis/build-$ARCH - - push_arm - - try ${CMAKECMD} \ - -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=TRUE \ - -DWITH_DESKTOP=OFF \ - -DDISABLE_DEPRECATED=ON \ - -DWITH_QTWEBKIT=OFF \ - -DWITH_EPT=OFF \ - -DWITH_COPC=OFF \ - -DWITH_PDAL=OFF \ - -DFORCE_STATIC_LIBS=TRUE \ - -DQT_LRELEASE_EXECUTABLE=`which lrelease` \ - -DFLEX_EXECUTABLE=`which flex` \ - -DBISON_EXECUTABLE=`which bison` \ - -DWITH_AUTH=OFF \ - -DGDAL_CONFIG=$STAGE_PATH/bin/gdal-config \ - -DGDAL_CONFIG_PREFER_FWTOOLS_PAT=/bin_safe \ - -DGDAL_CONFIG_PREFER_PATH=$STAGE_PATH/bin \ - -DGDAL_INCLUDE_DIR=$STAGE_PATH/include \ - -DGDAL_LIBRARY=$STAGE_PATH/lib/libgdal.a \ - -DGDAL_VERSION=$VERSION_gdal \ - -DGEOS_CONFIG=$STAGE_PATH/bin/geos-config \ - -DGEOS_CONFIG_PREFER_PATH=$STAGE_PATH/bin \ - -DGEOS_INCLUDE_DIR=$STAGE_PATH/include \ - -DGEOS_LIBRARY=$STAGE_PATH/lib/libgeos_c.a \ - -DGEOS_LIB_NAME_WITH_PREFIX=-lgeos_c \ - -DGEOS_VERSION=$VERSION_geos \ - -DQCA_INCLUDE_DIR=$STAGE_PATH/include/Qca-qt6/QtCrypto \ - -DQCA_LIBRARY=$STAGE_PATH/lib/libqca-qt6.a \ - -DQCA_VERSION_STR=$VERSION_qca \ - -DPROJ_INCLUDE_DIR=$STAGE_PATH/include \ - -DPROJ_LIBRARY=$STAGE_PATH/lib/libproj.a \ - -DLIBTASN1_INCLUDE_DIR=$STAGE_PATH/include \ - -DLIBTASN1_LIBRARY=$STAGE_PATH/lib/libtasn1.a \ - -DLIBZIP_INCLUDE_DIR=$STAGE_PATH/include \ - -DLIBZIP_CONF_INCLUDE_DIR=$STAGE_PATH/include \ - -DLIBZIP_LIBRARY=$STAGE_PATH/lib/libzip.a \ - -DICONV_INCLUDE_DIR=$SYSROOT\ - -DICONV_LIBRARY=$SYSROOT/usr/lib/libiconv.tbd \ - -DSQLITE3_INCLUDE_DIR=$SYSROOT \ - -DSQLITE3_LIBRARY=$SYSROOT/usr/lib/libsqlite3.tbd \ - -DPOSTGRES_CONFIG= \ - -DPOSTGRES_CONFIG_PREFER_PATH= \ - -DPOSTGRES_INCLUDE_DIR=$STAGE_PATH/include \ - -DPOSTGRES_LIBRARY=$STAGE_PATH/lib/libpq.a \ - -DQTKEYCHAIN_INCLUDE_DIR=$STAGE_PATH/include/qt6keychain \ - -DQTKEYCHAIN_LIBRARY=$STAGE_PATH/lib/libqt6keychain.a \ - -DSPATIALINDEX_INCLUDE_DIR=$STAGE_PATH/include/spatialindex \ - -DSPATIALINDEX_LIBRARY=$STAGE_PATH/lib/libspatialindex.a \ - -DSPATIALITE_INCLUDE_DIR=$STAGE_PATH/include \ - -DSPATIALITE_LIBRARY=$STAGE_PATH/lib/libspatialite.a \ - -DPYTHON_EXECUTABLE=`which python3` \ - -DWITH_INTERNAL_POLY2TRI=FALSE \ - -DPoly2Tri_INCLUDE_DIR=$STAGE_PATH/include/poly2tri \ - -DPoly2Tri_LIBRARY=${QT_PATH}/lib/libQt6Bundled_Poly2Tri.a \ - -DWITH_QTSERIALPORT=OFF \ - -DWITH_QT5SERIALPORT=OFF \ - -DWITH_3D=OFF \ - -DWITH_BINDINGS=OFF \ - -DWITH_INTERNAL_SPATIALITE=OFF \ - -DWITH_ANALYSIS=OFF \ - -DWITH_GRASS=OFF \ - -DWITH_GEOREFERENCER=OFF \ - -DWITH_QTMOBILITY=OFF \ - -DWITH_QUICK=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_WITH_QT6=ON \ - -DENABLE_TESTS=OFF \ - -DEXIV2_INCLUDE_DIR=$STAGE_PATH/include \ - -DEXIV2_LIBRARY=$STAGE_PATH/lib/libexiv2.a \ - -DEXPAT_INCLUDE_DIR=$STAGE_PATH/include \ - -DEXPAT_LIBRARY=$STAGE_PATH/lib/libexpat.a \ - -DWITH_INTERNAL_QWTPOLAR=OFF \ - -DWITH_QWTPOLAR=OFF \ - -DWITH_GUI=OFF \ - -DWITH_APIDOC=OFF \ - -DWITH_ASTYLE=OFF \ - -DCMAKE_DISABLE_FIND_PACKAGE_QtQmlTools=TRUE \ - -DIOS=TRUE \ - -DLIBTIFF_LIBRARY=$STAGE_PATH/lib/libtiff.a \ - -DLIBTIFFXX_LIBRARY=$STAGE_PATH/lib/libtiffxx.a \ - -DFREEXL_LIBRARY=$STAGE_PATH/lib/libfreexl.a \ - -DCHARSET_LIBRARY=$STAGE_PATH/lib/libcharset.a \ - -DGEOSCXX_LIBRARY=$STAGE_PATH/lib/libgeos.a \ - -DWITH_QGIS_PROCESS=OFF \ - -DProtobuf_PROTOC_EXECUTABLE:FILEPATH=$NATIVE_STAGE_PATH/bin/protoc \ - -DProtobuf_INCLUDE_DIRS:PATH=$STAGE_PATH/include \ - -DProtobuf_LIBRARY=$STAGE_PATH/lib/libprotobuf.a \ - -DProtobuf_LITE_LIBRARY=$STAGE_PATH/lib/libprotobuf-lite.a \ - -DProtobuf_PROTOC_LIBRARY=$STAGE_PATH/lib/libprotoc.a \ - -DWITH_AUTH=ON \ - -DQGIS_MACAPP_BUNDLE=-1 \ - -DNATIVE_CRSSYNC_BIN=/usr/bin/true \ - $BUILD_qgis - - try $MAKESMP install - - # Why it is not copied by CMake? - try cp $BUILD_PATH/qgis/build-$ARCH/src/core/qgis_core.h ${STAGE_PATH}/QGIS.app/Contents/Frameworks/qgis_core.framework/Headers/ - - # bundle QGIS's find packages too - try mkdir -p $STAGE_PATH/cmake/ - try cp -Rf $BUILD_qgis/cmake/* $STAGE_PATH/cmake/ - - pop_arm -} - -# function called after all the compile have been done -function postbuild_qgis() { - # bundle QGIS's find packages too - try mkdir -p $STAGE_PATH/cmake/ - try cp -Rf $BUILD_qgis/cmake/* $STAGE_PATH/cmake/ -} diff --git a/ios/recipes/qtkeychain/recipe.sh b/ios/recipes/qtkeychain/recipe.sh deleted file mode 100755 index 568012d5..00000000 --- a/ios/recipes/qtkeychain/recipe.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qtkeychain=() - -# default build path -BUILD_qtkeychain=$BUILD_PATH/qtkeychain/$(get_directory $URL_qtkeychain) - -# default recipe path -RECIPE_qtkeychain=$RECIPES_PATH/qtkeychain - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_qtkeychain() { - cd $BUILD_qtkeychain - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qtkeychain() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libqt6keychain.a -nt $BUILD_qtkeychain/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_qtkeychain() { - try mkdir -p $BUILD_qtkeychain/build-$ARCH - try cd $BUILD_qtkeychain/build-$ARCH - - push_arm - - # configure - try ${CMAKECMD} \ - -DBUILD_WITH_QT6=ON \ - -DBUILD_TEST_APPLICATION=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_TOOLS=OFF \ - -DWITH_nss_PLUGIN=OFF \ - -DWITH_pkcs11_PLUGIN=OFF \ - $BUILD_qtkeychain - try $MAKESMP install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_qtkeychain() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libqt6keychain.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/sqlite3/recipe.sh b/ios/recipes/sqlite3/recipe.sh deleted file mode 100755 index d44982bd..00000000 --- a/ios/recipes/sqlite3/recipe.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_sqlite3=() - -# default build path -BUILD_sqlite3=$BUILD_PATH/sqlite3/sqlite-autoconf-$URL_sqlite3_BASE - -# default recipe path -RECIPE_sqlite3=$RECIPES_PATH/sqlite3 - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_sqlite3() { - cd $BUILD_sqlite3 - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_sqlite3 - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_sqlite3 - - touch .patched -} - -function shouldbuild_sqlite3() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libsqlite3.a -nt $BUILD_sqlite3/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_sqlite3() { - try mkdir -p $BUILD_PATH/sqlite3/build-$ARCH - try cd $BUILD_PATH/sqlite3/build-$ARCH - - push_arm - - export CFLAGS="${CFLAGS} -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK" - export CFLAGS="${CFLAGS} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_MAX_VARIABLE_NUMBER=250000 -DSQLITE_ENABLE_FTS3=1" - export CFLAGS="${CFLAGS} -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_JSON1=1" - - try $BUILD_sqlite3/configure \ - --prefix=$STAGE_PATH \ - --host=$TOOLCHAIN_PREFIX \ - --disable-shared \ - --enable-static - - # manual install - try $MAKESMP install-libLTLIBRARIES - try $MAKESMP install-includeHEADERS - - pop_arm -} - -# function called after all the compile have been done -function postbuild_sqlite3() { - LIB_ARCHS=`lipo -archs ${STAGE_PATH}/lib/libsqlite3.a` - if [[ $LIB_ARCHS != *"$ARCH"* ]]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/webp/recipe.sh b/ios/recipes/webp/recipe.sh deleted file mode 100755 index bd75779f..00000000 --- a/ios/recipes/webp/recipe.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -# version of your package in ../../version.conf - -# dependencies of this recipe -DEPS_webp=() - -# default build path -BUILD_webp=$BUILD_PATH/webp/$(get_directory $URL_webp) - -# default recipe path -RECIPE_webp=$RECIPES_PATH/webp - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_webp() { - cd $BUILD_webp - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_webp() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libwebp.a -nt $BUILD_webp/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_webp() { - try mkdir -p $BUILD_PATH/webp/build-$ARCH - try cd $BUILD_PATH/webp/build-$ARCH - push_arm - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - -DWEBP_BUILD_GIF2WEBP=OFF \ - -DCMAKE_DISABLE_FIND_PACKAGE_GIF=TRUE \ - -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=TRUE \ - -DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE \ - -DCMAKE_DISABLE_FIND_PACKAGE_TIFF=TRUE \ - -DWEBP_BUILD_EXTRAS=FALSE \ - -DWEBP_BUILD_ANIM_UTILS=FALSE \ - -DWEBP_BUILD_CWEBP=FALSE \ - -DWEBP_BUILD_DWEBP=FALSE \ - -DWEBP_BUILD_GIF2WEBP=FALSE \ - -DWEBP_BUILD_IMG2WEBP=FALSE \ - -DWEBP_BUILD_VWEBP=FALSE \ - -DWEBP_BUILD_WEBPINFO=FALSE \ - -DWEBP_BUILD_WEBPMUX=FALSE \ - $BUILD_webp - - check_file_configuration CMakeCache.txt - - try $MAKESMP - try $MAKESMP install - pop_arm -} - -# function called after all the compile have been done -function postbuild_webp() { - if [ ! -f $STAGE_PATH/lib/libwebp.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/ios/recipes/zxing/recipe.sh b/ios/recipes/zxing/recipe.sh deleted file mode 100755 index 8fee582f..00000000 --- a/ios/recipes/zxing/recipe.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_zxing=() - -# default build path -BUILD_zxing=$BUILD_PATH/zxing/$(get_directory $URL_zxing) - -# default recipe path -RECIPE_zxing=$RECIPES_PATH/zxing - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_zxing() { - cd $BUILD_zxing - - # check marker - if [ -f .patched ]; then - return - fi -} - -function shouldbuild_zxing() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libZXing.a -nt $BUILD_zxing/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_zxing() { - try mkdir -p $BUILD_PATH/zxing/build-$ARCH - try cd $BUILD_PATH/zxing/build-$ARCH - push_arm - - # configure - try $CMAKECMD \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_BLACKBOX_TESTS=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_UNIT_TESTS=OFF \ - $BUILD_zxing - - try $MAKESMP - try $MAKE install - - pop_arm -} - -# function called after all the compile have been done -function postbuild_zxing() { - true -} diff --git a/ios/tools/depsort.py b/ios/tools/depsort.py deleted file mode 100755 index 413b2e05..00000000 --- a/ios/tools/depsort.py +++ /dev/null @@ -1,199 +0,0 @@ -#! /usr/bin/env python3 - -import argparse -import sys - -class Graph(object): - def __init__(self): - # `graph`: dict that maps each package to a set of its dependencies. - self.graph = {} - - def add(self, dependent, dependency): - """Add a dependency relationship to the graph""" - self.graph.setdefault(dependent, set()) - self.graph.setdefault(dependency, set()) - if dependent != dependency: - self.graph[dependent].add(dependency) - - def add_optional(self, dependent, dependency): - """Add an optional (ordering only) dependency relationship to the graph - - Only call this after all mandatory requirements are added - """ - if dependent in self.graph and dependency in self.graph: - self.add(dependent, dependency) - - def find_order(self): - """Do a topological sort on a dependency graph - - :Parameters: - :Returns: - iterator, sorted items form first to last - """ - graph = dict((k, set(v)) for k, v in list(self.graph.items())) - while graph: - # Find all items without a parent - leftmost = [l for l, s in list(graph.items()) if not s] - if not leftmost: - raise ValueError('Dependency cycle detected! %s' % graph) - # If there is more than one, sort them for predictable order - leftmost.sort() - for result in leftmost: - # Yield and remove them from the graph - yield result - graph.pop(result) - for bset in list(graph.values()): - bset.discard(result) - - -def lines_to_relationships(lines): - """Do a topological sort from a list of space-separated lines - - :Parameters: - `lines`: Iterable of lines in the format - "dependent dependency_0 dependency_1 ... dependency_n" - - :Returns: - iterator of (dependent, dependency) tuples - """ - for line in lines: - line = line.split() - if line: - dependent = line[0] - for dependency in line: - yield dependent, dependency - - -def topo_sort_lines(lines, lines_optional=()): - """Do a topological sort from a list of space-separated lines - - :Parameters: - `lines`: Iterable of lines in the format - "dependent dependency_0 dependency_1 ... dependency_n" - - `lines`: Iterable of lines with *optional* (ordering-only) dependencies - "dependent dependency_0 dependency_1 ... dependency_n" - - :Returns: - string, Sorted dependencies, space-separated - """ - graph = Graph() - for dependent, dependency in lines_to_relationships(lines): - graph.add(dependent, dependency) - for dependent, dependency in lines_to_relationships(lines_optional): - graph.add_optional(dependent, dependency) - return ' '.join(graph.find_order()) - - -def test_depsort_1(): - lines = [ - 'c a', - 'b c', - 'd b', - 'w z', - 'a w', - ] - assert topo_sort_lines(lines) == 'z w a c b d' - - -def test_depsort_2(): - lines = [ - 'l k', - 'm l', - 'a k', - 'd a', - 'l d', - 's l', - 'm s', - ] - assert topo_sort_lines(lines) == 'k a d l s m' - - -def test_depsort_3(): - lines = [ - 'z a', - 's z', - 'z z', - 's s', - ] - assert topo_sort_lines(lines) == 'a z s' - - -def test_depsort_4(): - lines = [ - 'f d', - 'g f', - 'r f', - 't r', - 'y t', - 'g y', - ] - assert topo_sort_lines(lines) == 'd f r t y g' - - -def test_depsort_5(): - lines = [ - 'a b c d e f', - 'e f', - 'g', - ] - assert topo_sort_lines(lines) == 'b c d f g e a' - - -def test_depsort_6(): - lines = [ - ' numpy python ', - ' kivy pygame pyjnius android ', - ' python hostpython ', - ' pygame sdl ', - ' android pygame ', - ' pyjnius python ', - ' sdl python ', - ' hostpython ', - ] - assert topo_sort_lines(lines) == ( - 'hostpython python numpy pyjnius sdl pygame android kivy') - - -def test_depsort_optional_1(): - lines = [' myapp openssl python '] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'openssl python myapp' - - -def test_depsort_optional_2(): - lines = [' myapp openssl python '] - # Just for testing purposes, make openssl soft-depend on python - optional = ['openssl python'] - assert topo_sort_lines(lines, optional) == 'python openssl myapp' - - -def test_depsort_optional_3(): - lines = ['myapp openssl'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'openssl myapp' - - -def test_depsort_optional_4(): - lines = ['myapp python'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'python myapp' - - -def test_depsort_optional_4(): - lines = ['myapp'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'myapp' - - -def main(argv): - parser = argparse.ArgumentParser( - description="Sort dependencies given on standard input") - parser.add_argument('--optional', type=argparse.FileType('r'), - help='File with optional (ordering-only) dependencies') - args = parser.parse_args(argv[1:]) - return topo_sort_lines(sys.stdin, lines_optional=args.optional or []) - - -if __name__ == '__main__': - print(main(sys.argv)) diff --git a/ios/tools/ios.toolchain.cmake b/ios/tools/ios.toolchain.cmake deleted file mode 100644 index ad25bc65..00000000 --- a/ios/tools/ios.toolchain.cmake +++ /dev/null @@ -1,725 +0,0 @@ -# This file is part of the ios-cmake project. It was retrieved from -# https://github.com/cristeab/ios-cmake.git, which is a fork of -# https://code.google.com/p/ios-cmake/. Which in turn is based off of -# the Platform/Darwin.cmake and Platform/UnixPaths.cmake files which -# are included with CMake 2.8.4 -# -# The ios-cmake project is licensed under the new BSD license. -# -# Copyright (c) 2014, Bogdan Cristea and LTE Engineering Software, -# Kitware, Inc., Insight Software Consortium. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -# This file is based off of the Platform/Darwin.cmake and -# Platform/UnixPaths.cmake files which are included with CMake 2.8.4 -# It has been altered for iOS development. -# -# Updated by Alex Stewart (alexs.mac@gmail.com) -# -# ***************************************************************************** -# Now maintained by Alexander Widerberg (widerbergaren [at] gmail.com) -# under the BSD-3-Clause license -# https://github.com/leetal/ios-cmake -# ***************************************************************************** -# -# INFORMATION / HELP -# -# The following arguments control the behaviour of this toolchain: -# -# PLATFORM: (default "OS") -# OS = Build for iPhoneOS. -# OS64 = Build for arm64 iphoneOS. -# OS64COMBINED = Build for arm64 x86_64 iphoneOS. Combined into FAT STATIC lib (supported on 3.14+ of CMakewith "-G Xcode" argument ONLY) -# SIMULATOR = Build for x86 i386 iphoneOS Simulator. -# SIMULATOR64 = Build for x86_64 iphoneOS Simulator. -# TVOS = Build for arm64 tvOS. -# TVOSCOMBINED = Build for arm64 x86_64 tvOS. Combined into FAT STATIC lib (supported on 3.14+ of CMake with "-G Xcode" argument ONLY) -# SIMULATOR_TVOS = Build for x86_64 tvOS Simulator. -# WATCHOS = Build for armv7k arm64_32 for watchOS. -# WATCHOSCOMBINED = Build for armv7k arm64_32 x86_64 watchOS. Combined into FAT STATIC lib (supported on 3.14+ of CMake with "-G Xcode" argument ONLY) -# SIMULATOR_WATCHOS = Build for x86_64 for watchOS Simulator. -# -# CMAKE_OSX_SYSROOT: Path to the SDK to use. By default this is -# automatically determined from PLATFORM and xcodebuild, but -# can also be manually specified (although this should not be required). -# -# CMAKE_DEVELOPER_ROOT: Path to the Developer directory for the platform -# being compiled for. By default this is automatically determined from -# CMAKE_OSX_SYSROOT, but can also be manually specified (although this should -# not be required). -# -# DEPLOYMENT_TARGET: Minimum SDK version to target. Default 2.0 on watchOS and 9.0 on tvOS+iOS -# -# ENABLE_BITCODE: (1|0) Enables or disables bitcode support. Default 1 (true) -# -# ENABLE_ARC: (1|0) Enables or disables ARC support. Default 1 (true, ARC enabled by default) -# -# ENABLE_VISIBILITY: (1|0) Enables or disables symbol visibility support. Default 0 (false, visibility hidden by default) -# -# ENABLE_STRICT_TRY_COMPILE: (1|0) Enables or disables strict try_compile() on all Check* directives (will run linker -# to actually check if linking is possible). Default 0 (false, will set CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY) -# -# ARCHS: (armv7 armv7s armv7k arm64 arm64_32 i386 x86_64) If specified, will override the default architectures for the given PLATFORM -# OS = armv7 armv7s arm64 (if applicable) -# OS64 = arm64 (if applicable) -# SIMULATOR = i386 -# SIMULATOR64 = x86_64 -# TVOS = arm64 -# SIMULATOR_TVOS = x86_64 (i386 has since long been deprecated) -# WATCHOS = armv7k arm64_32 (if applicable) -# SIMULATOR_WATCHOS = x86_64 (i386 has since long been deprecated) -# -# This toolchain defines the following variables for use externally: -# -# XCODE_VERSION: Version number (not including Build version) of Xcode detected. -# SDK_VERSION: Version of SDK being used. -# CMAKE_OSX_ARCHITECTURES: Architectures being compiled for (generated from PLATFORM). -# APPLE_TARGET_TRIPLE: Used by autoconf build systems. NOTE: If "ARCHS" are overridden, this will *NOT* be set! -# -# This toolchain defines the following macros for use externally: -# -# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE XCODE_VARIANT) -# A convenience macro for setting xcode specific properties on targets. -# Available variants are: All, Release, RelWithDebInfo, Debug, MinSizeRel -# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1" "all"). -# -# find_host_package (PROGRAM ARGS) -# A macro used to find executable programs on the host system, not within the -# environment. Thanks to the android-cmake project for providing the -# command. -# -# ******************************** DEPRECATIONS ******************************* -# -# IOS_DEPLOYMENT_TARGET: (Deprecated) Alias to DEPLOYMENT_TARGET -# CMAKE_IOS_DEVELOPER_ROOT: (Deprecated) Alias to CMAKE_DEVELOPER_ROOT -# IOS_PLATFORM: (Deprecated) Alias to PLATFORM -# IOS_ARCH: (Deprecated) Alias to ARCHS -# -# ***************************************************************************** -# - -# Fix for PThread library not in path -set(CMAKE_THREAD_LIBS_INIT "-lpthread") -set(CMAKE_HAVE_THREADS_LIBRARY 1) -set(CMAKE_USE_WIN32_THREADS_INIT 0) -set(CMAKE_USE_PTHREADS_INIT 1) - -# Cache what generator is used -set(USED_CMAKE_GENERATOR "${CMAKE_GENERATOR}" CACHE STRING "Expose CMAKE_GENERATOR" FORCE) - -if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14") - set(MODERN_CMAKE YES) -endif() - -# Get the Xcode version being used. -execute_process(COMMAND xcodebuild -version - OUTPUT_VARIABLE XCODE_VERSION - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) -string(REGEX MATCH "Xcode [0-9\\.]+" XCODE_VERSION "${XCODE_VERSION}") -string(REGEX REPLACE "Xcode ([0-9\\.]+)" "\\1" XCODE_VERSION "${XCODE_VERSION}") - -######## ALIASES (DEPRECATION WARNINGS) - -if(DEFINED IOS_PLATFORM) - set(PLATFORM ${IOS_PLATFORM}) - message(DEPRECATION "IOS_PLATFORM argument is DEPRECATED. Consider using the new PLATFORM argument instead.") -endif() - -if(DEFINED IOS_DEPLOYMENT_TARGET) - set(DEPLOYMENT_TARGET ${IOS_DEPLOYMENT_TARGET}) - message(DEPRECATION "IOS_DEPLOYMENT_TARGET argument is DEPRECATED. Consider using the new DEPLOYMENT_TARGET argument instead.") -endif() - -if(DEFINED CMAKE_IOS_DEVELOPER_ROOT) - set(CMAKE_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT}) - message(DEPRECATION "CMAKE_IOS_DEVELOPER_ROOT argument is DEPRECATED. Consider using the new CMAKE_DEVELOPER_ROOT argument instead.") -endif() - -if(DEFINED IOS_ARCH) - set(ARCHS ${IOS_ARCH}) - message(DEPRECATION "IOS_ARCH argument is DEPRECATED. Consider using the new ARCHS argument instead.") -endif() - -######## END ALIASES - -# Unset the FORCE on cache variables if in try_compile() -set(FORCE_CACHE FORCE) -get_property(_CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE) -if(_CMAKE_IN_TRY_COMPILE) - unset(FORCE_CACHE) -endif() - -# Default to building for iPhoneOS if not specified otherwise, and we cannot -# determine the platform from the CMAKE_OSX_ARCHITECTURES variable. The use -# of CMAKE_OSX_ARCHITECTURES is such that try_compile() projects can correctly -# determine the value of PLATFORM from the root project, as -# CMAKE_OSX_ARCHITECTURES is propagated to them by CMake. -if(NOT DEFINED PLATFORM) - if (CMAKE_OSX_ARCHITECTURES) - if(CMAKE_OSX_ARCHITECTURES MATCHES ".*arm.*" AND CMAKE_OSX_SYSROOT MATCHES ".*iphoneos.*") - set(PLATFORM "OS") - elseif(CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_SYSROOT MATCHES ".*iphonesimulator.*") - set(PLATFORM "SIMULATOR") - elseif(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" AND CMAKE_OSX_SYSROOT MATCHES ".*iphonesimulator.*") - set(PLATFORM "SIMULATOR64") - elseif(CMAKE_OSX_ARCHITECTURES MATCHES "arm64" AND CMAKE_OSX_SYSROOT MATCHES ".*appletvos.*") - set(PLATFORM "TVOS") - elseif(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" AND CMAKE_OSX_SYSROOT MATCHES ".*appletvsimulator.*") - set(PLATFORM "SIMULATOR_TVOS") - elseif(CMAKE_OSX_ARCHITECTURES MATCHES ".*armv7k.*" AND CMAKE_OSX_SYSROOT MATCHES ".*watchos.*") - set(PLATFORM "WATCHOS") - elseif(CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_SYSROOT MATCHES ".*watchsimulator.*") - set(PLATFORM "SIMULATOR_WATCHOS") - endif() - endif() - if (NOT PLATFORM) - set(PLATFORM "OS") - endif() -endif() - -set(PLATFORM_INT "${PLATFORM}" CACHE STRING "Type of platform for which the build targets.") - -# Handle the case where we are targeting iOS and a version above 10.3.4 (32-bit support dropped officially) -if(PLATFORM_INT STREQUAL "OS" AND DEPLOYMENT_TARGET VERSION_GREATER_EQUAL 10.3.4) - set(PLATFORM_INT "OS64") - message(STATUS "Targeting minimum SDK version ${DEPLOYMENT_TARGET}. Dropping 32-bit support.") -elseif(PLATFORM_INT STREQUAL "SIMULATOR" AND DEPLOYMENT_TARGET VERSION_GREATER_EQUAL 10.3.4) - set(PLATFORM_INT "SIMULATOR64") - message(STATUS "Targeting minimum SDK version ${DEPLOYMENT_TARGET}. Dropping 32-bit support.") -endif() - -# Determine the platform name and architectures for use in xcodebuild commands -# from the specified PLATFORM name. -if(PLATFORM_INT STREQUAL "OS") - set(SDK_NAME iphoneos) - if(NOT ARCHS) - set(ARCHS armv7 armv7s arm64) - set(APPLE_TARGET_TRIPLE_INT arm-apple-ios) - endif() -elseif(PLATFORM_INT STREQUAL "OS64") - set(SDK_NAME iphoneos) - if(NOT ARCHS) - if (XCODE_VERSION VERSION_GREATER 10.0) - set(ARCHS arm64) # Add arm64e when Apple have fixed the integration issues with it, libarclite_iphoneos.a is currently missung bitcode markers for example - else() - set(ARCHS arm64) - endif() - set(APPLE_TARGET_TRIPLE_INT aarch64-apple-ios) - endif() -elseif(PLATFORM_INT STREQUAL "OS64COMBINED") - set(SDK_NAME iphoneos) - if(MODERN_CMAKE) - if(NOT ARCHS) - if (XCODE_VERSION VERSION_GREATER 10.0) - set(ARCHS arm64 x86_64) # Add arm64e when Apple have fixed the integration issues with it, libarclite_iphoneos.a is currently missung bitcode markers for example - else() - set(ARCHS arm64 x86_64) - endif() - set(APPLE_TARGET_TRIPLE_INT aarch64-x86_64-apple-ios) - endif() - else() - message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the OS64COMBINED setting work") - endif() -elseif(PLATFORM_INT STREQUAL "SIMULATOR") - set(SDK_NAME iphonesimulator) - if(NOT ARCHS) - set(ARCHS i386) - set(APPLE_TARGET_TRIPLE_INT i386-apple-ios) - endif() - message(DEPRECATION "SIMULATOR IS DEPRECATED. Consider using SIMULATOR64 instead.") -elseif(PLATFORM_INT STREQUAL "SIMULATOR64") - set(SDK_NAME iphonesimulator) - if(NOT ARCHS) - set(ARCHS x86_64) - set(APPLE_TARGET_TRIPLE_INT x86_64-apple-ios) - endif() -elseif(PLATFORM_INT STREQUAL "TVOS") - set(SDK_NAME appletvos) - if(NOT ARCHS) - set(ARCHS arm64) - set(APPLE_TARGET_TRIPLE_INT aarch64-apple-tvos) - endif() -elseif (PLATFORM_INT STREQUAL "TVOSCOMBINED") - set(SDK_NAME appletvos) - if(MODERN_CMAKE) - if(NOT ARCHS) - set(ARCHS arm64 x86_64) - set(APPLE_TARGET_TRIPLE_INT aarch64-x86_64-apple-tvos) - endif() - else() - message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the TVOSCOMBINED setting work") - endif() -elseif(PLATFORM_INT STREQUAL "SIMULATOR_TVOS") - set(SDK_NAME appletvsimulator) - if(NOT ARCHS) - set(ARCHS x86_64) - set(APPLE_TARGET_TRIPLE_INT x86_64-apple-tvos) - endif() -elseif(PLATFORM_INT STREQUAL "WATCHOS") - set(SDK_NAME watchos) - if(NOT ARCHS) - if (XCODE_VERSION VERSION_GREATER 10.0) - set(ARCHS armv7k arm64_32) - set(APPLE_TARGET_TRIPLE_INT aarch64_32-apple-watchos) - else() - set(ARCHS armv7k) - set(APPLE_TARGET_TRIPLE_INT arm-apple-watchos) - endif() - endif() -elseif(PLATFORM_INT STREQUAL "WATCHOSCOMBINED") - set(SDK_NAME watchos) - if(MODERN_CMAKE) - if(NOT ARCHS) - if (XCODE_VERSION VERSION_GREATER 10.0) - set(ARCHS armv7k arm64_32 i386) - set(APPLE_TARGET_TRIPLE_INT aarch64_32-i386-apple-watchos) - else() - set(ARCHS armv7k i386) - set(APPLE_TARGET_TRIPLE_INT arm-i386-apple-watchos) - endif() - endif() - else() - message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the WATCHOSCOMBINED setting work") - endif() -elseif(PLATFORM_INT STREQUAL "SIMULATOR_WATCHOS") - set(SDK_NAME watchsimulator) - if(NOT ARCHS) - set(ARCHS i386) - set(APPLE_TARGET_TRIPLE_INT i386-apple-watchos) - endif() -else() - message(FATAL_ERROR "Invalid PLATFORM: ${PLATFORM_INT}") -endif() - -if(MODERN_CMAKE AND PLATFORM_INT MATCHES ".*COMBINED" AND NOT USED_CMAKE_GENERATOR MATCHES "Xcode") - message(FATAL_ERROR "The COMBINED options only work with Xcode generator, -G Xcode") -endif() - -# If user did not specify the SDK root to use, then query xcodebuild for it. -execute_process(COMMAND xcodebuild -version -sdk ${SDK_NAME} Path - OUTPUT_VARIABLE CMAKE_OSX_SYSROOT_INT - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) -if (NOT DEFINED CMAKE_OSX_SYSROOT_INT AND NOT DEFINED CMAKE_OSX_SYSROOT) - message(SEND_ERROR "Please make sure that Xcode is installed and that the toolchain" - "is pointing to the correct path. Please run:" - "sudo xcode-select -s /Applications/Xcode.app/Contents/Developer" - "and see if that fixes the problem for you.") - message(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} " - "does not exist.") -elseif(DEFINED CMAKE_OSX_SYSROOT_INT) - set(CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT_INT}" CACHE INTERNAL "") -endif() - -# Set Xcode property for SDKROOT as well if Xcode generator is used -if(USED_CMAKE_GENERATOR MATCHES "Xcode") - set(CMAKE_OSX_SYSROOT "${SDK_NAME}" CACHE INTERNAL "") - if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM) - set(CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "123456789A" CACHE INTERNAL "") - endif() -endif() - -# Specify minimum version of deployment target. -if(NOT DEFINED DEPLOYMENT_TARGET) - if (PLATFORM_INT STREQUAL "WATCHOS" OR PLATFORM_INT STREQUAL "SIMULATOR_WATCHOS") - # Unless specified, SDK version 2.0 is used by default as minimum target version (watchOS). - set(DEPLOYMENT_TARGET "2.0" - CACHE STRING "Minimum SDK version to build for." ) - else() - # Unless specified, SDK version 9.0 is used by default as minimum target version (iOS, tvOS). - set(DEPLOYMENT_TARGET "9.0" - CACHE STRING "Minimum SDK version to build for." ) - endif() - message(STATUS "Using the default min-version since DEPLOYMENT_TARGET not provided!") -endif() - -# Use bitcode or not -if(NOT DEFINED ENABLE_BITCODE AND NOT ARCHS MATCHES "((^|;|, )(i386|x86_64))+") - # Unless specified, enable bitcode support by default - message(STATUS "Enabling bitcode support by default. ENABLE_BITCODE not provided!") - set(ENABLE_BITCODE TRUE) -elseif(NOT DEFINED ENABLE_BITCODE) - message(STATUS "Disabling bitcode support by default on simulators. ENABLE_BITCODE not provided for override!") - set(ENABLE_BITCODE FALSE) -endif() -set(ENABLE_BITCODE_INT ${ENABLE_BITCODE} CACHE BOOL "Whether or not to enable bitcode" ${FORCE_CACHE}) -# Use ARC or not -if(NOT DEFINED ENABLE_ARC) - # Unless specified, enable ARC support by default - set(ENABLE_ARC TRUE) - message(STATUS "Enabling ARC support by default. ENABLE_ARC not provided!") -endif() -set(ENABLE_ARC_INT ${ENABLE_ARC} CACHE BOOL "Whether or not to enable ARC" ${FORCE_CACHE}) -# Use hidden visibility or not -if(NOT DEFINED ENABLE_VISIBILITY) - # Unless specified, disable symbols visibility by default - set(ENABLE_VISIBILITY FALSE) - message(STATUS "Hiding symbols visibility by default. ENABLE_VISIBILITY not provided!") -endif() -set(ENABLE_VISIBILITY_INT ${ENABLE_VISIBILITY} CACHE BOOL "Whether or not to hide symbols (-fvisibility=hidden)" ${FORCE_CACHE}) -# Set strict compiler checks or not -if(NOT DEFINED ENABLE_STRICT_TRY_COMPILE) - # Unless specified, disable strict try_compile() - set(ENABLE_STRICT_TRY_COMPILE FALSE) - message(STATUS "Using NON-strict compiler checks by default. ENABLE_STRICT_TRY_COMPILE not provided!") -endif() -set(ENABLE_STRICT_TRY_COMPILE_INT ${ENABLE_STRICT_TRY_COMPILE} CACHE BOOL "Whether or not to use strict compiler checks" ${FORCE_CACHE}) -# Get the SDK version information. -execute_process(COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version SDKVersion - OUTPUT_VARIABLE SDK_VERSION - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - -# Find the Developer root for the specific iOS platform being compiled for -# from CMAKE_OSX_SYSROOT. Should be ../../ from SDK specified in -# CMAKE_OSX_SYSROOT. There does not appear to be a direct way to obtain -# this information from xcrun or xcodebuild. -if (NOT DEFINED CMAKE_DEVELOPER_ROOT AND NOT USED_CMAKE_GENERATOR MATCHES "Xcode") - get_filename_component(PLATFORM_SDK_DIR ${CMAKE_OSX_SYSROOT} PATH) - get_filename_component(CMAKE_DEVELOPER_ROOT ${PLATFORM_SDK_DIR} PATH) - if (NOT DEFINED CMAKE_DEVELOPER_ROOT) - message(FATAL_ERROR "Invalid CMAKE_DEVELOPER_ROOT: " - "${CMAKE_DEVELOPER_ROOT} does not exist.") - endif() -endif() -# Find the C & C++ compilers for the specified SDK. -if(NOT CMAKE_C_COMPILER) - execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang - OUTPUT_VARIABLE CMAKE_C_COMPILER - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - message(STATUS "Using C compiler: ${CMAKE_C_COMPILER}") -endif() -if(NOT CMAKE_CXX_COMPILER) - execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang++ - OUTPUT_VARIABLE CMAKE_CXX_COMPILER - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - message(STATUS "Using CXX compiler: ${CMAKE_CXX_COMPILER}") -endif() -# Find (Apple's) libtool. -execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find libtool - OUTPUT_VARIABLE BUILD_LIBTOOL - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) -message(STATUS "Using libtool: ${BUILD_LIBTOOL}") -# Configure libtool to be used instead of ar + ranlib to build static libraries. -# This is required on Xcode 7+, but should also work on previous versions of -# Xcode. -set(CMAKE_C_CREATE_STATIC_LIBRARY - "${BUILD_LIBTOOL} -static -o ") -set(CMAKE_CXX_CREATE_STATIC_LIBRARY - "${BUILD_LIBTOOL} -static -o ") -# Find the toolchain's provided install_name_tool if none is found on the host -if(NOT CMAKE_INSTALL_NAME_TOOL) - execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find install_name_tool - OUTPUT_VARIABLE CMAKE_INSTALL_NAME_TOOL_INT - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - set(CMAKE_INSTALL_NAME_TOOL ${CMAKE_INSTALL_NAME_TOOL_INT} CACHE STRING "" ${FORCE_CACHE}) -endif() -# Get the version of Darwin (OS X) of the host. -execute_process(COMMAND uname -r - OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) -if(SDK_NAME MATCHES "iphone") - set(CMAKE_SYSTEM_NAME iOS CACHE INTERNAL "" ${FORCE_CACHE}) -endif() -# CMake 3.14+ support building for iOS, watchOS and tvOS out of the box. -if(MODERN_CMAKE) - if(SDK_NAME MATCHES "appletv") - set(CMAKE_SYSTEM_NAME tvOS CACHE INTERNAL "" ${FORCE_CACHE}) - elseif(SDK_NAME MATCHES "watch") - set(CMAKE_SYSTEM_NAME watchOS CACHE INTERNAL "" ${FORCE_CACHE}) - endif() - # Provide flags for a combined FAT library build on newer CMake versions - if(PLATFORM_INT MATCHES ".*COMBINED") - set(CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO" CACHE INTERNAL "" ${FORCE_CACHE}) - set(CMAKE_IOS_INSTALL_COMBINED YES CACHE INTERNAL "" ${FORCE_CACHE}) - message(STATUS "Will combine built (static) artifacts into FAT lib...") - endif() -elseif(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.10") - # Legacy code path prior to CMake 3.14 or fallback if no SDK_NAME specified - set(CMAKE_SYSTEM_NAME iOS CACHE INTERNAL "" ${FORCE_CACHE}) -else() - # Legacy code path prior to CMake 3.14 or fallback if no SDK_NAME specified - set(CMAKE_SYSTEM_NAME Darwin CACHE INTERNAL "" ${FORCE_CACHE}) -endif() -# Standard settings. -set(CMAKE_SYSTEM_VERSION ${SDK_VERSION} CACHE INTERNAL "") -set(UNIX TRUE CACHE BOOL "") -set(APPLE TRUE CACHE BOOL "") -set(IOS TRUE CACHE BOOL "") -set(CMAKE_AR ar CACHE FILEPATH "" FORCE) -set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE) -set(CMAKE_STRIP strip CACHE FILEPATH "" FORCE) -# Set the architectures for which to build. -set(CMAKE_OSX_ARCHITECTURES ${ARCHS} CACHE STRING "Build architecture for iOS") -# Change the type of target generated for try_compile() so it'll work when cross-compiling, weak compiler checks -if(ENABLE_STRICT_TRY_COMPILE_INT) - message(STATUS "Using strict compiler checks (default in CMake).") -else() - set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) -endif() -# All iOS/Darwin specific settings - some may be redundant. -set(CMAKE_MACOSX_BUNDLE YES) -set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") -set(CMAKE_SHARED_LIBRARY_PREFIX "lib") -set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") -set(CMAKE_SHARED_MODULE_PREFIX "lib") -set(CMAKE_SHARED_MODULE_SUFFIX ".so") -set(CMAKE_C_COMPILER_ABI ELF) -set(CMAKE_CXX_COMPILER_ABI ELF) -set(CMAKE_C_HAS_ISYSROOT 1) -set(CMAKE_CXX_HAS_ISYSROOT 1) -set(CMAKE_MODULE_EXISTS 1) -set(CMAKE_DL_LIBS "") -set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") -set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ") -set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") -set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") - -if(ARCHS MATCHES "((^|;|, )(arm64|arm64e|x86_64))+") - set(CMAKE_C_SIZEOF_DATA_PTR 8) - set(CMAKE_CXX_SIZEOF_DATA_PTR 8) - if(ARCHS MATCHES "((^|;|, )(arm64|arm64e))+") - set(CMAKE_SYSTEM_PROCESSOR "aarch64") - else() - set(CMAKE_SYSTEM_PROCESSOR "x86_64") - endif() -else() - set(CMAKE_C_SIZEOF_DATA_PTR 4) - set(CMAKE_CXX_SIZEOF_DATA_PTR 4) - set(CMAKE_SYSTEM_PROCESSOR "arm") -endif() - -# Note that only Xcode 7+ supports the newer more specific: -# -m${SDK_NAME}-version-min flags, older versions of Xcode use: -# -m(ios/ios-simulator)-version-min instead. -if(${CMAKE_VERSION} VERSION_LESS "3.11") - if(PLATFORM_INT STREQUAL "OS" OR PLATFORM_INT STREQUAL "OS64") - if(XCODE_VERSION VERSION_LESS 7.0) - set(SDK_NAME_VERSION_FLAGS - "-mios-version-min=${DEPLOYMENT_TARGET}") - else() - # Xcode 7.0+ uses flags we can build directly from SDK_NAME. - set(SDK_NAME_VERSION_FLAGS - "-m${SDK_NAME}-version-min=${DEPLOYMENT_TARGET}") - endif() - elseif(PLATFORM_INT STREQUAL "TVOS") - set(SDK_NAME_VERSION_FLAGS - "-mtvos-version-min=${DEPLOYMENT_TARGET}") - elseif(PLATFORM_INT STREQUAL "SIMULATOR_TVOS") - set(SDK_NAME_VERSION_FLAGS - "-mtvos-simulator-version-min=${DEPLOYMENT_TARGET}") - elseif(PLATFORM_INT STREQUAL "WATCHOS") - set(SDK_NAME_VERSION_FLAGS - "-mwatchos-version-min=${DEPLOYMENT_TARGET}") - elseif(PLATFORM_INT STREQUAL "SIMULATOR_WATCHOS") - set(SDK_NAME_VERSION_FLAGS - "-mwatchos-simulator-version-min=${DEPLOYMENT_TARGET}") - else() - # SIMULATOR or SIMULATOR64 both use -mios-simulator-version-min. - set(SDK_NAME_VERSION_FLAGS - "-mios-simulator-version-min=${DEPLOYMENT_TARGET}") - endif() -else() - # Newer versions of CMake sets the version min flags correctly - set(CMAKE_OSX_DEPLOYMENT_TARGET ${DEPLOYMENT_TARGET} CACHE STRING - "Set CMake deployment target" ${FORCE_CACHE}) -endif() - -if(DEFINED APPLE_TARGET_TRIPLE_INT) - set(APPLE_TARGET_TRIPLE ${APPLE_TARGET_TRIPLE_INT} CACHE STRING - "Autoconf target triple compatible variable" ${FORCE_CACHE}) -endif() - -if(ENABLE_BITCODE_INT) - set(BITCODE "-fembed-bitcode") - set(CMAKE_XCODE_ATTRIBUTE_BITCODE_GENERATION_MODE "bitcode" CACHE INTERNAL "") - set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES" CACHE INTERNAL "") -else() - set(BITCODE "") - set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO" CACHE INTERNAL "") -endif() - -if(ENABLE_ARC_INT) - set(FOBJC_ARC "-fobjc-arc") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC "YES" CACHE INTERNAL "") -else() - set(FOBJC_ARC "-fno-objc-arc") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC "NO" CACHE INTERNAL "") -endif() - -if(NOT ENABLE_VISIBILITY_INT) - set(VISIBILITY "-fvisibility=hidden") - set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "YES" CACHE INTERNAL "") -else() - set(VISIBILITY "") - set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "NO" CACHE INTERNAL "") -endif() - -if(NOT IOS_TOOLCHAIN_HAS_RUN) - #Check if Xcode generator is used, since that will handle these flags automagically - if(USED_CMAKE_GENERATOR MATCHES "Xcode") - message(STATUS "Not setting any manual command-line buildflags, since Xcode is selected as generator.") - else() - set(CMAKE_C_FLAGS - "${SDK_NAME_VERSION_FLAGS} ${BITCODE} -fobjc-abi-version=2 ${FOBJC_ARC} ${CMAKE_C_FLAGS}") - # Hidden visibilty is required for C++ on iOS. - set(CMAKE_CXX_FLAGS - "${SDK_NAME_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} -fvisibility-inlines-hidden -fobjc-abi-version=2 ${FOBJC_ARC} ${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 -g ${CMAKE_CXX_FLAGS_DEBUG}") - set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -DNDEBUG -Os ${CMAKE_CXX_FLAGS_MINSIZEREL}") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -DNDEBUG -O2 -g ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -DNDEBUG -O3 ${CMAKE_CXX_FLAGS_RELEASE}") - set(CMAKE_C_LINK_FLAGS "${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}") - set(CMAKE_CXX_LINK_FLAGS "${SDK_NAME_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}") - set(CMAKE_ASM_FLAGS "${CFLAGS} -x assembler-with-cpp") - - # In order to ensure that the updated compiler flags are used in try_compile() - # tests, we have to forcibly set them in the CMake cache, not merely set them - # in the local scope. - set(VARS_TO_FORCE_IN_CACHE - CMAKE_C_FLAGS - CMAKE_CXX_FLAGS - CMAKE_CXX_FLAGS_DEBUG - CMAKE_CXX_FLAGS_RELWITHDEBINFO - CMAKE_CXX_FLAGS_MINSIZEREL - CMAKE_CXX_FLAGS_RELEASE - CMAKE_C_LINK_FLAGS - CMAKE_CXX_LINK_FLAGS) - foreach(VAR_TO_FORCE ${VARS_TO_FORCE_IN_CACHE}) - set(${VAR_TO_FORCE} "${${VAR_TO_FORCE}}" CACHE STRING "" ${FORCE_CACHE}) - endforeach() - endif() - - ## Print status messages to inform of the current state - message(STATUS "Configuring ${SDK_NAME} build for platform: ${PLATFORM_INT}, architecture(s): ${ARCHS}") - message(STATUS "Using SDK: ${CMAKE_OSX_SYSROOT_INT}") - if(DEFINED APPLE_TARGET_TRIPLE) - message(STATUS "Autoconf target triple: ${APPLE_TARGET_TRIPLE}") - endif() - message(STATUS "Using minimum deployment version: ${DEPLOYMENT_TARGET}" - " (SDK version: ${SDK_VERSION})") - if(MODERN_CMAKE) - message(STATUS "Merging integrated CMake 3.14+ iOS,tvOS,watchOS,macOS toolchain(s) with this toolchain!") - endif() - if(USED_CMAKE_GENERATOR MATCHES "Xcode") - message(STATUS "Using Xcode version: ${XCODE_VERSION}") - endif() - if(DEFINED SDK_NAME_VERSION_FLAGS) - message(STATUS "Using version flags: ${SDK_NAME_VERSION_FLAGS}") - endif() - message(STATUS "Using a data_ptr size of: ${CMAKE_CXX_SIZEOF_DATA_PTR}") - message(STATUS "Using install_name_tool: ${CMAKE_INSTALL_NAME_TOOL}") - if(ENABLE_BITCODE_INT) - message(STATUS "Enabling bitcode support.") - else() - message(STATUS "Disabling bitcode support.") - endif() - - if(ENABLE_ARC_INT) - message(STATUS "Enabling ARC support.") - else() - message(STATUS "Disabling ARC support.") - endif() - - if(NOT ENABLE_VISIBILITY_INT) - message(STATUS "Hiding symbols (-fvisibility=hidden).") - endif() -endif() - -set(CMAKE_PLATFORM_HAS_INSTALLNAME 1) -set(CMAKE_SHARED_LINKER_FLAGS "-rpath @executable_path/Frameworks -rpath @loader_path/Frameworks") -set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names") -set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names") -set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") -set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") -set(CMAKE_FIND_LIBRARY_SUFFIXES ".tbd" ".dylib" ".so" ".a") -set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name") - -# Set the find root to the iOS developer roots and to user defined paths. -set(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT_INT} ${CMAKE_PREFIX_PATH} CACHE STRING "Root path that will be prepended - to all search paths") -# Default to searching for frameworks first. -set(CMAKE_FIND_FRAMEWORK FIRST) -# Set up the default search directories for frameworks. -set(CMAKE_FRAMEWORK_PATH - ${CMAKE_DEVELOPER_ROOT}/Library/PrivateFrameworks - ${CMAKE_OSX_SYSROOT_INT}/System/Library/Frameworks - ${CMAKE_FRAMEWORK_PATH} CACHE STRING "Frameworks search paths" ${FORCE_CACHE}) - -set(IOS_TOOLCHAIN_HAS_RUN TRUE CACHE BOOL "Has the CMake toolchain run already?" ${FORCE_CACHE}) - -# By default, search both the specified iOS SDK and the remainder of the host filesystem. -if(NOT CMAKE_FIND_ROOT_PATH_MODE_PROGRAM) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH CACHE STRING "" ${FORCE_CACHE}) -endif() -if(NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH CACHE STRING "" ${FORCE_CACHE}) -endif() -if(NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH CACHE STRING "" ${FORCE_CACHE}) -endif() -if(NOT CMAKE_FIND_ROOT_PATH_MODE_PACKAGE) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH CACHE STRING "" ${FORCE_CACHE}) -endif() - -# -# Some helper-macros below to simplify and beautify the CMakeFile -# - -# This little macro lets you set any Xcode specific property. -macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE XCODE_RELVERSION) - set(XCODE_RELVERSION_I "${XCODE_RELVERSION}") - if(XCODE_RELVERSION_I STREQUAL "All") - set_property(TARGET ${TARGET} PROPERTY - XCODE_ATTRIBUTE_${XCODE_PROPERTY} "${XCODE_VALUE}") - else() - set_property(TARGET ${TARGET} PROPERTY - XCODE_ATTRIBUTE_${XCODE_PROPERTY}[variant=${XCODE_RELVERSION_I}] "${XCODE_VALUE}") - endif() -endmacro(set_xcode_property) - -# This macro lets you find executable programs on the host system. -macro(find_host_package) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER) - set(IOS FALSE) - find_package(${ARGN}) - set(IOS TRUE) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH) -endmacro(find_host_package) \ No newline at end of file diff --git a/linux/config.conf.default b/linux/config.conf.default deleted file mode 100644 index 852c341b..00000000 --- a/linux/config.conf.default +++ /dev/null @@ -1,5 +0,0 @@ -#### PATHS #### -export ROOT_OUT_PATH=/input-sdk/build/linux - -### BUILD ### -export ARCHES=("x86_64") diff --git a/linux/distribute.sh b/linux/distribute.sh deleted file mode 100755 index 1f6e46e9..00000000 --- a/linux/distribute.sh +++ /dev/null @@ -1,580 +0,0 @@ -#!/bin/bash - -if [[ "$OSTYPE" == "linux"* ]]; then - echo "Building input-sdk for Linux" -else - echo "Unable to build input-sdk binaries on $OSTYPE" - exit 1; -fi - -# Load configuration -source `dirname $0`/config.conf -source `dirname $0`/../versions.conf - -# Paths -ROOT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -STAGE_PATH="${ROOT_OUT_PATH}/stage/$ARCH" -RECIPES_PATH="$ROOT_PATH/recipes" -BUILD_PATH="${ROOT_OUT_PATH}/build" -LIBS_PATH="${ROOT_OUT_PATH}/build/libs" -PACKAGES_PATH="${PACKAGES_PATH:-$ROOT_OUT_PATH/.packages}" - -MD5SUM=$(which md5sum) -if [ "X$MD5SUM" == "X" ]; then - MD5SUM=$(which md5) - if [ "X$MD5SUM" == "X" ]; then - echo "Error: you need at least md5sum or md5 installed." - exit 1 - else - MD5SUM="$MD5SUM -r" - fi -fi - -WGET=$(which wget) -if [ "X$WGET" == "X" ]; then - WGET=$(which curl) - if [ "X$WGET" == "X" ]; then - echo "Error: you need at least wget or curl installed." - exit 1 - else - WGET="$WGET -L -o" - fi - WHEAD="curl -L -I" -else - WGET="$WGET -O" - WHEAD="wget --spider -q -S" -fi - -SED="/usr/bin/sed" - -AUTORECONF=$(which autoreconf) -if [ "X$AUTORECONF" == "X" ]; then - echo "Error: you need autoreconf installed." - exit 1 -fi - -# Internals -CRED="\x1b[31;01m" -CBLUE="\x1b[34;01m" -CGRAY="\x1b[30;01m" -CRESET="\x1b[39;49;00m" -DO_CLEAN_BUILD=0 -DO_SET_X=0 -DEBUG=0 - -function fold_push() { - echo "::group::${1}" -} - -function fold_pop() { - echo "::endgroup::" -} - -function try () { - "$@" || exit -1 -} - -function info() { - echo -e "$CBLUE"$@"$CRESET"; -} - -function error() { - echo -e "$CRED"$@"$CRESET"; -} - -function debug() { - echo -e "$CGRAY"$@"$CRESET"; -} - -function get_directory() { - case $1 in - *.tar.gz) directory=$(basename $1 .tar.gz) ;; - *.tgz) directory=$(basename $1 .tgz) ;; - *.tar.bz2) directory=$(basename $1 .tar.bz2) ;; - *.tbz2) directory=$(basename $1 .tbz2) ;; - *.zip) directory=$(basename $1 .zip) ;; - *) - error "Unknown file extension $1" - exit -1 - ;; - esac - echo $directory -} - - -function push_env() { - info "Entering in ${ARCH} environment" - - # save for pop - export OLD_MAKESMP=$MAKESMP - export OLD_MAKE=$MAKE - export OLD_CMAKECMD=$CMAKECMD - export OLD_CFLAGS=$CFLAGS - export OLD_CXXFLAGS=$CXXFLAGS - - export CFLAGS="$CFLAGS -I$STAGE_PATH/include" - export CXXFLAGS="$CXXFLAGS -I$STAGE_PATH/include" - export LDFLAGS="$LDFLAGS -L$STAGE_PATH/lib" - - CMAKECMD="cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH" - - export MAKESMP="make" # with more cores I have on CI: c++: fatal error: Killed signal terminated program cc1plus - export MAKE="make" - export CMAKECMD=$CMAKECMD -} - -function pop_env() { - info "Leaving ${ARCH} environment" - export MAKESMP=$OLD_MAKESMP - export MAKE=$OLD_MAKE - export CMAKECMD=$OLD_CMAKECMD - export CFLAGS=$OLD_CFLAGS - export CXXFLAGS=$OLD_CXXFLAGS -} - -function usage() { - echo "input-sdk - distribute.sh" - echo - echo "Usage: ./distribute.sh [options]" - echo - echo " -h Show this help" - echo " -l Show a list of available modules" - echo " -m 'mod1 mod2' Modules to include" - echo " -f Restart from scratch (remove the current build)" - echo " -x display expanded values (execute 'set -x')" - echo - echo "For developers:" - echo " -u 'mod1 mod2' Modules to update (if already compiled)" - echo - exit 0 -} - -function run_prepare() { - info "Check environment" - - info "Check mandatory tools" - # ensure that some tools are existing - for tool in tar bzip2 unzip; do - which $tool &>/dev/null - if [ $? -ne 0 ]; then - error "Tool $tool is missing" - exit -1 - fi - done - - if [ $DO_CLEAN_BUILD -eq 1 ]; then - info "Cleaning build" - try rm -rf $STAGE_PATH - try rm -rf $BUILD_PATH - try rm -rf $NATIVE_STAGE_PATH - fi - - info "Distribution will be located at $STAGE_PATH" - if [ -e "$STAGE_PATH" ]; then - info "The directory $STAGE_PATH already exist" - info "Will continue using and possibly overwrite what is in there" - fi - try mkdir -p "$STAGE_PATH" - - # create build directory if not found - test -d $PACKAGES_PATH || mkdir -p $PACKAGES_PATH - test -d $BUILD_PATH || mkdir -p $BUILD_PATH - test -d $LIBS_PATH || mkdir -p $LIBS_PATH - - # check arm env - push_env - pop_env -} - -function in_array() { - term="$1" - shift - i=0 - for key in $@; do - if [ $term == $key ]; then - return $i - fi - i=$(($i + 1)) - done - return 255 -} - -function run_source_modules() { - # preprocess version modules - needed=($MODULES) - while [ ${#needed[*]} -ne 0 ]; do - - # pop module from the needed list - module=${needed[0]} - unset needed[0] - needed=( ${needed[@]} ) - - # is a version is specified ? - items=( ${module//==/ } ) - module=${items[0]} - version=${items[1]} - if [ ! -z "$version" ]; then - info "Specific version detected for $module: $version" - eval "VERSION_$module=$version" - fi - done - - - needed=($MODULES) - declare -a processed - declare -a pymodules - processed=() - - fn_deps='.deps' - fn_optional_deps='.optional-deps' - - > $fn_deps - > $fn_optional_deps - - while [ ${#needed[*]} -ne 0 ]; do - - # pop module from the needed list - module=${needed[0]} - original_module=${needed[0]} - unset needed[0] - needed=( ${needed[@]} ) - - # split the version if exist - items=( ${module//==/ } ) - module=${items[0]} - version=${items[1]} - - # check if the module have already been declared - in_array $module "${processed[@]}" - if [ $? -ne 255 ]; then - debug "Ignored $module, already processed" - continue; - fi - - # add this module as done - processed=( ${processed[@]} $module ) - - # read recipe - debug "Read $module recipe" - recipe=$RECIPES_PATH/$module/recipe.sh - if [ ! -f $recipe ]; then - error "Recipe $module does not exist, adding the module as pure-python package" - pymodules+=($original_module) - continue; - fi - source $RECIPES_PATH/$module/recipe.sh - - # if a version has been specified by the user, the md5 will not - # correspond at all. so deactivate it. - if [ ! -z "$version" ]; then - debug "Deactivate MD5 test for $module, due to specific version" - eval "MD5_$module=" - fi - - # append current module deps to the needed - deps=$(echo \$"{DEPS_$module[@]}") - eval deps=($deps) - optional_deps=$(echo \$"{DEPS_OPTIONAL_$module[@]}") - eval optional_deps=($optional_deps) - if [ ${#deps[*]} -gt 0 ]; then - debug "Module $module depend on" ${deps[@]} - needed=( ${needed[@]} ${deps[@]} ) - echo $module ${deps[@]} >> $fn_deps - else - echo $module >> $fn_deps - fi - if [ ${#optional_deps[*]} -gt 0 ]; then - echo $module ${optional_deps[@]} >> $fn_optional_deps - fi - done - - info `pwd` - MODULES="$($PYTHON tools/depsort.py --optional $fn_optional_deps < $fn_deps)" - - info "Modules changed to $MODULES" - - PYMODULES="${pymodules[@]}" - - info "Pure-Python modules changed to $PYMODULES" -} - -function run_get_packages() { - info "Run get packages" - - if [ ! -d "$ROOT_OUT_PATH/tmp" ]; then - try mkdir $ROOT_OUT_PATH/tmp - $WGET $ROOT_OUT_PATH/.packages/config.sub "http://git.savannah.gnu.org/cgit/config.git/plain/config.sub" - $WGET $ROOT_OUT_PATH/.packages/config.guess "http://git.savannah.gnu.org/cgit/config.git/plain/config.guess" - fi - - for module in $MODULES; do - # download dependencies for this module - # check if there is not an overload from environment - module_dir=$(eval "echo \$O4iOS_${module}_DIR") - if [ "$module_dir" ] - then - debug "\$O4iOS_${module}_DIR is not empty, linking $module_dir dir instead of downloading" - directory=$(eval "echo \$BUILD_${module}") - if [ -e $directory ]; then - try rm -rf "$directory" - fi - try mkdir -p "$directory" - try rmdir "$directory" - try ln -s "$module_dir" "$directory" - continue - fi - debug "Download package for $module" - fold_push "download ${module}" - - url="URL_$module" - url=${!url} - md5="MD5_$module" - md5=${!md5} - - if [ ! -d "$BUILD_PATH/$module" ]; then - try mkdir -p $BUILD_PATH/$module - fi - - if [ ! -d "$PACKAGES_PATH/$module" ]; then - try mkdir -p "$PACKAGES_PATH/$module" - fi - - if [ "X$url" == "X" ]; then - debug "No package for $module" - continue - fi - - filename=$(basename $url) - marker_filename=".mark-$filename" - do_download=1 - - cd "$PACKAGES_PATH/$module" - - # check if the file is already present - if [ -f $filename ]; then - # if the marker has not been set, it might be cause of a invalid download. - if [ ! -f $marker_filename ]; then - rm $filename - elif [ -n "$md5" ]; then - # check if the md5 is correct - current_md5=$($MD5SUM $filename | cut -d\ -f1) - if [ "X$current_md5" == "X$md5" ]; then - # correct, no need to download - do_download=0 - else - # invalid download, remove the file - error "Module $module have invalid md5, redownload." - rm $filename - fi - else - do_download=0 - fi - fi - - # check if the file HEAD in case of, only if there is no MD5 to check. - check_headers=0 - if [ -z "$md5" ]; then - if [ "X$DO_CLEAN_BUILD" == "X1" ]; then - check_headers=1 - elif [ ! -f $filename ]; then - check_headers=1 - fi - fi - - if [ "X$check_headers" == "X1" ]; then - debug "Checking if $url changed" - $WHEAD $url &> .headers-$filename - $PYTHON "$ROOT_PATH/tools/check_headers.py" .headers-$filename .sig-$filename - if [ $? -ne 0 ]; then - do_download=1 - fi - fi - - # download if needed - if [ $do_download -eq 1 ]; then - info "Downloading $url" - try rm -f $marker_filename - try $WGET $filename $url - touch $marker_filename - else - debug "Module $module already downloaded" - fi - - # check md5 - if [ -n "$md5" ]; then - current_md5=$($MD5SUM $filename | cut -d\ -f1) - if [ "X$current_md5" != "X$md5" ]; then - error "File $filename md5 check failed (got $current_md5 instead of $md5)." - error "Ensure the file is correctly downloaded, and update MD5S_$module" - exit -1 - fi - fi - - # if already decompress, forget it - cd $BUILD_PATH/$module - directory=$(get_directory $filename) - if [ -d "$directory" ]; then - continue - fi - - # decompress - pfilename=$PACKAGES_PATH/$module/$filename - info "Extract $pfilename" - case $pfilename in - *.tar.gz|*.tgz ) - try tar xzf $pfilename - root_directory=$(basename $(try tar tzf $pfilename|head -n1)) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - *.tar.bz2|*.tbz2 ) - try tar xjf $pfilename - root_directory=$(basename $(try tar tjf $pfilename|head -n1)) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - *.zip ) - try unzip $pfilename - root_directory=$(basename $(try unzip -l $pfilename|sed -n 5p|awk '{print $4}')) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - esac - fold_pop - done -} - -function run_prebuild() { - info "Run prebuild" - cd $BUILD_PATH - for module in $MODULES; do - fn=$(echo prebuild_$module) - debug "Call $fn" - $fn - done -} - -function run_build() { - info "Run build" - - modules_update=($MODULES_UPDATE) - - cd $BUILD_PATH - - for module in $MODULES; do - fold_push "building ${module}" - fn="build_$module" - shouldbuildfn="shouldbuild_$module" - MARKER_FN="$BUILD_PATH/.mark-$module" - - # if the module should be updated, then remove the marker. - in_array $module "${modules_update[@]}" - if [ $? -ne 255 ]; then - debug "$module detected to be updated" - rm -f "$MARKER_FN" - fi - - # if shouldbuild_$module exist, call it to see if the module want to be - # built again - DO_BUILD=1 - if [ "$(type -t $shouldbuildfn)" == "function" ]; then - $shouldbuildfn - fi - - # if the module should be build, or if the marker is not present, - # do the build - if [ "X$DO_BUILD" == "X1" ] || [ ! -f "$MARKER_FN" ]; then - debug "Call $fn" - rm -f "$MARKER_FN" - $fn - touch "$MARKER_FN" - else - debug "Skipped $fn" - fi - - info "Run postbuild $module" - fn=$(echo postbuild_$module) - debug "Call $fn" - fold_pop - done -} - -function run() { - for ARCH in ${ARCHES[@]}; do - cd ${ROOT_PATH} - STAGE_PATH="${ROOT_OUT_PATH}/stage/$ARCH" - run_prepare - run_source_modules - run_get_packages - run_prebuild - run_build - done - info "All done !" -} - -function list_modules() { - modules=$(find recipes -iname 'recipe.sh' | cut -d/ -f2 | sort -u | xargs echo) - echo "Available modules: $modules" - exit 0 -} - -# Do the build -while getopts ":hvlfxim:u:s:g" opt; do - case $opt in - h) - usage - ;; - l) - list_modules - ;; - s) - run_prepare - run_source_modules - push_env - bash - pop_env - exit 0 - ;; - i) - INSTALL=1 - ;; - g) - DEBUG=1 - echo "Requesting debug binaries" - ;; - m) - MODULES="$OPTARG" - ;; - u) - MODULES_UPDATE="$OPTARG" - ;; - f) - DO_CLEAN_BUILD=1 - ;; - x) - DO_SET_X=1 - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - exit 1 - ;; - :) - echo "Option -$OPTARG requires an argument." >&2 - exit 1 - ;; - - *) - echo "=> $OPTARG" - ;; - esac -done - -if [ $DO_SET_X -eq 1 ]; then - info "Set -x for displaying expanded values" - set -x -fi - -run diff --git a/linux/recipes/gdal/recipe.sh b/linux/recipes/gdal/recipe.sh deleted file mode 100755 index 526947dd..00000000 --- a/linux/recipes/gdal/recipe.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_gdal=(proj libspatialite) - -# default build path -BUILD_gdal=$BUILD_PATH/gdal/$(get_directory $URL_gdal) - -# default recipe path -RECIPE_gdal=$RECIPES_PATH/gdal - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_gdal() { - cd $BUILD_gdal - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_gdal() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libgdal.so -nt $BUILD_gdal/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_gdal() { - try rsync -a $BUILD_gdal/ $BUILD_PATH/gdal/build-$ARCH/ - try cd $BUILD_PATH/gdal/build-$ARCH - - push_env - - try ./configure \ - --prefix=$STAGE_PATH \ - --with-sqlite3=yes \ - --with-geos=yes \ - --with-pg=no \ - --with-expat=yes \ - --with-libtiff=yes \ - --with-geotiff=internal \ - --with-spatialite=$STAGE_PATH \ - --with-poppler=no \ - --with-odbc=no \ - --with-openjpeg=no \ - --with-gif=no \ - --with-webp=yes \ - --with-podofo=no \ - --with-pdfium=no \ - --with-curl=yes \ - --with-libxml2=no \ - --with-zstd=no \ - --with-pcre=no \ - --with-proj=$STAGE_PATH \ - --with-png=internal \ - --with-rename-internal-libpng-symbols=yes \ - --with-jpeg=internal \ - --with-rename-internal-libjpeg-symbols=yes \ - --with-lz4=no \ - --with-pcre2=no \ - --disable-driver-mrf \ - $GDAL_FLAGS - - try $MAKESMP - try $MAKE install - - pop_env -} - -# function called after all the compile have been done -function postbuild_gdal() { - if [ ! -f ${STAGE_PATH}/lib/libgdal.so ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/linux/recipes/geodiff/recipe.sh b/linux/recipes/geodiff/recipe.sh deleted file mode 100755 index 57ce2ef1..00000000 --- a/linux/recipes/geodiff/recipe.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_geodiff=() - - -# default build path -BUILD_geodiff=$BUILD_PATH/geodiff/$(get_directory $URL_geodiff) - -# default recipe path -RECIPE_geodiff=$RECIPES_PATH/geodiff - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_geodiff() { - cd $BUILD_geodiff - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_geodiff() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libgeodiff.so -nt $BUILD_geodiff/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_geodiff() { - try mkdir -p $BUILD_PATH/geodiff/build-$ARCH - try cd $BUILD_PATH/geodiff/build-$ARCH - - push_env - - try $CMAKECMD \ - -DENABLE_TESTS=OFF \ - -DBUILD_TOOLS=OFF \ - -DBUILD_STATIC=OFF \ - -DBUILD_SHARED=ON \ - -DWITH_POSTGRESQL=OFF \ - $BUILD_geodiff/geodiff - - try $MAKESMP - try $MAKESMP install - pop_env -} - -# function called after all the compile have been done -function postbuild_geodiff() { - if [ ! -f ${STAGE_PATH}/lib/libgeodiff.so ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/linux/recipes/libspatialite/recipe.sh b/linux/recipes/libspatialite/recipe.sh deleted file mode 100755 index 664251a1..00000000 --- a/linux/recipes/libspatialite/recipe.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libspatialite=(proj) - -# default build path -BUILD_libspatialite=$BUILD_PATH/libspatialite/$(get_directory $URL_libspatialite) - -# default recipe path -RECIPE_libspatialite=$RECIPES_PATH/libspatialite - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libspatialite() { - cd $BUILD_libspatialite - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_libspatialite() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libspatialite.so -nt $BUILD_libspatialite/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libspatialite() { - try mkdir -p $BUILD_PATH/libspatialite/build-$ARCH - try cd $BUILD_PATH/libspatialite/build-$ARCH - - push_env - - rm $BUILD_libspatialite/config.h - rm $BUILD_libspatialite/src/headers/spatialite/gaiaconfig.h - - export CFLAGS="$CFLAGS -I$BUILD_PATH/libspatialite/build-$ARCH/src/headers" - - try $BUILD_libspatialite/configure \ - --prefix=$STAGE_PATH \ - --enable-geos=yes \ - --enable-libxml2=no \ - --disable-examples \ - --enable-proj=yes \ - --enable-gcp=no \ - --enable-minizip=no \ - --enable-rttopo=no - - try $MAKESMP - try $MAKE install - - pop_env -} - -# function called after all the compile have been done -function postbuild_libspatialite() { - if [ ! -f ${STAGE_PATH}/lib/libspatialite.so ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/linux/recipes/proj/recipe.sh b/linux/recipes/proj/recipe.sh deleted file mode 100755 index 9b01b12e..00000000 --- a/linux/recipes/proj/recipe.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - - -# version of your package in ../../../versions.conf - - -# dependencies of this recipe -DEPS_proj=() - -# default build path -BUILD_proj=$BUILD_PATH/proj/$(get_directory $URL_proj) - -# default recipe path -RECIPE_proj=$RECIPES_PATH/proj - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_proj() { - cd $BUILD_proj - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_proj() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libproj.so -nt $BUILD_proj/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_proj() { - try mkdir -p $BUILD_PATH/proj/build-$ARCH - try cd $BUILD_PATH/proj/build-$ARCH - - push_env - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_TESTING=OFF \ - -DEXE_SQLITE3=`which sqlite3` \ - -DBUILD_APPS=OFF \ - -DENABLE_TIFF=ON \ - -DENABLE_CURL=OFF \ - -DPROJ_CMAKE_SUBDIR=share/cmake/proj4 \ - -DPROJ_DATA_SUBDIR=share/proj \ - -DPROJ_LIB_ENV_VAR_TRIED_LAST=OFF \ - $BUILD_proj - - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_proj() { - if [ ! -f ${STAGE_PATH}/lib/libproj.so ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/linux/recipes/qca/recipe.sh b/linux/recipes/qca/recipe.sh deleted file mode 100755 index 40b0735c..00000000 --- a/linux/recipes/qca/recipe.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qca=() - -# default build path -BUILD_qca=$BUILD_PATH/qca/$(get_directory $URL_qca) - -# default recipe path -RECIPE_qca=$RECIPES_PATH/qca - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_qca() { - cd $BUILD_qca - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qca() { - if [ -f $STAGE_PATH/lib/libqca-qt6.so ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_qca() { - try mkdir -p $BUILD_qca/build-$ARCH - try cd $BUILD_qca/build-$ARCH - - push_env - - # configure - try $CMAKECMD \ - -DQT6=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_TESTS=OFF \ - -DBUILD_TOOLS=OFF \ - -DWITH_nss_PLUGIN=OFF \ - -DWITH_pkcs11_PLUGIN=OFF \ - -DWITH_gnupg_PLUGIN=OFF \ - -DWITH_gcrypt_PLUGIN=OFF \ - -DWITH_botan_PLUGIN=NO \ - -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE \ - -DBUILD_SHARED_LIBS=ON \ - $BUILD_qca - - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_qca() { - if [ ! -f $STAGE_PATH/lib/libqca-qt6.so ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/linux/recipes/qgis/recipe.sh b/linux/recipes/qgis/recipe.sh deleted file mode 100755 index 821fab4d..00000000 --- a/linux/recipes/qgis/recipe.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qgis=(geodiff zxing qca qtkeychain proj libspatialite gdal) - -# default build path -BUILD_qgis=$BUILD_PATH/qgis/$(get_directory $URL_qgis) - -# default recipe path -RECIPE_qgis=$RECIPES_PATH/qgis - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_qgis() { - cd $BUILD_qgis - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qgis() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libqgis_core.a -nt $BUILD_qgis/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_qgis() { - try mkdir -p $BUILD_PATH/qgis/build-$ARCH - try cd $BUILD_PATH/qgis/build-$ARCH - - push_env - - try ${CMAKECMD} \ - -DBUILD_WITH_QT6=ON \ - -DWITH_BINDINGS=FALSE \ - -DWITH_DESKTOP=OFF \ - -DWITH_EPT=OFF \ - -DWITH_COPC=OFF \ - -DWITH_PDAL=OFF \ - -DWITH_ANALYSIS=OFF \ - -DDISABLE_DEPRECATED=ON \ - -DWITH_QTWEBKIT=OFF \ - -DWITH_QUICK=OFF \ - -DENABLE_TESTS=OFF \ - -DWITH_GUI=OFF \ - -DWITH_APIDOC=OFF \ - -DWITH_ASTYLE=OFF \ - -DWITH_QSPATIALITE=OFF \ - -DWITH_3D=FALSE \ - -DWITH_QGIS_PROCESS=OFF \ - -DFORCE_STATIC_LIBS=TRUE \ - -DUSE_OPENCL=OFF \ - -DWITH_QTSERIALPORT=OFF \ - -DWITH_QT5SERIALPORT=OFF \ - -DGDAL_CONFIG=$STAGE_PATH/bin/gdal-config \ - $BUILD_qgis - - try $MAKESMP - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_qgis() { - if [ ! -f ${STAGE_PATH}/lib/libqgis_core.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/linux/recipes/qtkeychain/recipe.sh b/linux/recipes/qtkeychain/recipe.sh deleted file mode 100755 index 12f64b90..00000000 --- a/linux/recipes/qtkeychain/recipe.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qtkeychain=() - -# default build path -BUILD_qtkeychain=$BUILD_PATH/qtkeychain/$(get_directory $URL_qtkeychain) - -# default recipe path -RECIPE_qtkeychain=$RECIPES_PATH/qtkeychain - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_qtkeychain() { - cd $BUILD_qtkeychain - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qtkeychain() { - if [ -f $STAGE_PATH/lib/libqt6keychain.so ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_qtkeychain() { - try mkdir -p $BUILD_qtkeychain/build-$ARCH - try cd $BUILD_qtkeychain/build-$ARCH - - push_env - - # configure - try $CMAKECMD \ - -DBUILD_WITH_QT6=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_TEST_APPLICATION=OFF \ - -DBUILD_SHARED_LIBS=ON \ - -DBUILD_TOOLS=OFF \ - -DWITH_nss_PLUGIN=OFF \ - -DWITH_pkcs11_PLUGIN=OFF \ - $BUILD_qtkeychain - - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_qtkeychain() { - if [ ! -f $STAGE_PATH/lib/libqt6keychain.so ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/linux/recipes/zxing/recipe.sh b/linux/recipes/zxing/recipe.sh deleted file mode 100755 index de0ee2e6..00000000 --- a/linux/recipes/zxing/recipe.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# Reading/Writing of QR Codes - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_zxing=() - -# default build path -BUILD_zxing=$BUILD_PATH/zxing/$(get_directory $URL_zxing) - -# default recipe path -RECIPE_zxing=$RECIPES_PATH/zxing - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_zxing() { - cd $BUILD_zxing - - # check marker - if [ -f .patched ]; then - return - fi -} - -function shouldbuild_zxing() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libZXing.so -nt $BUILD_zxing/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_zxing() { - try mkdir -p $BUILD_PATH/zxing/build-$ARCH - try cd $BUILD_PATH/zxing/build-$ARCH - push_env - - # configure - try $CMAKECMD \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_BLACKBOX_TESTS=OFF \ - -DBUILD_SHARED_LIBS=ON \ - -DBUILD_UNIT_TESTS=OFF \ - $BUILD_zxing - - try $MAKESMP - try $MAKE install - - pop_env -} - -# function called after all the compile have been done -function postbuild_zxing() { - if [ ! -f ${STAGE_PATH}/lib/libZXing.so ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/linux/tools/depsort.py b/linux/tools/depsort.py deleted file mode 100755 index 413b2e05..00000000 --- a/linux/tools/depsort.py +++ /dev/null @@ -1,199 +0,0 @@ -#! /usr/bin/env python3 - -import argparse -import sys - -class Graph(object): - def __init__(self): - # `graph`: dict that maps each package to a set of its dependencies. - self.graph = {} - - def add(self, dependent, dependency): - """Add a dependency relationship to the graph""" - self.graph.setdefault(dependent, set()) - self.graph.setdefault(dependency, set()) - if dependent != dependency: - self.graph[dependent].add(dependency) - - def add_optional(self, dependent, dependency): - """Add an optional (ordering only) dependency relationship to the graph - - Only call this after all mandatory requirements are added - """ - if dependent in self.graph and dependency in self.graph: - self.add(dependent, dependency) - - def find_order(self): - """Do a topological sort on a dependency graph - - :Parameters: - :Returns: - iterator, sorted items form first to last - """ - graph = dict((k, set(v)) for k, v in list(self.graph.items())) - while graph: - # Find all items without a parent - leftmost = [l for l, s in list(graph.items()) if not s] - if not leftmost: - raise ValueError('Dependency cycle detected! %s' % graph) - # If there is more than one, sort them for predictable order - leftmost.sort() - for result in leftmost: - # Yield and remove them from the graph - yield result - graph.pop(result) - for bset in list(graph.values()): - bset.discard(result) - - -def lines_to_relationships(lines): - """Do a topological sort from a list of space-separated lines - - :Parameters: - `lines`: Iterable of lines in the format - "dependent dependency_0 dependency_1 ... dependency_n" - - :Returns: - iterator of (dependent, dependency) tuples - """ - for line in lines: - line = line.split() - if line: - dependent = line[0] - for dependency in line: - yield dependent, dependency - - -def topo_sort_lines(lines, lines_optional=()): - """Do a topological sort from a list of space-separated lines - - :Parameters: - `lines`: Iterable of lines in the format - "dependent dependency_0 dependency_1 ... dependency_n" - - `lines`: Iterable of lines with *optional* (ordering-only) dependencies - "dependent dependency_0 dependency_1 ... dependency_n" - - :Returns: - string, Sorted dependencies, space-separated - """ - graph = Graph() - for dependent, dependency in lines_to_relationships(lines): - graph.add(dependent, dependency) - for dependent, dependency in lines_to_relationships(lines_optional): - graph.add_optional(dependent, dependency) - return ' '.join(graph.find_order()) - - -def test_depsort_1(): - lines = [ - 'c a', - 'b c', - 'd b', - 'w z', - 'a w', - ] - assert topo_sort_lines(lines) == 'z w a c b d' - - -def test_depsort_2(): - lines = [ - 'l k', - 'm l', - 'a k', - 'd a', - 'l d', - 's l', - 'm s', - ] - assert topo_sort_lines(lines) == 'k a d l s m' - - -def test_depsort_3(): - lines = [ - 'z a', - 's z', - 'z z', - 's s', - ] - assert topo_sort_lines(lines) == 'a z s' - - -def test_depsort_4(): - lines = [ - 'f d', - 'g f', - 'r f', - 't r', - 'y t', - 'g y', - ] - assert topo_sort_lines(lines) == 'd f r t y g' - - -def test_depsort_5(): - lines = [ - 'a b c d e f', - 'e f', - 'g', - ] - assert topo_sort_lines(lines) == 'b c d f g e a' - - -def test_depsort_6(): - lines = [ - ' numpy python ', - ' kivy pygame pyjnius android ', - ' python hostpython ', - ' pygame sdl ', - ' android pygame ', - ' pyjnius python ', - ' sdl python ', - ' hostpython ', - ] - assert topo_sort_lines(lines) == ( - 'hostpython python numpy pyjnius sdl pygame android kivy') - - -def test_depsort_optional_1(): - lines = [' myapp openssl python '] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'openssl python myapp' - - -def test_depsort_optional_2(): - lines = [' myapp openssl python '] - # Just for testing purposes, make openssl soft-depend on python - optional = ['openssl python'] - assert topo_sort_lines(lines, optional) == 'python openssl myapp' - - -def test_depsort_optional_3(): - lines = ['myapp openssl'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'openssl myapp' - - -def test_depsort_optional_4(): - lines = ['myapp python'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'python myapp' - - -def test_depsort_optional_4(): - lines = ['myapp'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'myapp' - - -def main(argv): - parser = argparse.ArgumentParser( - description="Sort dependencies given on standard input") - parser.add_argument('--optional', type=argparse.FileType('r'), - help='File with optional (ordering-only) dependencies') - args = parser.parse_args(argv[1:]) - return topo_sort_lines(sys.stdin, lines_optional=args.optional or []) - - -if __name__ == '__main__': - print(main(sys.argv)) diff --git a/mac/config.conf.default b/mac/config.conf.default deleted file mode 100644 index a04e91f6..00000000 --- a/mac/config.conf.default +++ /dev/null @@ -1,10 +0,0 @@ -#### PATHS #### -export QT_VER="6.5.2" -export MACOSX_DEPLOYMENT_TARGET=10.15.0 -export ROOT_OUT_PATH=/Users/$USER/Projects/input-sdk/build/macos - -export QT_BASE="/opt/Qt/$QT_VER/macos" -## make sure you have bison and flex on PATH - -### BUILD ### -export ARCHES=("mac") diff --git a/mac/distribute.sh b/mac/distribute.sh deleted file mode 100755 index 955eae08..00000000 --- a/mac/distribute.sh +++ /dev/null @@ -1,645 +0,0 @@ -#!/bin/bash - -# Well, build tools are available only on MacOS -if [[ "$OSTYPE" == "darwin"* ]]; then - echo "Building input-sdk for Mac" -else - echo "Unable to build input-sdk binaries on $OSTYPE" - exit 1; -fi - -XCODE_DEVELOPER="$(xcode-select -print-path)" -CORES=$(sysctl -n hw.ncpu) - -# Load configuration -source `dirname $0`/config.conf -source `dirname $0`/../versions.conf - -# Paths -ROOT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -STAGE_PATH="${ROOT_OUT_PATH}/stage/$ARCH" -RECIPES_PATH="$ROOT_PATH/recipes" -BUILD_PATH="${ROOT_OUT_PATH}/build" -LIBS_PATH="${ROOT_OUT_PATH}/build/libs" -PACKAGES_PATH="${PACKAGES_PATH:-$ROOT_OUT_PATH/.packages}" - -MD5SUM=$(which md5sum) -if [ "X$MD5SUM" == "X" ]; then - MD5SUM=$(which md5) - if [ "X$MD5SUM" == "X" ]; then - echo "Error: you need at least md5sum or md5 installed." - exit 1 - else - MD5SUM="$MD5SUM -r" - fi -fi - -WGET=$(which wget) -if [ "X$WGET" == "X" ]; then - WGET=$(which curl) - if [ "X$WGET" == "X" ]; then - echo "Error: you need at least wget or curl installed." - exit 1 - else - WGET="$WGET -L -o" - fi - WHEAD="curl -L -I" -else - WGET="$WGET -O" - WHEAD="wget --spider -q -S" -fi - -SED="/usr/bin/sed -i ''" - -AUTORECONF=$(which autoreconf) -if [ "X$AUTORECONF" == "X" ]; then - echo "Error: you need autoreconf installed (brew install automake)." - exit 1 -fi - -# Internals -CRED="\x1b[31;01m" -CBLUE="\x1b[34;01m" -CGRAY="\x1b[30;01m" -CRESET="\x1b[39;49;00m" -DO_CLEAN_BUILD=0 -DO_SET_X=0 -DEBUG=0 - -function fold_push() { - echo "::group::${1}" -} - -function fold_pop() { - echo "::endgroup::" -} - -function try () { - "$@" || exit -1 -} - -function info() { - echo -e "$CBLUE"$@"$CRESET"; -} - -function error() { - echo -e "$CRED"$@"$CRESET"; -} - -function debug() { - echo -e "$CGRAY"$@"$CRESET"; -} - -function get_directory() { - case $1 in - *.tar.gz) directory=$(basename $1 .tar.gz) ;; - *.tgz) directory=$(basename $1 .tgz) ;; - *.tar.bz2) directory=$(basename $1 .tar.bz2) ;; - *.tbz2) directory=$(basename $1 .tbz2) ;; - *.zip) directory=$(basename $1 .zip) ;; - *) - error "Unknown file extension $1" - exit -1 - ;; - esac - echo $directory -} - -function patch_configure_file() { - try ${SED} 's;/usr/local/lib/ ;;g' $1 - try ${SED} 's; /usr/local/lib/;;g' $1 - try ${SED} 's;/usr/local/lib/;;g' $1 - try ${SED} 's; /usr/local/lib;;g' $1 - try ${SED} 's;/usr/local/lib ;;g' $1 - try ${SED} 's;/usr/local/lib;;g' $1 -} - -function check_file_configuration() { - # "Checking $1 for /usr/local/lib" - if grep -q /usr/local/lib $1 - then - info "Found: " - cat $1 | grep /usr/local/lib - error "File $1 contains /usr/local/lib string <-- CMake picked some homebrew libs!" - exit 1; - fi - - targets=( - openssl - openssl@1.1 - gettext - libunistring - xz - ) - for i in ${targets[*]} - do - if grep -q /usr/local/opt/$i/lib $1 - then - info "Found: " - cat $1 | grep /usr/local/opt/$i/lib - error "File $1 contains /usr/local/$i/lib string <-- CMake picked some homebrew libs!" - exit 1; - fi - done -} - -function push_env() { - info "Entering in ${ARCH} environment" - - # save for pop - export OLD_PATH=$PATH - export OLD_CFLAGS=$CFLAGS - export OLD_CXXFLAGS=$CXXFLAGS - export OLD_LDFLAGS=$LDFLAGS - export OLD_CC=$CC - export OLD_CXX=$CXX - export OLD_MAKESMP=$MAKESMP - export OLD_MAKE=$MAKE - export OLD_LD=$LD - export OLD_CMAKECMD=$CMAKECMD - export OLD_PATH=$PATH - - - PATH="$QT_BASE/bin:$PATH" - - CMAKECMD="cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH -DCMAKE_PREFIX_PATH=${QT_BASE}" - - export CC="/usr/bin/clang" - export CXX="/usr/bin/clang++" - export LD="/usr/bin/ld" - export MAKESMP="/usr/bin/make -j$CORES" - export MAKE="/usr/bin/make" - export CFLAGS="$CFLAGS -I$STAGE_PATH/include" - export CXXFLAGS="$CXXFLAGS -I$STAGE_PATH/include" - export LDFLAGS="$LDFLAGS -L$STAGE_PATH/lib" - export CMAKECMD=$CMAKECMD - export PATH=$OLD_PATH -} - -function pop_env() { - info "Leaving ${ARCH} environment" - export PATH=$OLD_PATH - export CFLAGS=$OLD_CFLAGS - export CXXFLAGS=$OLD_CXXFLAGS - export LDFLAGS=$OLD_LDFLAGS - export CC=$OLD_CC - export CXX=$OLD_CXX - export MAKESMP=$OLD_MAKESMP - export MAKE=$OLD_MAKE - export LD=$OLD_LD - export PLATFORM=$OLD_PLATFORM - export SYSROOT=$OLD_SYSROOT - export TOOLCHAIN_PREFIX=$OLD_TOOLCHAIN_PREFIX - export CMAKECMD=$OLD_CMAKECMD -} - -function usage() { - echo "input-sdk - distribute.sh" - echo - echo "Usage: ./distribute.sh [options]" - echo - echo " -h Show this help" - echo " -l Show a list of available modules" - echo " -m 'mod1 mod2' Modules to include" - echo " -f Restart from scratch (remove the current build)" - echo " -x display expanded values (execute 'set -x')" - echo - echo "For developers:" - echo " -u 'mod1 mod2' Modules to update (if already compiled)" - echo - exit 0 -} - -function run_prepare() { - info "Check environment" - - info "QT located at $QT_BASE" - - info "Check mandatory tools" - # ensure that some tools are existing - for tool in tar bzip2 unzip; do - which $tool &>/dev/null - if [ $? -ne 0 ]; then - error "Tool $tool is missing" - exit -1 - fi - done - - if [ $DO_CLEAN_BUILD -eq 1 ]; then - info "Cleaning build" - try rm -rf $STAGE_PATH - try rm -rf $BUILD_PATH - try rm -rf $NATIVE_STAGE_PATH - fi - - info "Distribution will be located at $STAGE_PATH" - if [ -e "$STAGE_PATH" ]; then - info "The directory $STAGE_PATH already exist" - info "Will continue using and possibly overwrite what is in there" - fi - try mkdir -p "$STAGE_PATH" - - # create build directory if not found - test -d $PACKAGES_PATH || mkdir -p $PACKAGES_PATH - test -d $BUILD_PATH || mkdir -p $BUILD_PATH - test -d $LIBS_PATH || mkdir -p $LIBS_PATH - - # check arm env - push_env - pop_env -} - -function in_array() { - term="$1" - shift - i=0 - for key in $@; do - if [ $term == $key ]; then - return $i - fi - i=$(($i + 1)) - done - return 255 -} - -function run_source_modules() { - # preprocess version modules - needed=($MODULES) - while [ ${#needed[*]} -ne 0 ]; do - - # pop module from the needed list - module=${needed[0]} - unset needed[0] - needed=( ${needed[@]} ) - - # is a version is specified ? - items=( ${module//==/ } ) - module=${items[0]} - version=${items[1]} - if [ ! -z "$version" ]; then - info "Specific version detected for $module: $version" - eval "VERSION_$module=$version" - fi - done - - - needed=($MODULES) - declare -a processed - declare -a pymodules - processed=() - - fn_deps='.deps' - fn_optional_deps='.optional-deps' - - > $fn_deps - > $fn_optional_deps - - while [ ${#needed[*]} -ne 0 ]; do - - # pop module from the needed list - module=${needed[0]} - original_module=${needed[0]} - unset needed[0] - needed=( ${needed[@]} ) - - # split the version if exist - items=( ${module//==/ } ) - module=${items[0]} - version=${items[1]} - - # check if the module have already been declared - in_array $module "${processed[@]}" - if [ $? -ne 255 ]; then - debug "Ignored $module, already processed" - continue; - fi - - # add this module as done - processed=( ${processed[@]} $module ) - - # read recipe - debug "Read $module recipe" - recipe=$RECIPES_PATH/$module/recipe.sh - if [ ! -f $recipe ]; then - error "Recipe $module does not exist, adding the module as pure-python package" - pymodules+=($original_module) - continue; - fi - source $RECIPES_PATH/$module/recipe.sh - - # if a version has been specified by the user, the md5 will not - # correspond at all. so deactivate it. - if [ ! -z "$version" ]; then - debug "Deactivate MD5 test for $module, due to specific version" - eval "MD5_$module=" - fi - - # append current module deps to the needed - deps=$(echo \$"{DEPS_$module[@]}") - eval deps=($deps) - optional_deps=$(echo \$"{DEPS_OPTIONAL_$module[@]}") - eval optional_deps=($optional_deps) - if [ ${#deps[*]} -gt 0 ]; then - debug "Module $module depend on" ${deps[@]} - needed=( ${needed[@]} ${deps[@]} ) - echo $module ${deps[@]} >> $fn_deps - else - echo $module >> $fn_deps - fi - if [ ${#optional_deps[*]} -gt 0 ]; then - echo $module ${optional_deps[@]} >> $fn_optional_deps - fi - done - - info `pwd` - MODULES="$($PYTHON tools/depsort.py --optional $fn_optional_deps < $fn_deps)" - - info "Modules changed to $MODULES" - - PYMODULES="${pymodules[@]}" - - info "Pure-Python modules changed to $PYMODULES" -} - -function run_get_packages() { - info "Run get packages" - - if [ ! -d "$ROOT_OUT_PATH/tmp" ]; then - try mkdir $ROOT_OUT_PATH/tmp - $WGET $ROOT_OUT_PATH/.packages/config.sub "http://git.savannah.gnu.org/cgit/config.git/plain/config.sub" - $WGET $ROOT_OUT_PATH/.packages/config.guess "http://git.savannah.gnu.org/cgit/config.git/plain/config.guess" - fi - - for module in $MODULES; do - # download dependencies for this module - # check if there is not an overload from environment - module_dir=$(eval "echo \$O4iOS_${module}_DIR") - if [ "$module_dir" ] - then - debug "\$O4iOS_${module}_DIR is not empty, linking $module_dir dir instead of downloading" - directory=$(eval "echo \$BUILD_${module}") - if [ -e $directory ]; then - try rm -rf "$directory" - fi - try mkdir -p "$directory" - try rmdir "$directory" - try ln -s "$module_dir" "$directory" - continue - fi - debug "Download package for $module" - fold_push "download ${module}" - - url="URL_$module" - url=${!url} - md5="MD5_$module" - md5=${!md5} - - if [ ! -d "$BUILD_PATH/$module" ]; then - try mkdir -p $BUILD_PATH/$module - fi - - if [ ! -d "$PACKAGES_PATH/$module" ]; then - try mkdir -p "$PACKAGES_PATH/$module" - fi - - if [ "X$url" == "X" ]; then - debug "No package for $module" - continue - fi - - filename=$(basename $url) - marker_filename=".mark-$filename" - do_download=1 - - cd "$PACKAGES_PATH/$module" - - # check if the file is already present - if [ -f $filename ]; then - # if the marker has not been set, it might be cause of a invalid download. - if [ ! -f $marker_filename ]; then - rm $filename - elif [ -n "$md5" ]; then - # check if the md5 is correct - current_md5=$($MD5SUM $filename | cut -d\ -f1) - if [ "X$current_md5" == "X$md5" ]; then - # correct, no need to download - do_download=0 - else - # invalid download, remove the file - error "Module $module have invalid md5, redownload." - rm $filename - fi - else - do_download=0 - fi - fi - - # check if the file HEAD in case of, only if there is no MD5 to check. - check_headers=0 - if [ -z "$md5" ]; then - if [ "X$DO_CLEAN_BUILD" == "X1" ]; then - check_headers=1 - elif [ ! -f $filename ]; then - check_headers=1 - fi - fi - - if [ "X$check_headers" == "X1" ]; then - debug "Checking if $url changed" - $WHEAD $url &> .headers-$filename - $PYTHON "$ROOT_PATH/tools/check_headers.py" .headers-$filename .sig-$filename - if [ $? -ne 0 ]; then - do_download=1 - fi - fi - - # download if needed - if [ $do_download -eq 1 ]; then - info "Downloading $url" - try rm -f $marker_filename - try $WGET $filename $url - touch $marker_filename - else - debug "Module $module already downloaded" - fi - - # check md5 - if [ -n "$md5" ]; then - current_md5=$($MD5SUM $filename | cut -d\ -f1) - if [ "X$current_md5" != "X$md5" ]; then - error "File $filename md5 check failed (got $current_md5 instead of $md5)." - error "Ensure the file is correctly downloaded, and update MD5S_$module" - exit -1 - fi - fi - - # if already decompress, forget it - cd $BUILD_PATH/$module - directory=$(get_directory $filename) - if [ -d "$directory" ]; then - continue - fi - - # decompress - pfilename=$PACKAGES_PATH/$module/$filename - info "Extract $pfilename" - case $pfilename in - *.tar.gz|*.tgz ) - try tar xzf $pfilename - root_directory=$(basename $(try tar tzf $pfilename|head -n1)) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - *.tar.bz2|*.tbz2 ) - try tar xjf $pfilename - root_directory=$(basename $(try tar tjf $pfilename|head -n1)) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - *.zip ) - try unzip $pfilename - root_directory=$(basename $(try unzip -l $pfilename|sed -n 5p|awk '{print $4}')) - if [ "X$root_directory" != "X$directory" ]; then - mv $root_directory $directory - fi - ;; - esac - fold_pop - done -} - -function run_prebuild() { - info "Run prebuild" - cd $BUILD_PATH - for module in $MODULES; do - fn=$(echo prebuild_$module) - debug "Call $fn" - $fn - done -} - -function run_build() { - info "Run build" - - modules_update=($MODULES_UPDATE) - - cd $BUILD_PATH - - for module in $MODULES; do - fold_push "building ${module}" - fn="build_$module" - shouldbuildfn="shouldbuild_$module" - MARKER_FN="$BUILD_PATH/.mark-$module" - - # if the module should be updated, then remove the marker. - in_array $module "${modules_update[@]}" - if [ $? -ne 255 ]; then - debug "$module detected to be updated" - rm -f "$MARKER_FN" - fi - - # if shouldbuild_$module exist, call it to see if the module want to be - # built again - DO_BUILD=1 - if [ "$(type -t $shouldbuildfn)" == "function" ]; then - $shouldbuildfn - fi - - # if the module should be build, or if the marker is not present, - # do the build - if [ "X$DO_BUILD" == "X1" ] || [ ! -f "$MARKER_FN" ]; then - debug "Call $fn" - rm -f "$MARKER_FN" - $fn - touch "$MARKER_FN" - else - debug "Skipped $fn" - fi - - info "Run postbuild $module" - fn=$(echo postbuild_$module) - debug "Call $fn" - $fn - - fold_pop - done -} - -function run() { - for ARCH in ${ARCHES[@]}; do - cd ${ROOT_PATH} - STAGE_PATH="${ROOT_OUT_PATH}/stage/$ARCH" - run_prepare - run_source_modules - run_get_packages - run_prebuild - run_build - done - info "All done !" -} - -function list_modules() { - modules=$(find recipes -iname 'recipe.sh' | cut -d/ -f2 | sort -u | xargs echo) - echo "Available modules: $modules" - exit 0 -} - -# Do the build -while getopts ":hvlfxim:u:s:g" opt; do - case $opt in - h) - usage - ;; - l) - list_modules - ;; - s) - run_prepare - run_source_modules - push_env - bash - pop_env - exit 0 - ;; - i) - INSTALL=1 - ;; - g) - DEBUG=1 - echo "Requesting debug binaries" - ;; - m) - MODULES="$OPTARG" - ;; - u) - MODULES_UPDATE="$OPTARG" - ;; - f) - DO_CLEAN_BUILD=1 - ;; - x) - DO_SET_X=1 - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - exit 1 - ;; - :) - echo "Option -$OPTARG requires an argument." >&2 - exit 1 - ;; - - *) - echo "=> $OPTARG" - ;; - esac -done - -if [ $DO_SET_X -eq 1 ]; then - info "Set -x for displaying expanded values" - set -x -fi - -run diff --git a/mac/recipes/curl/recipe.sh b/mac/recipes/curl/recipe.sh deleted file mode 100755 index d4037531..00000000 --- a/mac/recipes/curl/recipe.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_curl=() - -# default build path -BUILD_curl=$BUILD_PATH/curl/$(get_directory $URL_curl) - -# default recipe path -RECIPE_curl=$RECIPES_PATH/curl - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_curl() { - cd $BUILD_curl - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_curl() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libcurl.a -nt $BUILD_curl/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_curl() { - try mkdir -p $BUILD_PATH/curl/build-$ARCH - try cd $BUILD_PATH/curl/build-$ARCH - push_env - - # use Apple's SecureTransport, not OpenSSL - try ${CMAKECMD} \ - -DBUILD_TESTING=OFF \ - -DBUILD_SHARED_LIBS=FALSE \ - -DBUILD_CURL_EXE=OFF \ - -DCURL_USE_LIBSSH2=OFF \ - -DCURL_USE_LIBSSH=OFF \ - -DCURL_ZSTD=OFF \ - -DCURL_BROTLI=OFF \ - -DCURL_DISABLE_LDAP=ON \ - -DCURL_USE_OPENLDAP=OFF \ - -DUSE_QUICHE=OFF \ - -DUSE_NGTCP2=OFF \ - -DUSE_NGHTTP2=OFF \ - -DCURL_ZLIB=OFF \ - -DCURL_USE_OPENSSL=OFF \ - -DCURL_USE_SECTRANSP=ON \ - -DAPPLE=TRUE \ - $BUILD_curl - - check_file_configuration CMakeCache.txt - - try $MAKESMP - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_curl() { - if [ ! -f ${STAGE_PATH}/lib/libcurl.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/exiv2/recipe.sh b/mac/recipes/exiv2/recipe.sh deleted file mode 100755 index ae2b57ff..00000000 --- a/mac/recipes/exiv2/recipe.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_exiv2=(expat) - -# default build path -BUILD_exiv2=$BUILD_PATH/exiv2/$(get_directory $URL_exiv2) - -# default recipe path -RECIPE_exiv2=$RECIPES_PATH/exiv2 - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_exiv2() { - cd $BUILD_exiv2 - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_exiv2() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libexiv2.a -nt $BUILD_exiv2/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_exiv2() { - - try mkdir -p $BUILD_PATH/exiv2/build-$ARCH - try cd $BUILD_PATH/exiv2/build-$ARCH - push_env - - try $CMAKECMD \ - -DBUILD_SHARED_LIBS=OFF \ - -DEXIV2_BUILD_EXIV2_COMMAND=OFF \ - -DEXIV2_BUILD_SAMPLES=OFF \ - -DEXIV2_BUILD_UNIT_TESTS=OFF \ - -DEXIV2_BUILD_DOC=OFF \ - -DEXIV2_ENABLE_NLS=OFF \ - -DIconv_IS_BUILT_IN=OFF \ - $BUILD_exiv2 - - check_file_configuration CMakeCache.txt - - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_exiv2() { - if [ ! -f ${STAGE_PATH}/lib/libexiv2.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} \ No newline at end of file diff --git a/mac/recipes/expat/recipe.sh b/mac/recipes/expat/recipe.sh deleted file mode 100755 index 8e785c67..00000000 --- a/mac/recipes/expat/recipe.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_expat=() - -# default build path -BUILD_expat=$BUILD_PATH/expat/$(get_directory $URL_expat) - -# default recipe path -RECIPE_expat=$RECIPES_PATH/expat - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_expat() { - cd $BUILD_expat - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_expat/conftools/" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_expat/conftools/" - - patch_configure_file configure - - touch .patched -} - -function shouldbuild_expat() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libexpat.a -nt $BUILD_expat/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_expat() { - - try mkdir -p $BUILD_PATH/expat/build-$ARCH - try cd $BUILD_PATH/expat/build-$ARCH - push_env - - try $BUILD_expat/configure \ - --prefix=$STAGE_PATH \ - --disable-shared - - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_expat() { - if [ ! -f ${STAGE_PATH}/lib/libexpat.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} \ No newline at end of file diff --git a/mac/recipes/freexl/recipe.sh b/mac/recipes/freexl/recipe.sh deleted file mode 100755 index bb688441..00000000 --- a/mac/recipes/freexl/recipe.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# a library to extract valid data from within an Excel (.xls) spreadsheet - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_freexl=() - -# default build path -BUILD_freexl=$BUILD_PATH/freexl/$(get_directory $URL_freexl) - -# default recipe path -RECIPE_freexl=$RECIPES_PATH/freexl - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_freexl() { - cd $BUILD_freexl - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_freexl" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_freexl" - - patch_configure_file configure - - touch .patched -} - -function shouldbuild_freexl() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libfreexl.a -nt $BUILD_freexl/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_freexl() { - try mkdir -p $BUILD_PATH/freexl/build-$ARCH - try cd $BUILD_PATH/freexl/build-$ARCH - push_env - - try $BUILD_freexl/configure --prefix=$STAGE_PATH --disable-shared - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_freexl() { - if [ ! -f ${STAGE_PATH}/lib/libfreexl.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/gdal/patches/configure.patch b/mac/recipes/gdal/patches/configure.patch deleted file mode 100644 index 95761f09..00000000 --- a/mac/recipes/gdal/patches/configure.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/configure 2022-02-18 10:31:24.000000000 +0100 -+++ b/configure 2022-02-18 11:01:15.000000000 +0100 -@@ -36559,7 +36559,7 @@ if ${ac_cv_lib_curl_curl_global_init+:} - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lcurl `$LIBCURL_CONFIG --libs` $LIBS" -+LIBS="-lcurl -framework Security -framework CoreFoundation -framework SystemConfiguration `$LIBCURL_CONFIG --libs` $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -37012,7 +37012,7 @@ done - if test "$ac_cv_header_sqlite3_h" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spatialite.h in /usr/include or /usr/local/include" >&5 - $as_echo_n "checking for spatialite.h in /usr/include or /usr/local/include... " >&6; } -- if test -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then -+ if true; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 - $as_echo "found" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spatialite_init in -lspatialite" >&5 -@@ -37021,7 +37021,7 @@ if ${ac_cv_lib_spatialite_spatialite_ini - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lspatialite -lsqlite3 $LIBS" -+LIBS="-lspatialite -lsqlite3 -lgeos_c -lgeos -lfreexl -lc++ $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -39073,7 +39073,7 @@ $as_echo "$as_me: WARNING: GEOS was foun - - HAVE_GEOS="no" - -- GEOS_LIBS="`${GEOS_CONFIG} --ldflags` -lgeos_c" -+ GEOS_LIBS="`${GEOS_CONFIG} --ldflags` -lgeos_c -lgeos -lc++" - GEOS_CFLAGS="`${GEOS_CONFIG} --cflags`" - GEOS_VERSION="`${GEOS_CONFIG} --version`" - -@@ -39088,7 +39088,7 @@ if ${ac_cv_lib_geos_c_GEOSversion+:} fal - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lgeos_c -+LIBS="-lgeos_c -lgeos -lc++ - $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ \ No newline at end of file diff --git a/mac/recipes/gdal/recipe.sh b/mac/recipes/gdal/recipe.sh deleted file mode 100755 index c4dea846..00000000 --- a/mac/recipes/gdal/recipe.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_gdal=(geos postgresql jpeg expat proj exiv2 freexl libspatialite libspatialindex libtasn1 libzip sqlite3 webp curl libtiff) - -# default build path -BUILD_gdal=$BUILD_PATH/gdal/$(get_directory $URL_gdal) - -# default recipe path -RECIPE_gdal=$RECIPES_PATH/gdal - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_gdal() { - cd $BUILD_gdal - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_gdal" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_gdal" - - try patch -p1 < $RECIPE_gdal/patches/configure.patch - - patch_configure_file configure - - touch .patched -} - -function shouldbuild_gdal() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libgdal.a -nt $BUILD_gdal/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_gdal() { - try rsync -a $BUILD_gdal/ $BUILD_PATH/gdal/build-$ARCH/ - try cd $BUILD_PATH/gdal/build-$ARCH - - push_env - - GDAL_FLAGS="--disable-shared" - if [ $DEBUG -eq 1 ]; then - info "Building DEBUG version of GDAL!!" - GDAL_FLAGS="$GDAL_FLAGS --enable-debug" - fi - - # so the configure script can check that proj library is ok - export LDFLAGS="$LDFLAGS -lgeos -lproj -lsqlite3 -lcurl -ltiff -ljpeg -lwebp -lz -framework Security -framework CoreFoundation -framework SystemConfiguration -lc++" - - # We have external JPEG, but still with renamed symbols - export CFLAGS="${CFLAGS} -DRENAME_INTERNAL_LIBJPEG_SYMBOLS" - export CPPFLAGS="${CPPFLAGS} -DRENAME_INTERNAL_LIBJPEG_SYMBOLS" - - try ./configure \ - --prefix=$STAGE_PATH \ - --with-sqlite3=$STAGE_PATH \ - --with-geos=$STAGE_PATH/bin/geos-config \ - --with-pg=no \ - --with-expat=$STAGE_PATH \ - --with-libtiff=$STAGE_PATH \ - --with-geotiff=internal \ - --with-spatialite=yes \ - --with-poppler=no \ - --with-odbc=no \ - --with-openjpeg=no \ - --with-gif=no \ - --with-webp=$STAGE_PATH \ - --with-podofo=no \ - --with-pdfium=no \ - --with-curl=$STAGE_PATH \ - --with-libxml2=no \ - --with-zstd=no \ - --with-pcre=no \ - --with-proj=$STAGE_PATH \ - --with-png=internal \ - --with-rename-internal-libpng-symbols=yes \ - --with-lz4=no \ - --with-pcre2=no \ - --with-heif=no \ - --with-exr=no \ - --with-crypto=no \ - --with-jpeg=$STAGE_PATH \ - --disable-driver-mrf \ - $GDAL_FLAGS - - try $MAKESMP - try $MAKESMP install - - $STAGE_PATH/bin/gdalinfo --formats | tee -a $STAGE_PATH/supported_formats.log - $STAGE_PATH/bin/ogrinfo --formats | tee -a $STAGE_PATH/supported_formats.log - - pop_env -} - -# function called after all the compile have been done -function postbuild_gdal() { - if [ ! -f ${STAGE_PATH}/lib/libgdal.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/geodiff/recipe.sh b/mac/recipes/geodiff/recipe.sh deleted file mode 100755 index b43b04a4..00000000 --- a/mac/recipes/geodiff/recipe.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_geodiff=(sqlite3) - - -# default build path -BUILD_geodiff=$BUILD_PATH/geodiff/$(get_directory $URL_geodiff) - -# default recipe path -RECIPE_geodiff=$RECIPES_PATH/geodiff - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_geodiff() { - cd $BUILD_geodiff - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_geodiff() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libgeodiff.a -nt $BUILD_geodiff/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_geodiff() { - try mkdir -p $BUILD_PATH/geodiff/build-$ARCH - try cd $BUILD_PATH/geodiff/build-$ARCH - - push_env - - try $CMAKECMD \ - -DENABLE_TESTS=OFF \ - -DBUILD_TOOLS=OFF \ - -DBUILD_STATIC=ON \ - -DBUILD_SHARED=OFF \ - -DWITH_POSTGRESQL=OFF \ - -DSQLite3_INCLUDE_DIR:PATH=${STAGE_PATH}/include \ - -DSQLite3_LIBRARY=${STAGE_PATH}/lib/libsqlite3.a \ - $BUILD_geodiff/geodiff - - check_file_configuration CMakeCache.txt - - try $MAKESMP - try $MAKESMP install - pop_env -} - -# function called after all the compile have been done -function postbuild_geodiff() { - if [ ! -f ${STAGE_PATH}/lib/libgeodiff.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/geos/recipe.sh b/mac/recipes/geos/recipe.sh deleted file mode 100755 index 5dab49d0..00000000 --- a/mac/recipes/geos/recipe.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_geos=() - -# default build path -BUILD_geos=$BUILD_PATH/geos/$(get_directory $URL_geos) - -# default recipe path -RECIPE_geos=$RECIPES_PATH/geos - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_geos() { - cd $BUILD_geos - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_geos - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_geos - - touch .patched -} - -function shouldbuild_geos() { - # If lib is newer than the sourcecode skip build - if [ $BUILD_PATH/geos/build-$ARCH/lib/libgeos.a -nt $BUILD_geos/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_geos() { - try mkdir -p $BUILD_PATH/geos/build-$ARCH - try cd $BUILD_PATH/geos/build-$ARCH - push_env - - try ${CMAKECMD} \ - -DBUILD_TESTING=OFF \ - -DBUILD_SHARED_LIBS=FALSE \ - $BUILD_geos - check_file_configuration CMakeCache.txt - - try $MAKESMP - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_geos() { - if [ ! -f ${STAGE_PATH}/lib/libgeos.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/jpeg/patches/CMakeLists.txt b/mac/recipes/jpeg/patches/CMakeLists.txt deleted file mode 100644 index a46ba2cf..00000000 --- a/mac/recipes/jpeg/patches/CMakeLists.txt +++ /dev/null @@ -1,76 +0,0 @@ -# see https://github.com/OSGeo/gdal/blob/master/frmts/jpeg/libjpeg/CMakeLists.txt -cmake_minimum_required(VERSION 3.6) -project(JPEG) - -add_library( - jpeg STATIC - jcapimin.c - jchuff.h - jconfig.h - jdapimin.c - jdct.h - jdmarker.c - jdtrans.c - jidctflt.c - jmemmgr.c - jquant2.c - jcapistd.c - jcinit.c - jcparam.c - jdapistd.c - jddctmgr.c - jdmaster.c - jerror.c - jidctfst.c - jmemsys.h - jutils.c - jccoefct.c - jcmainct.c - jcphuff.c - jdatadst.c - jdhuff.c - jdmerge.c - jerror.h - jidctint.c - jmorecfg.h - jversion.h - jccolor.c - jcmarker.c - jcprepct.c - jdatasrc.c - jdhuff.h - jdphuff.c - jfdctflt.c - jidctred.c - jpegint.h - jcdctmgr.c - jcmaster.c - jcsample.c - jdcoefct.c - jdinput.c - jdpostct.c - jfdctfst.c - jinclude.h - jpeglib.h - jchuff.c - jcomapi.c - jctrans.c - jdcolor.c - jdmainct.c - jdsample.c - jfdctint.c - jmemnobs.c - jquant1.c) - -target_include_directories(jpeg PRIVATE $ $/..) -# target_compile_options(libjpeg PRIVATE ${GDAL_C_WARNING_FLAGS} ${GDAL_SOFTWARNFLAGS}) - -target_compile_definitions(jpeg PRIVATE -DDEFAULT_MAX_MEM=500000000L) -if (RENAME_INTERNAL_JPEG_SYMBOLS) - target_compile_definitions(jpeg PUBLIC -DRENAME_INTERNAL_LIBJPEG_SYMBOLS) -endif () - -# produce position independent code, default is on when building a shared library -# option(GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE "Set ON to produce -fPIC code" ${BUILD_SHARED_LIBS}) -# set_property(TARGET jpeg PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) -# target_sources(${GDAL_LIB_TARGET_NAME} PRIVATE $) \ No newline at end of file diff --git a/mac/recipes/jpeg/patches/cpl_port.h b/mac/recipes/jpeg/patches/cpl_port.h deleted file mode 100644 index 30fe1669..00000000 --- a/mac/recipes/jpeg/patches/cpl_port.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef CPL_BASE_H_INCLUDED_TWEAKED -#define CPL_BASE_H_INCLUDED_TWEAKED - -#if defined(__GNUC__) && __GNUC__ >= 4 -/** Qualifier for an argument that is unused */ -# define CPL_UNUSED __attribute((__unused__)) -#else -/* TODO: add cases for other compilers */ -/** Qualifier for an argument that is unused */ -# define CPL_UNUSED -#endif - -#endif /* ndef CPL_BASE_H_INCLUDED_TWEAKED */ \ No newline at end of file diff --git a/mac/recipes/jpeg/patches/jerror.patch b/mac/recipes/jpeg/patches/jerror.patch deleted file mode 100644 index d51a32b1..00000000 --- a/mac/recipes/jpeg/patches/jerror.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/frmts/jpeg/libjpeg/jerror.c -+++ b/frmts/jpeg/libjpeg/jerror.c -@@ -47,6 +47,8 @@ - - #ifdef NEED_12_BIT_NAMES - #define jpeg_std_message_table jpeg_std_message_table_12 -+#elif defined(RENAME_INTERNAL_LIBJPEG_SYMBOLS) -+#define jpeg_std_message_table gdal_jpeg_std_message_table - #endif - - #define JMESSAGE(code,string) string , \ No newline at end of file diff --git a/mac/recipes/jpeg/recipe.sh b/mac/recipes/jpeg/recipe.sh deleted file mode 100755 index 7a080a09..00000000 --- a/mac/recipes/jpeg/recipe.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - - -# version of your package in ../../../versions.conf - - -# dependencies of this recipe -DEPS_jpeg=() - -# default build path -BUILD_jpeg=$BUILD_PATH/jpeg/$(get_directory $URL_jpeg) - -# default recipe path -RECIPE_jpeg=$RECIPES_PATH/jpeg - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_jpeg() { - cd $BUILD_jpeg - - # check marker - if [ -f .patched ]; then - return - fi - - # so it is not picked by install step! - try cp $RECIPE_jpeg/patches/cpl_port.h $BUILD_jpeg/frmts/jpeg/ - - try rm $BUILD_jpeg/frmts/jpeg/libjpeg/CMakeLists.txt - try cp $RECIPE_jpeg/patches/CMakeLists.txt $BUILD_jpeg/frmts/jpeg/libjpeg/ - - # https://github.com/OSGeo/gdal/pull/6725 - try patch -p1 < $RECIPE_jpeg/patches/jerror.patch - - touch .patched -} - -function shouldbuild_jpeg() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libjpeg.a -nt $BUILD_jpeg/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_jpeg() { - try mkdir -p $BUILD_PATH/jpeg/build-$ARCH - try cd $BUILD_PATH/jpeg/build-$ARCH - - push_env - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - -DRENAME_INTERNAL_JPEG_SYMBOLS=ON \ - $BUILD_jpeg/frmts/jpeg/libjpeg/ - - check_file_configuration CMakeCache.txt - - try $MAKESMP - - try mkdir -p ${STAGE_PATH}/lib/ - try cp $BUILD_PATH/jpeg/build-$ARCH/libjpeg.a ${STAGE_PATH}/lib/ - try mkdir -p ${STAGE_PATH}/include/ - try cp $BUILD_jpeg/frmts/jpeg/libjpeg/*.h ${STAGE_PATH}/include/ - - pop_env -} - -# function called after all the compile have been done -function postbuild_jpeg() { - if [ ! -f ${STAGE_PATH}/lib/libjpeg.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/libspatialindex/patches/spatialindex.patch b/mac/recipes/libspatialindex/patches/spatialindex.patch deleted file mode 100644 index a93948d3..00000000 --- a/mac/recipes/libspatialindex/patches/spatialindex.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -188,9 +188,9 @@ set(SIDX_SOURCES - #endif() - - -+add_library(${SIDX_LIB_NAME} STATIC ${SIDX_SOURCES}) --add_library(${SIDX_LIB_NAME} ${SIDX_SOURCES}) - -+add_library(${SIDX_C_LIB_NAME} STATIC ${SIDX_CAPI_CPP}) --add_library(${SIDX_C_LIB_NAME} ${SIDX_CAPI_CPP}) - - target_link_libraries(${SIDX_C_LIB_NAME} - ${SIDX_LIB_NAME} \ No newline at end of file diff --git a/mac/recipes/libspatialindex/patches/temporaryfile.patch b/mac/recipes/libspatialindex/patches/temporaryfile.patch deleted file mode 100644 index b5bda1ed..00000000 --- a/mac/recipes/libspatialindex/patches/temporaryfile.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/src/tools/Tools.cc 2019-10-24 03:48:36.000000000 +0200 -+++ b/src/tools/Tools.cc 2021-02-05 09:08:21.000000000 +0100 -@@ -1079,10 +1079,28 @@ Tools::TemporaryFile::TemporaryFile() - m_sFile = std::string(tmpName); - - #else -- char tmpName[7] = "XXXXXX"; -- if (mkstemp(tmpName) == -1) -+ // see https://github.com/boostorg/filesystem/blob/b4d606cdd08640c9bca68f7e97b52245aeef398d/src/operations.cpp#L2783 -+ const char* val = nullptr; -+ -+ (val = std::getenv("TMPDIR" )) || -+ (val = std::getenv("TMP" )) || -+ (val = std::getenv("TEMP" )) || -+ (val = std::getenv("TEMPDIR")); -+ -+# ifdef __ANDROID__ -+ const char* default_tmp = "/data/local/tmp"; -+# else -+ const char* default_tmp = "/tmp"; -+# endif -+ std::string tempDir ((val != nullptr) ? val : default_tmp); -+ -+ // now contruct the temporary filename -+ std::string tempName = tempDir + "/spatialindex-XXXXXX"; -+ char* tmpName = strdup(tempName.c_str()); -+ if (!tmpName || mkstemp(tmpName) == -1) - throw std::ios_base::failure("Tools::TemporaryFile: Cannot create temporary file name."); -- m_sFile = tmpName; -+ m_sFile = tmpName; -+ free(tmpName); - #endif - - m_pFile = new Tools::BufferedFileWriter(m_sFile, Tools::CREATE); \ No newline at end of file diff --git a/mac/recipes/libspatialindex/recipe.sh b/mac/recipes/libspatialindex/recipe.sh deleted file mode 100755 index e1a62cdd..00000000 --- a/mac/recipes/libspatialindex/recipe.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libspatialindex=() - -# default build path -BUILD_libspatialindex=$BUILD_PATH/libspatialindex/$(get_directory $URL_libspatialindex) - -# default recipe path -RECIPE_libspatialindex=$RECIPES_PATH/libspatialindex - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libspatialindex() { - cd $BUILD_libspatialindex - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_libspatialindex" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_libspatialindex" - - # remove in release 1.9.4 - # see https://github.com/libspatialindex/libspatialindex/commit/387a5a07d4f7ab6d94d9f3aaf728f5cc81b2d944 - try patch --verbose --forward -p1 < $RECIPE_libspatialindex/patches/temporaryfile.patch - try patch -p1 < $RECIPE_libspatialindex/patches/spatialindex.patch - - touch .patched -} - -function shouldbuild_libspatialindex() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libspatialindex.a -nt $BUILD_libspatialindex/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libspatialindex() { - try mkdir -p $BUILD_PATH/libspatialindex/build-$ARCH - try cd $BUILD_PATH/libspatialindex/build-$ARCH - - push_env - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - $BUILD_libspatialindex - check_file_configuration CMakeCache.txt - - try $MAKESMP - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_libspatialindex() { - if [ ! -f ${STAGE_PATH}/lib/libspatialindex.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/libspatialite/recipe.sh b/mac/recipes/libspatialite/recipe.sh deleted file mode 100755 index 6438ccb0..00000000 --- a/mac/recipes/libspatialite/recipe.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libspatialite=(proj freexl geos) - -# default build path -BUILD_libspatialite=$BUILD_PATH/libspatialite/$(get_directory $URL_libspatialite) - -# default recipe path -RECIPE_libspatialite=$RECIPES_PATH/libspatialite - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libspatialite() { - cd $BUILD_libspatialite - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_libspatialite" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_libspatialite" - - patch_configure_file configure - - touch .patched -} - -function shouldbuild_libspatialite() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libspatialite.a -nt $BUILD_libspatialite/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libspatialite() { - try mkdir -p $BUILD_PATH/libspatialite/build-$ARCH - try cd $BUILD_PATH/libspatialite/build-$ARCH - - push_env - - # so the configure script can check that proj library is ok - export LDFLAGS="$LDFLAGS -lc++ -lgeos -lproj -lsqlite3 -lcurl -ltiff -ljpeg -lwebp -lz -framework Security -framework CoreFoundation -framework SystemConfiguration" - - rm $BUILD_libspatialite/config.h - rm $BUILD_libspatialite/src/headers/spatialite/gaiaconfig.h - - export CFLAGS="$CFLAGS -I$BUILD_PATH/libspatialite/build-$ARCH/src/headers" - - try $BUILD_libspatialite/configure \ - --prefix=$STAGE_PATH \ - --target=macosx \ - --with-geosconfig=$STAGE_PATH/bin/geos-config \ - --enable-libxml2=no \ - --disable-examples \ - --enable-proj=yes \ - --enable-gcp=no \ - --enable-minizip=no \ - --disable-shared \ - --enable-rttopo=no \ - --enable-static=yes - - - try $MAKESMP - try make install &> install.log - - pop_env -} - -# function called after all the compile have been done -function postbuild_libspatialite() { - if [ ! -f ${STAGE_PATH}/lib/libspatialite.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/libtasn1/recipe.sh b/mac/recipes/libtasn1/recipe.sh deleted file mode 100755 index afb57de6..00000000 --- a/mac/recipes/libtasn1/recipe.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libtasn1=() - -# default build path -BUILD_libtasn1=$BUILD_PATH/libtasn1/$(get_directory $URL_libtasn1) - -# default recipe path -RECIPE_libtasn1=$RECIPES_PATH/libtasn1 - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libtasn1() { - cd $BUILD_libtasn1 - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_libtasn1" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_libtasn1" - - touch .patched -} - -function shouldbuild_libtasn1() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libtasn1.a -nt $BUILD_libtasn1/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libtasn1() { - push_env - - try mkdir -p $BUILD_PATH/libtasn1/build-$ARCH - try cd $BUILD_PATH/libtasn1/build-$ARCH - - export CFLAGS="${CFLAGS} -Wno-error=implicit-function-declaration" - - try $BUILD_libtasn1/configure --disable-doc --disable-valgrind-tests --prefix=$STAGE_PATH --disable-shared --disable-gcc-warnings --disable-silent-rules - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_libtasn1() { - if [ ! -f ${STAGE_PATH}/lib/libtasn1.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/libtiff/patches/notools.patch b/mac/recipes/libtiff/patches/notools.patch deleted file mode 100644 index ff8bb534..00000000 --- a/mac/recipes/libtiff/patches/notools.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/CMakeLists.txt 2022-08-03 11:24:47.000000000 +0200 -+++ b/CMakeLists.txt 2022-08-03 11:28:07.000000000 +0200 -@@ -137,12 +137,12 @@ include(Release) - # Process subdirectories - add_subdirectory(port) - add_subdirectory(libtiff) --add_subdirectory(tools) --add_subdirectory(test) -+# add_subdirectory(tools) -+# add_subdirectory(test) - add_subdirectory(contrib) - add_subdirectory(build) --add_subdirectory(man) --add_subdirectory(html) -+# add_subdirectory(man) -+# add_subdirectory(html) - - - message(STATUS "") diff --git a/mac/recipes/libtiff/recipe.sh b/mac/recipes/libtiff/recipe.sh deleted file mode 100755 index 53307850..00000000 --- a/mac/recipes/libtiff/recipe.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash - - -# dependencies of this recipe -DEPS_libtiff=(webp libzip jpeg) - - -# default build path -BUILD_libtiff=$BUILD_PATH/libtiff/$(get_directory $URL_libtiff) - -# default recipe path -RECIPE_libtiff=$RECIPES_PATH/libtiff - - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libtiff() { - cd $BUILD_libtiff - - # check marker - if [ -f .patched ]; then - return - fi - - try patch -p1 < $RECIPE_libtiff/patches/notools.patch - - touch .patched -} - -# function called before build_libtiff -# set DO_BUILD=0 if you know that it does not require a rebuild -function shouldbuild_libtiff() { -# If lib is newer than the sourcecode skip build - if [ "${STAGE_PATH}/lib/libtiff.a" -nt $BUILD_libtiff/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libtiff() { - try mkdir -p $BUILD_PATH/libtiff/build-$ARCH - try cd $BUILD_PATH/libtiff/build-$ARCH - - push_env - - export CFLAGS="${CFLAGS} -DRENAME_INTERNAL_LIBJPEG_SYMBOLS -ljpeg" - export CPPFLAGS="${CPPFLAGS} -DRENAME_INTERNAL_LIBJPEG_SYMBOLS -ljpeg" - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - -DWEBP_SUPPORT=BOOL:ON \ - -DLZMA_SUPPORT=BOOL:OFF \ - -DZSTD_SUPPORT=BOOL:OFF \ - -DZSTD_FOUND=OFF \ - -DLERC_SUPPORT=BOOL:OFF \ - -DJPEG_SUPPORT=BOOL:ON \ - -DZIP_SUPPORT=BOOL:ON \ - -DBUILD_DOCS=OFF \ - -DBUILD_CONTRIB=OFF \ - -DBUILD_TESTS=OFF \ - -DWebP_INCLUDE_DIR=$STAGE_PATH/include \ - -DWebP_LIBRARY=$STAGE_PATH/lib/libwebp.a \ - -DJPEG_INCLUDE_DIR=$STAGE_PATH/include \ - -DJPEG_LIBRARY=$STAGE_PATH/lib/libjpeg.a \ - -DCMAKE_DISABLE_FIND_PACKAGE_ZSTD=ON \ - $BUILD_libtiff - - check_file_configuration CMakeCache.txt - - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_libtiff() { - if [ ! -f ${STAGE_PATH}/lib/libtiff.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/libzip/recipe.sh b/mac/recipes/libzip/recipe.sh deleted file mode 100755 index 1edfc2d3..00000000 --- a/mac/recipes/libzip/recipe.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_libzip=() - -# default build path -BUILD_libzip=$BUILD_PATH/libzip/$(get_directory $URL_libzip) - -# default recipe path -RECIPE_libzip=$RECIPES_PATH/libzip - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_libzip() { - cd $BUILD_libzip - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_libzip() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libzip.a -nt $BUILD_libzip/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_libzip() { - try mkdir -p $BUILD_PATH/libzip/build-$ARCH - try cd $BUILD_PATH/libzip/build-$ARCH - - push_env - - # configure - try ${CMAKECMD} \ - -DBUILD_TESTS=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DENABLE_OPENSSL=OFF \ - -DENABLE_COMMONCRYPTO=OFF \ - -DENABLE_GNUTLS=OFF \ - -DBUILD_TOOLS=OFF \ - -DBUILD_REGRESS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_DOC=OFF \ - -DENABLE_MBEDTLS=OFF \ - $BUILD_libzip - check_file_configuration CMakeCache.txt - - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_libzip() { - if [ ! -f ${STAGE_PATH}/lib/libzip.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/postgresql/recipe.sh b/mac/recipes/postgresql/recipe.sh deleted file mode 100755 index 8e00b946..00000000 --- a/mac/recipes/postgresql/recipe.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_postgresql=() - -# default build path -BUILD_postgresql=$BUILD_PATH/postgresql/$(get_directory $URL_postgresql) - -# default recipe path -RECIPE_postgresql=$RECIPES_PATH/postgresql - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_postgresql() { - cd $BUILD_postgresql - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_postgresql/conftools - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_postgresql/conftools - - touch .patched -} - -function shouldbuild_postgresql() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libpq.a -nt $BUILD_postgresql/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_postgresql() { - try mkdir -p $BUILD_PATH/postgresql/build-$ARCH - try cd $BUILD_PATH/postgresql/build-$ARCH - - push_env - - patch_configure_file $BUILD_postgresql/configure - - USE_DEV_URANDOM=1 \ - try $BUILD_postgresql/configure --prefix=$STAGE_PATH --without-readline --disable-shared - try $MAKESMP -C src/interfaces/libpq - - #simulate make install - echo "installing libpq" - try cp -v $BUILD_postgresql/src/include/postgres_ext.h $STAGE_PATH/include - try cp -v $BUILD_postgresql/src/interfaces/libpq/libpq-fe.h $STAGE_PATH/include - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/include/pg_config_ext.h $STAGE_PATH/include/ - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/interfaces/libpq/libpq.a $STAGE_PATH/lib/ - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/common/libpgcommon.a $STAGE_PATH/lib/ - try cp -v $BUILD_PATH/postgresql/build-$ARCH/src/port/libpgport.a $STAGE_PATH/lib/ - - pop_env -} - -# function called after all the compile have been done -function postbuild_postgresql() { - if [ ! -f ${STAGE_PATH}/lib/libpq.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/proj/recipe.sh b/mac/recipes/proj/recipe.sh deleted file mode 100755 index 06dfcbe3..00000000 --- a/mac/recipes/proj/recipe.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - - -# version of your package in ../../../versions.conf - - -# dependencies of this recipe -DEPS_proj=(sqlite3 libtiff) - -# default build path -BUILD_proj=$BUILD_PATH/proj/$(get_directory $URL_proj) - -# default recipe path -RECIPE_proj=$RECIPES_PATH/proj - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_proj() { - cd $BUILD_proj - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_proj" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_proj" - - touch .patched -} - -function shouldbuild_proj() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libproj.a -nt $BUILD_proj/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_proj() { - try mkdir -p $BUILD_PATH/proj/build-$ARCH - try cd $BUILD_PATH/proj/build-$ARCH - - push_env - - echo "using native sqlite3" - which sqlite3 - - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_TESTING=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DEXE_SQLITE3=`which sqlite3` \ - -DBUILD_APPS=OFF \ - -DENABLE_TIFF=ON \ - -DENABLE_CURL=OFF \ - -DPROJ_CMAKE_SUBDIR=share/cmake/proj4 \ - -DPROJ_DATA_SUBDIR=share/proj \ - -DPROJ_LIB_ENV_VAR_TRIED_LAST=OFF \ - -DTIFF_INCLUDE_DIR=$STAGE_PATH/include \ - -DTIFF_LIBRARY=$STAGE_PATH/lib/libtiff.a \ - $BUILD_proj - check_file_configuration CMakeCache.txt - - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_proj() { - if [ ! -f ${STAGE_PATH}/lib/libproj.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/protobuf/recipe.sh b/mac/recipes/protobuf/recipe.sh deleted file mode 100755 index 9a90280f..00000000 --- a/mac/recipes/protobuf/recipe.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# version of your package - - -# dependencies of this recipe -DEPS_protobuf=() - -# default build path -BUILD_protobuf=$BUILD_PATH/protobuf/$(get_directory $URL_protobuf) - -# default recipe path -RECIPE_protobuf=$RECIPES_PATH/protobuf - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_protobuf() { - cd $BUILD_protobuf - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub "$BUILD_protobuf" - try cp $ROOT_OUT_PATH/.packages/config.guess "$BUILD_protobuf" - - patch_configure_file configure - - touch .patched -} - -function shouldbuild_protobuf() { - if [ -f ${STAGE_PATH}/lib/libprotobuf.a ]; then - DO_BUILD=0 - fi -} - -function build_protobuf() { - try mkdir -p $BUILD_PATH/protobuf/build-$ARCH/ - try cd $BUILD_PATH/protobuf/build-$ARCH - push_env - - export CXXFLAGS="$CXXFLAGS -DNDEBUG -fvisibility-inlines-hidden -fvisibility=hidden" - export CPPFLAGS="$CXXFLAGS" - export CFLAGS="$CFLAGS -DNDEBUG -fvisibility-inlines-hidden -fvisibility=hidden" - - $BUILD_protobuf/autogen.sh - patch_configure_file $BUILD_protobuf/configure - - try $BUILD_protobuf/configure \ - --prefix=$STAGE_PATH \ - --disable-debug \ - --disable-dependency-tracking \ - --disable-shared \ - --with-protoc=$NATIVE_STAGE_PATH/bin/protoc - - try $MAKESMP - try $MAKE install - - pop_env -} - -# function called after all the compile have been done -function postbuild_protobuf() { - if [ ! -f ${STAGE_PATH}/lib/libprotobuf.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/qca/recipe.sh b/mac/recipes/qca/recipe.sh deleted file mode 100755 index f8c0ac73..00000000 --- a/mac/recipes/qca/recipe.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qca=() - -# default build path -BUILD_qca=$BUILD_PATH/qca/$(get_directory $URL_qca) - -# default recipe path -RECIPE_qca=$RECIPES_PATH/qca - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_qca() { - cd $BUILD_qca - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qca() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libqca-qt6.a -nt $BUILD_qca/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_qca() { - try mkdir -p $BUILD_qca/build-$ARCH - try cd $BUILD_qca/build-$ARCH - - push_env - - # configure - try ${CMAKECMD} \ - -DQT6=ON \ - -DBUILD_TESTS=OFF \ - -DBUILD_TOOLS=OFF \ - -DWITH_nss_PLUGIN=OFF \ - -DWITH_ossl_PLUGIN=OFF \ - -DWITH_pkcs11_PLUGIN=OFF \ - -DWITH_gnupg_PLUGIN=OFF \ - -DWITH_gcrypt_PLUGIN=OFF \ - -DWITH_botan_PLUGIN=NO \ - -DOSX_FRAMEWORK=OFF \ - -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE \ - -DLIBRARY_TYPE=STATIC \ - -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_CXX_VISIBILITY_PRESET=hidden \ - $BUILD_qca - - check_file_configuration CMakeCache.txt - - try $MAKESMP install - - pop_env -} - -# function called after all the compile have been done -function postbuild_qca() { - if [ ! -f ${STAGE_PATH}/lib/libqca-qt6.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/qgis/recipe.sh b/mac/recipes/qgis/recipe.sh deleted file mode 100755 index 7379c13a..00000000 --- a/mac/recipes/qgis/recipe.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qgis=(exiv2 protobuf libtasn1 gdal qca proj libspatialite libspatialindex expat postgresql libzip qtkeychain geodiff zxing geodiff) - -# default build path -BUILD_qgis=$BUILD_PATH/qgis/$(get_directory $URL_qgis) - -# default recipe path -RECIPE_qgis=$RECIPES_PATH/qgis - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_qgis() { - cd $BUILD_qgis - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qgis() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/QGIS.app/Contents/Frameworks/qgis_core.framework/qgis_core -nt $BUILD_qgis/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_qgis() { - try mkdir -p $BUILD_PATH/qgis/build-$ARCH - try cd $BUILD_PATH/qgis/build-$ARCH - - push_env - - # we want to produce CRSSYNC database here (at least somewhere) - # so we can add it to release artefacts - export LDFLAGS="$LDFLAGS -L$STAGE_PATH/lib -lgeodiff -lproj -lZXing -lqt6keychain -lqca-qt6 -lgdal -lpgport -lpgcommon -lpq -lpgport -lpgcommon -lspatialite -lcharset -lxml2 -ltasn1 -lbz2 -lproj -lspatialindex -lgeos -lgeos_c -lprotobuf-lite -lexpat -lfreexl -lexiv2 -lexiv2-xmp -ltiff -lsqlite3 -liconv -lz -lzip -lwebp -ljpeg -lcurl -framework Security -framework CoreFoundation -framework SystemConfiguration" - - try ${CMAKECMD} \ - -DBUILD_WITH_QT6=ON \ - -DQGIS_MAC_DEPS_DIR=$STAGE_PATH \ - -DWITH_BINDINGS=FALSE \ - -DWITH_DESKTOP=OFF \ - -DWITH_EPT=OFF \ - -DWITH_COPC=OFF \ - -DWITH_PDAL=OFF \ - -DWITH_ANALYSIS=OFF \ - -DDISABLE_DEPRECATED=ON \ - -DWITH_QTWEBKIT=OFF \ - -DWITH_QUICK=OFF \ - -DENABLE_TESTS=OFF \ - -DWITH_GUI=OFF \ - -DWITH_APIDOC=OFF \ - -DWITH_ASTYLE=OFF \ - -DWITH_QSPATIALITE=OFF \ - -DWITH_3D=FALSE \ - -DWITH_QGIS_PROCESS=OFF \ - -DQGIS_MACAPP_BUNDLE=-1 \ - -DFORCE_STATIC_LIBS=TRUE \ - -DUSE_OPENCL=OFF \ - -DWITH_QTSERIALPORT=OFF \ - -DWITH_QT5SERIALPORT=OFF \ - -DPOSTGRES_INCLUDE_DIR=$STAGE_PATH/include \ - -DPOSTGRES_LIBRARY=$STAGE_PATH/lib/libpq.a \ - $BUILD_qgis - - check_file_configuration CMakeCache.txt - - try $MAKESMP install - - try cp $BUILD_PATH/qgis/build-$ARCH/src/core/qgis_core.h ${STAGE_PATH}/QGIS.app/Contents/Frameworks/qgis_core.framework/Headers/ - - # TODO - # the installed QGIS references frameworks from build/qgis/build-mac/output/lib, see input/.github/workflows/autotests.yml - - # bundle QGIS's find packages too - try mkdir -p $STAGE_PATH/cmake/ - try cp -Rf $BUILD_qgis/cmake/* $STAGE_PATH/cmake/ - - pop_env -} - -# function called after all the compile have been done -function postbuild_qgis() { - : -} diff --git a/mac/recipes/qtkeychain/recipe.sh b/mac/recipes/qtkeychain/recipe.sh deleted file mode 100755 index 02df0531..00000000 --- a/mac/recipes/qtkeychain/recipe.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_qtkeychain=() - -# default build path -BUILD_qtkeychain=$BUILD_PATH/qtkeychain/$(get_directory $URL_qtkeychain) - -# default recipe path -RECIPE_qtkeychain=$RECIPES_PATH/qtkeychain - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_qtkeychain() { - cd $BUILD_qtkeychain - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_qtkeychain() { - # If lib is newer than the sourcecode skip build - if [ ${STAGE_PATH}/lib/libqt6keychain.a -nt $BUILD_qtkeychain/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_qtkeychain() { - try mkdir -p $BUILD_qtkeychain/build-$ARCH - try cd $BUILD_qtkeychain/build-$ARCH - - push_env - - # configure - try ${CMAKECMD} \ - -DBUILD_WITH_QT6=ON \ - -DBUILD_TEST_APPLICATION=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_TOOLS=OFF \ - -DWITH_nss_PLUGIN=OFF \ - -DWITH_pkcs11_PLUGIN=OFF \ - $BUILD_qtkeychain - - check_file_configuration CMakeCache.txt - - try $MAKESMP install - - - pop_env -} - -# function called after all the compile have been done -function postbuild_qtkeychain() { - if [ ! -f ${STAGE_PATH}/lib/libqt6keychain.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/sqlite3/recipe.sh b/mac/recipes/sqlite3/recipe.sh deleted file mode 100755 index 5baa454b..00000000 --- a/mac/recipes/sqlite3/recipe.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_sqlite3=() - -# default build path -BUILD_sqlite3=$BUILD_PATH/sqlite3/$(get_directory $URL_sqlite3) - -# default recipe path -RECIPE_sqlite3=$RECIPES_PATH/sqlite3 - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_sqlite3() { - cd $BUILD_sqlite3 - - # check marker - if [ -f .patched ]; then - return - fi - - try cp $ROOT_OUT_PATH/.packages/config.sub $BUILD_sqlite3 - try cp $ROOT_OUT_PATH/.packages/config.guess $BUILD_sqlite3 - - patch_configure_file configure - - touch .patched -} - -function shouldbuild_sqlite3() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libsqlite3.a -nt $BUILD_sqlite3/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_sqlite3() { - try mkdir -p $BUILD_PATH/sqlite3/build-$ARCH - try cd $BUILD_PATH/sqlite3/build-$ARCH - - push_env - - export CFLAGS="${CFLAGS} -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK" - export CFLAGS="${CFLAGS} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_MAX_VARIABLE_NUMBER=250000 -DSQLITE_ENABLE_FTS3=1" - export CFLAGS="${CFLAGS} -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_JSON1=1" - - try $BUILD_sqlite3/configure \ - --prefix=$STAGE_PATH \ - --host=$TOOLCHAIN_PREFIX \ - --disable-shared \ - --enable-static - - # manual install - try $MAKESMP install-libLTLIBRARIES - try $MAKESMP install-includeHEADERS - - pop_env -} - -# function called after all the compile have been done -function postbuild_sqlite3() { - if [ ! -f ${STAGE_PATH}/lib/libsqlite3.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/webp/recipe.sh b/mac/recipes/webp/recipe.sh deleted file mode 100755 index 761e831b..00000000 --- a/mac/recipes/webp/recipe.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# version of your package in ../../version.conf - -# dependencies of this recipe -DEPS_webp=() - -# default build path -BUILD_webp=$BUILD_PATH/webp/$(get_directory $URL_webp) - -# default recipe path -RECIPE_webp=$RECIPES_PATH/webp - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_webp() { - cd $BUILD_webp - - # check marker - if [ -f .patched ]; then - return - fi - - touch .patched -} - -function shouldbuild_webp() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libwebp.a -nt $BUILD_webp/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_webp() { - try mkdir -p $BUILD_PATH/webp/build-$ARCH - try cd $BUILD_PATH/webp/build-$ARCH - push_env - try $CMAKECMD \ - -DCMAKE_INSTALL_PREFIX:PATH=$STAGE_PATH \ - -DBUILD_SHARED_LIBS=OFF \ - -DWEBP_BUILD_GIF2WEBP=OFF \ - -DCMAKE_DISABLE_FIND_PACKAGE_GIF=TRUE \ - -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=TRUE \ - -DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE \ - -DCMAKE_DISABLE_FIND_PACKAGE_TIFF=TRUE \ - $BUILD_webp - - check_file_configuration CMakeCache.txt - - try $MAKESMP - try $MAKESMP install - pop_env -} - -# function called after all the compile have been done -function postbuild_webp() { - if [ ! -f $STAGE_PATH/lib/libwebp.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/recipes/zxing/recipe.sh b/mac/recipes/zxing/recipe.sh deleted file mode 100755 index 5c8c4f83..00000000 --- a/mac/recipes/zxing/recipe.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# Reading/Writing of QR Codes - -# version of your package in ../../../versions.conf - -# dependencies of this recipe -DEPS_zxing=() - -# default build path -BUILD_zxing=$BUILD_PATH/zxing/$(get_directory $URL_zxing) - -# default recipe path -RECIPE_zxing=$RECIPES_PATH/zxing - -# function called for preparing source code if needed -# (you can apply patch etc here.) -function prebuild_zxing() { - cd $BUILD_zxing - - # check marker - if [ -f .patched ]; then - return - fi -} - -function shouldbuild_zxing() { - # If lib is newer than the sourcecode skip build - if [ $STAGE_PATH/lib/libZXing.a -nt $BUILD_zxing/.patched ]; then - DO_BUILD=0 - fi -} - -# function called to build the source code -function build_zxing() { - try mkdir -p $BUILD_PATH/zxing/build-$ARCH - try cd $BUILD_PATH/zxing/build-$ARCH - push_env - - # configure - try $CMAKECMD \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_BLACKBOX_TESTS=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_UNIT_TESTS=OFF \ - $BUILD_zxing - - check_file_configuration CMakeCache.txt - - try $MAKESMP - try $MAKE install - - pop_env -} - -# function called after all the compile have been done -function postbuild_zxing() { - if [ ! -f ${STAGE_PATH}/lib/libZXing.a ]; then - error "Library was not successfully build for ${ARCH}" - exit 1; - fi -} diff --git a/mac/tools/depsort.py b/mac/tools/depsort.py deleted file mode 100755 index 413b2e05..00000000 --- a/mac/tools/depsort.py +++ /dev/null @@ -1,199 +0,0 @@ -#! /usr/bin/env python3 - -import argparse -import sys - -class Graph(object): - def __init__(self): - # `graph`: dict that maps each package to a set of its dependencies. - self.graph = {} - - def add(self, dependent, dependency): - """Add a dependency relationship to the graph""" - self.graph.setdefault(dependent, set()) - self.graph.setdefault(dependency, set()) - if dependent != dependency: - self.graph[dependent].add(dependency) - - def add_optional(self, dependent, dependency): - """Add an optional (ordering only) dependency relationship to the graph - - Only call this after all mandatory requirements are added - """ - if dependent in self.graph and dependency in self.graph: - self.add(dependent, dependency) - - def find_order(self): - """Do a topological sort on a dependency graph - - :Parameters: - :Returns: - iterator, sorted items form first to last - """ - graph = dict((k, set(v)) for k, v in list(self.graph.items())) - while graph: - # Find all items without a parent - leftmost = [l for l, s in list(graph.items()) if not s] - if not leftmost: - raise ValueError('Dependency cycle detected! %s' % graph) - # If there is more than one, sort them for predictable order - leftmost.sort() - for result in leftmost: - # Yield and remove them from the graph - yield result - graph.pop(result) - for bset in list(graph.values()): - bset.discard(result) - - -def lines_to_relationships(lines): - """Do a topological sort from a list of space-separated lines - - :Parameters: - `lines`: Iterable of lines in the format - "dependent dependency_0 dependency_1 ... dependency_n" - - :Returns: - iterator of (dependent, dependency) tuples - """ - for line in lines: - line = line.split() - if line: - dependent = line[0] - for dependency in line: - yield dependent, dependency - - -def topo_sort_lines(lines, lines_optional=()): - """Do a topological sort from a list of space-separated lines - - :Parameters: - `lines`: Iterable of lines in the format - "dependent dependency_0 dependency_1 ... dependency_n" - - `lines`: Iterable of lines with *optional* (ordering-only) dependencies - "dependent dependency_0 dependency_1 ... dependency_n" - - :Returns: - string, Sorted dependencies, space-separated - """ - graph = Graph() - for dependent, dependency in lines_to_relationships(lines): - graph.add(dependent, dependency) - for dependent, dependency in lines_to_relationships(lines_optional): - graph.add_optional(dependent, dependency) - return ' '.join(graph.find_order()) - - -def test_depsort_1(): - lines = [ - 'c a', - 'b c', - 'd b', - 'w z', - 'a w', - ] - assert topo_sort_lines(lines) == 'z w a c b d' - - -def test_depsort_2(): - lines = [ - 'l k', - 'm l', - 'a k', - 'd a', - 'l d', - 's l', - 'm s', - ] - assert topo_sort_lines(lines) == 'k a d l s m' - - -def test_depsort_3(): - lines = [ - 'z a', - 's z', - 'z z', - 's s', - ] - assert topo_sort_lines(lines) == 'a z s' - - -def test_depsort_4(): - lines = [ - 'f d', - 'g f', - 'r f', - 't r', - 'y t', - 'g y', - ] - assert topo_sort_lines(lines) == 'd f r t y g' - - -def test_depsort_5(): - lines = [ - 'a b c d e f', - 'e f', - 'g', - ] - assert topo_sort_lines(lines) == 'b c d f g e a' - - -def test_depsort_6(): - lines = [ - ' numpy python ', - ' kivy pygame pyjnius android ', - ' python hostpython ', - ' pygame sdl ', - ' android pygame ', - ' pyjnius python ', - ' sdl python ', - ' hostpython ', - ] - assert topo_sort_lines(lines) == ( - 'hostpython python numpy pyjnius sdl pygame android kivy') - - -def test_depsort_optional_1(): - lines = [' myapp openssl python '] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'openssl python myapp' - - -def test_depsort_optional_2(): - lines = [' myapp openssl python '] - # Just for testing purposes, make openssl soft-depend on python - optional = ['openssl python'] - assert topo_sort_lines(lines, optional) == 'python openssl myapp' - - -def test_depsort_optional_3(): - lines = ['myapp openssl'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'openssl myapp' - - -def test_depsort_optional_4(): - lines = ['myapp python'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'python myapp' - - -def test_depsort_optional_4(): - lines = ['myapp'] - optional = ['python openssl'] - assert topo_sort_lines(lines, optional) == 'myapp' - - -def main(argv): - parser = argparse.ArgumentParser( - description="Sort dependencies given on standard input") - parser.add_argument('--optional', type=argparse.FileType('r'), - help='File with optional (ordering-only) dependencies') - args = parser.parse_args(argv[1:]) - return topo_sort_lines(sys.stdin, lines_optional=args.optional or []) - - -if __name__ == '__main__': - print(main(sys.argv)) diff --git a/vcpkg-overlay/ports/exiv2/fix-find_expat.patch b/vcpkg-overlay/ports/exiv2/fix-find_expat.patch new file mode 100644 index 00000000..a2de4228 --- /dev/null +++ b/vcpkg-overlay/ports/exiv2/fix-find_expat.patch @@ -0,0 +1,64 @@ +diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake +index ec3a43f..d8637cc 100644 +--- a/cmake/findDependencies.cmake ++++ b/cmake/findDependencies.cmake +@@ -42,7 +42,8 @@ if (EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP) + message(FATAL_ERROR "EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP are mutually exclusive. You can only choose one of them") + else() + if (EXIV2_ENABLE_XMP) +- find_package(EXPAT REQUIRED) ++ find_package(expat CONFIG REQUIRED) ++ set(EXPAT_FOUND 1) + elseif (EXIV2_ENABLE_EXTERNAL_XMP) + find_package(XmpSdk REQUIRED) + endif () +diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt +index de8aa1d..524724c 100644 +--- a/samples/CMakeLists.txt ++++ b/samples/CMakeLists.txt +@@ -77,11 +77,10 @@ if( EXPAT_FOUND ) + target_link_libraries(geotag + PRIVATE + exiv2-xmp +- ${EXPAT_LIBRARIES} ++ expat::expat + ) + target_include_directories(geotag PRIVATE ${CMAKE_BINARY_DIR}) # exv_conf.h + target_include_directories(geotag PRIVATE ${CMAKE_SOURCE_DIR}/include) # +- target_include_directories(geotag PRIVATE ${EXPAT_INCLUDE_DIR}) + target_include_directories(geotag PRIVATE ${CMAKE_SOURCE_DIR}/src) # To find unused.h + + if (WIN32) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 26e5a95..5dc722c 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -154,8 +154,7 @@ target_include_directories(exiv2lib SYSTEM PRIVATE + ) + + if (EXIV2_ENABLE_XMP OR EXIV2_ENABLE_EXTERNAL_XMP) +- target_include_directories(exiv2lib PRIVATE ${EXPAT_INCLUDE_DIR}) +- target_link_libraries(exiv2lib PRIVATE ${EXPAT_LIBRARIES}) ++ target_link_libraries(exiv2lib PRIVATE expat::expat) + + if (WIN32) + target_compile_definitions(exiv2lib PRIVATE XML_STATIC) +diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt +index a22698f..55102ce 100644 +--- a/xmpsdk/CMakeLists.txt ++++ b/xmpsdk/CMakeLists.txt +@@ -28,13 +28,12 @@ add_library(exiv2-xmp STATIC + + target_link_libraries(exiv2-xmp + PRIVATE +- $ ++ $ + ) + + target_include_directories(exiv2-xmp + PRIVATE + $ +- ${EXPAT_INCLUDE_DIR} + ) + + # Prevent a denial-service-attack related to XML entity expansion diff --git a/ios/recipes/exiv2/patches/exiv2.patch b/vcpkg-overlay/ports/exiv2/ios.patch similarity index 100% rename from ios/recipes/exiv2/patches/exiv2.patch rename to vcpkg-overlay/ports/exiv2/ios.patch diff --git a/vcpkg-overlay/ports/exiv2/portfile.cmake b/vcpkg-overlay/ports/exiv2/portfile.cmake new file mode 100644 index 00000000..fa1aa9d5 --- /dev/null +++ b/vcpkg-overlay/ports/exiv2/portfile.cmake @@ -0,0 +1,77 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Exiv2/exiv2 + REF ad5484cb1eaba3ad0e49b290d244f6b1ee9ff076 #v0.27.5 + SHA512 33b8c60990b05f1599860974d6fe44baba8369356acd2cab3ce4919a48bb44348ed0496ffc4581d9fd5eb8a1b36d48a0eaa3fafe4584bfd655d0a88e7a9458ef + HEAD_REF master + PATCHES + fix-find_expat.patch + ios.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + unicode EXIV2_ENABLE_WIN_UNICODE + xmp EXIV2_ENABLE_XMP + video EXIV2_ENABLE_VIDEO + png EXIV2_ENABLE_PNG + nls EXIV2_ENABLE_NLS +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" EXIV2_CRT_DYNAMIC) + +if("unicode" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature unicode only supports Windows platform.") +endif() + +vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DEXIV2_BUILD_EXIV2_COMMAND=OFF + -DEXIV2_BUILD_UNIT_TESTS=OFF + -DEXIV2_BUILD_SAMPLES=OFF + -DEXIV2_BUILD_DOC=OFF + -DEXIV2_ENABLE_EXTERNAL_XMP=OFF + -DEXIV2_ENABLE_PRINTUCS2=OFF + -DEXIV2_ENABLE_LENSDATA=ON + -DEXIV2_ENABLE_DYNAMIC_RUNTIME=${EXIV2_CRT_DYNAMIC} + -DEXIV2_ENABLE_WEBREADY=OFF + -DEXIV2_ENABLE_CURL=OFF + -DEXIV2_ENABLE_SSH=OFF + -DEXIV2_ENABLE_BMFF=OFF + -DEXIV2_TEAM_EXTRA_WARNINGS=OFF + -DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF + -DEXIV2_TEAM_PACKAGING=OFF + -DEXIV2_TEAM_USE_SANITIZERS=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/exiv2) +vcpkg_fixup_pkgconfig() + +if("nls" IN_LIST FEATURES) + set(EXIV2_ENABLE_NLS ON) +else() + set(EXIV2_ENABLE_NLS OFF) +endif() +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CURRENT_PACKAGES_DIR}/share/${PORT} + @ONLY +) + +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/exiv2" "${CURRENT_PACKAGES_DIR}/lib/exiv2") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg-overlay/ports/exiv2/vcpkg-cmake-wrapper.cmake b/vcpkg-overlay/ports/exiv2/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000..62f4ecca --- /dev/null +++ b/vcpkg-overlay/ports/exiv2/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,16 @@ +_find_package(${ARGS}) + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + find_package(Iconv REQUIRED) + if(@EXIV2_ENABLE_NLS@) + find_package(Intl REQUIRED) + endif() + if(TARGET exiv2lib) + set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES + Iconv::Iconv + ) + if(@EXIV2_ENABLE_NLS@) + set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${Intl_LIBRARIES}) + endif() + endif() +endif() diff --git a/vcpkg-overlay/ports/exiv2/vcpkg.json b/vcpkg-overlay/ports/exiv2/vcpkg.json new file mode 100644 index 00000000..6bbb69c9 --- /dev/null +++ b/vcpkg-overlay/ports/exiv2/vcpkg.json @@ -0,0 +1,52 @@ +{ + "name": "exiv2", + "version": "0.27.5", + "port-version": 1, + "description": "Image metadata library and tools", + "homepage": "https://www.exiv2.org", + "supports": "!uwp", + "dependencies": [ + "libiconv", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "nls": { + "description": "Build native language support", + "dependencies": [ + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + } + ] + }, + "png": { + "description": "Build with png support (requires libz)", + "dependencies": [ + "libpng", + "zlib" + ] + }, + "unicode": { + "description": "Compile with unicode support on windows" + }, + "video": { + "description": "Build video support into library" + }, + "xmp": { + "description": "Build with XMP metadata support", + "dependencies": [ + "expat" + ] + } + } +} diff --git a/vcpkg-overlay/ports/json-c/pkgconfig.patch b/vcpkg-overlay/ports/json-c/pkgconfig.patch new file mode 100644 index 00000000..893406ed --- /dev/null +++ b/vcpkg-overlay/ports/json-c/pkgconfig.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ffb1db3dc..a82ed8619 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -273,7 +273,7 @@ install( + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} + ) + +-if (UNIX OR MINGW OR CYGWIN) ++if (1) + SET(prefix ${CMAKE_INSTALL_PREFIX}) + # exec_prefix is prefix by default and CMake does not have the + # concept. diff --git a/vcpkg-overlay/ports/json-c/portfile.cmake b/vcpkg-overlay/ports/json-c/portfile.cmake new file mode 100644 index 00000000..d0893ebe --- /dev/null +++ b/vcpkg-overlay/ports/json-c/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO json-c/json-c + REF eae040a84a479ccad1d1c48314345c51ecf1a4a4 + SHA512 18d8a31b341830b04676cad13fbc0608fb75a323522161ac8fd0bb5058db82c1c261d504696a1e12f4b03eb0967632885580ff81d808adf2f1dff7e32d131ba0 + HEAD_REF master + PATCHES pkgconfig.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg-overlay/ports/json-c/vcpkg.json b/vcpkg-overlay/ports/json-c/vcpkg.json new file mode 100644 index 00000000..ff61b336 --- /dev/null +++ b/vcpkg-overlay/ports/json-c/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "json-c", + "version-string": "2019-09-10", + "port-version": 2, + "description": "A JSON implementation in C", + "homepage": "https://github.com/json-c/json-c" +} diff --git a/vcpkg-overlay/ports/libiconv/0002-Config-for-MSVC.patch b/vcpkg-overlay/ports/libiconv/0002-Config-for-MSVC.patch new file mode 100644 index 00000000..0c90e50e --- /dev/null +++ b/vcpkg-overlay/ports/libiconv/0002-Config-for-MSVC.patch @@ -0,0 +1,14 @@ +diff --git "a/lib/loop_wchar.h" "b/lib/loop_wchar.h" +index 6dc011b..158ccdd 100644 +--- "a/lib/loop_wchar.h" ++++ "b/lib/loop_wchar.h" +@@ -37,7 +37,7 @@ + # include + # define BUF_SIZE 64 /* assume MB_LEN_MAX <= 64 */ + /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ +- extern size_t mbrtowc (); ++// extern size_t mbrtowc (); + # ifdef mbstate_t + # define mbrtowc(pwc, s, n, ps) (mbrtowc)(pwc, s, n, 0) + # define mbsinit(ps) 1 + \ No newline at end of file diff --git a/vcpkg-overlay/ports/libiconv/0003-Add-export.patch b/vcpkg-overlay/ports/libiconv/0003-Add-export.patch new file mode 100644 index 00000000..c8d131d2 --- /dev/null +++ b/vcpkg-overlay/ports/libiconv/0003-Add-export.patch @@ -0,0 +1,12 @@ +diff -uNr libiconv-1.16/libcharset/include/libcharset.h.in libiconv-1.16-work/libcharset/include/libcharset.h.in +--- libiconv-1.16/libcharset/include/libcharset.h.in 2018-09-17 19:07:42.000000000 +0300 ++++ libiconv-1.16-work/libcharset/include/libcharset.h.in 2019-12-04 17:15:50.000000000 +0300 +@@ -33,7 +33,7 @@ + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +-extern void libcharset_set_relocation_prefix (const char *orig_prefix, ++extern void LIBCHARSET_DLL_EXPORTED libcharset_set_relocation_prefix (const char *orig_prefix, + const char *curr_prefix); + + diff --git a/vcpkg-overlay/ports/libiconv/0004-ModuleFileName.patch b/vcpkg-overlay/ports/libiconv/0004-ModuleFileName.patch new file mode 100644 index 00000000..15ceb2a4 --- /dev/null +++ b/vcpkg-overlay/ports/libiconv/0004-ModuleFileName.patch @@ -0,0 +1,13 @@ +diff --git a/lib/relocatable.c b/lib/relocatable.c +index 89b6c27..1561894 100644 +--- a/lib/relocatable.c ++++ b/lib/relocatable.c +@@ -329,7 +329,7 @@ DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved) + /* The DLL is being loaded into an application's address range. */ + static char location[MAX_PATH]; + +- if (!GetModuleFileName (module_handle, location, sizeof (location))) ++ if (!GetModuleFileNameA (module_handle, location, sizeof (location))) + /* Shouldn't happen. */ + return FALSE; + diff --git a/vcpkg-overlay/ports/libiconv/portfile.cmake b/vcpkg-overlay/ports/libiconv/portfile.cmake new file mode 100644 index 00000000..8bf88682 --- /dev/null +++ b/vcpkg-overlay/ports/libiconv/portfile.cmake @@ -0,0 +1,53 @@ +if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_ANDROID AND NOT VCPKG_TARGET_IS_IOS) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/iconv") + file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/iconv") + return() +endif() + +set(LIBICONV_VERSION 1.16) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz" + FILENAME "libiconv-${LIBICONV_VERSION}.tar.gz" + SHA512 365dac0b34b4255a0066e8033a8b3db4bdb94b9b57a9dca17ebf2d779139fe935caf51a465d17fd8ae229ec4b926f3f7025264f37243432075e5583925bb77b7 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIBICONV_VERSION} + PATCHES + 0002-Config-for-MSVC.patch + 0003-Add-export.patch + 0004-ModuleFileName.patch +) + +if (NOT VCPKG_TARGET_IS_ANDROID) + list(APPEND OPTIONS --enable-relocatable) +endif() + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + DETERMINE_BUILD_TRIPLET + USE_WRAPPERS + OPTIONS + --enable-extra-encodings + --without-libiconv-prefix + --without-libintl-prefix + ${OPTIONS} +) +vcpkg_install_make() + +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin") + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/iconv") + +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}") # share contains unneeded doc files + +# Please keep, the default usage is broken +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/COPYING.LIB" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg-overlay/ports/libiconv/usage b/vcpkg-overlay/ports/libiconv/usage new file mode 100644 index 00000000..db47c33e --- /dev/null +++ b/vcpkg-overlay/ports/libiconv/usage @@ -0,0 +1,4 @@ +The package libiconv provides CMake targets: + + find_package(Iconv) + target_link_libraries(main PRIVATE Iconv::Iconv) diff --git a/vcpkg-overlay/ports/libiconv/vcpkg-cmake-wrapper.cmake b/vcpkg-overlay/ports/libiconv/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000..8e25449a --- /dev/null +++ b/vcpkg-overlay/ports/libiconv/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,21 @@ +include(SelectLibraryConfigurations) + +_find_package(${ARGS}) +if(Iconv_FOUND AND NOT Iconv_IS_BUILT_IN) + find_path(CHARSET_INCLUDE_DIR NAMES "libcharset.h" HINTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") + find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib HINTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug") + find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib HINTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}") + select_library_configurations(CHARSET) + if(NOT TARGET Iconv::Charset) + add_library(Iconv::Charset INTERFACE IMPORTED) + set_target_properties(Iconv::Charset PROPERTIES + INTERFACE_LINK_LIBRARIES "\$<\$>:${CHARSET_LIBRARY_RELEASE}>;\$<\$:${CHARSET_LIBRARY_DEBUG}>" + INTERFACE_INCLUDE_DIRECTORIES "${CHARSET_INCLUDE_DIRS}") + endif() + if(CHARSET_LIBRARIES) + list(APPEND Iconv_LIBRARIES ${CHARSET_LIBRARIES}) + if(TARGET Iconv::Iconv) + set_property(TARGET Iconv::Iconv APPEND PROPERTY INTERFACE_LINK_LIBRARIES Iconv::Charset) + endif() + endif() +endif() diff --git a/vcpkg-overlay/ports/libiconv/vcpkg.json b/vcpkg-overlay/ports/libiconv/vcpkg.json new file mode 100644 index 00000000..b567aee1 --- /dev/null +++ b/vcpkg-overlay/ports/libiconv/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libiconv", + "version": "1.16", + "port-version": 13, + "description": "GNU Unicode text conversion", + "homepage": "https://www.gnu.org/software/libiconv/" +} diff --git a/vcpkg-overlay/triplets/arm-android.cmake b/vcpkg-overlay/triplets/arm-android.cmake new file mode 100644 index 00000000..816133cd --- /dev/null +++ b/vcpkg-overlay/triplets/arm-android.cmake @@ -0,0 +1,12 @@ +set(VCPKG_TARGET_ARCHITECTURE arm) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) +set(VCPKG_CMAKE_SYSTEM_NAME Android) +set(VCPKG_BUILD_TYPE release) +set(VCPKG_MAKE_BUILD_TRIPLET "--host=armv7a-linux-androideabi") +set(VCPKG_CMAKE_CONFIGURE_OPTIONS -DANDROID_ABI=armeabi-v7a -DANDROID_ARM_NEON=OFF) + +set(VCPKG_CXX_FLAGS "-fstack-protector-strong -lunwind -Wl,--exclude-libs=libunwind.a") +set(VCPKG_C_FLAGS "-fstack-protector-strong -lunwind -Wl,--exclude-libs=libunwind.a") + +set(VCPKG_ENV_PASSTHROUGH Qt6_Dir) \ No newline at end of file diff --git a/vcpkg-overlay/triplets/arm64-android.cmake b/vcpkg-overlay/triplets/arm64-android.cmake new file mode 100644 index 00000000..10243f2c --- /dev/null +++ b/vcpkg-overlay/triplets/arm64-android.cmake @@ -0,0 +1,12 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) +set(VCPKG_CMAKE_SYSTEM_NAME Android) +set(VCPKG_BUILD_TYPE release) +set(VCPKG_MAKE_BUILD_TRIPLET "--host=aarch64-linux-android") +set(VCPKG_CMAKE_CONFIGURE_OPTIONS -DANDROID_ABI=arm64-v8a) + +set(VCPKG_CXX_FLAGS "-fstack-protector-strong") +set(VCPKG_C_FLAGS "-fstack-protector-strong") + +set(VCPKG_ENV_PASSTHROUGH Qt6_Dir) \ No newline at end of file diff --git a/vcpkg-overlay/triplets/arm64-ios.cmake b/vcpkg-overlay/triplets/arm64-ios.cmake new file mode 100644 index 00000000..b81f0f83 --- /dev/null +++ b/vcpkg-overlay/triplets/arm64-ios.cmake @@ -0,0 +1,13 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) +set(VCPKG_CMAKE_SYSTEM_NAME iOS) +set(VCPKG_OSX_ARCHITECTURES arm64) +if(DEFINED ENV{DEPLOYMENT_TARGET}) + set(VCPKG_OSX_DEPLOYMENT_TARGET $ENV{DEPLOYMENT_TARGET}) +endif() +set(VCPKG_BUILD_TYPE release) +set(VCPKG_CXX_FLAGS "-fvisibility=hidden -g") +set(VCPKG_C_FLAGS "-fvisibility=hidden -g") + +set(VCPKG_ENV_PASSTHROUGH Qt6_Dir) \ No newline at end of file diff --git a/vcpkg-overlay/triplets/x64-linux.cmake b/vcpkg-overlay/triplets/x64-linux.cmake new file mode 100644 index 00000000..f2b04b89 --- /dev/null +++ b/vcpkg-overlay/triplets/x64-linux.cmake @@ -0,0 +1,8 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Linux) +set(VCPKG_BUILD_TYPE release) + +set(VCPKG_ENV_PASSTHROUGH Qt6_Dir) diff --git a/vcpkg-overlay/triplets/x64-osx.cmake b/vcpkg-overlay/triplets/x64-osx.cmake new file mode 100644 index 00000000..fc3a69a2 --- /dev/null +++ b/vcpkg-overlay/triplets/x64-osx.cmake @@ -0,0 +1,9 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Darwin) +set(VCPKG_OSX_ARCHITECTURES x86_64) +set(VCPKG_BUILD_TYPE release) + +set(VCPKG_ENV_PASSTHROUGH Qt6_Dir) \ No newline at end of file diff --git a/vcpkg-overlay/triplets/x64-windows.cmake b/vcpkg-overlay/triplets/x64-windows.cmake index 618daf10..05d9d4f4 100644 --- a/vcpkg-overlay/triplets/x64-windows.cmake +++ b/vcpkg-overlay/triplets/x64-windows.cmake @@ -2,4 +2,5 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE dynamic) set(VCPKG_BUILD_TYPE release) + set(VCPKG_ENV_PASSTHROUGH Qt6_Dir) \ No newline at end of file diff --git a/vcpkg-test/vcpkg.json b/vcpkg-test/vcpkg.json index 6c495d78..73f32a07 100644 --- a/vcpkg-test/vcpkg.json +++ b/vcpkg-test/vcpkg.json @@ -1,6 +1,6 @@ { "name": "input-sdk-vcpkg-test", - "version": "1.0.3", + "version": "2.0.0", "dependencies": [ { "name": "sqlite3", diff --git a/versions.conf b/versions.conf deleted file mode 100644 index 5d631388..00000000 --- a/versions.conf +++ /dev/null @@ -1,119 +0,0 @@ -export VERSION_libtiff=4.3.0 -export URL_libtiff=http://download.osgeo.org/libtiff/tiff-${VERSION_libtiff}.tar.gz -export MD5_libtiff=0a2e4744d1426a8fc8211c0cdbc3a1b3 - -export VERSION_exiv2=0.27.5 -export URL_exiv2=https://github.com/Exiv2/exiv2/archive/refs/tags/v${VERSION_exiv2}.tar.gz -export MD5_exiv2=612b1b9ad1701120aef6ae1b6bab56bf - -export VERSION_expat=2.4.8 -export URL_expat=https://github.com/libexpat/libexpat/releases/download/R_${VERSION_expat//./_}/expat-${VERSION_expat}.tar.gz -export MD5_expat=ce5fa3fa4d866d83ab0cfb00bb95b77a - -export VERSION_freexl=1.0.2 -export URL_freexl=http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-${VERSION_freexl}.tar.gz -export MD5_freexl=9954640e5fed76a5d9deb9b02b0169a0 - -export VERSION_gdal=3.5.1 -export URL_gdal=http://download.osgeo.org/gdal/$VERSION_gdal/gdal-${VERSION_gdal}.tar.gz -export MD5_gdal=90ec67df8648e36795937c07406815ea - -export VERSION_geodiff=2.0.2 -export URL_geodiff=https://github.com/merginmaps/geodiff/archive/${VERSION_geodiff}.tar.gz -export MD5_geodiff=9a56a1c8391f8f5c133efe3f9e92539c - -# NOTE: if changed, update also qgis's recipe -export VERSION_geos=3.9.1 -export URL_geos=https://github.com/libgeos/geos/archive/${VERSION_geos}.tar.gz -export MD5_geos=ea4ced8ff19533e8b527b7316d7010bb - -# NOTE: macOS uses SYSTEM iconv -export VERSION_iconv=1.17 -export URL_iconv=http://ftpmirror.gnu.org/gnu/libiconv/libiconv-${VERSION_iconv}.tar.gz -export MD5_iconv=d718cd5a59438be666d1575855be72c3 - -export VERSION_libspatialindex=1.9.3 -export URL_libspatialindex=https://github.com/libspatialindex/libspatialindex/archive/${VERSION_libspatialindex}.tar.gz -export MD5_libspatialindex=b0cad679ee475cce370d8731d47b174a - -# take JPEG from GDAL, it has renamed symbols -export VERSION_jpeg=6b -export URL_jpeg=http://download.osgeo.org/gdal/$VERSION_gdal/gdal-${VERSION_gdal}.tar.gz -export MD5_jpeg=${MD5_gdal} - -export VERSION_libspatialite=5.0.1 -export URL_libspatialite=http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${VERSION_libspatialite}.tar.gz -export MD5_libspatialite=5f4a961afbb95dcdc715b5d7f8590573 - -export VERSION_libtasn1=4.19.0 -export URL_libtasn1=https://ftp.gnu.org/pub/gnu/libtasn1/libtasn1-${VERSION_libtasn1}.tar.gz -export MD5_libtasn1=f701ab57eb8e7d9c105b2cd5d809b29a - -export VERSION_libzip=1-5-2 -export URL_libzip=https://github.com/nih-at/libzip/archive/rel-${VERSION_libzip}.zip -export MD5_libzip=e5d917a79134eba8f982f7a32435adc4 - -export VERSION_qca=2.3.5 -export URL_qca=https://github.com/KDE/qca/archive/v${VERSION_qca}.tar.gz -export MD5_qca=b33fed0aa484f37a64f6407e2a6eaa64 - -export VERSION_qgis=3.32.1 -# Uncomment if you want to use some random commit from master -# export URL_qgis=https://github.com/qgis/QGIS/archive/ab98551fec7e8f34079e345d5643a5c40af2ee18.tar.gz -export URL_qgis=https://github.com/qgis/QGIS/archive/refs/tags/final-${VERSION_qgis//./_}.tar.gz -export MD5_qgis=18c00fa8ae6b83e088259a0b1f91c5f8 - -export VERSION_qtkeychain=0.14.0 -export URL_qtkeychain=https://github.com/frankosterfeld/qtkeychain/archive/v${VERSION_qtkeychain}.tar.gz -export MD5_qtkeychain=80a0e955493bf9d9a5044a5df880f9c5 - -export VERSION_postgresql=15.2 -export URL_postgresql=https://ftp.postgresql.org/pub/source/v${VERSION_postgresql}/postgresql-${VERSION_postgresql}.tar.bz2 -export MD5_postgresql=968418dbdd700caaccfeabcee7516496 - -export VERSION_proj=9.0.1 -export URL_proj=https://github.com/OSGeo/PROJ/releases/download/$VERSION_proj/proj-${VERSION_proj}.tar.gz -export MD5_proj=d4eca355288bbfe35caaedbd595787dc - -export VERSION_protobuf=3.11.4 -export URL_protobuf=https://github.com/protocolbuffers/protobuf/releases/download/v${VERSION_protobuf}/protobuf-cpp-${VERSION_protobuf}.tar.gz -export MD5_protobuf=44fa1fde51cc21c79d0e64caef2d2933 - -VERSION_sqlite_MAJOR=3 -VERSION_sqlite_MINOR=35 -VERSION_sqlite_PATCH=2 -export VERSION_sqlite3=${VERSION_sqlite_MAJOR}.${VERSION_sqlite_MINOR}.${VERSION_sqlite_PATCH} -export URL_sqlite3_BASE=$(printf "%d%02d%02d00" $VERSION_sqlite_MAJOR $VERSION_sqlite_MINOR $VERSION_sqlite_PATCH) -export URL_sqlite3=https://sqlite.org/2021/sqlite-autoconf-${URL_sqlite3_BASE}.tar.gz -export MD5_sqlite3=454e0899d99a7b28825db3d807526774 - -export VERSION_zxing=1.2.0 -export URL_zxing=https://github.com/nu-book/zxing-cpp/archive/v${VERSION_zxing}.tar.gz -export MD5_zxing=b7265963a766dfc87b60d57e41c56917 - -export VERSION_curl=7.81.0 -export URL_curl=https://github.com/curl/curl/archive/curl-${VERSION_curl//./_}.tar.gz -export MD5_curl=3b2d1ed46e8f1786a5559179411e48eb - -# VERSION_libpng <- we use internal GDAL libpng -# VERSION_libjpeg <- we use internal GDAL libjpeg - -# only on iOS to get includes for libQt6Bundled_Poly2Tri.a -export VERSION_poly2tri=${QT_VERSION} -export URL_poly2tri=https://download.qt.io/archive/qt/6.5/${QT_VERSION}/submodules/qtpositioning-everywhere-src-${QT_VERSION}.zip -export MD5_poly2tri=bcb7e611e90a133726da9a78e47386f0 - -export VERSION_webp=1.1.0 -export URL_webp=https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${VERSION_webp}.tar.gz -export MD5_webp=7e047f2cbaf584dff7a8a7e0f8572f18 - -# iOS/macOS Apple's SecureTransport -# We need to stick with the version of SSL that is -# compatible with Qt's binaries, otherwise you got (runtime) -# "qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed" -# see https://github.com/KDAB/android_openssl/tree/master for building instructions -# see https://wiki.qt.io/Qt_6.5_Tools_and_Versions -# Qt 6.5.1 OpenSSL 3.x -export VERSION_openssl=82c850cbc602ca4d20c82552e618b0a98b196f3c -export URL_openssl=https://github.com/KDAB/android_openssl/archive/${VERSION_openssl}.tar.gz -export MD5_openssl=6cb9f4816bb3cf737dd5c18ed4e47d79