Summary: | new ebuild for xnecview | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dominique Michel <dominique.c.michel> |
Component: | New packages | Assignee: | Default Assignee for New Packages <maintainer-wanted> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | sci |
Priority: | High | Keywords: | EBUILD |
Version: | 2006.0 | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://wwwhome.cs.utwente.nl/~ptdeboer/ham/xnecview/ | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
ebuild for xnecview
patch for setlocale() bug ebuild ofr xnecview-1.35 xnecview-1.36 ebuild fixes xnecview with libpng-1.5 |
Description
Dominique Michel
2006-06-14 06:40:04 UTC
Created attachment 89152 [details]
ebuild for xnecview
Created attachment 89155 [details, diff]
patch for setlocale() bug
Thanks for your bug report.
At first I almost concluded that this was an "impossible" problem, but
then figured out what may be happening: it turns out that the present
version of xnecview (unintentionally) respects the "locale" setting of
your system when reading files. I see you are in Switzerland, and I think
in Switzerland (like many non-English countries) the standard decimal
separator is a comma rather than a point: so probably your xnecview
expects decimal commas instead of points in the numbers in the NEC
input file.
Of course, this is silly, since the NEC input files should be the same
everywhere in the world.
Actually, the situation is a bit weirder. Normally, when one wants a C
program to respect the locale settings, one has to explicitly call the
setlocale() function in order to do that. Of course, I don't do that in
xnecview, since its files should be international. However, it turns
out that the gtk library which xnecview uses, calls this setlocale()
function anyway.
There are two ways to avoid this problem.
One is to change your locale setting to something that makes the separator
a point instead of a comma.
The other is to modify xnecview slightly, such that the decimal
separator setting is set correctly again. This is quite easy: open the
file 'xnecview.c'; then somewhere near the #include's, add the line:
#include <locale.h>
Furthermore, around line 375, just below the line calling initX(), add
the line:
setlocale(LC_NUMERIC,"C");
From the author of the program, Pieter-Tjerk de Boer.
It just work.
Similar comments here: Restrict patch should be in src_unpack - oh, this is a proper situation to use patch this time :). make -> emake? what's left of src_compile should be removed? George Created attachment 90774 [details]
ebuild ofr xnecview-1.35
Modified as suggested by George.
Added manpage instalation.
No new releases since 2006 Created attachment 336778 [details]
xnecview-1.36 ebuild
I fixed the depends and made repoman happy.
Some sed fixes for the Makefile too (CFLAGS, tc_getCC).
Created attachment 336780 [details, diff]
fixes xnecview with libpng-1.5
The setlocale() patch is not needed anymore
(In reply to comment #7) > Created attachment 336780 [details, diff] [details, diff] > fixes xnecview with libpng-1.5 > > The setlocale() patch is not needed anymore Do you like to add this to the sci overlay? fork the overlay on github and send a pull-request. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b1e846ff1d0069ae6e028eab70777d08698c6ba commit 3b1e846ff1d0069ae6e028eab70777d08698c6ba Author: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de> AuthorDate: 2022-09-01 17:03:45 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-05-06 03:48:42 +0000 sci-electronics/xnecview: new package, add 1.37 Closes: https://bugs.gentoo.org/136778 Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de> Closes: https://github.com/gentoo/gentoo/pull/27107 Signed-off-by: Sam James <sam@gentoo.org> sci-electronics/xnecview/Manifest | 1 + .../xnecview/files/xnecview-tc-variables.patch | 29 +++++++++++++++++ sci-electronics/xnecview/metadata.xml | 17 ++++++++++ sci-electronics/xnecview/xnecview-1.37.ebuild | 37 ++++++++++++++++++++++ 4 files changed, 84 insertions(+) |