Skip to content

Commit 499da60

Browse files
committed
try building kplot directly into nip4
1 parent 1097eac commit 499da60

File tree

6 files changed

+23
-43
lines changed

6 files changed

+23
-43
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## master
22

3+
## 9.0.1-2
4+
35
- try to fix kplot on win
46

57
## 9.0.1 2025/02/24

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project('nip4', 'c',
22
# ie. a major after nip2 8.9 for workspace save file versioning
3-
version: '9.0.1-1',
3+
version: '9.0.1-2',
44
license: 'GPL',
55
meson_version: '>=0.64',
66
default_options: [

src/kplot/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ Copied from:
22

33
https://github.com/kristapsdz/kplot
44

5-
With minimal modifications. That repo hasn't been updated in 8 years, sadly.
6-
Maybe it'll come alive again.
5+
With minimal modifications.
76

87

98

src/kplot/meson.build

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/kplot/reallocarray.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,5 @@ reallocarray(void *optr, size_t nmemb, size_t size)
3636
return NULL;
3737
}
3838

39-
// some realloc() on some platforms fail with realloc(0)
40-
if (optr)
41-
return realloc(optr, size * nmemb);
42-
else
43-
return malloc(size * nmemb);
39+
return realloc(optr, size * nmemb);
4440
}

src/meson.build

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# build this first
2-
subdir('kplot')
3-
41
marshal = gnome.genmarshal(
52
'nip4marshal',
63
prefix: 'nip4',
@@ -135,6 +132,24 @@ sources = files (
135132
'workspaceroot.c',
136133
'workspaceview.c',
137134
'workspaceviewlabel.c',
135+
'kplot/array.c',
136+
'kplot/border.c',
137+
'kplot/bucket.c',
138+
'kplot/buffer.c',
139+
'kplot/colours.c',
140+
'kplot/draw.c',
141+
'kplot/grid.c',
142+
'kplot/hist.c',
143+
'kplot/kdata.c',
144+
'kplot/kplot.c',
145+
'kplot/label.c',
146+
'kplot/margin.c',
147+
'kplot/mean.c',
148+
'kplot/plotctx.c',
149+
'kplot/reallocarray.c',
150+
'kplot/stddev.c',
151+
'kplot/tic.c',
152+
'kplot/vector.c',
138153
)
139154

140155
parse_c = custom_target('parse.c',
@@ -173,7 +188,6 @@ nip4 = executable('nip4', [
173188
'main-gui.c',
174189
],
175190
dependencies: nip4_deps,
176-
link_with: kplot_lib,
177191
win_subsystem: 'windows',
178192
install: true,
179193
)
@@ -188,7 +202,6 @@ nip4_batch = executable('nip4-batch', [
188202
'main-batch.c',
189203
],
190204
dependencies: nip4_deps,
191-
link_with: kplot_lib,
192205
win_subsystem: 'console',
193206
install: true,
194207
)

0 commit comments

Comments
 (0)