GNU bug report logs -
#40322
[PATCH] gnu: Add Xplanet
Previous Next
Reported by: R Veera Kumar <vkor <at> vkten.in>
Date: Mon, 30 Mar 2020 08:20:02 UTC
Severity: normal
Tags: patch
Done: Eric Bavier <bavier <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 31.03.2020 02:57, R Veera Kumar wrote:
> + (patches
> + (search-patches
> + "xplanet-1.3.1-remove-null-comparison.patch"
> + "xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch"
> + "xplanet-1.3.1-libimage_gif.c.patch"
> + "xplanet-1.3.1-readConfig-fixclang.cpp.patch"
Is this patch necessary if we're building with gcc?
> + "xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch"))))
> + (build-system gnu-build-system)
> + (native-inputs
> + `(("pkg-config" ,pkg-config)))
> + (inputs
> + `(("libx11" ,libx11)
> + ("libxscrnsaver" ,libxscrnsaver)
> + ("libxext" ,libxext)
> + ("libice" ,libice)
> + ("freetype" ,freetype)
> + ("pango" ,pango)
> + ("giflib" ,giflib)
> + ("libjpeg", libjpeg)
> + ("libpng" ,libpng)
> + ("libtiff" ,libtiff)
> + ("zlib" ,zlib)))
> + (arguments
> + `(#:configure-flags
> + (list
> + "--without-pnm" ;; no proper pnm library in guix
The "netpbm" package provides a pnm library.
> diff --git
> a/gnu/packages/patches/xplanet-1.3.1-remove-null-comparison.patch
> b/gnu/packages/patches/xplanet-1.3.1-remove-null-comparison.patch
> new file mode 100644
> index 0000000000..002701ed0c
> --- /dev/null
> +++ b/gnu/packages/patches/xplanet-1.3.1-remove-null-comparison.patch
> @@ -0,0 +1,161 @@
> +Origin: Gentoo Harri Nieminen 2017-02-28
> +Url:
> https://gitweb.gentoo.org/repo/gentoo.git/log/x11-misc/xplanet/files/
> ++xplanet-1.3.1-remove-null-comparison.patch
> +
> +Index: src/libannotate/addArcs.cpp
> +===================================================================
> +diff --git a/src/libannotate/addArcs.cpp b/src/libannotate/addArcs.cpp
> +--- a/src/libannotate/addArcs.cpp (revision 206)
> ++++ b/src/libannotate/addArcs.cpp (revision 207)
> +@@ -258,7 +258,7 @@
> + {
> + ifstream inFile(arcFile.c_str());
> + char *line = new char[MAX_LINE_LENGTH];
> +- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') !=
> NULL)
> ++ while (inFile.getline (line, MAX_LINE_LENGTH, '\n'))
I'm worried this might not be correct. The "getline" function always
returns it's first parameter, which, I think, can never evaluate to a
falsy value. The safer option would be to call ".eof()" on the result,
and would match the intentions. See e.g.
https://notabug.org/bavier/guix-bavier/src/master/bavier/patches/xplanet-cxx11-eof.patch
--
`~Eric
This bug report was last modified 5 years and 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.