Github messages for voidlinux
 help / color / mirror / Atom feed
From: mhmdanas <mhmdanas@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] New package: shotman-0.4.1
Date: Mon, 03 Apr 2023 23:00:31 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43246@inbox.vuxu.org> (raw)

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

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

https://github.com/mhmdanas/void-packages new-package-shotman
https://github.com/void-linux/void-packages/pull/43246

New package: shotman-0.4.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### 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** (compiled)

<!-- 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/43246.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new-package-shotman-43246.patch --]
[-- Type: text/x-diff, Size: 3726 bytes --]

From a851830ab1f9b6118830fb4f138643c3102eec70 Mon Sep 17 00:00:00 2001
From: mhmdanas <triallax@tutanota.com>
Date: Mon, 3 Apr 2023 01:41:40 +0100
Subject: [PATCH] New package: shotman-0.4.1

---
 ...ef2107b9ad1159dca0eea5b439391f8c1d5c.patch | 51 +++++++++++++++++++
 srcpkgs/shotman/template                      | 28 ++++++++++
 2 files changed, 79 insertions(+)
 create mode 100644 srcpkgs/shotman/patches/d2f7ef2107b9ad1159dca0eea5b439391f8c1d5c.patch
 create mode 100644 srcpkgs/shotman/template

diff --git a/srcpkgs/shotman/patches/d2f7ef2107b9ad1159dca0eea5b439391f8c1d5c.patch b/srcpkgs/shotman/patches/d2f7ef2107b9ad1159dca0eea5b439391f8c1d5c.patch
new file mode 100644
index 000000000000..013931adc427
--- /dev/null
+++ b/srcpkgs/shotman/patches/d2f7ef2107b9ad1159dca0eea5b439391f8c1d5c.patch
@@ -0,0 +1,51 @@
+From d2f7ef2107b9ad1159dca0eea5b439391f8c1d5c Mon Sep 17 00:00:00 2001
+From: Jan Beich <jbeich@FreeBSD.org>
+Date: Fri, 10 Feb 2023 20:10:05 +0100
+Subject: [PATCH] Respect SHOTMAN_VERSION as documented in README.md
+
+Downstream may build without Git metadata or without network access
+but still store checkout version somewhere, passed via environ(7).
+---
+Upstream commit: https://git.sr.ht/~whynothugo/shotman/commit/d2f7ef2107b9ad1159dca0eea5b439391f8c1d5c
+
+ build.rs | 26 ++++++++++++++------------
+ 1 file changed, 14 insertions(+), 12 deletions(-)
+
+diff --git a/build.rs b/build.rs
+index 931f773..904d270 100644
+--- a/build.rs
++++ b/build.rs
+@@ -1,16 +1,18 @@
+ use std::process::Command;
+ fn main() {
+-    let version = Command::new("git")
+-        .args(["describe", "--tags"])
+-        .output()
+-        .map(|o| {
+-            if o.status.success() {
+-                String::from_utf8_lossy(&o.stdout).trim().to_owned()
+-            } else {
+-                String::from("unversioned") // git exited non-zero
+-            }
+-        })
+-        .unwrap_or(String::from("unknown")); // failed to run git
++    if std::env::var("SHOTMAN_VERSION").is_err() {
++        let version = Command::new("git")
++            .args(["describe", "--tags"])
++            .output()
++            .map(|o| {
++                if o.status.success() {
++                    String::from_utf8_lossy(&o.stdout).trim().to_owned()
++                } else {
++                    String::from("unversioned") // git exited non-zero
++                }
++            })
++            .unwrap_or(String::from("unknown")); // failed to run git
+ 
+-    println!("cargo:rustc-env=SHOTMAN_VERSION={version}");
++        println!("cargo:rustc-env=SHOTMAN_VERSION={version}");
++    }
+ }
+-- 
+2.38.4
+
diff --git a/srcpkgs/shotman/template b/srcpkgs/shotman/template
new file mode 100644
index 000000000000..839d0f592812
--- /dev/null
+++ b/srcpkgs/shotman/template
@@ -0,0 +1,28 @@
+# Template file for 'shotman'
+pkgname=shotman
+version=0.4.1
+revision=1
+build_style=cargo
+build_helper="qemu"
+hostmakedepends="pkg-config scdoc"
+makedepends="libxkbcommon-devel"
+depends="slurp"
+short_desc="Uncompromising screenshot GUI for Wayland"
+maintainer="Mohammed Anas <triallax@tutanota.com>"
+license="ISC"
+homepage="https://sr.ht/~whynothugo/shotman"
+changelog="https://git.sr.ht/~whynothugo/shotman/refs"
+distfiles="https://git.sr.ht/~whynothugo/shotman/archive/v${version}.tar.gz"
+checksum=e9f25856b40ac21cd4e7795d175b127ec86f0b8fd81ead8772c7e610d9c0de06
+
+export SHOTMAN_VERSION="v${version}"
+
+post_install() {
+	scdoc <shotman.1.scd >shotman.1
+	vman shotman.1
+	vlicense LICENCE.md
+	for shell in bash fish zsh; do
+		vtargetrun "./target/${RUST_TARGET}/release/shotman_completions" "${shell}" >"completions.${shell}"
+		vcompletion "completions.${shell}" "${shell}"
+	done
+}

             reply	other threads:[~2023-04-03 21:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03 21:00 mhmdanas [this message]
2023-04-09 19:56 ` [PR PATCH] [Updated] " mhmdanas
2023-05-29 20:27 ` [PR PATCH] [Merged]: New package: shotman-0.4.3 abenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43246@inbox.vuxu.org \
    --to=mhmdanas@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).