aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2024-06-13 09:36:49 +0000
committerJan Beich <jbeich@FreeBSD.org>2024-06-13 12:44:01 +0000
commitb8acf2369aae222f96892993ccc38bd124051d04 (patch)
tree5a233d226e6ac8a6d1df26ae6ad893b6572b178b
parent1b23928abaf6982bf27b410b749035a91d5bd359 (diff)
devel/hyprutils: add new port
Hyprutils is a small C++ library for utilities used across the Hypr* ecosystem. https://github.com/hyprwm/hyprutils
-rw-r--r--devel/Makefile1
-rw-r--r--devel/hyprutils/Makefile41
-rw-r--r--devel/hyprutils/distinfo5
-rw-r--r--devel/hyprutils/pkg-descr2
-rw-r--r--devel/hyprutils/pkg-plist10
5 files changed, 59 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index f6264a4cd6fb..a3eb8e37481d 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -982,6 +982,7 @@
SUBDIR += hwloc2
SUBDIR += hyperscan
SUBDIR += hyprlang
+ SUBDIR += hyprutils
SUBDIR += hyprwayland-scanner
SUBDIR += ice
SUBDIR += ice37
diff --git a/devel/hyprutils/Makefile b/devel/hyprutils/Makefile
new file mode 100644
index 000000000000..13c22fd41c5d
--- /dev/null
+++ b/devel/hyprutils/Makefile
@@ -0,0 +1,41 @@
+PORTNAME= hyprutils
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.1.2
+CATEGORIES= devel
+
+MAINTAINER= jbeich@FreeBSD.org
+COMMENT= Hyprland utilities library used across the ecosystem
+WWW= https://github.com/hyprwm/hyprutils
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= compiler:c++11-lib cmake
+USE_GITHUB= yes
+USE_LDCONFIG= yes
+GH_ACCOUNT= hyprwm
+
+# XXX Drop after FreeBSD 13.2 EOL around 2024-07-01 (don't forget distinfo)
+.if ${CXX} == c++ && exists(/usr/lib/libc++.so)
+.if !exists(/usr/include/c++/v1/expected) || make(makesum) || make(fetch)
+USES+= llvm:min=16,build,export
+PATH:= ${LLVM_PREFIX}/bin:${PATH} # XXX _CMAKE_TOOLCHAIN_SUFFIX vs. devel/llvm*
+CONFIGURE_ENV+= CC="${CC}" CXX="${CXX}" CPP="${CPP}"
+
+# XXX Move into separate port and standardize via USES
+GH_TUPLE+= llvm:llvm-project:llvmorg-16.0.1:libcxx
+CXXFLAGS+= -nostdinc++ -isystem${WRKDIR}/libcxx_prefix/include/c++/v1
+# Don't link against new libc++ as it's not necessary
+#LDFLAGS+= -nostdlib++ -L${WRKDIR}/libcxx_prefix/lib -l:libc++.a -lcxxrt
+
+pre-configure: bundled-libcxx
+bundled-libcxx:
+ @${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} \
+ -DLIBCXX_INCLUDE_BENCHMARKS:BOOL=OFF \
+ -DCMAKE_INSTALL_PREFIX:PATH=${WRKDIR}/libcxx_prefix \
+ -B ${WRKDIR}/libcxx_build -S ${WRKSRC_libcxx}/libcxx
+ @${DO_MAKE_BUILD:NDESTDIR*} install -C ${WRKDIR}/libcxx_build
+.endif
+.endif # exists(/usr/lib/libc++.so)
+
+.include <bsd.port.mk>
diff --git a/devel/hyprutils/distinfo b/devel/hyprutils/distinfo
new file mode 100644
index 000000000000..62522e6ee0f6
--- /dev/null
+++ b/devel/hyprutils/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1718271409
+SHA256 (hyprwm-hyprutils-v0.1.2_GH0.tar.gz) = a11598fbba1dcb8e1f939935ed55339b481816b1fddc89dbbfe4dafb4d753562
+SIZE (hyprwm-hyprutils-v0.1.2_GH0.tar.gz) = 11078
+SHA256 (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = b5a9ff1793b1e2d388a3819bf35797002b1d2e40bb35a10c65605e0ea1435271
+SIZE (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = 179289803
diff --git a/devel/hyprutils/pkg-descr b/devel/hyprutils/pkg-descr
new file mode 100644
index 000000000000..d9a1a6b61b0f
--- /dev/null
+++ b/devel/hyprutils/pkg-descr
@@ -0,0 +1,2 @@
+Hyprutils is a small C++ library for utilities used across the Hypr*
+ecosystem.
diff --git a/devel/hyprutils/pkg-plist b/devel/hyprutils/pkg-plist
new file mode 100644
index 000000000000..1dbcbbd6e606
--- /dev/null
+++ b/devel/hyprutils/pkg-plist
@@ -0,0 +1,10 @@
+include/hyprutils/memory/SharedPtr.hpp
+include/hyprutils/memory/WeakPtr.hpp
+include/hyprutils/signal/Listener.hpp
+include/hyprutils/signal/Signal.hpp
+include/hyprutils/string/String.hpp
+include/hyprutils/string/VarList.hpp
+lib/libhyprutils.so
+lib/libhyprutils.so.0
+lib/libhyprutils.so.0.1.2
+libdata/pkgconfig/hyprutils.pc