From owner-freebsd-x11@FreeBSD.ORG Fri Jun 1 13:00:25 2012 Return-Path: Delivered-To: freebsd-x11@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CF5F1065670 for ; Fri, 1 Jun 2012 13:00:25 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 276BE8FC19 for ; Fri, 1 Jun 2012 13:00:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q51D0Bf6013022 for ; Fri, 1 Jun 2012 13:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q51D0B8X013021; Fri, 1 Jun 2012 13:00:11 GMT (envelope-from gnats) Date: Fri, 1 Jun 2012 13:00:11 GMT Message-Id: <201206011300.q51D0B8X013021@freefall.freebsd.org> To: freebsd-x11@FreeBSD.org From: Jan Beich Cc: Subject: Re: ports/166373: [x11] x11/libX11 fails if /usr/bin/cpp is clang X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jan Beich List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2012 13:00:25 -0000 The following reply was made to PR ports/166373; it has been noted by GNATS. From: Jan Beich To: Jakub Lach Cc: bug-followup@FreeBSD.org, Niclas Zeising Subject: Re: ports/166373: [x11] x11/libX11 fails if /usr/bin/cpp is clang Date: Fri, 01 Jun 2012 09:55:57 -0300 --=-=-= Content-Type: text/plain Content-Disposition: inline I reconsider, ucpp is buggy compared to clang-cpp. Here is an example of broken en_US.UTF-8 locale: http://ompldr.org/vZTFvaQ/xterm.png # affects a few non-unicode locales, e.g. zh_TW.big5 $ printf '\\xaa\\xab' | ucpp | sed '/^#/d; /^$/d' \xaaxab $ printf '\\xaa\\xab' | cpp46 | sed '/^#/d; /^$/d' \xaa\xab # affects locale.alias $ printf "#if 0\nfo'o\n#endif\nbar\n" | ucpp | sed '/^#/d; /^$/d' : line 2: truncated token : line 5: unterminated #if construction (depth 1) $ printf "#if 0\nfo'o\n#endif\nbar\n" | cpp46 | sed '/^#/d; /^$/d' :2:3: warning: missing terminating ' character [enabled by default] bar A quick diff(1) in nls/ directory showed only whitespace difference between cpp46 and clang-cpp for me. # autoconf assumes -traditional is only for whitespace $ echo ftp://localhost | clang-cpp | sed '/^#/d; /^$/d' ftp: $ echo ftp://localhost | clang-cpp -traditional | sed '/^#/d; /^$/d' ftp://localhost --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=cpp.diff Index: x11/libX11/Makefile =================================================================== --- x11/libX11/Makefile (revision 505) +++ x11/libX11/Makefile (working copy) @@ -15,8 +15,7 @@ COMMENT= X11 library LICENSE= MIT -BUILD_DEPENDS+= ucpp:${PORTSDIR}/devel/ucpp \ - ${LOCALBASE}/libdata/pkgconfig/xcb.pc:${PORTSDIR}/x11/libxcb \ +BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/xcb.pc:${PORTSDIR}/x11/libxcb \ ${LOCALBASE}/share/aclocal/xorg-macros.m4:${PORTSDIR}/devel/xorg-macros RUN_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/xcb.pc:${PORTSDIR}/x11/libxcb @@ -26,11 +25,13 @@ USE_XORG= bigreqsproto xau xcmiscproto xdmcp xextp CONFIGURE_ARGS+= --datadir=${PREFIX}/lib \ --without-xmlto \ --disable-specs -CONFIGURE_ENV+= RAWCPP="${LOCALBASE}/bin/ucpp" ac_cv_path_PS2PDF="" +CONFIGURE_ENV+= ac_cv_path="${CPP}" ac_cv_path_PS2PDF="" .include "${.CURDIR}/manpages" post-patch: + @${REINPLACE_CMD} 's/test.*-traditional.*;/true;/' \ + ${WRKSRC}/configure @${REINPLACE_CMD} '/^install-data-am:/,/^$$/ \ s/install-specDATA//' ${WRKSRC}/nls/Makefile.in --=-=-=--