Subject: Re: ports/140574: ports/x11-toolkits/Xaw3d/Makefile needs xmkmf from devel/imake
From: FreeBSD-gnats-submit@@@FreeBSD.org
Date: Sun, 15 Nov 2009 16:50:03 GMT (17:50 CET)
To: Julian H. Stacey <jhs@@@berklix.com>

Thank you very much for your problem report.
It has the internal identification `ports/140574'.
The individual assigned to look at your
report is: freebsd-ports-bugs. 

You can access the state of your problem report at any time
via this link:

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

>Category:       ports
>Responsible:    freebsd-ports-bugs
>Synopsis:       ports/x11-toolkits/Xaw3d/Makefile needs xmkmf from devel/imake
>Arrival-Date:   Sun Nov 15 16:50:03 UTC 2009
------------
To: FreeBSD-gnats-submit@@@freebsd.org
Subject: ports/x11-toolkits/Xaw3d/Makefile needs xmkmf from devel/imake
From: Julian H. Stacey <jhs@@@berklix.com>
Reply-To: Julian H. Stacey <jhs@@@berklix.com>
cc: dinoex@@@freebsd.org
X-send-pr-version: 3.113
X-GNATS-Notify: 


>Submitter-Id:	current-users
>Originator:	Julian H. Stacey <jhs@@@berklix.com>
>Organization:	/home/jhs/.organization
>Confidential:	no 
>Synopsis:	ports/x11-toolkits/Xaw3d/Makefile needs xmkmf from devel/imake
>Severity:	serious 
>Priority:	medium 
>Category:	ports
>Class:		change-request 
>Release:	FreeBSD 6.4-RELEASE i386
>Environment:
System: FreeBSD mart.js.berklix.net 6.4-RELEASE FreeBSD 6.4-RELEASE #0: Fri Nov 6 02:54:56 CET 2009 jhs@@@mart.js.berklix.net:/usr1/src/sys/i386/compile/MART.small i386

>Description:
	
Makefile fails if xmkmf not found.
>How-To-Repeat:
	
	mv `which xmkf` `which xmkf`.MV  ; rehash
	cd /usr/ports/x11-toolkits/Xaw3d;make
>Fix:

	
A copy of diff is in
http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/ports/gen/x11-toolkits/Xaw3d/

*** 6.4-RELEASE/ports/x11-toolkits/Xaw3d/Makefile	Sun Nov 15 09:57:11 2009
--- generic-new/ports/x11-toolkits/Xaw3d/Makefile	Sun Nov 15 10:12:00 2009
***************
*** 14,19 ****
--- 14,21 ----
  MAINTAINER=	dinoex@FreeBSD.org
  COMMENT=	A 3-D Athena Widget set that looks like Motif
  
+ BUILD_DEPENDS+=	${LOCALBASE}/bin/xmkmf:${PORTSDIR}/devel/imake
+ 
  WRKSRC=		${WRKDIR}/xc/lib/Xaw3d
  USE_IMAKE=	yes
  USE_LDCONFIG=	yes


To:		dinoex@@@FreeBSD.org
cc: jhs@@@berklix.com
Subject:	Re: ports/140574: ports/x11-toolkits/Xaw3d/Makefile needs xmkmf from devel/imake 
From:		"Julian H. Stacey" <jhs@@@berklix.com>
Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany
Fcc:		sent
User-agent:	EXMH on FreeBSD http://www.berklix.com/free/
X-URL:		http://www.berklix.com
In-reply-to:	Your message "Sun, 15 Nov 2009 19:26:06 +0100."
		<200911151826.nAFIQ6tG014744@@@freefall.freebsd.org> 

Hi dinoex
Thanks for your quick response,

Reference:
> From:		dinoex@@@FreeBSD.org 
> Date:		Sun, 15 Nov 2009 19:26:06 +0100 (CET) 
> Message-id:	<200911151826.nAFIQ6tG014744@@@freefall.freebsd.org> 

dinoex@@@FreeBSD.org wrote:
> Synopsis: ports/x11-toolkits/Xaw3d/Makefile needs xmkmf from devel/imake
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: dinoex
> State-Changed-When: Sun Nov 15 19:23:18 CET 2009
> State-Changed-Why: 
> 
> Please check again.
> Dependecies of imake is already there. (USE_IMAKE=yes in the Makefile)
> 
> $ make build-depends-list
> /usr/ports/devel/imake
> /usr/ports/x11-toolkits/libXmu
> /usr/ports/x11-toolkits/libXt
> /usr/ports/x11/libICE
> /usr/ports/x11/libSM
> /usr/ports/x11/libX11
> /usr/ports/x11/libXext
> /usr/ports/x11/libXpm
> 
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=140574

On 6.4, I see less than you, but the important imake is there.
    cd /usr/ports/x11-toolkits/Xaw3d make build-depends-list
        /usr/ports/devel/imake
        /usr/ports/x11/xorg-libraries

Sorry I didnt notice USE_IMAKE before.  Looking in bsd.port.mk I see 
    .if defined(USE_IMAKE) 
    BUILD_DEPENDS+=         imake:${X_IMAKE_PORT}
    .endif

Mu system had somehow not got xmkmf, although it had imake,
(maybe xmkmf got lost in upgrade or fsck sometime, whatever),
so USE_IMAKE did not reinstall ports/devel/imake

One way to protect against that would be to extend bsd.port.mk to
    .if defined(USE_IMAKE) 
    BUILD_DEPENDS+=         imake:${X_IMAKE_PORT}
    BUILD_DEPENDS+=         xmkmf:${X_IMAKE_PORT}
    .endif

looking at imake/pkg-plist 
	bin/ccmakedep
	bin/cleanlinks
	bin/imake
	bin/makeg
	bin/mergelib
	bin/mkdirhier
	bin/mkhtmlindex
	bin/revpath
	bin/xmkmf

but I wouldnt necessarily go so far as to suggest adding all.  
What do you think ?

PS Ive got another make of something else running on that box right now,
when that finishes, I'll tweak things & retry.
