aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mh/files/patch-ad
blob: f806e2f15993befb783bf4f4b9391c8544930670 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
The following patch adds shared library support for FreeBSD to MH

*** ../mh-6.8.3.orig/conf/FreeBSD   Tue Dec 27 20:36:52 1994
--- conf/FreeBSD    Tue Dec 27 19:10:35 1994
***************
*** 10,15 ****
--- 10,17 ----
  cc    cc
  signal    void
  remove    rm -f
+ 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) -L../sbr -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/makefiles/support/pop.orig    Thu Feb 22 13:05:50 1996
--- conf/makefiles/support/pop  Thu Feb 22 13:10:18 1996
***************
*** 59,67 ****
  @BEGIN: SHAREDLIB
  LIBES2    =   ../../config/config.o ../../sbr/libmh.so $(LIBES1)
  LDLIBS1   =   $(LIBES1) $(LDOPTLIB)
  LDLIBS2   =   ../../config/config.o ../../config/version.o \
        -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
! @END: SHAREDLIB
  
  LINT  =   lint
  LFLAGS    =   -bhu $(OPTIONS)
--- 59,77 ----
  @BEGIN: SHAREDLIB
  LIBES2    =   ../../config/config.o ../../sbr/libmh.so $(LIBES1)
  LDLIBS1   =   $(LIBES1) $(LDOPTLIB)
+ @END: SHAREDLIB
+ @BEGIN: SUN4SHLIB
  LDLIBS2   =   ../../config/config.o ../../config/version.o \
        -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
! @END: SUN4SHLIB
! @BEGIN: SYS5SHLIB
! LDLIBS2   =   ../../config/config.o ../../config/version.o \
!       -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
! @END: SYS5SHLIB
! @BEGIN: FBSDSHLIB
! LDLIBS2   =   ../../config/config.o ../../config/version.o \
!       @(SLDFLAG) -L../../sbr -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
! @END: FBSDSHLIB
  
  LINT  =   lint
  LFLAGS    =   -bhu $(OPTIONS)
*** ../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,40 ----
  #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# */
! #ifndef MHSLIBVER
! #define   MHSLIBVER   "3.2"       /* Shared library version */
! #endif
  
  #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
--- conf/makefiles/sbr.orig Tue Sep 22 16:38:28 1998
+++ conf/makefiles/sbr  Tue Sep 22 16:51:48 1998
@@ -157,6 +157,7 @@
 inst-lib:  libmh.so $(LIBSA)
        -rm -f $(SLIBDIR)/libmh.so.$(SLIBVER)
        cp libmh.so.$(SLIBVER) $(SLIBDIR)/libmh.so.$(SLIBVER)
+       ln -s libmh.so.$(SLIBVER) $(SLIBDIR)/libmh.so
        -@chmod $(PGMPROT) $(SLIBDIR)/libmh.so.$(SLIBVER)
        -@ls -l $(SLIBDIR)/libmh.so.*
        -@echo "Shared library installed normally"
--- conf/Makefile.orig  Wed Sep 23 10:27:39 1998
+++ conf/Makefile   Wed Sep 23 10:27:25 1998
@@ -6,10 +6,15 @@
 SHELL  =   /bin/sh
 
 CC      =      cc
-CFLAGS  =      -O
 LFLAGS  =      -bhu
 LDFLAGS =
 LIBES   =
+
+.if ${PORTOBJFORMAT} == "elf"
+CFLAGS  =      -O -DMHSLIBVER=\"3\"
+.else
+CFLAGS  =      -O -DMHSLIBVER=\"3.2\"
+.endif
 
 
 ######################################################################