Re: [PATCH] unbreak XDM build when clang set as base compiler

From: Jan Beich <jbeich_at_tormail.org>
Date: Wed, 26 Sep 2012 10:41:51 +1100
Oliver Pinter <oliver.pntr_at_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
_at__at_ -1,4 +1,6 _at__at_
 #!/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
_at__at_ -2,17 +2,17 _at__at_ 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
_at__at_ -60,9 +60,9 _at__at_ 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
_at__at_ -80,3 +80,4 _at__at_ 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
_at__at_ -9,4 +9,5 _at__at_
 # 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
_at__at_ -1,49 +0,0 _at__at_
-#!/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
_at__at_ -1,4 +1,6 _at__at_
 #!/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
_at__at_ -9,20 +9,20 _at__at_
 
 
 
-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
_at__at_ -37,3 +37,4 _at__at_ 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
+
Received on Tue Sep 25 2012 - 21:46:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC