git: e2c09e62c2c4 - main - x11/hyprpaper: add new port

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Tue, 13 Dec 2022 11:32:11 UTC
The branch main has been updated by jbeich:

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

commit e2c09e62c2c48beed1ae13b25d4d62c8d59b9f8d
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-11-28 11:43:08 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-12-13 11:30:38 +0000

    x11/hyprpaper: add new port
    
    Hyprpaper is a blazing fast wallpaper utility for Hyprland with the
    ability to dynamically change wallpapers through sockets. It will work
    on all wlroots-based compositors, though.
    
    https://github.com/hyprwm/hyprpaper
---
 x11/Makefile            |  1 +
 x11/hyprpaper/Makefile  | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 x11/hyprpaper/distinfo  |  3 +++
 x11/hyprpaper/pkg-descr |  3 +++
 4 files changed, 55 insertions(+)

diff --git a/x11/Makefile b/x11/Makefile
index 9a3bcf90cfe0..f52ac9a06571 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -110,6 +110,7 @@
     SUBDIR += hhpc
     SUBDIR += hs-xmobar
     SUBDIR += hsetroot
+    SUBDIR += hyprpaper
     SUBDIR += i3blocks
     SUBDIR += i3lock-color
     SUBDIR += iceauth
diff --git a/x11/hyprpaper/Makefile b/x11/hyprpaper/Makefile
new file mode 100644
index 000000000000..29fac561ec81
--- /dev/null
+++ b/x11/hyprpaper/Makefile
@@ -0,0 +1,48 @@
+PORTNAME=	hyprpaper
+PORTVERSION=	s20221128
+CATEGORIES=	x11 wayland
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Blazing fast Wayland wallpaper utility with IPC controls
+WWW=		https://github.com/hyprwm/hyprpaper
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	gmake:devel/gmake \
+		wayland-protocols>0:graphics/wayland-protocols
+LIB_DEPENDS=	libwayland-client.so:graphics/wayland
+
+USES=		compiler:c++11-lib cmake gnome jpeg pkgconfig
+USE_GCC=	yes:build # C++23
+USE_GNOME=	cairo
+USE_GITHUB=	yes
+GH_ACCOUNT=	hyprwm
+GH_TAGNAME=	ab85578
+LDFLAGS+=	-static-libstdc++ -static-libgcc # avoid libc++ conflict
+PLIST_FILES=	bin/${PORTNAME}
+
+post-patch:
+# Extract (snapshot) version from the port instead of Git
+	@${REINPLACE_CMD} -i .nogit -e '/Get git info/,/^#$$/d' \
+		-e 's/$${GIT_BRANCH}/main/' \
+		-e 's/$${GIT_COMMIT_HASH}/${GH_TAGNAME}/' \
+		-e 's/$${GIT_COMMIT_MESSAGE}/<unknown>/' \
+		-e 's/$${GIT_DIRTY}/portbld/' \
+		${WRKSRC}/CMakeLists.txt
+# Drop unused dependencies
+	@${REINPLACE_CMD} 's/ wlroots//' ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e 's/ pango pangocairo//' \
+		-e '/OpenGL/d; /GLESv2/d' \
+		-e '/pthread/d; /CMAKE_THREAD_LIBS_INIT/d' \
+		-e '/ rt)/d' \
+		${WRKSRC}/CMakeLists.txt
+
+pre-configure:
+	@${SETENV} ${MAKE_ENV} ${GMAKE} protocols -C${WRKSRC}
+
+do-install:
+	${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} \
+		${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/x11/hyprpaper/distinfo b/x11/hyprpaper/distinfo
new file mode 100644
index 000000000000..7e90006e5470
--- /dev/null
+++ b/x11/hyprpaper/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1669635788
+SHA256 (hyprwm-hyprpaper-s20221128-ab85578_GH0.tar.gz) = 844dc2eb7af63f66508da11cc215595ff9ad190fabd375a2834c2cdfd7db97bf
+SIZE (hyprwm-hyprpaper-s20221128-ab85578_GH0.tar.gz) = 22953
diff --git a/x11/hyprpaper/pkg-descr b/x11/hyprpaper/pkg-descr
new file mode 100644
index 000000000000..85009939cfdf
--- /dev/null
+++ b/x11/hyprpaper/pkg-descr
@@ -0,0 +1,3 @@
+Hyprpaper is a blazing fast wallpaper utility for Hyprland with the
+ability to dynamically change wallpapers through sockets. It will work
+on all wlroots-based compositors, though.