git: c81b7e3649c0 - main - x11-themes/gnome-backgrounds: add symlinks for Cinnamon

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Fri, 24 May 2024 00:57:08 UTC
The branch main has been updated by vishwin:

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

commit c81b7e3649c0add679bdb8cefc6bccb7cf68a41b
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2024-05-24 00:54:44 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2024-05-24 00:54:44 +0000

    x11-themes/gnome-backgrounds: add symlinks for Cinnamon
    
    Easier alternatives would have been symlinking
    share/cinnamon-background-properties to share/gnome-background-properties
    or having Cinnamon only load from the latter, but
    x11-themes/adapta-backgrounds also installs to Cinnamon's (and
    MATE's) directory.
---
 x11-themes/gnome-backgrounds/Makefile  |  6 ++++++
 x11-themes/gnome-backgrounds/pkg-plist | 13 +++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/x11-themes/gnome-backgrounds/Makefile b/x11-themes/gnome-backgrounds/Makefile
index b9f93942b750..90bcf684ff83 100644
--- a/x11-themes/gnome-backgrounds/Makefile
+++ b/x11-themes/gnome-backgrounds/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	gnome-backgrounds
 PORTVERSION=	43
+PORTREVISION=	1
 CATEGORIES=	x11-themes graphics gnome
 MASTER_SITES=	GNOME/sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+)\..*/\1/}
 DIST_SUBDIR=	gnome
@@ -15,4 +16,9 @@ PORTSCOUT=	limitw:1,even
 NO_ARCH=	yes
 USES=		gettext meson tar:xz
 
+post-install:
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/cinnamon-background-properties
+	@${FIND} ${STAGEDIR}${PREFIX}/share/gnome-background-properties -type f -name '*.xml' \
+		-exec ${RLN} {} ${STAGEDIR}${PREFIX}/share/cinnamon-background-properties \;
+
 .include <bsd.port.mk>
diff --git a/x11-themes/gnome-backgrounds/pkg-plist b/x11-themes/gnome-backgrounds/pkg-plist
index 216c5da6dbe6..087418cd7cf2 100644
--- a/x11-themes/gnome-backgrounds/pkg-plist
+++ b/x11-themes/gnome-backgrounds/pkg-plist
@@ -23,6 +23,19 @@ share/backgrounds/gnome/vnc-d.webp
 share/backgrounds/gnome/vnc-l.webp
 share/backgrounds/gnome/wood-d.webp
 share/backgrounds/gnome/wood-l.webp
+share/cinnamon-background-properties/adwaita.xml
+share/cinnamon-background-properties/blobs.xml
+share/cinnamon-background-properties/drool.xml
+share/cinnamon-background-properties/dune.xml
+share/cinnamon-background-properties/field.xml
+share/cinnamon-background-properties/grid.xml
+share/cinnamon-background-properties/licorice.xml
+share/cinnamon-background-properties/oceans.xml
+share/cinnamon-background-properties/pixels.xml
+share/cinnamon-background-properties/symbolic.xml
+share/cinnamon-background-properties/truchet.xml
+share/cinnamon-background-properties/vnc.xml
+share/cinnamon-background-properties/wood.xml
 share/gnome-background-properties/adwaita.xml
 share/gnome-background-properties/blobs.xml
 share/gnome-background-properties/drool.xml