On Tuesday 07 July 2015 06:27:55 arn...@skeeve.com wrote:
> Hi.
> 
> Jens Staal <staal1...@gmail.com> wrote:
> > There was a recent discussion about that it would be nice to have gawk on
> > Plan9.
> > 
> > The latest upstream version of gawk can now be built via 9front-ports. I
> > think/hope I built/ported it correctly, but it would be nice with
> > critique/feedback/testing.
> 
> Majorly cool! The first thing to check is that 'make check' passes.
> Some tests depend on locales; those are OK if they fail, assuming you
> don't have locale data for them. Others are only run if gawk was built
> with the MPFR library, so those should be OK too if they're not run. If
> there are failures in other tests, they should be investigated.
>

OK thanks - I will look at that and try to make a mk file for "check" :)
I will also look at mpfr some time....
 
> I assume you built from the released tarball? Version 4.1.3?
> 

Yes 4.1.3
below is the ports entry:

https://bitbucket.org/mveety/9front-ports/src/0bf6695dcad94d32c34a73ed3d71010bbdf2a66b/textproc/gawk/?at=default

I used an "external" gnulib which apart from the gnulib-derived object files 
usually supplied in gawk also takes care of the wchar-related dependencies.
 
I also used a custom/manual config.h and a semi-automatically generated mk-
file (mkmk and manual editing) rather than the standard configure/make.
For the actual source, there were just a few things that needed patching so 
configure/make under APE might also work.

> > I noticed in the Arch linux package that gawk comes with a couple of
> > dynamic libraries and a header. Are those also interesting to include in
> > the Plan9 package (then as static libraries ofcourse)?
> 
> Supplyinig them as static libraries would serve no purpose. Those
> dynamic libraries are extensions (or plug-ins, if you will). Gawk
> loads them vial dlopen() if requested to via an @load directive in
> the source or the via the -l command line option.
> 
> I hope that dlopen works on Plan 9; if so it's necessary to build
> the libraries in whatever way will work to support dlopen.

most likely not since the whole system is static...

> 
> The extension facility is something we (the gawk developers) put a
> lot of work into for the 4.1 release. I can supply pointers to doc
> for anyone who is interested. Here's a simple example:
> 
>       $ gawk -lreaddir '{ print }' .
>       2814749767529876/./d
>       281474977052502/../d
>       2814749767530561/.bashrc/f
>       281474976885114/.bash_history/f
>       14355223812503808/.bash_profile/f
>       1407374884183439/.bzr.log/f
>       281474976885116/.ex-sgml-rc/f
>       281474976885117/.exrc/f
>       ...
> 
> The readdir extension returns directory entries as records in an
> easily-parsed format: '/' is the field separator and the fields are
> the inode, the name, and an optional single-letter file type indicator.
> 
> The doc has more examples.
> 
> I hope this helps. Please feel to contact me off-list if you need
> more info / help.
> 
> Thanks!
> 
> Arnold


Reply via email to