aboutsummaryrefslogtreecommitdiffstats
path: root/converters/ascii2binary
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2006-01-31 07:25:17 +0800
committerthierry <thierry@FreeBSD.org>2006-01-31 07:25:17 +0800
commit880dae9b5ecdb9035fb976b06ea3426259195592 (patch)
tree5060fb5e7563119a0cecc22eb3a442e75aa24577 /converters/ascii2binary
parent851fe01f3c02de8b97b480871b0c789c5b35e733 (diff)
downloadfreebsd-ports-gnome-880dae9b5ecdb9035fb976b06ea3426259195592.tar.gz
freebsd-ports-gnome-880dae9b5ecdb9035fb976b06ea3426259195592.tar.zst
freebsd-ports-gnome-880dae9b5ecdb9035fb976b06ea3426259195592.zip
ascii2binary and binary2ascii convert between textual and binary
representations of numbers. The two programs are useful for generating test data, for inspecting binary files, and for interfacing programs that generate textual output to programs that require binary input and conversely. They can also be useful when it is desired to reformat numbers. WWW: http://billposer.org/Software/a2b.html
Diffstat (limited to 'converters/ascii2binary')
-rw-r--r--converters/ascii2binary/Makefile48
-rw-r--r--converters/ascii2binary/distinfo3
-rw-r--r--converters/ascii2binary/files/patch-Makefile49
-rw-r--r--converters/ascii2binary/pkg-descr20
4 files changed, 120 insertions, 0 deletions
diff --git a/converters/ascii2binary/Makefile b/converters/ascii2binary/Makefile
new file mode 100644
index 000000000000..66ff43f3a6a9
--- /dev/null
+++ b/converters/ascii2binary/Makefile
@@ -0,0 +1,48 @@
+# New ports collection makefile for: ascii2binary
+# Date created: Sun 29 January 2006
+# Whom: thierry@pompo.net
+#
+# $FreeBSD$
+#
+
+PORTNAME= ascii2binary
+PORTVERSION= 2.8.1
+CATEGORIES= converters
+MASTER_SITES= http://billposer.org/Software/Downloads/
+DISTNAME= ${PORTNAME}
+EXTRACT_SUFX= .tgz
+DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
+
+MAINTAINER= thierry@FreeBSD.org
+COMMENT= Convert between textual representations of numbers and binary
+
+HAS_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
+ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
+ LIBS="-lintl"
+MAKE_ENV= CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
+ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
+ LIBS="-lintl"
+USE_GETTEXT= yes
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}
+
+PLIST_FILES= bin/ascii2binary bin/binary2ascii \
+ %%NLS%%share/locale/fr/LC_MESSAGES/ascii2binary.mo
+
+MAN1= ascii2binary.1 binary2ascii.1
+
+.if defined(WITHOUT_NLS)
+PLIST_SUB= NLS="@comment "
+.else
+PLIST_SUB= NLS=""
+.endif
+
+pre-configure:
+.if defined(WITHOUT_NLS)
+ ${REINPLACE_CMD} -e 's|cp -r locale|#cp -r locale|' ${WRKSRC}/Makefile
+.endif
+
+post-install:
+ @${FIND} ${PREFIX}/share/locale -name ascii2binary.po -delete
+
+.include <bsd.port.mk>
diff --git a/converters/ascii2binary/distinfo b/converters/ascii2binary/distinfo
new file mode 100644
index 000000000000..3e06686236b4
--- /dev/null
+++ b/converters/ascii2binary/distinfo
@@ -0,0 +1,3 @@
+MD5 (ascii2binary-2.8.1/ascii2binary.tgz) = f15f907641203950213f48a43e2d4f45
+SHA256 (ascii2binary-2.8.1/ascii2binary.tgz) = e50c61237fb0c42859d40155ac37c4a93eb6ca053c0c6df6c74d24704af98a59
+SIZE (ascii2binary-2.8.1/ascii2binary.tgz) = 61894
diff --git a/converters/ascii2binary/files/patch-Makefile b/converters/ascii2binary/files/patch-Makefile
new file mode 100644
index 000000000000..ef22206e6959
--- /dev/null
+++ b/converters/ascii2binary/files/patch-Makefile
@@ -0,0 +1,49 @@
+--- Makefile.orig Mon Sep 12 19:35:10 2005
++++ Makefile Mon Jan 30 00:09:11 2006
+@@ -1,28 +1,27 @@
+-CC=gcc
+-BINDIR=/usr/local/bin
+-MANDIR=/usr/local/man/man1
++BINDIR=${PREFIX}/bin
++MANDIR=${PREFIX}/man/man1
+ BINS= ascii2binary binary2ascii
+ MANS= ascii2binary.1 binary2ascii.1
+-LOCALEDIR=/usr/local/share/locale
+-CFLAGS= -DPACKAGE=\"ascii2binary\" -DLOCALEDIR=\"${LOCALEDIR}\"
++LOCALEDIR=${PREFIX}/share/locale
++CFLAGS= ${CPPFLAGS} -DPACKAGE=\"ascii2binary\" -DLOCALEDIR=\"${LOCALEDIR}\"
+ all: ${BINS} mo
+ #CFLAGS= -DPACKAGE=\"ascii2binary\" -DLOCALEDIR=\"${LOCALEDIR}\"
+ #all: ${BINS}
+
+ ascii2binary: ascii2binary.o GetWord.o MachineInfo.o endian.o exitcodes.o
+- ${CC} -o ascii2binary ascii2binary.o GetWord.o MachineInfo.o endian.o exitcodes.o
++ ${CC} ${LDFLAGS} -o ascii2binary ascii2binary.o GetWord.o MachineInfo.o endian.o exitcodes.o ${LIBS}
+
+ binary2ascii: binary2ascii.o binfmt.o MachineInfo.o endian.o exitcodes.o
+- ${CC} -o binary2ascii binary2ascii.o binfmt.o MachineInfo.o endian.o exitcodes.o
++ ${CC} ${LDFLAGS} -o binary2ascii binary2ascii.o binfmt.o MachineInfo.o endian.o exitcodes.o ${LIBS}
+
+ MachineInfo.o: MachineInfo.c
+- ${CC} -c MachineInfo.c
++ ${CC} -c ${CFLAGS} MachineInfo.c
+
+ GetWord.o: GetWord.c
+- ${CC} -c GetWord.c
++ ${CC} -c ${CFLAGS} GetWord.c
+
+ binfmt.o: binfmt.c
+- ${CC} -c binfmt.c
++ ${CC} -c ${CFLAGS} binfmt.c
+
+ exitcodes.o: exitcodes.c
+ ${CC} -c ${CFLAGS} exitcodes.c
+@@ -33,7 +32,7 @@
+ binary2ascii.o: binary2ascii.c
+ ${CC} ${CFLAGS} -c binary2ascii.c
+
+-mo:
++mo:
+ (cd locale/fr/LC_MESSAGES; make ascii2binary.mo)
+
+ install: ${BINS} ${MANS}
diff --git a/converters/ascii2binary/pkg-descr b/converters/ascii2binary/pkg-descr
new file mode 100644
index 000000000000..94fd043bc239
--- /dev/null
+++ b/converters/ascii2binary/pkg-descr
@@ -0,0 +1,20 @@
+These programs convert between textual and binary representations of numbers.
+ascii2binary reads input consisting of textual representations of numbers
+separated by whitespace and produces as output the binary equivalents. The type
+and precision of the binary output is selected using command line flags.
+
+binary2ascii reads input consisting of binary numbers and converts them to
+their textual representation. Command line flags specify the type and size
+of the binary numbers and provide control over the format of the output.
+Unsigned integers may be written out in binary, octal, decimal, or hexadecimal.
+Signed integers may be written out only in binary or decimal. Floating point
+numbers may be written out only decimal, either in standard or scientific
+notation. (If you want to examine the binary representation of floating point
+numbers, just treat the input as a sequence of unsigned characters.)
+
+The two programs are useful for generating test data, for inspecting binary
+files, and for interfacing programs that generate textual output to programs
+that require binary input and conversely. They can also be useful when it is
+desired to reformat numbers.
+
+WWW: http://billposer.org/Software/a2b.html