Files
Leon Anavi 2cc8afea83 bitwise: Upgrade 0.50 -> 0.70
Upgrade to release 0.70:

- this release changes how &, ^ and | bind against each other. If
  you have expressions that mix them without parentheses, check
  them: 3 ^ 1 & 2 now gives 3, the same as a C compiler, where
  earlier releases gave 2.

Enhancements:

- Unary plus and minus in expressions: -5, 5 * -2 and 10 - -2
  evaluate instead of being rejected. On the command line, separate
  a leading minus with --: bitwise -- '-5'
- README documents the operators that actually exist, with their
  precedence, and which C operators are not supported
- Added CONTRIBUTING.md, and filled in ChangeLog, NEWS and AUTHORS

Bug Fixes:

- &, ^ and | now have the C precedence order, where & and ^ used to
  share a level
- Numbers that don't parse cleanly are now refused instead of
  guessing: 12a used to evaluate as 12, a bare 0x or 0b as 0, and a
  literal past UINT64_MAX as UINT64_MAX
- Shifts and BIT() at or past the width of the value give 0, instead
  of an answer computed from a masked shift count: 1 << 64 used to
  be 1, and 1 << 200 used to be 256
- Fixed a stack buffer overflow on tokens longer than 64 characters,
  reachable from both the command line and the : prompt
- Radix64 output now matches the system l64a(); a fallback shim was
  overriding libc and printing a different alphabet
- Parse errors no longer corrupt the curses display
- Fixed the ASCII line of the conversion output on big-endian hosts

Build and testing:

- make distcheck works; VPATH builds could not find the headers in
  inc/ at all
- -Wall -Wextra are on by default, and --enable-asan, --enable-ubsan
  and --enable-fuzzer join the existing options
- Tests for number parsing, shift edges and long tokens, plus a
  libFuzzer harness over the expression parser
- CI builds on Linux, macOS and Windows/msys2, and runs distcheck,
  the sanitizers and a bounded fuzzing run on every push

Drop 0001-makefile.am-Fix-build-when-build-dir-is-not-same-as-.patch
because v0.70 Makefile.am already includes a similar fix to put
$(top_srcdir)/inc on the include path from git commit f4b9fa1.

Fix Big-endian and Little-endian output in ptest.out.expected.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-09-11 07:44:21 -07:00

33 lines
1.0 KiB
BlitzBasic

SUMMARY = "Bitwise terminal calculator"
DESCRIPTION = "Bitwise is multi base interactive calculator \
supporting dynamic base conversion and bit manipulation.\
It's a handy tool for low level hackers, \
kernel developers and device drivers developers."
HOMEPAGE = "https://github.com/mellowcandle/bitwise"
SECTION = "console/utils"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
SRC_URI = "https://github.com/mellowcandle/bitwise/releases/download/v${PV}/bitwise-v${PV}.tar.gz \
file://run-ptest \
file://ptest.out.expected \
"
SRC_URI[sha256sum] = "b8f41f49b9b73ac3abb1e7533a410504f759673fc6e7f35acf56fc82e39cdf37"
UPSTREAM_CHECK_URI = "https://github.com/mellowcandle/bitwise/releases"
UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+(\.\d+)+)"
S = "${UNPACKDIR}/${BPN}-v${PV}"
DEPENDS = "ncurses readline"
inherit autotools ptest
do_install_ptest() {
install -d ${D}${PTEST_PATH}
install -m 0644 ${UNPACKDIR}/ptest.out.expected ${D}${PTEST_PATH}/ptest.out.expected
}