1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-31 21:57:12 +00:00
freebsd-ports/mail/imap-uw/files/patch-ab

92 lines
2.4 KiB
Plaintext
Raw Normal View History

1998-10-13 23:25:07 +00:00
--- src/osdep/unix/Makefile.orig Thu Jul 16 14:12:22 1998
+++ src/osdep/unix/Makefile Mon Oct 12 19:21:56 1998
@@ -88,12 +88,12 @@
# Normally no need to change any of these
-ARCHIVE=c-client.a
+ARCHIVE=libc-client.a
BINARIES=mail.o misc.o newsrc.o smanager.o osdep.o utf8.o siglocal.o \
dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
unix.o mbox.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o
-CFLAGS=$(BASECFLAGS) $(EXTRACFLAGS)
+CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS)
MAKE=make
MV=mv
RM=rm -rf
1998-10-13 23:25:07 +00:00
@@ -108,6 +108,15 @@
PASSWDTYPE=$(PASSWDTYPE) AFSDIR=$(AFSDIR) GSSDIR=$(GSSDIR)
BUILD=$(MAKE) build $(BUILDOPTIONS) $(EXTRASPECIALS)
+# Need this for the shared library rule to work correctly
+.SUFFIXES: .o .so
1998-10-13 23:25:07 +00:00
+.if ${PORTOBJFORMAT} == "elf"
+SHLIB=libc-client.so.2
+.else
+SHLIB=libc-client.so.2.1
1998-10-13 23:25:07 +00:00
+.endif
+SOFILES=${BINARIES:.o=.so}
+
# Here if no make argument established
missing: osdep.h
1998-10-13 23:25:07 +00:00
@@ -179,11 +188,11 @@
BASECFLAGS="-g -Dconst= -DNFSKLUDGE"
1997-12-07 01:02:52 +00:00
bsf: # FreeBSD
- $(BUILD) OS=bsi SIGTYPE=psx \
+ $(BUILD) $(SHLIB) OS=bsi SIGTYPE=psx \
SPOOLDIR=/var \
ACTIVEFILE=/usr/local/news/lib/active \
RSHPATH=/usr/bin/rsh \
- BASECFLAGS="-g -O -pipe -DNFSKLUDGE" \
+ BASECFLAGS="-DNFSKLUDGE -DIGNORE_LOCK_EACCES_ERRORS" \
BASELDFLAGS="-lcrypt"
1997-12-07 01:02:52 +00:00
bsi: # BSD/i386
1998-10-13 23:25:07 +00:00
@@ -565,10 +574,21 @@
@cat ARCHIVE
@$(SH) ARCHIVE
+$(SHLIB): $(SOFILES)
1998-10-13 23:25:07 +00:00
+.if $(PORTOBJFORMAT) == "elf"
+ ld -Bshareable -x -o $(SHLIB) $(SOFILES)
1998-10-13 23:25:07 +00:00
+.else
+ ld -Bshareable -x -soname $(SHLIB) -o $(SHLIB) $(SOFILES)
+.endif
+
+.c.so: osdep.h
+ $(CC) -fpic -DPIC -c $(CFLAGS) ${@:.so=.c} -o $@
+
# Cleanup
clean:
sh -c '$(RM) auths.c flockbsd.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE $(ARCHIVE) || true'
+ $(RM) *.so $(SHLIB)
# Dependencies
1998-10-13 23:25:07 +00:00
@@ -602,7 +622,7 @@
# OS-dependent
-osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
+OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
osdep.h env_unix.h tcp_unix.h \
osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c \
auths.c flock.c flockbsd.c flcksafe.c fsync.c gethstid.c \
1998-10-13 23:25:07 +00:00
@@ -614,7 +634,12 @@
1997-12-07 01:02:52 +00:00
write.c \
strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
OSCFLAGS
+
+osdep.o: $(OSDEPS)
$(CC) $(CFLAGS) `cat OSCFLAGS` -c osdep.c
+
+osdep.so: $(OSDEPS)
+ $(CC) $(CFLAGS) `cat OSCFLAGS` -c osdep.c -o $@ -fpic -DPIC
osdep.c: osdepbas.c osdepckp.c osdeplog.c
sh -c '$(RM) osdep.c || true'