Update to bcal-2.1 -- upstream now makes real tarballs

Changelog: https://github.com/jarun/bcal/blob/master/CHANGELOG
This commit is contained in:
bcallah 2018-12-12 16:56:12 +00:00
parent 122f82a42b
commit 5d18f97e60
4 changed files with 24 additions and 26 deletions

View File

@ -1,20 +1,16 @@
# $OpenBSD: Makefile,v 1.2 2018/11/08 04:35:48 bcallah Exp $
# $OpenBSD: Makefile,v 1.3 2018/12/12 16:56:12 bcallah Exp $
# Upstream says 64-bit only.
# https://github.com/jarun/bcal/issues/4
ONLY_FOR_ARCHS = ${LP64_ARCHS}
V = 2.1
COMMENT = storage and general-purpose calculator (Byte CALculator)
DISTNAME = bcal-2.0
DISTNAME = bcal-v${V}
PKGNAME = bcal-${V}
CATEGORIES = math sysutils
# Upstream will have real tarballs beginning next release.
# See: https://github.com/jarun/bcal/issues/20
GH_ACCOUNT = jarun
GH_PROJECT = bcal
GH_COMMIT = 435b5ebc3487af68a66c3037c986dbdf89a254db
#HOMEPAGE = https://github.com/jarun/bcal
HOMEPAGE = https://github.com/jarun/bcal
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
# GPLv3+
@ -22,7 +18,7 @@ PERMIT_PACKAGE_CDROM = Yes
WANTLIB += c curses readline
#MASTER_SITES = https://github.com/jarun/bcal/releases/download/v${V}/
MASTER_SITES = https://github.com/jarun/bcal/releases/download/v${V}/
# Test script is a Python 3 script.
# It is not worth invoking the python MODULE for this.
@ -30,6 +26,8 @@ TEST_DEPENDS = devel/py-test,python3
USE_GMAKE = Yes
WRKDIST = ${WRKDIR}/bcal
# Better install routine
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bcal ${PREFIX}/bin

View File

@ -1,2 +1,2 @@
SHA256 (bcal-2.0-435b5ebc.tar.gz) = jA66vl1C0ZvW+dGTlGDee9NlSaQiYgcfx5c2zOcM4zM=
SIZE (bcal-2.0-435b5ebc.tar.gz) = 33450
SHA256 (bcal-v2.1.tar.gz) = ESTpYvcrCsd7niKpcHzklE8h4Tq2ccBSI5E6bVAnmrU=
SIZE (bcal-v2.1.tar.gz) = 38867

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-bcal_1,v 1.1.1.1 2018/11/08 04:23:43 bcallah Exp $
$OpenBSD: patch-bcal_1,v 1.2 2018/12/12 16:56:12 bcallah Exp $
We use our own bc(1)
@ -12,5 +12,5 @@ Index: bcal.1
-(Byte CALculator) is a command-line utility to help with numerical calculations and expressions involving data storage units, addressing, base conversion etc. It invokes GNU \fBbc\fR for non-storage expressions.
+(Byte CALculator) is a command-line utility to help with numerical calculations and expressions involving data storage units, addressing, base conversion etc. It invokes \fBbc\fR for non-storage expressions.
.PP
.B Features
.PP
\fBbcal\fR follows Ubuntu's standard unit conversion and notation policy:
.br

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_bcal_c,v 1.1.1.1 2018/11/08 04:23:43 bcallah Exp $
$OpenBSD: patch-src_bcal_c,v 1.2 2018/12/12 16:56:12 bcallah Exp $
-q is a GNU bc flag to silence their very verbose startup message
Rename last to prev because bc(1) already has a variable named last
@ -6,7 +6,7 @@ Rename last to prev because bc(1) already has a variable named last
Index: src/bcal.c
--- src/bcal.c.orig
+++ src/bcal.c
@@ -204,7 +204,7 @@ static int try_bc(char *expr)
@@ -205,7 +205,7 @@ static int try_bc(char *expr)
dup2(pipe_cp[1], STDOUT_FILENO); // Give stdout to parent
dup2(pipe_cp[1], STDERR_FILENO); // Give stderr to parent
@ -15,16 +15,16 @@ Index: src/bcal.c
log(ERROR, "execlp() failed!\n");
exit(ret);
}
@@ -213,7 +213,7 @@ static int try_bc(char *expr)
char buffer[128] = "";
ret = write(pipe_pc[1], "scale=10\n", 9);
@@ -216,7 +216,7 @@ static int try_bc(char *expr)
exit(-1);
}
- ret = write(pipe_pc[1], "last=", 5);
+ ret = write(pipe_pc[1], "prev=", 5);
if (lastres.p[0])
ret = write(pipe_pc[1], lastres.p, strlen(lastres.p));
else
@@ -2084,7 +2084,7 @@ int main(int argc, char **argv)
- if (write(pipe_pc[1], "last=", 5) != 5) {
+ if (write(pipe_pc[1], "prev=", 5) != 5) {
log(ERROR, "write(2)! [%s]\n", strerror(errno));
exit(-1);
}
@@ -2137,7 +2137,7 @@ int main(int argc, char **argv)
case 'b':
cfg.bcmode ^= 1;
if (cfg.bcmode) {