pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/rust-analyzer



Module Name:    pkgsrc
Committed By:   he
Date:           Mon Oct 10 08:08:28 UTC 2022

Modified Files:
        pkgsrc/lang/rust-analyzer: Makefile distinfo
Added Files:
        pkgsrc/lang/rust-analyzer/patches:
            patch-vendor_kqueue-1.0.6_src_time.rs

Log Message:
lang/rust-analyzer: use timespec component types from the libc crate.

Should help with general portability to 32-bit ports, since we
import the timespec component types (time_t and c_long) from the
libc crate instead of hardcoding the integer lengths.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/rust-analyzer/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/lang/rust-analyzer/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/rust-analyzer/patches/patch-vendor_kqueue-1.0.6_src_time.rs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/rust-analyzer/Makefile
diff -u pkgsrc/lang/rust-analyzer/Makefile:1.15 pkgsrc/lang/rust-analyzer/Makefile:1.16
--- pkgsrc/lang/rust-analyzer/Makefile:1.15     Mon Sep  5 19:09:12 2022
+++ pkgsrc/lang/rust-analyzer/Makefile  Mon Oct 10 08:08:28 2022
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2022/09/05 19:09:12 adam Exp $
+# $NetBSD: Makefile,v 1.16 2022/10/10 08:08:28 he Exp $
 
 DISTNAME=      rust-analyzer-2022-08-22
 PKGNAME=       ${DISTNAME:C/-2([0-9]*)-([0-9]*)-([0-9]*)/-0.0.2\1.\2.\3/}
+PKGREVISION=   1
 CATEGORIES=    lang
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=rust-lang/}
 GITHUB_TAG=    ${DISTNAME:S/rust-analyzer-//}

Index: pkgsrc/lang/rust-analyzer/distinfo
diff -u pkgsrc/lang/rust-analyzer/distinfo:1.17 pkgsrc/lang/rust-analyzer/distinfo:1.18
--- pkgsrc/lang/rust-analyzer/distinfo:1.17     Mon Sep  5 19:09:12 2022
+++ pkgsrc/lang/rust-analyzer/distinfo  Mon Oct 10 08:08:28 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2022/09/05 19:09:12 adam Exp $
+$NetBSD: distinfo,v 1.18 2022/10/10 08:08:28 he Exp $
 
 BLAKE2s (addr2line-0.17.0.crate) = f7fa3b016f0e80c4ea9967f8947de15edc9fa39d0c0cdea692dccd0c41c28039
 SHA512 (addr2line-0.17.0.crate) = ef3bbd7c6d1dfdd0b47e3be1fb4c8b15ed61a769bed7e80dce80461a1ee13ef21c75e62e9a66328504f862341f1e808abec5790ac79784e18655afcc16206b95
@@ -513,3 +513,4 @@ Size (xshell-0.2.2.crate) = 23846 bytes
 BLAKE2s (xshell-macros-0.2.2.crate) = 21b45d4c73fe60a536e4762405e28a321e64fe7411890a36ebdd9f35774c14a9
 SHA512 (xshell-macros-0.2.2.crate) = a477f18810d2b647c78cbc06d59b8b84817ee5e54cc8785897ecae743d263c6d0fab3563f66aed6a5e81b790bab317871162513c8ff14364d936afaa082f1ff4
 Size (xshell-macros-0.2.2.crate) = 2848 bytes
+SHA1 (patch-vendor_kqueue-1.0.6_src_time.rs) = d46b71aebe930dd01effe2f81cfa13f823285e93

Added files:

Index: pkgsrc/lang/rust-analyzer/patches/patch-vendor_kqueue-1.0.6_src_time.rs
diff -u /dev/null pkgsrc/lang/rust-analyzer/patches/patch-vendor_kqueue-1.0.6_src_time.rs:1.1
--- /dev/null   Mon Oct 10 08:08:28 2022
+++ pkgsrc/lang/rust-analyzer/patches/patch-vendor_kqueue-1.0.6_src_time.rs     Mon Oct 10 08:08:28 2022
@@ -0,0 +1,43 @@
+$NetBSD: patch-vendor_kqueue-1.0.6_src_time.rs,v 1.1 2022/10/10 08:08:28 he Exp $
+
+Use the timespec component types instead of hardcoding int lengths.
+
+--- vendor/kqueue-1.0.6/src/time.rs.orig       1973-11-29 21:33:09.000000000 +0000
++++ vendor/kqueue-1.0.6/src/time.rs
+@@ -1,32 +1,11 @@
++use libc::time_t;
++use libc::c_long;
+ use libc::timespec;
+ use std::time::Duration;
+ 
+-#[cfg(not(all(
+-    any(target_os = "freebsd", target_os = "macos"),
+-    any(target_arch = "x86", target_arch = "powerpc")
+-)))]
+ pub(crate) fn duration_to_timespec(d: Duration) -> timespec {
+-    let tv_sec = d.as_secs() as i64;
+-    let tv_nsec = d.subsec_nanos() as i64;
+-
+-    if tv_sec.is_negative() {
+-        panic!("Duration seconds is negative");
+-    }
+-
+-    if tv_nsec.is_negative() {
+-        panic!("Duration nsecs is negative");
+-    }
+-
+-    timespec { tv_sec, tv_nsec }
+-}
+-
+-#[cfg(all(
+-    any(target_os = "freebsd", target_os = "macos"),
+-    any(target_arch = "x86", target_arch = "powerpc")
+-))]
+-pub(crate) fn duration_to_timespec(d: Duration) -> timespec {
+-    let tv_sec = d.as_secs() as i32;
+-    let tv_nsec = d.subsec_nanos() as i32;
++    let tv_sec = d.as_secs() as time_t;
++    let tv_nsec = d.subsec_nanos() as c_long;
+ 
+     if tv_sec.is_negative() {
+         panic!("Duration seconds is negative");



Home | Main Index | Thread Index | Old Index