Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136778 - new ebuild for xnecview
Summary: new ebuild for xnecview
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement with 1 vote (vote)
Assignee: Default Assignee for New Packages
Keywords: EBUILD
Depends on:
Reported: 2006-06-14 06:40 UTC by Dominique Michel
Modified: 2013-01-25 08:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

ebuild for xnecview (xnecview-1.35.ebuild,1.00 KB, text/plain)
2006-06-14 06:41 UTC, Dominique Michel
patch for setlocale() bug (xnecview.c.diff,416 bytes, patch)
2006-06-14 06:45 UTC, Dominique Michel
Details | Diff
ebuild ofr xnecview-1.35 (xnecview-1.35.ebuild,727 bytes, text/plain)
2006-07-03 07:12 UTC, Dominique Michel
xnecview-1.36 ebuild (xnecview-1.36.ebuild,839 bytes, text/plain)
2013-01-25 00:17 UTC, Dominique Michel
fixes xnecview with libpng-1.5 (xnecview-1.36_libpng-1.5.diff,394 bytes, patch)
2013-01-25 00:18 UTC, Dominique Michel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Michel 2006-06-14 06:40:04 UTC
Xnecview is a program for visualizing the input and output files of the NEC antenna simulation software. It runs on Linux/Unix systems with the X window system.

It take as input the input files for nec and the output files generated by nec. Xnecview will visualize in color the structure of the antenna, the radiation diagram of the antenna, Of course, the picture can also be rotated and zoomed. Furthermore, slices through the XY, XZ and YZ planes can be shown, and four different gain scales are available: linear in power, linear in voltage, ARRL-style, and logarithmic with -40 dB at the center.

If the NEC output file contains output data for several frequencies, an additional window is opened showing selected data as a function of frequency.

For the nec software: 

xnecview don't use nec at all, only nec's input and output files, so I don't have it as dependency.
Comment 1 Dominique Michel 2006-06-14 06:41:19 UTC
Created attachment 89152 [details]
ebuild for xnecview
Comment 2 Dominique Michel 2006-06-14 06:45:09 UTC
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:


From the author of the program, Pieter-Tjerk de Boer.

It just work.
Comment 3 George Shapovalov (RETIRED) gentoo-dev 2006-06-26 12:23:02 UTC
Similar comments here:

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?

Comment 4 Dominique Michel 2006-07-03 07:12:10 UTC
Created attachment 90774 [details]
ebuild ofr xnecview-1.35

Modified as suggested by George.
Added manpage instalation.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2010-06-30 17:46:46 UTC
No new releases since 2006
Comment 6 Dominique Michel 2013-01-25 00:17:09 UTC
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).
Comment 7 Dominique Michel 2013-01-25 00:18:50 UTC
Created attachment 336780 [details, diff]
fixes xnecview with libpng-1.5

The setlocale() patch is not needed anymore
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2013-01-25 08:17:59 UTC
(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.