The jq package has this as optional dependency and shipped it as vendor
code in a submodule, which might break the build, and makes specifying
license unnecessarily difficult.  Split into separate package.

Note, the upstream project is EOL, but so would be the jq submodule.

Link: 
https://lore.ptxdist.org/ptxdist/[email protected]/
Signed-off-by: Alexander Dahl <[email protected]>
---
 rules/libonig.in   | 11 ++++++++++
 rules/libonig.make | 52 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
 create mode 100644 rules/libonig.in
 create mode 100644 rules/libonig.make

diff --git a/rules/libonig.in b/rules/libonig.in
new file mode 100644
index 000000000..fa909fcb6
--- /dev/null
+++ b/rules/libonig.in
@@ -0,0 +1,11 @@
+## SECTION=system_libraries
+
+config LIBONIG
+       tristate
+       prompt "libonig"
+       help
+         Oniguruma is a modern and flexible regular expressions library.
+         It encompasses features from different regular expression
+         implementations that traditionally exist in different languages.
+
+# vim: ft=kconfig noet ts=8 sw=8
diff --git a/rules/libonig.make b/rules/libonig.make
new file mode 100644
index 000000000..3397f553f
--- /dev/null
+++ b/rules/libonig.make
@@ -0,0 +1,52 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2025 by Alexander Dahl <[email protected]>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBONIG) += libonig
+
+#
+# Paths and names
+#
+LIBONIG_VERSION                := 6.9.10
+LIBONIG_MD5            := 46c48d072eafe29a0dd0489df7f6f212
+LIBONIG                        := onig-$(LIBONIG_VERSION)
+LIBONIG_SUFFIX         := tar.gz
+LIBONIG_URL            := 
https://github.com/kkos/oniguruma/releases/download/v$(LIBONIG_VERSION)/$(LIBONIG).$(LIBONIG_SUFFIX)
+LIBONIG_SOURCE         := $(SRCDIR)/$(LIBONIG).$(LIBONIG_SUFFIX)
+LIBONIG_DIR            := $(BUILDDIR)/$(LIBONIG)
+LIBONIG_LICENSE                := BSD-2-Clause
+LIBONIG_LICENSE_FILES  := file://COPYING;md5=e6365c225bb5cc4321d0913f0baffa04
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBONIG_CONF_TOOL      := autoconf
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libonig.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, libonig)
+       @$(call install_fixup, libonig,PRIORITY,optional)
+       @$(call install_fixup, libonig,SECTION,base)
+       @$(call install_fixup, libonig,AUTHOR,"Alexander Dahl 
<[email protected]>")
+       @$(call install_fixup, libonig,DESCRIPTION,missing)
+
+       @$(call install_lib, libonig, 0, 0, 0644, libonig)
+
+       @$(call install_finish, libonig)
+
+       @$(call touch)
+
+# vim: ft=make noet ts=8 sw=8
-- 
2.39.5


Reply via email to