From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:55194) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJIEK-0006HZ-Eh for guix-patches@gnu.org; Tue, 31 Mar 2020 10:51:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJIEJ-0000FI-5K for guix-patches@gnu.org; Tue, 31 Mar 2020 10:51:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53465) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJIEJ-0000F8-14 for guix-patches@gnu.org; Tue, 31 Mar 2020 10:51:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jJIEI-0006OV-Uj for guix-patches@gnu.org; Tue, 31 Mar 2020 10:51:02 -0400 Subject: [bug#40322] [PATCH v3] gnu: Add Xplanet. Resent-Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 31 Mar 2020 09:50:27 -0500 From: Eric Bavier In-Reply-To: <20200331075757.GA1219@tulip> References: <20200330081929.GA7259@tulip> <20200331075757.GA1219@tulip> Message-ID: <0b0a249b0cdf15e14056c2c277e97187@posteo.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: R Veera Kumar Cc: 40322@debbugs.gnu.org, Guix-patches 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