git: ad618a0e3305 - 2024Q4 - x11-wm/cosmic-comp: unbreak text in title bar and context menu

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 14 Dec 2024 00:15:45 UTC
The branch 2024Q4 has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ad618a0e3305f570597d6acb3e3ebb5c0c3edc1e

commit ad618a0e3305f570597d6acb3e3ebb5c0c3edc1e
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-12-13 02:41:37 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-12-14 00:15:09 +0000

    x11-wm/cosmic-comp: unbreak text in title bar and context menu
    
    (cherry picked from commit a2394dacc23a5cfe330ca388c0a1609f4b718a14)
---
 x11-wm/cosmic-comp/Makefile                |  6 +++++-
 x11-wm/cosmic-comp/files/patch-cosmic-text | 22 ++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/x11-wm/cosmic-comp/Makefile b/x11-wm/cosmic-comp/Makefile
index 67a600c425d9..8532951833e7 100644
--- a/x11-wm/cosmic-comp/Makefile
+++ b/x11-wm/cosmic-comp/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	cosmic-comp
 DISTVERSIONPREFIX=	epoch-
 DISTVERSION=	1.0.0-alpha.4
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	x11-wm wayland
 
 MAINTAINER=	jbeich@FreeBSD.org
@@ -47,6 +47,10 @@ post-patch:
 # /sys by default is a symlink to /usr/src/sys
 	@${REINPLACE_CMD} -e 's,/sys,${LINUXBASE}&,' \
 		${WRKSRC}/src/debug.rs
+# https://github.com/RazrFalcon/fontdb/issues/61
+	@${REINPLACE_CMD} -e 's,/usr/share,${DATADIR:H},' \
+		-e 's,/etc,${LOCALBASE}&,' \
+		${WRKSRC_crate_fontdb}/src/lib.rs
 
 post-install:
 # Install extras similar to ${WRKSRC}/Makefile
diff --git a/x11-wm/cosmic-comp/files/patch-cosmic-text b/x11-wm/cosmic-comp/files/patch-cosmic-text
new file mode 100644
index 000000000000..f24b06127f14
--- /dev/null
+++ b/x11-wm/cosmic-comp/files/patch-cosmic-text
@@ -0,0 +1,22 @@
+https://github.com/pop-os/cosmic-text/pull/336
+
+--- ../cosmic-text-4fe90bb6126c22f589b46768d7754d65ae300c5e/src/font/fallback/mod.rs.orig	2024-09-23 13:53:29 UTC
++++ ../cosmic-text-4fe90bb6126c22f589b46768d7754d65ae300c5e/src/font/fallback/mod.rs
+@@ -9,7 +9,7 @@ use self::platform::*;
+ 
+ use self::platform::*;
+ 
+-#[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows",)))]
++#[cfg(not(any(unix, target_os = "windows")))]
+ #[path = "other.rs"]
+ mod platform;
+ 
+@@ -17,7 +17,7 @@ mod platform;
+ #[path = "macos.rs"]
+ mod platform;
+ 
+-#[cfg(target_os = "linux")]
++#[cfg(all(unix, not(any(target_os = "android", target_os = "macos"))))]
+ #[path = "unix.rs"]
+ mod platform;
+