green@ponder.csci.unt.edu (Michael S. Green) (04/18/91)
Has anyone successfully ported groff 1.01 to the NeXT? If so could you forward me info on how it was accomplished? Thanks, Mike Green, University of North Texas
preston@LL.MIT.EDU (Steven Preston) (04/20/91)
>>>>> In article <1991Apr17.224407.5966@solo.csci.unt.edu>, green@ponder.csci.unt.edu (Michael S. Green) writes: > Originator: green@ponder.csci.unt.edu > Has anyone successfully ported groff 1.01 to the NeXT? If so could > you forward me info on how it was accomplished? I have done a lot of work porting various versions of g++ and other GNU software to the NeXT, so I'm not sure if the following description is sufficient to build groff. For example, I ported bison more than a year ago, so in the Makefile for groff I left the line YACC=bison -y If you don't have bison, you'll need to change this. You will have to get libg++ from one of the gnu ftp archives (like prep.ai.mit.edu), and install the include files. I put them in a directory called /usr/gnu/lib/g++-include Anyway, here is a context diff (suitable for input to patch, if you have patch, otherwise it is fairly obvious what changes to make) of the Makefile. ------------------------------------------------------------------- *** Makefile.orig Thu Mar 14 01:29:21 1991 --- Makefile Fri Apr 19 13:33:08 1991 *************** *** 19,26 **** # Define PAGE to be letter if your PostScript printer uses 8.5x11 paper (USA) # and define it to be A4, if it uses A4 paper (rest of the world). ! PAGE=A4 ! #PAGE=letter # BINDIR says where to install executables. BINDIR=/usr/local/bin --- 19,26 ---- # Define PAGE to be letter if your PostScript printer uses 8.5x11 paper (USA) # and define it to be A4, if it uses A4 paper (rest of the world). ! #PAGE=A4 ! PAGE=letter # BINDIR says where to install executables. BINDIR=/usr/local/bin *************** *** 107,113 **** # Comment this out if the GNU malloc gives you problems, or if you would # prefer to use the system malloc. ! MALLOC=malloc.o GROFF= # Comment the next line out if groff.c gives problems. --- 107,113 ---- # Comment this out if the GNU malloc gives you problems, or if you would # prefer to use the system malloc. ! # MALLOC=malloc.o GROFF= # Comment the next line out if groff.c gives problems. *************** *** 114,125 **** GROFF=groff # CC is the C++ compiler ! CC=g++ # I'm told that -fno-inline is needed on a 68030-based Apollo # CC=g++ -fno-inline # OLDCC is the C compiler. ! OLDCC=gcc PROFILE_FLAG= DEBUG_FLAG=-g --- 114,125 ---- GROFF=groff # CC is the C++ compiler ! CC=cc++ # I'm told that -fno-inline is needed on a 68030-based Apollo # CC=g++ -fno-inline # OLDCC is the C compiler. ! OLDCC=cc PROFILE_FLAG= DEBUG_FLAG=-g *************** *** 127,133 **** WARNING_FLAGS=#-Wall -Wcast-qual -Wwrite-strings # Use this to pass additional flags on the command line. ! XCFLAGS= # CFLAGS are passed to sub makes CFLAGS=$(PROFILE_FLAG) $(DEBUG_FLAG) $(OPTIMIZE_FLAG) $(WARNING_FLAGS) \ --- 127,133 ---- WARNING_FLAGS=#-Wall -Wcast-qual -Wwrite-strings # Use this to pass additional flags on the command line. ! XCFLAGS=-I/usr/gnu/lib/g++-include # CFLAGS are passed to sub makes CFLAGS=$(PROFILE_FLAG) $(DEBUG_FLAG) $(OPTIMIZE_FLAG) $(WARNING_FLAGS) \ ------------------------------------------------------------------- You will also have to make a couple one line changes. first edit groff-1.01/troff/input.c and change line 5291 from tm *tt = localtime(&t); to struct tm *tt = localtime(&t); This change is necessary only because the version of g++ on the NeXT is a bit out of date. I also had to change the file /usr/include/sys/signal.h, which required becoming root. Change the line near the end from #if KERNEL to #ifdef KERNEL That's all it took, I think. Good Luck, and let me know if I can help. -- Steve Preston (preston@ll.mit.edu)