Github messages for voidlinux
 help / color / mirror / Atom feed
From: cinerea0 <cinerea0@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] scryer-prolog: update to 0.9.0
Date: Thu, 09 Jun 2022 23:49:44 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-37478@inbox.vuxu.org> (raw)

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

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

https://github.com/cinerea0/void-packages scry
https://github.com/void-linux/void-packages/pull/37478

scryer-prolog: update to 0.9.0
<!-- 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 [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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/37478.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-scry-37478.patch --]
[-- Type: text/x-diff, Size: 4096 bytes --]

From b141bb2deb37d68ec6965347a9b34259ff910c2d Mon Sep 17 00:00:00 2001
From: cinerea0 <cinerea0@disroot.org>
Date: Thu, 9 Jun 2022 17:48:27 -0400
Subject: [PATCH] scryer-prolog: update to 0.9.0

---
 .../patches/remove-rustfmt-dep.patch          | 74 +++++++++++++++++++
 srcpkgs/scryer-prolog/template                |  8 +-
 2 files changed, 78 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/scryer-prolog/patches/remove-rustfmt-dep.patch

diff --git a/srcpkgs/scryer-prolog/patches/remove-rustfmt-dep.patch b/srcpkgs/scryer-prolog/patches/remove-rustfmt-dep.patch
new file mode 100644
index 000000000000..477509e22e57
--- /dev/null
+++ b/srcpkgs/scryer-prolog/patches/remove-rustfmt-dep.patch
@@ -0,0 +1,74 @@
+# https://github.com/mthom/scryer-prolog/commit/11ba7e47fdf6332d5096af9b3083627d9fc6cc94
+diff --git a/build.rs b/build.rs
+index e0f1d16ea2..0f457629a0 100644
+--- a/build.rs
++++ b/build.rs
+@@ -6,7 +6,7 @@ use std::fs;
+ use std::fs::File;
+ use std::io::Write;
+ use std::path::Path;
+-use std::process::Command;
++use std::process::{Command, Stdio};
+ 
+ fn find_prolog_files(libraries: &mut File, prefix: &str, current_dir: &Path) {
+     let entries = match current_dir.read_dir() {
+@@ -39,6 +39,16 @@ fn find_prolog_files(libraries: &mut File, prefix: &str, current_dir: &Path) {
+ }
+ 
+ fn main() {
++    let has_rustfmt = Command::new("rustfmt")
++        .arg("--version")
++        .stdin(Stdio::inherit())
++        .status()
++        .is_ok();
++
++    if !has_rustfmt {
++        println!("Failed to run rustfmt, will skip formatting generated files.")
++    }
++
+     let out_dir = env::var("OUT_DIR").unwrap();
+     let dest_path = Path::new(&out_dir).join("libraries.rs");
+ 
+@@ -65,10 +75,9 @@ fn main() {
+         .write_all(quoted_output.to_string().as_bytes())
+         .unwrap();
+ 
+-    Command::new("rustfmt")
+-        .arg(instructions_path.as_os_str())
+-        .spawn().unwrap()
+-        .wait().unwrap();
++    if has_rustfmt {
++        format_generated_file(instructions_path.as_path());
++    }
+ 
+     let static_atoms_path = Path::new(&out_dir).join("static_atoms.rs");
+     let mut static_atoms_file = File::create(&static_atoms_path).unwrap();
+@@ -79,10 +88,24 @@ fn main() {
+         .write_all(quoted_output.to_string().as_bytes())
+         .unwrap();
+ 
+-    Command::new("rustfmt")
+-        .arg(static_atoms_path.as_os_str())
+-        .spawn().unwrap()
+-        .wait().unwrap();
++    if has_rustfmt {
++        format_generated_file(static_atoms_path.as_path());
++    }
+ 
+     println!("cargo:rerun-if-changed=src/");
+ }
++
++fn format_generated_file(path: &Path) {
++    Command::new("rustfmt")
++        .arg(path.as_os_str())
++        .spawn()
++        .unwrap_or_else(|err| {
++            panic!(
++                "{}: rustfmt was detected as available, but failed to format generated file '{}'",
++                err,
++                path.display()
++            );
++        })
++        .wait()
++        .unwrap();
++}
diff --git a/srcpkgs/scryer-prolog/template b/srcpkgs/scryer-prolog/template
index 3868993d0dd8..c6ae5520be58 100644
--- a/srcpkgs/scryer-prolog/template
+++ b/srcpkgs/scryer-prolog/template
@@ -1,16 +1,16 @@
 # Template file for 'scryer-prolog'
 pkgname=scryer-prolog
-version=0.8.123
-revision=2
+version=0.9.0
+revision=1
 build_style=cargo
 hostmakedepends="m4 pkg-config"
-makedepends="gmp-devel mpfr-devel libmpc-devel"
+makedepends="gmp-devel libmpc-devel libsodium-devel mpfr-devel openssl-devel"
 short_desc="Modern Prolog implementation written mostly in Rust"
 maintainer="Hans-J. Schmid <knock@myopendoor.de>"
 license="BSD-3-Clause"
 homepage="https://github.com/mthom/scryer-prolog"
 distfiles="https://github.com/mthom/scryer-prolog/archive/v${version}.tar.gz"
-checksum=4370bc2200e3e56d411326801219bc5fc37a422febdb6cd3548ed3f65b5a44aa
+checksum=163ceb97e0fefc12b1144e5244b8b436ab4293432d281c371d61c7498111a930
 nocross="executes gmp header https://gitlab.com/tspiteri/gmp-mpfr-sys/-/blob/v1.2.2/build.rs#L1278"
 export CARGO_FEATURE_USE_SYSTEM_LIBS=1
 

             reply	other threads:[~2022-06-09 21:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09 21:49 cinerea0 [this message]
2022-06-10  0:44 ` cinerea0
2022-09-08  2:15 ` github-actions
2022-09-19 14:40 ` cinerea0
2022-11-30  2:56 ` [PR PATCH] [Updated] " cinerea0
2023-03-01  5:18 ` scryer-prolog: update to 0.9.1 github-actions
2023-03-12  0:25 ` cinerea0
2023-06-11  2:09 ` github-actions
2023-06-24 15:24 ` [PR PATCH] [Updated] " cinerea0
2023-06-24 15:51 ` cinerea0
2023-06-24 15:56 ` cinerea0
2023-06-24 16:33 ` cinerea0
2023-06-24 18:56 ` [PR PATCH] [Merged]: " classabbyamp

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-37478@inbox.vuxu.org \
    --to=cinerea0@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).