diff options
author | leot <leot@pkgsrc.org> | 2018-12-15 17:25:15 +0000 |
---|---|---|
committer | leot <leot@pkgsrc.org> | 2018-12-15 17:25:15 +0000 |
commit | d37bea1758e348ce7bb416bc33142b1c79e1083a (patch) | |
tree | 68ea27d4c94b44842673ec2e0d056b102918ba93 | |
parent | 70c7baa8aa313af68b6226a35a9cfba546b40991 (diff) | |
download | pkgsrc-d37bea1758e348ce7bb416bc33142b1c79e1083a.tar.gz |
bcal: Import bcal-2.1 as math/bcal
bcal (Byte CALculator) is a REPL CLI utility for storage expressions,
unit conversions or address calculations. If you can't calculate the
hex address offset for (512 - 16) MiB, or the value when the 43rd bit
of a 64-bit address is set mentally, bcal is for you.
It has a bc(1) mode for general-purpose numerical calculations.
Only 64-bit operating systems are supported.
Packaged by Sijmen J. Mulder in pkgsrc-wip, thanks!
-rw-r--r-- | math/bcal/DESCR | 8 | ||||
-rw-r--r-- | math/bcal/Makefile | 20 | ||||
-rw-r--r-- | math/bcal/PLIST | 4 | ||||
-rw-r--r-- | math/bcal/distinfo | 7 | ||||
-rw-r--r-- | math/bcal/patches/patch-Makefile | 32 |
5 files changed, 71 insertions, 0 deletions
diff --git a/math/bcal/DESCR b/math/bcal/DESCR new file mode 100644 index 00000000000..f7ad3b5017b --- /dev/null +++ b/math/bcal/DESCR @@ -0,0 +1,8 @@ +bcal (Byte CALculator) is a REPL CLI utility for storage expressions, +unit conversions or address calculations. If you can't calculate the +hex address offset for (512 - 16) MiB, or the value when the 43rd bit +of a 64-bit address is set mentally, bcal is for you. + +It has a bc(1) mode for general-purpose numerical calculations. + +Only 64-bit operating systems are supported. diff --git a/math/bcal/Makefile b/math/bcal/Makefile new file mode 100644 index 00000000000..fe2bbfc7064 --- /dev/null +++ b/math/bcal/Makefile @@ -0,0 +1,20 @@ +# $NetBSD: Makefile,v 1.1 2018/12/15 17:25:15 leot Exp $ + +DISTNAME= bcal-2.1 +CATEGORIES= math +MASTER_SITES= ${MASTER_SITE_GITHUB:=jarun/} +GITHUB_TAG= v${PKGVERSION_NOREV} + +MAINTAINER= ik@sjmulder.nl +HOMEPAGE= https://github.com/jarun/bcal/ +COMMENT= Storage and general-purpose calculator +LICENSE= gnu-gpl-v3 + +USE_TOOLS+= gmake + +DEPENDS+= bc-[0-9]*:../../math/bc + +MAKE_FLAGS+= MANDIR=${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 + +.include "../../mk/readline.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/math/bcal/PLIST b/math/bcal/PLIST new file mode 100644 index 00000000000..f9a18fdc489 --- /dev/null +++ b/math/bcal/PLIST @@ -0,0 +1,4 @@ +@comment $NetBSD: PLIST,v 1.1 2018/12/15 17:25:15 leot Exp $ +bin/bcal +man/man1/bcal.1 +share/doc/bcal/README.md diff --git a/math/bcal/distinfo b/math/bcal/distinfo new file mode 100644 index 00000000000..68905af91dd --- /dev/null +++ b/math/bcal/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2018/12/15 17:25:15 leot Exp $ + +SHA1 (bcal-2.1.tar.gz) = 7d2740ee9abd18370449b4b3e46b8ecac77d7072 +RMD160 (bcal-2.1.tar.gz) = ad91e17d1dd2cf86c670929495eefc0b9cd3e468 +SHA512 (bcal-2.1.tar.gz) = 38965b0f27289e283ed9193c14cd962ec29ed401e8d60e7f012098cb62dacd357d8eac6a5e29f001c0ecf9541fdb55166b0ed2b2ac5c6bc98622244249cff03d +Size (bcal-2.1.tar.gz) = 34175 bytes +SHA1 (patch-Makefile) = 10df94f072e4d08e73458f690ec8df1cce356320 diff --git a/math/bcal/patches/patch-Makefile b/math/bcal/patches/patch-Makefile new file mode 100644 index 00000000000..fc47a45a29a --- /dev/null +++ b/math/bcal/patches/patch-Makefile @@ -0,0 +1,32 @@ +$NetBSD: patch-Makefile,v 1.1 2018/12/15 17:25:15 leot Exp $ + + - Respect LDFLAGS + - Respect existing LDLIBS + - Remove default -O3 + +--- Makefile ++++ Makefile +@@ -4,20 +4,19 @@ MANDIR = $(DESTDIR)$(PREFIX)/share/man/man1 + DOCDIR = $(DESTDIR)$(PREFIX)/share/doc/bcal + STRIP ?= strip + +-CFLAGS ?= -O3 + CFLAGS += -Wall -Wextra -Wno-unused-parameter -Werror +-LDLIBS = -lreadline ++LDLIBS += -lreadline + + SRC = $(wildcard src/*.c) + INCLUDE = -Iinc + + bcal: $(SRC) +- $(CC) $(CFLAGS) $(INCLUDE) -o bcal $(SRC) $(LDLIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDE) -o bcal $(SRC) $(LDLIBS) + + all: bcal + + x86: $(SRC) +- $(CC) -m64 $(CFLAGS) $(INCLUDE) -o bcal $(SRC) $(LDLIBS) ++ $(CC) -m64 $(CFLAGS) $(LDFLAGS) $(INCLUDE) -o bcal $(SRC) $(LDLIBS) + strip bcal + + distclean: clean |