From jhelfman@experts-exchange.com  Mon Jun 18 23:35:16 2012
Return-Path: <jhelfman@experts-exchange.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 4A4DF1065670;
	Mon, 18 Jun 2012 23:35:16 +0000 (UTC)
	(envelope-from jhelfman@experts-exchange.com)
Received: from mail.dw.redsrci.com (mail.pub.dw.redsrci.com [72.29.183.251])
	by mx1.freebsd.org (Postfix) with ESMTP id 295748FC08;
	Mon, 18 Jun 2012 23:35:16 +0000 (UTC)
Received: from mail.dw.redsrci.com (localhost [127.0.0.1])
	by mail.dw.redsrci.com (Postfix) with ESMTP id 1B5BE6FDA38;
	Mon, 18 Jun 2012 16:35:16 -0700 (PDT)
Received: from mail.dw.redsrci.com ([127.0.0.1])
	by mail.dw.redsrci.com (mail.dw.redsrci.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id T2-p95ggYPAj; Mon, 18 Jun 2012 16:35:15 -0700 (PDT)
Received: from experts-exchange.com (unknown [192.168.103.120])
	by mail.dw.redsrci.com (Postfix) with SMTP id EA19A6FDA34;
	Mon, 18 Jun 2012 16:35:15 -0700 (PDT)
Received: (nullmailer pid 45196 invoked by uid 1001);
	Mon, 18 Jun 2012 23:33:41 -0000
Message-Id: <1340062421.983725.45195.nullmailer@experts-exchange.com>
Date: Mon, 18 Jun 2012 16:33:41 -0700
From: Jason Helfman <jgh@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: hrs@FreeBSD.org
Subject: [PATCH] print/acroreadwrapper: fix usage of ${SRC_BASE} before it is defined
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         169218
>Category:       ports
>Synopsis:       [PATCH] print/acroreadwrapper: fix usage of ${SRC_BASE} before it is defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    hrs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 18 23:40:21 UTC 2012
>Closed-Date:    Wed Jun 20 07:54:57 UTC 2012
>Last-Modified:  Wed Jun 20 08:00:23 UTC 2012
>Originator:     Jason Helfman
>Release:        FreeBSD 8.3-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD dormouse.experts-exchange.com 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr  9 21:23:18 UTC
>Description:

Original PR filed as ports/165994

SRC_BASE is being used before being defined in several ports. it happened to
work anyways in most cases because the main use of SRC_BASE is for checking if
${SRC_BASE}/sys/ (/usr/src/sys/) exists, and if SRC_BASE is empty, it just
checks for /sys/ which does exist on most systems as a symlink to /usr/src/sys/.

pet portlint for whitespace

Port maintainer (hrs@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: CVS)
>How-To-Repeat:
>Fix:

--- acroreadwrapper-0.0.20110920.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/print/acroreadwrapper/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- Makefile	20 Sep 2011 02:17:09 -0000	1.17
+++ Makefile	18 Jun 2012 23:34:17 -0000
@@ -20,7 +20,7 @@
 PLIST_FILES=	bin/acroread8 bin/acroread9 bin/acroread \
 		${KMODDIR}/linux_adobe.ko
 PLIST_DIRS=	${KMODDIR}
-SUB_FILES=	acroread 
+SUB_FILES=	acroread
 SUB_LIST=	ACROBASE8=${ACROBASE8} \
 		ACROBASE9=${ACROBASE9} \
 		ADOBE_LANG=${ADOBE_LANG:U} \
@@ -30,6 +30,9 @@
 		PLUGINDIR=${PLUGINDIR} \
 		KMODDIR=${KMODDIR}
 USE_RC_SUBR=	linux_adobe.sh
+
+.include <bsd.port.pre.mk>
+
 MAKE_ENV=	KMODDIR=${KMODDIR} SYSDIR=${SRC_BASE}/sys DESTDIR=${PREFIX}/
 
 ADOBEBASE=	Adobe
@@ -38,7 +41,6 @@
 PLUGINDIR=	lib/npapi/linux-acroread
 KMODDIR=	libexec/linux_adobe
 
-.include <bsd.port.pre.mk>
 KERNCONF?=	GENERIC
 
 # Use the first component of ${KERNCONF}.
--- acroreadwrapper-0.0.20110920.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->hrs 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Jun 18 23:41:05 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169218 

From: Hiroki Sato <hrs@FreeBSD.org>
To: jgh@FreeBSD.org
Subject: Re: [PATCH] print/acroreadwrapper: fix usage of ${SRC_BASE} before
 it is defined

 ----Security_Multipart(Tue_Jun_19_08_56_08_2012_424)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
  This port uses ${SRC_BASE} in .if after inclusion of bsd.port.pre.mk,
  so it does not suffer from the problem you explained as far as I can
  check.
 
 -- Hiroki
 
 ----Security_Multipart(Tue_Jun_19_08_56_08_2012_424)--
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (FreeBSD)
 
 iEYEABECAAYFAk/fwBgACgkQTyzT2CeTzy0evACaAncdJ08y1MqpHV3acr8E+Idd
 NpwAnimnXINFi7MHBzewfTtkY3VvCzj0
 =CdLo
 -----END PGP SIGNATURE-----
 
 ----Security_Multipart(Tue_Jun_19_08_56_08_2012_424)----

From: Jason Helfman <jgh@FreeBSD.org>
Sender: Jason Helfman <bsd-src@helfman.org>
To: Hiroki Sato <hrs@FreeBSD.org>
Subject: Re: [PATCH] print/acroreadwrapper: fix usage of ${SRC_BASE} before
 it is defined

 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 Yes, however it is being used before it is defined.
 I believe the case is the same, here.
 
 - -jgh
 
 - -- 
 Jason Helfman
 FreeBSD Committer | http://people.freebsd.org/~jgh | The Power To Serve
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (FreeBSD)
 
 iQEcBAEBAgAGBQJP38BtAAoJECBZmmNBUNPc3IYH/AgIKBvBzoKSFWT/LgJ2Qj9S
 w2aYW0qWvFdafiXa/sP4kuoWANMyUS6mBeEmbYctXPM6Wfb76pHBTmFvyPbdOzWD
 ZWXNYXkWouiqTStyMaHOvW0jg6hNN+UIfN6T2d86QVxfybKMbx7erZEJc/KLm0nh
 GSqwDfTQSMnC/W+JB7eeYFxueFutFA341ycec7A/mMhlMHqQ2gzewA1t+MJ9NGkS
 +n7MEGbBGVP/64v4Y0DAGpr56C81U6JBWod17HsSVMvkLr8bLkBOS+iQn/ExsR9O
 djpzmy1IYu4ZhZrtwqIraQSy4qiCyU03OPi0IL20wjopmVPLYHMLDViEamNMUGo=
 =D4Aq
 -----END PGP SIGNATURE-----

Date: Mon, 18 Jun 2012 17:34:31 -0700
From: Jason Helfman <jgh@FreeBSD.org>
Sender: Jason Helfman <bsd-src@helfman.org>
To: Hiroki Sato <hrs@FreeBSD.org>
Subject: Re: [PATCH] print/acroreadwrapper: fix usage of ${SRC_BASE} before
 it is defined

 This bit is defined before bsd.port.pre.mk is included:
 MAKE_ENV=	KMODDIR=${KMODDIR} SYSDIR=${SRC_BASE}/sys DESTDIR=${PREFIX}/
 
 -jgh
 
 -- 
 Jason Helfman
 FreeBSD Committer | http://people.freebsd.org/~jgh | The Power To Serve

From: Hiroki Sato <hrs@FreeBSD.org>
To: jgh@FreeBSD.org
Subject: Re: [PATCH] print/acroreadwrapper: fix usage of ${SRC_BASE} before
 it is defined

 ----Security_Multipart(Tue_Jun_19_12_50_44_2012_758)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Jason Helfman <jgh@FreeBSD.org> wrote
   in <20120619003431.GC65159@dormouse.experts-exchange.com>:
 
  Still I do not understand why this is wrong.  MAKE_ENV will be
  evaluated after definition of SRC_BASE.  In Makefile, the variable
  evaluation is not like in a shell script.  The case that it causes a
  problem is only when the SRC_BASE is used in ".if" or ".for" before
  inclusion of bsd.port.pre.mk.
 
  Or, am I missing something?  Please show a way to reproduce how it
  does not work if you have it.
 
 -- Hiroki
 
 ----Security_Multipart(Tue_Jun_19_12_50_44_2012_758)--
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (FreeBSD)
 
 iEYEABECAAYFAk/f9xQACgkQTyzT2CeTzy0magCdG9PaWkUpg4+iyQoPOe3A/ObQ
 TVYAn1iLhSmBj8VPbEWOnjRMAAilOAAm
 =U+RQ
 -----END PGP SIGNATURE-----
 
 ----Security_Multipart(Tue_Jun_19_12_50_44_2012_758)----
State-Changed-From-To: open->closed 
State-Changed-By: hrs 
State-Changed-When: Wed Jun 20 07:54:46 UTC 2012 
State-Changed-Why:  
Committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169218 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/169218: commit references a PR
Date: Wed, 20 Jun 2012 07:52:27 +0000 (UTC)

 hrs         2012-06-20 07:52:17 UTC
 
   FreeBSD ports repository
 
   Modified files:
     print/acroreadwrapper Makefile 
   Log:
   Style fix: include bsd.port.pre.mk before using SRC_BASE.
   
   PR:             ports/169218
   Submitted by:   jgh
   
   Revision  Changes    Path
   1.18      +4 -2      ports/print/acroreadwrapper/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
