Hi Alessandro,

Thanks for sending this in; magic's been on my todo list for a while but
pretty far down.

Alessandro DE LAURENZIS writes:
> On 07/03/2019 06:12, Alessandro DE LAURENZIS wrote:
> > There are 2 branches, distribution (8.1) and development (8.2); the 
> > former is now reasonably stable, and should be expected to work without 
> > undue issues; let's stay on that.

No strong opinion of that but if you push patches upstream (see below)
it may be more practical to target the development branch for a while.

> > Upstream configure script is a wrapper around the one actually generated 
> > by autoconf, so I used:
> > 
> > CONFIGURE_STYLE = simple

A very thin wrapper. I'd rather set CONFIGURE_STYLE=gnu and
WRKCONF=${WRKSRC}/scripts instead.

> > and patched it adding -std=c89 and -Wno-parentheses to CFLAGS, in order 
> > to get rid of the huge amount of Wimplicit-function-declaration and 
> > Wno-parentheses warnings.

My memory of magic is that it has some truly ancient ifdefs and code
issues that might be worth fixing and shouldn't be too difficult.

> > Other patches have essentially to do with termios functions; in 
> > particular, txGetTermState is not defined is OpenBSD; please carefully 
> > review what I made in patches/patch-textio_txInput_c, since I just tried 
> > to adapt some code found on the Internet used for similar situations; 
> > neither I really understand if those functions are actually needed when 
> > the Tcl/Tk version is used (this is the case for our port).

-#if defined(SYSV) || defined(CYGWIN)
+#if defined(SYSV) || defined(CYGWIN) || defined(__OpenBSD__)

This is exactly what I'm talking about. If you check FreeBSD they have
similar patches. When I see ifdefs like this in a codebase this old,
I wonder: what systems even hit the else? I'd consider removing the
pre-termios case completely and pushing it upstream.

> I forgot to say that the port installs the "magic.1" man page; this 
> isn't a real conflict with magic(5), but could be a bit confusing; 
> please let me know if it is worth to change the man page name (is 
> something like magic-vlsi more appropriate?)

It's not a problem, that's what manpage sections are for.

> post-extract:
>         mv ${WRKSRC}/lef/lefWrite.c.orig ${WRKSRC}/lef/lefWrite.c_orig

PATCHORIG would remove the need for this.

-- 
Anthony J. Bentley

Reply via email to