Last active 2 months ago Unlisted

depau's Avatar depau revised this gist 2 months ago. Go to revision

1 file changed, 129 insertions

0001-fix-add-missing-pysimulavr-module.patch(file created)

@@ -0,0 +1,129 @@
1 + From 03c647d668d5761e72764caa2dc4b184bef99b06 Mon Sep 17 00:00:00 2001
2 + From: Davide Depau <[email protected]>
3 + Date: Sun, 22 Mar 2026 19:06:15 +0100
4 + Subject: [PATCH] fix: add missing pysimulavr module
5 +
6 + ---
7 + .SRCINFO | 6 ++++++
8 + 0002-fix-missing-include-in-tests.patch | 24 ++++++++++++++++++++++++
9 + PKGBUILD | 18 +++++++++++++++---
10 + 3 files changed, 45 insertions(+), 3 deletions(-)
11 + create mode 100644 0002-fix-missing-include-in-tests.patch
12 +
13 + diff --git a/.SRCINFO b/.SRCINFO
14 + index a18d260..a379ada 100644
15 + --- a/.SRCINFO
16 + +++ b/.SRCINFO
17 + @@ -10,6 +10,10 @@ pkgbase = simulavr-git
18 + makedepends = help2man
19 + makedepends = iverilog
20 + makedepends = python
21 + + makedepends = python-setuptools
22 + + makedepends = python-build
23 + + makedepends = python-installer
24 + + makedepends = python-wheel
25 + makedepends = swig
26 + makedepends = tcl
27 + makedepends = texinfo
28 + @@ -17,7 +21,9 @@ pkgbase = simulavr-git
29 + conflicts = simulavr
30 + source = simulavr-git::git+https://git.savannah.nongnu.org/git/simulavr.git
31 + source = 0001-fix_check.patch
32 + + source = 0002-fix-missing-include-in-tests.patch
33 + sha256sums = SKIP
34 + sha256sums = b8e271804031dcd9536553851e41296f24523e6a2c5a0e2154750f0ad80ef309
35 + + sha256sums = cf84f7e1873968a4d59bda141a2b063dbc6b9938b6b9d577075ad6f4e988dad5
36 +
37 + pkgname = simulavr-git
38 + diff --git a/0002-fix-missing-include-in-tests.patch b/0002-fix-missing-include-in-tests.patch
39 + new file mode 100644
40 + index 0000000..f531419
41 + --- /dev/null
42 + +++ b/0002-fix-missing-include-in-tests.patch
43 + @@ -0,0 +1,24 @@
44 + +From 971503adfca4e5ba65d4abd678f7b2e6f5568678 Mon Sep 17 00:00:00 2001
45 + +From: Davide Depau <[email protected]>
46 + +Date: Tue, 17 Mar 2026 16:33:29 +0100
47 + +Subject: [PATCH] fix: missing include in tests
48 + +
49 + +---
50 + + regress/gtest/gtest-1.10.0/src/gtest-death-test.cc | 1 +
51 + + 1 file changed, 1 insertion(+)
52 + +
53 + +diff --git a/regress/gtest/gtest-1.10.0/src/gtest-death-test.cc b/regress/gtest/gtest-1.10.0/src/gtest-death-test.cc
54 + +index da09a1c..9c59408 100644
55 + +--- a/regress/gtest/gtest-1.10.0/src/gtest-death-test.cc
56 + ++++ b/regress/gtest/gtest-1.10.0/src/gtest-death-test.cc
57 + +@@ -33,6 +33,7 @@
58 + + #include "gtest/gtest-death-test.h"
59 + +
60 + + #include <utility>
61 + ++#include <cstdint>
62 + +
63 + + #include "gtest/internal/gtest-port.h"
64 + + #include "gtest/internal/custom/gtest.h"
65 + +--
66 + +2.53.0
67 + +
68 + diff --git a/PKGBUILD b/PKGBUILD
69 + index a8fd827..d04f370 100644
70 + --- a/PKGBUILD
71 + +++ b/PKGBUILD
72 + @@ -1,5 +1,6 @@
73 + # Maintainer: Sven Karsten Greiner <[email protected]>
74 + # Contributor: Tony Lambiris <[email protected]>
75 + +# Contributor: Davide Depau <[email protected]>
76 +
77 + pkgname=simulavr-git
78 + pkgver=1.1.0.r5.g32985f7
79 + @@ -20,13 +21,15 @@ depends=()
80 + # doxygen dot python-sphinx rst2pdf python-beautifulsoup4 python-requests
81 + #
82 + # To run tests: avr-gcc avr-libc valgrind
83 + -makedepends=('cmake' 'git' 'help2man' 'iverilog' 'python' 'swig' 'tcl' 'texinfo')
84 + +makedepends=('cmake' 'git' 'help2man' 'iverilog' 'python' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel' 'swig' 'tcl' 'texinfo')
85 + provides=('simulavr')
86 + conflicts=('simulavr')
87 + source=("${pkgname}::git+https://git.savannah.nongnu.org/git/simulavr.git"
88 + - '0001-fix_check.patch')
89 + + '0001-fix_check.patch'
90 + + '0002-fix-missing-include-in-tests.patch')
91 + sha256sums=('SKIP'
92 + - 'b8e271804031dcd9536553851e41296f24523e6a2c5a0e2154750f0ad80ef309')
93 + + 'b8e271804031dcd9536553851e41296f24523e6a2c5a0e2154750f0ad80ef309'
94 + + 'cf84f7e1873968a4d59bda141a2b063dbc6b9938b6b9d577075ad6f4e988dad5')
95 +
96 + pkgver() {
97 + cd "${srcdir}/${pkgname}"
98 + @@ -36,6 +39,7 @@ pkgver() {
99 + prepare() {
100 + cd "${srcdir}/${pkgname}"
101 + patch -p1 -i ../0001-fix_check.patch
102 + + patch -p1 -i ../0002-fix-missing-include-in-tests.patch
103 + }
104 +
105 + build() {
106 + @@ -49,6 +53,9 @@ build() {
107 +
108 + make -j1 -C build
109 + make -j1 -C build progdoc
110 + +
111 + + cd "${srcdir}/${pkgname}/build/pysimulavr"
112 + + python -m build --wheel --no-isolation
113 + }
114 +
115 + package() {
116 + @@ -56,6 +63,11 @@ package() {
117 +
118 + make DESTDIR="${pkgdir}" install
119 +
120 + + # The pysimulavr CMakeLists.txt has no install() rule, so install it manually.
121 + + # build_py copies pysimulavr.py into build/lib* so --skip-build finds it.
122 + + cd "${srcdir}/${pkgname}/build/pysimulavr"
123 + + python -m installer --destdir="$pkgdir" dist/*.whl
124 + +
125 + mv "${pkgdir}/usr/share/doc/common" "${pkgdir}/usr/share/doc/simulavr"
126 +
127 + # Headers are moved into their own subdirectory to prevent conflicts.
128 + --
129 + 2.53.0
Newer Older