pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/cad/py-PyRTL



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Sat Dec 27 16:31:09 UTC 2025

Modified Files:
        pkgsrc/cad/py-PyRTL: Makefile distinfo
Added Files:
        pkgsrc/cad/py-PyRTL/patches: patch-pyrtl_simulation.py

Log Message:
cad/py-PyRTL: Fix the error from render_trace() on Jupyter

* Do not fail with 'Javascript Error: $ is not defined'.
* Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/cad/py-PyRTL/Makefile
cvs rdiff -u -r1.12 -r1.13 pkgsrc/cad/py-PyRTL/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/cad/py-PyRTL/patches/patch-pyrtl_simulation.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/cad/py-PyRTL/Makefile
diff -u pkgsrc/cad/py-PyRTL/Makefile:1.13 pkgsrc/cad/py-PyRTL/Makefile:1.14
--- pkgsrc/cad/py-PyRTL/Makefile:1.13   Sun Aug  3 15:39:41 2025
+++ pkgsrc/cad/py-PyRTL/Makefile        Sat Dec 27 16:31:08 2025
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.13 2025/08/03 15:39:41 ryoon Exp $
+# $NetBSD: Makefile,v 1.14 2025/12/27 16:31:08 ryoon Exp $
 
 DISTNAME=      pyrtl-${PKGVERSION_NOREV}
 PKGNAME=       ${PYPKGPREFIX}-PyRTL-0.12
+PKGREVISION=   1
 CATEGORIES=    cad python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pyrtl/}
 
@@ -18,6 +19,9 @@ DEPENDS+=     ${PYPKGPREFIX}-six-[0-9]*:../.
 
 USE_LANGUAGES= c # for test
 
+pre-configure:
+       cd ${WRKSRC} && ${RM} pyrtl/*.orig
+
 # for tests
 .include "../../lang/python/tool.mk"
 .include "../../lang/python/wheel.mk"

Index: pkgsrc/cad/py-PyRTL/distinfo
diff -u pkgsrc/cad/py-PyRTL/distinfo:1.12 pkgsrc/cad/py-PyRTL/distinfo:1.13
--- pkgsrc/cad/py-PyRTL/distinfo:1.12   Sun Aug  3 15:39:41 2025
+++ pkgsrc/cad/py-PyRTL/distinfo        Sat Dec 27 16:31:08 2025
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.12 2025/08/03 15:39:41 ryoon Exp $
+$NetBSD: distinfo,v 1.13 2025/12/27 16:31:08 ryoon Exp $
 
 BLAKE2s (pyrtl-0.12.tar.gz) = 415a713723876ba4eabaef5fd5bf1c1866aaf2e45bab60a5faa33753c14f1f9c
 SHA512 (pyrtl-0.12.tar.gz) = d01a804dd957ed29a7cdb84773a871a70caffc6c519b21a6f094f97b923768767097ffab7834526e2e5c13c1106c440b41663622f1db12d27c5854899a17ea71
 Size (pyrtl-0.12.tar.gz) = 527009 bytes
+SHA1 (patch-pyrtl_simulation.py) = a373aa6fabe15900bda6abee34923103a975c6f5

Added files:

Index: pkgsrc/cad/py-PyRTL/patches/patch-pyrtl_simulation.py
diff -u /dev/null pkgsrc/cad/py-PyRTL/patches/patch-pyrtl_simulation.py:1.1
--- /dev/null   Sat Dec 27 16:31:09 2025
+++ pkgsrc/cad/py-PyRTL/patches/patch-pyrtl_simulation.py       Sat Dec 27 16:31:08 2025
@@ -0,0 +1,30 @@
+$NetBSD: patch-pyrtl_simulation.py,v 1.1 2025/12/27 16:31:08 ryoon Exp $
+
+--- pyrtl/simulation.py.orig   2020-02-02 00:00:00.000000000 +0000
++++ pyrtl/simulation.py
+@@ -1773,6 +1773,16 @@ class SimulationTrace:
+             display(html_elem)
+             # print(htmlstring)
+             js_stuff = """
++            function fetchAndRunScript(uri) {
++              return fetch(uri)
++                .then(resp => resp.text())
++                .then(scrtext => {
++                  const scrfunc = new Function(scrtext);
++                  scrfunc();
++                })
++                .catch(err => console.error('Cannot load script:', err));
++            }
++            fetchAndRunScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js";).then(() => {
+             $.when(
+             $.getScript("https://cdnjs.cloudflare.com/ajax/libs/wavedrom/1.6.2/skins/default.js";),
+             $.getScript("https://cdnjs.cloudflare.com/ajax/libs/wavedrom/1.6.2/wavedrom.min.js";),
+@@ -1780,7 +1790,7 @@ class SimulationTrace:
+                 $( deferred.resolve );
+             })).done(function(){
+                 WaveDrom.ProcessAll();
+-            });"""
++            });});"""
+             display(Javascript(js_stuff))
+         else:
+             self.render_trace_to_text(



Home | Main Index | Thread Index | Old Index