diff options
| author | Stefan Eßer <se@FreeBSD.org> | 2025-09-11 16:16:39 +0200 |
|---|---|---|
| committer | Stefan Eßer <se@FreeBSD.org> | 2025-09-17 18:25:56 +0200 |
| commit | 4c178fe36e01f84f3c65f6953cbe8dbe5b3fc908 (patch) | |
| tree | 90bca8b9ca2005a937a7c3524835dd54aada6f60 /usr.bin | |
| parent | 0caba70938712aab819b6a8761f366ce804b3b22 (diff) | |
contrib/bc upgrade to version 7.1.0
This update fixes a few bugs:
- Improper response to double SIGINT with editline.
- Not letting libedit handle terminal size changes.
- A dc crash from improperly handling an error.
- A duplicate check for reference arrays.
- Build failures with GCC 15.
Merge commit '682da5a0fdb2c38ecc3951047a882471d62aa1d1'
(cherry picked from commit fdc4a7c8012b214986cfa2e2fb6d99731f004b1b)
usr.bin/gh-bc: fix invocation of test scripts
The “all.sh” script in version 7.1.0 accepts one less parameter for
selecting the tests to be run.
(cherry picked from commit 1a6ffcb27ddcfdc66c2ea58d6789b3d527f68ba9)
usr.bin/gh-bc: update for version 7.1.0
Add extra defines required for bc-7.1.0 to the Makefiles.
(cherry picked from commit 2d06844521ecd9e1298b53f13c18ffbfa97b1e28)
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/gh-bc/Makefile | 6 | ||||
| -rw-r--r-- | usr.bin/gh-bc/tests/Makefile | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/usr.bin/gh-bc/Makefile b/usr.bin/gh-bc/Makefile index 0fdc687c0e50..9aa5116f6faa 100644 --- a/usr.bin/gh-bc/Makefile +++ b/usr.bin/gh-bc/Makefile @@ -4,6 +4,7 @@ PROG= gh-bc PROGNAME= bc BCDIR= ${SRCTOP}/contrib/${PROGNAME} +VERSION!= cat ${SRCTOP}/contrib/${PROGNAME}/VERSION.txt SRCS= args.c bc.c bc_lex.c bc_parse.c data.c dc.c dc_lex.c dc_parse.c file.c history.c SRCS+= lang.c lex.c main.c num.c opt.c parse.c program.c rand.c read.c vector.c vm.c @@ -31,6 +32,8 @@ CATALOGS+= zh_CN.UTF-8 zh_CN.eucCN zh_CN.GB18030 zh_CN.GB2312 zh_CN.GBK NLSNAME= bc NLSSRCDIR= ${BCDIR}/locales +CFLAGS+= -I${BCDIR}/include + CFLAGS+= -DBC_DEFAULT_BANNER=0 CFLAGS+= -DBC_DEFAULT_DIGIT_CLAMP=0 CFLAGS+= -DBC_DEFAULT_EXPR_EXIT=1 @@ -57,7 +60,8 @@ CFLAGS+= -DBUILD_TYPE=A CFLAGS+= -DMAINEXEC=${PROGNAME} CFLAGS+= -DNDEBUG CFLAGS+= -DNLSPATH=/usr/share/nls/%L/%N.cat -CFLAGS+= -I${BCDIR}/include + +CFLAGS+= -DVERSION=${VERSION} # prevent floating point incompatibilities caused by -flto on some architectures .if ${MACHINE_ARCH} != riscv64 diff --git a/usr.bin/gh-bc/tests/Makefile b/usr.bin/gh-bc/tests/Makefile index 464ae4b5d3c3..f2c92aecb0a5 100644 --- a/usr.bin/gh-bc/tests/Makefile +++ b/usr.bin/gh-bc/tests/Makefile @@ -17,7 +17,8 @@ FILESfMODE= 0755 FILESGROUPS+= FILEStests FILEStestsPACKAGE= ${PACKAGE} FILEStestsDIR= ${TESTSDIR}/tests -FILEStests!= echo ${TEST_DIR}/tests/*.py ${TEST_DIR}/tests/*.sh ${TEST_DIR}/tests/*.txt +FILEStests!= echo ${TEST_DIR}/tests/*.py ${TEST_DIR}/tests/*.sed \ + ${TEST_DIR}/tests/*.sh ${TEST_DIR}/tests/*.txt FILEStestsMODE= 0755 FILESGROUPS+= FILESbc @@ -56,10 +57,12 @@ PLAIN_TESTS_SH= bc_tests dc_tests bc_tests.sh: echo "#!/bin/sh" > ${.TARGET} - echo "env LANG=C ${TESTSDIR}/tests/all.sh bc 1 1 0 0 0 bc" >> ${.TARGET} + echo 'env LANG=C BC_TEST_OUTPUT_DIR=$$(pwd) \ + ${TESTSDIR}/tests/all.sh -n bc 1 1 0 0 bc' >> ${.TARGET} dc_tests.sh: echo "#!/bin/sh" > ${.TARGET} - echo "env LANG=C ${TESTSDIR}/tests/all.sh dc 1 1 0 0 0 dc" >> ${.TARGET} + echo "env LANG=C BC_TEST_OUTPUT_DIR=\$pwd \ + ${TESTSDIR}/tests/all.sh -n dc 1 1 0 0 dc" >> ${.TARGET} .include <bsd.test.mk> |
