pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Add a package for cligen version 7.1.0.
Module Name: pkgsrc-wip
Committed By: Havard Eidnes <he%NetBSD.org@localhost>
Pushed By: he
Date: Tue Sep 17 11:21:30 2024 +0000
Changeset: be8de2d7eda8c20cc192cfd93a82251dbe8d9158
Added Files:
cligen/DESCR
cligen/Makefile
cligen/PLIST
cligen/buildlink3.mk
cligen/distinfo
cligen/patches/patch-configure.ac
Log Message:
Add a package for cligen version 7.1.0.
CLIgen is a Command-Line Interface generator.
Well, actually it is not really a generator, since it does not
generate code for CLI:s. Instead, it builds and interprets
datastructures (a parse-tree) which a library (libcligen) interprets
in runtime. It is fast and efficient and helps you develop CLI:s
easier. You enter a CLI syntax in a text file, and write callback
functions in C. The callback functions add the semantics, that is,
what the commands in the CLI are supposed to do.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=be8de2d7eda8c20cc192cfd93a82251dbe8d9158
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
cligen/DESCR | 9 +++++++++
cligen/Makefile | 27 +++++++++++++++++++++++++++
cligen/PLIST | 22 ++++++++++++++++++++++
cligen/buildlink3.mk | 14 ++++++++++++++
cligen/distinfo | 6 ++++++
cligen/patches/patch-configure.ac | 26 ++++++++++++++++++++++++++
6 files changed, 104 insertions(+)
diffs:
diff --git a/cligen/DESCR b/cligen/DESCR
new file mode 100644
index 0000000000..3002751299
--- /dev/null
+++ b/cligen/DESCR
@@ -0,0 +1,9 @@
+CLIgen is a Command-Line Interface generator.
+
+Well, actually it is not really a generator, since it does not
+generate code for CLI:s. Instead, it builds and interprets
+datastructures (a parse-tree) which a library (libcligen) interprets
+in runtime. It is fast and efficient and helps you develop CLI:s
+easier. You enter a CLI syntax in a text file, and write callback
+functions in C. The callback functions add the semantics, that is,
+what the commands in the CLI are supposed to do.
diff --git a/cligen/Makefile b/cligen/Makefile
new file mode 100644
index 0000000000..24bd036ef7
--- /dev/null
+++ b/cligen/Makefile
@@ -0,0 +1,27 @@
+# $NetBSD$
+
+DISTNAME= cligen-7.1.0
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=clicon/}
+GITHUB_PROJECT= cligen
+DISTFILES= ${PKGNAME_NOREV}.tar.gz
+
+MAINTAINER= he%NetBSD.org@localhost
+HOMEPAGE= http://www.cligen.se/
+COMMENT= Tool to generate interactive command-line interfaces
+LICENSE= apache-2.0 OR gnu-gpl-v2
+
+USE_LANGUAGES= c
+GNU_CONFIGURE= yes
+#USE_LIBTOOL= yes
+
+USE_TOOLS+= gmake bison flex autoconf
+
+# Could in principle be an option:
+CONFIGURE_ARGS+= --with-libxml2=${BUILDLINK_PREFIX.libxml2}
+
+pre-configure:
+ cd ${WRKSRC} && autoconf
+
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/cligen/PLIST b/cligen/PLIST
new file mode 100644
index 0000000000..af08fc5ecf
--- /dev/null
+++ b/cligen/PLIST
@@ -0,0 +1,22 @@
+@comment $NetBSD$
+include/cligen/cligen.h
+include/cligen/cligen_buf.h
+include/cligen/cligen_callback.h
+include/cligen/cligen_cv.h
+include/cligen/cligen_cvec.h
+include/cligen/cligen_expand.h
+include/cligen/cligen_handle.h
+include/cligen/cligen_history.h
+include/cligen/cligen_io.h
+include/cligen/cligen_object.h
+include/cligen/cligen_parsetree.h
+include/cligen/cligen_print.h
+include/cligen/cligen_pt_head.h
+include/cligen/cligen_read.h
+include/cligen/cligen_regex.h
+include/cligen/cligen_result.h
+include/cligen/cligen_syntax.h
+include/cligen/cligen_util.h
+lib/libcligen.so
+lib/libcligen.so.7
+lib/libcligen.so.7.1
diff --git a/cligen/buildlink3.mk b/cligen/buildlink3.mk
new file mode 100644
index 0000000000..2b1ba156c1
--- /dev/null
+++ b/cligen/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD$
+
+BUILDLINK_TREE+= cligen
+
+.if !defined(CLIGEN_BUILDLINK3_MK)
+CLIGEN_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.cligen+= cligen>=7.1.0
+BUILDLINK_ABI_DEPENDS.cligen?= cligen>=7.1.0
+BUILDLINK_PKGSRCDIR.cligen?= ../../wip/cligen
+
+.endif # CLIGEN_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -cligen
diff --git a/cligen/distinfo b/cligen/distinfo
new file mode 100644
index 0000000000..fd6c829b8e
--- /dev/null
+++ b/cligen/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (cligen-7.1.0.tar.gz) = 8e5223c8fb4434efc3406d3ba36667bc5ea33bf918dda085ddba870fec120dad
+SHA512 (cligen-7.1.0.tar.gz) = fe91a57fd3de96fca49f54c2e887b1395cc6712517814ace265a57df397e4354d91f47abb97ee8c66802f35fde4e83d74f85738868fb2f3417f5efef7c92551c
+Size (cligen-7.1.0.tar.gz) = 817152 bytes
+SHA1 (patch-configure.ac) = 0b4333fd0383b55d0b0aca55ab120aaae3054fc2
diff --git a/cligen/patches/patch-configure.ac b/cligen/patches/patch-configure.ac
new file mode 100644
index 0000000000..a42b737b7b
--- /dev/null
+++ b/cligen/patches/patch-configure.ac
@@ -0,0 +1,26 @@
+$NetBSD$
+
+Permit YACC being "/usr/pkg/bin/bison -y".
+Also properly handle --with-libxml2=...
+
+--- configure.ac.orig 2024-07-03 06:48:07.000000000 +0000
++++ configure.ac
+@@ -107,7 +107,7 @@ echo "$host_cpu $host_vendor $host_os"
+ if test "$LEX" = ":"; then
+ AC_MSG_ERROR(CLIGEN does not find lex or flex.)
+ fi
+-if test "$YACC" != "bison -y"; then
++if test `expr "$YACC" : ".*bison -y"` -eq 0; then
+ AC_MSG_ERROR(CLIGEN does not find bison. There are several problems with yacc and byacc. Please install bison.)
+ # byacc leaks, may need byacc -P?
+ fi
+@@ -150,6 +150,9 @@ if test "${with_libxml2}"; then
+ AC_CHECK_LIB(xml2, xmlRegexpCompile,[], AC_MSG_ERROR([libxml2 not found]))
+
+ # Libxml2 may hide its include files under /usr/include/libxml2/libxml
++ if test x"$with_libxml2" != x; then
++ CPPFLAGS="$CPPFLAGS -I${with_libxml2}/include/libxml2"
++ fi
+ CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
+ AC_CHECK_HEADERS([libxml/xmlregexp.h], [], AC_MSG_ERROR([libxml2 header files not found / install libxml2-dev?]), [#include "libxml/xmlversion.h"])
+ fi
Home |
Main Index |
Thread Index |
Old Index