tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ploticus: fix zlib file handle type
Petr Zahradnik
9 months ago
9337e7e1
525162e0
+40
-5
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
pl
ploticus
fix-zlib-file-type.patch
package.nix
+28
pkgs/by-name/pl/ploticus/fix-zlib-file-type.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
Index: src/svg.c
2
+
===================================================================
3
+
--- a/src/svg.c
4
+
+++ b/src/svg.c
5
+
@@ -676,9 +676,9 @@
6
+
double x1, y1, x2, y2;
7
+
{
8
+
char *buf;
9
+
#ifdef WZ
10
+
- FILE *outfp;
11
+
+ gzFile outfp;
12
+
#endif
13
+
14
+
if (svg_style_in_prog) fprintf( svg_fp, "</g>");
15
+
fprintf( svg_fp, "</g>\n" ); /* close default style */
16
+
@@ -731,10 +731,10 @@
17
+
svg_fp = fopen( svg_tmpfilename, "r" );
18
+
if( svg_fp == NULL ) return( Eerr( 2487, "cannot reopen temp file", svg_tmpfilename ) );
19
+
#ifdef WZ
20
+
if( svg_compress ) {
21
+
- if( svg_stdout ) outfp = (FILE *) gzdopen( 1, svg_compressmode ); /* stdout = 1 */
22
+
- else outfp = (FILE *) gzopen( svg_filename, svg_compressmode );
23
+
+ if( svg_stdout ) outfp = gzdopen( 1, svg_compressmode ); /* stdout = 1 */
24
+
+ else outfp = gzopen( svg_filename, svg_compressmode );
25
+
if( outfp == NULL ) return( Eerr( 2488, "cannot open output file", svg_filename ) );
26
+
}
27
+
#endif
28
+
buf = svg_style; /* reuse */
+12
-5
pkgs/by-name/pl/ploticus/package.nix
···
19
url = "mirror://sourceforge/ploticus/ploticus/${finalAttrs.version}/ploticus${
20
lib.replaceStrings [ "." ] [ "" ] finalAttrs.version
21
}_src.tar.gz";
22
-
sha256 = "PynkufQFIDqT7+yQDlgW2eG0OBghiB4kHAjKt91m4LA=";
23
};
24
25
patches = [
···
33
# This is required for non-ASCII fonts to work:
34
# https://ploticus.sourceforge.net/doc/fonts.html
35
./use-gd-package.patch
0
0
0
0
0
36
];
37
38
buildInputs = [
···
55
'';
56
57
makeFlags = [ "CC:=$(CC)" ];
0
0
58
59
preInstall = ''
60
mkdir -p "$out/bin"
···
84
'';
85
};
86
87
-
meta = with lib; {
88
description = "Non-interactive software package for producing plots and charts";
89
longDescription = ''
90
Ploticus is a free, GPL'd, non-interactive
···
94
statistical capabilities. It allows significant user control
95
over colors, styles, options and details.
96
'';
97
-
license = licenses.gpl2Plus;
98
-
maintainers = with maintainers; [ pSub ];
99
homepage = "https://ploticus.sourceforge.net/";
100
-
platforms = with platforms; linux ++ darwin;
101
};
102
})
···
19
url = "mirror://sourceforge/ploticus/ploticus/${finalAttrs.version}/ploticus${
20
lib.replaceStrings [ "." ] [ "" ] finalAttrs.version
21
}_src.tar.gz";
22
+
hash = "sha256-PynkufQFIDqT7+yQDlgW2eG0OBghiB4kHAjKt91m4LA=";
23
};
24
25
patches = [
···
33
# This is required for non-ASCII fonts to work:
34
# https://ploticus.sourceforge.net/doc/fonts.html
35
./use-gd-package.patch
36
+
37
+
# svg.c:752:26: error: passing argument 1 of 'gzclose' from incompatible pointer type []
38
+
# 752 | gzclose( outfp );
39
+
# note: expected 'gzFile' {aka 'struct gzFile_s *'} but argument is of type 'FILE *'
40
+
./fix-zlib-file-type.patch
41
];
42
43
buildInputs = [
···
60
'';
61
62
makeFlags = [ "CC:=$(CC)" ];
63
+
64
+
enableParallelBuilding = true;
65
66
preInstall = ''
67
mkdir -p "$out/bin"
···
91
'';
92
};
93
94
+
meta = {
95
description = "Non-interactive software package for producing plots and charts";
96
longDescription = ''
97
Ploticus is a free, GPL'd, non-interactive
···
101
statistical capabilities. It allows significant user control
102
over colors, styles, options and details.
103
'';
104
+
license = lib.licenses.gpl2Plus;
105
+
maintainers = with lib.maintainers; [ pSub ];
106
homepage = "https://ploticus.sourceforge.net/";
107
+
platforms = with lib.platforms; linux ++ darwin;
108
};
109
})