blob: fa155a6b45211261a0fdcc78a84d9fc79d9d0554 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
PORTNAME= calc
PORTVERSION= 2.14.1.0
DISTVERSIONPREFIX= v
CATEGORIES= math
MAINTAINER= adamw@FreeBSD.org
COMMENT= Interactive CLI arbitrary-precision calculator
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING-LGPL
USES= gmake tar:bzip2 readline
USE_GITHUB= yes
GH_ACCOUNT= lcn2
CONFLICTS_INSTALL= schilyutils # bin/calc
MAKE_JOBS_UNSAFE= yes
PLIST_SUB+= VERSION=${PORTVERSION}
MAKE_ARGS= DATADIR="${DATADIR}"
TEST_TARGET= check
OPTIONS_DEFINE= FULL HELP
OPTIONS_DEFAULT=FULL HELP
OPTIONS_SUB= yes
FULL_DESC= Install all funcs/scripts/headers (OFF: just basic calculator)
HELP_DESC= Install calc help files
# We use Makefile.freebsd because Makefile.local is in .gitignore
post-extract:
${SED} -e 's|%%CC%%|${CC}|; s|%%CFLAGS%%|${CFLAGS}|;' \
${FILESDIR}/Makefile.freebsd > ${WRKSRC}/Makefile.local
# The upstream Makefiles are a mess. Bash is hardcoded in many files, and only
# some of the Makefiles allow overrides. Plus, they error out if sed .bkp files exist.
${FIND} ${WRKSRC} -name 'Makefile*' \
| ${XARGS} ${REINPLACE_CMD} -i '' -e 's|/bin/bash|${SH}|'
post-install:
cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} bin/calc lib/lib*.so
.include <bsd.port.mk>
|