Subject: Fixing lots of my PRs (was Re: work.i386/.work.log missing?)
To: Kouichirou Hiratsuka <hira@po6.nsk.ne.jp>
From: Hisashi T Fujinaka <htodd@twofifty.com>
List: tech-pkg
Date: 01/26/2005 15:02:36
On Thu, 27 Jan 2005, Kouichirou Hiratsuka wrote:

> Hello,
>
> At Tue, 25 Jan 2005 10:49:25 -0800 (PST), Hisashi T Fujinaka wrote:
>>
>> I'm still having trouble compiling some things, (vim on sparc, netpbm on
>> i386) and it tells me to check .work.log, but .work.log has been missing
>> as of this morning.
>>
> Same problem has happened in graphics/MesaLib.
>
> # cd /usr/pkgsrc/graphics/glut; make
> [snip]
> make: stopped in /usr/pkgsrc/graphics/MesaLib/work/Mesa-6.2.1
> *** Error code 1
>
> Stop.
> make: stopped in /usr/pkgsrc/graphics/MesaLib
> ===>
> ===> There was an error during the ``build'' phase.
> ===> Please investigate the following for more information:
> ===>      * log of the build
> ===>      * /usr/pkgsrc/graphics/MesaLib/work/.work.log
> ===>
> *** Error code 1
>
> Stop.
> make: stopped in /usr/pkgsrc/graphics/MesaLib
> *** Error code 1
>
> Stop.
> make: stopped in /usr/pkgsrc/graphics/MesaLib
> *** Error code 1
>
> Stop.
> make: stopped in /usr/pkgsrc/graphics/glut
> *** Error code 1
> Stop.
> make: stopped in /usr/pkgsrc/graphics/glut
> # ls /usr/pkgsrc/graphics/MesaLib/work/.work.log
> ls: /usr/pkgsrc/graphics/MesaLib/work/.work.log: No such file or directory
> #
>
> It seems that this problem is related to changes between rev. 1.1570
> and rev. 1.1571 of mk/bsd.pkg.mk.  Since rev. 1.1571, PREPEND_PATH
> is not added to PATH and BUILD_ENV.  Is this really OK?
>
> I can build graphics/MesaLib again with the following patch.
>
> best regards.
> --
> Kouichirou Hiratsuka
>   hira@po6.nsk.ne.jp
>
> Index: mk/bsd.pkg.mk
> ===================================================================
> RCS file: /cvs/cvsroot/pkgsrc/mk/bsd.pkg.mk,v
> retrieving revision 1.1574
> diff -u -r1.1574 bsd.pkg.mk
> --- mk/bsd.pkg.mk	25 Jan 2005 18:15:58 -0000	1.1574
> +++ mk/bsd.pkg.mk	26 Jan 2005 22:15:48 -0000
> @@ -1161,6 +1161,14 @@
> .  include "../../mk/dirs.mk"
> .endif
>
> +_PREPENDED_TO_PATH?=	# empty
> +.for _dir_ in ${PREPEND_PATH}
> +.  if empty(_PREPENDED_TO_PATH:M${_dir_})
> +_PREPENDED_TO_PATH+=	${_dir_}
> +PATH:=			${_dir_}:${PATH}
> +.  endif
> +.endfor
> +
> # Find out the PREFIX of dependencies where the PREFIX is needed at build time.
> .if defined(EVAL_PREFIX)
> .  for def in ${EVAL_PREFIX}
> @@ -1188,6 +1196,7 @@
> # processes for build-related phases.
> #
> BUILD_ENV+=	PATH=${PATH:Q}
> +BUILD_ENV+=	_PREPENDED_TO_PATH=${_PREPENDED_TO_PATH:Q}
>
> .MAIN: all

This fixes PRs 29120, 29121, 29125, 29131.

I'm cc'ing Thomas because he was looking into 29125, and tv since I
think he was the last one to touch the file (but I'm often wrong about
cvs logs).

-- 
Hisashi T Fujinaka - htodd@twofifty.com
BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte