summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authortonio <tonio@pkgsrc.org>2005-10-21 20:56:50 +0000
committertonio <tonio@pkgsrc.org>2005-10-21 20:56:50 +0000
commit245c8d0a2560d3375a5b03fab9a67b8609d432ce (patch)
treec87484d914d4d229efb41644c8306e1f19cac023 /mail
parentcffc26e3158ccb08bae15b99eea28edd2046242d (diff)
downloadpkgsrc-245c8d0a2560d3375a5b03fab9a67b8609d432ce.tar.gz
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 (limited to 'mail')
-rw-r--r--mail/fetchmail/Makefile9
-rw-r--r--mail/fetchmail/distinfo5
-rw-r--r--mail/fetchmail/patches/patch-ah67
-rw-r--r--mail/fetchmail/patches/patch-ai19
-rw-r--r--mail/fetchmail/patches/patch-aj56
5 files changed, 153 insertions, 3 deletions
diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile
index bce0b6e8878..936dc5d9412 100644
--- a/mail/fetchmail/Makefile
+++ b/mail/fetchmail/Makefile
@@ -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 @@ CONFIGURE_ARGS+= --without-hesiod
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 --git a/mail/fetchmail/distinfo b/mail/fetchmail/distinfo
index c17caaeff7c..729f2e1dc91 100644
--- a/mail/fetchmail/distinfo
+++ b/mail/fetchmail/distinfo
@@ -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-ad) = b6bffc59f28992fa0d3de0f9dad250c73bbeffc6
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 --git a/mail/fetchmail/patches/patch-ah b/mail/fetchmail/patches/patch-ah
new file mode 100644
index 00000000000..285f0553f25
--- /dev/null
+++ b/mail/fetchmail/patches/patch-ah
@@ -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 --git a/mail/fetchmail/patches/patch-ai b/mail/fetchmail/patches/patch-ai
new file mode 100644
index 00000000000..8e33f63bbfb
--- /dev/null
+++ b/mail/fetchmail/patches/patch-ai
@@ -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 --git a/mail/fetchmail/patches/patch-aj b/mail/fetchmail/patches/patch-aj
new file mode 100644
index 00000000000..75313575a38
--- /dev/null
+++ b/mail/fetchmail/patches/patch-aj
@@ -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);