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:   vins
Date:           Sat Sep 23 18:25:58 UTC 2023

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

Log Message:
x11/rterm: fix build

* Last commit introduced a regression on 64-bit architectures.
  Using c_ulong instead of u32/u64 will likely satisfy both.
* Fix usage of bits() method.
* Fix linking against fontconfig.
* Bump revision.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/x11/rterm/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/x11/rterm/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/x11/rterm/patches/patch-src_glyph.rs
cvs rdiff -u -r1.1 -r1.2 pkgsrc/x11/rterm/patches/patch-src_win.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.11 pkgsrc/x11/rterm/Makefile:1.12
--- pkgsrc/x11/rterm/Makefile:1.11      Thu May 25 13:50:05 2023
+++ pkgsrc/x11/rterm/Makefile   Sat Sep 23 18:25:57 2023
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.11 2023/05/25 13:50:05 he Exp $
+# $NetBSD: Makefile,v 1.12 2023/09/23 18:25:57 vins Exp $
 
 DISTNAME=      rterm-0.0.8
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    x11
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=mechpen/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -9,7 +9,7 @@ GITHUB_TAG=     v${PKGVERSION_NOREV}
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://github.com/mechpen/rterm/
 COMMENT=       Port of suckless terminal to rust
-LICENSE=       unlicense
+LICENSE=       apache-2.0 OR mit
 
 .include "cargo-depends.mk"
 
@@ -17,16 +17,20 @@ USE_TOOLS+= pkg-config
 
 INSTALLATION_DIRS=     bin
 
-RUSTFLAGS+=    -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libX11}/lib
-RUSTFLAGS+=    -C link-arg=-L${BUILDLINK_PREFIX.libX11}/lib
-RUSTFLAGS+=    -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libXft}/lib
-RUSTFLAGS+=    -C link-arg=-L${BUILDLINK_PREFIX.libXft}/lib
+RUSTFLAGS+=    -C link-arg=${COMPILER_RPATH_FLAG}${PREFIX}/lib
+RUSTFLAGS+=    -C link-arg=-L${PREFIX}/lib
+RUSTFLAGS+=    -C link-arg=${COMPILER_RPATH_FLAG}${X11BASE}/lib
+RUSTFLAGS+=    -C link-arg=-L${X11BASE}/lib
+RUSTFLAGS+=    -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.fontconfig}/lib
+RUSTFLAGS+=    -C link-arg=-L${BUILDLINK_PREFIX.fontconfig}/lib
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/target/release/rterm \
                ${DESTDIR}${PREFIX}/bin
 
 .include "../../lang/rust/cargo.mk"
+
+.include "../../fonts/fontconfig/buildlink3.mk"
 .include "../../x11/libX11/buildlink3.mk"
 .include "../../x11/libXft/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/x11/rterm/distinfo
diff -u pkgsrc/x11/rterm/distinfo:1.9 pkgsrc/x11/rterm/distinfo:1.10
--- pkgsrc/x11/rterm/distinfo:1.9       Thu May 25 13:50:05 2023
+++ pkgsrc/x11/rterm/distinfo   Sat Sep 23 18:25:57 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2023/05/25 13:50:05 he Exp $
+$NetBSD: distinfo,v 1.10 2023/09/23 18:25:57 vins Exp $
 
 BLAKE2s (anyhow-1.0.68.crate) = 79593a6a8f5559833825e9341680bb8b1dafe01e70c99d0f014175fbe2828e71
 SHA512 (anyhow-1.0.68.crate) = b8cfc132ebeac823edf18cba7e335d1939fcbb095ed4ea859f4dc4cde5b1ff35fd68f0743577c69085f74f019768a3359936bf6dc1b2aceb7e2b28ace7f74a0f
@@ -171,5 +171,6 @@ 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_glyph.rs) = 256a0df3c63250bfc3da0eefdab99c2e4ea83204
+SHA1 (patch-src_win.rs) = b361b2a2bb50ddf188dc391178a43aed72b070a9
 SHA1 (patch-src_x11__wrapper.rs) = 7f91cd4eb8ae5c606520751e087802a9033bcc3c

Index: pkgsrc/x11/rterm/patches/patch-src_win.rs
diff -u pkgsrc/x11/rterm/patches/patch-src_win.rs:1.1 pkgsrc/x11/rterm/patches/patch-src_win.rs:1.2
--- pkgsrc/x11/rterm/patches/patch-src_win.rs:1.1       Thu May 25 13:50:05 2023
+++ pkgsrc/x11/rterm/patches/patch-src_win.rs   Sat Sep 23 18:25:57 2023
@@ -1,27 +1,43 @@
-$NetBSD: patch-src_win.rs,v 1.1 2023/05/25 13:50:05 he Exp $
+$NetBSD: patch-src_win.rs,v 1.2 2023/09/23 18:25:57 vins 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.
+* Avoid cast to u64, because 32-bit ports may not implement
+  u64 * u32 in rust.
+* Change the cast type of 'ofs' to match the function
+  parameter it's used for.
+* Fix wrong call of bits() method as field.
 
---- src/win.rs.orig    2023-01-02 12:45:40.000000000 +0000
+--- src/win.rs.orig    2023-01-04 03:49:42.000000000 +0000
 +++ src/win.rs
-@@ -675,7 +675,7 @@ impl Win {
+@@ -37,10 +37,10 @@ bitflags! {
+         const MOUSESGR    = 1 << 9;
+         const MOUSEX10    = 1 << 10;
+         const MOUSEMANY   = 1 << 11;
+-        const MOUSE       = (Self::MOUSEBTN.bits |
+-                             Self::MOUSEMOTION.bits |
+-                             Self::MOUSEX10.bits |
+-                             Self::MOUSEMANY.bits);
++        const MOUSE       = (Self::MOUSEBTN.bits() |
++                             Self::MOUSEMOTION.bits() |
++                             Self::MOUSEX10.bits() |
++                             Self::MOUSEMANY.bits());
+         const FOCUS       = 1 << 12;
+     }
+ }
+@@ -678,7 +678,7 @@ impl Win {
                  return;
              }
  
 -            let len = (nitems * (format as u64) / 8) as usize;
-+            let len = ((nitems * (format as u32)) / 8) as usize;
++            let len = (nitems * (format as c_ulong) / 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 {
+@@ -686,7 +686,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;
++                ofs += (nitems * (format as c_ulong) / 32) as c_long;
              }
          }
      }

Added files:

Index: pkgsrc/x11/rterm/patches/patch-src_glyph.rs
diff -u /dev/null pkgsrc/x11/rterm/patches/patch-src_glyph.rs:1.1
--- /dev/null   Sat Sep 23 18:25:58 2023
+++ pkgsrc/x11/rterm/patches/patch-src_glyph.rs Sat Sep 23 18:25:57 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_glyph.rs,v 1.1 2023/09/23 18:25:57 vins Exp $
+
+* Fix wrong call of bits() method as field.  
+
+--- src/glyph.rs.orig  2023-01-04 03:49:42.000000000 +0000
++++ src/glyph.rs
+@@ -17,7 +17,7 @@ bitflags! {
+         const STRUCK     = 1 << 7;
+ 
+         const FONT_MASK  = (1 << 8) - 1;
+-        const BOLD_FAINT = Self::BOLD.bits | Self::FAINT.bits;
++        const BOLD_FAINT = Self::BOLD.bits() | Self::FAINT.bits();
+ 
+         // at line wrap
+         const WRAP       = 1 << 8;



Home | Main Index | Thread Index | Old Index