Hi Jeremie,
Jeremie Courreges-Anglas wrote on Wed, Sep 06, 2017 at 02:30:16PM +0200:
> I was cooking up a mail for Alexandr and Rafael but got interrupted.
> Here's the diff I wanted to send. Not a proper fix for upstream either,
> but at least this is more compact than multiple patches. And I'm not
> sure it's a good idea to use stuff like __unused in the ports tree.
That's elegant, cleaner than my patches, reads well to code inspection,
builds for me on amd64-current, and the two-liner can maybe even be used
by upstream to fix their repos. Not tested at run-time, though.
You might possibly want to add a comment above it, something like
# Application software must not redefine macros in the
# implementation namespace. For example, redefining __unused__
# blows up in our <ctype.h>.
For the sed(1) commands alone, it is not obvious what is going on.
Either way, OK schwarze@ for what that's worth.
Thanks,
Ingo
> Index: devel/ectags/Makefile
> ===================================================================
> RCS file: /d/cvs/ports/devel/ectags/Makefile,v
> retrieving revision 1.20
> diff -u -p -r1.20 Makefile
> --- devel/ectags/Makefile 29 Dec 2016 14:48:51 -0000 1.20
> +++ devel/ectags/Makefile 6 Sep 2017 11:00:07 -0000
> @@ -20,6 +20,10 @@ CONFIGURE_STYLE=gnu
>
> DOCS= FAQ NEWS README EXTENDING.html
>
> +post-extract:
> + find ${WRKSRC} -type f -name '*.[ch]' -exec sed -i \
> + 's/__unused__/ect_unused/g; s/__printf__/ect_printf/g' {} +
> +
> do-install:
> ${INSTALL_PROGRAM} ${WRKBUILD}/ctags ${PREFIX}/bin/ectags
> ${INSTALL_MAN} ${WRKSRC}/ctags.1 ${PREFIX}/man/man1/ectags.1
> Index: devel/universal-ctags/Makefile
> ===================================================================
> RCS file: /d/cvs/ports/devel/universal-ctags/Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Makefile
> --- devel/universal-ctags/Makefile 12 Apr 2017 20:00:30 -0000 1.1.1.1
> +++ devel/universal-ctags/Makefile 6 Sep 2017 10:55:33 -0000
> @@ -51,6 +51,10 @@ LIB_DEPENDS+= converters/libiconv
> WANTLIB+= iconv
> .endif
>
> +post-extract:
> + find ${WRKSRC} -type f -name '*.[ch]' -exec sed -i \
> + 's/__unused__/uct_unused/g; s/__printf__/uct_printf/g' {} +
> +
> pre-configure:
> cd ${WRKSRC} && ${SETENV} AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
> AUTOCONF_VERSION=${AUTOCONF_VERSION} ./autogen.sh
No comments:
Post a Comment