From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Oct 13 18:40:20 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D602116A41F for ; Thu, 13 Oct 2005 18:40:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D14B343D49 for ; Thu, 13 Oct 2005 18:40:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j9DIeI4d038791 for ; Thu, 13 Oct 2005 18:40:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j9DIeIJH038790; Thu, 13 Oct 2005 18:40:18 GMT (envelope-from gnats) Resent-Date: Thu, 13 Oct 2005 18:40:18 GMT Resent-Message-Id: <200510131840.j9DIeIJH038790@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Zahemszky Gabor Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2838916A41F for ; Thu, 13 Oct 2005 18:33:14 +0000 (GMT) (envelope-from zgabor@zahemszky.hu) Received: from zahemszky.hu (dsl51B6CCFA.pool.t-online.hu [81.182.204.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B1F843D45 for ; Thu, 13 Oct 2005 18:33:12 +0000 (GMT) (envelope-from zgabor@zahemszky.hu) Received: from zahemszky.hu (localhost [127.0.0.1]) by Picasso.Zahemszky.HU (8.13.4/8.13.1) with ESMTP id j9DHY8gx023909 for ; Thu, 13 Oct 2005 19:34:08 +0200 (CEST) (envelope-from zgabor@zahemszky.hu) Received: (from zgabor@localhost) by zahemszky.hu (8.13.4/8.13.1/Submit) id j9DHY8cF023908; Thu, 13 Oct 2005 19:34:08 +0200 (CEST) (envelope-from zgabor) Message-Id: <200510131734.j9DHY8cF023908@zahemszky.hu> Date: Thu, 13 Oct 2005 19:34:08 +0200 (CEST) From: Zahemszky Gabor To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/87397: incorrect use of PAPERSIZE make variable in some ports X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Zahemszky Gabor List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2005 18:40:21 -0000 >Number: 87397 >Category: ports >Synopsis: incorrect use of PAPERSIZE make variable in some ports >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Oct 13 18:40:18 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Zahemszky Gabor >Release: FreeBSD 5.4-STABLE i386 >Organization: >Environment: System: FreeBSD zahemszky.hu 5.4-STABLE FreeBSD 5.4-STABLE #0: Wed Sep 28 20:30:48 CEST 2005 root@Picasso.Zahemszky.HU:/usr/obj/usr/src/sys/PICASSO i386 >Description: There are so many ports, which use some make variables to set a paper size. Eg: ghostscript, mpage, psutils, teTex, dvips, etc. Most of them use the PAPERSIZE variable, but there are other variables. I think, it would be better to use a general mechanism to do that. >How-To-Repeat: egrep -R -e A4 -e PAPERSIZE -e PAGESIZE /usr/ports >Fix: I think, the correct method would be to all of them use a general variable, so: a) in print/ghostscript-{afpl,gpl,gnu}/Makefile, change these lines: .if defined(A4) into .if ( defined(PAPERSIZE) && ${PAPERSIZE} == "a4" ) (and in the pre-everything:: rule, too). b) In the freshly committed print/lpr-wrapper port, there is a similar problem, as in the ghostscript ports. It uses the A4 variable. So the needed change is the same as in ghostscript, change the: .if defined(A4) line into: .if ( defined(PAPERSIZE) && ${PAPERSIZE} == "a4" ) c) In print/mpage/Makefile, change the comment in the beginning, and add the next line: PAGESIZE?= ${PAPERSIZE} d) There is a hidden PAPERSIZE dependency in print/xfce4-print. In it, there are these lines: .if defined(WITH_LETTER) CONFIGURE_ARGS+=--enable-letter BUILD_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-letter RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-letter .else CONFIGURE_ARGS+=--disable-letter BUILD_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-a4 RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-a4 .endif It would be better to use the next: .if ( defined( PAPERSIZE ) && ${PAPERSIZE} == "a4" ) CONFIGURE_ARGS+=--disable-letter BUILD_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-a4 RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-a4 .else CONFIGURE_ARGS+=--enable-letter BUILD_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-letter RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-letter .endif In this way, if the user set the PAPERSIZE variable to a (in xfce4-print) not-supported size (legal, letterdj, a3, etc), she get the US standard size (and in the case of letterdj, it's more correct, than a4 would be) === I think, the best method would be to change all of these ports at the same time - maybe with a comment in /usr/ports/UPDATING(?). I hope, I found all of the paper size dependency in the ports. >Release-Note: >Audit-Trail: >Unformatted: