From jbeich@tormail.net  Sun Nov 13 20:49:27 2011
Return-Path: <jbeich@tormail.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D3D79106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Nov 2011 20:49:27 +0000 (UTC)
	(envelope-from jbeich@tormail.net)
Received: from server2.hudsonvalleyhost.com (server2.hudsonvalleyhost.com [66.7.195.77])
	by mx1.freebsd.org (Postfix) with ESMTP id A20348FC13
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Nov 2011 20:49:27 +0000 (UTC)
Received: from 84-72-135-43.dclient.hispeed.ch ([84.72.135.43]:43290 helo=internal.tormail.net)
	by server2.hudsonvalleyhost.com with esmtpsa (TLSv1:RC4-SHA:128)
	(Exim 4.69)
	(envelope-from <jbeich@tormail.net>)
	id 1RPgzW-0023sq-0x
	for FreeBSD-gnats-submit@freebsd.org; Sun, 13 Nov 2011 15:49:27 -0500
Received: from jbeich by internal.tormail.net with local (Exim 4.63)
	(envelope-from <jbeich@tormail.net>)
	id 1RPgyc-000HAR-CK
	for FreeBSD-gnats-submit@freebsd.org; Sun, 13 Nov 2011 20:48:33 +0000
Message-Id: <1RPgyc-000HAR-CK@internal.tormail.net>
Date: Sun, 13 Nov 2011 15:50:42 -0400
From: Jan Beich <jbeich@tormail.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] lang/pbasic: respect CC/CFLAGS

>Number:         162539
>Category:       ports
>Synopsis:       [patch] lang/pbasic: respect CC/CFLAGS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 13 20:50:12 UTC 2011
>Closed-Date:    Thu Nov 24 16:05:22 UTC 2011
>Last-Modified:  Thu Nov 24 16:10:08 UTC 2011
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
# slightly different from pointyhat
$ export PATH=~/.bin:$PATH
$ for cc in CC cc c++ gcc g++ cpp; do ln -s /usr/bin/false ~/.bin/${cc}; done
>Description:
>How-To-Repeat:
http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp.20110723205754/pbasic-2.0.log
>Fix:
--- cc.diff begins here ---
Index: lang/pbasic/Makefile
===================================================================
RCS file: /a/.csup/ports/lang/pbasic/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- lang/pbasic/Makefile	17 Mar 2011 16:09:27 -0000	1.19
+++ lang/pbasic/Makefile	13 Nov 2011 19:49:55 -0000
@@ -22,6 +22,12 @@ MAKEFILE=	makefile
 MAN1=		pbasic.1
 PLIST_FILES=	bin/pbasic
 
+post-patch:	.SILENT
+	${REINPLACE_CMD} -e '/^CC/s/=/?=/' \
+		-e '/^CFLAGS/{s/=/+=/;s/-O//;}' \
+		${WRKSRC}/freebsd/makefile
+	${ECHO_CMD} '.PHONY: $$(SYSTEMS)' >>${WRKSRC}/makefile
+
 do-configure:
 	-cd ${WRKSRC} ; ${RM} -rf termio m68000 msdos vax pyramid ns32000 \
 			pdp11 cursor/cursor.dos cursor/cursor.ukc
--- cc.diff ends here ---
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sun Nov 13 20:51:24 UTC 2011 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: jhs@berklix.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/162539: [patch] lang/pbasic: respect CC/CFLAGS
Date: Sun, 13 Nov 2011 20:51:22 UT

 Maintainer of lang/pbasic,
 
 Please note that PR ports/162539 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/162539
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: "Julian H. Stacey" <jhs@berklix.com>
To: bug-followup@FreeBSD.ORG
Cc: Edwin Groothuis <edwin@FreeBSD.ORG>, phil@cockcroft.de,
        Jan Beich <jbeich@tormail.net>
Subject: Re: ports/162539: [patch] lang/pbasic: respect CC/CFLAGS 
Date: Sun, 13 Nov 2011 23:01:58 +0100

 Hi,
 Reference:
 > From:		Edwin Groothuis <edwin@FreeBSD.ORG> 
 > Reply-to:	bug-followup@FreeBSD.ORG 
 > Date:		Sun, 13 Nov 2011 20:51:22 UT 
 > Message-id:	<20111113205122.BD017106567E@hub.freebsd.org> 
 
 Edwin Groothuis wrote:
 > Maintainer of lang/pbasic,
 > 
 > Please note that PR ports/162539 has just been submitted.
 > 
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 > 
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/162539
 > 
 > -- 
 > Edwin Groothuis via the GNATS Auto Assign Tool
 > edwin@FreeBSD.org
 
 Hi,
 Jan cc'd (patch submitter),
  Did you check the patch still allows builds on 8.2-RELEASE ?
  If so, Approved,
 Julian S ports/lang/pbasic MAINTAINER=
 
 PS Phil <phil@cockcroft.de> author of generic. :
 Seems it's a tweak to top Makefile to make it build with latest
 FreeBSD ports/ make macros in current. I haven't checked detail (as
 not currently running current or 9.0-RC1). 
 
 Cheers,
 Julian
 -- 
 Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
  Reply below, not above;  Indent with "> ";  Cumulative like a play script.
  Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.

