From nobody@FreeBSD.org  Wed Sep 26 21:57:03 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 47BAC106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 26 Sep 2012 21:57:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 325F38FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 26 Sep 2012 21:57:03 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q8QLv2UL061284
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 26 Sep 2012 21:57:02 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q8QLv2FB061283;
	Wed, 26 Sep 2012 21:57:02 GMT
	(envelope-from nobody)
Message-Id: <201209262157.q8QLv2FB061283@red.freebsd.org>
Date: Wed, 26 Sep 2012 21:57:02 GMT
From: Oliver Pinter <oliver.pntr@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] xdm build error with clang-cpp
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         172100
>Category:       ports
>Synopsis:       [PATCH] x11/xdm build error with clang-cpp
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    x11
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 26 22:00:16 UTC 2012
>Closed-Date:    Thu Sep 27 09:46:00 UTC 2012
>Last-Modified:  Thu Sep 27 11:30:06 UTC 2012
>Originator:     Oliver Pinter
>Release:        FreeBSD 10-CURRENT
>Organization:
>Environment:
FreeBSD pandora-test 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r+e17c996: Tue Sep 25 20:02:51 CEST 2012     root@pandora-test:/usr/obj/usr/src/sys/OP  amd64
>Description:
XDM build error (broken autoconf preprocessor test) when using clang as base c compiler (WITH_CLANG_IS_CC= in src.conf)
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/x11/xdm/Makefile b/x11/xdm/Makefile
index 51dbe09..4372ec8 100644
--- a/x11/xdm/Makefile
+++ b/x11/xdm/Makefile
@@ -28,6 +28,16 @@ OPTIONS=	XDMSHELL "Install xdmshell" off
 
 .include <bsd.port.options.mk>
 
+# XXX unbreak build with clang as CC
+CPP_check!=	${CPP} --version | tr -d '()'
+.if ${CPP_check:Mclang}
+.if exists(/usr/bin/gcpp)
+CONFIGURE_ENV+=	ac_cv_path_RAWCPP="gcpp"
+.else
+BROKEN=         does not build without gcc cpp
+.endif
+.endif
+
 .if defined(WITH_XDMSHELL)
 CONFIGURE_ARGS+=--enable-xdmshell
 MAN1+=		xdmshell.1


>Release-Note:
>Audit-Trail:

From: Jan Beich <jbeich@tormail.org>
To: Oliver Pinter <oliver.pntr@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/172100: [PATCH] xdm build error with clang-cpp
Date: Wed, 26 Sep 2012 17:58:22 -0700

 --=-=-=
 Content-Type: text/plain
 Content-Disposition: inline
 
 Here's the same apporach taken by ports/166373. From a brief review
 clang-cpp damage is mostly cosmetic.
 
 I don't use xdm nor have /usr/bin/gcpp on my box but do have
 /usr/local/bin/cpp47 from lang/gcc47 (pulled as Fortran dependency).
 
 
 --=-=-=
 Content-Type: text/x-patch
 Content-Disposition: attachment; filename=clang-cpp.diff
 
 Index: x11/xdm/Makefile
 ===================================================================
 --- x11/xdm/Makefile	(revision 304222)
 +++ x11/xdm/Makefile	(working copy)
 @@ -38,6 +39,8 @@ PLIST_SUB+=	XDMSHELL="@comment "
  .endif
  
  post-patch:
 +	@${REINPLACE_CMD} 's/test.*-traditional.*;/true;/' \
 +		${WRKSRC}/configure
  	@${REINPLACE_CMD} -e "s|XDMCONFIGDIR/|${PREFIX}/lib/X11/xdm/|" \
  		-e "s|XDMSCRIPTDIR/|${PREFIX}/lib/X11/xdm/|" \
  			${WRKSRC}/config/xdm-config.cpp \
 Index: x11/xdm/files/patch-config-Xresources.cpp
 ===================================================================
 --- x11/xdm/files/patch-config-Xresources.cpp	(revision 0)
 +++ x11/xdm/files/patch-config-Xresources.cpp	(working copy)
 @@ -0,0 +1,14 @@
 +--- config/Xresources.cpp~
 ++++ config/Xresources.cpp
 +@@ -60,9 +60,9 @@ xlogin*hiColor: black
 + XHASHendif
 + #ifdef XPM
 + XHASHif PLANES >= 8
 +-xlogin*logoFileName: BITMAPDIR/**//XDM_PIXMAP
 ++xlogin*logoFileName: BITMAPDIR/XDM_PIXMAP
 + XHASHelse
 +-xlogin*logoFileName: BITMAPDIR/**//XDM_BWPIXMAP
 ++xlogin*logoFileName: BITMAPDIR/XDM_BWPIXMAP
 + XHASHendif
 + xlogin*useShape: true
 + xlogin*logoPadding: 10
 
 --=-=-=
 Content-Type: text/x-patch; charset=utf-8
 Content-Disposition: attachment; filename=whitespace-encoded.diff
 Content-Transfer-Encoding: quoted-printable
 Content-Description: preprocessed for viewing with diff-refine-hunk
 
 --- config/Xreset	cpp47
 +++ config/Xreset	clang-cpp
 @@ -1,4 +1,6 @@\$
 +\$
 +\$
  #!/bin/sh\$
  #=C2=B7Deregister=C2=B7a=C2=B7login.=C2=B7(Derived=C2=B7from=C2=B7TakeCons=
 ole=C2=B7as=C2=B7follows:)\$
  #\$
 -/usr/local/bin/sessreg=C2=B7-d=C2=B7-w=C2=B7/var/log/wtmp=C2=B7-u=C2=B7/va=
 r/run/utmp=C2=B7\^I-x=C2=B7/usr/local/lib/X11/xdm/Xservers=C2=B7-l=C2=B7$DI=
 SPLAY=C2=B7-h=C2=B7""=C2=B7$USER\$
 +/usr/local/bin/sessreg=C2=B7-d=C2=B7-w=C2=B7/var/log/wtmp=C2=B7-u=C2=B7/va=
 r/run/utmp=C2=B7-x=C2=B7/usr/local/lib/X11/xdm/Xservers=C2=B7-l=C2=B7$DISPL=
 AY=C2=B7-h=C2=B7""=C2=B7$USER\$
 --- config/Xresources	cpp47
 +++ config/Xresources	clang-cpp
 @@ -1,19 +1,21 @@\$
 +\$
 +\$
  Xcursor.theme:=C2=B7whiteglass\$
  \$
  \$
  \$
  xlogin*login.translations:=C2=B7#override=C2=B7\\\$
 -\^ICtrl<Key>R:=C2=B7abort-display()\\n\\\$
 -\^I<Key>F1:=C2=B7set-session-argument(failsafe)=C2=B7finish-field()\\n\\\$
 -\^I<Key>Delete:=C2=B7delete-character()\\n\\\$
 -\^I<Key>Left:=C2=B7move-backward-character()\\n\\\$
 -\^I<Key>Right:=C2=B7move-forward-character()\\n\\\$
 -\^I<Key>Home:=C2=B7move-to-begining()\\n\\\$
 -\^I<Key>End:=C2=B7move-to-end()\\n\\\$
 -\^ICtrl<Key>KP_Enter:=C2=B7set-session-argument(failsafe)=C2=B7finish-fiel=
 d()\\n\\\$
 -\^I<Key>KP_Enter:=C2=B7set-session-argument()=C2=B7finish-field()\\n\\\$
 -\^ICtrl<Key>Return:=C2=B7set-session-argument(failsafe)=C2=B7finish-field(=
 )\\n\\\$
 -\^I<Key>Return:=C2=B7set-session-argument()=C2=B7finish-field()\$
 +=C2=B7Ctrl<Key>R:=C2=B7abort-display()\\n\\\$
 +=C2=B7<Key>F1:=C2=B7set-session-argument(failsafe)=C2=B7finish-field()\\n\=
 \\$
 +=C2=B7<Key>Delete:=C2=B7delete-character()\\n\\\$
 +=C2=B7<Key>Left:=C2=B7move-backward-character()\\n\\\$
 +=C2=B7<Key>Right:=C2=B7move-forward-character()\\n\\\$
 +=C2=B7<Key>Home:=C2=B7move-to-begining()\\n\\\$
 +=C2=B7<Key>End:=C2=B7move-to-end()\\n\\\$
 +=C2=B7Ctrl<Key>KP_Enter:=C2=B7set-session-argument(failsafe)=C2=B7finish-f=
 ield()\\n\\\$
 +=C2=B7<Key>KP_Enter:=C2=B7set-session-argument()=C2=B7finish-field()\\n\\\$
 +=C2=B7Ctrl<Key>Return:=C2=B7set-session-argument(failsafe)=C2=B7finish-fie=
 ld()\\n\\\$
 +=C2=B7<Key>Return:=C2=B7set-session-argument()=C2=B7finish-field()\$
  \$
  xlogin*greeting:=C2=B7Welcome=C2=B7to=C2=B7CLIENTHOST\$
  xlogin*namePrompt:=C2=B7\\040\\040\\040\\040\\040\\040\\040Login:\$
 @@ -24,19 +26,19 @@ xlogin*greetFont: -adobe-helvetica-bold-\$
  xlogin*font:=C2=B7-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8=
 859-1\$
  xlogin*promptFont:=C2=B7-adobe-helvetica-bold-r-normal--18-180-75-75-p-103=
 -iso8859-1\$
  xlogin*failFont:=C2=B7-adobe-helvetica-bold-r-normal--18-180-75-75-p-103-i=
 so8859-1\$
 -xlogin*greetFace:\^ISerif-24:bold:italic\$
 -xlogin*face:=C2=B7\^I\^IHelvetica-18\$
 -xlogin*promptFace:=C2=B7\^IHelvetica-18:bold\$
 -xlogin*failFace:=C2=B7\^IHelvetica-18:bold\$
 +xlogin*greetFace:=C2=B7Serif-24:bold:italic\$
 +xlogin*face:=C2=B7Helvetica-18\$
 +xlogin*promptFace:=C2=B7Helvetica-18:bold\$
 +xlogin*failFace:=C2=B7Helvetica-18:bold\$
  #else\$
  xlogin*greetFont:=C2=B7-adobe-helvetica-bold-o-normal--17-120-100-100-p-92=
 -iso8859-1\$
  xlogin*font:=C2=B7-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8=
 859-1\$
  xlogin*promptFont:=C2=B7-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-=
 iso8859-1\$
  xlogin*failFont:=C2=B7-adobe-helvetica-bold-o-normal--14-140-75-75-p-82-is=
 o8859-1\$
 -xlogin*greetFace:\^ISerif-18:bold:italic\$
 -xlogin*face:\^I\^IHelvetica-12\$
 -xlogin*promptFace:\^IHelvetica-12:bold\$
 -xlogin*failFace:\^IHelvetica-14:bold\$
 +xlogin*greetFace:=C2=B7Serif-18:bold:italic\$
 +xlogin*face:=C2=B7Helvetica-12\$
 +xlogin*promptFace:=C2=B7Helvetica-12:bold\$
 +xlogin*failFace:=C2=B7Helvetica-14:bold\$
  #endif\$
  \$
  #ifdef=C2=B7COLOR\$
 @@ -60,23 +62,23 @@ xlogin*hiColor: black\$
  #endif\$
  \$
  #if=C2=B7PLANES=C2=B7>=3D=C2=B78\$
 -xlogin*logoFileName:=C2=B7/usr/local/lib/X11/xdm/pixmaps/xorg.xpm\$
 +xlogin*logoFileName:=C2=B7/usr/local/lib/X11/xdm/pixmaps=C2=B7/xorg.xpm\$
  #else\$
 -xlogin*logoFileName:=C2=B7/usr/local/lib/X11/xdm/pixmaps/xorg-bw.xpm\$
 +xlogin*logoFileName:=C2=B7/usr/local/lib/X11/xdm/pixmaps=C2=B7/xorg-bw.xpm=
 \$
  #endif\$
  xlogin*useShape:=C2=B7true\$
  xlogin*logoPadding:=C2=B710\$
  \$
  \$
 -XConsole.text.geometry:\^I480x130\$
 -XConsole.verbose:\^Itrue\$
 -XConsole*iconic:\^Itrue\$
 -XConsole*font:\^I\^Ifixed\$
 -\$
 -Chooser*geometry:\^I\^I700x500+300+200\$
 -Chooser*allowShellResize:\^Ifalse\$
 -Chooser*viewport.forceBars:\^Itrue\$
 -Chooser*label.font:\^I\^I*-new=C2=B7century=C2=B7schoolbook-bold-i-normal-=
 *-240-*\$
 -Chooser*label.label:\^I\^IXDMCP=C2=B7Host=C2=B7Menu=C2=B7from=C2=B7CLIENTH=
 OST\$
 -Chooser*list.font:\^I\^I-*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1\$
 -Chooser*Command.font:\^I\^I*-new=C2=B7century=C2=B7schoolbook-bold-r-norma=
 l-*-180-*\$
 +XConsole.text.geometry:=C2=B7480x130\$
 +XConsole.verbose:=C2=B7true\$
 +XConsole*iconic:=C2=B7true\$
 +XConsole*font:=C2=B7fixed\$
 +\$
 +Chooser*geometry:=C2=B7700x500+300+200\$
 +Chooser*allowShellResize:=C2=B7false\$
 +Chooser*viewport.forceBars:=C2=B7true\$
 +Chooser*label.font:=C2=B7*-new=C2=B7century=C2=B7schoolbook-bold-i-normal-=
 *-240-*\$
 +Chooser*label.label:=C2=B7XDMCP=C2=B7Host=C2=B7Menu=C2=B7from=C2=B7CLIENTH=
 OST\$
 +Chooser*list.font:=C2=B7-*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1\$
 +Chooser*Command.font:=C2=B7*-new=C2=B7century=C2=B7schoolbook-bold-r-norma=
 l-*-180-*\$
 --- config/Xservers	cpp47
 +++ config/Xservers	clang-cpp
 @@ -1,12 +1,14 @@\$
 +\$
 +\$
  #\$
  #=C2=B7Xservers=C2=B7file,=C2=B7workstation=C2=B7prototype\$
  #\$
  #=C2=B7This=C2=B7file=C2=B7should=C2=B7contain=C2=B7an=C2=B7entry=C2=B7to=
 =C2=B7start=C2=B7the=C2=B7server=C2=B7on=C2=B7the\$
  #=C2=B7local=C2=B7display;=C2=B7if=C2=B7you=C2=B7have=C2=B7more=C2=B7than=
 =C2=B7one=C2=B7display=C2=B7(not=C2=B7screen),\$
 -#=C2=B7you=C2=B7can=C2=B7add=C2=B7entries=C2=B7to=C2=B7the=C2=B7list=C2=B7=
 (one=C2=B7per=C2=B7line).=C2=B7=C2=B7If=C2=B7you=C2=B7also\$
 +#=C2=B7you=C2=B7can=C2=B7add=C2=B7entries=C2=B7to=C2=B7the=C2=B7list=C2=B7=
 (one=C2=B7per=C2=B7line).=C2=B7If=C2=B7you=C2=B7also\$
  #=C2=B7have=C2=B7some=C2=B7X=C2=B7terminals=C2=B7connected=C2=B7which=C2=
 =B7do=C2=B7not=C2=B7support=C2=B7XDMCP,\$
 -#=C2=B7you=C2=B7can=C2=B7add=C2=B7them=C2=B7here=C2=B7as=C2=B7well.=C2=B7=
 =C2=B7Each=C2=B7X=C2=B7terminal=C2=B7line=C2=B7should\$
 +#=C2=B7you=C2=B7can=C2=B7add=C2=B7them=C2=B7here=C2=B7as=C2=B7well.=C2=B7E=
 ach=C2=B7X=C2=B7terminal=C2=B7line=C2=B7should\$
  #=C2=B7look=C2=B7like:\$
 -#\^IXTerminalName:0=C2=B7foreign\$
 +#=C2=B7XTerminalName:0=C2=B7foreign\$
  #\$
  :0=C2=B7local=C2=B7/usr/local/bin/X=C2=B7:0=C2=B7\$
 --- config/Xservers.ws	cpp47
 +++ config/Xservers.ws	clang-cpp
 @@ -1,12 +1,14 @@\$
 +\$
 +\$
  #\$
  #=C2=B7Xservers=C2=B7file,=C2=B7workstation=C2=B7prototype\$
  #\$
  #=C2=B7This=C2=B7file=C2=B7should=C2=B7contain=C2=B7an=C2=B7entry=C2=B7to=
 =C2=B7start=C2=B7the=C2=B7server=C2=B7on=C2=B7the\$
  #=C2=B7local=C2=B7display;=C2=B7if=C2=B7you=C2=B7have=C2=B7more=C2=B7than=
 =C2=B7one=C2=B7display=C2=B7(not=C2=B7screen),\$
 -#=C2=B7you=C2=B7can=C2=B7add=C2=B7entries=C2=B7to=C2=B7the=C2=B7list=C2=B7=
 (one=C2=B7per=C2=B7line).=C2=B7=C2=B7If=C2=B7you=C2=B7also\$
 +#=C2=B7you=C2=B7can=C2=B7add=C2=B7entries=C2=B7to=C2=B7the=C2=B7list=C2=B7=
 (one=C2=B7per=C2=B7line).=C2=B7If=C2=B7you=C2=B7also\$
  #=C2=B7have=C2=B7some=C2=B7X=C2=B7terminals=C2=B7connected=C2=B7which=C2=
 =B7do=C2=B7not=C2=B7support=C2=B7XDMCP,\$
 -#=C2=B7you=C2=B7can=C2=B7add=C2=B7them=C2=B7here=C2=B7as=C2=B7well.=C2=B7=
 =C2=B7Each=C2=B7X=C2=B7terminal=C2=B7line=C2=B7should\$
 +#=C2=B7you=C2=B7can=C2=B7add=C2=B7them=C2=B7here=C2=B7as=C2=B7well.=C2=B7E=
 ach=C2=B7X=C2=B7terminal=C2=B7line=C2=B7should\$
  #=C2=B7look=C2=B7like:\$
 -#\^IXTerminalName:0=C2=B7foreign\$
 +#=C2=B7XTerminalName:0=C2=B7foreign\$
  #\$
  :0=C2=B7local=C2=B7/usr/local/bin/X=C2=B7:0=C2=B7\$
 --- config/Xsession	cpp47
 +++ config/Xsession	clang-cpp
 @@ -1,3 +1,5 @@\$
 +\$
 +\$
  #!/bin/sh\$
  #\$
  \$
 @@ -6,28 +8,28 @@\$
  errfile=3D"$HOME/.xsession-errors"\$
  if=C2=B7(=C2=B7umask=C2=B7077=C2=B7&&=C2=B7cp=C2=B7/dev/null=C2=B7"$errfil=
 e"=C2=B72>=C2=B7/dev/null=C2=B7)\$
  then\$
 -\^Iexec=C2=B7>=C2=B7"$errfile"=C2=B72>&1\$
 +=C2=B7exec=C2=B7>=C2=B7"$errfile"=C2=B72>&1\$
  else\$
  \$
 -\^Imktemp=3D/usr/bin/mktemp\$
 -\^Ifor=C2=B7errfile=C2=B7in=C2=B7"${TMPDIR-/tmp}/xses-$USER"=C2=B7"/tmp/xs=
 es-$USER"\$
 -\^Ido\$
 -\^I\^Iif=C2=B7ef=3D"$(=C2=B7umask=C2=B7077=C2=B7&&=C2=B7$mktemp=C2=B7"$err=
 file.XXXXXX"=C2=B72>=C2=B7/dev/null)"\$
 -\^I\^Ithen\$
 -\^I\^I\^Iexec=C2=B7>=C2=B7"$ef"=C2=B72>&1\$
 -\^I\^I\^Imv=C2=B7"$ef"=C2=B7"$errfile"=C2=B72>=C2=B7/dev/null\$
 -\^I\^I\^Ibreak\$
 -\^I\^Ifi\$
 -\^Idone\$
 +=C2=B7mktemp=3D/usr/bin/mktemp\$
 +=C2=B7for=C2=B7errfile=C2=B7in=C2=B7"${TMPDIR-/tmp}/xses-$USER"=C2=B7"/tmp=
 /xses-$USER"\$
 +=C2=B7do\$
 +=C2=B7=C2=B7if=C2=B7ef=3D"$(=C2=B7umask=C2=B7077=C2=B7&&=C2=B7$mktemp=C2=
 =B7"$errfile.XXXXXX"=C2=B72>=C2=B7/dev/null)"\$
 +=C2=B7=C2=B7then\$
 +=C2=B7=C2=B7=C2=B7exec=C2=B7>=C2=B7"$ef"=C2=B72>&1\$
 +=C2=B7=C2=B7=C2=B7mv=C2=B7"$ef"=C2=B7"$errfile"=C2=B72>=C2=B7/dev/null\$
 +=C2=B7=C2=B7=C2=B7break\$
 +=C2=B7=C2=B7fi\$
 +=C2=B7done\$
  fi\$
  \$
  case=C2=B7$#=C2=B7in\$
  1)\$
 -\^Icase=C2=B7$1=C2=B7in\$
 -\^Ifailsafe)\$
 -\^I\^Iexec=C2=B7/usr/local/bin/xterm=C2=B7-geometry=C2=B780x24-0-0\$
 -\^I\^I;;\$
 -\^Iesac\$
 +=C2=B7case=C2=B7$1=C2=B7in\$
 +=C2=B7failsafe)\$
 +=C2=B7=C2=B7exec=C2=B7/usr/local/bin/xterm=C2=B7-geometry=C2=B780x24-0-0\$
 +=C2=B7=C2=B7;;\$
 +=C2=B7esac\$
  esac\$
  \$
  #=C2=B7The=C2=B7startup=C2=B7script=C2=B7is=C2=B7not=C2=B7intended=C2=B7to=
 =C2=B7have=C2=B7arguments.\$
 @@ -36,14 +38,14 @@ startup=3D$HOME/.xsession\$
  resources=3D$HOME/.Xresources\$
  \$
  if=C2=B7[=C2=B7-s=C2=B7"$startup"=C2=B7];=C2=B7then\$
 -\^Iif=C2=B7[=C2=B7-x=C2=B7"$startup"=C2=B7];=C2=B7then\$
 -\^I\^Iexec=C2=B7"$startup"\$
 -\^Ielse\$
 -\^I\^Iexec=C2=B7/bin/sh=C2=B7"$startup"\$
 -\^Ifi\$
 +=C2=B7if=C2=B7[=C2=B7-x=C2=B7"$startup"=C2=B7];=C2=B7then\$
 +=C2=B7=C2=B7exec=C2=B7"$startup"\$
 +=C2=B7else\$
 +=C2=B7=C2=B7exec=C2=B7/bin/sh=C2=B7"$startup"\$
 +=C2=B7fi\$
  else\$
 -\^Iif=C2=B7[=C2=B7-r=C2=B7"$resources"=C2=B7];=C2=B7then\$
 -\^I\^I/usr/local/bin/xrdb=C2=B7-load=C2=B7"$resources"\$
 -\^Ifi\$
 -\^Iexec=C2=B7/usr/local/bin/xsm\$
 +=C2=B7if=C2=B7[=C2=B7-r=C2=B7"$resources"=C2=B7];=C2=B7then\$
 +=C2=B7=C2=B7/usr/local/bin/xrdb=C2=B7-load=C2=B7"$resources"\$
 +=C2=B7fi\$
 +=C2=B7exec=C2=B7/usr/local/bin/xsm\$
  fi\$
 --- config/Xstartup	cpp47
 +++ config/Xstartup	clang-cpp
 @@ -1,4 +1,6 @@\$
 +\$
 +\$
  #!/bin/sh\$
  #=C2=B7Register=C2=B7a=C2=B7login=C2=B7(derived=C2=B7from=C2=B7GiveConsole=
 =C2=B7as=C2=B7follows:)\$
  #\$
 -exec=C2=B7/usr/local/bin/sessreg=C2=B7=C2=B7-a=C2=B7-w=C2=B7/var/log/wtmp=
 =C2=B7-u=C2=B7/var/run/utmp=C2=B7\^I-x=C2=B7/usr/local/lib/X11/xdm/Xservers=
 =C2=B7-l=C2=B7$DISPLAY=C2=B7-h=C2=B7""=C2=B7$USER\$
 +exec=C2=B7/usr/local/bin/sessreg=C2=B7-a=C2=B7-w=C2=B7/var/log/wtmp=C2=B7-=
 u=C2=B7/var/run/utmp=C2=B7-x=C2=B7/usr/local/lib/X11/xdm/Xservers=C2=B7-l=
 =C2=B7$DISPLAY=C2=B7-h=C2=B7""=C2=B7$USER\$
 --- config/xdm-config	cpp47
 +++ config/xdm-config	clang-cpp
 @@ -1,3 +1,5 @@\$
 +\$
 +\$
  !\$
  !\$
  !\$
 @@ -9,31 +11,31 @@\$
  \$
  \$
  \$
 -DisplayManager.authDir:\^I/var/lib/xdm\$
 -DisplayManager.errorLogFile:\^I/var/log/xdm.log\$
 -DisplayManager.pidFile:\^I\^I/var/run/xdm.pid\$
 -DisplayManager.keyFile:\^I\^I/usr/local/lib/X11/xdm/xdm-keys\$
 -DisplayManager.servers:\^I\^I/usr/local/lib/X11/xdm/Xservers\$
 -DisplayManager.accessFile:\^I/usr/local/lib/X11/xdm/Xaccess\$
 -DisplayManager*resources:\^I/usr/local/lib/X11/xdm/Xresources\$
 -DisplayManager.willing:\^I\^Isu=C2=B7-m=C2=B7nobody=C2=B7-s=C2=B7/bin/sh=
 =C2=B7-c=C2=B7/usr/local/lib/X11/xdm/Xwilling\$
 +DisplayManager.authDir:=C2=B7/var/lib/xdm\$
 +DisplayManager.errorLogFile:=C2=B7/var/log/xdm.log\$
 +DisplayManager.pidFile:=C2=B7/var/run/xdm.pid\$
 +DisplayManager.keyFile:=C2=B7/usr/local/lib/X11/xdm/xdm-keys\$
 +DisplayManager.servers:=C2=B7/usr/local/lib/X11/xdm/Xservers\$
 +DisplayManager.accessFile:=C2=B7/usr/local/lib/X11/xdm/Xaccess\$
 +DisplayManager*resources:=C2=B7/usr/local/lib/X11/xdm/Xresources\$
 +DisplayManager.willing:=C2=B7su=C2=B7-m=C2=B7nobody=C2=B7-s=C2=B7/bin/sh=
 =C2=B7-c=C2=B7/usr/local/lib/X11/xdm/Xwilling\$
  !=C2=B7All=C2=B7displays=C2=B7should=C2=B7use=C2=B7authorization,=C2=B7but=
 =C2=B7we=C2=B7cannot=C2=B7be=C2=B7sure\$
  !=C2=B7X=C2=B7terminals=C2=B7may=C2=B7not=C2=B7be=C2=B7configured=C2=B7tha=
 t=C2=B7way,=C2=B7so=C2=B7they=C2=B7will=C2=B7require\$
  !=C2=B7individual=C2=B7resource=C2=B7settings.\$
 -DisplayManager*authorize:\^Itrue\$
 +DisplayManager*authorize:=C2=B7true\$
  !\$
 -DisplayManager*chooser:\^I\^I/usr/local/lib/X11/xdm/chooser\$
 -DisplayManager*startup:\^I\^I/usr/local/lib/X11/xdm/Xstartup\$
 -DisplayManager*session:\^I\^I/usr/local/lib/X11/xdm/Xsession\$
 -DisplayManager*reset:\^I\^I/usr/local/lib/X11/xdm/Xreset\$
 -DisplayManager*authComplain:\^Itrue\$
 +DisplayManager*chooser:=C2=B7/usr/local/lib/X11/xdm/chooser\$
 +DisplayManager*startup:=C2=B7/usr/local/lib/X11/xdm/Xstartup\$
 +DisplayManager*session:=C2=B7/usr/local/lib/X11/xdm/Xsession\$
 +DisplayManager*reset:=C2=B7/usr/local/lib/X11/xdm/Xreset\$
 +DisplayManager*authComplain:=C2=B7true\$
  !=C2=B7The=C2=B7following=C2=B7three=C2=B7resources=C2=B7set=C2=B7up=C2=B7=
 display=C2=B7:0=C2=B7as=C2=B7the=C2=B7console.\$
 -DisplayManager._0.setup:\^I/usr/local/lib/X11/xdm/Xsetup_0\$
 -DisplayManager._0.startup:\^I/usr/local/lib/X11/xdm/GiveConsole\$
 -DisplayManager._0.reset:\^I/usr/local/lib/X11/xdm/TakeConsole\$
 +DisplayManager._0.setup:=C2=B7/usr/local/lib/X11/xdm/Xsetup_0\$
 +DisplayManager._0.startup:=C2=B7/usr/local/lib/X11/xdm/GiveConsole\$
 +DisplayManager._0.reset:=C2=B7/usr/local/lib/X11/xdm/TakeConsole\$
  \$
 -DisplayManager*loginmoveInterval:\^I10\$
 +DisplayManager*loginmoveInterval:=C2=B710\$
  \$
  !=C2=B7SECURITY:=C2=B7do=C2=B7not=C2=B7listen=C2=B7for=C2=B7XDMCP=C2=B7or=
 =C2=B7Chooser=C2=B7requests\$
  !=C2=B7Comment=C2=B7out=C2=B7this=C2=B7line=C2=B7if=C2=B7you=C2=B7want=C2=
 =B7to=C2=B7manage=C2=B7X=C2=B7terminals=C2=B7with=C2=B7xdm\$
 -DisplayManager.requestPort:\^I0\$
 +DisplayManager.requestPort:=C2=B70\$
 
 --=-=-=--

From: Jan Beich <jbeich@tormail.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/172100: [PATCH] xdm build error with clang-cpp
Date: Thu, 27 Sep 2012 14:41:16 +1100

 --=-=-=
 Content-Type: text/plain
 Content-Disposition: inline
 
 Oops, extra newlines before shebang in scripts are hazardous.
 
 
 --=-=-=
 Content-Type: text/x-patch
 Content-Disposition: attachment; filename=clang-cpp.diff
 
 Index: x11/xdm/Makefile
 ===================================================================
 --- x11/xdm/Makefile	(revision 304222)
 +++ x11/xdm/Makefile	(working copy)
 @@ -38,6 +39,8 @@ PLIST_SUB+=	XDMSHELL="@comment "
  .endif
  
  post-patch:
 +	@${REINPLACE_CMD} 's/test.*-traditional.*;/true;/' \
 +		${WRKSRC}/configure
  	@${REINPLACE_CMD} -e "s|XDMCONFIGDIR/|${PREFIX}/lib/X11/xdm/|" \
  		-e "s|XDMSCRIPTDIR/|${PREFIX}/lib/X11/xdm/|" \
  			${WRKSRC}/config/xdm-config.cpp \
 Index: x11/xdm/files/patch-config-Makefile.in
 ===================================================================
 --- x11/xdm/files/patch-config-Makefile.in	(revision 0)
 +++ x11/xdm/files/patch-config-Makefile.in	(working copy)
 @@ -0,0 +1,10 @@
 +--- config/Makefile.in~
 ++++ config/Makefile.in
 +@@ -297,6 +297,7 @@ WCHAR32_FLAGS = -DWCHAR32=@WCHAR32@
 + # Allow XHASH to always be substituted, even in cases where XCOMM isn't.
 + CPP_SED_MAGIC = $(SED) -e '/^\#  *[0-9][0-9]*  *.*$$/d' \
 +                        -e '/^\#line  *[0-9][0-9]*  *.*$$/d' \
 ++                       -e '/^$$/d' \
 +                        -e '/^[         ]*XCOMM$$/s/XCOMM/\#/' \
 +                        -e '/^[         ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
 +                        -e '/^[         ]*XHASH/s/XHASH/\#/' \
 Index: x11/xdm/files/patch-config-Xresources.cpp
 ===================================================================
 --- x11/xdm/files/patch-config-Xresources.cpp	(revision 0)
 +++ x11/xdm/files/patch-config-Xresources.cpp	(working copy)
 @@ -0,0 +1,14 @@
 +--- config/Xresources.cpp~
 ++++ config/Xresources.cpp
 +@@ -60,9 +60,9 @@ xlogin*hiColor: black
 + XHASHendif
 + #ifdef XPM
 + XHASHif PLANES >= 8
 +-xlogin*logoFileName: BITMAPDIR/**//XDM_PIXMAP
 ++xlogin*logoFileName: BITMAPDIR/XDM_PIXMAP
 + XHASHelse
 +-xlogin*logoFileName: BITMAPDIR/**//XDM_BWPIXMAP
 ++xlogin*logoFileName: BITMAPDIR/XDM_BWPIXMAP
 + XHASHendif
 + xlogin*useShape: true
 + xlogin*logoPadding: 10
 
 --=-=-=--
