diff --git a/.github/workflows/deploy-debian.yml b/.github/workflows/deploy-debian.yml index c61e9745e..bdf025243 100644 --- a/.github/workflows/deploy-debian.yml +++ b/.github/workflows/deploy-debian.yml @@ -32,7 +32,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - uses: robinraju/release-downloader@4bdb8ee081c9ee08a35320794dd461312ac9e4ad + # v1.12 + - uses: robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05 with: repository: "${{ github.repository }}" tag: "${{ github.event.inputs.tag || inputs.tag }}" diff --git a/.github/workflows/maven-and-native.yml b/.github/workflows/maven-and-native.yml index 20218b698..f757057a2 100644 --- a/.github/workflows/maven-and-native.yml +++ b/.github/workflows/maven-and-native.yml @@ -133,14 +133,6 @@ jobs: env: DEBIAN_FRONTEND: noninteractive run: | - # Remove broken packages from pre-installed php in Actions image - # No longer needed in ubuntu-22.04 - sudo apt-get remove -y libpcre2-dev libicu-dev icu-devtools - sudo apt-add-repository ppa:ondrej/php -y - sudo apt-get install -y aptitude - echo "Get::allow-downgrades \"true\";" | sudo tee /etc/apt/apt.conf.d/99-downgrades - echo "Get::Assume-Yes \"true\";" | sudo tee -a /etc/apt/apt.conf.d/99-downgrades - sudo ./resources/ubuntu-build-image/ppa-purge.sh ppa:ondrej/php -y true if [ "${{ matrix.arch }}" != "x86" ] && [ "${{ matrix.arch }}" != "x86-64" ]; then sudo cp -f resources/ubuntu-build-image/ports-sources.list /etc/apt/sources.list fi @@ -228,7 +220,8 @@ jobs: resources/deb-build.sh \ "${{ needs.version.outputs.version }}" \ "${{ matrix.dist.dist }}" \ - "${{ matrix.arch }}" + "${{ matrix.arch }}" \ + "dev+maven@jitsi.org" - name: Upload package as artifact uses: actions/upload-artifact@v4 @@ -441,7 +434,8 @@ jobs: - name: Create release if: github.ref == 'refs/heads/master' - uses: ncipollo/release-action@37c87f6b53fb46d40450c3cac428aa83c8d0055f + # v1.16.0 + uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 with: artifacts: "target/*.jar,debian-releases.tar" allowUpdates: true diff --git a/debian/control b/debian/control index cfd77076f..e4786bc76 100644 --- a/debian/control +++ b/debian/control @@ -8,12 +8,12 @@ Vcs-Git: https://github.com/jitsi/libjitsi.git Vcs-Browser: https://github.com/jitsi/libjitsi Standards-Version: 4.5.0 Build-Depends: - debhelper (>= 11), + debhelper (>= 11) | debhelper:native , dpkg-dev (>= 1.16.1), - libtool, - cmake, - git, - default-jdk, + libtool | libtool:native , + cmake | cmake:native , + git | git:native , + default-jdk | default-jdk:native , libasound2-dev, libpulse-dev, libx11-dev, diff --git a/debian/rules b/debian/rules index 01ca08ca6..4d24453de 100755 --- a/debian/rules +++ b/debian/rules @@ -7,8 +7,11 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) %: dh $@ -Scmake --sourcedirectory src/native +export JAVA_HOME ?= /usr/lib/jvm/default-java + override_dh_auto_configure: dh_auto_configure -- \ + -DJAVA_HOME="$(JAVA_HOME)" \ -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \ -DCMAKE_INSTALL_LIBDIR="lib/$(DEB_HOST_MULTIARCH)/jni" \ -DJITSI_BUILD_DEBIAN=ON \ diff --git a/pom.xml b/pom.xml index 5862dd06b..f1e86beda 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ - 1.77 + 1.78.1 UTF-8 @@ -69,7 +69,7 @@ net.java.dev.jna jna - 5.13.0 + 5.17.0 org.bouncycastle @@ -94,12 +94,12 @@ ${project.groupId} jitsi-utils - 1.0-126-g02b0c86 + 1.0-147-g12d0b20 ${project.groupId} jitsi-srtp - 1.1-15-ga19c05a + 1.1-21-g66f32c3 org.opentelecoms.sdp @@ -127,12 +127,12 @@ org.apache.commons commons-lang3 - 3.12.0 + 3.19.0 org.jetbrains annotations - 24.0.1 + 26.0.2-1 provided @@ -140,13 +140,13 @@ org.junit.jupiter junit-jupiter-engine - 5.9.3 + 5.14.0 test org.mockito mockito-core - 5.4.0 + 5.17.0 test @@ -158,11 +158,35 @@ + + + + org.apache.maven.plugins + maven-antrun-plugin + 3.1.0 + + + org.apache.maven.plugins + maven-assembly-plugin + 3.7.1 + + + org.apache.maven.plugins + maven-dependency-plugin + 3.8.1 + + + org.apache.maven.plugins + maven-release-plugin + 3.1.1 + + + org.codehaus.mojo versions-maven-plugin - 2.16.0 + 2.19.1 @@ -213,7 +237,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.11.0 + 3.14.0 11 @@ -224,13 +248,24 @@ - maven-surefire-plugin - 3.1.2 + org.apache.maven.plugins + maven-clean-plugin + 3.4.1 + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.4 + + + org.apache.maven.plugins + maven-install-plugin + 3.1.4 org.apache.maven.plugins maven-javadoc-plugin - 3.5.0 + 3.12.0 -missing 11 @@ -238,31 +273,31 @@ org.apache.maven.plugins - maven-source-plugin - 3.3.0 - - true - + maven-resources-plugin + 3.3.1 org.apache.maven.plugins - maven-resources-plugin - 3.3.1 + maven-site-plugin + 3.21.0 org.apache.maven.plugins - maven-install-plugin - 3.1.1 + maven-source-plugin + 3.3.1 + + true + org.apache.maven.plugins - maven-deploy-plugin - 3.1.1 + maven-surefire-plugin + 3.5.3 org.sonatype.plugins nexus-staging-maven-plugin - 1.6.13 + 1.7.0 true ossrh diff --git a/resources/deb-build.sh b/resources/deb-build.sh index d4d18555d..602564512 100755 --- a/resources/deb-build.sh +++ b/resources/deb-build.sh @@ -1,9 +1,19 @@ #!/usr/bin/env bash +if [ "$#" -ne 4 ]; then + echo "Usage: $0 " + echo " VERSION: Source package version, e.g. 2.14.123-gcaffee" + echo " DIST: Debian/Ubuntu distribution name (e.g. focal or bullseye)" + echo " ARCH: Architecture (e.g. amd64, aarch64)" + echo " GPG_ID: id for package signing" + exit 1 +fi; + set -e set -x VERSION=$1 DIST=$2 ARCH=$3 +GPG_ID=$4 PROJECT_DIR="$(realpath "$(dirname "$0")/../")" cd "${PROJECT_DIR}" || exit # export for sbuildrc sourcing @@ -13,29 +23,43 @@ mkdir -p "${BUILD_DIR}" # use tmpfs for sbuild sudo tee -a /etc/fstab < "${PROJECT_DIR}/resources/sbuild-tmpfs" -# --skip-security because: https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/1955116 if [[ "${ARCH}" != "amd64" ]]; then - mk-sbuild "${DIST}" --target "${ARCH}" --skip-security --type=file --debootstrap-include=ca-certificates || sbuild-update -udc "${DIST}"-amd64-"${ARCH}" + # For non-amd64, set mirror for ports if needed + if [[ "${ARCH}" == "arm64" || "${ARCH}" == "ppc64el" ]]; then + if ubuntu-distro-info --all | grep -Fqxi "${DIST}"; then + export DEBOOTSTRAP_MIRROR=http://ports.ubuntu.com/ubuntu-ports + fi + fi + + # Create native chroot for the target architecture (using QEMU for emulation) + mk-sbuild "${DIST}" --arch="${ARCH}" --type=file --skip-proposed || sbuild-update -udc "${DIST}"-"${ARCH}" + + # union-type= is not valid for type=file, remove to prevent warnings + sudo sed -i s/union-type=.*//g "/etc/schroot/chroot.d/sbuild-${DIST}-${ARCH}" else if debian-distro-info --all | grep -Fqxi "${DIST}"; then export DEBOOTSTRAP_MIRROR=${DEBOOTSTRAP_MIRROR:-$UBUNTUTOOLS_DEBIAN_MIRROR} elif ubuntu-distro-info --all | grep -Fqxi "${DIST}"; then export DEBOOTSTRAP_MIRROR=${DEBOOTSTRAP_MIRROR:-$UBUNTUTOOLS_UBUNTU_MIRROR} fi - mk-sbuild "${DIST}" --skip-security --type=file --debootstrap-include=ca-certificates || sbuild-update -udc "${DIST}"-amd64 + mk-sbuild "${DIST}" --type=file --debootstrap-include=ca-certificates || sbuild-update -udc "${DIST}"-amd64 + + # union-type= is not valid for type=file, remove to prevent warnings + sudo sed -i s/union-type=.*//g "/etc/schroot/chroot.d/sbuild-${DIST}-amd64" fi mvn -B versions:set -DnewVersion="${VERSION}" -DgenerateBackupPoms=false "${PROJECT_DIR}/resources/deb-gen-source.sh" "${VERSION}" "${DIST}" export SBUILD_CONFIG="${PROJECT_DIR}/resources/sbuildrc" -if [[ "${ARCH}" != "amd64" ]]; then - sbuild --dist "${DIST}" --no-arch-all --host "${ARCH}" "${PROJECT_DIR}"/../libjitsi_*.dsc -else +if [[ "${ARCH}" == "amd64" ]]; then sbuild --dist "${DIST}" --arch-all "${PROJECT_DIR}"/../libjitsi_*.dsc cp "${PROJECT_DIR}"/../libjitsi_* "$BUILD_DIR" +else + # Native build in QEMU-emulated chroot + sbuild --dist "${DIST}" --no-arch-all --arch="${ARCH}" "${PROJECT_DIR}"/../libjitsi_*.dsc fi -debsign -S -edev+maven@jitsi.org "${BUILD_DIR}"/*.changes --re-sign -p"${PROJECT_DIR}"/resources/gpg-wrap.sh +debsign -S -e"${GPG_ID}" "${BUILD_DIR}"/*.changes --re-sign -p"${PROJECT_DIR}"/resources/gpg-wrap.sh #make build files readable for Windows and archivable for GitHub Actions rename 's|:|-|g' "$BUILD_DIR"/*.build diff --git a/resources/deb-prepare.sh b/resources/deb-prepare.sh index c5d36f5a4..4b6fe1700 100755 --- a/resources/deb-prepare.sh +++ b/resources/deb-prepare.sh @@ -25,9 +25,12 @@ fi sudo apt-get install -y \ debhelper \ - aptitude \ sbuild \ schroot \ + apt-utils \ + aptitude \ + qemu-user-static \ + binfmt-support \ "$DEVTOOLS_PACKAGE" \ "$UBUNTUTOOLS_PACKAGE" \ debian-archive-keyring \ diff --git a/resources/sbuildrc b/resources/sbuildrc index c99acbf43..a94d8b811 100644 --- a/resources/sbuildrc +++ b/resources/sbuildrc @@ -2,8 +2,12 @@ $verbose = 1; $batch_mode = 1; $build_dir = $ENV{'BUILD_DIR'}; $run_lintian = 0; -$apt_update = 0; +$apt_update = 1; $apt_distupgrade = 0; +$build_dep_resolver = 'apt'; +$resolve_alternatives = 1; +$mailto = ''; +$mailprog = ''; # don't remove this, Perl needs it: 1; diff --git a/resources/ubuntu-build-image/Dockerfile b/resources/ubuntu-build-image/Dockerfile index 79f5846a8..ffbd0c4af 100644 --- a/resources/ubuntu-build-image/Dockerfile +++ b/resources/ubuntu-build-image/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal +FROM ubuntu:jammy ARG ARCH=x86-64 ARG JAVA_VERSION=11 diff --git a/resources/ubuntu-build-image/build-static.sh b/resources/ubuntu-build-image/build-static.sh index b492441db..02949e7a6 100755 --- a/resources/ubuntu-build-image/build-static.sh +++ b/resources/ubuntu-build-image/build-static.sh @@ -37,17 +37,33 @@ esac export JAVA_HOME=/usr/lib/jvm/java-$JAVA_VERSION-openjdk-$JAVA_ARCH cd "$LIBROOT/src/native" || exit 1 -cmake -B cmake-build-$ARCH \ - -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$TOOLCHAIN \ - -DVCPKG_VERBOSE=ON \ - -DVCPKG_TARGET_TRIPLET=$VCPKG_ARCH-linux \ - -DVCPKG_BUILD_TYPE=release \ - -DCMAKE_BUILD_TYPE=release \ - -DCMAKE_C_FLAGS="$CFLAGS" \ - -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ - -DUSE_SYSTEM_OPUS=OFF \ - -DUSE_SYSTEM_SPEEX=OFF \ - -DUSE_SYSTEM_USRSCTP=OFF \ - -DUSE_SYSTEM_VPX=OFF + +# For ppc64el, vcpkg cross-compilation is broken, use system libraries +if [ "$ARCH" = "ppc64el" ]; then + USE_SYSTEM_LIBS=ON + # When using system libs, we need to use the toolchain directly instead of vcpkg + cmake -B cmake-build-$ARCH \ + -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \ + -DCMAKE_BUILD_TYPE=release \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DUSE_SYSTEM_OPUS=ON \ + -DUSE_SYSTEM_SPEEX=ON \ + -DUSE_SYSTEM_USRSCTP=OFF \ + -DUSE_SYSTEM_VPX=ON +else + cmake -B cmake-build-$ARCH \ + -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$TOOLCHAIN \ + -DVCPKG_VERBOSE=ON \ + -DVCPKG_TARGET_TRIPLET=$VCPKG_ARCH-linux \ + -DVCPKG_BUILD_TYPE=release \ + -DCMAKE_BUILD_TYPE=release \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DUSE_SYSTEM_OPUS=OFF \ + -DUSE_SYSTEM_SPEEX=OFF \ + -DUSE_SYSTEM_USRSCTP=OFF \ + -DUSE_SYSTEM_VPX=OFF +fi cmake --build cmake-build-$ARCH --config Release --target install --parallel diff --git a/resources/ubuntu-build-image/packages.sh b/resources/ubuntu-build-image/packages.sh index e4a62be7a..7adbfdd33 100755 --- a/resources/ubuntu-build-image/packages.sh +++ b/resources/ubuntu-build-image/packages.sh @@ -25,7 +25,7 @@ dpkg --add-architecture $DEBARCH if [[ "$GNUARCH" == "" ]]; then PACKAGES+=(g++-multilib gcc-multilib) else - PACKAGES+=("libgcc-7-dev:$DEBARCH" "g++-$GNUARCH-linux-gnu" "gcc-$GNUARCH-linux-gnu") + PACKAGES+=("crossbuild-essential-${DEBARCH}") fi; PACKAGES+=( @@ -46,6 +46,10 @@ PACKAGES+=( "libxext-dev:$DEBARCH" \ "libxt-dev:$DEBARCH" \ "libxv-dev:$DEBARCH" \ + "libopus-dev:$DEBARCH" \ + "libspeex-dev:$DEBARCH" \ + "libspeexdsp-dev:$DEBARCH" \ + "libvpx-dev:$DEBARCH" \ "openjdk-$JAVA_VERSION-jdk:$DEBARCH") DEBIAN_FRONTEND=noninteractive apt-get update && \ diff --git a/resources/ubuntu-build-image/ports-sources.list b/resources/ubuntu-build-image/ports-sources.list index ccaae6eab..e2a298419 100644 --- a/resources/ubuntu-build-image/ports-sources.list +++ b/resources/ubuntu-build-image/ports-sources.list @@ -1,9 +1,9 @@ -deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse -deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse -deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse -deb [arch=amd64,i386] http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse +deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse +deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse +deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse +deb [arch=amd64,i386] http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse -deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse -deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse -deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted universe multiverse -deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse +deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe multiverse +deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe multiverse +deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse +deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse diff --git a/src/native/CMakeLists.txt b/src/native/CMakeLists.txt index fa3f36a5f..3a50dd01e 100644 --- a/src/native/CMakeLists.txt +++ b/src/native/CMakeLists.txt @@ -23,10 +23,15 @@ option(USE_SYSTEM_SPEEX "Use system-installed speex" ${DEFAULT_USE_SYSTEM_SPEEX} option(USE_SYSTEM_VPX "Use system-installed vpx" ${DEFAULT_USE_SYSTEM_VPX}) find_package(Git REQUIRED) +# Apply vcpkg patch, ignore if already applied execute_process( COMMAND "${GIT_EXECUTABLE}" apply --verbose --binary ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg-ppc64el.patch WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg" + RESULT_VARIABLE PATCH_RESULT ) +if(PATCH_RESULT AND NOT PATCH_RESULT EQUAL 0) + message(STATUS "vcpkg patch already applied or not needed") +endif() if (NOT USE_SYSTEM_SPEEX OR NOT USE_SYSTEM_VPX) set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake CACHE STRING "Vcpkg toolchain file") diff --git a/src/native/portaudio/CMakeLists.txt b/src/native/portaudio/CMakeLists.txt index 272d7cf7d..c13fb8898 100644 --- a/src/native/portaudio/CMakeLists.txt +++ b/src/native/portaudio/CMakeLists.txt @@ -39,6 +39,7 @@ externalproject_add(ext_lib_portaudio -DPA_DLL_LINK_WITH_STATIC_RUNTIME:BOOL=OFF -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH= + -DCMAKE_INSTALL_LIBDIR:PATH=lib ) add_library(${PROJECT_NAME} SHARED diff --git a/src/native/screencapture/CMakeLists.txt b/src/native/screencapture/CMakeLists.txt index 48b4799aa..ab6833d87 100644 --- a/src/native/screencapture/CMakeLists.txt +++ b/src/native/screencapture/CMakeLists.txt @@ -2,10 +2,15 @@ project(jnscreencapture C) set(OS_SOURCES "") set(OS_LIBS "") +set(MACOS_COMPILE_FLAGS "") if (WIN32) set(OS_SOURCES screencapture.rc) elseif (APPLE) set(OS_LIBS "-framework ApplicationServices") + # CGWindowListCreateImage is deprecated/unavailable in macOS 15.0+ + # Set deployment target to 14.0 to allow using this API + # TODO: Migrate to ScreenCaptureKit for macOS 15+ support + set(MACOS_COMPILE_FLAGS "-mmacosx-version-min=14.0" "-Wno-deprecated-declarations" "-Wno-unguarded-availability") elseif (UNIX AND NOT APPLE) find_package(X11 REQUIRED) if (NOT X11_FOUND) @@ -35,6 +40,10 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_BINARY_DIR}/include/ ) +if (APPLE) + target_compile_options(${PROJECT_NAME} PRIVATE ${MACOS_COMPILE_FLAGS}) +endif () + if (JITSI_BUILD_DEBIAN) install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/native/third_party/portaudio b/src/native/third_party/portaudio index 09ac94762..e4edf0f98 160000 --- a/src/native/third_party/portaudio +++ b/src/native/third_party/portaudio @@ -1 +1 @@ -Subproject commit 09ac94762ce91fdde41aed82599f328e578bafb2 +Subproject commit e4edf0f9806a6b8a8e143b94edd360bddf9d6aed diff --git a/src/native/vcpkg-ppc64el.patch b/src/native/vcpkg-ppc64el.patch index 174bb9ed4..3c9a4e15c 100644 --- a/src/native/vcpkg-ppc64el.patch +++ b/src/native/vcpkg-ppc64el.patch @@ -1,28 +1,28 @@ diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake -index 2fac4922d..27653cb8f 100644 +index 4cc47f3f1c..52a657018d 100644 --- a/scripts/toolchains/linux.cmake +++ b/scripts/toolchains/linux.cmake -@@ -44,6 +44,23 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - endif() - message(STATUS "Cross compiling arm64 on host x86_64, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}") - endif() -+elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "ppc64le") -+ set(CMAKE_SYSTEM_PROCESSOR ppc64le CACHE STRING "") -+ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") -+ if(NOT DEFINED CMAKE_CXX_COMPILER) -+ set(CMAKE_CXX_COMPILER "powerpc64le-linux-gnu-g++") -+ endif() -+ if(NOT DEFINED CMAKE_C_COMPILER) -+ set(CMAKE_C_COMPILER "powerpc64le-linux-gnu-gcc") -+ endif() -+ if(NOT DEFINED CMAKE_ASM_COMPILER) -+ set(CMAKE_ASM_COMPILER "powerpc64le-linux-gnu-gcc") +@@ -65,6 +65,23 @@ if(NOT _VCPKG_LINUX_TOOLCHAIN) + endif() + message(STATUS "Cross compiling arm64 on host ${CMAKE_HOST_SYSTEM_PROCESSOR}, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}") + endif() ++ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "ppc64le") ++ set(CMAKE_SYSTEM_PROCESSOR ppc64le CACHE STRING "") ++ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") ++ if(NOT DEFINED CMAKE_CXX_COMPILER) ++ set(CMAKE_CXX_COMPILER "powerpc64le-linux-gnu-g++") ++ endif() ++ if(NOT DEFINED CMAKE_C_COMPILER) ++ set(CMAKE_C_COMPILER "powerpc64le-linux-gnu-gcc") ++ endif() ++ if(NOT DEFINED CMAKE_ASM_COMPILER) ++ set(CMAKE_ASM_COMPILER "powerpc64le-linux-gnu-gcc") ++ endif() ++ if(NOT DEFINED CMAKE_ASM-ATT_COMPILER) ++ set(CMAKE_ASM-ATT_COMPILER "powerpc64le-linux-gnu-as") ++ endif() ++ message(STATUS "Cross compiling ppc64le on host x86_64, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}") + endif() -+ if(NOT DEFINED CMAKE_ASM-ATT_COMPILER) -+ set(CMAKE_ASM-ATT_COMPILER "powerpc64le-linux-gnu-as") -+ endif() -+ message(STATUS "Cross compiling ppc64le on host x86_64, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}") -+ endif() - endif() + endif() - get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)