From: Jan Beich <jbeich@tormail.net>
To: "Julian H. Stacey" <jhs@berklix.com>
Cc: bug-followup@FreeBSD.ORG, phil@cockcroft.de
Subject: Re: ports/162539: [patch] lang/pbasic: respect CC/CFLAGS
Date: Sun, 13 Nov 2011 14:25:30 -0900

 "Julian H. Stacey" <jhs@berklix.com> writes:
 
 > Hi,
 > Jan cc'd (patch submitter),
 >  Did you check the patch still allows builds on 8.2-RELEASE ?
 >  If so, Approved,
 > Julian S ports/lang/pbasic MAINTAINER=
 
 No, I don't have a local tinderbox. But it should still build fine with
 gcc in base.
 
 > PS Phil <phil@cockcroft.de> author of generic. :
 > Seems it's a tweak to top Makefile to make it build with latest
 > FreeBSD ports/ make macros in current. I haven't checked detail (as
 > not currently running current or 9.0-RC1). 
 
 It's not related to issues on 10.0-CURRENT. The patch aims to fix
 build with redefined CC in make.conf(5) as well as leveraging
 defaults CFLAGS from /usr/share/mk/sys.mk. A common user of CFLAGS
 is WITH_DEBUG provided by bsd.port.mk.
 
   http://www.freebsd.org/doc/en/books/porters-handbook/dads-cc.html
   http://www.freebsd.org/doc/en/books/porters-handbook/dads-cflags.html
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Mon Nov 14 04:25:25 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

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

From: "Julian H. Stacey" <jhs@berklix.com>
To: Jan Beich <jbeich@tormail.net>
Cc: bug-followup@freebsd.org, phil@cockcroft.de
Subject: Re: ports/162539: [patch] lang/pbasic: respect CC/CFLAGS 
Date: Tue, 15 Nov 2011 03:31:25 +0100

 Jan Beich wrote:
 > "Julian H. Stacey" <jhs@berklix.com> writes:
 > 
 > > Hi,
 > > Jan cc'd (patch submitter),
 > >  Did you check the patch still allows builds on 8.2-RELEASE ?
 > >  If so, Approved,
 > > Julian S ports/lang/pbasic MAINTAINER=
 > 
 > No, I don't have a local tinderbox. But it should still build fine with
 > gcc in base.
 
 I applied your patch on 8.2-RELEASE.  It built, installed & ran OK on amd64.
 
 	
 > > PS Phil <phil@cockcroft.de> author of generic. :
 > > Seems it's a tweak to top Makefile to make it build with latest
 > > FreeBSD ports/ make macros in current. I haven't checked detail (as
 > > not currently running current or 9.0-RC1). 
 > 
 > It's not related to issues on 10.0-CURRENT. The patch aims to fix
 > build with redefined CC in make.conf(5) as well as leveraging
 > defaults CFLAGS from /usr/share/mk/sys.mk. A common user of CFLAGS
 > is WITH_DEBUG provided by bsd.port.mk.
 > 
 >   http://www.freebsd.org/doc/en/books/porters-handbook/dads-cc.html
 >   http://www.freebsd.org/doc/en/books/porters-handbook/dads-cflags.html
 
 I read URLs above, looked at the effect after running make patch
 (using new (Jan) post-patch: in ports/lang/pbasic/Makefile re. '='
 to '+=' Looks good, Thanks :-)
 
 The _4_ Lines beginning "post-patch" look good, ready to commit, Thanks.
 
 
 Line 5:
 	${ECHO_CMD} '.PHONY: $$(SYSTEMS)' >>${WRKSRC}/makefile
 looks maybe wrong, we need longer to think about that last bit please.
 
 FYI for Phil:
 
 I'm new to .PHONY operator, but 
 freebsd-8.2 man make:
      .PHONY      Apply the .PHONY attribute to any specified sources.  Targets
                  with this attribute are always considered to be out of date.
      ....
      To prevent infinite loops the following source Makefile targets are
      ignored:
      o   targets that have .PHONY or .EXEC attributes
 Looking at examples
 	cd /pub/FreeBSD/branches/-current/ports     
 	find . -name Makefile | xargs grep '.PHONY'
 		Makefile:${INDEXDIR}/${INDEXFILE}.bz2: .PHONY
 		benchmarks/lmbench/files/Makefile:.PHONY:     results rerun see
 		comms/predict/files/Makefile:.PHONY:  clean build
 		editors/vim/Makefile:cklatest: .PHONY
 	cd [8.2-RELEASE] /usr/share/mk ; grep PHONY *
 		bsd.info.mk:.PHONY: ${INSTALLINFODIRS}
 		bsd.obj.mk:obj: .PHONY
 		bsd.subdir.mk:${SUBDIR}: .PHONY
 .PHONY seen above both as 
 	target to the left of ':'
 	source to the right of ':'
 
 
 PS When a commit is done, please also 
 	s/"currently "phil@gmrs.isar.de" but changes a lot/phil@cockcroft.de/
 
 Cheers,
 Julian
 -- 
 Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
  Reply below, not above;  Indent with "> ";  Cumulative like a play script.
  Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.

