From owner-freebsd-current@FreeBSD.ORG Tue Sep 25 23:46:27 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D5A61065670; Tue, 25 Sep 2012 23:46:27 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id A19608FC1B; Tue, 25 Sep 2012 23:46:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1TGepV-0004Er-AR; Wed, 26 Sep 2012 03:46:18 +0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:Subject:Cc:To:From; bh=u810hpl9w1hr2NbgC6jfQf4/El8tCtddD0oUq4wbiAI=; b=TtpP3WffoQV2VDziDNGPB2zej/gHwnqUpadD3waujEBhGQnAfXYWCbJEjJAkzNXO+0zr+Gb0xGGZxGJjnimIksVUFMv9wcMEuO0OFGBpfoXYFapWm7Mr5C0rRv9nDzPXB61Tpx1Ukm4lEzZRgTR0b9qSLWLrVy87qcxzmhnv4lk=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1TGenq-000Ne7-7v; Tue, 25 Sep 2012 23:44:37 +0000 From: Jan Beich To: Oliver Pinter Date: Wed, 26 Sep 2012 10:41:51 +1100 References: MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1TGenq-000Ne7-7v@internal.tormail.org> Cc: ports@freebsd.org, x11@freebsd.org, current@freebsd.org Subject: Re: [PATCH] unbreak XDM build when clang set as base compiler X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2012 23:46:27 -0000 Oliver Pinter writes: > +# XXX unbreak build with clang as CC > +BUILD_DEPENDS+= ucpp:${PORTSDIR}/devel/ucpp > +RUN_DEPENDS+= ucpp:${PORTSDIR}/devel/ucpp > +CONFIGURE_ENV+= ac_cv_path_RAWCPP="ucpp -s" ucpp is even less compatible with GNU cpp: - escaped newline is not recognized (Xreset, Xstartup) - extra whitespace around expanded macro (Xresources, Xservers) - apostrophe is treated differently (Xsession) Another example is libX11 or ports/166373. --- config/Xreset cpp47 +++ config/Xreset ucpp @@ -1,4 +1,6 @@ #!/bin/sh # Deregister a login. (Derived from TakeConsole as follows:) # -/usr/local/bin/sessreg -d -w /var/log/wtmp -u /var/run/utmp -x /usr/local/lib/X11/xdm/Xservers -l $DISPLAY -h "" $USER + /usr/local/bin /sessreg -d -w /var/log/wtmp -u /var/run/utmp +-x /usr/local/lib/X11/xdm/Xservers -l $DISPLAY -h "" $USER + --- config/Xresources cpp47 +++ config/Xresources ucpp @@ -2,17 +2,17 @@ Xcursor.theme: whiteglass -xlogin*login.translations: #override \ - CtrlR: abort-display()\n\ - F1: set-session-argument(failsafe) finish-field()\n\ - Delete: delete-character()\n\ - Left: move-backward-character()\n\ - Right: move-forward-character()\n\ - Home: move-to-begining()\n\ - End: move-to-end()\n\ - CtrlKP_Enter: set-session-argument(failsafe) finish-field()\n\ - KP_Enter: set-session-argument() finish-field()\n\ - CtrlReturn: set-session-argument(failsafe) finish-field()\n\ +xlogin*login.translations: #override \ + CtrlR: abort-display() \n\ + F1: set-session-argument(failsafe) finish-field() \n\ + Delete: delete-character() \n\ + Left: move-backward-character() \n\ + Right: move-forward-character() \n\ + Home: move-to-begining() \n\ + End: move-to-end() \n\ + CtrlKP_Enter: set-session-argument(failsafe) finish-field() \n\ + KP_Enter: set-session-argument() finish-field() \n\ + CtrlReturn: set-session-argument(failsafe) finish-field() \n\ Return: set-session-argument() finish-field() xlogin*greeting: Welcome to CLIENTHOST @@ -60,9 +60,9 @@ xlogin*hiColor: black #endif #if PLANES >= 8 -xlogin*logoFileName: /usr/local/lib/X11/xdm/pixmaps/xorg.xpm +xlogin*logoFileName: /usr/local/lib/X11/xdm/pixmaps / xorg.xpm #else -xlogin*logoFileName: /usr/local/lib/X11/xdm/pixmaps/xorg-bw.xpm +xlogin*logoFileName: /usr/local/lib/X11/xdm/pixmaps / xorg-bw.xpm #endif xlogin*useShape: true xlogin*logoPadding: 10 @@ -80,3 +80,4 @@ Chooser*label.font: *-new century schoo Chooser*label.label: XDMCP Host Menu from CLIENTHOST Chooser*list.font: -*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1 Chooser*Command.font: *-new century schoolbook-bold-r-normal-*-180-* + --- config/Xservers cpp47 +++ config/Xservers ucpp @@ -9,4 +9,5 @@ # look like: # XTerminalName:0 foreign # -:0 local /usr/local/bin/X :0 +:0 local /usr/local/bin /X :0 + --- config/Xsession cpp47 +++ config/Xsession ucpp @@ -1,49 +0,0 @@ -#!/bin/sh -# - -# redirect errors to a file in user's home directory if we can - -errfile="$HOME/.xsession-errors" -if ( umask 077 && cp /dev/null "$errfile" 2> /dev/null ) -then - exec > "$errfile" 2>&1 -else - - mktemp=/usr/bin/mktemp - for errfile in "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER" - do - if ef="$( umask 077 && $mktemp "$errfile.XXXXXX" 2> /dev/null)" - then - exec > "$ef" 2>&1 - mv "$ef" "$errfile" 2> /dev/null - break - fi - done -fi - -case $# in -1) - case $1 in - failsafe) - exec /usr/local/bin/xterm -geometry 80x24-0-0 - ;; - esac -esac - -# The startup script is not intended to have arguments. - -startup=$HOME/.xsession -resources=$HOME/.Xresources - -if [ -s "$startup" ]; then - if [ -x "$startup" ]; then - exec "$startup" - else - exec /bin/sh "$startup" - fi -else - if [ -r "$resources" ]; then - /usr/local/bin/xrdb -load "$resources" - fi - exec /usr/local/bin/xsm -fi --- config/Xstartup cpp47 +++ config/Xstartup ucpp @@ -1,4 +1,6 @@ #!/bin/sh # Register a login (derived from GiveConsole as follows:) # -exec /usr/local/bin/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x /usr/local/lib/X11/xdm/Xservers -l $DISPLAY -h "" $USER +exec /usr/local/bin /sessreg -a -w /var/log/wtmp -u /var/run/utmp +-x /usr/local/lib/X11/xdm/Xservers -l $DISPLAY -h "" $USER + --- config/xdm cpp47 +++ config/xdm ucpp @@ -9,20 +9,20 @@ -DisplayManager.authDir: /var/lib/xdm -DisplayManager.errorLogFile: /var/log/xdm.log -DisplayManager.pidFile: /var/run/xdm.pid +DisplayManager.authDir: /var/lib/xdm +DisplayManager.errorLogFile: /var/log /xdm.log +DisplayManager.pidFile: /var/run /xdm.pid DisplayManager.keyFile: /usr/local/lib/X11/xdm/xdm-keys DisplayManager.servers: /usr/local/lib/X11/xdm/Xservers DisplayManager.accessFile: /usr/local/lib/X11/xdm/Xaccess DisplayManager*resources: /usr/local/lib/X11/xdm/Xresources -DisplayManager.willing: su -m nobody -s /bin/sh -c /usr/local/lib/X11/xdm/Xwilling +DisplayManager.willing: su -m nobody -s /bin/sh -c /usr/local/lib/X11/xdm/Xwilling ! All displays should use authorization, but we cannot be sure ! X terminals may not be configured that way, so they will require ! individual resource settings. DisplayManager*authorize: true ! -DisplayManager*chooser: /usr/local/lib/X11/xdm/chooser +DisplayManager*chooser: /usr/local/lib/X11/xdm/chooser DisplayManager*startup: /usr/local/lib/X11/xdm/Xstartup DisplayManager*session: /usr/local/lib/X11/xdm/Xsession DisplayManager*reset: /usr/local/lib/X11/xdm/Xreset @@ -37,3 +37,4 @@ DisplayManager*loginmoveInterval: 10 ! SECURITY: do not listen for XDMCP or Chooser requests ! Comment out this line if you want to manage X terminals with xdm DisplayManager.requestPort: 0 +