d2: update to 0.4.1.

This commit is contained in:
icp 2023-03-20 01:44:56 +05:30 committed by Andrew Benson
parent 69b49ab6a0
commit f98c905e8b
2 changed files with 4 additions and 38 deletions

View file

@ -1,35 +0,0 @@
The value of MAGIC_CHECKSUM_ADJUSTMENT overflows a signed integer on 32-bit
architectures and is always used as an unsigned value anyway, so just define it
as unsigned from the beginning.
--- a/lib/font/font.go
+++ b/lib/font/font.go
@@ -49,8 +49,8 @@
WOFF_ENTRY_OFFSET_CHECKSUM = 16
// magic
- MAGIC_WOFF = 0x774f4646
- MAGIC_CHECKSUM_ADJUSTMENT = 0xb1b0afba
+ MAGIC_WOFF uint32 = 0x774f4646
+ MAGIC_CHECKSUM_ADJUSTMENT uint32 = 0xb1b0afba
// sizes
SIZE_OF_WOFF_HEADER = 44
@@ -85,7 +85,7 @@
numTables := binary.BigEndian.Uint16(fontBuf[4:])
woffHeader := make([]byte, SIZE_OF_WOFF_HEADER)
- binary.BigEndian.PutUint32(woffHeader[WOFF_OFFSET_MAGIC:], uint32(MAGIC_WOFF))
+ binary.BigEndian.PutUint32(woffHeader[WOFF_OFFSET_MAGIC:], MAGIC_WOFF)
binary.BigEndian.PutUint16(woffHeader[WOFF_OFFSET_NUM_TABLES:], numTables)
binary.BigEndian.PutUint16(woffHeader[WOFF_OFFSET_SFNT_SIZE:], 0)
binary.BigEndian.PutUint32(woffHeader[WOFF_OFFSET_META_OFFSET:], 0)
@@ -148,7 +148,7 @@
csum += tableEntry.CheckSum
}
- var checksumAdjustment = uint32(MAGIC_CHECKSUM_ADJUSTMENT) - csum
+ var checksumAdjustment = MAGIC_CHECKSUM_ADJUSTMENT - csum
majorVersion := uint16(0)
minVersion := uint16(1)

View file

@ -1,13 +1,14 @@
# Template file for 'd2'
pkgname=d2
version=0.3.0
revision=3
version=0.4.1
revision=1
build_style=go
go_import_path="oss.terrastruct.com/d2"
go_ldflags="-X ${go_import_path}/lib/version.Version=${version}"
short_desc="Modern diagram scripting language that turns text to diagrams"
maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
license="MPL-2.0"
homepage="https://d2lang.com/"
changelog="https://d2lang.com/releases/intro/"
distfiles="https://github.com/terrastruct/d2/archive/refs/tags/v${version}.tar.gz"
checksum=28901237ad0c16b49c62a89c6246dfd38dd245e530d25fc74dca1fe2e3b9348f
checksum=abfc926a7dbb090c73012c8bf37558a8ae49d5c6045211b50a3386d8cd60b8dd