pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/textproc/libxo
Module Name: pkgsrc
Committed By: charlotte
Date: Wed Sep 9 02:26:33 UTC 2026
Added Files:
pkgsrc/textproc/libxo: DESCR Makefile PLIST distinfo
pkgsrc/textproc/libxo/patches: patch-configure.ac
Log Message:
textproc/libxo: New package
The libxo library allows an application to generate text, XML, JSON, and
HTML output using a common set of function calls. The application decides at
run time which output style should be produced. The application calls a
function "xo_emit" to product output that is described in a format string. A
"field descriptor" tells libxo what the field is and what it means.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/libxo/DESCR \
pkgsrc/textproc/libxo/Makefile pkgsrc/textproc/libxo/PLIST \
pkgsrc/textproc/libxo/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/libxo/patches/patch-configure.ac
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/textproc/libxo/DESCR
diff -u /dev/null pkgsrc/textproc/libxo/DESCR:1.1
--- /dev/null Wed Sep 9 02:26:33 2026
+++ pkgsrc/textproc/libxo/DESCR Wed Sep 9 02:26:33 2026
@@ -0,0 +1,5 @@
+The libxo library allows an application to generate text, XML, JSON, and
+HTML output using a common set of function calls. The application decides at
+run time which output style should be produced. The application calls a
+function "xo_emit" to product output that is described in a format string. A
+"field descriptor" tells libxo what the field is and what it means.
Index: pkgsrc/textproc/libxo/Makefile
diff -u /dev/null pkgsrc/textproc/libxo/Makefile:1.1
--- /dev/null Wed Sep 9 02:26:33 2026
+++ pkgsrc/textproc/libxo/Makefile Wed Sep 9 02:26:33 2026
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1 2026/09/09 02:26:33 charlotte Exp $
+
+DISTNAME= libxo-2.0.0
+CATEGORIES= textproc
+MASTER_SITES= ${MASTER_SITE_GITHUB:=Juniper/}
+GITHUB_RELEASE= ${PKGVERSION_NOREV}
+GITHUB_TYPE= release
+
+MAINTAINER= charlotte%NetBSD.org@localhost
+HOMEPAGE= https://github.com/Juniper/libxo
+COMMENT= Library for generating text, XML, JSON, and HTML output
+LICENSE= 2-clause-bsd
+
+GNU_CONFIGURE= yes
+USE_LANGUAGES= c
+USE_TOOLS+= autoconf automake gmake msgfmt perl:run
+
+REPLACE_PERL+= xolint/xolint.pl
+
+CONFIGURE_ARGS+= MAKE=gmake
+
+pre-configure:
+ cd ${WRKSRC} && autoreconf -fi && automake
+
+post-install:
+ find ${DESTDIR} -type f -name \*.la -delete
+
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/textproc/libxo/PLIST
diff -u /dev/null pkgsrc/textproc/libxo/PLIST:1.1
--- /dev/null Wed Sep 9 02:26:33 2026
+++ pkgsrc/textproc/libxo/PLIST Wed Sep 9 02:26:33 2026
@@ -0,0 +1,78 @@
+@comment $NetBSD: PLIST,v 1.1 2026/09/09 02:26:33 charlotte Exp $
+bin/libxo-config
+bin/xo
+bin/xohtml
+bin/xolint
+bin/xopo
+include/libxo/xo.h
+include/libxo/xo_encoder.h
+lib/libxo.a
+lib/libxo.so
+lib/libxo.so.0
+lib/libxo.so.0.0
+lib/libxo/encoder/cbor.enc
+lib/libxo/encoder/csv.enc
+lib/libxo/encoder/libenc_cbor.a
+lib/libxo/encoder/libenc_cbor.so
+lib/libxo/encoder/libenc_cbor.so.0
+lib/libxo/encoder/libenc_cbor.so.0.0
+lib/libxo/encoder/libenc_csv.a
+lib/libxo/encoder/libenc_csv.so
+lib/libxo/encoder/libenc_csv.so.0
+lib/libxo/encoder/libenc_csv.so.0.0
+lib/libxo/encoder/libenc_test.a
+lib/libxo/encoder/libenc_test.so
+lib/libxo/encoder/libenc_test.so.0
+lib/libxo/encoder/libenc_test.so.0.0
+lib/libxo/encoder/test.enc
+lib/libxo/libxo_filter.a
+lib/libxo/libxo_filter.so
+lib/libxo/libxo_filter.so.0
+lib/libxo/libxo_filter.so.0.0
+lib/libxo/libxo_format.a
+lib/libxo/libxo_format.so
+lib/libxo/libxo_format.so.0
+lib/libxo/libxo_format.so.0.0
+lib/libxo/xo_filter.lib
+lib/pkgconfig/libxo.pc
+man/man1/xo.1
+man/man1/xohtml.1
+man/man1/xolint.1
+man/man1/xopo.1
+man/man3/libxo.3
+man/man3/xo_add_filter.3
+man/man3/xo_attr.3
+man/man3/xo_create.3
+man/man3/xo_discarding_output.3
+man/man3/xo_emit.3
+man/man3/xo_emit_err.3
+man/man3/xo_err.3
+man/man3/xo_error.3
+man/man3/xo_finish.3
+man/man3/xo_flush.3
+man/man3/xo_message.3
+man/man3/xo_no_setlocale.3
+man/man3/xo_open_container.3
+man/man3/xo_open_list.3
+man/man3/xo_open_marker.3
+man/man3/xo_parse_args.3
+man/man3/xo_set_allocator.3
+man/man3/xo_set_flags.3
+man/man3/xo_set_info.3
+man/man3/xo_set_options.3
+man/man3/xo_set_style.3
+man/man3/xo_set_syslog_enterprise_id.3
+man/man3/xo_set_version.3
+man/man3/xo_set_writer.3
+man/man3/xo_syslog.3
+man/man5/xo_format.5
+man/man7/libxo.7
+man/man7/xo_csv.7
+man/man7/xo_filter.7
+man/man7/xo_options.7
+share/doc/libxo/Copyright
+share/libxo/external/jquery.js
+share/libxo/external/jquery.qtip.css
+share/libxo/external/jquery.qtip.js
+share/libxo/xohtml.css
+share/libxo/xohtml.js
Index: pkgsrc/textproc/libxo/distinfo
diff -u /dev/null pkgsrc/textproc/libxo/distinfo:1.1
--- /dev/null Wed Sep 9 02:26:33 2026
+++ pkgsrc/textproc/libxo/distinfo Wed Sep 9 02:26:33 2026
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2026/09/09 02:26:33 charlotte Exp $
+
+BLAKE2s (libxo-2.0.0.tar.gz) = ae6b9ffcde0ded263ed0ee9f8aa809ae075272ebb1e8e683f3e29f8d865a81e4
+SHA512 (libxo-2.0.0.tar.gz) = 6e87121d22bd56225aae555ca301da0b55b3b7157a44261065f4746150b1363cfd5176b7ecb34d00a984c241c33adcc505869f0bb6e577c274a5052435b08fa3
+Size (libxo-2.0.0.tar.gz) = 1106498 bytes
+SHA1 (patch-configure.ac) = 45abb498d35bc55ef226eaff83c3a2101109db2e
Index: pkgsrc/textproc/libxo/patches/patch-configure.ac
diff -u /dev/null pkgsrc/textproc/libxo/patches/patch-configure.ac:1.1
--- /dev/null Wed Sep 9 02:26:33 2026
+++ pkgsrc/textproc/libxo/patches/patch-configure.ac Wed Sep 9 02:26:33 2026
@@ -0,0 +1,96 @@
+$NetBSD: patch-configure.ac,v 1.1 2026/09/09 02:26:33 charlotte Exp $
+
+Fix gettext detection.
+
+ commit 1f32d0fbb11462376d4294bddc59c2fd9e56a57c
+ Author: Rui Chen <rui%chenrui.dev@localhost>
+ Date: Sun Aug 16 19:06:13 2026 -0400
+
+ configure: detect gettext in libc and make msgfmt conditional
+
+ On glibc, gettext lives in libc with no separate libintl, so the
+ -lintl link probes failed and the msgfmt check aborted even when
+ gettext is usable. Detect whether -lintl is needed, add <stddef.h>
+ so NULL is defined, gate the msgfmt lookup on gettext being present,
+ and also search PATH for msgfmt. Overlaps Juniper/libxo#114 and
+ #115.
+
+ Signed-off-by: Rui Chen <rui%chenrui.dev@localhost>
+
+--- configure.ac.old
++++ configure.ac
+@@ -209,11 +209,20 @@ HAVE_GETTEXT=no
+
+ if test "$GETTEXT_ENABLE" != "no"; then
+
++ dnl glibc provides gettext in libc; only link -lintl when a separate
++ dnl libintl is required (e.g. macOS, *BSD), so detection also works on glibc.
++ GETTEXT_INTL=-lintl
++ AC_LINK_IFELSE([AC_LANG_SOURCE([[#include <libintl.h>]
++ [#include <stddef.h>]
++ [int main() {char *cp = dgettext(NULL, "xx"); return 0; }]])],
++ [GETTEXT_INTL=])
++
+ AC_MSG_CHECKING([gettext in ${GETTEXT_PREFIX}])
+
+ _save_cflags="$CFLAGS"
+- CFLAGS="$CFLAGS -I${GETTEXT_PREFIX}/include -L${GETTEXT_PREFIX}/lib -Werror -lintl"
++ CFLAGS="$CFLAGS -I${GETTEXT_PREFIX}/include -L${GETTEXT_PREFIX}/lib -Werror ${GETTEXT_INTL}"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[#include <libintl.h>]
++ [#include <stddef.h>]
+ [int main() {char *cp = dgettext(NULL, "xx"); return 0; }]])],
+ [HAVE_GETTEXT=yes],
+ [HAVE_GETTEXT=no])
+@@ -226,8 +235,9 @@ if test "$GETTEXT_ENABLE" != "no"; then
+ AC_MSG_CHECKING([gettext in ${GETTEXT_PREFIX}])
+
+ _save_cflags="$CFLAGS"
+- CFLAGS="$CFLAGS -I${GETTEXT_PREFIX}/include -L${GETTEXT_PREFIX}/lib -Werror -lintl"
++ CFLAGS="$CFLAGS -I${GETTEXT_PREFIX}/include -L${GETTEXT_PREFIX}/lib -Werror ${GETTEXT_INTL}"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[#include <libintl.h>]
++ [#include <stddef.h>]
+ [int main() {char *cp = dgettext(NULL, "xx"); return 0; }]])],
+ [HAVE_GETTEXT=yes],
+ [HAVE_GETTEXT=no])
+@@ -241,8 +251,9 @@ if test "$GETTEXT_ENABLE" != "no"; then
+ AC_MSG_CHECKING([gettext in ${GETTEXT_PREFIX}])
+
+ _save_cflags="$CFLAGS"
+- CFLAGS="$CFLAGS -I${GETTEXT_PREFIX}/include -L${GETTEXT_PREFIX}/lib -Werror -lintl"
++ CFLAGS="$CFLAGS -I${GETTEXT_PREFIX}/include -L${GETTEXT_PREFIX}/lib -Werror ${GETTEXT_INTL}"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[#include <libintl.h>]
++ [#include <stddef.h>]
+ [int main() {char *cp = dgettext(NULL, "xx"); return 0; }]])],
+ [HAVE_GETTEXT=yes],
+ [HAVE_GETTEXT=no])
+@@ -255,7 +266,7 @@ fi
+ if test "$HAVE_GETTEXT" = "yes"; then
+ AC_DEFINE([HAVE_GETTEXT], [1], [gettext(3)])
+ GETTEXT_CFLAGS="-I${GETTEXT_PREFIX}/include"
+- GETTEXT_LIBS="-L${GETTEXT_PREFIX}/lib -lintl"
++ GETTEXT_LIBS="-L${GETTEXT_PREFIX}/lib ${GETTEXT_INTL}"
+ else
+ GETTEXT_PREFIX=none
+ GETTEXT_CFLAGS=
+@@ -266,14 +277,17 @@ AC_SUBST(GETTEXT_LIBS)
+
+ GETTEXT_LIBDIR=${GETTEXT_PREFIX}/lib
+ AC_SUBST(GETTEXT_LIBDIR)
+-if test -x ${GETTEXT_PREFIX}/bin/msgfmt ; then
++if test "$HAVE_GETTEXT" != "yes"; then
++ GETTEXT_BINDIR=
++elif test -x ${GETTEXT_PREFIX}/bin/msgfmt ; then
+ GETTEXT_BINDIR=${GETTEXT_PREFIX}/bin
+ elif test -x ${GETTEXT_PREFIX}/local/bin/msgfmt ; then
+ GETTEXT_BINDIR=${GETTEXT_PREFIX}/local/bin
+ else
+- AC_MSG_FAILURE("could not find msgfmt tool")
+- # Use a (bad) fall back value
+- GETTEXT_BINDIR=${GETTEXT_PREFIX}/bin
++ dnl gettext may live in libc (glibc); msgfmt can be elsewhere on PATH
++ AC_PATH_PROG([MSGFMT], [msgfmt])
++ AS_IF([test -n "$MSGFMT"], [GETTEXT_BINDIR=`AS_DIRNAME([$MSGFMT])`],
++ [AC_MSG_FAILURE([could not find msgfmt tool])])
+ fi
+ AC_SUBST(GETTEXT_BINDIR)
+
Home |
Main Index |
Thread Index |
Old Index