From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- mail-filter/procmail/Manifest | 13 ++ mail-filter/procmail/files/gentoo-maildir3.diff | 12 ++ .../procmail/files/procmail-3.22-glibc-2.10.patch | 70 ++++++++++ .../procmail/files/procmail-comsat-segfault.diff | 20 +++ .../procmail/files/procmail-lazy-bindings.diff | 16 +++ .../procmail/files/procmail-maxprocs-fix.diff | 11 ++ mail-filter/procmail/files/procmail-pipealloc.diff | 21 +++ mail-filter/procmail/files/procmail-prefix.patch | 155 +++++++++++++++++++++ mail-filter/procmail/metadata.xml | 8 ++ mail-filter/procmail/procmail-3.22-r10.ebuild | 107 ++++++++++++++ mail-filter/procmail/procmail-3.22-r11.ebuild | 120 ++++++++++++++++ 11 files changed, 553 insertions(+) create mode 100644 mail-filter/procmail/Manifest create mode 100644 mail-filter/procmail/files/gentoo-maildir3.diff create mode 100644 mail-filter/procmail/files/procmail-3.22-glibc-2.10.patch create mode 100644 mail-filter/procmail/files/procmail-comsat-segfault.diff create mode 100644 mail-filter/procmail/files/procmail-lazy-bindings.diff create mode 100644 mail-filter/procmail/files/procmail-maxprocs-fix.diff create mode 100644 mail-filter/procmail/files/procmail-pipealloc.diff create mode 100644 mail-filter/procmail/files/procmail-prefix.patch create mode 100644 mail-filter/procmail/metadata.xml create mode 100644 mail-filter/procmail/procmail-3.22-r10.ebuild create mode 100644 mail-filter/procmail/procmail-3.22-r11.ebuild (limited to 'mail-filter/procmail') diff --git a/mail-filter/procmail/Manifest b/mail-filter/procmail/Manifest new file mode 100644 index 000000000000..2f68e0a25da4 --- /dev/null +++ b/mail-filter/procmail/Manifest @@ -0,0 +1,13 @@ +AUX gentoo-maildir3.diff 461 SHA256 b4cf36c3b5c9f73ca1877e1c424f5e7100908ba6997410c68a945d5d2fb65a3e SHA512 3736e55e95cab67be23281b343456aa9d9624d14e23b1f293014abc5e711c715f362e5a8464a8779dc01f1e6fb5560a346d265b334ee87f65bd0664f87bc09be WHIRLPOOL 6fcb41241ee429719156d13f153f83b998fb267108c0539c1d62706379f206250af2c4fceb95b3eb738a6ec6f63dca60d96a1b496fa588c1ba9852f222977a43 +AUX procmail-3.22-glibc-2.10.patch 2840 SHA256 14f11ba68b85f89e3b089b0f23e935f222d905808eb13da105624c64d91e5447 SHA512 44a5f7c3c6cf1b2f9241eb45e64322abd7b685ecd4909f0b126ababe9f14c9c0e7978daa9f5218d3255359d46760c628085a77ee7e3c61a272830477d21adeb9 WHIRLPOOL ec27d4ee6c2c8e7c1d1131cffe65fc6be14ca4177be612d7295944c734eacecbcfe8bf563a58b0143bdfbd04b1697aae18708282a11fc8244a9edb2fd1e25471 +AUX procmail-comsat-segfault.diff 822 SHA256 16a8c19b44b2f0eba0afd276d8b8af255efa31385c88942e4a1b251556afc23f SHA512 2a306dbce15cf7fe71e3f20a4707a9b326431da20638b29365090ae4a6c444483046d2f8940f5a8db7120708414c3386bea3254aea6b397633f04b6babc6d581 WHIRLPOOL fb535faa57ec1fe7f468be2f19041e36ce1a62dd86a45a940b0c0dfd6f48a4173d3674f14cc682baa74cb2e0512bdb65425d6dae32a08381c4c3a34caf8215be +AUX procmail-lazy-bindings.diff 622 SHA256 756beda1e188ca3e4eab2d6c57180226e4e6953f6a51b370b7e9652c8104e380 SHA512 aea07c42ec87b7b8d04a5f0f514d4d14aedf8e60f116c4106d29c36de7858cb345930778b38385cf03e5b5a4af230947798625ebec54759f506b4b7b9df826f4 WHIRLPOOL bffbb65e79879f171eab99a814534c4100c663245a8f2e0441486c2ee6ec8eaf6c2bdd5deb254db04e1446f0542a0e774afd03bcbbea562f64be6e57850bed37 +AUX procmail-maxprocs-fix.diff 465 SHA256 08c2a210d6936a63f29d93f2c57daa92740fb011d916ddcbba16475f03ed2d2b SHA512 f6dbcca6a42d2e9f82c167287e7220ab0a68bf34e890f48310331f650b30400b65643f4f5d13f8c8e3b95431c3c4d9292ac14607891f064e811a81fdba6fbf9e WHIRLPOOL 92d3d0ea78ae2681d97a9083e78551130ccc30fda8a0f92a015bc3568979bb18eda087d638e01f6f8cf3c824553ce10c56674e3c3a4d4b5f1dd54f632c053004 +AUX procmail-pipealloc.diff 825 SHA256 bc2c755c287252d252fb46a60a86850074ca1020d4f0d0d272615c89db11d4ba SHA512 e2a93060ff133f073c8a988db1bd92cfe3aac149ee04eda65862c468576fe194cd09379a545a94bbb1e20dbe1e142eae9f7949e930288178968fd95f5450fdbc WHIRLPOOL 019499e88d15605fe17a27efa7d517caa3ebab4132e8b6f912644806f5278fbc70c62948131a444d54f5b52f558cd531f20cf5945a1268d30eea5abc983a7d39 +AUX procmail-prefix.patch 5748 SHA256 b99b239b9b519f3186cc379004455f0e4b46e7400c7ea4c605531d4cdb48f8ab SHA512 be61e6e0c89145caea1351241196c3bc986382340ecba0360d10918691cf1e35c67028a33ffaf22c83a0c747d06e58f437bf84854fc819206fa6e7bf0bbeb0d5 WHIRLPOOL b5f826ef10f5c890028317c329f13299c37311ba97d9155cdbf35fdd9e359931a7246d2de8858643d07805b3d8b6ac67c2e18956126a3107b80c9ab529181d03 +DIST procmail-3.22.tar.gz 226817 SHA256 087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117 SHA512 3d0658329a55957a8d5741e03b0853b030c4524acef30641663213aa9eefc8264f8cc2b68a00a89e5f9f0f7c916c41a42e1b6c8df562c545ba97d8ab9049a936 WHIRLPOOL f2ad3fae5919caba6a14a004b8ec5f185265fdcc3491b1562804d8c5ce4d2f18dea37c777adefef752f9db7a2bb26aa24b5e2215a455a30138ffa39f09c538db +EBUILD procmail-3.22-r10.ebuild 2966 SHA256 e5b73887a9fdffd16858c36b317d88e01f2983baed8a875e7829e1a6288757b6 SHA512 3deccb93763d8f6ee663074a41d7b93cc5c093b74ae943ff2b2a9f2c7c68cb5f904d8533fbee12aa90aaac1980d85b6dffd72bed47316b8ca0ed713e1571d527 WHIRLPOOL 9f16e3ddcb896bc777e1f3e36f8324f3bd901a6cb4666e6d3fda2ca3da5a16c1140ac528129396875b6aefa9e0d4041105cbab6f730f24624fb012e652dc2164 +EBUILD procmail-3.22-r11.ebuild 3474 SHA256 3468996a782e9cff518058f456265a4e778a0d5b457c643adbbf9bfb344fdfaf SHA512 8b664a9979b4180c5b7814b84387f9fb8793ffc71b7b36ab662ec1eacb5d2774a49e80d60a78c782f74ad889736bbbd4fc215cad3aa6e7ab0f10572448873b97 WHIRLPOOL dcff7db253c768df3130c05c47d118986bc7ecf3e6ac45243ee23e1e7b514aac7ada9e8f040c07ec3b600e4da7e84b22ff0850bce5546c4e2f1bc083c0fb49c4 +MISC ChangeLog 2991 SHA256 81fb9017ea5e3f5539e7c8c1c2031d57bad4f7ed496a4ed123f6a2d3e42dbdf3 SHA512 962ba70f760432e21ed2aa9cb8b7d892299fef124be7e420b4c8b9a27f8d79448a877a283a7fb407de7fe5a9735c1a703ac3d3883e0b3f8d2372ed83657696f7 WHIRLPOOL d4ec747b45f48ed77471dd1100a98b805f3867b12fe5f60731d0de5ae0b86b7d0f9d18db0ff68bd080ae117019bc960eb8f936f41faa5df91b1e684f1e560742 +MISC ChangeLog-2015 10610 SHA256 facd76ba2ca2d31ae0e205b261f3363f8e9209da67edeb69f2d65168c13dc51b SHA512 a7a2a259a5c5103dd0525102f71fbe54f2426cd1fcaac99f6d10265e002846f27b4f94bf6323704b1703289178e765e048d7de2b06735b59fdd76826bc59cf71 WHIRLPOOL 5222c788edee7b7c3df06af6c393ae9058ae0f2e6d04a4507507120d53c8f6f1a2909c1afc875b9bf23ad9f3f1f2cb8ab2d988e232abb10804cad1327479fa94 +MISC metadata.xml 240 SHA256 f0e0bb7a24c4b1ff6b6a8a3e9315245c298499c03fbda429c0f775ec6a5396af SHA512 97824dbce22630efb21e647b55212b7a8a19d8e38b5bf05cb0b8078530bbbaaf4dc91284e2a11beab7dfcfb779df82b87b49d11a746c7a4f6dc71f2fda8942db WHIRLPOOL a7adfcb24489ae67a43a59d8350a70b20874fb03de95681c5b516a741d95422560a433f641de5a7222cf5d3500333e215055ec0cb3844e7abc6d6a836de97357 diff --git a/mail-filter/procmail/files/gentoo-maildir3.diff b/mail-filter/procmail/files/gentoo-maildir3.diff new file mode 100644 index 000000000000..51dfef64ae8b --- /dev/null +++ b/mail-filter/procmail/files/gentoo-maildir3.diff @@ -0,0 +1,12 @@ +--- procmail-3.22/src/authenticate.c.orig 2002-07-26 20:38:52.000000000 -0400 ++++ procmail-3.22/src/authenticate.c 2002-07-26 20:57:56.000000000 -0400 +@@ -39,7 +39,7 @@ + #include "authenticate.h" + + #ifndef MAILSPOOLDIR +-#define MAILSPOOLDIR "/var/spool/mail/" /* watch the trailing / */ ++#define MAILSPOOLDIR "" /* watch the trailing / */ + #endif + #ifndef MAILSPOOLSUFFIX + #define MAILSPOOLSUFFIX "" /* suffix to force maildir or MH style */ + diff --git a/mail-filter/procmail/files/procmail-3.22-glibc-2.10.patch b/mail-filter/procmail/files/procmail-3.22-glibc-2.10.patch new file mode 100644 index 000000000000..2663bf501188 --- /dev/null +++ b/mail-filter/procmail/files/procmail-3.22-glibc-2.10.patch @@ -0,0 +1,70 @@ +diff -NrU5 procmail-3.22.orig/src/fields.c procmail-3.22/src/fields.c +--- procmail-3.22.orig/src/fields.c 2009-05-21 18:21:25.000000000 +0200 ++++ procmail-3.22/src/fields.c 2009-05-21 18:22:14.000000000 +0200 +@@ -108,20 +108,20 @@ + extractfield(p); + } + /* try and append one valid field to rdheader from stdin */ + int readhead P((void)) + { int idlen; +- getline(); ++ procmail_getline(); + if((idlen=breakfield(buf,buffilled))<=0) /* not the start of a valid field */ + return 0; + if(idlen==STRLEN(FROM)&&eqFrom_(buf)) /* it's a From_ line */ + { if(rdheader) + return 0; /* the From_ line was a fake! */ +- for(;buflast=='>';getline()); /* gather continued >From_ lines */ ++ for(;buflast=='>';procmail_getline()); /* gather continued >From_ lines */ + } + else +- for(;;getline()) /* get the rest of the continued field */ ++ for(;;procmail_getline()) /* get the rest of the continued field */ + { switch(buflast) /* will this line be continued? */ + { case ' ':case '\t': /* yep, it sure is */ + continue; + } + break; +diff -NrU5 procmail-3.22.orig/src/formail.c procmail-3.22/src/formail.c +--- procmail-3.22.orig/src/formail.c 2009-05-21 18:21:25.000000000 +0200 ++++ procmail-3.22/src/formail.c 2009-05-21 18:22:14.000000000 +0200 +@@ -817,11 +817,11 @@ + #ifdef MAILBOX_SEPARATOR + if(!strncmp(emboxsep,buf,STRLEN(emboxsep))) /* end of mail? */ + { if(split) /* gobble up the next start separator */ + { buffilled=0; + #ifdef sMAILBOX_SEPARATOR +- getline();buffilled=0; /* but only if it's defined */ ++ procmail_getline();buffilled=0; /* but only if it's defined */ + #endif + if(buflast!=EOF) /* if any */ + goto splitit; + break; + } +diff -NrU5 procmail-3.22.orig/src/formisc.c procmail-3.22/src/formisc.c +--- procmail-3.22.orig/src/formisc.c 2009-05-21 18:21:25.000000000 +0200 ++++ procmail-3.22/src/formisc.c 2009-05-21 18:22:14.000000000 +0200 +@@ -113,11 +113,11 @@ + { if(buffilled==buflen) + buf=realloc(buf,buflen+=Bsize); + buf[buffilled++]=c; + } + +-int getline P((void)) /* read a newline-terminated line */ ++int procmail_getline P((void)) /* read a newline-terminated line */ + { if(buflast==EOF) /* at the end of our Latin already? */ + { loadchar('\n'); /* fake empty line */ + return EOF; /* spread the word */ + } + loadchar(buflast); /* load leftover into the buffer */ +diff -NrU5 procmail-3.22.orig/src/formisc.h procmail-3.22/src/formisc.h +--- procmail-3.22.orig/src/formisc.h 2009-05-21 18:21:25.000000000 +0200 ++++ procmail-3.22/src/formisc.h 2009-05-21 18:22:14.000000000 +0200 +@@ -15,6 +15,6 @@ + closemine P((void)), + opensink P((void)); + char* + skipwords P((char*start)); + int +- getline P((void)); ++ procmail_getline P((void)); diff --git a/mail-filter/procmail/files/procmail-comsat-segfault.diff b/mail-filter/procmail/files/procmail-comsat-segfault.diff new file mode 100644 index 000000000000..e96bb5d94a38 --- /dev/null +++ b/mail-filter/procmail/files/procmail-comsat-segfault.diff @@ -0,0 +1,20 @@ +--- src/comsat.c.old 2005-08-17 19:17:20.000000000 +0200 ++++ src/comsat.c 2005-08-17 19:18:19.000000000 +0200 +@@ -92,7 +92,7 @@ + } + if(newvalid) /* so far, so good */ + { int s; +- if(!*chp) /* no service */ ++ if(!chad||!*chp) /* no service */ + chp=BIFF_serviceport; /* new balls please! */ + s=strtol(chp,&chad,10); + if(chp!=chad) /* the service is not numeric */ +@@ -120,7 +120,7 @@ + { int s;const char*p; + if(!csvalid||!buf) /* is comat on and set to a valid address? */ + return; +- if(!*cslgname||strlen(cslgname)+2>linebuf) /* is $LOGNAME bogus? */ ++ if(!cslgname||!*cslgname||strlen(cslgname)+2>linebuf) /* is $LOGNAME bogus? */ + return; + if(!(p=folder?folder:cslastf)) /* do we have a folder? */ + return; diff --git a/mail-filter/procmail/files/procmail-lazy-bindings.diff b/mail-filter/procmail/files/procmail-lazy-bindings.diff new file mode 100644 index 000000000000..f1c4221650e6 --- /dev/null +++ b/mail-filter/procmail/files/procmail-lazy-bindings.diff @@ -0,0 +1,16 @@ +--- src/Makefile.0.old 2005-05-23 10:34:25.000000000 +0200 ++++ src/Makefile.0 2005-05-23 10:34:52.000000000 +0200 +@@ -18,11 +18,11 @@ + .PRECIOUS: Makefile + + procmail: procmail.$(O) $(PM_OBJ) setid +- $(CC) $(CFLAGS) $@.$(O) $(PM_OBJ) -o $@ $(LDFLAGS) ++ $(CC) $(CFLAGS) $@.$(O) $(PM_OBJ) -o $@ -Wl,-z,now $(LDFLAGS) + @test -z "$(STRIP)" || ( echo $(STRIP) $@; $(STRIP) $@ ) + + lockfile: lockfile.$(O) $(LF_OBJ) +- $(CC) $(CFLAGS) $@.$(O) $(LF_OBJ) -o $@ $(LDFLAGS) ++ $(CC) $(CFLAGS) $@.$(O) $(LF_OBJ) -o $@ -Wl,-z,now $(LDFLAGS) + @test -z "$(STRIP)" || ( echo $(STRIP) $@; $(STRIP) $@ ) + + formail: formail.$(O) $(FM_OBJ) diff --git a/mail-filter/procmail/files/procmail-maxprocs-fix.diff b/mail-filter/procmail/files/procmail-maxprocs-fix.diff new file mode 100644 index 000000000000..c78b000a8b92 --- /dev/null +++ b/mail-filter/procmail/files/procmail-maxprocs-fix.diff @@ -0,0 +1,11 @@ +--- src/formisc.c.orig 2006-01-22 00:35:30.000000000 -0800 ++++ src/formisc.c 2006-01-22 00:35:55.000000000 -0800 +@@ -183,7 +183,7 @@ + retval=excode; + } /* reap some children */ + while(childlimit&&children>=childlimit||(child=fork())==-1&&children) +- for(--children;(excode=waitfor((pid_t)0))!=NO_PROCESS;) ++ for(;(excode=waitfor((pid_t)0))!=NO_PROCESS;) + { if(excode!=EXIT_SUCCESS) + retval=excode; + if(--children<=maxchild) diff --git a/mail-filter/procmail/files/procmail-pipealloc.diff b/mail-filter/procmail/files/procmail-pipealloc.diff new file mode 100644 index 000000000000..fdd5cc97328a --- /dev/null +++ b/mail-filter/procmail/files/procmail-pipealloc.diff @@ -0,0 +1,21 @@ +diff -rc procmail-3.22/src/pipes.c procmail-3.22-fixed/src/pipes.c +*** procmail-3.22/src/pipes.c Tue Sep 11 00:58:44 2001 +--- procmail-3.22-fixed/src/pipes.c Wed Nov 21 23:53:39 2007 +*************** +*** 194,200 **** + makeblock(&temp,Stdfilled); + tmemmove(temp.p,Stdout,Stdfilled); + readdyn(&temp,&Stdfilled,Stdfilled+backlen+1); +! Stdout=realloc(Stdout,&Stdfilled+1); + tmemmove(Stdout,temp.p,Stdfilled+1); + freeblock(&temp); + retStdout(Stdout,pwait&&pipw,!backblock); +--- 194,200 ---- + makeblock(&temp,Stdfilled); + tmemmove(temp.p,Stdout,Stdfilled); + readdyn(&temp,&Stdfilled,Stdfilled+backlen+1); +! Stdout=realloc(Stdout,Stdfilled+1); + tmemmove(Stdout,temp.p,Stdfilled+1); + freeblock(&temp); + retStdout(Stdout,pwait&&pipw,!backblock); + diff --git a/mail-filter/procmail/files/procmail-prefix.patch b/mail-filter/procmail/files/procmail-prefix.patch new file mode 100644 index 000000000000..6063b92db2b8 --- /dev/null +++ b/mail-filter/procmail/files/procmail-prefix.patch @@ -0,0 +1,155 @@ +--- config.h~ 2007-10-03 17:55:24 +0200 ++++ config.h 2007-10-03 18:01:38 +0200 +@@ -116,11 +116,11 @@ + is not found, maildelivery will proceed as normal to the default + system mailbox. This also must be an absolute path */ + +-#define ETCRC "/etc/procmailrc" /* optional global procmailrc startup ++#define ETCRC "@GENTOO_PORTAGE_EPREFIX@/etc/procmailrc" /* optional global procmailrc startup + file (will only be read if procmail + is started with no rcfile on the command line). */ + +-#define ETCRCS "/etc/procmailrcs/" /* optional trusted path prefix for ++#define ETCRCS "@GENTOO_PORTAGE_EPREFIX@/etc/procmailrcs/" /* optional trusted path prefix for + rcfiles which will be executed with + the uid of the owner of the rcfile (this only happens if procmail is + called with the -m option, without variable assignments on the command +@@ -168,7 +168,7 @@ + #define INEFFICIENTrealloc /* don't pussy-foot around */ + #endif + #define MAXinMEM (1024*1024) /* when to switch to mmap() */ +-#define MMAP_DIR "/var/spool/procmail/" /* where to put */ ++#define MMAP_DIR "@GENTOO_PORTAGE_EPREFIX@/var/spool/procmail/" /* where to put */ + #endif /* the files */ + #define MINlogbuf 81 /* fit an entire line */ + #define MAXlogbuf 1000 /* in case someone abuses LOG */ +@@ -220,8 +220,8 @@ + #define DEFcomsat offvalue /* when an rcfile has been specified */ + /* set to either "offvalue" or "empty" */ + +-#define BinSh "/bin/sh" +-#define ROOT_DIR "/" ++#define BinSh "@GENTOO_PORTAGE_EPREFIX@/bin/sh" ++#define ROOT_DIR "@GENTOO_PORTAGE_EPREFIX@" + #define DEAD_LETTER "/tmp/dead.letter" /* $ORGMAIL if no passwd entry */ + #define DevNull "/dev/null" + #define NICE_RANGE 39 /* maximal nice difference */ +--- Makefile~ 2007-10-03 18:07:51 +0200 ++++ Makefile 2007-10-03 18:10:07 +0200 +@@ -2,7 +2,7 @@ + + # BASENAME should point to where the whole lot will be installed + # change BASENAME to your home directory if need be +-BASENAME = /usr ++BASENAME = @GENTOO_PORTAGE_EPREFIX@/usr + # For display in the man pages + VISIBLE_BASENAME= $(BASENAME) + +@@ -79,7 +79,7 @@ + # -lresolv # not really needed, is it? + + # Informal list of directories where we look for the libraries in SEARCHLIBS +-LIBPATHS=/lib /usr/lib /usr/local/lib ++LIBPATHS=@GENTOO_PORTAGE_EPREFIX@/lib @GENTOO_PORTAGE_EPREFIX@/usr/lib + + GCC_WARNINGS = -O2 -pedantic -Wreturn-type -Wunused -Wformat -Wtraditional \ + -Wpointer-arith -Wconversion -Waggregate-return \ +@@ -97,10 +97,10 @@ + ####CC = cc # gcc + # object file extension + O = o +-RM = /bin/rm -f ++RM = @GENTOO_PORTAGE_EPREFIX@/bin/rm -f + MV = mv -f + LN = ln +-BSHELL = /bin/sh ++BSHELL = @GENTOO_PORTAGE_EPREFIX@/bin/sh + INSTALL = cp + DEVNULL = /dev/null + STRIP = strip +@@ -112,7 +112,7 @@ + MANS5S = procmailrc procmailsc procmailex + + # Possible locations for the sendmail.cf file +-SENDMAILCFS = /etc/mail/sendmail.cf /etc/sendmail.cf /usr/lib/sendmail.cf ++SENDMAILCFS = @GENTOO_PORTAGE_EPREFIX@/etc/mail/sendmail.cf @GENTOO_PORTAGE_EPREFIX@/etc/sendmail.cf @GENTOO_PORTAGE_EPREFIX@/usr/lib/sendmail.cf + + # Makefile.1 - mark, don't (re)move this, a sed script needs it + +--- src/autoconf~ 2001-09-11 06:55:46 +0200 ++++ src/autoconf 2007-10-03 19:17:51 +0200 +@@ -1,4 +1,4 @@ +-#! /bin/sh ++#! @GENTOO_PORTAGE_EPREFIX@/bin/sh + : + # Copyright (c) 1990-1997, S.R. van den Berg, The Netherlands + # $Id$ +@@ -1416,20 +1416,10 @@ + + found=no + +-for a in /var/spool/mail /usr/spool/mail /var/mail /usr/mail /spool/mail +-do +- test -d $a -a $found != yes && +- echo '#define MAILSPOOLDIR "'$a'/"' >>$ACONF && found=yes +-done +-if test $found != yes +-then +- echo '#define MAILSPOOLDIR "/var/spool/mail/"' >>$ACONF +- echo Could not find the system-mailbox directory, supplied default. +-fi ++echo '#define MAILSPOOLDIR "@GENTOO_PORTAGE_EPREFIX@/var/spool/mail/"' >>$ACONF + + cat >lookfor <$DEVNULL || + echo "#define DEFflagsendmail \"\"" >>$ACONF + +-a=/tmp/_chowntst.$$ ++a=@GENTOO_PORTAGE_EPREFIX@/tmp/_chowntst.$$ + $RM -r $a + OLDTESTDIRS="$a $OLDTESTDIRS" + mkdir $a +@@ -1466,19 +1456,18 @@ + + _autotst $a/__ $a/__/__ 4 >>$ACONF + +-cat /usr/lib/sendmail.cf /etc/sendmail.cf /etc/mail/sendmail.cf 2>$DEVNULL | ++cat @GENTOO_PORTAGE_EPREFIX@/usr/lib/sendmail.cf @GENTOO_PORTAGE_EPREFIX@/etc/sendmail.cf @GENTOO_PORTAGE_EPREFIX@/etc/mail/sendmail.cf 2>$DEVNULL | + grep 'Mlocal.*procmail' >$DEVNULL || + echo '#define CF_no_procmail_yet' >>$ACONF + +-cat /usr/lib/sendmail.cf /etc/sendmail.cf /etc/mail/sendmail.cf 2>$DEVNULL | ++cat @GENTOO_PORTAGE_EPREFIX@/usr/lib/sendmail.cf @GENTOO_PORTAGE_EPREFIX@/etc/sendmail.cf @GENTOO_PORTAGE_EPREFIX@/etc/mail/sendmail.cf 2>$DEVNULL | + grep '^V' >$DEVNULL || + echo '#define buggy_SENDMAIL' >>$ACONF + +-lpath='/bin' +-bins="/bin" ++lpath='@GENTOO_PORTAGE_EPREFIX@/bin' ++bins='@GENTOO_PORTAGE_EPREFIX@/bin' + +-for newd in /usr/bin /usr/ucb /usr/5bin $BINDIR /local/bin /usr/local/bin \ +- /global/bin /usr/bin/X11 /usr/X*/bin ++for newd in @GENTOO_PORTAGE_EPREFIX@/usr/bin + do + if test -d $newd + then +--- src/recommend.c~ 2007-10-03 19:10:01 +0200 ++++ src/recommend.c 2007-10-03 19:11:04 +0200 +@@ -9,8 +9,7 @@ + + char mailspooldir[]=MAILSPOOLDIR; + const char dirsep[]=DIRSEP, +- *const checkf[]={"/bin/mail","/bin/lmail","/usr/lib/sendmail", +- "/usr/lib/smail",0}; ++ *const checkf[]={"@GENTOO_PORTAGE_EPREFIX@/usr/bin/sendmail",0}; + + int main(argc,argv)const int argc;const char*const argv[]; + { struct group*grp;struct stat stbuf;gid_t gid=(gid_t)-1; diff --git a/mail-filter/procmail/metadata.xml b/mail-filter/procmail/metadata.xml new file mode 100644 index 000000000000..9a6d80e5da48 --- /dev/null +++ b/mail-filter/procmail/metadata.xml @@ -0,0 +1,8 @@ + + + + + net-mail@gentoo.org + Net-Mail + + diff --git a/mail-filter/procmail/procmail-3.22-r10.ebuild b/mail-filter/procmail/procmail-3.22-r10.ebuild new file mode 100644 index 000000000000..bc1f9f05821b --- /dev/null +++ b/mail-filter/procmail/procmail-3.22-r10.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit eutils flag-o-matic toolchain-funcs prefix + +DESCRIPTION="Mail delivery agent/filter" +HOMEPAGE="http://www.procmail.org/" +SRC_URI="http://www.procmail.org/${P}.tar.gz" + +LICENSE="|| ( Artistic GPL-2 )" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris" +IUSE="mbox selinux" + +DEPEND="virtual/mta" +RDEPEND="selinux? ( sec-policy/selinux-procmail )" + +src_unpack() { + unpack ${A} + cd "${S}" + + # disable flock, using both fcntl and flock style locking + # doesn't work with NFS with 2.6.17+ kernels, bug #156493 + + sed -e "s:/\*#define NO_flock_LOCK:#define NO_flock_LOCK:" \ + -i config.h || die "sed failed" + + if ! use mbox ; then + echo "# Use maildir-style mailbox in user's home directory" > "${S}"/procmailrc + echo 'DEFAULT=$HOME/.maildir/' >> "${S}"/procmailrc + cd "${S}" + epatch "${FILESDIR}/gentoo-maildir3.diff" + else + echo '# Use mbox-style mailbox in /var/spool/mail' > "${S}"/procmailrc + echo 'DEFAULT=${EPREFIX}/var/spool/mail/$LOGNAME' >> "${S}"/procmailrc + fi + + # Do not use lazy bindings on lockfile and procmail + if [[ ${CHOST} != *-darwin* ]]; then + epatch "${FILESDIR}/${PN}-lazy-bindings.diff" + fi + + # Fix for bug #102340 + epatch "${FILESDIR}/${PN}-comsat-segfault.diff" + + # Fix for bug #119890 + epatch "${FILESDIR}/${PN}-maxprocs-fix.diff" + + # Prefixify config.h + epatch "${FILESDIR}"/${PN}-prefix.patch + eprefixify config.h Makefile src/autoconf src/recommend.c + + # Fix for bug #200006 + epatch "${FILESDIR}/${PN}-pipealloc.diff" + + # Fix for bug #270551 + epatch "${FILESDIR}/${PN}-3.22-glibc-2.10.patch" +} + +src_compile() { + # -finline-functions (implied by -O3) leaves strstr() in an infinite loop. + # To work around this, we append -fno-inline-functions to CFLAGS + # Since GCC 4.7 we also need -fno-ipa-cp-clone (bug #466552) + append-flags -fno-inline-functions -fno-ipa-cp-clone + + sed -e "s:CFLAGS0 = -O:CFLAGS0 = ${CFLAGS}:" \ + -e "s:LDFLAGS0= -s:LDFLAGS0 = ${LDFLAGS}:" \ + -e "s:LOCKINGTEST=__defaults__:#LOCKINGTEST=__defaults__:" \ + -e "s:#LOCKINGTEST=/tmp:LOCKINGTEST=/tmp:" \ + -i Makefile || die "sed failed" + + emake CC="$(tc-getCC)" || die +} + +src_install() { + cd "${S}"/new + insinto /usr/bin + insopts -m 6755 + doins procmail || die + + doins lockfile || die + fowners root:mail /usr/bin/lockfile + fperms 2755 /usr/bin/lockfile + + dobin formail mailstat || die + insopts -m 0644 + + doman *.1 *.5 + + cd "${S}" + dodoc FAQ FEATURES HISTORY INSTALL KNOWN_BUGS README + + insinto /etc + doins procmailrc || die + + docinto examples + dodoc examples/* +} + +pkg_postinst() { + if ! use mbox ; then + elog "Starting with mail-filter/procmail-3.22-r9 you'll need to ensure" + elog "that you configure a mail storage location using DEFAULT in" + elog "/etc/procmailrc, for example:" + elog "\tDEFAULT=\$HOME/.maildir/" + fi +} diff --git a/mail-filter/procmail/procmail-3.22-r11.ebuild b/mail-filter/procmail/procmail-3.22-r11.ebuild new file mode 100644 index 000000000000..c717564afa4f --- /dev/null +++ b/mail-filter/procmail/procmail-3.22-r11.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs prefix + +DESCRIPTION="Mail delivery agent/filter" +HOMEPAGE="http://www.procmail.org/" +SRC_URI="http://www.procmail.org/${P}.tar.gz" + +LICENSE="|| ( Artistic GPL-2 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris" +IUSE="mbox selinux" + +DEPEND="virtual/mta" +RDEPEND="selinux? ( sec-policy/selinux-procmail )" + +src_prepare() { + # disable flock, using both fcntl and flock style locking + # doesn't work with NFS with 2.6.17+ kernels, bug #156493 + + sed -e "s:/\*#define NO_flock_LOCK:#define NO_flock_LOCK:" \ + -i config.h || die "sed failed" + + if ! use mbox ; then + echo "# Use maildir-style mailbox in user's home directory" > "${S}"/procmailrc || die + echo 'DEFAULT=$HOME/.maildir/' >> "${S}"/procmailrc || die + cd "${S}" || die + eapply "${FILESDIR}/gentoo-maildir3.diff" + else + echo '# Use mbox-style mailbox in /var/spool/mail' > "${S}"/procmailrc || die + echo 'DEFAULT=${EPREFIX}/var/spool/mail/$LOGNAME' >> "${S}"/procmailrc || die + fi + + # Do not use lazy bindings on lockfile and procmail + if [[ ${CHOST} != *-darwin* ]]; then + eapply -p0 "${FILESDIR}/${PN}-lazy-bindings.diff" + fi + + # Fix for bug #102340 + eapply -p0 "${FILESDIR}/${PN}-comsat-segfault.diff" + + # Fix for bug #119890 + eapply -p0 "${FILESDIR}/${PN}-maxprocs-fix.diff" + + # Prefixify config.h + eapply -p0 "${FILESDIR}"/${PN}-prefix.patch + eprefixify config.h Makefile src/autoconf src/recommend.c + + # Fix for bug #200006 + eapply "${FILESDIR}/${PN}-pipealloc.diff" + + # Fix for bug #270551 + eapply "${FILESDIR}/${PN}-3.22-glibc-2.10.patch" + + eapply_user +} + +src_compile() { + # -finline-functions (implied by -O3) leaves strstr() in an infinite loop. + # To work around this, we append -fno-inline-functions to CFLAGS + # Since GCC 4.7 we also need -fno-ipa-cp-clone (bug #466552) + # If it's clang, ignore -fno-ipa-cp-clone, as clang doesn't support this + case "$(tc-getCC)" in + "clang") append-flags -fno-inline-functions ;; + "gcc"|*) append-flags -fno-inline-functions -fno-ipa-cp-clone ;; + esac + + sed -e "s:CFLAGS0 = -O:CFLAGS0 = ${CFLAGS}:" \ + -e "s:LDFLAGS0= -s:LDFLAGS0 = ${LDFLAGS}:" \ + -e "s:LOCKINGTEST=__defaults__:#LOCKINGTEST=__defaults__:" \ + -e "s:#LOCKINGTEST=/tmp:LOCKINGTEST=/tmp:" \ + -i Makefile || die "sed failed" + + emake CC="$(tc-getCC)" +} + +src_install() { + cd "${S}"/new || die + insinto /usr/bin + insopts -m 6755 + doins procmail + + doins lockfile + fowners root:mail /usr/bin/lockfile + fperms 2755 /usr/bin/lockfile + + dobin formail mailstat + insopts -m 0644 + + doman *.1 *.5 + + cd "${S}" || die + dodoc FAQ FEATURES HISTORY INSTALL KNOWN_BUGS README + + insinto /etc + doins procmailrc + + docinto examples + dodoc examples/* +} + +pkg_postinst() { + if ! use mbox ; then + elog "Starting with mail-filter/procmail-3.22-r9 you'll need to ensure" + elog "that you configure a mail storage location using DEFAULT in" + elog "/etc/procmailrc, for example:" + elog "\tDEFAULT=\$HOME/.maildir/" + fi + if has sfperms ${FEATURES}; then + ewarn "FEATURES=sfperms removes the read-bit for others from" + ewarn " /usr/bin/procmail" + ewarn " /usr/bin/lockfile" + ewarn "If you use procmail from an MTA like Exim, you need to" + ewarn "re-add the read-bit or avoid the MTA checking the binary" + ewarn "exists." + fi +} -- cgit v1.2.3