pkgsrc-Changes archive

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

CVS commit: pkgsrc/x11/rterm



Module Name:    pkgsrc
Committed By:   he
Date:           Thu May 25 13:50:06 UTC 2023

Modified Files:
        pkgsrc/x11/rterm: Makefile distinfo
Added Files:
        pkgsrc/x11/rterm/patches: patch-src_win.rs patch-src_x11__wrapper.rs

Log Message:
rterm: make this build on NetBSD/macppc specifically....

...and hopefully on other 32-bit ports:

 * Avoid trying to do `u64 * u32`, as rust may not implement that
   on 32-bit ports (it doesn't on 32-bit powerpc).
 * Fix type mismatch between variable and funciton parameter.
 * Fix XChangeWindowAttributes parameter declaration to match (u64
   -> c_ulong).

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/x11/rterm/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/x11/rterm/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/x11/rterm/patches/patch-src_win.rs \
    pkgsrc/x11/rterm/patches/patch-src_x11__wrapper.rs

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

Modified files:

Index: pkgsrc/x11/rterm/Makefile
diff -u pkgsrc/x11/rterm/Makefile:1.10 pkgsrc/x11/rterm/Makefile:1.11
--- pkgsrc/x11/rterm/Makefile:1.10      Wed May  3 07:32:03 2023
+++ pkgsrc/x11/rterm/Makefile   Thu May 25 13:50:05 2023
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2023/05/03 07:32:03 pin Exp $
+# $NetBSD: Makefile,v 1.11 2023/05/25 13:50:05 he Exp $
 
 DISTNAME=      rterm-0.0.8
+PKGREVISION=   1
 CATEGORIES=    x11
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=mechpen/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}

Index: pkgsrc/x11/rterm/distinfo
diff -u pkgsrc/x11/rterm/distinfo:1.8 pkgsrc/x11/rterm/distinfo:1.9
--- pkgsrc/x11/rterm/distinfo:1.8       Wed May  3 07:32:03 2023
+++ pkgsrc/x11/rterm/distinfo   Thu May 25 13:50:05 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2023/05/03 07:32:03 pin Exp $
+$NetBSD: distinfo,v 1.9 2023/05/25 13:50:05 he Exp $
 
 BLAKE2s (anyhow-1.0.68.crate) = 79593a6a8f5559833825e9341680bb8b1dafe01e70c99d0f014175fbe2828e71
 SHA512 (anyhow-1.0.68.crate) = b8cfc132ebeac823edf18cba7e335d1939fcbb095ed4ea859f4dc4cde5b1ff35fd68f0743577c69085f74f019768a3359936bf6dc1b2aceb7e2b28ace7f74a0f
@@ -171,3 +171,5 @@ Size (windows_x86_64_msvc-0.42.0.crate) 
 BLAKE2s (x11-2.20.1.crate) = f0e3d02e7e99d2fb1b4a8956cce94c57c4c7cda3fe92bc5c4333d4344ef4decf
 SHA512 (x11-2.20.1.crate) = abb62057138ba21386122205affd5c712a2ee589fc3eb13496fc17719328beb47d4739eadf8a8b5934d5072c04fee67bfa2f34266917cae8d14ddb5c02e3d020
 Size (x11-2.20.1.crate) = 67811 bytes
+SHA1 (patch-src_win.rs) = 50d129acead752e7881fd4359e55243e40bfcf8e
+SHA1 (patch-src_x11__wrapper.rs) = 7f91cd4eb8ae5c606520751e087802a9033bcc3c

Added files:

Index: pkgsrc/x11/rterm/patches/patch-src_win.rs
diff -u /dev/null pkgsrc/x11/rterm/patches/patch-src_win.rs:1.1
--- /dev/null   Thu May 25 13:50:06 2023
+++ pkgsrc/x11/rterm/patches/patch-src_win.rs   Thu May 25 13:50:05 2023
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_win.rs,v 1.1 2023/05/25 13:50:05 he Exp $
+
+Avoid cast to u64, because 32-bit ports may not implement
+u64 * u32 in rust.
+Also, change the cast type of 'ofs' to match the function
+parameter it's used for.
+
+--- src/win.rs.orig    2023-01-02 12:45:40.000000000 +0000
++++ src/win.rs
+@@ -675,7 +675,7 @@ impl Win {
+                 return;
+             }
+ 
+-            let len = (nitems * (format as u64) / 8) as usize;
++            let len = ((nitems * (format as u32)) / 8) as usize;
+             let buf = unsafe { slice::from_raw_parts(data, len) };
+             self.term_write(term, pty, buf);
+             x11::XFree(data as *mut _);
+@@ -683,7 +683,7 @@ impl Win {
+             if rem == 0 {
+                 break;
+             } else {
+-                ofs += (nitems * (format as u64) / 32) as i64;
++                ofs += ((nitems * (format as u32)) / 32) as c_long;
+             }
+         }
+     }
Index: pkgsrc/x11/rterm/patches/patch-src_x11__wrapper.rs
diff -u /dev/null pkgsrc/x11/rterm/patches/patch-src_x11__wrapper.rs:1.1
--- /dev/null   Thu May 25 13:50:06 2023
+++ pkgsrc/x11/rterm/patches/patch-src_x11__wrapper.rs  Thu May 25 13:50:05 2023
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_x11__wrapper.rs,v 1.1 2023/05/25 13:50:05 he Exp $
+
+Fix type mismatch:  The third arg to XChangeWindowAttributes() is
+a c_ulong, not an u64.
+
+--- src/x11_wrapper.rs.orig    2023-01-02 12:45:40.000000000 +0000
++++ src/x11_wrapper.rs
+@@ -434,7 +434,7 @@ pub fn XConvertSelection(
+ pub fn XChangeWindowAttributes(
+     dpy: Display,
+     win: Window,
+-    event_mask: u64,
++    event_mask: c_ulong,
+     mut attributes: XSetWindowAttributes,
+ ) {
+     unsafe {



Home | Main Index | Thread Index | Old Index