Subject: Re: Malformed conditional && solaris
To: None <mlh@goathill.org, reed@reedmedia.net>
From: Gilles Dauphin <Gilles.Dauphin@enst.fr>
List: tech-pkg
Date: 09/01/2005 10:42:28
> Delivered-To: dauphin@enst.fr
> X-Original-To: tech-pkg@netbsd.org
> Delivered-To: tech-pkg@netbsd.org
> From: "Jeremy C. Reed" <reed@reedmedia.net>
> To: MLH <mlh@goathill.org>
> Cc: tech-pkg@NetBSD.org
> Subject: Re: Malformed conditional && solaris
> X-Virus-Scanned: amavisd-new at enst.fr
>
> On Wed, 31 Aug 2005, MLH wrote:
>
> > Why is bmake complaining about this on Solaris ?
> >
> > bmake: "/usr/pkgsrc/x11/py-qt3-sip/Makefile" line 38: Malformed conditional
> > (${OPSYS} == "SunOS" && !empty(CC_VERSION:Mgcc*))
Many package have this bug. I move the conditional expression
after "../../mk/bsd.prefs.mk" and work for me. That is true also
if you set CFLAGS.SunOS before this include.
>
> This is the code I committed for you. I don't know what changed. But now I
> think this CC_VERSION requires including the ../../mk/compiler.mk first.
>
> Maybe use following instead. I wasn't even checking for version 3 in the
> first place, so using PKGSRC_COMPILER for checking gcc should be good
> enough.
>
> (This just replaces CC_VERSION with PKGSRC_COMPILER.)
>
> Index: x11/py-qt3-sip/Makefile
> ===================================================================
> RCS file: /cvsroot/pkgsrc/x11/py-qt3-sip/Makefile,v
> retrieving revision 1.17
> diff -b -u -r1.17 Makefile
> --- x11/py-qt3-sip/Makefile 1 Jul 2005 01:27:09 -0000 1.17
> +++ x11/py-qt3-sip/Makefile 31 Aug 2005 23:46:38 -0000
> @@ -35,7 +35,7 @@
> CONFIGURE_ARGS+= LFLAGS_PLUGIN="-bundle -flat_namespace -undefined
suppress"
> .else
> CONFIGURE_ARGS+= CFLAGS_SHLIB=-fPIC
> -.if ${OPSYS} == "SunOS" && !empty(CC_VERSION:Mgcc*)
> +.if ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc*)
> # gcc3 uses -mimpure-text to not pass -assert pure-text to the linker
> CONFIGURE_ARGS+= LFLAGS_SHLIB="-shared -mimpure-text"
avoid the '-mimpure-text' this is a potential bug for multiprocess.
That's a nightmare to debug when multiprocess.
a 'const' must be a 'const'.
> .else
>
> Jeremy C. Reed
>
> BSD News, BSD tutorials, BSD links
> http://www.bsdnewsletter.com/