diff --git a/x11/hyprpicker/Makefile b/x11/hyprpicker/Makefile index b67732dba1ce..cb438a69f3e9 100644 --- a/x11/hyprpicker/Makefile +++ b/x11/hyprpicker/Makefile @@ -1,56 +1,52 @@ PORTNAME= hyprpicker DISTVERSIONPREFIX= v -DISTVERSION= 0.4.5 -PORTREVISION= 4 +DISTVERSION= 0.4.6 CATEGORIES= x11 wayland MAINTAINER= tagattie@FreeBSD.org COMMENT= Color picker and magnifier for Wayland WWW= https://github.com/hyprwm/hyprpicker LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= hyprwayland-scanner>=0.4.0:devel/hyprwayland-scanner \ wayland-protocols>0:graphics/wayland-protocols LIB_DEPENDS= libhyprutils.so:devel/hyprutils \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon USES= compiler:c++11-lib cmake gnome localbase:ldflags pkgconfig -USE_GNOME= cairo + USE_GITHUB= yes GH_ACCOUNT= hyprwm + +USE_GNOME= cairo + PLIST_FILES= bin/${PORTNAME} \ share/man/man1/${PORTNAME}.1.gz OPTIONS_DEFINE= CLIPBOARD OPTIONS_DEFAULT=CLIPBOARD CLIPBOARD_DESC= Copy to clipboard support CLIPBOARD_RUN_DEPENDS= wl-copy:x11/wl-clipboard post-patch: # Extract (snapshot) version from the port instead of Git @${REINPLACE_CMD} -i .nogit -e '/Get git info/,/^include/{//p;d;}' \ -e 's/$${GIT_BRANCH}/main/' \ -e 's/$${GIT_COMMIT_HASH}/${GH_TAGNAME}/' \ -e 's/$${GIT_COMMIT_MESSAGE}/?/' \ -e 's/$${GIT_DIRTY}/portbld/' \ ${WRKSRC}/CMakeLists.txt # Drop unused dependencies @${REINPLACE_CMD} -e '/pango/d' \ -e '/libjpeg/d' \ -e 's/pthread $${CMAKE_THREAD_LIBS_INIT}//' \ -e '/ rt)/d' \ ${WRKSRC}/CMakeLists.txt @${REINPLACE_CMD} -e '/pthread\.h/d' \ ${WRKSRC}/src/includes.hpp -do-install: - ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} \ - ${STAGEDIR}${PREFIX}/bin - ${INSTALL_MAN} ${WRKSRC}/doc/${PORTNAME}.1 \ - ${STAGEDIR}${PREFIX}/share/man/man1/ - .include diff --git a/x11/hyprpicker/distinfo b/x11/hyprpicker/distinfo index a615915115cd..31f55e5b9931 100644 --- a/x11/hyprpicker/distinfo +++ b/x11/hyprpicker/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1746060866 -SHA256 (hyprwm-hyprpicker-v0.4.5_GH0.tar.gz) = fe9611ec78524f9bbea0d39308da3d9c61cb20f6103179a269cad8013bb0c1f3 -SIZE (hyprwm-hyprpicker-v0.4.5_GH0.tar.gz) = 26380 +TIMESTAMP = 1770873313 +SHA256 (hyprwm-hyprpicker-v0.4.6_GH0.tar.gz) = 3dc3dec1ba3254a9ab3303461a12593f18318961934d24e4b1adc08927ba675d +SIZE (hyprwm-hyprpicker-v0.4.6_GH0.tar.gz) = 28553 diff --git a/x11/hyprpicker/files/patch-src_main.cpp b/x11/hyprpicker/files/patch-src_main.cpp new file mode 100644 index 000000000000..8762740043aa --- /dev/null +++ b/x11/hyprpicker/files/patch-src_main.cpp @@ -0,0 +1,32 @@ +--- src/main.cpp.orig 2026-02-12 05:19:31 UTC ++++ src/main.cpp +@@ -1,3 +1,4 @@ ++#include + #include + #include + #include +@@ -90,12 +91,24 @@ int main(int argc, char** argv, char** envp) { + } + case 's': { + float value; ++#if defined(__FreeBSD__) ++ try { ++ size_t pos; ++ value = std::stof(optarg, &pos); ++ if (pos != strlen(optarg)) ++ throw std::invalid_argument(""); ++ } catch (...) { ++ std::cerr << "Invalid scale value: " << optarg << "\n"; ++ exit(1); ++ } ++#else + auto result = std::from_chars(optarg, optarg + strlen(optarg), value); + + if (result.ec != std::errc() || result.ptr != optarg + strlen(optarg)) { + std::cerr << "Invalid scale value: " << optarg << "\n"; + exit(1); + } ++#endif + + if (value < 1.0f || value > 10.0f) { + std::cerr << "Scale must be between 1 and 10!\n";