From owner-freebsd-ports@FreeBSD.ORG Fri Mar 2 07:25:03 2012 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39F181065670; Fri, 2 Mar 2012 07:25:03 +0000 (UTC) (envelope-from bsam@passap.ru) Received: from forward15.mail.yandex.net (forward15.mail.yandex.net [IPv6:2a02:6b8:0:801::5]) by mx1.freebsd.org (Postfix) with ESMTP id 346F48FC14; Fri, 2 Mar 2012 07:25:02 +0000 (UTC) Received: from smtp14.mail.yandex.net (smtp14.mail.yandex.net [95.108.131.192]) by forward15.mail.yandex.net (Yandex) with ESMTP id CB0EC9E4775; Fri, 2 Mar 2012 11:25:00 +0400 (MSK) Received: from smtp14.mail.yandex.net (localhost [127.0.0.1]) by smtp14.mail.yandex.net (Yandex) with ESMTP id AAD391B60506; Fri, 2 Mar 2012 11:25:00 +0400 (MSK) Received: from 93.91.10.202.tel.ru (93.91.10.202.tel.ru [93.91.10.202]) by smtp14.mail.yandex.net (nwsmtp/Yandex) with ESMTP id P0L8W7vJ-P0LKlKAO; Fri, 2 Mar 2012 11:25:00 +0400 X-Yandex-Spam: 1 Message-ID: <4F5075CC.9010507@passap.ru> Date: Fri, 02 Mar 2012 11:25:00 +0400 From: Boris Samorodov User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111114 Thunderbird/8.0 MIME-Version: 1.0 To: Hiroki Sato References: <201202291209.q1TC93Fc006227@repoman.freebsd.org> <4F4E63A3.7060000@passap.ru> <20120301.063715.1637304310088980264.hrs@allbsd.org> In-Reply-To: <20120301.063715.1637304310088980264.hrs@allbsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 02 Mar 2012 11:43:13 +0000 Cc: FreeBSD ports list Subject: print/libpaper problem (was: Re: cvs commit: ports/print/ghostscript9 Makefile) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2012 07:25:03 -0000 Hi! (moved from cvs@ list) 01.03.2012 01:37, Hiroki Sato пишет: > Boris Samorodov wrote > in <4F4E63A3.7060000@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> > 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 print/libpaper). 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) has changed! 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