From: Jan Beich <jbeich@tormail.net>
To: "Julian H. Stacey" <jhs@berklix.com>
Cc: bug-followup@freebsd.org, phil@cockcroft.de
Subject: Re: ports/162539: [patch] lang/pbasic: respect CC/CFLAGS
Date: Tue, 15 Nov 2011 15:16:01 +0200

 "Julian H. Stacey" <jhs@berklix.com> writes:
 
 > Line 5:
 > 	${ECHO_CMD} '.PHONY: $$(SYSTEMS)' >>${WRKSRC}/makefile
 > looks maybe wrong, we need longer to think about that last bit please.
 
 This is done to prevent `freebsd' directory marking `freebsd' target as up to
 date after touching freebsd/Makefile. Try to comment out and you'd get
 
   $ make
   ===>  Vulnerability check disabled, database not found
   ===>  License check disabled, port has not defined LICENSE
   ===>  Extracting for pbasic-2.0
   => SHA256 Checksum OK for pbasic-2.0-950813.tar.gz.
   ===>  Patching for pbasic-2.0
   ===>  Applying FreeBSD patches for pbasic-2.0
   ===>  Configuring for pbasic-2.0
   cd /usr/ports/lang/pbasic/work/pbasic-2.0-950813 ; /bin/rm -rf termio m68000 msdos vax pyramid ns32000  pdp11 cursor/cursor.dos cursor/cursor.ukc
   ===>  Building for pbasic-2.0
   `freebsd' is up to date.
 
 ref. http://www.gnu.org/s/hello/manual/make/Phony-Targets.html

From: "Julian H. Stacey" <jhs@berklix.com>
To: Jan Beich <jbeich@tormail.net>
Cc: bug-followup@freebsd.org, phil@cockcroft.de
Subject: Re: ports/162539: [patch] lang/pbasic: respect CC/CFLAGS 
Date: Thu, 24 Nov 2011 00:56:15 +0100

 Hi,
 Reference:
 > From:		Jan Beich <jbeich@tormail.net> 
 > Date:		Tue, 15 Nov 2011 15:16:01 +0200 
 > Message-id:	<1RQIsb-000Njp-Tl@internal.tormail.net> 
 
 Jan Beich wrote:
 > "Julian H. Stacey" <jhs@berklix.com> writes:
 > 
 > > Line 5:
 > > 	${ECHO_CMD} '.PHONY: $$(SYSTEMS)' >>${WRKSRC}/makefile
 > > looks maybe wrong, we need longer to think about that last bit please.
 > 
 > This is done to prevent `freebsd' directory marking `freebsd' target as up to
 > date after touching freebsd/Makefile. Try to comment out and you'd get
 > 
 >   $ make
 >   ===>  Vulnerability check disabled, database not found
 >   ===>  License check disabled, port has not defined LICENSE
 >   ===>  Extracting for pbasic-2.0
 >   => SHA256 Checksum OK for pbasic-2.0-950813.tar.gz.
 >   ===>  Patching for pbasic-2.0
 >   ===>  Applying FreeBSD patches for pbasic-2.0
 >   ===>  Configuring for pbasic-2.0
 >   cd /usr/ports/lang/pbasic/work/pbasic-2.0-950813 ; /bin/rm -rf termio m68000 msdos vax pyramid ns32000  pdp11 cursor/cursor.dos cursor/cursor.ukc
 >   ===>  Building for pbasic-2.0
 >   `freebsd' is up to date.
 > 
 > ref. http://www.gnu.org/s/hello/manual/make/Phony-Targets.html
 
 OK Thanks Jan, Approved
 Sorry about the delay.
 
 Cheers,
 Julian
 -- 
 Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
  Reply below not above, cumulative like a play script, & indent with "> ".
  Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.
State-Changed-From-To: feedback->closed 
State-Changed-By: miwi 
State-Changed-When: Thu Nov 24 16:05:21 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/162539: commit references a PR
Date: Thu, 24 Nov 2011 16:05:27 +0000 (UTC)

 miwi        2011-11-24 16:05:13 UTC
 
   FreeBSD ports repository
 
   Modified files:
     lang/pbasic          Makefile 
   Log:
   - respect CC/CFLAGS
   
   PR:             162539
   Submitted by:   Jan Beich <jbeich@tormail.net>
   Approved by:    maintainer
   Feature safe:   yes
   
   Revision  Changes    Path
   1.20      +6 -0      ports/lang/pbasic/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:
