Date: Fri, 1 Jun 2012 13:00:11 GMT From: Jan Beich <jbeich@tormail.org> To: freebsd-x11@FreeBSD.org Subject: Re: ports/166373: [x11] x11/libX11 fails if /usr/bin/cpp is clang Message-ID: <201206011300.q51D0B8X013021@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/166373; it has been noted by GNATS. From: Jan Beich <jbeich@tormail.org> To: Jakub Lach <jakub_lach@mailplus.pl> Cc: bug-followup@FreeBSD.org, Niclas Zeising <zeising@daemonic.se> 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' <stdin>: line 2: truncated token <stdin>: line 5: unterminated #if construction (depth 1) $ printf "#if 0\nfo'o\n#endif\nbar\n" | cpp46 | sed '/^#/d; /^$/d' <stdin>: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 --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206011300.q51D0B8X013021>