From 45eb42f4ce6fc624c358198b81b5f9d88b514fa5 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 5 Aug 2024 19:06:26 -0400 Subject: [PATCH 1/3] protobuf: install cmake files --- srcpkgs/protobuf/template | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/srcpkgs/protobuf/template b/srcpkgs/protobuf/template index 0b6f27a360f8ed..e5abffe389daa3 100644 --- a/srcpkgs/protobuf/template +++ b/srcpkgs/protobuf/template @@ -1,7 +1,7 @@ # Template file for 'protobuf' pkgname=protobuf version=25.2 -revision=1 +revision=2 build_style=cmake configure_args="-Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_USE_EXTERNAL_GTEST=ON -Dprotobuf_BUILD_LIBPROTOC=ON -Dprotobuf_ABSL_PROVIDER=package @@ -29,7 +29,6 @@ if [ "$CROSS_BUILD" ]; then fi post_install() { - rm -rf "${DESTDIR}/usr/lib/cmake" vlicense LICENSE } @@ -73,8 +72,9 @@ libprotoc-devel_package() { protobuf-devel_package() { depends="zlib-devel - libprotobuf-${version}_${revision} - libprotobuf-lite-${version}_${revision} + libprotobuf>=${version}_${revision} + libprotobuf-lite>=${version}_${revision} + libprotoc-devel>=${version}_${revision} abseil-cpp-devel" short_desc="Protocol buffers C++ library - development files" # Switch to versioned package @@ -87,6 +87,7 @@ protobuf-devel_package() { vmove usr/lib/libprotobuf.so vmove usr/lib/libprotobuf-lite.so vmove usr/lib/pkgconfig + vmove usr/lib/cmake vmove "usr/lib/*.a" } } From d109bc628e1fc323f69d3ed55a1b9956c56d4f9c Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 5 Aug 2024 19:07:01 -0400 Subject: [PATCH 2/3] New package: sentry-native-0.7.7 --- common/shlibs | 1 + srcpkgs/sentry-native-devel | 1 + srcpkgs/sentry-native/template | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 120000 srcpkgs/sentry-native-devel create mode 100644 srcpkgs/sentry-native/template diff --git a/common/shlibs b/common/shlibs index 883fec65b478a2..f6cea713c75a29 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4527,3 +4527,4 @@ libbox2d.so.2 box2d-2.4.1_1 libhwy.so.1 highway-1.2.0_1 libscenefx.so.1 scenefx-0.1_1 libnng.so.1 nng-1.5.2_1 +libsentry.so sentry-native-0.7.7_1 diff --git a/srcpkgs/sentry-native-devel b/srcpkgs/sentry-native-devel new file mode 120000 index 00000000000000..1a2e9f22f8dd32 --- /dev/null +++ b/srcpkgs/sentry-native-devel @@ -0,0 +1 @@ +sentry-native \ No newline at end of file diff --git a/srcpkgs/sentry-native/template b/srcpkgs/sentry-native/template new file mode 100644 index 00000000000000..324c857180573e --- /dev/null +++ b/srcpkgs/sentry-native/template @@ -0,0 +1,28 @@ +# Template file for 'sentry-native' +pkgname=sentry-native +version=0.7.7 +revision=1 +build_style=cmake +configure_args="-DSENTRY_BACKEND=inproc -DSENTRY_TRANSPORT=none" +short_desc="Sentry SDK for C, C++ and native applications" +maintainer="Orphaned " +license="MIT" +homepage="https://github.com/getsentry/sentry-native" +changelog="https://github.com/getsentry/sentry-native/raw/master/CHANGELOG.md" +distfiles="https://github.com/getsentry/sentry-native/archive/refs/tags/${version}.tar.gz" +checksum="3b785c3794867450a54c45eb9d22ab6fb5e49b6eb8abde27660ab2741b846d6a" +# XXX: various minor failures +make_check=no + +post_install() { + vlicense LICENSE +} + +sentry-native-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/cmake + } +} From 23af8ac00a2fa0409435ea81b25edb3c293de427 Mon Sep 17 00:00:00 2001 From: M4RZ3R0 Date: Mon, 5 Aug 2024 16:15:21 +0200 Subject: [PATCH 3/3] protonmail-bridge: update to 3.12.0. --- .../patches/no-gui-tester.patch | 7 +++ .../protonmail-bridge/patches/no-vcpkg.patch | 40 +++++++++++++ .../patches/system-gtest.patch | 22 +++++++ .../patches/system-icu.patch | 15 +++++ srcpkgs/protonmail-bridge/template | 60 ++++++++++++------- 5 files changed, 124 insertions(+), 20 deletions(-) create mode 100644 srcpkgs/protonmail-bridge/patches/no-gui-tester.patch create mode 100644 srcpkgs/protonmail-bridge/patches/no-vcpkg.patch create mode 100644 srcpkgs/protonmail-bridge/patches/system-gtest.patch create mode 100644 srcpkgs/protonmail-bridge/patches/system-icu.patch 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 00000000000000..364ee903a94a40 --- /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 00000000000000..8c43fa6bb05bf3 --- /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/system-gtest.patch b/srcpkgs/protonmail-bridge/patches/system-gtest.patch new file mode 100644 index 00000000000000..70f960c47aa57e --- /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 00000000000000..7794a582a0e20f --- /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 ff08aee8720d7b..f6a1e7bf4bea35 100644 --- a/srcpkgs/protonmail-bridge/template +++ b/srcpkgs/protonmail-bridge/template @@ -1,30 +1,50 @@ # 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_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}" +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" +makedepends="libglvnd-devel libsecret-devel qt6-base-devel qt6-declarative-devel + qt6-svg-devel qt6-wayland-devel sentry-native-devel protobuf-devel grpc-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" -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 }