Fri, 11 Apr 2003

Compiling a2ps under Cywgin and adding R / S support

For those of use with fingers and brains hardwired to Unix, Cygwin is a godsend. One package I was always missing from Cygwin is a2ps -- which is really nice for pretty-printing just about anything, which would include source code. Thanks to a rather useful support 'style sheet' for the S language (i.e. GNU R and its commercial sibbling S-Plus), you can typeset S code as well. The patch is once again part of the Debian package and can also be found on CRAN.

I simply grabbed the most recent Debian tarball and diff.gz, unpacked the tarball and applied the patch. You then need to run the appropriate debian/patches patch from the a2ps sources directory as per

sh debian/patches/10_s_support.dpatch -patch

After that, it's just a matter of adding a two-line patch in /usr/include/string.h to comment out two lines

#ifndef __CYGWIN__
_PTR	 _EXFUN(memccpy,(_PTR, const _PTR, int, size_t));
_PTR	 _EXFUN(mempcpy,(_PTR, const _PTR, size_t));
#endif
and
configure --medium=letter; make; make install
builds and install a shiny new a2ps for Cygwin.

/computers/misc | permanent link