diff --git a/srcpkgs/protonmail-bridge/patches/no-gui-tester.patch b/srcpkgs/protonmail-bridge/patches/no-gui-tester.patch new file mode 100644 index 00000000000..364ee903a94 --- /dev/null +++ b/srcpkgs/protonmail-bridge/patches/no-gui-tester.patch @@ -0,0 +1,7 @@ +--- a/internal/frontend/bridge-gui/CMakeLists.txt.orig ++++ b/internal/frontend/bridge-gui/CMakeLists.txt +@@ -29,4 +29,3 @@ + + add_subdirectory(bridgepp) + add_subdirectory(bridge-gui) +-add_subdirectory(bridge-gui-tester) diff --git a/srcpkgs/protonmail-bridge/patches/no-vcpkg.patch b/srcpkgs/protonmail-bridge/patches/no-vcpkg.patch new file mode 100644 index 00000000000..8c43fa6bb05 --- /dev/null +++ b/srcpkgs/protonmail-bridge/patches/no-vcpkg.patch @@ -0,0 +1,40 @@ +--- a/internal/frontend/bridge-gui/CMakeLists.txt.orig ++++ b/internal/frontend/bridge-gui/CMakeLists.txt +@@ -23,7 +23,6 @@ + # Project + #***************************************************************************************************************************************************** + set(BRIDGE_REPO_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../../..") +-include("BridgeSetup.cmake") + + project(frontend) + +--- a/internal/frontend/bridge-gui/bridge-gui/CMakeLists.txt.orig ++++ b/internal/frontend/bridge-gui/bridge-gui/CMakeLists.txt +@@ -18,7 +18,6 @@ + + cmake_minimum_required(VERSION 3.22) + set(BRIDGE_REPO_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../../../..") +-include(../BridgeSetup.cmake) + + + #***************************************************************************************************************************************************** +--- a/internal/frontend/bridge-gui/bridge-gui-tester/CMakeLists.txt.orig ++++ b/internal/frontend/bridge-gui/bridge-gui-tester/CMakeLists.txt +@@ -20,7 +20,6 @@ + + + set(BRIDGE_REPO_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../../../..") +-include(../BridgeSetup.cmake) + + + #***************************************************************************************************************************************************** +--- a/internal/frontend/bridge-gui/bridgepp/CMakeLists.txt.orig ++++ b/internal/frontend/bridge-gui/bridgepp/CMakeLists.txt +@@ -19,7 +19,6 @@ + cmake_minimum_required(VERSION 3.22) + + set(BRIDGE_REPO_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../../../..") +-include(../BridgeSetup.cmake) + + + #**************************************************************************************************************************************************** diff --git a/srcpkgs/protonmail-bridge/patches/protobuf-cmake.patch b/srcpkgs/protonmail-bridge/patches/protobuf-cmake.patch new file mode 100644 index 00000000000..337c346a64f --- /dev/null +++ b/srcpkgs/protonmail-bridge/patches/protobuf-cmake.patch @@ -0,0 +1,11 @@ +--- a/internal/frontend/bridge-gui/bridgepp/CMakeLists.txt.orig ++++ b/internal/frontend/bridge-gui/bridgepp/CMakeLists.txt +@@ -48,7 +48,7 @@ + #**************************************************************************************************************************************************** + # gRPC / Protobuf + #**************************************************************************************************************************************************** +-find_package(Protobuf CONFIG REQUIRED) ++find_package(Protobuf REQUIRED) + message(STATUS "Using protobuf ${Protobuf_VERSION}") + + find_package(gRPC CONFIG REQUIRED) diff --git a/srcpkgs/protonmail-bridge/patches/system-gtest.patch b/srcpkgs/protonmail-bridge/patches/system-gtest.patch new file mode 100644 index 00000000000..70f960c47aa --- /dev/null +++ b/srcpkgs/protonmail-bridge/patches/system-gtest.patch @@ -0,0 +1,22 @@ +diff --git a/bridgepp/CMakeLists.txt b/bridgepp/CMakeLists.txt +index f4a0a553..02d631dc 100644 +--- a/internal/frontend/bridge-gui/bridgepp/CMakeLists.txt ++++ b/internal/frontend/bridge-gui/bridgepp/CMakeLists.txt +@@ -172,16 +172,7 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") + cmake_policy(SET CMP0135 NEW) # avoid warning DOWNLOAD_EXTRACT_TIMESTAMP + endif () + +-include(FetchContent) +-FetchContent_Declare( +- googletest +- URL https://github.com/google/googletest/archive/b796f7d44681514f58a683a3a71ff17c94edb0c1.zip +-) +- +-# For Windows: Prevent overriding the parent project's compiler/linker settings +-set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +- +-FetchContent_MakeAvailable(googletest) ++find_package(GTest REQUIRED) + + enable_testing() + diff --git a/srcpkgs/protonmail-bridge/patches/system-icu.patch b/srcpkgs/protonmail-bridge/patches/system-icu.patch new file mode 100644 index 00000000000..7794a582a0e --- /dev/null +++ b/srcpkgs/protonmail-bridge/patches/system-icu.patch @@ -0,0 +1,15 @@ +--- a/internal/frontend/bridge-gui/bridge-gui/DeployLinux.cmake.orig ++++ b/internal/frontend/bridge-gui/bridge-gui/DeployLinux.cmake +@@ -54,9 +54,9 @@ + AppendQt6Lib("libQt6Core.so.6") + AppendQt6Lib("libQt6QuickTemplates2.so.6") + AppendQt6Lib("libQt6DBus.so.6") +-AppendQt6Lib("libicui18n.so.56") +-AppendQt6Lib("libicuuc.so.56") +-AppendQt6Lib("libicudata.so.56") ++AppendQt6Lib("libicui18n.so") ++AppendQt6Lib("libicuuc.so") ++AppendQt6Lib("libicudata.so") + AppendQt6Lib("libQt6XcbQpa.so.6") + AppendQt6Lib("libQt6WaylandClient.so.6") + AppendQt6Lib("libQt6WlShellIntegration.so.6") diff --git a/srcpkgs/protonmail-bridge/template b/srcpkgs/protonmail-bridge/template index ff08aee8720..9d528bb4992 100644 --- a/srcpkgs/protonmail-bridge/template +++ b/srcpkgs/protonmail-bridge/template @@ -1,30 +1,52 @@ # Template file for 'protonmail-bridge' pkgname=protonmail-bridge -version=3.3.0 -revision=2 -archs="x86_64" -create_wrksrc=yes -depends="desktop-file-utils" +version=3.12.0 +revision=1 +archs="x86_64* aarch64* riscv64*" +build_style=cmake +build_helper=qmake6 +build_wrksrc="internal/frontend/bridge-gui/bridge-gui" +configure_args="-DBRIDGE_APP_FULL_NAME=ProtonMailBridge -DBRIDGE_VENDOR=ProtonAG + -DBRIDGE_BUILD_ENV=xbps -DBRIDGE_TAG=${version} -DBRIDGE_REVISION=${revision} + -DBRIDGE_APP_VERSION=${version} -DProtobuf_PROTOC_EXECUTABLE=/usr/bin/protoc" +go_import_path="github.com/ProtonMail/proton-bridge/v3" +go_ldflags="-X ${go_import_path}/internal/constants.Version=${version} + -X ${go_import_path}/internal/constants.Revision=${revision} + -X ${go_import_path}/internal/constants.Tag=${version} + -X ${go_import_path}/internal/constants.FullAppName=ProtonMailBridge + -X ${go_import_path}/internal/constants.BuildEnv=xbps" +hostmakedepends="go pkg-config qt6-base qt6-tools protobuf grpc" +makedepends="libglvnd-devel libsecret-devel qt6-base-devel qt6-declarative-devel + qt6-svg-devel qt6-wayland-devel sentry-native-devel grpc-devel protobuf-devel + gtest-devel" +depends="qt6-svg" short_desc="ProtonMail Bridge for use with E-mail software" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://proton.me/mail/bridge" -distfiles="https://proton.me/download/bridge/protonmail-bridge_${version}-1_amd64.deb" -checksum=4541f8aa145097ee171889b0c9d058450d09dc23be10231c83d6659789a27627 +distfiles="https://github.com/ProtonMail/proton-bridge/archive/refs/tags/v${version}.tar.gz" +checksum=4215fd1848fff262da55194270f495e19722cdf8bbf98dbe3ca4ff5ca5aa4a1f +nopie_files="/usr/libexec/protonmail/bridge" +nocross="protobuf generation fails" -restricted=yes -nopie=yes +post_patch() { + vsed -i -e 's/^Exec=.*$/Exec=protonmail-bridge-gui/' "$wrksrc"/dist/proton-bridge.desktop +} + +pre_build() { + cd "$wrksrc" + ( cd ./utils/ && ./credits.sh bridge ) + . /void-packages/common/environment/build-style/go.sh + go build -p "$XBPS_MAKEJOBS" -modcacherw -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" \ + -o proton-bridge ./cmd/Desktop-Bridge +} do_install() { - rm -f usr/lib/protonmail/bridge/plugins/sqldrivers/libqsqlmysql.so - rm -f usr/lib/protonmail/bridge/plugins/sqldrivers/libqsqlodbc.so - rm -f usr/lib/protonmail/bridge/plugins/sqldrivers/libqsqlpsql.so - rm -rf usr/lib/protonmail/bridge/plugins/designer - rm -rf usr/lib/protonmail/bridge/plugins/qmltooling - rm -rf usr/lib/protonmail/bridge/qml/QtTest - rm -rf usr/lib/protonmail/bridge/qml/Qt/labs - rm -rf usr/lib/protonmail/bridge/lib/cmake - rm -rf usr/lib/protonmail/bridge/lib/pkgconfig - rm -rf usr/lib/protonmail/bridge/lib/*.a - vcopy usr / + vinstall "$wrksrc"/proton-bridge 755 usr/libexec/protonmail bridge + vinstall build/bridge-gui 755 usr/libexec/protonmail bridge-gui + vmkdir usr/bin + ln -s ../libexec/protonmail/bridge "$DESTDIR"/usr/bin/protonmail-bridge + ln -s ../libexec/protonmail/bridge-gui "$DESTDIR"/usr/bin/protonmail-bridge-gui + vinstall "$wrksrc"/dist/proton-bridge.desktop 644 usr/share/applications + vinstall "$wrksrc"/dist/bridge.svg 644 usr/share/icons/hicolor/scalable/apps protonmail-bridge.svg }