* [PR PATCH] electron24: add launcher
@ 2023-05-22 17:26 teldra
2023-08-21 1:44 ` github-actions
2023-09-04 1:45 ` [PR PATCH] [Closed]: " github-actions
0 siblings, 2 replies; 3+ messages in thread
From: teldra @ 2023-05-22 17:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1398 bytes --]
There is a new pull request by teldra against master on the void-packages repository
https://github.com/teldra/void-packages add-configfile-to-electron
https://github.com/void-linux/void-packages/pull/44033
electron24: add launcher
Felt inspired by https://wiki.archlinux.org/title/wayland#Configuration_file to add this functionality to this package.
The config file must be `${XDG_CONFIG_HOME}/${pkgname}-flags.conf` or `~/.config/${pkgname}-flags.conf`.
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- 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
-->
A patch file from https://github.com/void-linux/void-packages/pull/44033.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-add-configfile-to-electron-44033.patch --]
[-- Type: text/x-diff, Size: 1814 bytes --]
From ad2f56df515becbab19482346da7f8d806a3eab5 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Sun, 21 May 2023 22:33:14 +0200
Subject: [PATCH] electron24: add launcher
---
srcpkgs/electron24/files/electron-launcher.sh | 20 +++++++++++++++++++
srcpkgs/electron24/template | 6 +++---
2 files changed, 23 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/electron24/files/electron-launcher.sh
diff --git a/srcpkgs/electron24/files/electron-launcher.sh b/srcpkgs/electron24/files/electron-launcher.sh
new file mode 100644
index 000000000000..ccb91012fbaf
--- /dev/null
+++ b/srcpkgs/electron24/files/electron-launcher.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/bash
+
+set -euo pipefail
+
+name=@ELECTRON@
+flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/${name}-flags.conf"
+
+declare -a flags
+
+if [[ -f "${flags_file}" ]]; then
+ mapfile -t < "${flags_file}"
+fi
+
+for line in "${MAPFILE[@]}"; do
+ if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
+ flags+=("${line}")
+ fi
+done
+
+exec /usr/lib/${name}/electron "${flags[@]}" "$@"
diff --git a/srcpkgs/electron24/template b/srcpkgs/electron24/template
index bdaa56adc8a6..ca4b8cca8feb 100644
--- a/srcpkgs/electron24/template
+++ b/srcpkgs/electron24/template
@@ -1,7 +1,7 @@
# Template file for 'electron24'
pkgname=electron24
version=24.3.0
-revision=1
+revision=2
_nodever=18.14.0
_chromiumver=112.0.5615.165
archs="x86_64* aarch64*"
@@ -436,6 +436,6 @@ do_install() {
vlicense ${wrksrc}/src/electron/LICENSE electron.LICENSE
vlicense ${wrksrc}/src/third_party/electron_node/LICENSE node.LICENSE
- vmkdir /usr/bin
- ln -s ../lib/$pkgname/electron "$DESTDIR"/usr/bin/$pkgname
+ vbin "${FILESDIR}"/electron-launcher.sh "${pkgname}"
+ sed -i "s/@ELECTRON@/${pkgname}/" ${DESTDIR}/usr/bin/${pkgname}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-04 1:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22 17:26 [PR PATCH] electron24: add launcher teldra
2023-08-21 1:44 ` github-actions
2023-09-04 1:45 ` [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).