pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/fetchmail Fix mail/fetchmail under darwin (PR 285...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3d1106b5bd1f
branches: trunk
changeset: 501389:3d1106b5bd1f
user: tonio <tonio%pkgsrc.org@localhost>
date: Fri Oct 21 20:56:50 2005 +0000
description:
Fix mail/fetchmail under darwin (PR 28543).
The added patches add a prefix "fm_" to lock related finctions, to avoid name
clash with darwin lock functions. Link with -lresolv under darwin.
(thanks scole_at_sdf.lonestar.org for the patches)
Bump PKGREVISION
diffstat:
mail/fetchmail/Makefile | 9 ++++-
mail/fetchmail/distinfo | 5 ++-
mail/fetchmail/patches/patch-ah | 67 +++++++++++++++++++++++++++++++++++++++++
mail/fetchmail/patches/patch-ai | 19 +++++++++++
mail/fetchmail/patches/patch-aj | 56 ++++++++++++++++++++++++++++++++++
5 files changed, 153 insertions(+), 3 deletions(-)
diffs (195 lines):
diff -r 54c6623338bd -r 3d1106b5bd1f mail/fetchmail/Makefile
--- a/mail/fetchmail/Makefile Fri Oct 21 18:41:14 2005 +0000
+++ b/mail/fetchmail/Makefile Fri Oct 21 20:56:50 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.153 2005/07/22 14:27:52 frueauf Exp $
+# $NetBSD: Makefile,v 1.154 2005/10/21 20:56:50 tonio Exp $
DISTNAME= fetchmail-6.2.5
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= mail
MASTER_SITES= http://www.catb.org/~esr/fetchmail/ \
http://sunsite.unc.edu/pub/Linux/system/mail/pop/
@@ -23,6 +23,11 @@
LDFLAGS+= ${CFLAGS}
USE_TOOLS+= tbl
+.if ${OPSYS} == "Darwin"
+LDFLAGS+= -lresolv
+CFLAGS.Darwin+= -DBIND_8_COMPAT -DHAVE_RESOLV_H
+.endif
+
.include "options.mk"
DOCDIR= ${PREFIX}/share/doc/fetchmail
diff -r 54c6623338bd -r 3d1106b5bd1f mail/fetchmail/distinfo
--- a/mail/fetchmail/distinfo Fri Oct 21 18:41:14 2005 +0000
+++ b/mail/fetchmail/distinfo Fri Oct 21 20:56:50 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2005/07/22 14:27:52 frueauf Exp $
+$NetBSD: distinfo,v 1.32 2005/10/21 20:56:50 tonio Exp $
SHA1 (fetchmail-6.2.5.tar.gz) = 4656ec4393ccd1c137fe7b331f77cb26b576ac0e
RMD160 (fetchmail-6.2.5.tar.gz) = e32b91a959d0e80c4bd45a8758811cbe95a98180
@@ -10,3 +10,6 @@
SHA1 (patch-ae) = 3acbacee78ab2084a615b0c02b7f83e563bfc7ac
SHA1 (patch-af) = 06e7b84566b0d3ed50b56f88baf23f15ae21eb21
SHA1 (patch-ag) = e27a4769dc804bec71b449bed7ff318d15ae8bdf
+SHA1 (patch-ah) = d6d08403b241a3e1a891faadbb36b0cd00df1398
+SHA1 (patch-ai) = 16449ab08c266936d80b8be11c93a3dd1ac5c2fe
+SHA1 (patch-aj) = 1051c1eb754b9c9cffad2eab4561791975aebbe1
diff -r 54c6623338bd -r 3d1106b5bd1f mail/fetchmail/patches/patch-ah
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/fetchmail/patches/patch-ah Fri Oct 21 20:56:50 2005 +0000
@@ -0,0 +1,67 @@
+$NetBSD: patch-ah,v 1.1 2005/10/21 20:56:50 tonio Exp $
+
+--- fetchmail.c.orig 2003-10-15 21:22:31.000000000 +0200
++++ fetchmail.c
+@@ -172,7 +172,7 @@ int main(int argc, char **argv)
+ * call near the beginning of the polling loop for details). We want
+ * to be sure the lock gets nuked on any error exit, basically.
+ */
+- lock_dispose();
++ fm_lock_dispose();
+
+ #ifdef HAVE_GETCWD
+ /* save the current directory */
+@@ -268,7 +268,7 @@ int main(int argc, char **argv)
+ report_init((run.poll_interval == 0 || nodetach) && !run.logfile);
+
+ /* construct the lockfile */
+- lock_setup();
++ fm_lock_setup();
+
+ #ifdef HAVE_SETRLIMIT
+ /*
+@@ -349,7 +349,7 @@ int main(int argc, char **argv)
+ }
+
+ /* check for another fetchmail running concurrently */
+- pid = lock_state();
++ pid = fm_lock_state();
+ bkgd = (pid < 0);
+ pid = bkgd ? -pid : pid;
+
+@@ -387,7 +387,7 @@ int main(int argc, char **argv)
+ {
+ fprintf(stderr,GT_("fetchmail: %s fetchmail at %d killed.\n"),
+ bkgd ? GT_("background") : GT_("foreground"), pid);
+- lock_release();
++ fm_lock_release();
+ if (argc == 2)
+ exit(0);
+ else
+@@ -420,7 +420,7 @@ int main(int argc, char **argv)
+ }
+ else if (getpid() == pid)
+ /* this test enables re-execing on a changed rcfile */
+- lock_assert();
++ fm_lock_assert();
+ else if (argc > 1)
+ {
+ fprintf(stderr,
+@@ -529,7 +529,7 @@ int main(int argc, char **argv)
+ set_signal_handler(SIGQUIT, terminate_run);
+
+ /* here's the exclusion lock */
+- lock_or_die();
++ fm_lock_or_die();
+
+ /*
+ * Query all hosts. If there's only one, the error return will
+@@ -1300,7 +1300,7 @@ static RETSIGTYPE terminate_run(int sig)
+ memset(ctl->password, '\0', strlen(ctl->password));
+
+ #if !defined(HAVE_ATEXIT) && !defined(HAVE_ON_EXIT)
+- lock_release();
++ fm_lock_release();
+ #endif
+
+ if (activecount == 0)
diff -r 54c6623338bd -r 3d1106b5bd1f mail/fetchmail/patches/patch-ai
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/fetchmail/patches/patch-ai Fri Oct 21 20:56:50 2005 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-ai,v 1.1 2005/10/21 20:56:50 tonio Exp $
+
+--- fetchmail.h.orig 2003-10-15 21:22:31.000000000 +0200
++++ fetchmail.h
+@@ -461,10 +461,10 @@ int gen_transact();
+ extern struct msgblk msgblk;
+
+ /* lock.c: concurrency locking */
+-void lock_setup(void), lock_assert(void);
+-void lock_or_die(void), lock_release(void);
+-int lock_state(void);
+-void lock_dispose(void);
++void fm_lock_setup(void), fm_lock_assert(void);
++void fm_lock_or_die(void), fm_lock_release(void);
++int fm_lock_state(void);
++void fm_lock_dispose(void);
+
+ /* use these to track what was happening when the nonresponse timer fired */
+ #define GENERAL_WAIT 0 /* unknown wait type */
diff -r 54c6623338bd -r 3d1106b5bd1f mail/fetchmail/patches/patch-aj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/fetchmail/patches/patch-aj Fri Oct 21 20:56:50 2005 +0000
@@ -0,0 +1,56 @@
+$NetBSD: patch-aj,v 1.1 2005/10/21 20:56:50 tonio Exp $
+
+--- lock.c.orig 2003-08-13 10:08:17.000000000 +0200
++++ lock.c
+@@ -24,7 +24,7 @@
+ static char *lockfile; /* name of lockfile */
+ static int lock_acquired; /* have we acquired a lock */
+
+-void lock_setup(void)
++void fm_lock_setup(void)
+ /* set up the global lockfile name */
+ {
+ /* set up to do lock protocol */
+@@ -55,7 +55,7 @@ static void unlockit(void)
+ unlink(lockfile);
+ }
+
+-void lock_dispose(void)
++void fm_lock_dispose(void)
+ /* arrange for a lock to be removed on process exit */
+ {
+ #ifdef HAVE_ATEXIT
+@@ -66,7 +66,7 @@ void lock_dispose(void)
+ #endif
+ }
+
+-int lock_state(void)
++int fm_lock_state(void)
+ {
+ int pid, st;
+ FILE *lockfp;
+@@ -88,13 +88,13 @@ int lock_state(void)
+ return(bkgd ? -pid : pid);
+ }
+
+-void lock_assert(void)
++void fm_lock_assert(void)
+ /* assert that we already posess a lock */
+ {
+ lock_acquired = TRUE;
+ }
+
+-void lock_or_die(void)
++void fm_lock_or_die(void)
+ /* get a lock on a given host or exit */
+ {
+ int fd;
+@@ -125,7 +125,7 @@ void lock_or_die(void)
+ }
+ }
+
+-void lock_release(void)
++void fm_lock_release(void)
+ /* release a lock on a given host */
+ {
+ unlink(lockfile);
Home |
Main Index |
Thread Index |
Old Index