Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] proton-bridge: 1.6.3 build from source
@ 2021-02-18 14:53 sgn
  2021-02-18 14:57 ` sgn
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: sgn @ 2021-02-18 14:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages proton-bridge-build-from-source
https://github.com/void-linux/void-packages/pull/28839

proton-bridge: 1.6.3 build from source
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

Not tested, not trying to cross-compile.
Close #26058 

A patch file from https://github.com/void-linux/void-packages/pull/28839.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proton-bridge-build-from-source-28839.patch --]
[-- Type: text/x-diff, Size: 5851 bytes --]

From a2d41787d4c4a08874cff4c3f37662f5576273b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 18 Feb 2021 19:13:45 +0700
Subject: [PATCH 1/2] New package: go-qt5-0.0.20200904

---
 srcpkgs/go-qt5/patches/vendor-void.patch | 23 ++++++++++++++++++++
 srcpkgs/go-qt5/template                  | 27 ++++++++++++++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 srcpkgs/go-qt5/patches/vendor-void.patch
 create mode 100644 srcpkgs/go-qt5/template

diff --git a/srcpkgs/go-qt5/patches/vendor-void.patch b/srcpkgs/go-qt5/patches/vendor-void.patch
new file mode 100644
index 00000000000..a45230f8150
--- /dev/null
+++ b/srcpkgs/go-qt5/patches/vendor-void.patch
@@ -0,0 +1,23 @@
+Index: internal/utils/linux.go
+===================================================================
+--- internal/utils/linux.go.orig
++++ internal/utils/linux.go
+@@ -20,7 +20,7 @@ func QT_DOC_DIR() string {
+ 	switch QT_DISTRO() {
+ 	case "arch":
+ 		return "/usr/share/doc/qt"
+-	case "fedora":
++	case "fedora", "void":
+ 		return "/usr/share/doc/qt5"
+ 	case "suse":
+ 		return "/usr/share/doc/packages/qt5"
+@@ -56,6 +56,9 @@ func QT_DISTRO() string {
+ 	if runtime.GOOS == "darwin" || runtime.GOOS == "freebsd" {
+ 		return runtime.GOOS
+ 	}
++	if _, err := exec.LookPath("xbps-query"); err == nil {
++		return "void"
++	}
+ 	if _, err := exec.LookPath("pacman"); err == nil {
+ 		return "arch"
+ 	}
diff --git a/srcpkgs/go-qt5/template b/srcpkgs/go-qt5/template
new file mode 100644
index 00000000000..e62dcb3e1af
--- /dev/null
+++ b/srcpkgs/go-qt5/template
@@ -0,0 +1,27 @@
+# Template file for 'go-qt5'
+pkgname=go-qt5
+version=0.0.20200904
+revision=1
+_git_hash=c0c124a5770d357908f16fa57e0aa0ec6ccd3f91
+wrksrc=qt-$_git_hash
+build_style=go
+go_import_path="github.com/therecipe/qt"
+go_package="
+ $go_import_path/cmd/qtdeploy
+ $go_import_path/cmd/qtminimal
+ $go_import_path/cmd/qtmoc
+ $go_import_path/cmd/qtrcc
+ $go_import_path/cmd/qtsetup"
+depends="qt5-qmake qt5-host-tools"
+short_desc="Qt binding for golang"
+maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
+license="LGPL-3.0-only"
+homepage="https://github.com/therecipe/qt"
+distfiles="https://github.com/therecipe/qt/archive/$_git_hash.tar.gz"
+checksum=e58a1957611a894611f0a06ce1efe42859b66c2cafd2219fe5b9d497be467e7a
+nocross="experimental packages"
+
+post_install() {
+	vmkdir usr/libexec/go-qt5
+	mv $DESTDIR/usr/bin/* $DESTDIR/usr/libexec/go-qt5
+}

From 7a4f826eb07d9dc0f499948610007aa238077584 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 18 Feb 2021 21:50:15 +0700
Subject: [PATCH 2/2] protonmail-bridge: update to 1.6.3, build from source

---
 srcpkgs/protonmail-bridge/template | 66 ++++++++++++++++++++++++------
 1 file changed, 54 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/protonmail-bridge/template b/srcpkgs/protonmail-bridge/template
index e0bc8d92fc4..b59f0d1a729 100644
--- a/srcpkgs/protonmail-bridge/template
+++ b/srcpkgs/protonmail-bridge/template
@@ -1,23 +1,65 @@
 # Template file for 'protonmail-bridge'
 pkgname=protonmail-bridge
-version=1.5.6
+version=1.6.3
 revision=1
-archs="x86_64"
-build_style=fetch
+wrksrc=proton-bridge-br-$version
+build_style=go
+# disable rpath
+build_helper=qmake
+go_import_path="github.com/ProtonMail/proton-bridge"
+go_package="
+ $go_import_path/cmd/Desktop-Bridge
+ $go_import_path/cmd/launcher"
+go_build_tags="minimal"
+go_ldflags="
+ -X $go_import_path/internal/constants.Version=$version
+ -X $go_import_path/internal/constants.Revision=$version
+ -X $go_import_path/internal/constants.BuildTime=$(date +%FT%T%z)
+ -X main.ConfigName=bridge
+ -X main.ExeName=proton-bridge"
+hostmakedepends="go-qt5 pkg-config"
+makedepends="qt5-devel qt5-declarative-devel qt5-webview-devel
+ qt5-webengine-devel libsecret-devel"
 depends="desktop-file-utils"
 short_desc="ProtonMail Bridge for use with E-mail software"
 maintainer="Rich G <rich@richgannon.net>"
 license="GPL-3.0-or-later"
 homepage="https://protonmail.com/bridge"
-distfiles="https://protonmail.com/download/beta/protonmail-bridge_${version}-1_amd64.deb"
-checksum=3c18833c7b21ab97c9ba0a5e1267a620de3c8eece02bed49ff3d12961932b74c
+distfiles="https://github.com/ProtonMail/proton-bridge/archive/br-$version.tar.gz"
+checksum=e1565f8f3e175c27e61500cb8b13d768769b2eee4d83e0265d135d0d97e4acea
+nocross="experimental"
 
-restricted=yes
-noverifyrdeps=yes
-nopie=yes
+CFLAGS="-I$XBPS_CROSS_BASE/usr/include/qt5/QtQml
+ -I$XBPS_CROSS_BASE/usr/include/qt5/QtCore
+ -Wno-deprecated-declarations"
+CXXFLAGS="$CFLAGS"
+LDFLAGS=-lQt5Qml
 
-do_install() {
-	ar x protonmail-bridge_${version}-1_amd64.deb data.tar.gz
-	bsdtar xpvf data.tar.gz
-	cp -r usr ${DESTDIR}
+pre_build() {
+	export GO111MODULE=on
+	export QT_PKG_CONFIG=true
+	export QT_QMAKE_DIR=$XBPS_WRAPPERDIR
+	QT_VERSION=$(pkg-config --modversion Qt5Core)
+	export QT_VERSION
+	PATH="/usr/libexec/go-qt5:$PATH"
+	ln -sf /usr/lib/qt5/bin/rcc $XBPS_WRAPPERDIR
+	ln -sf /usr/lib/qt5/bin/moc $XBPS_WRAPPERDIR
+	: qtdeploy -p "$XBPS_MAKEJOBS" \
+		-tags "$go_build_tags" -ldflags "$go_ldflags" \
+		build desktop cmd/Desktop-Bridge
+	qtrcc desktop cmd/Desktop-Bridge
+	qtmoc desktop cmd/Desktop-Bridge
+	qtminimal desktop cmd/Desktop-Bridge
+}
+
+post_install() {
+	local libexec=usr/libexec/protonmail
+	vmkdir $libexec
+	mv $DESTDIR/usr/bin/Desktop-Bridge $DESTDIR/$libexec/proton-bridge
+	mv $DESTDIR/usr/bin/launcher $DESTDIR/$libexec/proton-bridge-launcher
+	vinstall dist/proton-bridge.desktop 0644 usr/share/applications/
+	vinstall internal/frontend/share/icons/logo.svg 0644 \
+		usr/share/icons/hicolor/scalable/apps/ protonmail-bridge.svg
+	ln -sf /$libexec/proton-bridge-launcher \
+		$DESTDIR/usr/bin/protonmail-bridge
 }

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-05-19  2:15 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 14:53 [PR PATCH] proton-bridge: 1.6.3 build from source sgn
2021-02-18 14:57 ` sgn
2021-02-19 16:34 ` [PR PATCH] [Updated] " sgn
2021-02-19 17:21 ` sgn
2021-02-19 18:26 ` sgn
2021-02-19 18:30 ` sgn
2021-02-19 23:50 ` [PR PATCH] [Updated] " sgn
2021-02-19 23:58 ` sgn
2021-02-21 23:20 ` ericonr
2021-02-21 23:52 ` jbenden
2021-02-22  0:05 ` ericonr
2021-02-22  0:53 ` sgn
2021-02-22  6:56 ` jbenden
2021-02-23  0:59 ` cinerea0
2021-03-04 21:17 ` vivlim
2021-03-07 20:52 ` jbenden
2021-03-07 23:10 ` vivlim
2021-03-08  0:28 ` sgn
2021-03-08  7:39 ` vivlim
2021-05-11 21:02 ` cinerea0
2021-05-11 23:21 ` sgn
2022-05-04  2:15 ` github-actions
2022-05-19  2:15 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).