git: 1c60f593c930 - main - devel/hyprlang: add new port

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 03 Jan 2024 12:59:27 UTC
The branch main has been updated by jbeich:

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

commit 1c60f593c930a1ebaea20094201fd87bf82c7f2e
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-01-02 22:10:42 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-01-03 12:58:11 +0000

    devel/hyprlang: add new port
    
    The hypr configuration language is an extremely efficient, yet easy to
    work with, configuration language for linux applications.
    
    It's user-friendly, easy to grasp, and easy to implement.
    
    https://hyprland.org/hyprlang
---
 devel/Makefile                            |  1 +
 devel/hyprlang/Makefile                   | 25 +++++++++++++++++++++++++
 devel/hyprlang/distinfo                   |  3 +++
 devel/hyprlang/files/patch-CMakeLists.txt | 25 +++++++++++++++++++++++++
 devel/hyprlang/pkg-descr                  |  4 ++++
 5 files changed, 58 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index feeb6dfdd492..11da06554d54 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -960,6 +960,7 @@
     SUBDIR += hwloc
     SUBDIR += hwloc2
     SUBDIR += hyperscan
+    SUBDIR += hyprlang
     SUBDIR += ice
     SUBDIR += ice37
     SUBDIR += icestorm
diff --git a/devel/hyprlang/Makefile b/devel/hyprlang/Makefile
new file mode 100644
index 000000000000..47aa69b95daa
--- /dev/null
+++ b/devel/hyprlang/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	hyprlang
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.2.1
+CATEGORIES=	devel
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Library to parse hypr config files
+WWW=		https://hyprland.org/hyprlang
+
+LICENSE=	GPLv3+
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BROKEN_armv7=	https://github.com/hyprwm/hyprlang/issues/8
+BROKEN_i386=	https://github.com/hyprwm/hyprlang/issues/8
+BROKEN_powerpc=	https://github.com/hyprwm/hyprlang/issues/8
+
+USES=		cmake:testing compiler:c++11-lib
+USE_GITHUB=	yes
+USE_LDCONFIG=	yes
+GH_ACCOUNT=	hyprwm
+PLIST_FILES=	include/${PORTNAME}.hpp \
+		lib/lib${PORTNAME}.so \
+		share/pkgconfig/${PORTNAME}.pc
+
+.include <bsd.port.mk>
diff --git a/devel/hyprlang/distinfo b/devel/hyprlang/distinfo
new file mode 100644
index 000000000000..ac63b443fb3f
--- /dev/null
+++ b/devel/hyprlang/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1704233442
+SHA256 (hyprwm-hyprlang-v0.2.1_GH0.tar.gz) = e41b265f09c1e84e03f052f584fcc086fe48ec5057191ef35917ce79e7dc4190
+SIZE (hyprwm-hyprlang-v0.2.1_GH0.tar.gz) = 61006
diff --git a/devel/hyprlang/files/patch-CMakeLists.txt b/devel/hyprlang/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..c19bc08bf1dc
--- /dev/null
+++ b/devel/hyprlang/files/patch-CMakeLists.txt
@@ -0,0 +1,25 @@
+https://github.com/hyprwm/hyprlang/issues/6
+https://github.com/hyprwm/hyprlang/issues/7
+
+--- CMakeLists.txt.orig	2024-01-02 22:10:42 UTC
++++ CMakeLists.txt
+@@ -31,16 +31,16 @@ target_link_libraries(hyprlang_test PRIVATE hyprlang)
+ 
+ add_executable(hyprlang_test "tests/parse/main.cpp")
+ target_link_libraries(hyprlang_test PRIVATE hyprlang)
+-add_test(NAME "Parsing" WORKING_DIRECTORY "../tests/" COMMAND hyprlang_test "parse")
++add_test(NAME "Parsing" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/tests/" COMMAND hyprlang_test "parse")
+ add_dependencies(tests hyprlang_test)
+ 
+ add_executable(hyprlang_fuzz "tests/fuzz/main.cpp")
+ target_link_libraries(hyprlang_fuzz PRIVATE hyprlang)
+-add_test(NAME "Fuzz" WORKING_DIRECTORY "../tests/" COMMAND hyprlang_fuzz "fuzz")
++add_test(NAME "Fuzz" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/tests/" COMMAND hyprlang_fuzz "fuzz")
+ add_dependencies(tests hyprlang_fuzz)
+ 
+ # Installation
+ install(TARGETS hyprlang
+         PUBLIC_HEADER DESTINATION include
+         LIBRARY DESTINATION lib)
+-install(FILES build/hyprlang.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pkgconfig)
++install(FILES ${CMAKE_BINARY_DIR}/hyprlang.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pkgconfig)
diff --git a/devel/hyprlang/pkg-descr b/devel/hyprlang/pkg-descr
new file mode 100644
index 000000000000..b2d738ca0be1
--- /dev/null
+++ b/devel/hyprlang/pkg-descr
@@ -0,0 +1,4 @@
+The hypr configuration language is an extremely efficient, yet easy to
+work with, configuration language for linux applications.
+
+It's user-friendly, easy to grasp, and easy to implement.