From mark@grondar.za  Tue Dec 27 19:36:02 1994
Received: from grunt.grondar.za (grunt.grondar.za [196.7.18.129]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id TAA20675 for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Dec 1994 19:35:37 GMT
Received: (from mark@localhost) by grunt.grondar.za (8.6.9/8.6.9) id VAA13910; Tue, 27 Dec 1994 21:34:40 +0200
Message-Id: <199412271934.VAA13910@grunt.grondar.za>
Date: Tue, 27 Dec 1994 21:34:40 +0200
From: Mark Murray <mark@grondar.za>
Reply-To: mark@grondar.za
To: FreeBSD-gnats-submit@freebsd.org
Subject: MH has no 'local' shared libraries.
X-Send-Pr-Version: 3.2

>Number:         88
>Category:       misc
>Synopsis:       MH has no 'local' shared libraries.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    core
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 27 11:40:01 1994
>Closed-Date:    Tue Dec 27 11:40:01 1994
>Last-Modified:  Thu Sep 13 12:55:21 GMT 2007
>Originator:     Mark Murray
>Release:        FreeBSD 2.1.0-Development i386
>Organization:
GTA
>Environment:

I use MH as my mailer of choice (I know, I'm a geek ;-), and I used the
ports-mail port of MH to compile MH on my -current system.

>Description:

I noticed at compile time that MH had not been configured to take
advantage of the SUN/SYS5 shared libraries (in sbr/), so I did it.

>How-To-Repeat:

Compile ports/mail/mh.

>Fix:
	
Please could some kind soul with commit powers commit the following
as patch-ad in ports-mail/mh/patches? Obviously those already using
MH will have to re-ldconfig, as the library gets dumped into 
/usr/local/lib/libmh.so.3.2, and MH will break if it can't find this.

------8<--------------patch-ad-------------------------------------------
*** ../mh-6.8.3.orig/conf/FreeBSD	Tue Dec 27 20:36:52 1994
--- conf/FreeBSD	Tue Dec 27 19:10:35 1994
***************
*** 9,14 ****
--- 9,16 ----
  mts	sendmail/smtp
  cc	cc
  signal	void
+ sharedlib fbsd
+ slflags	-fpic
  
  # Good options for all MH installations (personal preferences)
  options	ATHENA DUMB FOLDPROT='"0700"' MHE MHRC RPATHS SBACKUP='"\\043"'
*** ../mh-6.8.3.orig/conf/makefiles/sbr	Wed Dec  1 06:00:23 1993
--- conf/makefiles/sbr	Tue Dec 27 19:01:07 1994
***************
*** 123,128 ****
--- 123,131 ----
  @BEGIN: SYS5SHLIB
  		(cd shared; ld -G -o ../$@ -h $@.$(SLIBVER) $(OFILES))
  @END: SYS5SHLIB
+ @BEGIN: FBSDSHLIB
+ 		(cd shared; ld -Bshareable -o ../$@ $(OFILES))
+ @END: FBSDSHLIB
  		-@rm -f $@.$(SLIBVER)
  		ln $@ $@.$(SLIBVER)
  		-@ls -l $@*
*** ../mh-6.8.3.orig/conf/makefiles/uip	Wed Dec  1 06:00:23 1993
--- conf/makefiles/uip	Tue Dec 27 19:30:22 1994
***************
*** 138,147 ****
  SLIBVER	=	.@(SLIBVER)
  @END: SUN4SHLIB
  @BEGIN: SHAREDLIB
! LIBES	=	../config/config.o ../sbr/libmh.so ../mts/libmts.a \
! 		../zotnet/libzot.a
  LDLIBES	=	../config/config.o -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) \
  		../mts/libmts.a  ../zotnet/libzot.a
  LDLIBS	=	$(LDLIBES) ../config/version.o $(LDOPTLIB)
  @END: SHAREDLIB
  LINT	=	lint
--- 138,157 ----
  SLIBVER	=	.@(SLIBVER)
  @END: SUN4SHLIB
  @BEGIN: SHAREDLIB
! @BEGIN: SUN4SHLIB
! LDLIBES	=	../config/config.o -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) \
! 		../mts/libmts.a  ../zotnet/libzot.a
! @END: SUN4SHLIB
! @BEGIN: SYS5SHLIB
  LDLIBES	=	../config/config.o -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) \
  		../mts/libmts.a  ../zotnet/libzot.a
+ @END: SYS5SHLIB
+ @BEGIN: FBSDSHLIB
+ LDLIBES	=	../config/config.o @(SLDFLAG) -lmh$(SLIBVER) \
+ 		../mts/libmts.a  ../zotnet/libzot.a
+ @END: FBSDSHLIB
+ LIBES	=	../config/config.o ../sbr/libmh.so ../mts/libmts.a \
+ 		../zotnet/libzot.a
  LDLIBS	=	$(LDLIBES) ../config/version.o $(LDOPTLIB)
  @END: SHAREDLIB
  LINT	=	lint
