Wednesday, September 06, 2017

Re: devel/ectags broken

On Wed, Sep 06 2017, Ingo Schwarze <schwarze@usta.de> wrote:
> Hi,
>
> similar to devel/universal-ctags, the parent project devel/ectags
> is broken for the same reasons, also analyzed by guenther@.
> Also, lots of people keep reporting it to me in private, so i'm
> posting here.
>
> Here is a minimal patch letting it build again; not tested at
> run-time. Note that this is a band-aid; a proper fix would require
> changing all instances of __unused__ and __printf__ in all *.c files
> to something like "ectags_unused", or even better just rely on the
> standard __attribute__ names throughout and not define anything in
> the first place. But i'm not sure whether upstream still exists.
>
> Should this be committed?
>
> This overrides my previous patch sent to the MAINTAINER in private,
> incorporating stylistic feedback from naddy@.

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.

ok?


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


--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

No comments:

Post a Comment