pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Revert some of the removed patches, avoid ncurses file config
Module Name: pkgsrc-wip
Committed By: ci4ic4 <ci4ic4%gmail.com@localhost>
Pushed By: ci4ic4
Date: Wed Sep 23 19:46:51 2026 +0100
Changeset: 7bdb295623e9e23274ef8f1e125a97f2f29eee45
Modified Files:
rio/COMMIT_MSG
rio/Makefile
rio/PLIST
rio/distinfo
rio/options.mk
Added Files:
rio/patches/patch-corcovado_src_sys_unix_kqueue.rs
rio/patches/patch-misc_rio.desktop
rio/patches/patch-misc_rio.terminfo
rio/patches/patch-rio-backend_src_config_defaults.rs
rio/patches/patch-teletypewriter_src_unix_mod.rs
Log Message:
Revert some of the removed patches, avoid ncurses file config
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7bdb295623e9e23274ef8f1e125a97f2f29eee45
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rio/COMMIT_MSG | 2 +-
rio/Makefile | 49 ++++++++---------
rio/PLIST | 7 +--
rio/distinfo | 10 ++--
rio/options.mk | 10 ++--
rio/patches/patch-corcovado_src_sys_unix_kqueue.rs | 15 +++++
rio/patches/patch-misc_rio.desktop | 23 ++++++++
rio/patches/patch-misc_rio.terminfo | 18 ++++++
.../patch-rio-backend_src_config_defaults.rs | 22 ++++++++
rio/patches/patch-teletypewriter_src_unix_mod.rs | 64 ++++++++++++++++++++++
10 files changed, 179 insertions(+), 41 deletions(-)
diffs:
diff --git a/rio/COMMIT_MSG b/rio/COMMIT_MSG
index 190c724062..f9866ab5d6 100644
--- a/rio/COMMIT_MSG
+++ b/rio/COMMIT_MSG
@@ -1 +1 @@
-wip/rio: Add rio-0.5.27
+wip/rio: Add rio-0.5.28
diff --git a/rio/Makefile b/rio/Makefile
index 1f2b7cfb45..25ca4831af 100644
--- a/rio/Makefile
+++ b/rio/Makefile
@@ -15,8 +15,8 @@ RUST_REQ= 1.92.0
WRKSRC= ${WRKDIR}/${DISTNAME}
-# Build only the terminal binary; x11 only (Wayland not packaged for NetBSD).
-# X11/xkbcommon/xcb are loaded at runtime via dlopen (x11-dl, x11rb, xkbcommon-dl).
+# x11 only; Wayland is not packaged for NetBSD. X11/xcb/xkbcommon are
+# dlopened at runtime, so nothing links against them.
CARGO_ARGS= build --release -p rioterm ${DEFAULT_CARGO_ARGS}
CARGO_NO_DEFAULT_FEATURES= yes
CARGO_FEATURES= x11
@@ -24,28 +24,29 @@ CARGO_FEATURES= x11
USE_LANGUAGES= c c++
USE_TOOLS+= pkg-config
-DEPENDS+= ncurses-[0-9]*:../../devel/ncurses
+DEPENDS+= ncurses-[0-9]*:../../devel/ncurses
.include "options.mk"
-# Force pkg-config to see only buildlink'd .pc files so fontconfig-sys picks
-# up pkgsrc's libfontconfig.so.1 instead of X11R7's .so.2.
+# Restrict pkg-config to buildlink .pc files so fontconfig-sys finds pkgsrc's
+# libfontconfig.so.1, not X11R7's .so.2.
PKGSRC_MAKE_ENV+= PKG_CONFIG_LIBDIR=${BUILDLINK_DIR}/lib/pkgconfig
-# /etc/mk.conf declares the X11R7 fontconfig as builtin; without this,
-# buildlink links fontconfig.pc into .x11-buildlink/ and the restricted
-# PKG_CONFIG_LIBDIR above can no longer find it.
+# mk.conf may declare X11R7 fontconfig builtin, putting fontconfig.pc in
+# .x11-buildlink/ where the restricted PKG_CONFIG_LIBDIR cannot see it.
USE_BUILTIN.fontconfig= no
-# Embed rpath for pkgsrc libs so the binary finds them without LD_LIBRARY_PATH.
-RUSTFLAGS+= -C link-arg=-Wl,-rpath,${PREFIX}/lib
-RUSTFLAGS+= -C link-arg=-Wl,-rpath,/usr/X11R7/lib
+# Embed rpath so the binary runs without LD_LIBRARY_PATH.
+RUSTFLAGS+= -C link-arg=${COMPILER_RPATH_FLAG}${PREFIX}/lib
+RUSTFLAGS+= -C link-arg=${COMPILER_RPATH_FLAG}${X11BASE}/lib
+# Without this the wrapper rewrites the ${X11BASE} rpath into the buildlink
+# dir and drops it, leaving the dlopens unresolvable at runtime.
+BUILDLINK_PASSTHRU_RPATHDIRS+= ${X11BASE}/lib
ICON_THEMES= yes
-# Substitute PREFIX into the .desktop Exec line so TERMINFO_DIRS points to
-# the installed terminfo directory at runtime.
+# Expand @PREFIX@ in the .desktop Exec line so TERMINFO_DIRS resolves.
SUBST_CLASSES+= terminfo-dirs
-SUBST_STAGE.terminfo-dirs= post-patch
+SUBST_STAGE.terminfo-dirs= pre-configure
SUBST_FILES.terminfo-dirs= misc/rio.desktop
SUBST_VARS.terminfo-dirs= PREFIX
@@ -55,12 +56,9 @@ INSTALLATION_DIRS+= bin \
share/terminfo \
share/doc/rio
-
-# Patch vendor crates to enable wgpu GLES backend on NetBSD.
-#
-# wgpu and wgpu-core have explicit platform allowlists (Windows/Linux/Android/FreeBSD/Apple)
-# for their Vulkan and GLES backends. Each patched file is followed by a checksum
-# reset ("files":{}) so Cargo skips per-file verification of the modified entries.
+# Enable the wgpu GLES backend on NetBSD: wgpu and wgpu-core gate Vulkan and
+# GLES behind platform allowlists that omit it. Each edited file gets its
+# .cargo-checksum.json "files" emptied so Cargo skips per-file verification.
pre-configure:
# wgpu/build.rs: add NetBSD to vulkan and gles cfg platform conditions
${SED} -i \
@@ -99,19 +97,18 @@ do-install:
${DESTDIR}${PREFIX}/share/applications/rio.desktop
${INSTALL_DATA} ${WRKSRC}/misc/logo.svg \
${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/rio.svg
- # Install terminfo so programs inside rio recognise TERM=xterm-rio.
+ # terminfo for TERM=xterm-rio.
${LOCALBASE}/bin/tic -x -o ${DESTDIR}${PREFIX}/share/terminfo \
${WRKSRC}/misc/rio.terminfo
${INSTALL_DATA} ${FILESDIR}/README.NetBSD \
${DESTDIR}${PREFIX}/share/doc/rio/README.NetBSD
-.if !empty(PKG_OPTIONS:Mman)
- # Build and install man pages from scdoc source in extra/man/.
+.if !empty(PKG_OPTIONS:Mmanual)
${SCDOC} < ${WRKSRC}/extra/man/rio.1.scd > \
- ${DESTDIR}${PREFIX}/man/man1/rio.1
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/rio.1
${SCDOC} < ${WRKSRC}/extra/man/rio.5.scd > \
- ${DESTDIR}${PREFIX}/man/man5/rio.5
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/rio.5
${SCDOC} < ${WRKSRC}/extra/man/rio-bindings.5.scd > \
- ${DESTDIR}${PREFIX}/man/man5/rio-bindings.5
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/rio-bindings.5
.endif
.include "cargo-depends.mk"
diff --git a/rio/PLIST b/rio/PLIST
index 2f1b716281..e617295ddb 100644
--- a/rio/PLIST
+++ b/rio/PLIST
@@ -1,11 +1,10 @@
@comment $NetBSD$
bin/rio
-man/man1/rio.1
-man/man5/rio-bindings.5
-man/man5/rio.5
+${PLIST.man}man/man1/rio.1
+${PLIST.man}man/man5/rio-bindings.5
+${PLIST.man}man/man5/rio.5
share/applications/rio.desktop
share/doc/rio/README.NetBSD
share/icons/hicolor/scalable/apps/rio.svg
-share/terminfo/r/rio
share/terminfo/r/rio+base
share/terminfo/x/xterm-rio
diff --git a/rio/distinfo b/rio/distinfo
index 3e0bd74dff..61524aba79 100644
--- a/rio/distinfo
+++ b/rio/distinfo
@@ -1851,8 +1851,8 @@ Size (zvariant_derive-4.2.0.crate) = 11057 bytes
BLAKE2s (zvariant_utils-2.1.0.crate) = b142d63425365aedf109bafac551bf52a32897836b938d4835a415a0444db92c
SHA512 (zvariant_utils-2.1.0.crate) = 345b70d1106b37df41426efdb1ba49bf270e00898381c2a8021b5761c59efdea55def45cb2e2598b130b6cba8733503f3997a55578bca90867ab3e8f2346f80e
Size (zvariant_utils-2.1.0.crate) = 7043 bytes
-SHA1 (patch-corcovado_src_sys_unix_kqueue.rs) = c5a2374e7c057de0ce4fc17601eb5b764aff1d16
-SHA1 (patch-misc_rio.desktop) = 655e7c74c047fa5f56f236a43a41537f05e839d6
-SHA1 (patch-misc_rio.terminfo) = 02f01e059fb12abca4afa19663f113aad2660c38
-SHA1 (patch-rio-backend_src_config_defaults.rs) = bdeff9740019828df6a6c9b14102ecd910deac11
-SHA1 (patch-teletypewriter_src_unix_mod.rs) = b536464928c784ada680aacf8dffafb0be86f634
+SHA1 (patch-corcovado_src_sys_unix_kqueue.rs) = 1b889c5447fb23f7c00ca118662ac2023cd3cc9b
+SHA1 (patch-misc_rio.desktop) = 3b2753795f57b79fbf0f121d0e6bf37f39535bc3
+SHA1 (patch-misc_rio.terminfo) = 4d8b5e1136bbc425ad07e102261144ba77705319
+SHA1 (patch-rio-backend_src_config_defaults.rs) = 1ea3aa752f4051feede28d91dcef61224141a9a0
+SHA1 (patch-teletypewriter_src_unix_mod.rs) = 4c7f645817b402f43cb14bd01d54a77be29ccd32
diff --git a/rio/options.mk b/rio/options.mk
index 5599912c85..a5fa10f1b6 100644
--- a/rio/options.mk
+++ b/rio/options.mk
@@ -1,16 +1,16 @@
# $NetBSD$
PKG_OPTIONS_VAR= PKG_OPTIONS.rio
-PKG_SUPPORTED_OPTIONS= man
-PKG_SUGGESTED_OPTIONS= man
+PKG_SUPPORTED_OPTIONS= manual
+PKG_SUGGESTED_OPTIONS= manual
.include "../../mk/bsd.options.mk"
PLIST_VARS+= man
-.if !empty(PKG_OPTIONS:Mman)
+.if !empty(PKG_OPTIONS:Mmanual)
PLIST.man= yes
BUILD_DEPENDS+= scdoc>=1.11.0:../../textproc/scdoc
-SCDOC= ${LOCALBASE}/bin/scdoc
-INSTALLATION_DIRS+= man/man1 man/man5
+SCDOC= ${PREFIX}/bin/scdoc
+INSTALLATION_DIRS+= ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
.endif
diff --git a/rio/patches/patch-corcovado_src_sys_unix_kqueue.rs b/rio/patches/patch-corcovado_src_sys_unix_kqueue.rs
new file mode 100644
index 0000000000..1e81bf52e7
--- /dev/null
+++ b/rio/patches/patch-corcovado_src_sys_unix_kqueue.rs
@@ -0,0 +1,15 @@
+$NetBSD$
+
+NetBSD kevent.udata is *mut c_void, not intptr_t.
+
+--- corcovado/src/sys/unix/kqueue.rs.orig
++++ corcovado/src/sys/unix/kqueue.rs
+@@ -32,7 +32,7 @@
+ #[cfg(target_os = "netbsd")]
+ type Filter = u32;
+ #[cfg(target_os = "netbsd")]
+-type UData = ::libc::intptr_t;
++type UData = *mut ::libc::c_void;
+ #[cfg(target_os = "netbsd")]
+ type Count = usize;
+
diff --git a/rio/patches/patch-misc_rio.desktop b/rio/patches/patch-misc_rio.desktop
new file mode 100644
index 0000000000..7ea23678c3
--- /dev/null
+++ b/rio/patches/patch-misc_rio.desktop
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Point TERMINFO_DIRS at the terminfo entry this package installs, and silence
+the harmless Mesa DRI2 authentication warning on software EGL. @PREFIX@ is
+substituted by SUBST_CLASSES=terminfo-dirs.
+
+--- misc/rio.desktop.orig
++++ misc/rio.desktop
+@@ -1,7 +1,7 @@
+ [Desktop Entry]
+ Type=Application
+ TryExec=rio
+-Exec=rio
++Exec=env EGL_LOG_LEVEL=fatal TERMINFO_DIRS=@PREFIX@/share/terminfo rio
+ Icon=rio
+ Terminal=false
+ Categories=System;TerminalEmulator;
+@@ -14,4 +14,4 @@
+
+ [Desktop Action New]
+ Name=New Terminal
+-Exec=rio
++Exec=env EGL_LOG_LEVEL=fatal TERMINFO_DIRS=@PREFIX@/share/terminfo rio
diff --git a/rio/patches/patch-misc_rio.terminfo b/rio/patches/patch-misc_rio.terminfo
new file mode 100644
index 0000000000..cf93f5b699
--- /dev/null
+++ b/rio/patches/patch-misc_rio.terminfo
@@ -0,0 +1,18 @@
+$NetBSD$
+
+devel/ncurses owns share/terminfo/r/rio (its own alacritty-derived entry), so
+compiling this one conflicts at pkg_add time. Harmless to drop: rio prefers
+xterm-rio and falls back to rio only for layouts predating rio 0.2.27.
+
+--- misc/rio.terminfo.orig
++++ misc/rio.terminfo
+@@ -15,9 +15,6 @@
+ setrgbf=\E[38\:2\:%p1%d\:%p2%d\:%p3%dm,
+ use=rio+base,
+
+-rio,
+- use=xterm-rio,
+-
+ rio+base,
+ OTbs, am, bce, km, mir, msgr, xenl, AX, XT,
+ colors#8, cols#80, it#8, lines#24, pairs#64,
diff --git a/rio/patches/patch-rio-backend_src_config_defaults.rs b/rio/patches/patch-rio-backend_src_config_defaults.rs
new file mode 100644
index 0000000000..15a55e2896
--- /dev/null
+++ b/rio/patches/patch-rio-backend_src_config_defaults.rs
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Use spawn, not fork, on NetBSD: create_pty_with_fork never forwards shell args
+such as --login to execvp. macOS already does this.
+
+--- rio-backend/src/config/defaults.rs.orig
++++ rio-backend/src/config/defaults.rs
+@@ -60,12 +60,12 @@
+
+ #[inline]
+ pub fn default_use_fork() -> bool {
+- #[cfg(target_os = "macos")]
++ #[cfg(any(target_os = "macos", target_os = "netbsd"))]
+ {
+ false
+ }
+
+- #[cfg(not(target_os = "macos"))]
++ #[cfg(not(any(target_os = "macos", target_os = "netbsd")))]
+ {
+ true
+ }
diff --git a/rio/patches/patch-teletypewriter_src_unix_mod.rs b/rio/patches/patch-teletypewriter_src_unix_mod.rs
new file mode 100644
index 0000000000..a3c3681941
--- /dev/null
+++ b/rio/patches/patch-teletypewriter_src_unix_mod.rs
@@ -0,0 +1,64 @@
+$NetBSD$
+
+NetBSD support: TIOCSWINSZ (same value as FreeBSD), BSD termios branch, and no
+IUTF8 (not in NetBSD libc). c_ospeed=0 means B0, which makes the kernel PTY
+path send SIGHUP to the session leader, so set B38400.
+
+$SHELL in graphical sessions is often the display manager's /bin/ksh, so take
+the login shell from getpwuid_r instead.
+
+--- teletypewriter/src/unix/mod.rs.orig
++++ teletypewriter/src/unix/mod.rs
+@@ -34,6 +34,8 @@
+ const TIOCSWINSZ: libc::c_ulong = 0x80087467;
+ #[cfg(target_os = "macos")]
+ const TIOCSWINSZ: libc::c_ulong = 2148037735;
++#[cfg(target_os = "netbsd")]
++const TIOCSWINSZ: libc::c_ulong = 0x80087467;
+
+ #[link(name = "util")]
+ extern "C" {
+@@ -289,25 +291,25 @@
+ c_line: 0,
+ };
+
+- #[cfg(any(target_os = "macos", target_os = "freebsd"))]
++ #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "netbsd"))]
+ let mut term = libc::termios {
+ c_iflag: libc::ICRNL | libc::IXON | libc::IXANY | libc::IMAXBEL | libc::BRKINT,
+ c_oflag: libc::OPOST | libc::ONLCR,
+ c_cflag: libc::CREAD | libc::CS8 | libc::HUPCL,
+ c_lflag: libc::ICANON
+ | libc::ISIG
+ | libc::IEXTEN
+ | libc::ECHO
+ | libc::ECHOE
+ | libc::ECHOK
+ | libc::ECHOKE
+ | libc::ECHOCTL,
+ c_cc: Default::default(),
+- c_ispeed: Default::default(),
+- c_ospeed: Default::default(),
++ c_ispeed: libc::B38400 as libc::c_int,
++ c_ospeed: libc::B38400 as libc::c_int,
+ };
+
+- #[cfg(not(target_os = "freebsd"))]
++ #[cfg(not(any(target_os = "freebsd", target_os = "netbsd")))]
+ {
+ // Enable utf8 support if requested
+ if utf8 {
+@@ -381,6 +383,13 @@
+ },
+ };
+
++ #[cfg(target_os = "netbsd")]
++ if let Ok(ref pw) = pw {
++ if !pw.shell.is_empty() {
++ shell = pw.shell.to_owned();
++ }
++ }
++
+ Ok(Self { user, home, shell })
+ }
+ }
Home |
Main Index |
Thread Index |
Old Index