print/libpaper problem (was: Re: cvs commit:
bsam at passap.ru
Fri Mar 2 07:25:03 UTC 2012
(moved from cvs@ list)
01.03.2012 01:37, Hiroki Sato пишет:
> Boris Samorodov <bsam at passap.ru> wrote
> in <4F4E63A3.7060000 at passap.ru>:
> bs> 29.02.2012 16:09, Hiroki Sato пишет:
> bs> > hrs 2012-02-29 12:09:03 UTC
> bs> >
> bs> > FreeBSD ports repository
> bs> >
> bs> > Modified files:
> bs> > print/ghostscript9 Makefile
> bs> > Log:
> bs> > Disable libpaper by default because it can override the A4SIZE option
> bs> > unintentionally.
> bs> Can you explain this a little bit wider?
> When libpaper is not linked, the default size is determined by
> constants in the gs drivers.
It seems that libreoffice depends at the mere existance of libpaper.
I.e. I've got a system with libreoffice installed. The default paper
size was A4. (BTW I'm not sure why and how did I managed to do so
since it's Makefile does not check for paper size neither do use
Sometime later as a result of ports upgrading I've got print/libpaper
installed. And what do you think? The default paper size for libreoffice
(libreoffice itself was not touched by the ports upgading)
Let me state that it was not so simple to detect the culprit and
fix it. BTW the (system wide) fix was to create a file
/usr/local/etc/papersize with a line "A4" in it.
> WITH_A4SIZE option makes them "a4" in
> compile-time. When linking libpaper, gs defines a paper size
> returned by defaultpapername() (libpaper API) as /DEFAULTPAPERSIZE
> via .defaultpapesize (this corresponds to gp_defaultpapersize() in C)
> in gs_init.ps. It overrides the constants in the drivers. However,
> the libpaper's default size is always "letter", so in that case the
> gs would use US letter size by default even if WITH_A4SIZE option in
> this port was enabled.
So what if install a system wide default paper size while installing
print/libpaper? That may help both in gs case (when a binary is linked
with libpaper) and those that just use libpaper if it is installed.
> I think WITH_A4SIZE option should be deprecated at some point and the
> default paper size can be selected by libpaper in run-time because it
> will be more consistent and flexible,
I'd propose to leave a system wide default variable for a paper size.
I don't care if it is WITH_A4SIZE, DEFAULT_PAPERSIZE=A4 or else.
> but the current code in gs
> prevents it because it uses defaultpapername(), not systempapername()
> for some reason.
> So, the functionality the libpaper provides in gs is only to define
> /DEFAULTPAPERSIZE but it is confusing due to the above reason. This
> was why I decided to disable libpaper at this moment.
Yea, but those who will choose that non-default option and install
print/libpaper (in current state, i.e. without installing
/usr/local/etc/papersize file) will fall in trouble anyway.
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
More information about the freebsd-ports