Responsible-Changed-From-To: freebsd-ports-bugs->x11 
Responsible-Changed-By: zeising 
Responsible-Changed-When: Thu Sep 27 09:01:47 UTC 2012 
Responsible-Changed-Why:  
Fix synopsis and assign. 

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

From: Niclas Zeising <zeising@freebsd.org>
To: bug-followup@FreeBSD.org, oliver.pntr@gmail.com
Cc:  
Subject: Re: ports/172100: [PATCH] xdm build error with clang-cpp
Date: Thu, 27 Sep 2012 11:05:08 +0200

 A patch was just submitted to the experimental xorg repo, based on Jan 
 Beich suggestion.  It will be merged to the regular ports repo soon.
 -- 
 Niclas Zeising
State-Changed-From-To: open->closed 
State-Changed-By: zeising 
State-Changed-When: Thu Sep 27 09:45:59 UTC 2012 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/172100: commit references a PR
Date: Thu, 27 Sep 2012 09:45:53 +0000 (UTC)

 Author: zeising
 Date: Thu Sep 27 09:45:38 2012
 New Revision: 304953
 URL: http://svn.freebsd.org/changeset/ports/304953
 
 Log:
   Fix build when clang is installed as cc (more specifically when clang-cpp is
   installed as cpp).
   This is done in a similar way as in other x11 ports with the same issue, see
   r301687 for details.
   
   PR:		ports/172100
   Submitted by:	Oliver Pinter <oliver.pntr@gmail.com> (pr)
   		Jan Beich <jbeich@tormail.org> (patch, based on)
   Approved by:	miwi (mentor)
   Obtained from:	xorg staging area
 
 Added:
   head/x11/xdm/files/patch-config-Makefile.in   (contents, props changed)
   head/x11/xdm/files/patch-config-Xresources.cpp   (contents, props changed)
 Modified:
   head/x11/xdm/Makefile
 
 Modified: head/x11/xdm/Makefile
 ==============================================================================
 --- head/x11/xdm/Makefile	Thu Sep 27 09:03:05 2012	(r304952)
 +++ head/x11/xdm/Makefile	Thu Sep 27 09:45:38 2012	(r304953)
 @@ -38,6 +38,8 @@ PLIST_SUB+=	XDMSHELL="@comment "
  .endif
  
  post-patch:
 +	@${REINPLACE_CMD} 's/test.*-traditional.*;/true;/' \
 +		${WRKSRC}/configure
  	@${REINPLACE_CMD} -e "s|XDMCONFIGDIR/|${PREFIX}/lib/X11/xdm/|" \
  		-e "s|XDMSCRIPTDIR/|${PREFIX}/lib/X11/xdm/|" \
  			${WRKSRC}/config/xdm-config.cpp \
 
 Added: head/x11/xdm/files/patch-config-Makefile.in
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/x11/xdm/files/patch-config-Makefile.in	Thu Sep 27 09:45:38 2012	(r304953)
 @@ -0,0 +1,11 @@
 +--- config/Makefile.in.orig	2012-09-27 10:37:59.000000000 +0200
 ++++ config/Makefile.in	2012-09-27 10:38:41.000000000 +0200
 +@@ -296,7 +296,7 @@
 + # output lines with trailing backslashes.
 + # Allow XHASH to always be substituted, even in cases where XCOMM isn't.
 + CPP_SED_MAGIC = $(SED) -e '/^\#  *[0-9][0-9]*  *.*$$/d' \
 +-                       -e '/^\#line  *[0-9][0-9]*  *.*$$/d' \
 ++                       -e '/^$$/d' \
 +                        -e '/^[         ]*XCOMM$$/s/XCOMM/\#/' \
 +                        -e '/^[         ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
 +                        -e '/^[         ]*XHASH/s/XHASH/\#/' \
 
 Added: head/x11/xdm/files/patch-config-Xresources.cpp
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/x11/xdm/files/patch-config-Xresources.cpp	Thu Sep 27 09:45:38 2012	(r304953)
 @@ -0,0 +1,14 @@
 +--- config/Xresources.cpp.orig	2012-09-27 10:41:28.000000000 +0200
 ++++ config/Xresources.cpp	2012-09-27 10:41:56.000000000 +0200
 +@@ -60,9 +60,9 @@
 + XHASHendif
 + #ifdef XPM
 + XHASHif PLANES >= 8
 +-xlogin*logoFileName: BITMAPDIR/**//XDM_PIXMAP
 ++xlogin*logoFileName: BITMAPDIR/XDM_PIXMAP
 + XHASHelse
 +-xlogin*logoFileName: BITMAPDIR/**//XDM_BWPIXMAP
 ++xlogin*logoFileName: BITMAPDIR/XDM_BWPIXMAP
 + XHASHendif
 + xlogin*useShape: true
 + xlogin*logoPadding: 10
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 

From: Oliver Pinter <oliver.pntr@gmail.com>
To: Niclas Zeising <zeising@freebsd.org>, Jan Beich <jbeich@tormail.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/172100: [PATCH] xdm build error with clang-cpp
Date: Thu, 27 Sep 2012 13:20:17 +0200

 On 9/27/12, Niclas Zeising <zeising@freebsd.org> wrote:
 > A patch was just submitted to the experimental xorg repo, based on Jan
 > Beich suggestion.  It will be merged to the regular ports repo soon.
 
 Thanks! ;)
 
 > --
 > Niclas Zeising
 >
>Unformatted:
