The ebuild uses "letter" as hardcoded default paper size. This should be configurable. Suggestion: Use /etc/localtime to determine the continent, as in net-misc/hylafax-4.2.0_rc2. Or introduce a useflag. (See also bugs #34741, #38465, and #52716. Maybe it is time for a general solution for this issue.)
Re-assign a stale bug.
It's not the ebuild hardcode this but the program jpeg2ps itself. As the ebuild says, you may you -p to specify other paper size. I mark this as WONTFIX. Please request to upstream.
It is more complicated. The Makefile from the source tar defaults to A4 paper format ("-DA4" compile time option). The ebuild meddles with this, effectively changing the default to Letter. Now, I completely disagree about this being an upstream issue. What should upstream do about this? They already provide a compile time and a run time option. Upstream knows nothing about the environment where the program will be installed. IMHO, it is the responsibility of the distribution to get things right.
Created attachment 64597 [details, diff] Proposed patch for jpeg2ps-1.9.ebuild Determines the default pagesize depending on the continent.
Ok. I misread the ebuild :( Applied your patch as jpeg2ps-1.9-r1. Please test it. Thanks
I think the timezone is bad to rely on. Usually you should use LC_PAPER for it (probably I _want_ to use letter, but I have a European timezone set). Sorry that I can't send patches yet. Probably later or you have an idea to ask for the locale-settings.
In reply to comment #5: Works fine for me. Minor issue: pkg_postinst outputs the wrong message; the "local" in the declaration of pagesize (in src_compile) should be removed. Sorry for that.
Created attachment 67327 [details, diff] Proposed patch for jpeg2ps-1.9-r1.ebuild Again: If the remaining minor issue with the postinst message is fixed, this bug can IMHO be marked as resolved. See attached patch.
Fixed in CVS. I'm really sorry it took too long to solve such a minor issue.
Reopening. The taken solution does not work anymore, since /etc/localtime is no longer a symlink. And meanwhile I think that the default should not depend on the configuration of the installed system.
Created attachment 149370 [details, diff] Proposed patch for jpeg2ps-1.9-r1.ebuild Probably a USE flag is the cleanest thing we can do here, see attached patch. There is already: media-gfx/potrace:metric - default to a4 paper size and metric measurement So we could go with the "metric" flag, too: media-gfx/jpeg2ps:metric - Default to A4 paper size
(In reply to comment #11) > Created an attachment (id=149370) [edit] > Proposed patch for jpeg2ps-1.9-r1.ebuild Committed, as discussed with maekke on irc.
No; it would be much better if jpeg2ps, potrace and others use libpaper (/etc/papersize) instead. I'll prepare a patch.
Created attachment 150026 [details, diff] jpeg2ps-1.9-libpaper.patch (In reply to comment #13) > No; it would be much better if jpeg2ps, potrace and others use libpaper > (/etc/papersize) instead. This looks obvious, and in fact was my first approach, too. I attach my patch for reference (it may still have some rough edges, but basically should work). However, it would introduce some subtle incompatibilities: - The "p11x17" page size is not known to libpaper (or rather, it uses a different name for it). - For page sizes other than A4 or Letter, the size of the bounding box may differ by 1 or 2 Postscript points. Therefore, one probably would want another USE flag to enable usage of libpaper. I'm not sure if it's worth the effort.
We might also have a licence problem if we link against libpaper. From the jpeg2ps licence: | This software is free. You are granted the right to use and copy it. | This software may not be sold or bundled with any commercial package | without express written permission of the author. And unfortunately, libpaper is not licenced under the LGPL, but under the GPL (version 2 only). I think that this is incompatible with the above (but IANAL). I've also contacted upstream (Thomas Merz) about this issue. He doesn't want to re-release jpeg2ps under a different licence.