mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-06 15:13:51 +02:00
d2: update to 0.1.1.
This commit is contained in:
parent
11b870a415
commit
058c2254a0
2 changed files with 2 additions and 63 deletions
|
@ -1,61 +0,0 @@
|
|||
Adjusted to apply on v0.1.0 instead of master
|
||||
Merged in d2 with 3c6039b
|
||||
|
||||
commit 78e81a854528abb33737ed81ed9a90d7aff3f16e
|
||||
Author: Toyam Cox <Vaelatern@voidlinux.org>
|
||||
Date: Tue Dec 6 19:51:41 2022 -0500
|
||||
|
||||
fix builds on 32bit systems
|
||||
|
||||
@alixander says: This is the highest number we go to:
|
||||
|
||||
```
|
||||
d2/lib/imgbundler/imgbundler.go
|
||||
Line 25 in 3f62eed
|
||||
const maxImageSize int64 = 1 << 25 // 33_554_432
|
||||
```
|
||||
|
||||
This is several shy of 64 bits, and even shy of 32 bits, so let's just
|
||||
choose 32 bits.
|
||||
|
||||
diff --git a/d2layouts/d2sequence/sequence_diagram.go b/d2layouts/d2sequence/sequence_diagram.go
|
||||
index 03abf99..7af45f2 100644
|
||||
--- a/d2layouts/d2sequence/sequence_diagram.go
|
||||
+++ b/d2layouts/d2sequence/sequence_diagram.go
|
||||
@@ -43,7 +43,7 @@ type sequenceDiagram struct {
|
||||
}
|
||||
|
||||
func getObjEarliestLineNum(o *d2graph.Object) int {
|
||||
- min := int(math.MaxInt64)
|
||||
+ min := int(math.MaxInt32)
|
||||
for _, ref := range o.References {
|
||||
if ref.MapKey == nil {
|
||||
continue
|
||||
@@ -54,7 +54,7 @@ func getObjEarliestLineNum(o *d2graph.Object) int {
|
||||
}
|
||||
|
||||
func getEdgeEarliestLineNum(e *d2graph.Edge) int {
|
||||
- min := int(math.MaxInt64)
|
||||
+ min := int(math.MaxInt32)
|
||||
for _, ref := range e.References {
|
||||
if ref.MapKey == nil {
|
||||
continue
|
||||
diff --git a/d2target/d2target.go b/d2target/d2target.go
|
||||
index bc312ca..49082a4 100644
|
||||
--- a/d2target/d2target.go
|
||||
+++ b/d2target/d2target.go
|
||||
@@ -44,10 +44,10 @@ func (diagram Diagram) HashID() (string, error) {
|
||||
}
|
||||
|
||||
func (diagram Diagram) BoundingBox() (topLeft, bottomRight Point) {
|
||||
- x1 := int(math.MaxInt64)
|
||||
- y1 := int(math.MaxInt64)
|
||||
- x2 := int(-math.MaxInt64)
|
||||
- y2 := int(-math.MaxInt64)
|
||||
+ x1 := int(math.MaxInt32)
|
||||
+ y1 := int(math.MaxInt32)
|
||||
+ x2 := int(math.MinInt32)
|
||||
+ y2 := int(math.MinInt32)
|
||||
|
||||
for _, targetShape := range diagram.Shapes {
|
||||
x1 = go2.Min(x1, targetShape.Pos.X)
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'd2'
|
||||
pkgname=d2
|
||||
version=0.1.0
|
||||
version=0.1.1
|
||||
revision=1
|
||||
build_style=go
|
||||
go_import_path="oss.terrastruct.com/d2"
|
||||
|
@ -10,4 +10,4 @@ maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
|
|||
license="MPL-2.0"
|
||||
homepage="https://d2lang.com/"
|
||||
distfiles="https://github.com/terrastruct/d2/archive/refs/tags/v${version}.tar.gz"
|
||||
checksum=78fac0235fd583e28d961b0fd066994095a9cec4d5a834747833bbab042ab1c0
|
||||
checksum=dc94c802937d54dc3646de92b7e39b837c8be116ec8a60c55d2f53ba0eab98d4
|
||||
|
|
Loading…
Add table
Reference in a new issue