# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= uclcmd VERSION= 0.2.20211204 KEYWORDS= devel VARIANTS= std SDESC[std]= Command line tool for UCL configuration files HOMEPAGE= https://github.com/allanjude/uclcmd/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= GITHUB/allanjude:uclcmd:v0.2.20211204 DISTFILE[1]= generated:main DF_INDEX= 1 SPKGS[std]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= libucl:dev:std BUILDRUN_DEPENDS= libucl:primary:std B_DEPS[linux]= libbsd:dev:std libbsd:primary:std USES= pkgconfig gmake LICENSE= BSD2CLAUSE:single LICENSE_FILE= BSD2CLAUSE:{{WRKSRC}}/LICENSE LICENSE_SCHEME= solo FPC_EQUIVALENT= devel/uclcmd post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/uclcmd [FILE:154:descriptions/desc.single] uclcmd is a command line tool for working with UCL config files. It is designed to be somewhat compatible with jq by implementing a very similar syntax. [FILE:115:distinfo] f90bcde5a57d4463e06e3d2b7a556c4285721a6fc414090711499a4d39a3bd22 19255 allanjude-uclcmd-0.2.20211204.tar.gz [FILE:11:manifests/plist.single] bin/uclcmd [FILE:288:patches/patch-Makefile] --- Makefile.orig 2021-12-06 19:25:25 UTC +++ Makefile @@ -18,4 +18,4 @@ clean: rm -f *.o $(EXECUTABLE) install: $(EXECUTABLE) - $(INSTALL) -m0755 $(EXECUTABLE) $(DESTDIR)$(PREFIX)/bin/$(EXECUTABLE) + $(BSD_INSTALL_PROGRAM) -m0755 $(EXECUTABLE) $(DESTDIR)$(PREFIX)/bin/$(EXECUTABLE) [FILE:513:patches/patch-uclcmd.h] --- uclcmd.h.orig 2021-12-06 19:25:25 UTC +++ uclcmd.h @@ -134,6 +134,10 @@ int get_cmd_type(const ucl_object_t *obj int get_cmd_values(const ucl_object_t *obj, char *nodepath, const char *command_str, char *remaining_commands, int recurse); +#ifndef __printflike +#define __printflike(fmtarg, firstvararg) __attribute__((__nonnull__(fmtarg), __format__ (__printf__, fmtarg, firstvararg))) +#endif + void uclcmd_asprintf(char ** __restrict s, char const * __restrict fmt, ...) __printflike(2, 3); [FILE:873:patches/patch-uclcmd__common.c] --- uclcmd_common.c.orig 2021-12-06 19:25:25 UTC +++ uclcmd_common.c @@ -30,6 +30,35 @@ #include "uclcmd.h" +#ifdef __linux__ +#include +static int +vasprintf(char **strp, const char *fmt, va_list args) +{ + va_list args_copy; + int status, needed; + + va_copy(args_copy, args); + needed = vsnprintf(NULL, 0, fmt, args_copy); + va_end(args_copy); + if (needed < 0) { + *strp = NULL; + return needed; + } + *strp = malloc(needed + 1); + if (*strp == NULL) + return -1; + status = vsnprintf(*strp, needed + 1, fmt, args); + if (status >= 0) + return status; + else { + free(*strp); + *strp = NULL; + return status; + } +} +#endif + /* * This method is called with the arguments of asprintf() as parameter. * It handles error checking all instances of asprintf()