From d0af769740b42c059310c215eb86e9068050d8cb Mon Sep 17 00:00:00 2001 From: markus Date: Sun, 16 Feb 2003 14:58:14 +0000 Subject: [PATCH] Extensible formatted print C library; ok lebel@ CVS ---------------------------------------------------------------------- --- devel/libfmt/Makefile | 22 +++++++++++++++++++++ devel/libfmt/distinfo | 3 +++ devel/libfmt/patches/patch-Make_OpenBSD-386 | 12 +++++++++++ devel/libfmt/patches/patch-Makefile | 10 ++++++++++ devel/libfmt/pkg/DESCR | 14 +++++++++++++ devel/libfmt/pkg/PLIST | 5 +++++ 6 files changed, 66 insertions(+) create mode 100644 devel/libfmt/Makefile create mode 100644 devel/libfmt/distinfo create mode 100644 devel/libfmt/patches/patch-Make_OpenBSD-386 create mode 100644 devel/libfmt/patches/patch-Makefile create mode 100644 devel/libfmt/pkg/DESCR create mode 100644 devel/libfmt/pkg/PLIST diff --git a/devel/libfmt/Makefile b/devel/libfmt/Makefile new file mode 100644 index 00000000000..34fea47bbbc --- /dev/null +++ b/devel/libfmt/Makefile @@ -0,0 +1,22 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2003/02/16 14:58:14 markus Exp $ + +COMMENT= "Extensible formatted print C library" + +VERSION= 2.0 +DISTNAME= libfmt-${VERSION} +CATEGORIES= devel plan9 +MASTER_SITES= http://pdos.lcs.mit.edu/~rsc/software/ +HOMEPAGE= http://pdos.lcs.mit.edu/~rsc/software/ +MAINTAINER= Markus Friedl +EXTRACT_SUFX= .tgz + +LIB_DEPENDS= utf::devel/libutf + +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +FAKE_FLAGS= PREFIX=${WRKINST}${PREFIX} + +.include diff --git a/devel/libfmt/distinfo b/devel/libfmt/distinfo new file mode 100644 index 00000000000..4336708c865 --- /dev/null +++ b/devel/libfmt/distinfo @@ -0,0 +1,3 @@ +MD5 (libfmt-2.0.tgz) = 229cba061b369c1f9272cccde17616ff +RMD160 (libfmt-2.0.tgz) = 2fdd0b7687508988323c864192e371c62c26c751 +SHA1 (libfmt-2.0.tgz) = 3ac6675eaa44607c0dc6d11575ba81ac3bf19eba diff --git a/devel/libfmt/patches/patch-Make_OpenBSD-386 b/devel/libfmt/patches/patch-Make_OpenBSD-386 new file mode 100644 index 00000000000..0a43a963072 --- /dev/null +++ b/devel/libfmt/patches/patch-Make_OpenBSD-386 @@ -0,0 +1,12 @@ +$OpenBSD: patch-Make_OpenBSD-386,v 1.1.1.1 2003/02/16 14:58:14 markus Exp $ +--- Make.OpenBSD-386.orig Fri Feb 14 18:43:41 2003 ++++ Make.OpenBSD-386 Fri Feb 14 18:43:41 2003 +@@ -0,0 +1,8 @@ ++CC=gcc ++CFLAGS+=-Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -O2 -g -c -I. -I$(PREFIX)/include ++O=o ++AR=ar ++ARFLAGS=rvc ++NAN=nan64.$O # default, can be overriden by Make.$(SYSNAME) ++NAN=nan64.$O ++RANLIB=ranlib diff --git a/devel/libfmt/patches/patch-Makefile b/devel/libfmt/patches/patch-Makefile new file mode 100644 index 00000000000..a202edf9fd3 --- /dev/null +++ b/devel/libfmt/patches/patch-Makefile @@ -0,0 +1,10 @@ +--- Makefile.orig Thu Feb 13 16:04:39 2003 ++++ Makefile Fri Feb 14 18:40:50 2003 +@@ -83,6 +83,7 @@ test: $(LIB) test.$O + + $(LIB): $(OFILES) + $(AR) $(ARFLAGS) $(LIB) $(OFILES) ++ $(RANLIB) $(LIB) + + NUKEFILES+=$(LIB) + .c.$O: diff --git a/devel/libfmt/pkg/DESCR b/devel/libfmt/pkg/DESCR new file mode 100644 index 00000000000..61a489ee58d --- /dev/null +++ b/devel/libfmt/pkg/DESCR @@ -0,0 +1,14 @@ +Libfmt is a port of Plan 9's formatted print library. +As a base it provides all the syntax of ANSI printf +but adds the ability for client programs to install +new print verbs. One such print verb (installed by +default) is %r, which prints the system error string. +Instead of perror("foo"), you can write fprint(2, "foo: %r\n"). +This is especially nice when you write verbs to format +the data structures used by your particular program. + +WWW: http://pdos.lcs.mit.edu/~rsc/software/#libfmt +http://plan9.bell-labs.com/magic/man2html/2/print + +Russ Cox +rsc@post.harvard.edu diff --git a/devel/libfmt/pkg/PLIST b/devel/libfmt/pkg/PLIST new file mode 100644 index 00000000000..eafe8aad134 --- /dev/null +++ b/devel/libfmt/pkg/PLIST @@ -0,0 +1,5 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2003/02/16 14:58:14 markus Exp $ +include/fmt.h +lib/libfmt.a +man/man3/fmtinstall.3 +man/man3/print.3