Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2024 00:52:15 GMT
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 9f71fa67ba07 - main - x11/hyprcursor: add new port
Message-ID:  <202403090052.4290qFcJ046282@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jbeich:

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

commit 9f71fa67ba076b5aed6ad01c76c254aa3f7660f7
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-03-08 17:32:40 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-03-09 00:51:37 +0000

    x11/hyprcursor: add new port
    
    The hyprland cursor format, library and utilities.
    
    https://github.com/hyprwm/hyprcursor
---
 x11/Makefile                     |  1 +
 x11/hyprcursor/Makefile          | 21 +++++++++++++++++++++
 x11/hyprcursor/distinfo          |  3 +++
 x11/hyprcursor/files/patch-clang | 32 ++++++++++++++++++++++++++++++++
 x11/hyprcursor/pkg-descr         |  1 +
 x11/hyprcursor/pkg-plist         |  9 +++++++++
 6 files changed, 67 insertions(+)

diff --git a/x11/Makefile b/x11/Makefile
index c97b2ce23461..6bbc488d62ea 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -122,6 +122,7 @@
     SUBDIR += hs-xmobar
     SUBDIR += hsetroot
     SUBDIR += hybrid-bar
+    SUBDIR += hyprcursor
     SUBDIR += hypridle
     SUBDIR += hyprlock
     SUBDIR += hyprpaper
diff --git a/x11/hyprcursor/Makefile b/x11/hyprcursor/Makefile
new file mode 100644
index 000000000000..f625360e3a67
--- /dev/null
+++ b/x11/hyprcursor/Makefile
@@ -0,0 +1,21 @@
+PORTNAME=	hyprcursor
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.1.0
+CATEGORIES=	x11
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Hyprland cursor format, library and utilities
+WWW=		https://github.com/hyprwm/hyprcursor
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libzip.so:archivers/libzip \
+		libhyprlang.so:devel/hyprlang
+
+USES=		compiler:c++11-lib cmake:testing gnome pathfix pkgconfig
+USE_GITHUB=	yes
+USE_GNOME=	cairo librsvg2
+GH_ACCOUNT=	hyprwm
+
+.include <bsd.port.mk>
diff --git a/x11/hyprcursor/distinfo b/x11/hyprcursor/distinfo
new file mode 100644
index 000000000000..1486b1b4f95b
--- /dev/null
+++ b/x11/hyprcursor/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1709919160
+SHA256 (hyprwm-hyprcursor-v0.1.0_GH0.tar.gz) = b1f28898be5dc32f7511a530b9781f7617be6f5a7c226ff981cb325604017a6c
+SIZE (hyprwm-hyprcursor-v0.1.0_GH0.tar.gz) = 17213
diff --git a/x11/hyprcursor/files/patch-clang b/x11/hyprcursor/files/patch-clang
new file mode 100644
index 000000000000..43161820f00a
--- /dev/null
+++ b/x11/hyprcursor/files/patch-clang
@@ -0,0 +1,32 @@
+error: invalid argument '-std=gnu++2b' not allowed with 'C'
+
+libhyprcursor/hyprcursor.cpp:471:36: error: arithmetic on a pointer to void
+  471 |     std::memcpy(output, DATA->data + DATA->readNeedle, toRead);
+      |                         ~~~~~~~~~~ ^
+
+--- CMakeLists.txt.orig	2024-03-08 17:32:40 UTC
++++ CMakeLists.txt
+@@ -44,12 +44,6 @@ target_link_libraries(hyprcursor PkgConfig::deps)
+ 
+ target_link_libraries(hyprcursor PkgConfig::deps)
+ 
+-if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+-    # for std::expected.
+-    # probably evil. Arch's clang is very outdated tho...
+-    target_compile_options(hyprcursor PUBLIC -std=gnu++2b -D__cpp_concepts=202002L -Wno-macro-redefined)
+-endif()
+-
+ # hyprcursor-util
+ add_subdirectory(hyprcursor-util)
+ 
+--- libhyprcursor/hyprcursor.cpp.orig	2024-03-08 17:32:40 UTC
++++ libhyprcursor/hyprcursor.cpp
+@@ -468,7 +468,7 @@ static cairo_status_t readPNG(void* data, unsigned cha
+ 
+     size_t toRead = len > DATA->dataLen - DATA->readNeedle ? DATA->dataLen - DATA->readNeedle : len;
+ 
+-    std::memcpy(output, DATA->data + DATA->readNeedle, toRead);
++    std::memcpy(output, (uint8_t*)DATA->data + DATA->readNeedle, toRead);
+     DATA->readNeedle += toRead;
+ 
+     if (DATA->readNeedle >= DATA->dataLen) {
diff --git a/x11/hyprcursor/pkg-descr b/x11/hyprcursor/pkg-descr
new file mode 100644
index 000000000000..df51e19e3a9e
--- /dev/null
+++ b/x11/hyprcursor/pkg-descr
@@ -0,0 +1 @@
+The hyprland cursor format, library and utilities.
diff --git a/x11/hyprcursor/pkg-plist b/x11/hyprcursor/pkg-plist
new file mode 100644
index 000000000000..c6d339fd5f80
--- /dev/null
+++ b/x11/hyprcursor/pkg-plist
@@ -0,0 +1,9 @@
+bin/hyprcursor-util
+include/hyprcursor.hpp
+include/hyprcursor/hyprcursor.h
+include/hyprcursor/hyprcursor.hpp
+include/hyprcursor/shared.h
+lib/libhyprcursor.so
+lib/libhyprcursor.so.0
+lib/libhyprcursor.so.0.1.0
+libdata/pkgconfig/hyprcursor.pc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403090052.4290qFcJ046282>