*** ../mh-6.8.3.orig/conf/mhconfig.c	Wed Dec  1 06:00:24 1993
--- conf/mhconfig.c	Tue Dec 27 19:08:40 1994
***************
*** 32,38 ****
  #define	MHRELEASE	"6.8.3"		/* for version: "Maj.min.pat" */
  #define	MHCENTERFOOT	"MH.6.8"	/* for nroff page footers */
  #define	MHLEFTFOOT	"[mh.6]"	/* [mh.6]    MH.6.6   page# */
! #define	MHSLIBVER	"3.2"		/* SunOS4 shared library version */
  
  #define	NOTOK	(-1)
  
--- 32,38 ----
  #define	MHRELEASE	"6.8.3"		/* for version: "Maj.min.pat" */
  #define	MHCENTERFOOT	"MH.6.8"	/* for nroff page footers */
  #define	MHLEFTFOOT	"[mh.6]"	/* [mh.6]    MH.6.6   page# */
! #define	MHSLIBVER	"3.2"		/* Shared library version */
  
  #define	NOTOK	(-1)
  
***************
*** 456,461 ****
--- 456,465 ----
  	fprintf (fp, "/^@BEGIN: SYS5SHLIB$/d\n/^@END: SYS5SHLIB$/d\n");
      else
  	fprintf (fp, "/^@BEGIN: SYS5SHLIB$/,/^@END: SYS5SHLIB$/d\n");
+     if (strcmp (sharedlib, "fbsd") == 0)
+ 	fprintf (fp, "/^@BEGIN: FBSDSHLIB$/d\n/^@END: FBSDSHLIB$/d\n");
+     else
+ 	fprintf (fp, "/^@BEGIN: FBSDSHLIB$/,/^@END: FBSDSHLIB$/d\n");
  
  /*  */
  
***************
*** 774,782 ****
  
      if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off")
  	    && strcmp (sharedlib, "sun4") && strcmp (sharedlib, "sys5")
! 	    && strcmp (sharedlib, "secure"))
  	adios (NULLCP,
! 	    "sharedlib should be either \"sun4\", \"sys5\", or \"off\", not %s",
  	    sharedlib);
  
      (void) sprintf(buffer, "TYPESIG=%s", signl);
--- 778,786 ----
  
      if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off")
  	    && strcmp (sharedlib, "sun4") && strcmp (sharedlib, "sys5")
! 	    && strcmp (sharedlib, "fbsd") && strcmp (sharedlib, "secure"))
  	adios (NULLCP,
! 	    "sharedlib should be either \"sun4\", \"sys5\", \"fbsd\" or \"off\", not %s",
  	    sharedlib);
  
      (void) sprintf(buffer, "TYPESIG=%s", signl);
*** ../mh-6.8.3.orig/support/bboards/mmdfII/bboards/lock.c	Wed Dec  1 06:01:30 1993
--- support/bboards/mmdfII/bboards/lock.c	Tue Dec 27 19:58:05 1994
***************
*** 47,52 ****
--- 47,56 ----
  #include <sys/file.h>
  #endif
  
+ #ifdef __FreeBSD__
+ #include <fcntl.h>
+ #endif
+ 
  #ifdef	SYS5
  #define	u_short	ushort
  #define u_long  ulong
*** ../mh-6.8.3.orig/support/pop/mmdfII/pop/lock.c	Wed Dec  1 06:01:30 1993
--- support/pop/mmdfII/pop/lock.c	Tue Dec 27 19:58:05 1994
***************
*** 47,52 ****
--- 47,56 ----
  #include <sys/file.h>
  #endif
  
+ #ifdef __FreeBSD__
+ #include <fcntl.h>
+ #endif
+ 
  #ifdef	SYS5
  #define	u_short	ushort
  #define u_long  ulong
diff -cdr ../mh-6.8.3.orig/zotnet/mts/lock.c ./zotnet/mts/lock.c
*** ../mh-6.8.3.orig/zotnet/mts/lock.c	Wed Dec  1 06:01:30 1993
--- zotnet/mts/lock.c	Tue Dec 27 19:58:05 1994
***************
*** 47,52 ****
--- 47,56 ----
  #include <sys/file.h>
  #endif
  
+ #ifdef __FreeBSD__
+ #include <fcntl.h>
+ #endif
+ 
  #ifdef	SYS5
  #define	u_short	ushort
  #define u_long  ulong
------8<--------------patch-ad-------------------------------------------
>Release-Note:
>Audit-Trail:
>Unformatted:



