Subject: pkg/28615: mail/pine does not compile on IRIX
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 12/12/2004 01:36:00
>Number:         28615
>Category:       pkg
>Synopsis:       mail/pine does not compile on IRIX
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 12 01:36:00 +0000 2004
>Originator:     Georg Schwarz
>Release:        current pkgsrc
IRIX lorenz 5.3 08031225 IP20 mips
mail/pine does not compile on IRIX (at least IRIX 5.x).
One issue seems to be that pine uses vfork() which IRIX 5.x at least does not have.

--- Makefile.orig       2004-12-11 22:59:04.000000000 +0100
+++ Makefile    2004-12-12 01:54:30.000000000 +0100
@@ -30,6 +30,14 @@
 .elif ${OPSYS} == "Darwin"
 BUILDNAME=     osx
 BUILDFILE=     osx
+.elif ${OPSYS} == "IRIX"
+.if ${OS_VERSION} >= 6.5
+BUILDNAME=     sg6
+BUILDNAME=     sgi
+CFLAGS+=       -Dvfork=fork
+BUILDFILE=     sgi
 BUILDNAME=     neb
 BUILDFILE=     neb

Secondly, add a patch that patchs makefile.sgi (similary to the other supported platforms' makefiles):

--- makefile.sgi.orig   2004-12-11 23:35:09.000000000 +0100
+++ makefile.sgi        2004-12-11 23:43:26.000000000 +0100
@@ -47,9 +47,11 @@
 MAKE=        make
 OPTIMIZE=    # -O
 PROFILE=     # -pg
-DEBUG=       -g -DDEBUG
+DEBUG=       -DDEBUG # -g
-CCLIENTDIR=  ../c-client
+CCLIENTINC=  ${CCLIENTDIR}/include/c-client
 PICODIR=     ../pico
 # Only need to uncomment next two lines if you run make from this directory
@@ -63,14 +65,13 @@
 # Uncomment the line below *if* you're running IRIX < 5.0 *and* your
 # site is using NIS.
-STDLIBS=     -ltermlib $(EXTRASTDLIBES)
-LOCLIBS=     $(PICODIR)/libpico.a $(CCLIENTDIR)/c-client.a
-             `cat $(CCLIENTDIR)/LDFLAGS`
+STDLIBS=     -ltermlib -lssl -lcrypto -lcrypt $(EXTRASTDLIBES)
+LOCLIBS=     -lpico -lc-client
 OFILES=        addrbook.o adrbkcmd.o adrbklib.o args.o bldaddr.o context.o filter.o \
        folder.o help.o helptext.o imap.o init.o mailcap.o mailcmd.o \
@@ -82,20 +83,20 @@
        $(PICODIR)/headers.h $(PICODIR)/estruct.h \
        $(PICODIR)/edef.h $(PICODIR)/efunc.h \
        $(PICODIR)/pico.h $(PICODIR)/os.h \
-       $(CCLIENTDIR)/mail.h $(CCLIENTDIR)/osdep.h \
-       $(CCLIENTDIR)/rfc822.h $(CCLIENTDIR)/misc.h
+       $(CCLIENTINC)/mail.h $(CCLIENTINC)/osdep.h \
+       $(CCLIENTINC)/rfc822.h $(CCLIENTINC)/misc.h
 all:   pine rpload rpdump
-pine:  $(OFILES) $(LOCLIBS)
+pine:  $(OFILES)
        echo "char datestamp[]="\"`date`\"";" > date.c
        echo "char hoststamp[]="\"`hostname`\"";" >> date.c
        $(CC) $(LDFLAGS) $(CFLAGS) -o pine $(OFILES) date.c $(LIBS)
-rpload:        rpload.o $(CCLIENTDIR)/c-client.a
+rpload:        rpload.o $(CCLIENTDIR)/libc-client.a
        $(CC) $(LDFLAGS) $(CFLAGS) -o rpload rpload.o $(LIBS)
-rpdump:        rpdump.o $(CCLIENTDIR)/c-client.a
+rpdump:        rpdump.o $(CCLIENTDIR)/libc-client.a
        $(CC) $(LDFLAGS) $(CFLAGS) -o rpdump rpdump.o $(LIBS)
 pine-use:      pine-use.c
@@ -115,8 +116,8 @@
 $(OFILES):                                             $(HFILES)
 addrbook.o adrbkcmd.o adrbklib.o bldaddr.o takeaddr.o: adrbklib.h
-context.o:                                             $(CCLIENTDIR)/misc.h
-send.o:                                                        $(CCLIENTDIR)/smtp.h
+context.o:                                             $(CCLIENTINC)/misc.h
+send.o:                                                        $(CCLIENTINC/smtp.h
 #$(LDAPOFILES):                                                $(LDAPLIBS)
 helptext.c:    pine.hlp