Bug 26545

Summary: Fix port: mail/drac
Product: Ports & Packages Reporter: anders <anders>
Component: Individual Port(s)Assignee: freebsd-ports (Nobody) <ports>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description anders 2001-04-13 22:50:01 UTC
Add -b option to rpcgen calls, to have the port working in -current.

How-To-Repeat: 
Install 5.0-20010408-CURRENT

cd /usr/ports/mail/drac && make install
Comment 1 anders 2001-04-13 23:43:16 UTC
Umm, forget that patch. Sorry. Use this instead, as rpcgen -b in -stable
generates new errors. The updated patch can also be downloaded from
http://anders.fix.no/ports/archives/drac.diffs.2.

diff -Nur drac.old/Makefile drac/Makefile
--- drac.old/Makefile	Fri Feb  9 21:32:36 2001
+++ drac/Makefile	Fri Apr 13 23:24:58 2001
@@ -21,8 +21,14 @@
 MAN3=		dracauth.3
 MAN1=		rpc.dracd.1
 
+.include <bsd.port.pre.mk>
+
 post-patch:
 	@${PERL} -pi -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/rpc.dracd.1m
+.if ${OSVERSION} >= 500018
+	@${PERL} -pi -e "s|^RPCGENFLAGS.*|RPCGENFLAGS = -C -b|g" \
+		${WRKSRC}/Makefile
+.endif
 	@${ECHO} "================================================================================"
 	@${ECHO} "Use make -DWITH_POSTFIX or -DWITH_EXIM with this port for databases compatible"
 	@${ECHO} "with those MTAs."
@@ -37,4 +43,4 @@
 	@${INSTALL_MAN} ${WRKSRC}/rpc.dracd.1m ${PREFIX}/man/man1/rpc.dracd.1
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -Nur drac.old/pkg-descr drac/pkg-descr
--- drac.old/pkg-descr	Fri Feb  9 21:32:37 2001
+++ drac/pkg-descr	Fri Apr 13 22:14:50 2001
@@ -9,3 +9,5 @@
 The POP and SMTP servers can be on different hosts.
 
 WWW: http://mail.cc.umanitoba.ca/drac/
+
+- Anders Nordby <anders@fix.no>

-- 
Anders.
Comment 2 Tetsurou Okazaki freebsd_committer freebsd_triage 2001-04-20 20:39:14 UTC
Class Changed
From-To: change-request->maintainer-update

Fix submitted by maintainer
Comment 3 anders 2001-04-29 20:51:39 UTC
Uh. Use this instead. This will make the port use the new TI_RPC code in
-current instead of rpcgen -b.

This patch can also be downloaded from
http://anders.fix.no/ports/archives/drac.diffs.3.

diff -Nur drac.old/Makefile drac/Makefile
--- drac.old/Makefile	Fri Feb  9 21:32:36 2001
+++ drac/Makefile	Sun Apr 29 20:33:21 2001
@@ -21,6 +21,11 @@
 MAN3=		dracauth.3
 MAN1=		rpc.dracd.1
 
+.include <bsd.port.pre.mk>
+.if ${OSVERSION} >= 500018
+MAKE_ARGS+=	-DWITH_TI_RPC
+.endif
+
 post-patch:
 	@${PERL} -pi -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/rpc.dracd.1m
 	@${ECHO} "================================================================================"
@@ -37,4 +42,4 @@
 	@${INSTALL_MAN} ${WRKSRC}/rpc.dracd.1m ${PREFIX}/man/man1/rpc.dracd.1
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -Nur drac.old/files/patch-aa drac/files/patch-aa
--- drac.old/files/patch-aa	Fri Feb  9 21:32:37 2001
+++ drac/files/patch-aa	Sun Apr 29 20:41:03 2001
@@ -1,5 +1,5 @@
---- Makefile.old	Mon Nov 20 16:35:16 2000
-+++ Makefile	Sun Jan 14 20:06:47 2001
+--- Makefile.orig	Mon Nov 20 16:35:16 2000
++++ Makefile	Sun Apr 29 20:38:47 2001
 @@ -5,9 +5,10 @@
  
  # Paths
@@ -14,17 +14,23 @@
  
  # OS-Dependant settings
  
-@@ -33,20 +34,26 @@
+@@ -33,20 +34,32 @@
  # -DCIDR_KEY	# keys in CIDR format
  # -DTERM_KD	# keys and data nul-terminated
  
 -DEFS = -DTI_RPC -DFCNTL_LOCK -DSYSINFO
++.if defined(WITH_TI_RPC)
++RPCFLAGS=	-DTI_RPC
++.else
++RPCFLAGS=	-DSOCK_RPC
++.endif
++
 +.if defined(WITH_POSTFIX)
-+DEFS=	-DSOCK_RPC -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD
++DEFS=	$(RPCFLAGS) -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD
 +.elif defined(WITH_EXIM)
-+DEFS=	-DSOCK_RPC -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD -DREQ_HASH -DCIDR_KEY
++DEFS=	$(RPCFLAGS) -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD -DREQ_HASH -DCIDR_KEY
 +.else
-+DEFS=	-DSOCK_RPC -DFLOCK_LOCK -DGETHOST -DDASH_C 
++DEFS=	$(RPCFLAGS) -DFLOCK_LOCK -DGETHOST -DDASH_C 
 +.endif
  
  # Compiler flags 
diff -Nur drac.old/files/patch-ac drac/files/patch-ac
--- drac.old/files/patch-ac	Fri Feb  9 21:32:37 2001
+++ drac/files/patch-ac	Sun Apr 29 20:42:16 2001
@@ -1,12 +1,20 @@
---- rpc.dracd.c.old	Sun Jan 14 20:53:02 2001
-+++ rpc.dracd.c	Sun Jan 14 20:53:10 2001
-@@ -36,9 +36,6 @@
+--- rpc.dracd.c.orig	Tue Nov 21 05:22:05 2000
++++ rpc.dracd.c	Sun Apr 29 20:41:31 2001
+@@ -8,7 +8,6 @@
+ #include <errno.h>
+ #include <syslog.h>
+ #ifdef TI_RPC
+-#include <netdir.h>
+ #include <netconfig.h>
+ #endif
+ #include <stdlib.h>
+@@ -35,9 +34,6 @@
+ #define DB_VERSION_MAJOR 1
  #endif
  #include "drac.h"
- 
+-
 -#define DBFILE "/etc/mail/dracd.db"
 -#define ALFILE "/etc/mail/dracd.allow"
--
+ 
  struct net_def {
      struct net_def *nd_next;
-     struct in_addr nd_mask;
diff -Nur drac.old/pkg-descr drac/pkg-descr
--- drac.old/pkg-descr	Fri Feb  9 21:32:37 2001
+++ drac/pkg-descr	Sun Apr 29 20:34:25 2001
@@ -9,3 +9,5 @@
 The POP and SMTP servers can be on different hosts.
 
 WWW: http://mail.cc.umanitoba.ca/drac/
+
+- Anders Nordby <anders@fix.no>

-- 
Anders.
Comment 4 alex freebsd_committer freebsd_triage 2001-05-09 10:52:49 UTC
State Changed
From-To: open->closed

Committed, thanks