summaryrefslogtreecommitdiff
path: root/irc/psybnc
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2008-02-27 20:21:21 +0000
committerBeech Rintoul <beech@FreeBSD.org>2008-02-27 20:21:21 +0000
commita56de83a657b5c7bc41e4380fbd6e714059d5106 (patch)
treec037644ee5d00e582dcf39c6d65a437f5bc56e17 /irc/psybnc
parent- Update to 0.97 (diff)
- Fix with amd64
- Bump portrevision PR: ports/121097 Submitted by: Alexander Chernikov <melifaro@bol.megaon.ru>
Notes
Notes: svn path=/head/; revision=208017
Diffstat (limited to 'irc/psybnc')
-rw-r--r--irc/psybnc/Makefile5
-rw-r--r--irc/psybnc/files/patch-gcc_compile79
-rw-r--r--irc/psybnc/files/patch-src_match.c11
-rw-r--r--irc/psybnc/files/patch-src_p_blowfish.c38
-rw-r--r--irc/psybnc/files/patch-src_p_global.h23
-rw-r--r--irc/psybnc/files/patch-src_p_idea.c22
-rw-r--r--irc/psybnc/files/patch-src_p_memory.c34
7 files changed, 129 insertions, 83 deletions
diff --git a/irc/psybnc/Makefile b/irc/psybnc/Makefile
index feae2ebfcef0..db3de666dfd2 100644
--- a/irc/psybnc/Makefile
+++ b/irc/psybnc/Makefile
@@ -7,6 +7,7 @@
PORTNAME= psybnc
DISTVERSION= 2.3.2-7
+PORTREVISION= 1
CATEGORIES= irc ipv6
MASTER_SITES= http://www.psybnc.at/download/beta/ CENKES
DISTNAME= psyBNC-${DISTVERSION}
@@ -21,10 +22,6 @@ IS_INTERACTIVE= yes
.include <bsd.port.pre.mk>
-.if ${ARCH} == amd64
-BROKEN= does not run on amd64
-.endif
-
post-patch:
@${REINPLACE_CMD} -e 's#=help/#=${PSYBASE}/help/#' ${WRKSRC}/lang/*
diff --git a/irc/psybnc/files/patch-gcc_compile b/irc/psybnc/files/patch-gcc_compile
deleted file mode 100644
index 830fb3438ec5..000000000000
--- a/irc/psybnc/files/patch-gcc_compile
+++ /dev/null
@@ -1,79 +0,0 @@
-diff -Naurp src/p_blowfish.c src/p_blowfish.c
---- src/p_blowfish.c 2007-02-26 12:16:53.000000000 +0000
-+++ src/p_blowfish.c 2007-02-26 12:17:11.000000000 +0000
-@@ -31,7 +31,7 @@ static char rcsid[] = "@(#)$Id: p_blowfi
- #include <string.h>
- #include <config.h>
-
--char *strmncpy(char *dest, char *source, size_t len);
-+char *strmncpy(char *dest, const char *source, size_t len);
- char *lngtxt(int msgnum);
-
- #define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt));strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; }
-diff -Naurp src/p_global.h src/p_global.h
---- src/p_global.h 2007-02-26 12:16:53.000000000 +0000
-+++ src/p_global.h 2007-02-26 12:17:11.000000000 +0000
-@@ -972,8 +972,8 @@ int checklogging(int usern);
- #endif
-
- #ifndef P_MEMORY
--unsigned long *__pmalloc(unsigned long size,char *module,char *function,int line);
--void _pfree(void * pointer,char *module, char *function, int line);
-+unsigned long *__pmalloc(unsigned long size,const char *module,const char *function,int line);
-+void _pfree(void * pointer,char *module, const char *function, int line);
- struct usert *user(int usern);
- struct newpeert *newpeer(int usern);
- struct datalinkt *datalink(int usern);
-@@ -1092,7 +1092,7 @@ int replace(char *rps, char whatc, char
- char *nobreak(char *tobreak);
- char *randstring(int length);
- char *strmcat(char *first,char *second);
--char *strmncpy(char *dest, char *source, unsigned int len);
-+char *strmncpy(char *dest, const char *source, unsigned int len);
- int strmncasecmp(char *one, char *two);
- int strmcmp(char *one, char *two);
- int strmwildcmp(char *line, char *wildcard);
-diff -Naurp src/p_memory.c src/p_memory.c
---- src/p_memory.c 2007-02-26 12:16:53.000000000 +0000
-+++ src/p_memory.c 2007-02-26 12:17:11.000000000 +0000
-@@ -32,7 +32,7 @@ FILE *logm=NULL;
-
- /* malloc-wrapper. No memory will log an error entry and kill the bouncer */
-
--unsigned long *__pmalloc(unsigned long size,char *module,char *function, int line)
-+unsigned long *__pmalloc(unsigned long size,const char *module,const char *function, int line)
- {
- unsigned long *rc;
- if (!(rc=(unsigned long *)malloc(size)))
-@@ -53,7 +53,7 @@ unsigned long *__pmalloc(unsigned long s
- return rc;
- }
-
--void _pfree(unsigned long *pointer, char *module, char *function, int line)
-+void _pfree(unsigned long *pointer, char *module, const char *function, int line)
- {
- #ifdef LOGALLOC
- if(logm==NULL)
-diff -Naurp src/p_string.c src/p_string.c
---- src/p_string.c 2007-02-26 12:16:53.000000000 +0000
-+++ src/p_string.c 2007-02-26 12:17:11.000000000 +0000
-@@ -51,7 +51,7 @@ char *lngtxt(unsigned int msgnum)
-
- /* string copy with len and zero delimit */
-
--char *strmncpy(char *dest, char *source, unsigned int len)
-+char *strmncpy(char *dest, const char *source, unsigned int len)
- {
- char bf[strlen(source)+2];
- char *pt;
-diff -Naurp src/match.c src/match.c
---- src/match.c 2007-02-26 12:26:10.000000000 +0000
-+++ src/match.c 2007-02-26 12:26:17.000000000 +0000
-@@ -36,6 +36,7 @@
- /* Remove the next line to use this in IrcII */
- #define EGGDROP
-
-+#include <p_global.h>
-
- /* ===================================================================
- * Best to leave stuff after this point alone, but go on and change
diff --git a/irc/psybnc/files/patch-src_match.c b/irc/psybnc/files/patch-src_match.c
new file mode 100644
index 000000000000..74e6063319ea
--- /dev/null
+++ b/irc/psybnc/files/patch-src_match.c
@@ -0,0 +1,11 @@
+diff -Naurp src/match.c src/match.c
+--- src/match.c 2007-02-26 12:26:10.000000000 +0000
++++ src/match.c 2007-02-26 12:26:17.000000000 +0000
+@@ -36,6 +36,7 @@
+ /* Remove the next line to use this in IrcII */
+ #define EGGDROP
+
++#include <p_global.h>
+
+ /* ===================================================================
+ * Best to leave stuff after this point alone, but go on and change
diff --git a/irc/psybnc/files/patch-src_p_blowfish.c b/irc/psybnc/files/patch-src_p_blowfish.c
new file mode 100644
index 000000000000..1f56e326b397
--- /dev/null
+++ b/irc/psybnc/files/patch-src_p_blowfish.c
@@ -0,0 +1,38 @@
+--- src/p_blowfish.c 2005-06-04 22:22:45.000000000 +0400
++++ src/p_blowfish.c 2008-02-25 23:42:07.000000000 +0300
+@@ -27,16 +27,21 @@
+ static char rcsid[] = "@(#)$Id: p_blowfish.c,v 1.3 2005/06/04 18:00:14 hisi Exp $";
+ #endif
+
++#include <p_global.h>
++/*
+ #include <stdio.h>
+ #include <string.h>
+ #include <config.h>
+
+ char *strmncpy(char *dest, char *source, size_t len);
+ char *lngtxt(int msgnum);
++*/
+
++/*
+ #define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt));strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; }
+ #define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__)
+ #define free(n) _pfree(n,__FILE__,__FUNCTION__,__LINE__)
++*/
+
+ unsigned char *hashstring(unsigned char *str,int len);
+ unsigned char *unhashstring(unsigned char *str);
+@@ -478,10 +483,11 @@
+ char *p, *s, *dest, *d, *pt;
+ char rim[5],ep[5],rep[5];
+ int i;
+- dest = (char *) pmalloc((strlen(str) + 9) * 2);
++ dest = __pmalloc((strlen(str) + 9) * 2, "p_blowfish.c", "BLOWencrypt", 481);
++ dest = pmalloc((strlen(str) + 9) * 2);
+ *dest=0;
+ /* pad fake string with 8 bytes to make sure there's enough */
+- s = (char *) pmalloc(strlen(str) + 9);
++ s = pmalloc(strlen(str) + 9);
+ strcpy(s, str);
+ p = s;
+ while (*p)
diff --git a/irc/psybnc/files/patch-src_p_global.h b/irc/psybnc/files/patch-src_p_global.h
new file mode 100644
index 000000000000..5cf165ba5bd5
--- /dev/null
+++ b/irc/psybnc/files/patch-src_p_global.h
@@ -0,0 +1,23 @@
+diff -urN src/p_global.h psybnc.new/src/p_global.h
+--- src/p_global.h 2005-06-04 22:22:45.000000000 +0400
++++ src/p_global.h 2008-02-25 23:36:21.000000000 +0300
+@@ -972,7 +972,7 @@
+ #endif
+
+ #ifndef P_MEMORY
+-unsigned long *__pmalloc(unsigned long size,char *module,char *function,int line);
++char *__pmalloc(unsigned long size,char *module,char *function,int line);
+ void _pfree(void * pointer,char *module, char *function, int line);
+ struct usert *user(int usern);
+ struct newpeert *newpeer(int usern);
+@@ -1267,8 +1267,8 @@
+
+ #endif
+
+-#define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt)); strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; }
+-#define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__)
++#define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt)); strmncpy(cfunc,(char*)__FUNCTION__,sizeof(cfunc)); cline=__LINE__; }
++#define pmalloc(n) __pmalloc((n),__FILE__,(char*)__FUNCTION__,(int)__LINE__)
+
+ #define SSLCERT "key/psybnc.cert.pem"
+ #define SSLKEY "key/psybnc.key.pem"
diff --git a/irc/psybnc/files/patch-src_p_idea.c b/irc/psybnc/files/patch-src_p_idea.c
new file mode 100644
index 000000000000..fd271dbd5366
--- /dev/null
+++ b/irc/psybnc/files/patch-src_p_idea.c
@@ -0,0 +1,22 @@
+diff -urN src/p_idea.c psybnc.new/src/p_idea.c
+--- src/p_idea.c 2005-06-04 22:22:45.000000000 +0400
++++ src/p_idea.c 2008-02-25 23:44:12.000000000 +0300
+@@ -50,6 +50,9 @@
+ * string encryption by psychoid
+ */
+
++
++#include <p_global.h>
++/*
+ #include <time.h>
+ #include <string.h>
+ #include <stdlib.h>
+@@ -62,7 +65,7 @@
+
+ #define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt));strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; }
+ #define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__)
+-
++*/
+ #ifdef CRYPT
+
+ #define IDEAROUNDS 8
diff --git a/irc/psybnc/files/patch-src_p_memory.c b/irc/psybnc/files/patch-src_p_memory.c
new file mode 100644
index 000000000000..092a5a73147a
--- /dev/null
+++ b/irc/psybnc/files/patch-src_p_memory.c
@@ -0,0 +1,34 @@
+diff -urN src/p_memory.c psybnc.new/src/p_memory.c
+--- src/p_memory.c 2005-06-04 22:22:45.000000000 +0400
++++ src/p_memory.c 2008-02-25 23:31:29.000000000 +0300
+@@ -32,10 +32,10 @@
+
+ /* malloc-wrapper. No memory will log an error entry and kill the bouncer */
+
+-unsigned long *__pmalloc(unsigned long size,char *module,char *function, int line)
++char *__pmalloc(unsigned long size,char *module,char *function, int line)
+ {
+- unsigned long *rc;
+- if (!(rc=(unsigned long *)malloc(size)))
++ char *rc;
++ if (!(rc=(char *)malloc(size)))
+ {
+ p_log(LOG_ERROR,-1,lngtxt(602),module,function,line);
+ exit(0x0);
+@@ -53,7 +53,7 @@
+ return rc;
+ }
+
+-void _pfree(unsigned long *pointer, char *module, char *function, int line)
++void _pfree(char *pointer, char *module, char *function, int line)
+ {
+ #ifdef LOGALLOC
+ if(logm==NULL)
+@@ -67,7 +67,7 @@
+ free(pointer);
+ }
+
+-#define free(a) _pfree((void *)a,__FILE__,__FUNCTION__,__LINE__)
++#define free(a) _pfree((void *)a,__FILE__,(char*)__FUNCTION__,__LINE__)
+
+ /* struct wrappers. Those alloc, delete and return the needed structures */