Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Sep 2012 10:41:51 +1100
From:      Jan Beich <jbeich@tormail.org>
To:        Oliver Pinter <oliver.pntr@gmail.com>
Cc:        ports@freebsd.org, x11@freebsd.org, current@freebsd.org
Subject:   Re: [PATCH] unbreak XDM build when clang set as base compiler
Message-ID:  <1TGenq-000Ne7-7v@internal.tormail.org>
References:  <CAPjTQNF3jaNZrj_cKNveBZOKP8kVFbUGYkvo1i9Nvo91=HOzeA__23620.1504282237$1348607044$gmane$org@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Oliver Pinter <oliver.pntr@gmail.com> 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 \
-	Ctrl<Key>R: abort-display()\n\
-	<Key>F1: set-session-argument(failsafe) finish-field()\n\
-	<Key>Delete: delete-character()\n\
-	<Key>Left: move-backward-character()\n\
-	<Key>Right: move-forward-character()\n\
-	<Key>Home: move-to-begining()\n\
-	<Key>End: move-to-end()\n\
-	Ctrl<Key>KP_Enter: set-session-argument(failsafe) finish-field()\n\
-	<Key>KP_Enter: set-session-argument() finish-field()\n\
-	Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\
+xlogin*login.translations: #override  \ 
+	Ctrl<Key>R: abort-display() \n\ 
+	<Key>F1: set-session-argument(failsafe) finish-field() \n\ 
+	<Key>Delete: delete-character() \n\ 
+	<Key>Left: move-backward-character() \n\ 
+	<Key>Right: move-forward-character() \n\ 
+	<Key>Home: move-to-begining() \n\ 
+	<Key>End: move-to-end() \n\ 
+	Ctrl<Key>KP_Enter: set-session-argument(failsafe) finish-field() \n\ 
+	<Key>KP_Enter: set-session-argument() finish-field() \n\ 
+	Ctrl<Key>Return: set-session-argument(failsafe) finish-field() \n\ 
 	<Key>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
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1TGenq-000Ne7-7v>