Github messages for voidlinux
 help / color / mirror / Atom feed
From: Vaelatern <Vaelatern@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: d2-0.1.0
Date: Wed, 07 Dec 2022 17:27:30 +0100	[thread overview]
Message-ID: <20221207162730.OneeHBgr0wfdj-5WQB-T_g9mPRTtUwjIwNW7Y4dmJCA@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40716@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

There is an updated pull request by Vaelatern against master on the void-packages repository

https://github.com/Vaelatern/void-packages d2
https://github.com/void-linux/void-packages/pull/40716

New package: d2-0.1.0
here for musl fix

A patch file from https://github.com/void-linux/void-packages/pull/40716.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-d2-40716.patch --]
[-- Type: text/x-diff, Size: 3170 bytes --]

From 3e28030283176acda8b6b799def631acf80e92c8 Mon Sep 17 00:00:00 2001
From: Toyam Cox <Vaelatern@voidlinux.org>
Date: Wed, 23 Nov 2022 21:13:44 -0500
Subject: [PATCH] New package: d2-0.1.0

---
 srcpkgs/d2/patches/64bit-int.patch | 57 ++++++++++++++++++++++++++++++
 srcpkgs/d2/template                | 13 +++++++
 2 files changed, 70 insertions(+)
 create mode 100644 srcpkgs/d2/patches/64bit-int.patch
 create mode 100644 srcpkgs/d2/template

diff --git a/srcpkgs/d2/patches/64bit-int.patch b/srcpkgs/d2/patches/64bit-int.patch
new file mode 100644
index 000000000000..11cda3fa401a
--- /dev/null
+++ b/srcpkgs/d2/patches/64bit-int.patch
@@ -0,0 +1,57 @@
+This was merged into master on d2
+
+ commit 0345f3e975fdad9e9fb16ff4e699bf0319e43294
+ 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 ded6812..41dc4c7 100644
+--- a/d2target/d2target.go
++++ b/d2target/d2target.go
+@@ -47,10 +47,10 @@ 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)
diff --git a/srcpkgs/d2/template b/srcpkgs/d2/template
new file mode 100644
index 000000000000..284ef3b0f2ae
--- /dev/null
+++ b/srcpkgs/d2/template
@@ -0,0 +1,13 @@
+# Template file for 'd2'
+pkgname=d2
+version=0.1.0
+revision=1
+build_style=go
+go_import_path="oss.terrastruct.com/d2"
+go_package="oss.terrastruct.com/d2 oss.terrastruct.com/d2/cmd/d2plugin-dagre"
+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/"
+distfiles="https://github.com/terrastruct/d2/archive/refs/tags/v${version}.tar.gz"
+checksum=78fac0235fd583e28d961b0fd066994095a9cec4d5a834747833bbab042ab1c0

  parent reply	other threads:[~2022-12-07 16:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  2:14 [PR PATCH] New package: d2-0.0.13 Vaelatern
2022-11-24  2:15 ` [PR PATCH] [Updated] " Vaelatern
2022-11-27  0:50 ` Vaelatern
2022-12-05  4:17 ` Vaelatern
2022-12-06 18:54 ` [PR PATCH] [Updated] " Vaelatern
2022-12-06 22:06 ` Vaelatern
2022-12-07  0:52 ` Vaelatern
2022-12-07  0:54 ` Vaelatern
2022-12-07 16:25 ` [PR PATCH] [Updated] New package: d2-0.1.0 Vaelatern
2022-12-07 16:27 ` Vaelatern [this message]
2022-12-07 16:31 ` Vaelatern
2022-12-07 16:35 ` [PR PATCH] [Closed]: " Vaelatern
2022-12-07 16:35 ` [PR PATCH] [Updated] " Vaelatern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221207162730.OneeHBgr0wfdj-5WQB-T_g9mPRTtUwjIwNW7Y4dmJCA@z \
    --to=vaelatern@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).