Bug 172100 - [PATCH] x11/xdm build error with clang-cpp
Summary: [PATCH] x11/xdm build error with clang-cpp
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-26 23:00 UTC by Oliver Pinter
Modified: 2012-09-27 12:30 UTC (History)
0 users

See Also:


Attachments
file.diff (551 bytes, patch)
2012-09-26 23:00 UTC, Oliver Pinter
no flags Details | Diff
clang-cpp.diff (1.11 KB, patch)
2012-09-27 01:58 UTC, Jan Beich
no flags Details | Diff
whitespace-encoded.diff (11.42 KB, patch)
2012-09-27 01:58 UTC, Jan Beich
no flags Details | Diff
clang-cpp.diff (1.88 KB, patch)
2012-09-27 04:41 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Pinter 2012-09-26 23:00:16 UTC
XDM build error (broken autoconf preprocessor test) when using clang as base c compiler (WITH_CLANG_IS_CC= in src.conf)

Fix: Patch attached with submission follows:
Comment 1 Jan Beich freebsd_committer 2012-09-27 01:58:22 UTC
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).
Comment 2 Jan Beich freebsd_committer 2012-09-27 04:41:16 UTC
Oops, extra newlines before shebang in scripts are hazardous.
Comment 3 Niclas Zeising freebsd_committer 2012-09-27 10:01:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->x11

Fix synopsis and assign.
Comment 4 Niclas Zeising freebsd_committer 2012-09-27 10:05:08 UTC
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
Comment 5 dfilter service freebsd_committer 2012-09-27 10:45:53 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"
Comment 6 Niclas Zeising freebsd_committer 2012-09-27 10:45:59 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!
Comment 7 Oliver Pinter 2012-09-27 12:20:17 UTC
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
>