aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2022-11-20 10:37:39 +0000
committerJan Beich <jbeich@FreeBSD.org>2022-12-13 11:30:39 +0000
commit1f514820ca83f1576f5097792993e43cd0dafda6 (patch)
treec9c29a2d862273ae3adca19d6597a0f931bd9700
parente2c09e62c2c48beed1ae13b25d4d62c8d59b9f8d (diff)
downloadports-1f514820ca83f1576f5097792993e43cd0dafda6.tar.gz
ports-1f514820ca83f1576f5097792993e43cd0dafda6.zip
x11/hyprpicker: add new port
A wlroots-compatible Wayland color picker that does not suck. https://github.com/hyprwm/hyprpicker
-rw-r--r--x11/Makefile1
-rw-r--r--x11/hyprpicker/Makefile49
-rw-r--r--x11/hyprpicker/distinfo3
-rw-r--r--x11/hyprpicker/pkg-descr1
4 files changed, 54 insertions, 0 deletions
diff --git a/x11/Makefile b/x11/Makefile
index f52ac9a06571..34345569ff43 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -111,6 +111,7 @@
SUBDIR += hs-xmobar
SUBDIR += hsetroot
SUBDIR += hyprpaper
+ SUBDIR += hyprpicker
SUBDIR += i3blocks
SUBDIR += i3lock-color
SUBDIR += iceauth
diff --git a/x11/hyprpicker/Makefile b/x11/hyprpicker/Makefile
new file mode 100644
index 000000000000..d7a49b652a5e
--- /dev/null
+++ b/x11/hyprpicker/Makefile
@@ -0,0 +1,49 @@
+PORTNAME= hyprpicker
+PORTVERSION= s20221120
+CATEGORIES= x11 wayland
+
+MAINTAINER= jbeich@FreeBSD.org
+COMMENT= wlroots-compatible Wayland color picker that does not suck
+WWW= https://github.com/hyprwm/hyprpicker
+
+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= f6c24d9
+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 's/ libjpeg//' \
+ -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/hyprpicker/distinfo b/x11/hyprpicker/distinfo
new file mode 100644
index 000000000000..144a79a83632
--- /dev/null
+++ b/x11/hyprpicker/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1668940659
+SHA256 (hyprwm-hyprpicker-s20221120-f6c24d9_GH0.tar.gz) = 29f73fe0ef09735b815f7459aa8ad42aa905f618a926531fd23ffe330a8ab8bb
+SIZE (hyprwm-hyprpicker-s20221120-f6c24d9_GH0.tar.gz) = 20984
diff --git a/x11/hyprpicker/pkg-descr b/x11/hyprpicker/pkg-descr
new file mode 100644
index 000000000000..efb137e6a874
--- /dev/null
+++ b/x11/hyprpicker/pkg-descr
@@ -0,0 +1 @@
+A wlroots-compatible Wayland color picker that does not suck.