From 8e7fd48a294d7d6e54c6d07989807cff33ab19bd Mon Sep 17 00:00:00 2001 From: Adam Weinberger Date: Mon, 28 Jul 2014 23:20:38 +0000 Subject: Rename mail/ patch-xy patches to reflect the files they modify. --- mail/adcomplain/files/patch-aa | 326 ------- mail/adcomplain/files/patch-adcomplain.pl | 326 +++++++ mail/cclient/files/patch-Makefile | 78 ++ mail/cclient/files/patch-aa | 21 - mail/cclient/files/patch-ab | 254 ------ mail/cclient/files/patch-ac | 78 -- mail/cclient/files/patch-src_osdep_unix_Makefile | 254 ++++++ mail/cclient/files/patch-src_osdep_unix_os_bsi.h | 21 + mail/drac/files/patch-Makefile | 45 + mail/drac/files/patch-aa | 45 - mail/drac/files/patch-ab | 31 - mail/drac/files/patch-ac | 20 - mail/drac/files/patch-ad | 10 - mail/drac/files/patch-rpc.dracd.1m | 31 + mail/drac/files/patch-rpc.dracd.c | 20 + mail/drac/files/patch-testing.c | 10 + mail/evolution/files/patch-aa | 36 - mail/evolution/files/patch-configure | 36 + mail/ezmlm/files/patch-Makefile | 11 + mail/ezmlm/files/patch-aa | 11 - mail/faces/files/patch-ba | 17 - mail/faces/files/patch-ca | 447 ---------- mail/faces/files/patch-cb | 292 ------- mail/faces/files/patch-cc | 17 - mail/faces/files/patch-cd | 40 - mail/faces/files/patch-ce | 306 ------- mail/faces/files/patch-cf | 314 ------- mail/faces/files/patch-ch | 314 ------- mail/faces/files/patch-ci | 186 ---- mail/faces/files/patch-cj | 296 ------- mail/faces/files/patch-ck | 40 - mail/faces/files/patch-compface_arith.c | 447 ++++++++++ mail/faces/files/patch-compface_cmain.c | 292 +++++++ mail/faces/files/patch-compface_compface.1 | 17 + mail/faces/files/patch-compface_compface.c | 40 + mail/faces/files/patch-compface_compface.h | 306 +++++++ mail/faces/files/patch-compface_compress.c | 314 +++++++ mail/faces/files/patch-compface_file.c | 314 +++++++ mail/faces/files/patch-compface_gen.c | 186 ++++ mail/faces/files/patch-compface_uncmain.c | 296 +++++++ mail/faces/files/patch-compface_uncompface.c | 40 + mail/faces/files/patch-faces_Faces.ad | 17 + mail/hbiff/files/patch-01 | 55 -- mail/hbiff/files/patch-hbiff.c | 55 ++ mail/imap-uw/files/patch-Makefile | 110 +++ mail/imap-uw/files/patch-aa | 21 - mail/imap-uw/files/patch-ab | 154 ---- mail/imap-uw/files/patch-ac | 85 -- mail/imap-uw/files/patch-ad | 110 --- mail/imap-uw/files/patch-ae | 47 - mail/imap-uw/files/patch-af | 41 - mail/imap-uw/files/patch-ag | 30 - mail/imap-uw/files/patch-ah | 131 --- mail/imap-uw/files/patch-ai | 89 -- mail/imap-uw/files/patch-src_imapd_Makefile | 85 ++ mail/imap-uw/files/patch-src_imapd_imapd.c | 89 ++ mail/imap-uw/files/patch-src_ipopd_Makefile | 41 + mail/imap-uw/files/patch-src_ipopd_ipop3d.c | 131 +++ mail/imap-uw/files/patch-src_mtest_Makefile | 30 + mail/imap-uw/files/patch-src_mtest_mtest.c | 47 + mail/imap-uw/files/patch-src_osdep_unix_Makefile | 154 ++++ mail/imap-uw/files/patch-src_osdep_unix_os_bsi.h | 21 + mail/mail2sms/files/patch-aa | 79 -- mail/mail2sms/files/patch-mail2sms.1 | 17 + mail/mail2sms/files/patch-mail2sms.4 | 28 + mail/mail2sms/files/patch-main.c | 11 + mail/mail2sms/files/patch-parse.c | 23 + mail/mailagent/files/patch-ac | 21 - mail/mailagent/files/patch-agent-filter-io.c | 21 + mail/mailagent/files/patch-agent-filter-logfile.c | 15 + mail/mailagent/files/patch-agent-man-Makefile.SH | 12 + .../mailagent/files/patch-agent::filter::logfile.c | 15 - mail/mailagent/files/patch-agent::man::Makefile.SH | 12 - mail/mess822/files/patch-aa | 73 -- mail/mess822/files/patch-hier.c | 73 ++ mail/ml/files/patch-Imakefile_1 | 35 + mail/ml/files/patch-Imakefile_2 | 11 + mail/ml/files/patch-aa | 21 - mail/ml/files/patch-ab | 35 - mail/ml/files/patch-ac | 13 - mail/ml/files/patch-ad | 43 - mail/ml/files/patch-ae | 30 - mail/ml/files/patch-af | 20 - mail/ml/files/patch-ag | 11 - mail/ml/files/patch-imap-4-src-c-client-mtest.c | 20 + mail/ml/files/patch-imap-4-src-osdep-unix-Makefile | 21 + mail/ml/files/patch-imap-4-src-osdep-unix-mmdf.c | 20 + mail/ml/files/patch-imap-4-src-osdep-unix-os_bsi.h | 30 + mail/ml/files/patch-impa-4-src-osdep-unix-mmdf.c | 20 - mail/ml/files/patch-lib-CheckConnection.ppp | 13 + mail/ml/files/patch-lib-ML.ad | 43 + mail/mutt/files/patch-02 | 29 - mail/mutt/files/patch-05 | 43 - mail/mutt/files/patch-08 | 10 - mail/mutt/files/patch-curs_lib.c | 43 + mail/mutt/files/patch-doc-Makefile.am | 29 + mail/mutt/files/patch-doc-Muttrc | 10 + mail/mutt14/files/patch-02 | 21 - mail/mutt14/files/patch-03 | 13 - mail/mutt14/files/patch-05 | 87 -- mail/mutt14/files/patch-08 | 10 - mail/mutt14/files/patch-Muttrc | 10 + mail/mutt14/files/patch-doc-Makefile.in | 21 + mail/mutt14/files/patch-doc_manual.sgml | 13 + mail/mutt14/files/patch-string-handling | 87 ++ mail/popa3d/files/patch-Makefile | 22 + mail/popa3d/files/patch-aa | 22 - mail/popa3d/files/patch-ab | 22 - mail/popa3d/files/patch-params.h | 22 + mail/poppassd/files/patch-Makefile | 29 + mail/poppassd/files/patch-aa | 29 - mail/poppassd/files/patch-ab | 552 ------------ mail/poppassd/files/patch-poppassd.c | 552 ++++++++++++ mail/procmail/files/patch-Makefile | 50 ++ mail/procmail/files/patch-Makefile.1 | 15 + mail/procmail/files/patch-aa | 50 -- mail/procmail/files/patch-ab | 37 - mail/procmail/files/patch-ac | 13 - mail/procmail/files/patch-ad | 12 - mail/procmail/files/patch-ae | 15 - mail/procmail/files/patch-af | 11 - mail/procmail/files/patch-ag | 11 - mail/procmail/files/patch-ah | 14 - mail/procmail/files/patch-ai | 11 - mail/procmail/files/patch-aj | 11 - mail/procmail/files/patch-config.h | 37 + mail/procmail/files/patch-initmake | 13 + mail/procmail/files/patch-man-procmail.man | 14 + mail/procmail/files/patch-src-comsat.c | 11 + mail/procmail/files/patch-src-manconf.c | 11 + mail/procmail/files/patch-src-pipes.c | 11 + mail/procmail/files/patch-src-procmail.c | 11 + mail/procmail/files/patch-src-recommend.c | 12 + mail/qpopper/files/patch-aa | 12 - mail/qpopper/files/patch-ac | 37 - mail/qpopper/files/patch-ao | 17 - mail/qpopper/files/patch-ap | 53 -- mail/qpopper/files/patch-aq | 14 - mail/qpopper/files/patch-ar | 15 - mail/qpopper/files/patch-man__popper.8 | 37 + mail/qpopper/files/patch-popper__Makefile.in | 12 + mail/qpopper/files/patch-popper__hmac.c | 15 + mail/qpopper/files/patch-popper__popauth.8 | 53 ++ mail/qpopper/files/patch-popper__popauth.c | 17 + mail/qpopper/files/patch-popper__scram.c | 14 + mail/rbl-milter/files/patch-aa | 13 - mail/rbl-milter/files/patch-configure | 13 + mail/rblcheck/files/patch-aa | 122 --- mail/rblcheck/files/patch-rblcheck.c | 122 +++ mail/rftp/files/patch-01 | 23 - mail/rftp/files/patch-Makefile | 23 + mail/sa-stats/files/patch-sa-stats-1.0.txt | 20 + mail/sa-stats/files/patch-za | 20 - mail/sentinel/files/patch-aa | 13 - mail/sentinel/files/patch-sentinel.c | 13 + mail/serialmail/files/patch-Makefile | 11 + mail/serialmail/files/patch-aa | 11 - mail/wmpop3/files/patch-Makefile | 24 + mail/wmpop3/files/patch-Pop3Client.c | 15 + mail/wmpop3/files/patch-aa | 24 - mail/wmpop3/files/patch-ab | 15 - mail/xlbiff/Makefile | 3 +- mail/xlbiff/files/patch-01 | 11 - mail/xlbiff/files/patch-02 | 20 - mail/xlbiff/files/patch-Imakefile | 11 + mail/xlbiff/files/patch-xlbiff.man | 20 + mail/xmail/files/patch-Imakefile | 109 +++ mail/xmail/files/patch-XMail.ad | 188 ++++ mail/xmail/files/patch-aa | 109 --- mail/xmail/files/patch-ab | 24 - mail/xmail/files/patch-ac | 188 ---- mail/xmail/files/patch-ad | 55 -- mail/xmail/files/patch-callMail.c | 55 ++ mail/xmail/files/patch-callbacks.c | 24 + mail/xmailbox/Makefile | 16 +- mail/xmailbox/files/patch-Imakefile | 43 + mail/xmailbox/files/patch-Mailbox.c | 11 + mail/xmailbox/files/patch-MailboxP.h | 16 + mail/xmailbox/files/patch-XMailbox.ad | 11 + mail/xmailbox/files/patch-aa | 43 - mail/xmailbox/files/patch-ab | 16 - mail/xmailbox/files/patch-ac | 11 - mail/xmailbox/files/patch-ad | 11 - mail/xmailbox/pkg-plist | 12 +- mail/xmailwatcher/files/patch-aa | 20 - mail/xmailwatcher/files/patch-box.c | 20 + mail/xpbiff/files/patch-Imakefile | 8 + mail/xpbiff/files/patch-StrToPmap.c | 12 + mail/xpbiff/files/patch-aa | 115 --- mail/xpbiff/files/patch-ab | 12 - mail/xpbiff/files/patch-ad | 8 - mail/xpbiff/files/patch-ae | 958 --------------------- mail/xpbiff/files/patch-config.h | 115 +++ mail/xpbiff/files/patch-xpbiff.c | 958 +++++++++++++++++++++ 194 files changed, 7283 insertions(+), 7288 deletions(-) delete mode 100644 mail/adcomplain/files/patch-aa create mode 100644 mail/adcomplain/files/patch-adcomplain.pl create mode 100644 mail/cclient/files/patch-Makefile delete mode 100644 mail/cclient/files/patch-aa delete mode 100644 mail/cclient/files/patch-ab delete mode 100644 mail/cclient/files/patch-ac create mode 100644 mail/cclient/files/patch-src_osdep_unix_Makefile create mode 100644 mail/cclient/files/patch-src_osdep_unix_os_bsi.h create mode 100644 mail/drac/files/patch-Makefile delete mode 100644 mail/drac/files/patch-aa delete mode 100644 mail/drac/files/patch-ab delete mode 100644 mail/drac/files/patch-ac delete mode 100644 mail/drac/files/patch-ad create mode 100644 mail/drac/files/patch-rpc.dracd.1m create mode 100644 mail/drac/files/patch-rpc.dracd.c create mode 100644 mail/drac/files/patch-testing.c delete mode 100644 mail/evolution/files/patch-aa create mode 100644 mail/evolution/files/patch-configure create mode 100644 mail/ezmlm/files/patch-Makefile delete mode 100644 mail/ezmlm/files/patch-aa delete mode 100644 mail/faces/files/patch-ba delete mode 100644 mail/faces/files/patch-ca delete mode 100644 mail/faces/files/patch-cb delete mode 100644 mail/faces/files/patch-cc delete mode 100644 mail/faces/files/patch-cd delete mode 100644 mail/faces/files/patch-ce delete mode 100644 mail/faces/files/patch-cf delete mode 100644 mail/faces/files/patch-ch delete mode 100644 mail/faces/files/patch-ci delete mode 100644 mail/faces/files/patch-cj delete mode 100644 mail/faces/files/patch-ck create mode 100644 mail/faces/files/patch-compface_arith.c create mode 100644 mail/faces/files/patch-compface_cmain.c create mode 100644 mail/faces/files/patch-compface_compface.1 create mode 100644 mail/faces/files/patch-compface_compface.c create mode 100644 mail/faces/files/patch-compface_compface.h create mode 100644 mail/faces/files/patch-compface_compress.c create mode 100644 mail/faces/files/patch-compface_file.c create mode 100644 mail/faces/files/patch-compface_gen.c create mode 100644 mail/faces/files/patch-compface_uncmain.c create mode 100644 mail/faces/files/patch-compface_uncompface.c create mode 100644 mail/faces/files/patch-faces_Faces.ad delete mode 100644 mail/hbiff/files/patch-01 create mode 100644 mail/hbiff/files/patch-hbiff.c create mode 100644 mail/imap-uw/files/patch-Makefile delete mode 100644 mail/imap-uw/files/patch-aa delete mode 100644 mail/imap-uw/files/patch-ab delete mode 100644 mail/imap-uw/files/patch-ac delete mode 100644 mail/imap-uw/files/patch-ad delete mode 100644 mail/imap-uw/files/patch-ae delete mode 100644 mail/imap-uw/files/patch-af delete mode 100644 mail/imap-uw/files/patch-ag delete mode 100644 mail/imap-uw/files/patch-ah delete mode 100644 mail/imap-uw/files/patch-ai create mode 100644 mail/imap-uw/files/patch-src_imapd_Makefile create mode 100644 mail/imap-uw/files/patch-src_imapd_imapd.c create mode 100644 mail/imap-uw/files/patch-src_ipopd_Makefile create mode 100644 mail/imap-uw/files/patch-src_ipopd_ipop3d.c create mode 100644 mail/imap-uw/files/patch-src_mtest_Makefile create mode 100644 mail/imap-uw/files/patch-src_mtest_mtest.c create mode 100644 mail/imap-uw/files/patch-src_osdep_unix_Makefile create mode 100644 mail/imap-uw/files/patch-src_osdep_unix_os_bsi.h delete mode 100644 mail/mail2sms/files/patch-aa create mode 100644 mail/mail2sms/files/patch-mail2sms.1 create mode 100644 mail/mail2sms/files/patch-mail2sms.4 create mode 100644 mail/mail2sms/files/patch-main.c create mode 100644 mail/mail2sms/files/patch-parse.c delete mode 100644 mail/mailagent/files/patch-ac create mode 100644 mail/mailagent/files/patch-agent-filter-io.c create mode 100644 mail/mailagent/files/patch-agent-filter-logfile.c create mode 100644 mail/mailagent/files/patch-agent-man-Makefile.SH delete mode 100644 mail/mailagent/files/patch-agent::filter::logfile.c delete mode 100644 mail/mailagent/files/patch-agent::man::Makefile.SH delete mode 100644 mail/mess822/files/patch-aa create mode 100644 mail/mess822/files/patch-hier.c create mode 100644 mail/ml/files/patch-Imakefile_1 create mode 100644 mail/ml/files/patch-Imakefile_2 delete mode 100644 mail/ml/files/patch-aa delete mode 100644 mail/ml/files/patch-ab delete mode 100644 mail/ml/files/patch-ac delete mode 100644 mail/ml/files/patch-ad delete mode 100644 mail/ml/files/patch-ae delete mode 100644 mail/ml/files/patch-af delete mode 100644 mail/ml/files/patch-ag create mode 100644 mail/ml/files/patch-imap-4-src-c-client-mtest.c create mode 100644 mail/ml/files/patch-imap-4-src-osdep-unix-Makefile create mode 100644 mail/ml/files/patch-imap-4-src-osdep-unix-mmdf.c create mode 100644 mail/ml/files/patch-imap-4-src-osdep-unix-os_bsi.h delete mode 100644 mail/ml/files/patch-impa-4-src-osdep-unix-mmdf.c create mode 100644 mail/ml/files/patch-lib-CheckConnection.ppp create mode 100644 mail/ml/files/patch-lib-ML.ad delete mode 100644 mail/mutt/files/patch-02 delete mode 100644 mail/mutt/files/patch-05 delete mode 100644 mail/mutt/files/patch-08 create mode 100644 mail/mutt/files/patch-curs_lib.c create mode 100644 mail/mutt/files/patch-doc-Makefile.am create mode 100644 mail/mutt/files/patch-doc-Muttrc delete mode 100644 mail/mutt14/files/patch-02 delete mode 100644 mail/mutt14/files/patch-03 delete mode 100644 mail/mutt14/files/patch-05 delete mode 100644 mail/mutt14/files/patch-08 create mode 100644 mail/mutt14/files/patch-Muttrc create mode 100644 mail/mutt14/files/patch-doc-Makefile.in create mode 100644 mail/mutt14/files/patch-doc_manual.sgml create mode 100644 mail/mutt14/files/patch-string-handling create mode 100644 mail/popa3d/files/patch-Makefile delete mode 100644 mail/popa3d/files/patch-aa delete mode 100644 mail/popa3d/files/patch-ab create mode 100644 mail/popa3d/files/patch-params.h create mode 100644 mail/poppassd/files/patch-Makefile delete mode 100644 mail/poppassd/files/patch-aa delete mode 100644 mail/poppassd/files/patch-ab create mode 100644 mail/poppassd/files/patch-poppassd.c create mode 100644 mail/procmail/files/patch-Makefile create mode 100644 mail/procmail/files/patch-Makefile.1 delete mode 100644 mail/procmail/files/patch-aa delete mode 100644 mail/procmail/files/patch-ab delete mode 100644 mail/procmail/files/patch-ac delete mode 100644 mail/procmail/files/patch-ad delete mode 100644 mail/procmail/files/patch-ae delete mode 100644 mail/procmail/files/patch-af delete mode 100644 mail/procmail/files/patch-ag delete mode 100644 mail/procmail/files/patch-ah delete mode 100644 mail/procmail/files/patch-ai delete mode 100644 mail/procmail/files/patch-aj create mode 100644 mail/procmail/files/patch-config.h create mode 100644 mail/procmail/files/patch-initmake create mode 100644 mail/procmail/files/patch-man-procmail.man create mode 100644 mail/procmail/files/patch-src-comsat.c create mode 100644 mail/procmail/files/patch-src-manconf.c create mode 100644 mail/procmail/files/patch-src-pipes.c create mode 100644 mail/procmail/files/patch-src-procmail.c create mode 100644 mail/procmail/files/patch-src-recommend.c delete mode 100644 mail/qpopper/files/patch-aa delete mode 100644 mail/qpopper/files/patch-ac delete mode 100644 mail/qpopper/files/patch-ao delete mode 100644 mail/qpopper/files/patch-ap delete mode 100644 mail/qpopper/files/patch-aq delete mode 100644 mail/qpopper/files/patch-ar create mode 100644 mail/qpopper/files/patch-man__popper.8 create mode 100644 mail/qpopper/files/patch-popper__Makefile.in create mode 100644 mail/qpopper/files/patch-popper__hmac.c create mode 100644 mail/qpopper/files/patch-popper__popauth.8 create mode 100644 mail/qpopper/files/patch-popper__popauth.c create mode 100644 mail/qpopper/files/patch-popper__scram.c delete mode 100644 mail/rbl-milter/files/patch-aa create mode 100644 mail/rbl-milter/files/patch-configure delete mode 100644 mail/rblcheck/files/patch-aa create mode 100644 mail/rblcheck/files/patch-rblcheck.c delete mode 100644 mail/rftp/files/patch-01 create mode 100644 mail/rftp/files/patch-Makefile create mode 100644 mail/sa-stats/files/patch-sa-stats-1.0.txt delete mode 100644 mail/sa-stats/files/patch-za delete mode 100644 mail/sentinel/files/patch-aa create mode 100644 mail/sentinel/files/patch-sentinel.c create mode 100644 mail/serialmail/files/patch-Makefile delete mode 100644 mail/serialmail/files/patch-aa create mode 100644 mail/wmpop3/files/patch-Makefile create mode 100644 mail/wmpop3/files/patch-Pop3Client.c delete mode 100644 mail/wmpop3/files/patch-aa delete mode 100644 mail/wmpop3/files/patch-ab delete mode 100644 mail/xlbiff/files/patch-01 delete mode 100644 mail/xlbiff/files/patch-02 create mode 100644 mail/xlbiff/files/patch-Imakefile create mode 100644 mail/xlbiff/files/patch-xlbiff.man create mode 100644 mail/xmail/files/patch-Imakefile create mode 100644 mail/xmail/files/patch-XMail.ad delete mode 100644 mail/xmail/files/patch-aa delete mode 100644 mail/xmail/files/patch-ab delete mode 100644 mail/xmail/files/patch-ac delete mode 100644 mail/xmail/files/patch-ad create mode 100644 mail/xmail/files/patch-callMail.c create mode 100644 mail/xmail/files/patch-callbacks.c create mode 100644 mail/xmailbox/files/patch-Imakefile create mode 100644 mail/xmailbox/files/patch-Mailbox.c create mode 100644 mail/xmailbox/files/patch-MailboxP.h create mode 100644 mail/xmailbox/files/patch-XMailbox.ad delete mode 100644 mail/xmailbox/files/patch-aa delete mode 100644 mail/xmailbox/files/patch-ab delete mode 100644 mail/xmailbox/files/patch-ac delete mode 100644 mail/xmailbox/files/patch-ad delete mode 100644 mail/xmailwatcher/files/patch-aa create mode 100644 mail/xmailwatcher/files/patch-box.c create mode 100644 mail/xpbiff/files/patch-Imakefile create mode 100644 mail/xpbiff/files/patch-StrToPmap.c delete mode 100644 mail/xpbiff/files/patch-aa delete mode 100644 mail/xpbiff/files/patch-ab delete mode 100644 mail/xpbiff/files/patch-ad delete mode 100644 mail/xpbiff/files/patch-ae create mode 100644 mail/xpbiff/files/patch-config.h create mode 100644 mail/xpbiff/files/patch-xpbiff.c (limited to 'mail') diff --git a/mail/adcomplain/files/patch-aa b/mail/adcomplain/files/patch-aa deleted file mode 100644 index 44054e48a201..000000000000 --- a/mail/adcomplain/files/patch-aa +++ /dev/null @@ -1,326 +0,0 @@ -*** adcomplain.pl.orig Mon Feb 21 03:23:03 2000 ---- adcomplain.pl Mon Feb 21 03:24:27 2000 -*************** -*** 1,3 **** ---- 1,4 ---- -+ #!%PERL5% - #! /bin/sh -- # -*- perl -*- - # first line invokes sh. Some systems may need to refer to perl directly, i.e.: - -*************** -*** 7,14 **** - # allows perl to be _anywhere_ in the user's path. The intent is to reduce - # the need to edit this file. - -! eval 'exec perl $0 ${1+"$@"}' -! if 0; # tee hee! This is on a separate line, so /bin/sh never sees it. - - # use strict; - ---- 8,15 ---- - # allows perl to be _anywhere_ in the user's path. The intent is to reduce - # the need to edit this file. - -! #eval 'exec perl $0 ${1+"$@"}' -! #if 0; # tee hee! This is on a separate line, so /bin/sh never sees it. - - # use strict; - -*************** -*** 533,538 **** ---- 534,540 ---- - $quiet, # control flag, limits interaction and output - %rematch_aliases, # heuristic list, resets priority of another header - $response, # text of letter we will send -+ @rusu_3level, # 3rd level .RU/.SU exceptions - $site, # site we will send the complaint to - @site_exceptions, # sites that have irregular syntactic form - $subject, # subject header of the ad -*************** -*** 2520,2526 **** - ($site2 = $host) =~ s/.*\.(.*\..*)/$1/; - ($site3 = $host) =~ s/.*\.(.*\..*\..*)/$1/; - ($junk = $host) =~ s/.*\.(.*)/$1/; -! if (length($junk) >= 3) { - ($junk = $site3) =~ s/(\W)/\\$1/g; # remove special characters - - if (grep(/^$junk$/, @site_exceptions) != 0) { ---- 2522,2538 ---- - ($site2 = $host) =~ s/.*\.(.*\..*)/$1/; - ($site3 = $host) =~ s/.*\.(.*\..*\..*)/$1/; - ($junk = $host) =~ s/.*\.(.*)/$1/; -! if ($junk eq "ru" || $junk eq "su") { -! ($junk = $site2) =~ s/(\W)/\\$1/g; # remove special characters -! -! if (grep(/^$junk$/, @rusu_3level) != 0) { -! $site = $site3; -! } -! else { -! $site = $site2; -! } -! } -! elsif (length($junk) >= 3) { - ($junk = $site3) =~ s/(\W)/\\$1/g; # remove special characters - - if (grep(/^$junk$/, @site_exceptions) != 0) { -*************** -*** 2618,2623 **** ---- 2630,2636 ---- - # Pick the alias with the _most_ dots - local($alias); - foreach $alias (split(' ', $aliases)) { -+ $alias =~ s/\.$//; # this adcomplain cannot deal with "foo.bar.com." - $cd = ($alias =~ tr/././); - if ($cd > $nd) { - $result = $alias; -*************** -*** 3077,3082 **** ---- 3090,3337 ---- - 'xs4all.nl', - ); - @site_exceptions = sort @site_exceptions; # needed for bsearch to work -+ -+ @rusu_3level = ( -+ 'abkhazia.su', -+ 'adygeya.ru', -+ 'adygeya.su', -+ 'aktyubinsk.su', -+ 'alma-ata.su', -+ 'altai.ru', -+ 'altai.su', -+ 'amur.ru', -+ 'amur.su', -+ 'amursk.ru', -+ 'arkhangelsk.ru', -+ 'arkhangelsk.su', -+ 'armenia.su', -+ 'ashgabad.su', -+ 'astrakhan.ru', -+ 'astrakhan.su', -+ 'azerbaijan.su', -+ 'baikal.ru', -+ 'balashov.su', -+ 'bashkiria.ru', -+ 'bashkiria.su', -+ 'belgorod.ru', -+ 'belgorod.su', -+ 'bir.ru', -+ 'bishkek.su', -+ 'bryansk.ru', -+ 'bryansk.su', -+ 'bukhara.su', -+ 'buriatia.su', -+ 'buryatia.ru', -+ 'cbg.ru', -+ 'chel.ru', -+ 'chel.su', -+ 'chelyabinsk.ru', -+ 'chimkent.su', -+ 'chita.ru', -+ 'chita.su', -+ 'chukotka.ru', -+ 'chuvashia.ru', -+ 'chuvashia.su', -+ 'cmw.ru', -+ 'com.ru', -+ 'dagestan.ru', -+ 'dagestan.su', -+ 'dubna.su', -+ 'dudinka.ru', -+ 'e-burg.ru', -+ 'e-burg.su', -+ 'east-kazakhstan.su', -+ 'engels.su', -+ 'fareast.ru', -+ 'georgia.su', -+ 'grozny.ru', -+ 'grozny.su', -+ 'irkutsk.ru', -+ 'irkutsk.su', -+ 'ivanovo.ru', -+ 'ivanovo.su', -+ 'izhevsk.ru', -+ 'jamal.ru', -+ 'jambyl.su', -+ 'jar.ru', -+ 'joshkar-ola.ru', -+ 'k-uralsk.ru', -+ 'kalmykia.ru', -+ 'kalmykia.su', -+ 'kaluga.ru', -+ 'kaluga.su', -+ 'kamchatka.ru', -+ 'kamchatka.su', -+ 'karacol.su', -+ 'karaganda.su', -+ 'karakol.su', -+ 'karelia.ru', -+ 'karelia.su', -+ 'kazan.ru', -+ 'kazan.su', -+ 'kchr.ru', -+ 'kemerovo.ru', -+ 'kemerovo.su', -+ 'khabarovsk.ru', -+ 'khabarovsk.su', -+ 'khakassia.ru', -+ 'khakassia.su', -+ 'khv.ru', -+ 'kirov.ru', -+ 'kms.ru', -+ 'koenig.ru', -+ 'koenig.su', -+ 'komi.ru', -+ 'komi.su', -+ 'kostroma.ru', -+ 'kostroma.su', -+ 'krasnodar.su', -+ 'krasnoyarsk.ru', -+ 'krasnoyarsk.su', -+ 'kuban.ru', -+ 'kuban.su', -+ 'kurgan.ru', -+ 'kurgan.su', -+ 'kursk.ru', -+ 'kursk.su', -+ 'kustanai.ru', -+ 'kustanai.su', -+ 'kuzbass.ru', -+ 'lipetsk.ru', -+ 'lipetsk.su', -+ 'magadan.ru', -+ 'magadan.su', -+ 'magnitka.ru', -+ 'mangyshlak.su', -+ 'mari-el.ru', -+ 'mari.ru', -+ 'mari.su', -+ 'marine.ru', -+ 'marine.su', -+ 'moldova.su', -+ 'mordovia.ru', -+ 'mordovia.su', -+ 'mosreg.ru', -+ 'msk.ru', -+ 'msk.su', -+ 'murmansk.ru', -+ 'murmansk.su', -+ 'mytis.ru', -+ 'nakhodka.ru', -+ 'nalchik.ru', -+ 'nalchik.su', -+ 'naryn.su', -+ 'navoi.su', -+ 'net.ru', -+ 'nkz.ru', -+ 'nnov.ru', -+ 'nnov.su', -+ 'norilsk.ru', -+ 'north-kazakhstan.su', -+ 'nov.ru', -+ 'nov.su', -+ 'novosibirsk.ru', -+ 'nsk.ru', -+ 'nsk.su', -+ 'obninsk.su', -+ 'omsk.ru', -+ 'omsk.su', -+ 'orenburg.ru', -+ 'orenburg.su', -+ 'org.ru', -+ 'oryol.ru', -+ 'oryol.su', -+ 'osh.su', -+ 'oskol.ru', -+ 'palana.ru', -+ 'pavlodar.su', -+ 'penza.ru', -+ 'penza.su', -+ 'perm.ru', -+ 'perm.su', -+ 'pokrovsk.su', -+ 'pp.ru', -+ 'pskov.ru', -+ 'pskov.su', -+ 'ptz.ru', -+ 'pyatigorsk.ru', -+ 'pyatigorsk.su', -+ 'rnd.ru', -+ 'rostov-na-donu.su', -+ 'rubtsovsk.ru', -+ 'ryazan.ru', -+ 'ryazan.su', -+ 'sakhalin.ru', -+ 'sakhalin.su', -+ 'samara.ru', -+ 'samara.su', -+ 'saratov.ru', -+ 'saratov.su', -+ 'semsk.su', -+ 'serpukhov.su', -+ 'simbirsk.ru', -+ 'simbirsk.su', -+ 'smolensk.ru', -+ 'smolensk.su', -+ 'sochi.su', -+ 'spb.ru', -+ 'spb.su', -+ 'stavropol.ru', -+ 'stavropol.su', -+ 'stv.ru', -+ 'surgut.ru', -+ 'surgut.su', -+ 'syzran.ru', -+ 'tambov.ru', -+ 'tambov.su', -+ 'tashkent.su', -+ 'tatarstan.ru', -+ 'termez.su', -+ 'togliatti.su', -+ 'tom.ru', -+ 'tomsk.ru', -+ 'tomsk.su', -+ 'troitsk.su', -+ 'tsaritsyn.ru', -+ 'tsaritsyn.su', -+ 'tselinograd.su', -+ 'tsk.ru', -+ 'tula.ru', -+ 'tula.su', -+ 'tuva.ru', -+ 'tuva.su', -+ 'tver.ru', -+ 'tver.su', -+ 'tyumen.ru', -+ 'tyumen.su', -+ 'udm.ru', -+ 'udmurtia.ru', -+ 'udmurtia.su', -+ 'ulan-ude.ru', -+ 'vdonsk.ru', -+ 'vladikavkaz.ru', -+ 'vladikavkaz.su', -+ 'vladimir.ru', -+ 'vladimir.su', -+ 'vladivostok.ru', -+ 'volgograd.ru', -+ 'vologda.ru', -+ 'vologda.su', -+ 'voronezh.ru', -+ 'voronezh.su', -+ 'vrn.ru', -+ 'vyatka.ru', -+ 'vyatka.su', -+ 'yakutia.ru', -+ 'yakutia.su', -+ 'yamal.ru', -+ 'yaroslavl.ru', -+ 'yaroslavl.su', -+ 'yekaterinburg.ru', -+ 'yuzhno-sakhalinsk.ru', -+ 'zgrad.ru', -+ 'zgrad.su', -+ ); - - %rematch_aliases = ( - 'nonexistent.com', 'X-NNTP-Posting-Host:', diff --git a/mail/adcomplain/files/patch-adcomplain.pl b/mail/adcomplain/files/patch-adcomplain.pl new file mode 100644 index 000000000000..44054e48a201 --- /dev/null +++ b/mail/adcomplain/files/patch-adcomplain.pl @@ -0,0 +1,326 @@ +*** adcomplain.pl.orig Mon Feb 21 03:23:03 2000 +--- adcomplain.pl Mon Feb 21 03:24:27 2000 +*************** +*** 1,3 **** +--- 1,4 ---- ++ #!%PERL5% + #! /bin/sh -- # -*- perl -*- + # first line invokes sh. Some systems may need to refer to perl directly, i.e.: + +*************** +*** 7,14 **** + # allows perl to be _anywhere_ in the user's path. The intent is to reduce + # the need to edit this file. + +! eval 'exec perl $0 ${1+"$@"}' +! if 0; # tee hee! This is on a separate line, so /bin/sh never sees it. + + # use strict; + +--- 8,15 ---- + # allows perl to be _anywhere_ in the user's path. The intent is to reduce + # the need to edit this file. + +! #eval 'exec perl $0 ${1+"$@"}' +! #if 0; # tee hee! This is on a separate line, so /bin/sh never sees it. + + # use strict; + +*************** +*** 533,538 **** +--- 534,540 ---- + $quiet, # control flag, limits interaction and output + %rematch_aliases, # heuristic list, resets priority of another header + $response, # text of letter we will send ++ @rusu_3level, # 3rd level .RU/.SU exceptions + $site, # site we will send the complaint to + @site_exceptions, # sites that have irregular syntactic form + $subject, # subject header of the ad +*************** +*** 2520,2526 **** + ($site2 = $host) =~ s/.*\.(.*\..*)/$1/; + ($site3 = $host) =~ s/.*\.(.*\..*\..*)/$1/; + ($junk = $host) =~ s/.*\.(.*)/$1/; +! if (length($junk) >= 3) { + ($junk = $site3) =~ s/(\W)/\\$1/g; # remove special characters + + if (grep(/^$junk$/, @site_exceptions) != 0) { +--- 2522,2538 ---- + ($site2 = $host) =~ s/.*\.(.*\..*)/$1/; + ($site3 = $host) =~ s/.*\.(.*\..*\..*)/$1/; + ($junk = $host) =~ s/.*\.(.*)/$1/; +! if ($junk eq "ru" || $junk eq "su") { +! ($junk = $site2) =~ s/(\W)/\\$1/g; # remove special characters +! +! if (grep(/^$junk$/, @rusu_3level) != 0) { +! $site = $site3; +! } +! else { +! $site = $site2; +! } +! } +! elsif (length($junk) >= 3) { + ($junk = $site3) =~ s/(\W)/\\$1/g; # remove special characters + + if (grep(/^$junk$/, @site_exceptions) != 0) { +*************** +*** 2618,2623 **** +--- 2630,2636 ---- + # Pick the alias with the _most_ dots + local($alias); + foreach $alias (split(' ', $aliases)) { ++ $alias =~ s/\.$//; # this adcomplain cannot deal with "foo.bar.com." + $cd = ($alias =~ tr/././); + if ($cd > $nd) { + $result = $alias; +*************** +*** 3077,3082 **** +--- 3090,3337 ---- + 'xs4all.nl', + ); + @site_exceptions = sort @site_exceptions; # needed for bsearch to work ++ ++ @rusu_3level = ( ++ 'abkhazia.su', ++ 'adygeya.ru', ++ 'adygeya.su', ++ 'aktyubinsk.su', ++ 'alma-ata.su', ++ 'altai.ru', ++ 'altai.su', ++ 'amur.ru', ++ 'amur.su', ++ 'amursk.ru', ++ 'arkhangelsk.ru', ++ 'arkhangelsk.su', ++ 'armenia.su', ++ 'ashgabad.su', ++ 'astrakhan.ru', ++ 'astrakhan.su', ++ 'azerbaijan.su', ++ 'baikal.ru', ++ 'balashov.su', ++ 'bashkiria.ru', ++ 'bashkiria.su', ++ 'belgorod.ru', ++ 'belgorod.su', ++ 'bir.ru', ++ 'bishkek.su', ++ 'bryansk.ru', ++ 'bryansk.su', ++ 'bukhara.su', ++ 'buriatia.su', ++ 'buryatia.ru', ++ 'cbg.ru', ++ 'chel.ru', ++ 'chel.su', ++ 'chelyabinsk.ru', ++ 'chimkent.su', ++ 'chita.ru', ++ 'chita.su', ++ 'chukotka.ru', ++ 'chuvashia.ru', ++ 'chuvashia.su', ++ 'cmw.ru', ++ 'com.ru', ++ 'dagestan.ru', ++ 'dagestan.su', ++ 'dubna.su', ++ 'dudinka.ru', ++ 'e-burg.ru', ++ 'e-burg.su', ++ 'east-kazakhstan.su', ++ 'engels.su', ++ 'fareast.ru', ++ 'georgia.su', ++ 'grozny.ru', ++ 'grozny.su', ++ 'irkutsk.ru', ++ 'irkutsk.su', ++ 'ivanovo.ru', ++ 'ivanovo.su', ++ 'izhevsk.ru', ++ 'jamal.ru', ++ 'jambyl.su', ++ 'jar.ru', ++ 'joshkar-ola.ru', ++ 'k-uralsk.ru', ++ 'kalmykia.ru', ++ 'kalmykia.su', ++ 'kaluga.ru', ++ 'kaluga.su', ++ 'kamchatka.ru', ++ 'kamchatka.su', ++ 'karacol.su', ++ 'karaganda.su', ++ 'karakol.su', ++ 'karelia.ru', ++ 'karelia.su', ++ 'kazan.ru', ++ 'kazan.su', ++ 'kchr.ru', ++ 'kemerovo.ru', ++ 'kemerovo.su', ++ 'khabarovsk.ru', ++ 'khabarovsk.su', ++ 'khakassia.ru', ++ 'khakassia.su', ++ 'khv.ru', ++ 'kirov.ru', ++ 'kms.ru', ++ 'koenig.ru', ++ 'koenig.su', ++ 'komi.ru', ++ 'komi.su', ++ 'kostroma.ru', ++ 'kostroma.su', ++ 'krasnodar.su', ++ 'krasnoyarsk.ru', ++ 'krasnoyarsk.su', ++ 'kuban.ru', ++ 'kuban.su', ++ 'kurgan.ru', ++ 'kurgan.su', ++ 'kursk.ru', ++ 'kursk.su', ++ 'kustanai.ru', ++ 'kustanai.su', ++ 'kuzbass.ru', ++ 'lipetsk.ru', ++ 'lipetsk.su', ++ 'magadan.ru', ++ 'magadan.su', ++ 'magnitka.ru', ++ 'mangyshlak.su', ++ 'mari-el.ru', ++ 'mari.ru', ++ 'mari.su', ++ 'marine.ru', ++ 'marine.su', ++ 'moldova.su', ++ 'mordovia.ru', ++ 'mordovia.su', ++ 'mosreg.ru', ++ 'msk.ru', ++ 'msk.su', ++ 'murmansk.ru', ++ 'murmansk.su', ++ 'mytis.ru', ++ 'nakhodka.ru', ++ 'nalchik.ru', ++ 'nalchik.su', ++ 'naryn.su', ++ 'navoi.su', ++ 'net.ru', ++ 'nkz.ru', ++ 'nnov.ru', ++ 'nnov.su', ++ 'norilsk.ru', ++ 'north-kazakhstan.su', ++ 'nov.ru', ++ 'nov.su', ++ 'novosibirsk.ru', ++ 'nsk.ru', ++ 'nsk.su', ++ 'obninsk.su', ++ 'omsk.ru', ++ 'omsk.su', ++ 'orenburg.ru', ++ 'orenburg.su', ++ 'org.ru', ++ 'oryol.ru', ++ 'oryol.su', ++ 'osh.su', ++ 'oskol.ru', ++ 'palana.ru', ++ 'pavlodar.su', ++ 'penza.ru', ++ 'penza.su', ++ 'perm.ru', ++ 'perm.su', ++ 'pokrovsk.su', ++ 'pp.ru', ++ 'pskov.ru', ++ 'pskov.su', ++ 'ptz.ru', ++ 'pyatigorsk.ru', ++ 'pyatigorsk.su', ++ 'rnd.ru', ++ 'rostov-na-donu.su', ++ 'rubtsovsk.ru', ++ 'ryazan.ru', ++ 'ryazan.su', ++ 'sakhalin.ru', ++ 'sakhalin.su', ++ 'samara.ru', ++ 'samara.su', ++ 'saratov.ru', ++ 'saratov.su', ++ 'semsk.su', ++ 'serpukhov.su', ++ 'simbirsk.ru', ++ 'simbirsk.su', ++ 'smolensk.ru', ++ 'smolensk.su', ++ 'sochi.su', ++ 'spb.ru', ++ 'spb.su', ++ 'stavropol.ru', ++ 'stavropol.su', ++ 'stv.ru', ++ 'surgut.ru', ++ 'surgut.su', ++ 'syzran.ru', ++ 'tambov.ru', ++ 'tambov.su', ++ 'tashkent.su', ++ 'tatarstan.ru', ++ 'termez.su', ++ 'togliatti.su', ++ 'tom.ru', ++ 'tomsk.ru', ++ 'tomsk.su', ++ 'troitsk.su', ++ 'tsaritsyn.ru', ++ 'tsaritsyn.su', ++ 'tselinograd.su', ++ 'tsk.ru', ++ 'tula.ru', ++ 'tula.su', ++ 'tuva.ru', ++ 'tuva.su', ++ 'tver.ru', ++ 'tver.su', ++ 'tyumen.ru', ++ 'tyumen.su', ++ 'udm.ru', ++ 'udmurtia.ru', ++ 'udmurtia.su', ++ 'ulan-ude.ru', ++ 'vdonsk.ru', ++ 'vladikavkaz.ru', ++ 'vladikavkaz.su', ++ 'vladimir.ru', ++ 'vladimir.su', ++ 'vladivostok.ru', ++ 'volgograd.ru', ++ 'vologda.ru', ++ 'vologda.su', ++ 'voronezh.ru', ++ 'voronezh.su', ++ 'vrn.ru', ++ 'vyatka.ru', ++ 'vyatka.su', ++ 'yakutia.ru', ++ 'yakutia.su', ++ 'yamal.ru', ++ 'yaroslavl.ru', ++ 'yaroslavl.su', ++ 'yekaterinburg.ru', ++ 'yuzhno-sakhalinsk.ru', ++ 'zgrad.ru', ++ 'zgrad.su', ++ ); + + %rematch_aliases = ( + 'nonexistent.com', 'X-NNTP-Posting-Host:', diff --git a/mail/cclient/files/patch-Makefile b/mail/cclient/files/patch-Makefile new file mode 100644 index 000000000000..1e10918790a8 --- /dev/null +++ b/mail/cclient/files/patch-Makefile @@ -0,0 +1,78 @@ +*** Makefile.orig Wed May 9 00:50:45 2007 +--- Makefile Mon Jul 23 16:02:26 2007 +*************** +*** 294,300 **** + + # Make the IMAP Toolkit + +! all: c-client SPECIALS rebuild bundled + + c-client: + @echo Not processed yet. In a first-time build, you must specify +--- 294,300 ---- + + # Make the IMAP Toolkit + +! all: c-client SPECIALS rebuild + + c-client: + @echo Not processed yet. In a first-time build, you must specify +*************** +*** 559,567 **** + @echo + In order to rectify this problem, you MUST build with: + @echo ++ SSLTYPE=$(SSLTYPE).nopwd + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +- @echo +- @echo Do you want to continue this build anyway? Type y or n please: +- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac' + + nounenc: + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +--- 559,564 ---- +*************** +*** 582,590 **** + @echo ++ SSLTYPE=nopwd + @echo + You must also have OpenSSL or equivalent installed. + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +- @echo +- @echo Do you want to continue this build anyway? Type y or n please: +- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nonossl;exit 1);; esac' + + nonossl: + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +--- 579,584 ---- +*************** +*** 659,665 **** + $(TOOLS)/$@ "$(LN)" src/tmail tmail + $(LN) $(TOOLS)/$@ . + +! build: OSTYPE rebuild rebuildclean bundled + + OSTYPE: + @$(MAKE) ip$(IP) +--- 653,659 ---- + $(TOOLS)/$@ "$(LN)" src/tmail tmail + $(LN) $(TOOLS)/$@ . + +! build: OSTYPE rebuild rebuildclean + + OSTYPE: + @$(MAKE) ip$(IP) +*************** +*** 679,686 **** + @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)' + @echo Rebuilding c-client for `$(CAT) OSTYPE`... + @$(TOUCH) SPECIALS +! $(CD) c-client;$(MAKE) all CC=`$(CAT) CCTYPE` \ +! CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS` + + rebuildclean: + $(SH) -c '$(RM) rebuild || true' +--- 673,679 ---- + @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)' + @echo Rebuilding c-client for `$(CAT) OSTYPE`... + @$(TOUCH) SPECIALS +! $(CD) c-client;$(MAKE) all CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS` + + rebuildclean: + $(SH) -c '$(RM) rebuild || true' diff --git a/mail/cclient/files/patch-aa b/mail/cclient/files/patch-aa deleted file mode 100644 index ade4d1289237..000000000000 --- a/mail/cclient/files/patch-aa +++ /dev/null @@ -1,21 +0,0 @@ ---- src/osdep/unix/os_bsi.h.orig Wed Apr 11 10:53:03 2001 -+++ src/osdep/unix/os_bsi.h Wed Apr 11 10:55:32 2001 -@@ -22,7 +22,18 @@ - #include - #include - #include -+ -+/* -+ * FreeBSD v3.x and onward whines about being obsolete, so switch -+ * to POSIX semantics. -+ */ -+#if __FreeBSD__ >= 3 -+#include -+#define direct dirent -+#else - #include -+#endif -+ - #include - #include - #include diff --git a/mail/cclient/files/patch-ab b/mail/cclient/files/patch-ab deleted file mode 100644 index 6695c7355072..000000000000 --- a/mail/cclient/files/patch-ab +++ /dev/null @@ -1,254 +0,0 @@ -*** src/osdep/unix/Makefile.orig Sun Jun 17 17:37:44 2007 ---- src/osdep/unix/Makefile Mon Jul 23 16:30:12 2007 -*************** -*** 28,36 **** - - EXTRAAUTHENTICATORS= - EXTRADRIVERS=mbox -! PASSWDTYPE=std -! SSLTYPE=nopwd -! IP=4 - - - # The optimization level here for GCC ports is set here for a reason. It's ---- 28,36 ---- - - EXTRAAUTHENTICATORS= - EXTRADRIVERS=mbox -! PASSWDTYPE=pam -! SSLTYPE=unix.nopwd -! IP=6 - - - # The optimization level here for GCC ports is set here for a reason. It's -*************** -*** 54,66 **** - - # Extended flags needed for SSL. You may need to modify. - -! SSLDIR=/usr/local/ssl -! SSLCERTS=$(SSLDIR)/certs - SSLKEYS=$(SSLCERTS) - SSLINCLUDE=$(SSLDIR)/include - SSLLIB=$(SSLDIR)/lib - -! SSLCRYPTO=-lcrypto - - # Older versions of MIT Kerberos also have a libcrypto. If so, you may need - # to use this instead ---- 54,66 ---- - - # Extended flags needed for SSL. You may need to modify. - -! #SSLDIR=/usr/local/ssl -! SSLCERTS=$(PREFIX)/certs - SSLKEYS=$(SSLCERTS) - SSLINCLUDE=$(SSLDIR)/include - SSLLIB=$(SSLDIR)/lib - -! SSLCRYPTO=-lcrypto -lcrypt - - # Older versions of MIT Kerberos also have a libcrypto. If so, you may need - # to use this instead -*************** -*** 87,93 **** - # AFSLDFLAGS may also need -L/usr/ucblib -lucb - DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\" - DCELDFLAGS= -ldce -! PAMLDFLAGS= -lpam -ldl - - - # Build parameters normally set by the individual port ---- 87,93 ---- - # AFSLDFLAGS may also need -L/usr/ucblib -lucb - DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\" - DCELDFLAGS= -ldce -! PAMLDFLAGS= # -lpam -lcrypt - - - # Build parameters normally set by the individual port -*************** -*** 125,131 **** - # Commands possibly overriden by the individual port - - ARRC=ar rc -! CC=cc - LN=ln -s - RANLIB=ranlib - ---- 125,131 ---- - # Commands possibly overriden by the individual port - - ARRC=ar rc -! #CC=cc - LN=ln -s - RANLIB=ranlib - -*************** -*** 149,155 **** - dummy.o pseudo.o netmsg.o flstring.o fdstring.o \ - rfc822.o nntp.o smtp.o imap4r1.o pop3.o \ - unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o -! CFLAGS=-g - - CAT=cat - MAKE=make ---- 149,155 ---- - dummy.o pseudo.o netmsg.o flstring.o fdstring.o \ - rfc822.o nntp.o smtp.o imap4r1.o pop3.o \ - unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o -! CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS) - - CAT=cat - MAKE=make -*************** -*** 166,171 **** ---- 166,175 ---- - PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP) - - -+ # Need this for the shared library rule to work correctly -+ .SUFFIXES: .o .so -+ SOFILES=${BINARIES:.o=.so} -+ - # Here if no make argument established - - missing: osdep.h -*************** -*** 246,258 **** - BASECFLAGS="-g -Dconst=" - - bsf: # FreeBSD -! $(BUILD) `$(CAT) SPECIALS` OS=$@ \ - SIGTYPE=psx CRXTYPE=nfs \ - SPOOLDIR=/var \ - ACTIVEFILE=/usr/local/news/lib/active \ - RSHPATH=/usr/bin/rsh \ - BASECFLAGS="$(GCCCFLAGS)" \ -! BASELDFLAGS="-lcrypt" - - bsi: # BSD/i386 - $(BUILD) `$(CAT) SPECIALS` OS=$@ \ ---- 250,263 ---- - BASECFLAGS="-g -Dconst=" - - bsf: # FreeBSD -! $(BUILD) `$(CAT) SPECIALS` OS=$@ CHECKPW=pam \ - SIGTYPE=psx CRXTYPE=nfs \ - SPOOLDIR=/var \ - ACTIVEFILE=/usr/local/news/lib/active \ - RSHPATH=/usr/bin/rsh \ -+ LOCKPGM=$(PREFIX)/libexec/mlock \ - BASECFLAGS="$(GCCCFLAGS)" \ -! BASELDFLAGS="-lpam" - - bsi: # BSD/i386 - $(BUILD) `$(CAT) SPECIALS` OS=$@ \ -*************** -*** 840,862 **** - - # Build it! - -! build: clean once $(ARCHIVE) - -! all: $(ARCHIVE) - - $(ARCHIVE): $(BINARIES) - sh -c '$(RM) $(ARCHIVE) || true' - @$(CAT) ARCHIVE - @$(SH) ARCHIVE - - .c.o: -! `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $*.c - - - # Cleanup - - clean: - sh -c '$(RM) auths.c crexcl.c ip_unix.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE $(ARCHIVE) || true' - - - # Dependencies ---- 845,875 ---- - - # Build it! - -! build: clean once $(ARCHIVE) $(SHLIBNAME) - -! all: $(ARCHIVE) $(SHLIBNAME) - - $(ARCHIVE): $(BINARIES) - sh -c '$(RM) $(ARCHIVE) || true' - @$(CAT) ARCHIVE - @$(SH) ARCHIVE - -+ $(SHLIBNAME): $(SOFILES) -+ ld -shared -x -soname $(SHLIBNAME) -o $(SHLIBNAME) $(SOFILES) `cat LDFLAGS` -+ ln -s $(SHLIBNAME) lib$(SHLIBBASE).so -+ -+ .c.so: osdep.h -+ $(CC) -fPIC -DPIC -c `cat CFLAGS` ${@:.so=.c} -o $@ -+ - .c.o: -! $(CC) -c `cat CFLAGS` $*.c - - - # Cleanup - - clean: - sh -c '$(RM) auths.c crexcl.c ip_unix.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE $(ARCHIVE) || true' -+ sh -c '$(RM) *.so $(SHLIBNAME)' - - - # Dependencies -*************** -*** 891,897 **** - - # OS-dependent - -! osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \ - osdep.h env_unix.h tcp_unix.h \ - osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\ - auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c fsync.c \ ---- 904,910 ---- - - # OS-dependent - -! OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \ - osdep.h env_unix.h tcp_unix.h \ - osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\ - auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c fsync.c \ -*************** -*** 905,916 **** - write.c sslstdio.c \ - strerror.c strpbrk.c strstr.c strtok.c strtoul.c \ - OSCFLAGS - @echo Building OS-dependent module - @echo If you get No such file error messages for files x509.h, ssl.h, - @echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL - @echo is not installed on your system. Either install OpenSSL first - @echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none -! `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c - - osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c - $(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c ---- 918,936 ---- - write.c sslstdio.c \ - strerror.c strpbrk.c strstr.c strtok.c strtoul.c \ - OSCFLAGS -+ -+ osdep.o: $(OSDEPS) -+ $(CC) `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c -+ @echo ======================================================================== - @echo Building OS-dependent module - @echo If you get No such file error messages for files x509.h, ssl.h, - @echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL - @echo is not installed on your system. Either install OpenSSL first - @echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none -! @echo ======================================================================== -! -! osdep.so: $(OSDEPS) -! $(CC) -fPIC -DPIC -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` osdep.c -o $@ - - osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c - $(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c diff --git a/mail/cclient/files/patch-ac b/mail/cclient/files/patch-ac deleted file mode 100644 index 1e10918790a8..000000000000 --- a/mail/cclient/files/patch-ac +++ /dev/null @@ -1,78 +0,0 @@ -*** Makefile.orig Wed May 9 00:50:45 2007 ---- Makefile Mon Jul 23 16:02:26 2007 -*************** -*** 294,300 **** - - # Make the IMAP Toolkit - -! all: c-client SPECIALS rebuild bundled - - c-client: - @echo Not processed yet. In a first-time build, you must specify ---- 294,300 ---- - - # Make the IMAP Toolkit - -! all: c-client SPECIALS rebuild - - c-client: - @echo Not processed yet. In a first-time build, you must specify -*************** -*** 559,567 **** - @echo + In order to rectify this problem, you MUST build with: - @echo ++ SSLTYPE=$(SSLTYPE).nopwd - @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- @echo -- @echo Do you want to continue this build anyway? Type y or n please: -- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac' - - nounenc: - @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ---- 559,564 ---- -*************** -*** 582,590 **** - @echo ++ SSLTYPE=nopwd - @echo + You must also have OpenSSL or equivalent installed. - @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- @echo -- @echo Do you want to continue this build anyway? Type y or n please: -- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nonossl;exit 1);; esac' - - nonossl: - @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ---- 579,584 ---- -*************** -*** 659,665 **** - $(TOOLS)/$@ "$(LN)" src/tmail tmail - $(LN) $(TOOLS)/$@ . - -! build: OSTYPE rebuild rebuildclean bundled - - OSTYPE: - @$(MAKE) ip$(IP) ---- 653,659 ---- - $(TOOLS)/$@ "$(LN)" src/tmail tmail - $(LN) $(TOOLS)/$@ . - -! build: OSTYPE rebuild rebuildclean - - OSTYPE: - @$(MAKE) ip$(IP) -*************** -*** 679,686 **** - @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)' - @echo Rebuilding c-client for `$(CAT) OSTYPE`... - @$(TOUCH) SPECIALS -! $(CD) c-client;$(MAKE) all CC=`$(CAT) CCTYPE` \ -! CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS` - - rebuildclean: - $(SH) -c '$(RM) rebuild || true' ---- 673,679 ---- - @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)' - @echo Rebuilding c-client for `$(CAT) OSTYPE`... - @$(TOUCH) SPECIALS -! $(CD) c-client;$(MAKE) all CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS` - - rebuildclean: - $(SH) -c '$(RM) rebuild || true' diff --git a/mail/cclient/files/patch-src_osdep_unix_Makefile b/mail/cclient/files/patch-src_osdep_unix_Makefile new file mode 100644 index 000000000000..6695c7355072 --- /dev/null +++ b/mail/cclient/files/patch-src_osdep_unix_Makefile @@ -0,0 +1,254 @@ +*** src/osdep/unix/Makefile.orig Sun Jun 17 17:37:44 2007 +--- src/osdep/unix/Makefile Mon Jul 23 16:30:12 2007 +*************** +*** 28,36 **** + + EXTRAAUTHENTICATORS= + EXTRADRIVERS=mbox +! PASSWDTYPE=std +! SSLTYPE=nopwd +! IP=4 + + + # The optimization level here for GCC ports is set here for a reason. It's +--- 28,36 ---- + + EXTRAAUTHENTICATORS= + EXTRADRIVERS=mbox +! PASSWDTYPE=pam +! SSLTYPE=unix.nopwd +! IP=6 + + + # The optimization level here for GCC ports is set here for a reason. It's +*************** +*** 54,66 **** + + # Extended flags needed for SSL. You may need to modify. + +! SSLDIR=/usr/local/ssl +! SSLCERTS=$(SSLDIR)/certs + SSLKEYS=$(SSLCERTS) + SSLINCLUDE=$(SSLDIR)/include + SSLLIB=$(SSLDIR)/lib + +! SSLCRYPTO=-lcrypto + + # Older versions of MIT Kerberos also have a libcrypto. If so, you may need + # to use this instead +--- 54,66 ---- + + # Extended flags needed for SSL. You may need to modify. + +! #SSLDIR=/usr/local/ssl +! SSLCERTS=$(PREFIX)/certs + SSLKEYS=$(SSLCERTS) + SSLINCLUDE=$(SSLDIR)/include + SSLLIB=$(SSLDIR)/lib + +! SSLCRYPTO=-lcrypto -lcrypt + + # Older versions of MIT Kerberos also have a libcrypto. If so, you may need + # to use this instead +*************** +*** 87,93 **** + # AFSLDFLAGS may also need -L/usr/ucblib -lucb + DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\" + DCELDFLAGS= -ldce +! PAMLDFLAGS= -lpam -ldl + + + # Build parameters normally set by the individual port +--- 87,93 ---- + # AFSLDFLAGS may also need -L/usr/ucblib -lucb + DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\" + DCELDFLAGS= -ldce +! PAMLDFLAGS= # -lpam -lcrypt + + + # Build parameters normally set by the individual port +*************** +*** 125,131 **** + # Commands possibly overriden by the individual port + + ARRC=ar rc +! CC=cc + LN=ln -s + RANLIB=ranlib + +--- 125,131 ---- + # Commands possibly overriden by the individual port + + ARRC=ar rc +! #CC=cc + LN=ln -s + RANLIB=ranlib + +*************** +*** 149,155 **** + dummy.o pseudo.o netmsg.o flstring.o fdstring.o \ + rfc822.o nntp.o smtp.o imap4r1.o pop3.o \ + unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o +! CFLAGS=-g + + CAT=cat + MAKE=make +--- 149,155 ---- + dummy.o pseudo.o netmsg.o flstring.o fdstring.o \ + rfc822.o nntp.o smtp.o imap4r1.o pop3.o \ + unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o +! CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS) + + CAT=cat + MAKE=make +*************** +*** 166,171 **** +--- 166,175 ---- + PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP) + + ++ # Need this for the shared library rule to work correctly ++ .SUFFIXES: .o .so ++ SOFILES=${BINARIES:.o=.so} ++ + # Here if no make argument established + + missing: osdep.h +*************** +*** 246,258 **** + BASECFLAGS="-g -Dconst=" + + bsf: # FreeBSD +! $(BUILD) `$(CAT) SPECIALS` OS=$@ \ + SIGTYPE=psx CRXTYPE=nfs \ + SPOOLDIR=/var \ + ACTIVEFILE=/usr/local/news/lib/active \ + RSHPATH=/usr/bin/rsh \ + BASECFLAGS="$(GCCCFLAGS)" \ +! BASELDFLAGS="-lcrypt" + + bsi: # BSD/i386 + $(BUILD) `$(CAT) SPECIALS` OS=$@ \ +--- 250,263 ---- + BASECFLAGS="-g -Dconst=" + + bsf: # FreeBSD +! $(BUILD) `$(CAT) SPECIALS` OS=$@ CHECKPW=pam \ + SIGTYPE=psx CRXTYPE=nfs \ + SPOOLDIR=/var \ + ACTIVEFILE=/usr/local/news/lib/active \ + RSHPATH=/usr/bin/rsh \ ++ LOCKPGM=$(PREFIX)/libexec/mlock \ + BASECFLAGS="$(GCCCFLAGS)" \ +! BASELDFLAGS="-lpam" + + bsi: # BSD/i386 + $(BUILD) `$(CAT) SPECIALS` OS=$@ \ +*************** +*** 840,862 **** + + # Build it! + +! build: clean once $(ARCHIVE) + +! all: $(ARCHIVE) + + $(ARCHIVE): $(BINARIES) + sh -c '$(RM) $(ARCHIVE) || true' + @$(CAT) ARCHIVE + @$(SH) ARCHIVE + + .c.o: +! `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $*.c + + + # Cleanup + + clean: + sh -c '$(RM) auths.c crexcl.c ip_unix.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE $(ARCHIVE) || true' + + + # Dependencies +--- 845,875 ---- + + # Build it! + +! build: clean once $(ARCHIVE) $(SHLIBNAME) + +! all: $(ARCHIVE) $(SHLIBNAME) + + $(ARCHIVE): $(BINARIES) + sh -c '$(RM) $(ARCHIVE) || true' + @$(CAT) ARCHIVE + @$(SH) ARCHIVE + ++ $(SHLIBNAME): $(SOFILES) ++ ld -shared -x -soname $(SHLIBNAME) -o $(SHLIBNAME) $(SOFILES) `cat LDFLAGS` ++ ln -s $(SHLIBNAME) lib$(SHLIBBASE).so ++ ++ .c.so: osdep.h ++ $(CC) -fPIC -DPIC -c `cat CFLAGS` ${@:.so=.c} -o $@ ++ + .c.o: +! $(CC) -c `cat CFLAGS` $*.c + + + # Cleanup + + clean: + sh -c '$(RM) auths.c crexcl.c ip_unix.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE $(ARCHIVE) || true' ++ sh -c '$(RM) *.so $(SHLIBNAME)' + + + # Dependencies +*************** +*** 891,897 **** + + # OS-dependent + +! osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \ + osdep.h env_unix.h tcp_unix.h \ + osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\ + auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c fsync.c \ +--- 904,910 ---- + + # OS-dependent + +! OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \ + osdep.h env_unix.h tcp_unix.h \ + osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\ + auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c fsync.c \ +*************** +*** 905,916 **** + write.c sslstdio.c \ + strerror.c strpbrk.c strstr.c strtok.c strtoul.c \ + OSCFLAGS + @echo Building OS-dependent module + @echo If you get No such file error messages for files x509.h, ssl.h, + @echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL + @echo is not installed on your system. Either install OpenSSL first + @echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none +! `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c + + osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c + $(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c +--- 918,936 ---- + write.c sslstdio.c \ + strerror.c strpbrk.c strstr.c strtok.c strtoul.c \ + OSCFLAGS ++ ++ osdep.o: $(OSDEPS) ++ $(CC) `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c ++ @echo ======================================================================== + @echo Building OS-dependent module + @echo If you get No such file error messages for files x509.h, ssl.h, + @echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL + @echo is not installed on your system. Either install OpenSSL first + @echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none +! @echo ======================================================================== +! +! osdep.so: $(OSDEPS) +! $(CC) -fPIC -DPIC -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` osdep.c -o $@ + + osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c + $(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c diff --git a/mail/cclient/files/patch-src_osdep_unix_os_bsi.h b/mail/cclient/files/patch-src_osdep_unix_os_bsi.h new file mode 100644 index 000000000000..ade4d1289237 --- /dev/null +++ b/mail/cclient/files/patch-src_osdep_unix_os_bsi.h @@ -0,0 +1,21 @@ +--- src/osdep/unix/os_bsi.h.orig Wed Apr 11 10:53:03 2001 ++++ src/osdep/unix/os_bsi.h Wed Apr 11 10:55:32 2001 +@@ -22,7 +22,18 @@ + #include + #include + #include ++ ++/* ++ * FreeBSD v3.x and onward whines about being obsolete, so switch ++ * to POSIX semantics. ++ */ ++#if __FreeBSD__ >= 3 ++#include ++#define direct dirent ++#else + #include ++#endif ++ + #include + #include + #include diff --git a/mail/drac/files/patch-Makefile b/mail/drac/files/patch-Makefile new file mode 100644 index 000000000000..6ca9088fb3dc --- /dev/null +++ b/mail/drac/files/patch-Makefile @@ -0,0 +1,45 @@ +--- Makefile.orig 2003-01-12 21:45:12.000000000 +0100 ++++ Makefile 2014-04-04 23:35:46.000000000 +0200 +@@ -5,9 +5,11 @@ + + # Paths + +-INSTALL = /usr/ucb/install +-EBIN = /usr/local/sbin +-MAN = /usr/local/man/man ++INSTALL? = install ++EBIN = ${PREFIX}/sbin ++MAN = ${PREFIX}/man/man ++ETC_DIR = ${PREFIX}/etc ++DEFS = ${DEFS} + + # OS-Dependant settings + +@@ -33,22 +35,19 @@ + # -DCIDR_KEY # keys in CIDR format + # -DTERM_KD # keys and data nul-terminated + +-DEFS = -DTI_RPC -DFCNTL_LOCK -DSYSINFO +- + # Compiler flags +-CC = cc ++CC? = cc + RANLIB = : +-CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-4.1.25/build_unix ++CFLAGS+= $(DEFS) -g -I${PREFIX}/include -DDBFILE=\"$(ETC_DIR)/dracd.db\" -DALFILE=\"$(ETC_DIR)/dracd.allow\" + #CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-3.1.17/build_unix + #CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-2.4.14/Unix + #CFLAGS = $(DEFS) -g -I/usr/local/src/db/db.1.85/PORT/sunos.5.2/include +-LDLIBS = -L/usr/local/src/db/db-4.1.25/build_unix -lnsl -ldb-4.1 ++LDLIBS = + #LDLIBS = -L/usr/local/src/db/db-3.1.17/build_unix -lnsl -ldb + #LDLIBS = -L/usr/local/src/db/db-2.4.14/Unix -lnsl -ldb + #LDLIBS = -L/usr/local/src/db/db.1.85/PORT/sunos.5.2 -lnsl -ldb +-TSTLIBS = -L. -ldrac -lnsl +-RPCGENFLAGS = +-#RPCGENFLAGS = -C ++TSTLIBS = -L. -ldrac ++RPCGENFLAGS = -C -I + + # Man sections + MANLIB = 3 diff --git a/mail/drac/files/patch-aa b/mail/drac/files/patch-aa deleted file mode 100644 index 6ca9088fb3dc..000000000000 --- a/mail/drac/files/patch-aa +++ /dev/null @@ -1,45 +0,0 @@ ---- Makefile.orig 2003-01-12 21:45:12.000000000 +0100 -+++ Makefile 2014-04-04 23:35:46.000000000 +0200 -@@ -5,9 +5,11 @@ - - # Paths - --INSTALL = /usr/ucb/install --EBIN = /usr/local/sbin --MAN = /usr/local/man/man -+INSTALL? = install -+EBIN = ${PREFIX}/sbin -+MAN = ${PREFIX}/man/man -+ETC_DIR = ${PREFIX}/etc -+DEFS = ${DEFS} - - # OS-Dependant settings - -@@ -33,22 +35,19 @@ - # -DCIDR_KEY # keys in CIDR format - # -DTERM_KD # keys and data nul-terminated - --DEFS = -DTI_RPC -DFCNTL_LOCK -DSYSINFO -- - # Compiler flags --CC = cc -+CC? = cc - RANLIB = : --CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-4.1.25/build_unix -+CFLAGS+= $(DEFS) -g -I${PREFIX}/include -DDBFILE=\"$(ETC_DIR)/dracd.db\" -DALFILE=\"$(ETC_DIR)/dracd.allow\" - #CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-3.1.17/build_unix - #CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-2.4.14/Unix - #CFLAGS = $(DEFS) -g -I/usr/local/src/db/db.1.85/PORT/sunos.5.2/include --LDLIBS = -L/usr/local/src/db/db-4.1.25/build_unix -lnsl -ldb-4.1 -+LDLIBS = - #LDLIBS = -L/usr/local/src/db/db-3.1.17/build_unix -lnsl -ldb - #LDLIBS = -L/usr/local/src/db/db-2.4.14/Unix -lnsl -ldb - #LDLIBS = -L/usr/local/src/db/db.1.85/PORT/sunos.5.2 -lnsl -ldb --TSTLIBS = -L. -ldrac -lnsl --RPCGENFLAGS = --#RPCGENFLAGS = -C -+TSTLIBS = -L. -ldrac -+RPCGENFLAGS = -C -I - - # Man sections - MANLIB = 3 diff --git a/mail/drac/files/patch-ab b/mail/drac/files/patch-ab deleted file mode 100644 index 8868dd82e8ba..000000000000 --- a/mail/drac/files/patch-ab +++ /dev/null @@ -1,31 +0,0 @@ ---- rpc.dracd.1m.old Sun Jan 14 19:18:52 2001 -+++ rpc.dracd.1m Sun Jan 14 19:19:28 2001 -@@ -16,13 +16,13 @@ - \f4rpc.dracd\f1 - is the Dynamic Relay Authorization Control server. - It uses the Berkeley db package to maintain a relay authorization --map for sendmail, by default \f4/etc/mail/dracd.db\f1. -+map for sendmail, by default \f4%%PREFIX%%/etc/dracd.db\f1. - POP and IMAP mail servers make an RPC call to add an entry to the - authorization cache after they have authenticated each user. - The daemon, rpc.dracd, adds or updates entries in the cache, and - periodically expires old entries. - Only trusted mail servers are permitted to communicate with rpc.dracd, --as controlled by \f4/etc/mail/dracd.allow\f1. -+as controlled by \f4%%PREFIX%%/etc/dracd.allow\f1. - If this file does not exist, all local IP addresses are permitted. - .SS Allow File Format - The Allow File file consists of entries of the form: -@@ -58,10 +58,10 @@ - .SH FILES - .PD 0 - .TP 30 --.B /etc/mail/dracd.db -+.B %%PREFIX%%/etc/dracd.db - default database file - .TP --.B /etc/mail/dracd.allow -+.B %%PREFIX%%/etc/dracd.allow - default allow file. - .PD - .SH SEE ALSO diff --git a/mail/drac/files/patch-ac b/mail/drac/files/patch-ac deleted file mode 100644 index 0550d5159b65..000000000000 --- a/mail/drac/files/patch-ac +++ /dev/null @@ -1,20 +0,0 @@ ---- 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 - #include - #ifdef TI_RPC --#include - #include - #endif - #include -@@ -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; diff --git a/mail/drac/files/patch-ad b/mail/drac/files/patch-ad deleted file mode 100644 index fc9b9d64f68a..000000000000 --- a/mail/drac/files/patch-ad +++ /dev/null @@ -1,10 +0,0 @@ ---- testing.c.orig 1998-08-10 18:36:14.000000000 -0700 -+++ testing.c 2008-06-04 04:50:08.000000000 -0700 -@@ -3,6 +3,7 @@ - */ - - #include -+#include - #include - #include - #include diff --git a/mail/drac/files/patch-rpc.dracd.1m b/mail/drac/files/patch-rpc.dracd.1m new file mode 100644 index 000000000000..8868dd82e8ba --- /dev/null +++ b/mail/drac/files/patch-rpc.dracd.1m @@ -0,0 +1,31 @@ +--- rpc.dracd.1m.old Sun Jan 14 19:18:52 2001 ++++ rpc.dracd.1m Sun Jan 14 19:19:28 2001 +@@ -16,13 +16,13 @@ + \f4rpc.dracd\f1 + is the Dynamic Relay Authorization Control server. + It uses the Berkeley db package to maintain a relay authorization +-map for sendmail, by default \f4/etc/mail/dracd.db\f1. ++map for sendmail, by default \f4%%PREFIX%%/etc/dracd.db\f1. + POP and IMAP mail servers make an RPC call to add an entry to the + authorization cache after they have authenticated each user. + The daemon, rpc.dracd, adds or updates entries in the cache, and + periodically expires old entries. + Only trusted mail servers are permitted to communicate with rpc.dracd, +-as controlled by \f4/etc/mail/dracd.allow\f1. ++as controlled by \f4%%PREFIX%%/etc/dracd.allow\f1. + If this file does not exist, all local IP addresses are permitted. + .SS Allow File Format + The Allow File file consists of entries of the form: +@@ -58,10 +58,10 @@ + .SH FILES + .PD 0 + .TP 30 +-.B /etc/mail/dracd.db ++.B %%PREFIX%%/etc/dracd.db + default database file + .TP +-.B /etc/mail/dracd.allow ++.B %%PREFIX%%/etc/dracd.allow + default allow file. + .PD + .SH SEE ALSO diff --git a/mail/drac/files/patch-rpc.dracd.c b/mail/drac/files/patch-rpc.dracd.c new file mode 100644 index 000000000000..0550d5159b65 --- /dev/null +++ b/mail/drac/files/patch-rpc.dracd.c @@ -0,0 +1,20 @@ +--- 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 + #include + #ifdef TI_RPC +-#include + #include + #endif + #include +@@ -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; diff --git a/mail/drac/files/patch-testing.c b/mail/drac/files/patch-testing.c new file mode 100644 index 000000000000..fc9b9d64f68a --- /dev/null +++ b/mail/drac/files/patch-testing.c @@ -0,0 +1,10 @@ +--- testing.c.orig 1998-08-10 18:36:14.000000000 -0700 ++++ testing.c 2008-06-04 04:50:08.000000000 -0700 +@@ -3,6 +3,7 @@ + */ + + #include ++#include + #include + #include + #include diff --git a/mail/evolution/files/patch-aa b/mail/evolution/files/patch-aa deleted file mode 100644 index 3b9eb70943d4..000000000000 --- a/mail/evolution/files/patch-aa +++ /dev/null @@ -1,36 +0,0 @@ ---- configure.orig 2009-12-26 20:42:20.000000000 +0100 -+++ configure 2009-12-26 20:49:17.000000000 +0100 -@@ -4329,7 +4329,7 @@ - -Wdeclaration-after-statement - -Werror-implicit-function-declaration - -Wformat-security -Winit-self -- -Wmissing-declarations -Wmissing-include-dirs -+ -Wmissing-declarations - -Wmissing-noreturn -Wnested-externs -Wpointer-arith - -Wredundant-decls -Wundef -Wwrite-strings" - flags_supported="" -@@ -16441,6 +16441,16 @@ - CHAMPLAIN_REQUIREMENT='' - GEOCLUE_REQUIREMENT='' - ;; -+*freebsd*) -+ os_win32=no -+ NO_UNDEFINED='' -+ SOCKET_LIBS='' -+ SOEXT='.so' -+ SA_JUNK_PLUGIN=sa-junk-plugin -+ BF_JUNK_PLUGIN=bogo-junk-plugin -+ DL_LIB='' -+ SOFTOKN3_LIB='-lsoftokn3' -+ ;; - *) - os_win32=no - NO_UNDEFINED='-no-undefined' -@@ -18544,6 +18554,7 @@ - #include - #include - #include -+ #include - - #define BUFSIZE (sizeof(struct hostent)+10) - diff --git a/mail/evolution/files/patch-configure b/mail/evolution/files/patch-configure new file mode 100644 index 000000000000..3b9eb70943d4 --- /dev/null +++ b/mail/evolution/files/patch-configure @@ -0,0 +1,36 @@ +--- configure.orig 2009-12-26 20:42:20.000000000 +0100 ++++ configure 2009-12-26 20:49:17.000000000 +0100 +@@ -4329,7 +4329,7 @@ + -Wdeclaration-after-statement + -Werror-implicit-function-declaration + -Wformat-security -Winit-self +- -Wmissing-declarations -Wmissing-include-dirs ++ -Wmissing-declarations + -Wmissing-noreturn -Wnested-externs -Wpointer-arith + -Wredundant-decls -Wundef -Wwrite-strings" + flags_supported="" +@@ -16441,6 +16441,16 @@ + CHAMPLAIN_REQUIREMENT='' + GEOCLUE_REQUIREMENT='' + ;; ++*freebsd*) ++ os_win32=no ++ NO_UNDEFINED='' ++ SOCKET_LIBS='' ++ SOEXT='.so' ++ SA_JUNK_PLUGIN=sa-junk-plugin ++ BF_JUNK_PLUGIN=bogo-junk-plugin ++ DL_LIB='' ++ SOFTOKN3_LIB='-lsoftokn3' ++ ;; + *) + os_win32=no + NO_UNDEFINED='-no-undefined' +@@ -18544,6 +18554,7 @@ + #include + #include + #include ++ #include + + #define BUFSIZE (sizeof(struct hostent)+10) + diff --git a/mail/ezmlm/files/patch-Makefile b/mail/ezmlm/files/patch-Makefile new file mode 100644 index 000000000000..4dff5c8dc5f1 --- /dev/null +++ b/mail/ezmlm/files/patch-Makefile @@ -0,0 +1,11 @@ +--- Makefile.orig Sat Nov 28 22:34:51 1998 ++++ Makefile Sat Nov 28 22:35:12 1998 +@@ -610,7 +610,7 @@ + ./compile seek_set.c + + setup: \ +-it man install conf-bin conf-man ++it install conf-bin conf-man + ./install "`head -1 conf-bin`" < BIN + ./install "`head -1 conf-man`" < MAN + diff --git a/mail/ezmlm/files/patch-aa b/mail/ezmlm/files/patch-aa deleted file mode 100644 index 4dff5c8dc5f1..000000000000 --- a/mail/ezmlm/files/patch-aa +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.orig Sat Nov 28 22:34:51 1998 -+++ Makefile Sat Nov 28 22:35:12 1998 -@@ -610,7 +610,7 @@ - ./compile seek_set.c - - setup: \ --it man install conf-bin conf-man -+it install conf-bin conf-man - ./install "`head -1 conf-bin`" < BIN - ./install "`head -1 conf-man`" < MAN - diff --git a/mail/faces/files/patch-ba b/mail/faces/files/patch-ba deleted file mode 100644 index 2f32d2cee0de..000000000000 --- a/mail/faces/files/patch-ba +++ /dev/null @@ -1,17 +0,0 @@ -*** faces/Faces.ad.orig Tue Dec 18 05:11:31 2001 ---- faces/Faces.ad Sun Mar 17 21:14:05 2002 -*************** -*** 12,17 **** - faces.button1clear: false - faces.displayHostname: false - -! faces.audioSupport: false -! faces.audioCommand: play - faces.bellAudioFile: ---- 12,17 ---- - faces.button1clear: false - faces.displayHostname: false - -! faces.audioSupport: true -! faces.audioCommand: rplay - faces.bellAudioFile: diff --git a/mail/faces/files/patch-ca b/mail/faces/files/patch-ca deleted file mode 100644 index b76ad572de07..000000000000 --- a/mail/faces/files/patch-ca +++ /dev/null @@ -1,447 +0,0 @@ -*** compface/arith.c Tue Jan 15 23:58:46 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/arith.c Thu Oct 24 03:28:07 1991 -*************** -*** 17,33 **** - #include "compface.h" - - void -! RevPush(Prob *p) - { -! if (NumProbs >= PIXELS * 2 - 1) { - longjmp(comp_env, ERR_INTERNAL); -- } - ProbBuf[NumProbs++] = p; - } - -- - void -! BigPush(Prob *p) - { - static WORD tmp; - ---- 16,32 ---- - #include "compface.h" - - void -! RevPush(p) -! Prob *p; - { -! if (NumProbs >= PIXELS * 2 - 1) - longjmp(comp_env, ERR_INTERNAL); - ProbBuf[NumProbs++] = p; - } - - void -! BigPush(p) -! Prob *p; - { - static WORD tmp; - -*************** -*** 36,76 **** - BigAdd(tmp + p->p_offset); - } - -- - int -! BigPop(Prob *p) - { - static WORD tmp; -! int i; - - BigDiv(0, &tmp); - i = 0; -! while ((tmp < p->p_offset) || (tmp >= p->p_range + p->p_offset)) { - p++; - i++; - } - BigMul(p->p_range); - BigAdd(tmp - p->p_offset); -! return(i); - } - -- - #ifdef DEBUG - void -! BigPrint() /* Print a BigInt in HexaDecimal. */ - { -! int i, c, count; -! WORD *w; - - count = 0; - w = B.b_word + (i = B.b_words); -! while (i--) { - w--; - c = *((*w >> 4) + HexDigits); - putc(c, stderr); - c = *((*w & 0xf) + HexDigits); - putc(c, stderr); -! if (++count >= 36) { - putc('\\', stderr); - putc('\n', stderr); - count = 0; ---- 35,79 ---- - BigAdd(tmp + p->p_offset); - } - - int -! BigPop(p) -! register Prob *p; - { - static WORD tmp; -! register int i; - - BigDiv(0, &tmp); - i = 0; -! while ((tmp < p->p_offset) || (tmp >= p->p_range + p->p_offset)) -! { - p++; - i++; - } - BigMul(p->p_range); - BigAdd(tmp - p->p_offset); -! return i; - } - - #ifdef DEBUG -+ /* Print a BigInt in HexaDecimal -+ */ - void -! BigPrint() - { -! register int i, c, count; -! register WORD *w; - - count = 0; - w = B.b_word + (i = B.b_words); -! while (i--) -! { - w--; - c = *((*w >> 4) + HexDigits); - putc(c, stderr); - c = *((*w & 0xf) + HexDigits); - putc(c, stderr); -! if (++count >= 36) -! { - putc('\\', stderr); - putc('\n', stderr); - count = 0; -*************** -*** 78,110 **** - } - putc('\n', stderr); - } -! #endif /*DEBUG*/ -! - - /* Divide B by a storing the result in B and the remainder in the word -! * pointer to by r. - */ -- - void -! BigDiv(WORD a, WORD *r) - { -! int i; -! WORD *w; -! COMP c, d; - - a &= WORDMASK; -! if ((a == 1) || (B.b_words == 0)) { - *r = 0; - return; - } -! -! /* Treat this as a == WORDCARRY and just shift everything right a WORD */ -! -! if (a == 0) { - i = --B.b_words; - w = B.b_word; - *r = *w; -! while (i--) { - *w = *(w + 1); - w++; - } ---- 81,112 ---- - } - putc('\n', stderr); - } -! #endif - - /* Divide B by a storing the result in B and the remainder in the word -! * pointer to by r - */ - void -! BigDiv(a, r) -! register WORD a, *r; - { -! register int i; -! register WORD *w; -! register COMP c, d; - - a &= WORDMASK; -! if ((a == 1) || (B.b_words == 0)) -! { - *r = 0; - return; - } -! if (a == 0) /* treat this as a == WORDCARRY */ -! { /* and just shift everything right a WORD */ - i = --B.b_words; - w = B.b_word; - *r = *w; -! while (i--) -! { - *w = *(w + 1); - w++; - } -*************** -*** 113,154 **** - } - w = B.b_word + (i = B.b_words); - c = 0; -! while (i--) { - c <<= BITSPERWORD; -! c += (COMP) *--w; -! d = c / (COMP) a; -! c = c % (COMP) a; -! *w = (WORD) (d & WORDMASK); - } - *r = c; -! if (B.b_word[B.b_words - 1] == 0) { - B.b_words--; -- } - } - -! -! /* Multiply a by B storing the result in B. */ -! - void -! BigMul(WORD a) - { -! int i; -! WORD *w; -! COMP c; - - a &= WORDMASK; -! if ((a == 1) || (B.b_words == 0)) { - return; -! } -! -! /* Treat this as a == WORDCARRY and just shift everything left a WORD */ -! -! if (a == 0) { -! if ((i = B.b_words++) >= MAXWORDS - 1) { - longjmp(comp_env, ERR_INTERNAL); -- } - w = B.b_word + i; -! while (i--) { - *w = *(w - 1); - w--; - } ---- 115,153 ---- - } - w = B.b_word + (i = B.b_words); - c = 0; -! while (i--) -! { - c <<= BITSPERWORD; -! c += (COMP)*--w; -! d = c / (COMP)a; -! c = c % (COMP)a; -! *w = (WORD)(d & WORDMASK); - } - *r = c; -! if (B.b_word[B.b_words - 1] == 0) - B.b_words--; - } - -! /* Multiply a by B storing the result in B -! */ - void -! BigMul(a) -! register WORD a; - { -! register int i; -! register WORD *w; -! register COMP c; - - a &= WORDMASK; -! if ((a == 1) || (B.b_words == 0)) - return; -! if (a == 0) /* treat this as a == WORDCARRY */ -! { /* and just shift everything left a WORD */ -! if ((i = B.b_words++) >= MAXWORDS - 1) - longjmp(comp_env, ERR_INTERNAL); - w = B.b_word + i; -! while (i--) -! { - *w = *(w - 1); - w--; - } -*************** -*** 158,239 **** - i = B.b_words; - w = B.b_word; - c = 0; -! while (i--) { - c += (COMP)*w * (COMP)a; - *(w++) = (WORD)(c & WORDMASK); - c >>= BITSPERWORD; - } -! if (c) { -! if (B.b_words++ >= MAXWORDS) { - longjmp(comp_env, ERR_INTERNAL); -- } - *w = (COMP)(c & WORDMASK); - } - } - -! -! /* Subtract a from B storing the result in B. */ -! - void -! BigSub(WORD a) - { -! int i; -! WORD *w; -! COMP c; - - a &= WORDMASK; -! if (a == 0) { - return; -- } - i = 1; - w = B.b_word; -! c = (COMP) *w - (COMP) a; -! *w = (WORD) (c & WORDMASK); -! while (c & WORDCARRY) { -! if (i >= B.b_words) { - longjmp(comp_env, ERR_INTERNAL); -! } -! c = (COMP) *++w - 1; -! *w = (WORD) (c & WORDMASK); - i++; - } -! if ((i == B.b_words) && (*w == 0) && (i > 0)) { - B.b_words--; -- } - } - -! -! /* Add to a to B storing the result in B. */ -! - void -! BigAdd(WORD a) - { -! int i; -! WORD *w; -! COMP c; - - a &= WORDMASK; -! if (a == 0) { - return; -- } - i = 0; - w = B.b_word; - c = a; -! while ((i < B.b_words) && c) { -! c += (COMP) *w; -! *w++ = (WORD) (c & WORDMASK); - c >>= BITSPERWORD; - i++; - } -! if ((i == B.b_words) && c) { -! if (B.b_words++ >= MAXWORDS) { - longjmp(comp_env, ERR_INTERNAL); -! } -! *w = (COMP) (c & WORDMASK); - } - } - -- - void - BigClear() - { ---- 157,238 ---- - i = B.b_words; - w = B.b_word; - c = 0; -! while (i--) -! { - c += (COMP)*w * (COMP)a; - *(w++) = (WORD)(c & WORDMASK); - c >>= BITSPERWORD; - } -! if (c) -! { -! if (B.b_words++ >= MAXWORDS) - longjmp(comp_env, ERR_INTERNAL); - *w = (COMP)(c & WORDMASK); - } - } - -! #if 0 -! /* Subtract a from B storing the result in B -! */ - void -! BigSub(a) -! WORD a; - { -! register int i; -! register WORD *w; -! register COMP c; - - a &= WORDMASK; -! if (a == 0) - return; - i = 1; - w = B.b_word; -! c = (COMP)*w - (COMP)a; -! *w = (WORD)(c & WORDMASK); -! while (c & WORDCARRY) -! { -! if (i >= B.b_words) - longjmp(comp_env, ERR_INTERNAL); -! c = (COMP)*++w - 1; -! *w = (WORD)(c & WORDMASK); - i++; - } -! if ((i == B.b_words) && (*w == 0) && (i > 0)) - B.b_words--; - } -+ #endif - -! /* Add to a to B storing the result in B -! */ - void -! BigAdd(a) -! WORD a; - { -! register int i; -! register WORD *w; -! register COMP c; - - a &= WORDMASK; -! if (a == 0) - return; - i = 0; - w = B.b_word; - c = a; -! while ((i < B.b_words) && c) -! { -! c += (COMP)*w; -! *w++ = (WORD)(c & WORDMASK); - c >>= BITSPERWORD; - i++; - } -! if ((i == B.b_words) && c) -! { -! if (B.b_words++ >= MAXWORDS) - longjmp(comp_env, ERR_INTERNAL); -! *w = (COMP)(c & WORDMASK); - } - } - - void - BigClear() - { diff --git a/mail/faces/files/patch-cb b/mail/faces/files/patch-cb deleted file mode 100644 index 31f64942af3b..000000000000 --- a/mail/faces/files/patch-cb +++ /dev/null @@ -1,292 +0,0 @@ -*** compface/cmain.c Thu Feb 21 16:42:54 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/cmain.c Thu Oct 24 03:28:07 1991 -*************** -*** 13,89 **** - * to me, then an attempt will be made to fix them. - */ - -- #include -- #include - #include - #include "compface.h" - -! #define STRCAT (void) strcat -! #define STRCPY (void) strcpy -! #define WRITE (void) write -! -! /* The buffer is longer than needed to handle sparse input formats */ -! - #define FACEBUFLEN 2048 - char fbuf[FACEBUFLEN]; - - /* IO file descriptors and their names */ -- - int infile = 0; - char *inname = ""; - int outfile = 1; - char *outname = ""; - -! char *cmdname; /* Basename of executable */ - -! /* Error handling definitions follow */ - - extern int errno, sys_nerr; - extern char *sys_errlist[]; - - #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") -! #define INITERR(s) { \ -! STRCPY(fbuf, cmdname); \ -! STRCAT(fbuf, ": "); \ -! STRCAT(fbuf, (s));\ -! } -! #define ADDERR(s) STRCAT(fbuf, (s)); -! #define ERROR { \ -! STRCAT(fbuf, "\n"); \ -! WRITE(2, fbuf, strlen(fbuf)); \ -! exit(1); \ -! } -! #define INITWARN(s) { \ -! STRCPY(fbuf, cmdname); \ -! STRCAT(fbuf, ": (warning) "); \ -! STRCAT(fbuf, (s)); \ -! } -! #define ADDWARN(s) STRCAT(fbuf, (s)); -! #define WARN { \ -! STRCAT(fbuf, "\n"); \ -! WRITE(2, fbuf, strlen(fbuf)); \ -! } - - int -! main(int argc, char *argv[]) - { - cmdname = *argv; -! while (**argv) { -! if (*((*argv)++) == '/') { -! cmdname = *argv; /* Find the command's basename */ -! } -! } - -! if (argc > 3) { - INITERR("usage: ") - ADDERR(cmdname) - ADDERR(" [infile [outfile]]") - ERROR - } - -! if ((argc > 1) && strcmp(*++argv, "-")) { - inname = *argv; -! if ((infile = open(inname, O_RDONLY)) == -1) { - INITERR(inname) - ADDERR(": ") - ADDERR(ERR) ---- 15,78 ---- - * to me, then an attempt will be made to fix them. - */ - - #include - #include "compface.h" - -! /* the buffer is longer than needed to handle sparse input formats */ - #define FACEBUFLEN 2048 - char fbuf[FACEBUFLEN]; - - /* IO file descriptors and their names */ - int infile = 0; - char *inname = ""; - int outfile = 1; - char *outname = ""; - -! /* basename of executable */ -! char *cmdname; - -! /* error handling definitions follow */ - - extern int errno, sys_nerr; - extern char *sys_errlist[]; - -+ extern void exit P((int)) ; -+ - #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") -! #define INITERR(s) {(void)strcpy(fbuf, cmdname); (void)strcat(fbuf, ": ");\ -! (void)strcat(fbuf, (s));} -! #define ADDERR(s) (void)strcat(fbuf, (s)); -! #define ERROR {(void)strcat(fbuf, "\n");\ -! (void)write(2, fbuf, strlen(fbuf)); exit(1);} -! #define INITWARN(s) {(void)strcpy(fbuf, cmdname);\ -! (void)strcat(fbuf, ": (warning) ");\ -! (void)strcat(fbuf, (s));} -! #define ADDWARN(s) (void)strcat(fbuf, (s)); -! #define WARN {(void)strcat(fbuf, "\n"); (void)write(2, fbuf, strlen(fbuf));} - - int -! main(argc, argv) -! int argc; -! char *argv[]; - { - cmdname = *argv; -! while (**argv) -! if (*((*argv)++) == '/') -! cmdname = *argv; /* find the command's basename */ - -! if (argc > 3) -! { - INITERR("usage: ") - ADDERR(cmdname) - ADDERR(" [infile [outfile]]") - ERROR - } - -! if ((argc > 1) && strcmp(*++argv, "-")) -! { - inname = *argv; -! if ((infile = open(inname, O_RDONLY)) == -1) -! { - INITERR(inname) - ADDERR(": ") - ADDERR(ERR) -*************** -*** 91,100 **** - } - } - -! if (argc > 2) { - outname = *++argv; -! if ((outfile = open(outname, O_WRONLY | O_CREAT | -! O_TRUNC, 0644)) == -1) { - INITERR(outname) - ADDERR(": ") - ADDERR(ERR) ---- 80,90 ---- - } - } - -! if (argc > 2) -! { - outname = *++argv; -! if ((outfile = open(outname, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1) -! { - INITERR(outname) - ADDERR(": ") - ADDERR(ERR) -*************** -*** 103,109 **** - } - - (void) ReadBuf(); -! switch (compface(fbuf)) { - case -2 : INITERR("internal error") - ERROR - case -1 : INITERR(inname) ---- 93,100 ---- - } - - (void) ReadBuf(); -! switch (compface(fbuf)) -! { - case -2 : INITERR("internal error") - ERROR - case -1 : INITERR(inname) -*************** -*** 123,135 **** - int - WriteBuf() - { -! char *s, *t; -! int len; - - s = fbuf; - t = s + strlen(s); -! while (s < t) { -! if ((len = write(outfile, s, t - s)) == -1) { - INITERR(outname) - ADDERR(": ") - ADDERR(ERR) ---- 114,128 ---- - int - WriteBuf() - { -! register char *s, *t; -! register int len; - - s = fbuf; - t = s + strlen(s); -! while (s < t) -! { -! if ((len = write(outfile, s, t - s)) == -1) -! { - INITERR(outname) - ADDERR(": ") - ADDERR(ERR) -*************** -*** 137,163 **** - } - s += len; - } -! return(0); - } - - - int - ReadBuf() - { -! int count, len; -! char *t; - - count = 0; - t = fbuf; -! while ((len = read(infile, t, FACEBUFLEN - count))) { -! if (len == -1) { - INITERR(inname) - ADDERR(": ") - ADDERR(ERR) - ERROR - } - t += len; -! if ((count += len) >= FACEBUFLEN) { - INITWARN(inname) - ADDWARN(" exceeds internal buffer size. Data may be lost") - WARN ---- 130,159 ---- - } - s += len; - } -! return 0; - } - - - int - ReadBuf() - { -! register int count, len; -! register char *t; - - count = 0; - t = fbuf; -! while (len = read(infile, t, FACEBUFLEN - count)) -! { -! if (len == -1) -! { - INITERR(inname) - ADDERR(": ") - ADDERR(ERR) - ERROR - } - t += len; -! if ((count += len) >= FACEBUFLEN) -! { - INITWARN(inname) - ADDWARN(" exceeds internal buffer size. Data may be lost") - WARN -*************** -*** 165,169 **** - } - } - *t = '\0'; -! return(count); - } ---- 161,165 ---- - } - } - *t = '\0'; -! return count; - } diff --git a/mail/faces/files/patch-cc b/mail/faces/files/patch-cc deleted file mode 100644 index 9f2a15e6ea4d..000000000000 --- a/mail/faces/files/patch-cc +++ /dev/null @@ -1,17 +0,0 @@ -*** compface/compface.1 Tue Jan 15 23:58:46 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.1 Sun Jan 19 19:35:35 2003 -*************** -*** 56,61 **** ---- 58,69 ---- - .I compface - averages less than 200 characters. - The average number of output lines is three. -+ .SH OPTIONS -+ .TP 12 -+ .B \-X -+ The same as -+ .I uncompface -+ | ikon2xbm. Usefull for exmh! - .SH DIAGNOSTICS - Exit status is normally 0. - Possible errors include IO errors when opening, reading or writing diff --git a/mail/faces/files/patch-cd b/mail/faces/files/patch-cd deleted file mode 100644 index 177e6ed7d9db..000000000000 --- a/mail/faces/files/patch-cd +++ /dev/null @@ -1,40 +0,0 @@ -*** compface/compface.c Thu Feb 21 16:42:54 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.c Wed Jun 19 08:29:12 1991 -*************** -*** 14,29 **** - * to me, then an attempt will be made to fix them. - */ - - #include "compface.h" -- #include "vars.h" - - int -! compface(char *fbuf) - { -! if (!(status = setjmp(comp_env))) { - ReadFace(fbuf); - GenFace(); - CompAll(fbuf); - } -! return(status); - } ---- 13,31 ---- - * to me, then an attempt will be made to fix them. - */ - -+ #define MAIN -+ - #include "compface.h" - - int -! compface(fbuf) -! char *fbuf; - { -! if (!(status = setjmp(comp_env))) -! { - ReadFace(fbuf); - GenFace(); - CompAll(fbuf); - } -! return status; - } diff --git a/mail/faces/files/patch-ce b/mail/faces/files/patch-ce deleted file mode 100644 index 41db8268a5db..000000000000 --- a/mail/faces/files/patch-ce +++ /dev/null @@ -1,306 +0,0 @@ -*** compface/compface.h Thu Feb 21 16:42:54 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.h Thu Sep 5 07:24:42 1991 -*************** -*** 14,45 **** - * to me, then an attempt will be made to fix them. - */ - - #include - #include - #include - -! /* Need to know how many bits per hexadecimal digit for io */ - #define BITSPERDIG 4 -! extern char HexDigits[]; - -! /* Define the face size - 48x48x1 */ - #define WIDTH 48 - #define HEIGHT WIDTH - -! /* Total number of pixels and digits */ - #define PIXELS (WIDTH * HEIGHT) - #define DIGITS (PIXELS / BITSPERDIG) - -! extern char F[PIXELS]; - -! /* Output formatting word lengths and line lengths */ - #define DIGSPERWORD 4 - #define WORDSPERLINE (WIDTH / DIGSPERWORD / BITSPERDIG) - -! /* Compressed output uses the full range of printable characters. - * in ascii these are in a contiguous block so we just need to know -! * the first and last. The total number of printables is needed too. -! */ - #define FIRSTPRINT '!' - #define LASTPRINT '~' - #define NUMPRINTS (LASTPRINT - FIRSTPRINT + 1) ---- 13,64 ---- - * to me, then an attempt will be made to fix them. - */ - -+ #if defined(SYSV32) || defined(hpux) - #include -+ #else -+ #include -+ #endif /* SYSV32 || hpux */ - #include - #include - -! /* For all function declarations, if ANSI then use a prototype. */ -! -! #if defined(__STDC__) -! #define P(args) args -! #else /* ! __STDC__ */ -! #define P(args) () -! #endif /* STDC */ -! -! #ifdef MAIN -! #define EXTERN -! #define INIT(x) = x -! #else -! #define EXTERN extern -! #define INIT(x) -! #endif -! -! /* need to know how many bits per hexadecimal digit for io */ - #define BITSPERDIG 4 -! EXTERN char HexDigits[] INIT("0123456789ABCDEF"); - -! /* define the face size - 48x48x1 */ - #define WIDTH 48 - #define HEIGHT WIDTH - -! /* total number of pixels and digits */ - #define PIXELS (WIDTH * HEIGHT) - #define DIGITS (PIXELS / BITSPERDIG) - -! /* internal face representation - 1 char per pixel is faster */ -! EXTERN char F[PIXELS]; - -! /* output formatting word lengths and line lengths */ - #define DIGSPERWORD 4 - #define WORDSPERLINE (WIDTH / DIGSPERWORD / BITSPERDIG) - -! /* compressed output uses the full range of printable characters. - * in ascii these are in a contiguous block so we just need to know -! * the first and last. The total number of printables is needed too */ - #define FIRSTPRINT '!' - #define LASTPRINT '~' - #define NUMPRINTS (LASTPRINT - FIRSTPRINT + 1) -*************** -*** 49,56 **** - - /* Portable, very large unsigned integer arithmetic is needed. - * Implementation uses arrays of WORDs. COMPs must have at least -! * twice as many bits as WORDs to handle intermediate results. -! */ - #define WORD unsigned char - #define COMP unsigned long - #define BITSPERWORD 8 ---- 68,74 ---- - - /* Portable, very large unsigned integer arithmetic is needed. - * Implementation uses arrays of WORDs. COMPs must have at least -! * twice as many bits as WORDs to handle intermediate results */ - #define WORD unsigned char - #define COMP unsigned long - #define BITSPERWORD 8 -*************** -*** 64,76 **** - WORD b_word[MAXWORDS]; - } BigInt; - -! extern BigInt B; - - /* This is the guess the next pixel table. Normally there are 12 neighbour - * pixels used to give 1<<12 cases but in the upper left corner lesser -! * numbers of neighbours are available, leading to 6231 different guesses. -! */ -! typedef struct guesses { - char g_00[1<<12]; - char g_01[1<<7]; - char g_02[1<<2]; ---- 82,94 ---- - WORD b_word[MAXWORDS]; - } BigInt; - -! EXTERN BigInt B; - - /* This is the guess the next pixel table. Normally there are 12 neighbour - * pixels used to give 1<<12 cases but in the upper left corner lesser -! * numbers of neighbours are available, leading to 6231 different guesses */ -! typedef struct guesses -! { - char g_00[1<<12]; - char g_01[1<<7]; - char g_02[1<<2]; -*************** -*** 88,155 **** - char g_42[1<<2]; - } Guesses; - -! extern Guesses G; - - /* Data of varying probabilities are encoded by a value in the range 0 - 255. - * The probability of the data determines the range of possible encodings. -! * Offset gives the first possible encoding of the range. -! */ -! typedef struct prob { - WORD p_range; - WORD p_offset; - } Prob; - -! extern Prob *ProbBuf[PIXELS * 2]; -! extern int NumProbs; - - /* Each face is encoded using 9 octrees of 16x16 each. Each level of the - * trees has varying probabilities of being white, grey or black. -! * The table below is based on sampling many faces. -! */ - - #define BLACK 0 - #define GREY 1 - #define WHITE 2 - -! extern Prob levels[4][3]; -! extern Prob freqs[16]; - - #define ERR_OK 0 /* successful completion */ - #define ERR_EXCESS 1 /* completed OK but some input was ignored */ - #define ERR_INSUFF -1 /* insufficient input. Bad face format? */ - #define ERR_INTERNAL -2 /* Arithmetic overflow or buffer overflow */ - -! extern int status; - -! extern jmp_buf comp_env; - -! int AllBlack(char *, int, int); -! int AllWhite(char *, int, int); -! int BigPop(Prob *); -! int compface(char *); -! int main(int, char *[]); -! int ReadBuf(); -! int Same(char *, int, int); -! int uncompface(char *); -! int WriteBuf(); -! -! void BigAdd(WORD); -! void BigClear(); -! void BigDiv(WORD, WORD *); -! void BigMul(WORD); -! void BigPrint(); -! void BigPush(Prob *); -! void BigRead(char *); -! void BigSub(WORD); -! void BigWrite(char *); -! void CompAll(char *); -! void Compress(char *, int, int, int); -! void GenFace(); -! void PopGreys(char *, int, int); -! void PushGreys(char *, int, int); -! void ReadFace(char *); -! void RevPush(Prob *); -! void UnCompAll(char *); -! void UnCompress(char *, int, int, int); -! void UnGenFace(); -! void WriteFace(char *); ---- 106,204 ---- - char g_42[1<<2]; - } Guesses; - -! /* data.h was established by sampling over 1000 faces and icons */ -! EXTERN Guesses G -! #ifdef MAIN -! = -! #include "data.h" -! #endif -! ; - - /* Data of varying probabilities are encoded by a value in the range 0 - 255. - * The probability of the data determines the range of possible encodings. -! * Offset gives the first possible encoding of the range */ -! typedef struct prob -! { - WORD p_range; - WORD p_offset; - } Prob; - -! /* A stack of probability values */ -! EXTERN Prob *ProbBuf[PIXELS * 2]; -! EXTERN int NumProbs INIT(0); - - /* Each face is encoded using 9 octrees of 16x16 each. Each level of the - * trees has varying probabilities of being white, grey or black. -! * The table below is based on sampling many faces */ - - #define BLACK 0 - #define GREY 1 - #define WHITE 2 - -! EXTERN Prob levels[4][3] -! #ifdef MAIN -! = -! { -! {{1, 255}, {251, 0}, {4, 251}}, /* Top of tree almost always grey */ -! {{1, 255}, {200, 0}, {55, 200}}, -! {{33, 223}, {159, 0}, {64, 159}}, -! {{131, 0}, {0, 0}, {125, 131}} /* Grey disallowed at bottom */ -! } -! #endif -! ; -! -! /* At the bottom of the octree 2x2 elements are considered black if any -! * pixel is black. The probabilities below give the distribution of the -! * 16 possible 2x2 patterns. All white is not really a possibility and -! * has a probability range of zero. Again, experimentally derived data */ -! EXTERN Prob freqs[16] -! #ifdef MAIN -! = -! { -! {0, 0}, {38, 0}, {38, 38}, {13, 152}, -! {38, 76}, {13, 165}, {13, 178}, {6, 230}, -! {38, 114}, {13, 191}, {13, 204}, {6, 236}, -! {13, 217}, {6, 242}, {5, 248}, {3, 253} -! } -! #endif -! ; - - #define ERR_OK 0 /* successful completion */ - #define ERR_EXCESS 1 /* completed OK but some input was ignored */ - #define ERR_INSUFF -1 /* insufficient input. Bad face format? */ - #define ERR_INTERNAL -2 /* Arithmetic overflow or buffer overflow */ - -! EXTERN int status; - -! EXTERN jmp_buf comp_env; - -! int AllBlack P((char *, int, int)) ; -! int AllWhite P((char *, int, int)) ; -! int BigPop P((Prob *)) ; -! int compface P((char *)) ; -! int main P((int, char *[])) ; -! int ReadBuf P(()) ; -! int Same P((char *, int, int)) ; -! int uncompface P((char *)) ; -! int WriteBuf P(()) ; -! -! void BigAdd P((unsigned char)) ; -! void BigClear P(()) ; -! void BigDiv P((unsigned char, unsigned char *)) ; -! void BigMul P((unsigned char)) ; -! void BigPrint P(()) ; -! void BigPush P((Prob *)) ; -! void BigRead P((char *)) ; -! void BigSub P((unsigned int)) ; -! void BigWrite P((char *)) ; -! void CompAll P((char *)) ; -! void Compress P((char *, int, int, int)) ; -! void GenFace P(()) ; -! void PopGreys P((char *, int, int)) ; -! void PushGreys P((char *, int, int)) ; -! void ReadFace P((char *)) ; -! void RevPush P((Prob *)) ; -! void UnCompAll P((char *)) ; -! void UnCompress P((char *, int, int, int)) ; -! void UnGenFace P(()) ; -! void WriteFace P((char *)) ; diff --git a/mail/faces/files/patch-cf b/mail/faces/files/patch-cf deleted file mode 100644 index 1b69b9560297..000000000000 --- a/mail/faces/files/patch-cf +++ /dev/null @@ -1,314 +0,0 @@ -*** compface/compress.c Tue Jan 15 23:58:46 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compress.c Wed Jun 19 08:29:13 1991 -*************** -*** 17,113 **** - #include "compface.h" - - int -! Same(char *f, int wid, int hei) - { -! char val, *row; -! int x; - - val = *f; -! while (hei--) { - row = f; - x = wid; -! while (x--) { -! if (*(row++) != val) { - return(0); -- } -- } - f += WIDTH; - } -! return(1); - } - -- - int -! AllBlack(char *f, int wid, int hei) - { -! if (wid > 3) { - wid /= 2; - hei /= 2; -! return(AllBlack(f, wid, hei) && AllBlack(f + wid, wid, hei) && - AllBlack(f + WIDTH * hei, wid, hei) && - AllBlack(f + WIDTH * hei + wid, wid, hei)); -- } else { -- return(*f || *(f + 1) || *(f + WIDTH) || *(f + WIDTH + 1)); - } - } - -- - int -! AllWhite(char *f, int wid, int hei) - { -! return((*f == 0) && Same(f, wid, hei)); - } - -- - void -! PopGreys(char *f, int wid, int hei) - { -! if (wid > 3) { - wid /= 2; - hei /= 2; - PopGreys(f, wid, hei); - PopGreys(f + wid, wid, hei); - PopGreys(f + WIDTH * hei, wid, hei); - PopGreys(f + WIDTH * hei + wid, wid, hei); -! } else { - wid = BigPop(freqs); -! if (wid & 1) { - *f = 1; -! } -! if (wid & 2) { - *(f + 1) = 1; -! } -! if (wid & 4) { - *(f + WIDTH) = 1; -! } -! if (wid & 8) { - *(f + WIDTH + 1) = 1; - } -- } - } - -- - void -! PushGreys(char *f, int wid, int hei) - { -! if (wid > 3) { - wid /= 2; - hei /= 2; - PushGreys(f, wid, hei); - PushGreys(f + wid, wid, hei); - PushGreys(f + WIDTH * hei, wid, hei); - PushGreys(f + WIDTH * hei + wid, wid, hei); -- } else { -- RevPush(freqs + *f + 2 * *(f + 1) + -- 4 * *(f + WIDTH) + 8 * *(f + WIDTH + 1)); - } - } - -- - void -! UnCompress(char *f, int wid, int hei, int lev) - { -! switch (BigPop(&levels[lev][0])) { - case WHITE : - return; - case BLACK : ---- 16,120 ---- - #include "compface.h" - - int -! Same(f, wid, hei) -! register char *f; -! register int wid, hei; - { -! register char val, *row; -! register int x; - - val = *f; -! while (hei--) -! { - row = f; - x = wid; -! while (x--) -! if (*(row++) != val) - return(0); - f += WIDTH; - } -! return 1; - } - - int -! AllBlack(f, wid, hei) -! char *f; -! int wid, hei; - { -! if (wid > 3) -! { - wid /= 2; - hei /= 2; -! return (AllBlack(f, wid, hei) && AllBlack(f + wid, wid, hei) && - AllBlack(f + WIDTH * hei, wid, hei) && - AllBlack(f + WIDTH * hei + wid, wid, hei)); - } -+ else -+ return (*f || *(f + 1) || *(f + WIDTH) || *(f + WIDTH + 1)); - } - - int -! AllWhite(f, wid, hei) -! char *f; -! int wid, hei; - { -! return ((*f == 0) && Same(f, wid, hei)); - } - - void -! PopGreys(f, wid, hei) -! char *f; -! int wid, hei; - { -! if (wid > 3) -! { - wid /= 2; - hei /= 2; - PopGreys(f, wid, hei); - PopGreys(f + wid, wid, hei); - PopGreys(f + WIDTH * hei, wid, hei); - PopGreys(f + WIDTH * hei + wid, wid, hei); -! } -! else -! { - wid = BigPop(freqs); -! if (wid & 1) - *f = 1; -! if (wid & 2) - *(f + 1) = 1; -! if (wid & 4) - *(f + WIDTH) = 1; -! if (wid & 8) - *(f + WIDTH + 1) = 1; - } - } - - void -! PushGreys(f, wid, hei) -! char *f; -! int wid, hei; - { -! if (wid > 3) -! { - wid /= 2; - hei /= 2; - PushGreys(f, wid, hei); - PushGreys(f + wid, wid, hei); - PushGreys(f + WIDTH * hei, wid, hei); - PushGreys(f + WIDTH * hei + wid, wid, hei); - } -+ else -+ RevPush(freqs + *f + 2 * *(f + 1) + 4 * *(f + WIDTH) + -+ 8 * *(f + WIDTH + 1)); - } - - void -! UnCompress(f, wid, hei, lev) -! register char *f; -! register int wid, hei, lev; - { -! switch (BigPop(&levels[lev][0])) -! { - case WHITE : - return; - case BLACK : -*************** -*** 125,139 **** - } - } - -- - void -! Compress(char *f, int wid, int hei, int lev) - { -! if (AllWhite(f, wid, hei)) { - RevPush(&levels[lev][WHITE]); - return; - } -! if (AllBlack(f, wid, hei)) { - RevPush(&levels[lev][BLACK]); - PushGreys(f, wid, hei); - return; ---- 132,149 ---- - } - } - - void -! Compress(f, wid, hei, lev) -! register char *f; -! register int wid, hei, lev; - { -! if (AllWhite(f, wid, hei)) -! { - RevPush(&levels[lev][WHITE]); - return; - } -! if (AllBlack(f, wid, hei)) -! { - RevPush(&levels[lev][BLACK]); - PushGreys(f, wid, hei); - return; -*************** -*** 149,164 **** - } - - void -! UnCompAll(char *fbuf) - { -! char *p; - - BigClear(); - BigRead(fbuf); - p = F; -! while (p < F + PIXELS) { - *(p++) = 0; -- } - UnCompress(F, 16, 16, 0); - UnCompress(F + 16, 16, 16, 0); - UnCompress(F + 32, 16, 16, 0); ---- 159,174 ---- - } - - void -! UnCompAll(fbuf) -! char *fbuf; - { -! register char *p; - - BigClear(); - BigRead(fbuf); - p = F; -! while (p < F + PIXELS) - *(p++) = 0; - UnCompress(F, 16, 16, 0); - UnCompress(F + 16, 16, 16, 0); - UnCompress(F + 32, 16, 16, 0); -*************** -*** 171,177 **** - } - - void -! CompAll(char *fbuf) - { - Compress(F, 16, 16, 0); - Compress(F + 16, 16, 16, 0); ---- 181,188 ---- - } - - void -! CompAll(fbuf) -! char *fbuf; - { - Compress(F, 16, 16, 0); - Compress(F + 16, 16, 16, 0); -*************** -*** 183,190 **** - Compress(F + WIDTH * 32 + 16, 16, 16, 0); - Compress(F + WIDTH * 32 + 32, 16, 16, 0); - BigClear(); -! while (NumProbs > 0) { - BigPush(ProbBuf[--NumProbs]); -- } - BigWrite(fbuf); - } ---- 194,200 ---- - Compress(F + WIDTH * 32 + 16, 16, 16, 0); - Compress(F + WIDTH * 32 + 32, 16, 16, 0); - BigClear(); -! while (NumProbs > 0) - BigPush(ProbBuf[--NumProbs]); - BigWrite(fbuf); - } diff --git a/mail/faces/files/patch-ch b/mail/faces/files/patch-ch deleted file mode 100644 index 836f5a14a3ee..000000000000 --- a/mail/faces/files/patch-ch +++ /dev/null @@ -1,314 +0,0 @@ -*** compface/file.c Tue Jan 15 23:58:46 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/file.c Sun Jan 19 19:35:35 2003 -*************** -*** 16,147 **** - - #include "compface.h" - - void -! BigRead(char *fbuf) - { -! int c; - -! while (*fbuf != '\0') { - c = *(fbuf++); -! if ((c < FIRSTPRINT) || (c > LASTPRINT)) { - continue; -- } - BigMul(NUMPRINTS); - BigAdd((WORD)(c - FIRSTPRINT)); - } - } - -- - void -! BigWrite(char *fbuf) - { - static WORD tmp; - static char buf[DIGITS]; -! char *s; -! int i; - - s = buf; -! while (B.b_words > 0) { - BigDiv(NUMPRINTS, &tmp); - *(s++) = tmp + FIRSTPRINT; - } -! i = 7; /* Leave room for the field name on the first line */ - *(fbuf++) = ' '; -! while (s-- > buf) { -! if (i == 0) { - *(fbuf++) = ' '; -- } - *(fbuf++) = *s; -! if (++i >= MAXLINELEN) { - *(fbuf++) = '\n'; - i = 0; - } - } -! if (i > 0) { - *(fbuf++) = '\n'; -- } - *(fbuf++) = '\0'; - } - -- - void -! ReadFace(char *fbuf) - { -! int c, i; -! char *s, *t; - - t = s = fbuf; -! for (i = strlen(s); i > 0; i--) { -! c = (int) *(s++); -! if ((c >= '0') && (c <= '9')) { -! if (t >= fbuf + DIGITS) { - status = ERR_EXCESS; - break; - } - *(t++) = c - '0'; -! } else if ((c >= 'A') && (c <= 'F')) { -! if (t >= fbuf + DIGITS) { - status = ERR_EXCESS; - break; - } - *(t++) = c - 'A' + 10; -! } else if ((c >= 'a') && (c <= 'f')) { -! if (t >= fbuf + DIGITS) { - status = ERR_EXCESS; - break; - } - *(t++) = c - 'a' + 10; -- } else if (((c == 'x') || (c == 'X')) && (t > fbuf) && (*(t-1) == 0)) { -- t--; - } - } -! if (t < fbuf + DIGITS) { - longjmp(comp_env, ERR_INSUFF); -- } - s = fbuf; - t = F; - c = 1 << (BITSPERDIG - 1); -! while (t < F + PIXELS) { - *(t++) = (*s & c) ? 1 : 0; -! if ((c >>= 1) == 0) { - s++; - c = 1 << (BITSPERDIG - 1); - } - } - } - -- - void -! WriteFace(char *fbuf) - { -! char *s, *t; -! int i, bits, digits, words; - - s = F; - t = fbuf; - bits = digits = words = i = 0; -! while (s < F + PIXELS) { -! if ((bits == 0) && (digits == 0)) { - *(t++) = '0'; - *(t++) = 'x'; - } -! if (*(s++)) { - i = i * 2 + 1; -! } else { - i *= 2; - } -! if (++bits == BITSPERDIG) { -! *(t++) = *(i + HexDigits); - bits = i = 0; -! if (++digits == DIGSPERWORD) { - *(t++) = ','; - digits = 0; -! if (++words == WORDSPERLINE) { - *(t++) = '\n'; - words = 0; - } - } - } - } - *(t++) = '\0'; - } ---- 15,191 ---- - - #include "compface.h" - -+ int xbitmap=0; -+ - void -! BigRead(fbuf) -! register char *fbuf; - { -! register int c; - -! while (*fbuf != '\0') -! { - c = *(fbuf++); -! if ((c < FIRSTPRINT) || (c > LASTPRINT)) - continue; - BigMul(NUMPRINTS); - BigAdd((WORD)(c - FIRSTPRINT)); - } - } - - void -! BigWrite(fbuf) -! register char *fbuf; - { - static WORD tmp; - static char buf[DIGITS]; -! register char *s; -! register int i; - - s = buf; -! while (B.b_words > 0) -! { - BigDiv(NUMPRINTS, &tmp); - *(s++) = tmp + FIRSTPRINT; - } -! i = 7; /* leave room for the field name on the first line */ - *(fbuf++) = ' '; -! while (s-- > buf) -! { -! if (i == 0) - *(fbuf++) = ' '; - *(fbuf++) = *s; -! if (++i >= MAXLINELEN) -! { - *(fbuf++) = '\n'; - i = 0; - } - } -! if (i > 0) - *(fbuf++) = '\n'; - *(fbuf++) = '\0'; - } - - void -! ReadFace(fbuf) -! char *fbuf; - { -! register int c, i; -! register char *s, *t; - - t = s = fbuf; -! for(i = strlen(s); i > 0; i--) -! { -! c = (int)*(s++); -! if ((c >= '0') && (c <= '9')) -! { -! if (t >= fbuf + DIGITS) -! { - status = ERR_EXCESS; - break; - } - *(t++) = c - '0'; -! } -! else if ((c >= 'A') && (c <= 'F')) -! { -! if (t >= fbuf + DIGITS) -! { - status = ERR_EXCESS; - break; - } - *(t++) = c - 'A' + 10; -! } -! else if ((c >= 'a') && (c <= 'f')) -! { -! if (t >= fbuf + DIGITS) -! { - status = ERR_EXCESS; - break; - } - *(t++) = c - 'a' + 10; - } -+ else if (((c == 'x') || (c == 'X')) && (t > fbuf) && (*(t-1) == 0)) -+ t--; - } -! if (t < fbuf + DIGITS) - longjmp(comp_env, ERR_INSUFF); - s = fbuf; - t = F; - c = 1 << (BITSPERDIG - 1); -! while (t < F + PIXELS) -! { - *(t++) = (*s & c) ? 1 : 0; -! if ((c >>= 1) == 0) -! { - s++; - c = 1 << (BITSPERDIG - 1); - } - } - } - - void -! WriteFace(fbuf) -! char *fbuf; - { -! register char *s, *t; -! register int i, bits, digits, words; -! extern int xbitmap; -! int digsperword = DIGSPERWORD; -! int wordsperline = WORDSPERLINE; - - s = F; - t = fbuf; - bits = digits = words = i = 0; -! if (xbitmap) { -! sprintf(t,"#define noname_width 48\n#define noname_height 48\nstatic char noname_bits[] = {\n "); -! while (*t) t++; -! digsperword = 2; -! wordsperline = 15; -! } -! while (s < F + PIXELS) -! { -! if ((bits == 0) && (digits == 0)) -! { - *(t++) = '0'; - *(t++) = 'x'; - } -! if (xbitmap) { -! if (*(s++)) -! i = (i >> 1) | 0x8; -! else -! i >>= 1; -! } -! else { -! if (*(s++)) - i = i * 2 + 1; -! else - i *= 2; - } -! if (++bits == BITSPERDIG) -! { -! if (xbitmap) { -! t++; -! t[-(digits & 1) * 2] = *(i + HexDigits); -! } -! else *(t++) = *(i + HexDigits); - bits = i = 0; -! if (++digits == digsperword) -! { -! if (xbitmap && (s >= F + PIXELS)) break; - *(t++) = ','; - digits = 0; -! if (++words == wordsperline) -! { - *(t++) = '\n'; -+ if (xbitmap) *(t++) = ' '; - words = 0; - } - } - } - } -+ if (xbitmap) { -+ sprintf(t, "}\n"); -+ while (*t) t++; -+ } - *(t++) = '\0'; - } diff --git a/mail/faces/files/patch-ci b/mail/faces/files/patch-ci deleted file mode 100644 index 9f1e78ef357c..000000000000 --- a/mail/faces/files/patch-ci +++ /dev/null @@ -1,186 +0,0 @@ -*** compface/gen.c Tue Jan 15 23:58:46 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/gen.c Wed Jun 19 08:29:13 1991 -*************** -*** 18,79 **** - - #define GEN(g) F[h] ^= G.g[k]; break - -! static void Gen(char *); - - static void -! Gen(char *f) - { -! int m, l, k, j, i, h; - -! for (j = 0; j < HEIGHT; j++) { -! for (i = 0; i < WIDTH; i++) { - h = i + j * WIDTH; - k = 0; -! for (l = i - 2; l <= i + 2; l++) { -! for (m = j - 2; m <= j; m++) { -! if ((l >= i) && (m == j)) { - continue; -! } -! if ((l > 0) && (l <= WIDTH) && (m > 0)) { - k = *(f + l + m * WIDTH) ? k * 2 + 1 : k * 2; - } -! } -! } -! switch (i) { - case 1 : -! switch (j) { - case 1 : GEN(g_22); - case 2 : GEN(g_21); - default : GEN(g_20); - } - break; -- - case 2 : -! switch (j) { - case 1 : GEN(g_12); - case 2 : GEN(g_11); - default : GEN(g_10); - } - break; -- - case WIDTH - 1 : -! switch (j) { - case 1 : GEN(g_42); - case 2 : GEN(g_41); - default : GEN(g_40); - } - break; -- - case WIDTH : -! switch (j) { - case 1 : GEN(g_32); - case 2 : GEN(g_31); - default : GEN(g_30); - } - break; -- - default : -! switch (j) { - case 1 : GEN(g_02); - case 2 : GEN(g_01); - default : GEN(g_00); ---- 17,81 ---- - - #define GEN(g) F[h] ^= G.g[k]; break - -! static void Gen P((char *)) ; - - static void -! Gen(f) -! register char *f; - { -! register int m, l, k, j, i, h; - -! for (j = 0; j < HEIGHT; j++) -! { -! for (i = 0; i < WIDTH; i++) -! { - h = i + j * WIDTH; - k = 0; -! for (l = i - 2; l <= i + 2; l++) -! for (m = j - 2; m <= j; m++) -! { -! if ((l >= i) && (m == j)) - continue; -! if ((l > 0) && (l <= WIDTH) && (m > 0)) - k = *(f + l + m * WIDTH) ? k * 2 + 1 : k * 2; - } -! switch (i) -! { - case 1 : -! switch (j) -! { - case 1 : GEN(g_22); - case 2 : GEN(g_21); - default : GEN(g_20); - } - break; - case 2 : -! switch (j) -! { - case 1 : GEN(g_12); - case 2 : GEN(g_11); - default : GEN(g_10); - } - break; - case WIDTH - 1 : -! switch (j) -! { - case 1 : GEN(g_42); - case 2 : GEN(g_41); - default : GEN(g_40); - } - break; - case WIDTH : -! switch (j) -! { - case 1 : GEN(g_32); - case 2 : GEN(g_31); - default : GEN(g_30); - } - break; - default : -! switch (j) -! { - case 1 : GEN(g_02); - case 2 : GEN(g_01); - default : GEN(g_00); -*************** -*** 84,109 **** - } - } - -- - void - GenFace() - { - static char new[PIXELS]; -! char *f1, *f2; -! int i; - - f1 = new; - f2 = F; - i = PIXELS; -! while (i-- > 0) { - *(f1++) = *(f2++); -- } - Gen(new); - } - -- - void - UnGenFace() - { - Gen(F); - } ---- 86,110 ---- - } - } - - void - GenFace() - { - static char new[PIXELS]; -! register char *f1; -! register char *f2; -! register int i; - - f1 = new; - f2 = F; - i = PIXELS; -! while (i-- > 0) - *(f1++) = *(f2++); - Gen(new); - } - - void - UnGenFace() - { - Gen(F); - } -+ diff --git a/mail/faces/files/patch-cj b/mail/faces/files/patch-cj deleted file mode 100644 index 8df10e250e0f..000000000000 --- a/mail/faces/files/patch-cj +++ /dev/null @@ -1,296 +0,0 @@ -*** compface/uncmain.c Thu Feb 21 16:42:54 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/uncmain.c Sun Jan 19 19:35:35 2003 -*************** -*** 13,28 **** - * to me, then an attempt will be made to fix them. - */ - -- #include -- #include - #include - #include "compface.h" - -! #define STRCAT (void) strcat -! #define STRCPY (void) strcpy -! #define WRITE (void) write - -! /* The buffer is longer than needed to handle sparse input formats */ - #define FACEBUFLEN 2048 - char fbuf[FACEBUFLEN]; - ---- 15,26 ---- - * to me, then an attempt will be made to fix them. - */ - - #include - #include "compface.h" - -! extern int xbitmap; - -! /* the buffer is longer than needed to handle sparse input formats */ - #define FACEBUFLEN 2048 - char fbuf[FACEBUFLEN]; - -*************** -*** 32,87 **** - int outfile = 1; - char *outname = ""; - -! char *cmdname; /* Basename of executable */ - -! /* Error handling definitions follow */ - - extern int errno, sys_nerr; - extern char *sys_errlist[]; - - #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") -! #define INITERR(s) { \ -! STRCPY(fbuf, cmdname); \ -! STRCAT(fbuf, ": "); \ -! STRCAT(fbuf, (s));\ -! } -! #define ADDERR(s) STRCAT(fbuf, (s)); -! #define ERROR { \ -! STRCAT(fbuf, "\n"); \ -! WRITE(2, fbuf, strlen(fbuf)); \ -! exit(1); \ -! } -! #define INITWARN(s) { \ -! STRCPY(fbuf, cmdname); \ -! STRCAT(fbuf, ": (warning) "); \ -! STRCAT(fbuf, (s)); \ -! } -! #define ADDWARN(s) STRCAT(fbuf, (s)); -! #define WARN { \ -! STRCAT(fbuf, "\n"); \ -! WRITE(2, fbuf, strlen(fbuf)); \ -! } - - int -! main(int argc, char *argv[]) - { - cmdname = *argv; -! while (**argv) { -! if (*((*argv)++) == '/') { - cmdname = *argv; /* find the command's basename */ -! } - } - -! if (argc > 3) { - INITERR("usage: ") - ADDERR(cmdname) - ADDERR(" [infile [outfile]]") - ERROR - } - -! if ((argc > 1) && strcmp(*++argv, "-")) { - inname = *argv; -! if ((infile = open(inname, O_RDONLY)) == -1) { - INITERR(inname) - ADDERR(": ") - ADDERR(ERR) ---- 30,87 ---- - int outfile = 1; - char *outname = ""; - -! /* basename of executable */ -! char *cmdname; - -! /* error handling definitions follow */ - - extern int errno, sys_nerr; - extern char *sys_errlist[]; - -+ extern void exit P((int)) ; -+ - #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") -! #define INITERR(s) {(void)strcpy(fbuf, cmdname); (void)strcat(fbuf, ": ");\ -! (void)strcat(fbuf, (s));} -! #define ADDERR(s) (void)strcat(fbuf, (s)); -! #define ERROR {(void)strcat(fbuf, "\n");\ -! (void)write(2, fbuf, strlen(fbuf)); exit(1);} -! #define INITWARN(s) {(void)strcpy(fbuf, cmdname);\ -! (void)strcat(fbuf, ": (warning) ");\ -! (void)strcat(fbuf, (s));} -! #define ADDWARN(s) (void)strcat(fbuf, (s)); -! #define WARN {(void)strcat(fbuf, "\n"); (void)write(2, fbuf, strlen(fbuf));} - - int -! main(argc, argv) -! int argc; -! char *argv[]; - { - cmdname = *argv; -! while (**argv) -! if (*((*argv)++) == '/') - cmdname = *argv; /* find the command's basename */ -! -! if (argc > 1 && !strcmp(argv[1], "-X")) -! { -! xbitmap++; -! argc--; -! argv++; - } - -! if (argc > 3) -! { - INITERR("usage: ") - ADDERR(cmdname) - ADDERR(" [infile [outfile]]") - ERROR - } - -! if ((argc > 1) && strcmp(*++argv, "-")) -! { - inname = *argv; -! if ((infile = open(inname, O_RDONLY)) == -1) -! { - INITERR(inname) - ADDERR(": ") - ADDERR(ERR) -*************** -*** 89,98 **** - } - } - -! if (argc > 2) { - outname = *++argv; -! if ((outfile = open(outname, O_WRONLY | O_CREAT | -! O_TRUNC, 0644)) == -1) { - INITERR(outname) - ADDERR(": ") - ADDERR(ERR) ---- 89,99 ---- - } - } - -! if (argc > 2) -! { - outname = *++argv; -! if ((outfile = open(outname, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1) -! { - INITERR(outname) - ADDERR(": ") - ADDERR(ERR) -*************** -*** 101,107 **** - } - - (void) ReadBuf(); -! switch (uncompface(fbuf)) { - case -2 : INITERR("internal error") - ERROR - case -1 : INITERR(inname) ---- 102,109 ---- - } - - (void) ReadBuf(); -! switch (uncompface(fbuf)) -! { - case -2 : INITERR("internal error") - ERROR - case -1 : INITERR(inname) -*************** -*** 121,133 **** - int - WriteBuf() - { -! char *s, *t; -! int len; - - s = fbuf; - t = s + strlen(s); -! while (s < t) { -! if ((len = write(outfile, s, t - s)) == -1) { - INITERR(outname) - ADDERR(": ") - ADDERR(ERR) ---- 123,137 ---- - int - WriteBuf() - { -! register char *s, *t; -! register int len; - - s = fbuf; - t = s + strlen(s); -! while (s < t) -! { -! if ((len = write(outfile, s, t - s)) == -1) -! { - INITERR(outname) - ADDERR(": ") - ADDERR(ERR) -*************** -*** 135,161 **** - } - s += len; - } -! return(0); - } - - - int - ReadBuf() - { -! int count, len; -! char *t; - - count = 0; - t = fbuf; -! while ((len = read(infile, t, FACEBUFLEN - count))) { -! if (len == -1) { - INITERR(inname) - ADDERR(": ") - ADDERR(ERR) - ERROR - } - t += len; -! if ((count += len) >= FACEBUFLEN) { - INITWARN(inname) - ADDWARN(" exceeds internal buffer size. Data may be lost") - WARN ---- 139,168 ---- - } - s += len; - } -! return 0; - } - - - int - ReadBuf() - { -! register int count, len; -! register char *t; - - count = 0; - t = fbuf; -! while (len = read(infile, t, FACEBUFLEN - count)) -! { -! if (len == -1) -! { - INITERR(inname) - ADDERR(": ") - ADDERR(ERR) - ERROR - } - t += len; -! if ((count += len) >= FACEBUFLEN) -! { - INITWARN(inname) - ADDWARN(" exceeds internal buffer size. Data may be lost") - WARN -*************** -*** 163,167 **** - } - } - *t = '\0'; -! return(count); - } ---- 170,174 ---- - } - } - *t = '\0'; -! return count; - } diff --git a/mail/faces/files/patch-ck b/mail/faces/files/patch-ck deleted file mode 100644 index 74d68d31bfc1..000000000000 --- a/mail/faces/files/patch-ck +++ /dev/null @@ -1,40 +0,0 @@ -*** compface/uncompface.c Thu Feb 21 16:42:54 2002 ---- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/uncompface.c Wed Jun 19 08:29:14 1991 -*************** -*** 14,29 **** - * to me, then an attempt will be made to fix them. - */ - - #include "compface.h" -- #include "vars.h" - - int -! uncompface(char *fbuf) - { -! if (!(status = setjmp(comp_env))) { -! UnCompAll(fbuf); /* compress otherwise */ - UnGenFace(); - WriteFace(fbuf); - } -! return(status); - } ---- 13,31 ---- - * to me, then an attempt will be made to fix them. - */ - -+ #define MAIN -+ - #include "compface.h" - - int -! uncompface(fbuf) -! char *fbuf; - { -! if (!(status = setjmp(comp_env))) -! { -! UnCompAll(fbuf);/* compress otherwise */ - UnGenFace(); - WriteFace(fbuf); - } -! return status; - } diff --git a/mail/faces/files/patch-compface_arith.c b/mail/faces/files/patch-compface_arith.c new file mode 100644 index 000000000000..b76ad572de07 --- /dev/null +++ b/mail/faces/files/patch-compface_arith.c @@ -0,0 +1,447 @@ +*** compface/arith.c Tue Jan 15 23:58:46 2002 +--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/arith.c Thu Oct 24 03:28:07 1991 +*************** +*** 17,33 **** + #include "compface.h" + + void +! RevPush(Prob *p) + { +! if (NumProbs >= PIXELS * 2 - 1) { + longjmp(comp_env, ERR_INTERNAL); +- } + ProbBuf[NumProbs++] = p; + } + +- + void +! BigPush(Prob *p) + { + static WORD tmp; + +--- 16,32 ---- + #include "compface.h" + + void +! RevPush(p) +! Prob *p; + { +! if (NumProbs >= PIXELS * 2 - 1) + longjmp(comp_env, ERR_INTERNAL); + ProbBuf[NumProbs++] = p; + } + + void +! BigPush(p) +! Prob *p; + { + static WORD tmp; + +*************** +*** 36,76 **** + BigAdd(tmp + p->p_offset); + } + +- + int +! BigPop(Prob *p) + { + static WORD tmp; +! int i; + + BigDiv(0, &tmp); + i = 0; +! while ((tmp < p->p_offset) || (tmp >= p->p_range + p->p_offset)) { + p++; + i++; + } + BigMul(p->p_range); + BigAdd(tmp - p->p_offset); +! return(i); + } + +- + #ifdef DEBUG + void +! BigPrint() /* Print a BigInt in HexaDecimal. */ + { +! int i, c, count; +! WORD *w; + + count = 0; + w = B.b_word + (i = B.b_words); +! while (i--) { + w--; + c = *((*w >> 4) + HexDigits); + putc(c, stderr); + c = *((*w & 0xf) + HexDigits); + putc(c, stderr); +! if (++count >= 36) { + putc('\\', stderr); + putc('\n', stderr); + count = 0; +--- 35,79 ---- + BigAdd(tmp + p->p_offset); + } + + int +! BigPop(p) +! register Prob *p; + { + static WORD tmp; +! register int i; + + BigDiv(0, &tmp); + i = 0; +! while ((tmp < p->p_offset) || (tmp >= p->p_range + p->p_offset)) +! { + p++; + i++; + } + BigMul(p->p_range); + BigAdd(tmp - p->p_offset); +! return i; + } + + #ifdef DEBUG ++ /* Print a BigInt in HexaDecimal ++ */ + void +! BigPrint() + { +! register int i, c, count; +! register WORD *w; + + count = 0; + w = B.b_word + (i = B.b_words); +! while (i--) +! { + w--; + c = *((*w >> 4) + HexDigits); + putc(c, stderr); + c = *((*w & 0xf) + HexDigits); + putc(c, stderr); +! if (++count >= 36) +! { + putc('\\', stderr); + putc('\n', stderr); + count = 0; +*************** +*** 78,110 **** + } + putc('\n', stderr); + } +! #endif /*DEBUG*/ +! + + /* Divide B by a storing the result in B and the remainder in the word +! * pointer to by r. + */ +- + void +! BigDiv(WORD a, WORD *r) + { +! int i; +! WORD *w; +! COMP c, d; + + a &= WORDMASK; +! if ((a == 1) || (B.b_words == 0)) { + *r = 0; + return; + } +! +! /* Treat this as a == WORDCARRY and just shift everything right a WORD */ +! +! if (a == 0) { + i = --B.b_words; + w = B.b_word; + *r = *w; +! while (i--) { + *w = *(w + 1); + w++; + } +--- 81,112 ---- + } + putc('\n', stderr); + } +! #endif + + /* Divide B by a storing the result in B and the remainder in the word +! * pointer to by r + */ + void +! BigDiv(a, r) +! register WORD a, *r; + { +! register int i; +! register WORD *w; +! register COMP c, d; + + a &= WORDMASK; +! if ((a == 1) || (B.b_words == 0)) +! { + *r = 0; + return; + } +! if (a == 0) /* treat this as a == WORDCARRY */ +! { /* and just shift everything right a WORD */ + i = --B.b_words; + w = B.b_word; + *r = *w; +! while (i--) +! { + *w = *(w + 1); + w++; + } +*************** +*** 113,154 **** + } + w = B.b_word + (i = B.b_words); + c = 0; +! while (i--) { + c <<= BITSPERWORD; +! c += (COMP) *--w; +! d = c / (COMP) a; +! c = c % (COMP) a; +! *w = (WORD) (d & WORDMASK); + } + *r = c; +! if (B.b_word[B.b_words - 1] == 0) { + B.b_words--; +- } + } + +! +! /* Multiply a by B storing the result in B. */ +! + void +! BigMul(WORD a) + { +! int i; +! WORD *w; +! COMP c; + + a &= WORDMASK; +! if ((a == 1) || (B.b_words == 0)) { + return; +! } +! +! /* Treat this as a == WORDCARRY and just shift everything left a WORD */ +! +! if (a == 0) { +! if ((i = B.b_words++) >= MAXWORDS - 1) { + longjmp(comp_env, ERR_INTERNAL); +- } + w = B.b_word + i; +! while (i--) { + *w = *(w - 1); + w--; + } +--- 115,153 ---- + } + w = B.b_word + (i = B.b_words); + c = 0; +! while (i--) +! { + c <<= BITSPERWORD; +! c += (COMP)*--w; +! d = c / (COMP)a; +! c = c % (COMP)a; +! *w = (WORD)(d & WORDMASK); + } + *r = c; +! if (B.b_word[B.b_words - 1] == 0) + B.b_words--; + } + +! /* Multiply a by B storing the result in B +! */ + void +! BigMul(a) +! register WORD a; + { +! register int i; +! register WORD *w; +! register COMP c; + + a &= WORDMASK; +! if ((a == 1) || (B.b_words == 0)) + return; +! if (a == 0) /* treat this as a == WORDCARRY */ +! { /* and just shift everything left a WORD */ +! if ((i = B.b_words++) >= MAXWORDS - 1) + longjmp(comp_env, ERR_INTERNAL); + w = B.b_word + i; +! while (i--) +! { + *w = *(w - 1); + w--; + } +*************** +*** 158,239 **** + i = B.b_words; + w = B.b_word; + c = 0; +! while (i--) { + c += (COMP)*w * (COMP)a; + *(w++) = (WORD)(c & WORDMASK); + c >>= BITSPERWORD; + } +! if (c) { +! if (B.b_words++ >= MAXWORDS) { + longjmp(comp_env, ERR_INTERNAL); +- } + *w = (COMP)(c & WORDMASK); + } + } + +! +! /* Subtract a from B storing the result in B. */ +! + void +! BigSub(WORD a) + { +! int i; +! WORD *w; +! COMP c; + + a &= WORDMASK; +! if (a == 0) { + return; +- } + i = 1; + w = B.b_word; +! c = (COMP) *w - (COMP) a; +! *w = (WORD) (c & WORDMASK); +! while (c & WORDCARRY) { +! if (i >= B.b_words) { + longjmp(comp_env, ERR_INTERNAL); +! } +! c = (COMP) *++w - 1; +! *w = (WORD) (c & WORDMASK); + i++; + } +! if ((i == B.b_words) && (*w == 0) && (i > 0)) { + B.b_words--; +- } + } + +! +! /* Add to a to B storing the result in B. */ +! + void +! BigAdd(WORD a) + { +! int i; +! WORD *w; +! COMP c; + + a &= WORDMASK; +! if (a == 0) { + return; +- } + i = 0; + w = B.b_word; + c = a; +! while ((i < B.b_words) && c) { +! c += (COMP) *w; +! *w++ = (WORD) (c & WORDMASK); + c >>= BITSPERWORD; + i++; + } +! if ((i == B.b_words) && c) { +! if (B.b_words++ >= MAXWORDS) { + longjmp(comp_env, ERR_INTERNAL); +! } +! *w = (COMP) (c & WORDMASK); + } + } + +- + void + BigClear() + { +--- 157,238 ---- + i = B.b_words; + w = B.b_word; + c = 0; +! while (i--) +! { + c += (COMP)*w * (COMP)a; + *(w++) = (WORD)(c & WORDMASK); + c >>= BITSPERWORD; + } +! if (c) +! { +! if (B.b_words++ >= MAXWORDS) + longjmp(comp_env, ERR_INTERNAL); + *w = (COMP)(c & WORDMASK); + } + } + +! #if 0 +! /* Subtract a from B storing the result in B +! */ + void +! BigSub(a) +! WORD a; + { +! register int i; +! register WORD *w; +! register COMP c; + + a &= WORDMASK; +! if (a == 0) + return; + i = 1; + w = B.b_word; +! c = (COMP)*w - (COMP)a; +! *w = (WORD)(c & WORDMASK); +! while (c & WORDCARRY) +! { +! if (i >= B.b_words) + longjmp(comp_env, ERR_INTERNAL); +! c = (COMP)*++w - 1; +! *w = (WORD)(c & WORDMASK); + i++; + } +! if ((i == B.b_words) && (*w == 0) && (i > 0)) + B.b_words--; + } ++ #endif + +! /* Add to a to B storing the result in B +! */ + void +! BigAdd(a) +! WORD a; + { +! register int i; +! register WORD *w; +! register COMP c; + + a &= WORDMASK; +! if (a == 0) + return; + i = 0; + w = B.b_word; + c = a; +! while ((i < B.b_words) && c) +! { +! c += (COMP)*w; +! *w++ = (WORD)(c & WORDMASK); + c >>= BITSPERWORD; + i++; + } +! if ((i == B.b_words) && c) +! { +! if (B.b_words++ >= MAXWORDS) + longjmp(comp_env, ERR_INTERNAL); +! *w = (COMP)(c & WORDMASK); + } + } + + void + BigClear() + { diff --git a/mail/faces/files/patch-compface_cmain.c b/mail/faces/files/patch-compface_cmain.c new file mode 100644 index 000000000000..31f64942af3b --- /dev/null +++ b/mail/faces/files/patch-compface_cmain.c @@ -0,0 +1,292 @@ +*** compface/cmain.c Thu Feb 21 16:42:54 2002 +--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/cmain.c Thu Oct 24 03:28:07 1991 +*************** +*** 13,89 **** + * to me, then an attempt will be made to fix them. + */ + +- #include +- #include + #include + #include "compface.h" + +! #define STRCAT (void) strcat +! #define STRCPY (void) strcpy +! #define WRITE (void) write +! +! /* The buffer is longer than needed to handle sparse input formats */ +! + #define FACEBUFLEN 2048 + char fbuf[FACEBUFLEN]; + + /* IO file descriptors and their names */ +- + int infile = 0; + char *inname = ""; + int outfile = 1; + char *outname = ""; + +! char *cmdname; /* Basename of executable */ + +! /* Error handling definitions follow */ + + extern int errno, sys_nerr; + extern char *sys_errlist[]; + + #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") +! #define INITERR(s) { \ +! STRCPY(fbuf, cmdname); \ +! STRCAT(fbuf, ": "); \ +! STRCAT(fbuf, (s));\ +! } +! #define ADDERR(s) STRCAT(fbuf, (s)); +! #define ERROR { \ +! STRCAT(fbuf, "\n"); \ +! WRITE(2, fbuf, strlen(fbuf)); \ +! exit(1); \ +! } +! #define INITWARN(s) { \ +! STRCPY(fbuf, cmdname); \ +! STRCAT(fbuf, ": (warning) "); \ +! STRCAT(fbuf, (s)); \ +! } +! #define ADDWARN(s) STRCAT(fbuf, (s)); +! #define WARN { \ +! STRCAT(fbuf, "\n"); \ +! WRITE(2, fbuf, strlen(fbuf)); \ +! } + + int +! main(int argc, char *argv[]) + { + cmdname = *argv; +! while (**argv) { +! if (*((*argv)++) == '/') { +! cmdname = *argv; /* Find the command's basename */ +! } +! } + +! if (argc > 3) { + INITERR("usage: ") + ADDERR(cmdname) + ADDERR(" [infile [outfile]]") + ERROR + } + +! if ((argc > 1) && strcmp(*++argv, "-")) { + inname = *argv; +! if ((infile = open(inname, O_RDONLY)) == -1) { + INITERR(inname) + ADDERR(": ") + ADDERR(ERR) +--- 15,78 ---- + * to me, then an attempt will be made to fix them. + */ + + #include + #include "compface.h" + +! /* the buffer is longer than needed to handle sparse input formats */ + #define FACEBUFLEN 2048 + char fbuf[FACEBUFLEN]; + + /* IO file descriptors and their names */ + int infile = 0; + char *inname = ""; + int outfile = 1; + char *outname = ""; + +! /* basename of executable */ +! char *cmdname; + +! /* error handling definitions follow */ + + extern int errno, sys_nerr; + extern char *sys_errlist[]; + ++ extern void exit P((int)) ; ++ + #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") +! #define INITERR(s) {(void)strcpy(fbuf, cmdname); (void)strcat(fbuf, ": ");\ +! (void)strcat(fbuf, (s));} +! #define ADDERR(s) (void)strcat(fbuf, (s)); +! #define ERROR {(void)strcat(fbuf, "\n");\ +! (void)write(2, fbuf, strlen(fbuf)); exit(1);} +! #define INITWARN(s) {(void)strcpy(fbuf, cmdname);\ +! (void)strcat(fbuf, ": (warning) ");\ +! (void)strcat(fbuf, (s));} +! #define ADDWARN(s) (void)strcat(fbuf, (s)); +! #define WARN {(void)strcat(fbuf, "\n"); (void)write(2, fbuf, strlen(fbuf));} + + int +! main(argc, argv) +! int argc; +! char *argv[]; + { + cmdname = *argv; +! while (**argv) +! if (*((*argv)++) == '/') +! cmdname = *argv; /* find the command's basename */ + +! if (argc > 3) +! { + INITERR("usage: ") + ADDERR(cmdname) + ADDERR(" [infile [outfile]]") + ERROR + } + +! if ((argc > 1) && strcmp(*++argv, "-")) +! { + inname = *argv; +! if ((infile = open(inname, O_RDONLY)) == -1) +! { + INITERR(inname) + ADDERR(": ") + ADDERR(ERR) +*************** +*** 91,100 **** + } + } + +! if (argc > 2) { + outname = *++argv; +! if ((outfile = open(outname, O_WRONLY | O_CREAT | +! O_TRUNC, 0644)) == -1) { + INITERR(outname) + ADDERR(": ") + ADDERR(ERR) +--- 80,90 ---- + } + } + +! if (argc > 2) +! { + outname = *++argv; +! if ((outfile = open(outname, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1) +! { + INITERR(outname) + ADDERR(": ") + ADDERR(ERR) +*************** +*** 103,109 **** + } + + (void) ReadBuf(); +! switch (compface(fbuf)) { + case -2 : INITERR("internal error") + ERROR + case -1 : INITERR(inname) +--- 93,100 ---- + } + + (void) ReadBuf(); +! switch (compface(fbuf)) +! { + case -2 : INITERR("internal error") + ERROR + case -1 : INITERR(inname) +*************** +*** 123,135 **** + int + WriteBuf() + { +! char *s, *t; +! int len; + + s = fbuf; + t = s + strlen(s); +! while (s < t) { +! if ((len = write(outfile, s, t - s)) == -1) { + INITERR(outname) + ADDERR(": ") + ADDERR(ERR) +--- 114,128 ---- + int + WriteBuf() + { +! register char *s, *t; +! register int len; + + s = fbuf; + t = s + strlen(s); +! while (s < t) +! { +! if ((len = write(outfile, s, t - s)) == -1) +! { + INITERR(outname) + ADDERR(": ") + ADDERR(ERR) +*************** +*** 137,163 **** + } + s += len; + } +! return(0); + } + + + int + ReadBuf() + { +! int count, len; +! char *t; + + count = 0; + t = fbuf; +! while ((len = read(infile, t, FACEBUFLEN - count))) { +! if (len == -1) { + INITERR(inname) + ADDERR(": ") + ADDERR(ERR) + ERROR + } + t += len; +! if ((count += len) >= FACEBUFLEN) { + INITWARN(inname) + ADDWARN(" exceeds internal buffer size. Data may be lost") + WARN +--- 130,159 ---- + } + s += len; + } +! return 0; + } + + + int + ReadBuf() + { +! register int count, len; +! register char *t; + + count = 0; + t = fbuf; +! while (len = read(infile, t, FACEBUFLEN - count)) +! { +! if (len == -1) +! { + INITERR(inname) + ADDERR(": ") + ADDERR(ERR) + ERROR + } + t += len; +! if ((count += len) >= FACEBUFLEN) +! { + INITWARN(inname) + ADDWARN(" exceeds internal buffer size. Data may be lost") + WARN +*************** +*** 165,169 **** + } + } + *t = '\0'; +! return(count); + } +--- 161,165 ---- + } + } + *t = '\0'; +! return count; + } diff --git a/mail/faces/files/patch-compface_compface.1 b/mail/faces/files/patch-compface_compface.1 new file mode 100644 index 000000000000..9f2a15e6ea4d --- /dev/null +++ b/mail/faces/files/patch-compface_compface.1 @@ -0,0 +1,17 @@ +*** compface/compface.1 Tue Jan 15 23:58:46 2002 +--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.1 Sun Jan 19 19:35:35 2003 +*************** +*** 56,61 **** +--- 58,69 ---- + .I compface + averages less than 200 characters. + The average number of output lines is three. ++ .SH OPTIONS ++ .TP 12 ++ .B \-X ++ The same as ++ .I uncompface ++ | ikon2xbm. Usefull for exmh! + .SH DIAGNOSTICS + Exit status is normally 0. + Possible errors include IO errors when opening, reading or writing diff --git a/mail/faces/files/patch-compface_compface.c b/mail/faces/files/patch-compface_compface.c new file mode 100644 index 000000000000..177e6ed7d9db --- /dev/null +++ b/mail/faces/files/patch-compface_compface.c @@ -0,0 +1,40 @@ +*** compface/compface.c Thu Feb 21 16:42:54 2002 +--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.c Wed Jun 19 08:29:12 1991 +*************** +*** 14,29 **** + * to me, then an attempt will be made to fix them. + */ + + #include "compface.h" +- #include "vars.h" + + int +! compface(char *fbuf) + { +! if (!(status = setjmp(comp_env))) { + ReadFace(fbuf); + GenFace(); + CompAll(fbuf); + } +! return(status); + } +--- 13,31 ---- + * to me, then an attempt will be made to fix them. + */ + ++ #define MAIN ++ + #include "compface.h" + + int +! compface(fbuf) +! char *fbuf; + { +! if (!(status = setjmp(comp_env))) +! { + ReadFace(fbuf); + GenFace(); + CompAll(fbuf); + } +! return status; + } diff --git a/mail/faces/files/patch-compface_compface.h b/mail/faces/files/patch-compface_compface.h new file mode 100644 index 000000000000..41db8268a5db --- /dev/null +++ b/mail/faces/files/patch-compface_compface.h @@ -0,0 +1,306 @@ +*** compface/compface.h Thu Feb 21 16:42:54 2002 +--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compface.h Thu Sep 5 07:24:42 1991 +*************** +*** 14,45 **** + * to me, then an attempt will be made to fix them. + */ + + #include + #include + #include + +! /* Need to know how many bits per hexadecimal digit for io */ + #define BITSPERDIG 4 +! extern char HexDigits[]; + +! /* Define the face size - 48x48x1 */ + #define WIDTH 48 + #define HEIGHT WIDTH + +! /* Total number of pixels and digits */ + #define PIXELS (WIDTH * HEIGHT) + #define DIGITS (PIXELS / BITSPERDIG) + +! extern char F[PIXELS]; + +! /* Output formatting word lengths and line lengths */ + #define DIGSPERWORD 4 + #define WORDSPERLINE (WIDTH / DIGSPERWORD / BITSPERDIG) + +! /* Compressed output uses the full range of printable characters. + * in ascii these are in a contiguous block so we just need to know +! * the first and last. The total number of printables is needed too. +! */ + #define FIRSTPRINT '!' + #define LASTPRINT '~' + #define NUMPRINTS (LASTPRINT - FIRSTPRINT + 1) +--- 13,64 ---- + * to me, then an attempt will be made to fix them. + */ + ++ #if defined(SYSV32) || defined(hpux) + #include ++ #else ++ #include ++ #endif /* SYSV32 || hpux */ + #include + #include + +! /* For all function declarations, if ANSI then use a prototype. */ +! +! #if defined(__STDC__) +! #define P(args) args +! #else /* ! __STDC__ */ +! #define P(args) () +! #endif /* STDC */ +! +! #ifdef MAIN +! #define EXTERN +! #define INIT(x) = x +! #else +! #define EXTERN extern +! #define INIT(x) +! #endif +! +! /* need to know how many bits per hexadecimal digit for io */ + #define BITSPERDIG 4 +! EXTERN char HexDigits[] INIT("0123456789ABCDEF"); + +! /* define the face size - 48x48x1 */ + #define WIDTH 48 + #define HEIGHT WIDTH + +! /* total number of pixels and digits */ + #define PIXELS (WIDTH * HEIGHT) + #define DIGITS (PIXELS / BITSPERDIG) + +! /* internal face representation - 1 char per pixel is faster */ +! EXTERN char F[PIXELS]; + +! /* output formatting word lengths and line lengths */ + #define DIGSPERWORD 4 + #define WORDSPERLINE (WIDTH / DIGSPERWORD / BITSPERDIG) + +! /* compressed output uses the full range of printable characters. + * in ascii these are in a contiguous block so we just need to know +! * the first and last. The total number of printables is needed too */ + #define FIRSTPRINT '!' + #define LASTPRINT '~' + #define NUMPRINTS (LASTPRINT - FIRSTPRINT + 1) +*************** +*** 49,56 **** + + /* Portable, very large unsigned integer arithmetic is needed. + * Implementation uses arrays of WORDs. COMPs must have at least +! * twice as many bits as WORDs to handle intermediate results. +! */ + #define WORD unsigned char + #define COMP unsigned long + #define BITSPERWORD 8 +--- 68,74 ---- + + /* Portable, very large unsigned integer arithmetic is needed. + * Implementation uses arrays of WORDs. COMPs must have at least +! * twice as many bits as WORDs to handle intermediate results */ + #define WORD unsigned char + #define COMP unsigned long + #define BITSPERWORD 8 +*************** +*** 64,76 **** + WORD b_word[MAXWORDS]; + } BigInt; + +! extern BigInt B; + + /* This is the guess the next pixel table. Normally there are 12 neighbour + * pixels used to give 1<<12 cases but in the upper left corner lesser +! * numbers of neighbours are available, leading to 6231 different guesses. +! */ +! typedef struct guesses { + char g_00[1<<12]; + char g_01[1<<7]; + char g_02[1<<2]; +--- 82,94 ---- + WORD b_word[MAXWORDS]; + } BigInt; + +! EXTERN BigInt B; + + /* This is the guess the next pixel table. Normally there are 12 neighbour + * pixels used to give 1<<12 cases but in the upper left corner lesser +! * numbers of neighbours are available, leading to 6231 different guesses */ +! typedef struct guesses +! { + char g_00[1<<12]; + char g_01[1<<7]; + char g_02[1<<2]; +*************** +*** 88,155 **** + char g_42[1<<2]; + } Guesses; + +! extern Guesses G; + + /* Data of varying probabilities are encoded by a value in the range 0 - 255. + * The probability of the data determines the range of possible encodings. +! * Offset gives the first possible encoding of the range. +! */ +! typedef struct prob { + WORD p_range; + WORD p_offset; + } Prob; + +! extern Prob *ProbBuf[PIXELS * 2]; +! extern int NumProbs; + + /* Each face is encoded using 9 octrees of 16x16 each. Each level of the + * trees has varying probabilities of being white, grey or black. +! * The table below is based on sampling many faces. +! */ + + #define BLACK 0 + #define GREY 1 + #define WHITE 2 + +! extern Prob levels[4][3]; +! extern Prob freqs[16]; + + #define ERR_OK 0 /* successful completion */ + #define ERR_EXCESS 1 /* completed OK but some input was ignored */ + #define ERR_INSUFF -1 /* insufficient input. Bad face format? */ + #define ERR_INTERNAL -2 /* Arithmetic overflow or buffer overflow */ + +! extern int status; + +! extern jmp_buf comp_env; + +! int AllBlack(char *, int, int); +! int AllWhite(char *, int, int); +! int BigPop(Prob *); +! int compface(char *); +! int main(int, char *[]); +! int ReadBuf(); +! int Same(char *, int, int); +! int uncompface(char *); +! int WriteBuf(); +! +! void BigAdd(WORD); +! void BigClear(); +! void BigDiv(WORD, WORD *); +! void BigMul(WORD); +! void BigPrint(); +! void BigPush(Prob *); +! void BigRead(char *); +! void BigSub(WORD); +! void BigWrite(char *); +! void CompAll(char *); +! void Compress(char *, int, int, int); +! void GenFace(); +! void PopGreys(char *, int, int); +! void PushGreys(char *, int, int); +! void ReadFace(char *); +! void RevPush(Prob *); +! void UnCompAll(char *); +! void UnCompress(char *, int, int, int); +! void UnGenFace(); +! void WriteFace(char *); +--- 106,204 ---- + char g_42[1<<2]; + } Guesses; + +! /* data.h was established by sampling over 1000 faces and icons */ +! EXTERN Guesses G +! #ifdef MAIN +! = +! #include "data.h" +! #endif +! ; + + /* Data of varying probabilities are encoded by a value in the range 0 - 255. + * The probability of the data determines the range of possible encodings. +! * Offset gives the first possible encoding of the range */ +! typedef struct prob +! { + WORD p_range; + WORD p_offset; + } Prob; + +! /* A stack of probability values */ +! EXTERN Prob *ProbBuf[PIXELS * 2]; +! EXTERN int NumProbs INIT(0); + + /* Each face is encoded using 9 octrees of 16x16 each. Each level of the + * trees has varying probabilities of being white, grey or black. +! * The table below is based on sampling many faces */ + + #define BLACK 0 + #define GREY 1 + #define WHITE 2 + +! EXTERN Prob levels[4][3] +! #ifdef MAIN +! = +! { +! {{1, 255}, {251, 0}, {4, 251}}, /* Top of tree almost always grey */ +! {{1, 255}, {200, 0}, {55, 200}}, +! {{33, 223}, {159, 0}, {64, 159}}, +! {{131, 0}, {0, 0}, {125, 131}} /* Grey disallowed at bottom */ +! } +! #endif +! ; +! +! /* At the bottom of the octree 2x2 elements are considered black if any +! * pixel is black. The probabilities below give the distribution of the +! * 16 possible 2x2 patterns. All white is not really a possibility and +! * has a probability range of zero. Again, experimentally derived data */ +! EXTERN Prob freqs[16] +! #ifdef MAIN +! = +! { +! {0, 0}, {38, 0}, {38, 38}, {13, 152}, +! {38, 76}, {13, 165}, {13, 178}, {6, 230}, +! {38, 114}, {13, 191}, {13, 204}, {6, 236}, +! {13, 217}, {6, 242}, {5, 248}, {3, 253} +! } +! #endif +! ; + + #define ERR_OK 0 /* successful completion */ + #define ERR_EXCESS 1 /* completed OK but some input was ignored */ + #define ERR_INSUFF -1 /* insufficient input. Bad face format? */ + #define ERR_INTERNAL -2 /* Arithmetic overflow or buffer overflow */ + +! EXTERN int status; + +! EXTERN jmp_buf comp_env; + +! int AllBlack P((char *, int, int)) ; +! int AllWhite P((char *, int, int)) ; +! int BigPop P((Prob *)) ; +! int compface P((char *)) ; +! int main P((int, char *[])) ; +! int ReadBuf P(()) ; +! int Same P((char *, int, int)) ; +! int uncompface P((char *)) ; +! int WriteBuf P(()) ; +! +! void BigAdd P((unsigned char)) ; +! void BigClear P(()) ; +! void BigDiv P((unsigned char, unsigned char *)) ; +! void BigMul P((unsigned char)) ; +! void BigPrint P(()) ; +! void BigPush P((Prob *)) ; +! void BigRead P((char *)) ; +! void BigSub P((unsigned int)) ; +! void BigWrite P((char *)) ; +! void CompAll P((char *)) ; +! void Compress P((char *, int, int, int)) ; +! void GenFace P(()) ; +! void PopGreys P((char *, int, int)) ; +! void PushGreys P((char *, int, int)) ; +! void ReadFace P((char *)) ; +! void RevPush P((Prob *)) ; +! void UnCompAll P((char *)) ; +! void UnCompress P((char *, int, int, int)) ; +! void UnGenFace P(()) ; +! void WriteFace P((char *)) ; diff --git a/mail/faces/files/patch-compface_compress.c b/mail/faces/files/patch-compface_compress.c new file mode 100644 index 000000000000..1b69b9560297 --- /dev/null +++ b/mail/faces/files/patch-compface_compress.c @@ -0,0 +1,314 @@ +*** compface/compress.c Tue Jan 15 23:58:46 2002 +--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/compress.c Wed Jun 19 08:29:13 1991 +*************** +*** 17,113 **** + #include "compface.h" + + int +! Same(char *f, int wid, int hei) + { +! char val, *row; +! int x; + + val = *f; +! while (hei--) { + row = f; + x = wid; +! while (x--) { +! if (*(row++) != val) { + return(0); +- } +- } + f += WIDTH; + } +! return(1); + } + +- + int +! AllBlack(char *f, int wid, int hei) + { +! if (wid > 3) { + wid /= 2; + hei /= 2; +! return(AllBlack(f, wid, hei) && AllBlack(f + wid, wid, hei) && + AllBlack(f + WIDTH * hei, wid, hei) && + AllBlack(f + WIDTH * hei + wid, wid, hei)); +- } else { +- return(*f || *(f + 1) || *(f + WIDTH) || *(f + WIDTH + 1)); + } + } + +- + int +! AllWhite(char *f, int wid, int hei) + { +! return((*f == 0) && Same(f, wid, hei)); + } + +- + void +! PopGreys(char *f, int wid, int hei) + { +! if (wid > 3) { + wid /= 2; + hei /= 2; + PopGreys(f, wid, hei); + PopGreys(f + wid, wid, hei); + PopGreys(f + WIDTH * hei, wid, hei); + PopGreys(f + WIDTH * hei + wid, wid, hei); +! } else { + wid = BigPop(freqs); +! if (wid & 1) { + *f = 1; +! } +! if (wid & 2) { + *(f + 1) = 1; +! } +! if (wid & 4) { + *(f + WIDTH) = 1; +! } +! if (wid & 8) { + *(f + WIDTH + 1) = 1; + } +- } + } + +- + void +! PushGreys(char *f, int wid, int hei) + { +! if (wid > 3) { + wid /= 2; + hei /= 2; + PushGreys(f, wid, hei); + PushGreys(f + wid, wid, hei); + PushGreys(f + WIDTH * hei, wid, hei); + PushGreys(f + WIDTH * hei + wid, wid, hei); +- } else { +- RevPush(freqs + *f + 2 * *(f + 1) + +- 4 * *(f + WIDTH) + 8 * *(f + WIDTH + 1)); + } + } + +- + void +! UnCompress(char *f, int wid, int hei, int lev) + { +! switch (BigPop(&levels[lev][0])) { + case WHITE : + return; + case BLACK : +--- 16,120 ---- + #include "compface.h" + + int +! Same(f, wid, hei) +! register char *f; +! register int wid, hei; + { +! register char val, *row; +! register int x; + + val = *f; +! while (hei--) +! { + row = f; + x = wid; +! while (x--) +! if (*(row++) != val) + return(0); + f += WIDTH; + } +! return 1; + } + + int +! AllBlack(f, wid, hei) +! char *f; +! int wid, hei; + { +! if (wid > 3) +! { + wid /= 2; + hei /= 2; +! return (AllBlack(f, wid, hei) && AllBlack(f + wid, wid, hei) && + AllBlack(f + WIDTH * hei, wid, hei) && + AllBlack(f + WIDTH * hei + wid, wid, hei)); + } ++ else ++ return (*f || *(f + 1) || *(f + WIDTH) || *(f + WIDTH + 1)); + } + + int +! AllWhite(f, wid, hei) +! char *f; +! int wid, hei; + { +! return ((*f == 0) && Same(f, wid, hei)); + } + + void +! PopGreys(f, wid, hei) +! char *f; +! int wid, hei; + { +! if (wid > 3) +! { + wid /= 2; + hei /= 2; + PopGreys(f, wid, hei); + PopGreys(f + wid, wid, hei); + PopGreys(f + WIDTH * hei, wid, hei); + PopGreys(f + WIDTH * hei + wid, wid, hei); +! } +! else +! { + wid = BigPop(freqs); +! if (wid & 1) + *f = 1; +! if (wid & 2) + *(f + 1) = 1; +! if (wid & 4) + *(f + WIDTH) = 1; +! if (wid & 8) + *(f + WIDTH + 1) = 1; + } + } + + void +! PushGreys(f, wid, hei) +! char *f; +! int wid, hei; + { +! if (wid > 3) +! { + wid /= 2; + hei /= 2; + PushGreys(f, wid, hei); + PushGreys(f + wid, wid, hei); + PushGreys(f + WIDTH * hei, wid, hei); + PushGreys(f + WIDTH * hei + wid, wid, hei); + } ++ else ++ RevPush(freqs + *f + 2 * *(f + 1) + 4 * *(f + WIDTH) + ++ 8 * *(f + WIDTH + 1)); + } + + void +! UnCompress(f, wid, hei, lev) +! register char *f; +! register int wid, hei, lev; + { +! switch (BigPop(&levels[lev][0])) +! { + case WHITE : + return; + case BLACK : +*************** +*** 125,139 **** + } + } + +- + void +! Compress(char *f, int wid, int hei, int lev) + { +! if (AllWhite(f, wid, hei)) { + RevPush(&levels[lev][WHITE]); + return; + } +! if (AllBlack(f, wid, hei)) { + RevPush(&levels[lev][BLACK]); + PushGreys(f, wid, hei); + return; +--- 132,149 ---- + } + } + + void +! Compress(f, wid, hei, lev) +! register char *f; +! register int wid, hei, lev; + { +! if (AllWhite(f, wid, hei)) +! { + RevPush(&levels[lev][WHITE]); + return; + } +! if (AllBlack(f, wid, hei)) +! { + RevPush(&levels[lev][BLACK]); + PushGreys(f, wid, hei); + return; +*************** +*** 149,164 **** + } + + void +! UnCompAll(char *fbuf) + { +! char *p; + + BigClear(); + BigRead(fbuf); + p = F; +! while (p < F + PIXELS) { + *(p++) = 0; +- } + UnCompress(F, 16, 16, 0); + UnCompress(F + 16, 16, 16, 0); + UnCompress(F + 32, 16, 16, 0); +--- 159,174 ---- + } + + void +! UnCompAll(fbuf) +! char *fbuf; + { +! register char *p; + + BigClear(); + BigRead(fbuf); + p = F; +! while (p < F + PIXELS) + *(p++) = 0; + UnCompress(F, 16, 16, 0); + UnCompress(F + 16, 16, 16, 0); + UnCompress(F + 32, 16, 16, 0); +*************** +*** 171,177 **** + } + + void +! CompAll(char *fbuf) + { + Compress(F, 16, 16, 0); + Compress(F + 16, 16, 16, 0); +--- 181,188 ---- + } + + void +! CompAll(fbuf) +! char *fbuf; + { + Compress(F, 16, 16, 0); + Compress(F + 16, 16, 16, 0); +*************** +*** 183,190 **** + Compress(F + WIDTH * 32 + 16, 16, 16, 0); + Compress(F + WIDTH * 32 + 32, 16, 16, 0); + BigClear(); +! while (NumProbs > 0) { + BigPush(ProbBuf[--NumProbs]); +- } + BigWrite(fbuf); + } +--- 194,200 ---- + Compress(F + WIDTH * 32 + 16, 16, 16, 0); + Compress(F + WIDTH * 32 + 32, 16, 16, 0); + BigClear(); +! while (NumProbs > 0) + BigPush(ProbBuf[--NumProbs]); + BigWrite(fbuf); + } diff --git a/mail/faces/files/patch-compface_file.c b/mail/faces/files/patch-compface_file.c new file mode 100644 index 000000000000..836f5a14a3ee --- /dev/null +++ b/mail/faces/files/patch-compface_file.c @@ -0,0 +1,314 @@ +*** compface/file.c Tue Jan 15 23:58:46 2002 +--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/file.c Sun Jan 19 19:35:35 2003 +*************** +*** 16,147 **** + + #include "compface.h" + + void +! BigRead(char *fbuf) + { +! int c; + +! while (*fbuf != '\0') { + c = *(fbuf++); +! if ((c < FIRSTPRINT) || (c > LASTPRINT)) { + continue; +- } + BigMul(NUMPRINTS); + BigAdd((WORD)(c - FIRSTPRINT)); + } + } + +- + void +! BigWrite(char *fbuf) + { + static WORD tmp; + static char buf[DIGITS]; +! char *s; +! int i; + + s = buf; +! while (B.b_words > 0) { + BigDiv(NUMPRINTS, &tmp); + *(s++) = tmp + FIRSTPRINT; + } +! i = 7; /* Leave room for the field name on the first line */ + *(fbuf++) = ' '; +! while (s-- > buf) { +! if (i == 0) { + *(fbuf++) = ' '; +- } + *(fbuf++) = *s; +! if (++i >= MAXLINELEN) { + *(fbuf++) = '\n'; + i = 0; + } + } +! if (i > 0) { + *(fbuf++) = '\n'; +- } + *(fbuf++) = '\0'; + } + +- + void +! ReadFace(char *fbuf) + { +! int c, i; +! char *s, *t; + + t = s = fbuf; +! for (i = strlen(s); i > 0; i--) { +! c = (int) *(s++); +! if ((c >= '0') && (c <= '9')) { +! if (t >= fbuf + DIGITS) { + status = ERR_EXCESS; + break; + } + *(t++) = c - '0'; +! } else if ((c >= 'A') && (c <= 'F')) { +! if (t >= fbuf + DIGITS) { + status = ERR_EXCESS; + break; + } + *(t++) = c - 'A' + 10; +! } else if ((c >= 'a') && (c <= 'f')) { +! if (t >= fbuf + DIGITS) { + status = ERR_EXCESS; + break; + } + *(t++) = c - 'a' + 10; +- } else if (((c == 'x') || (c == 'X')) && (t > fbuf) && (*(t-1) == 0)) { +- t--; + } + } +! if (t < fbuf + DIGITS) { + longjmp(comp_env, ERR_INSUFF); +- } + s = fbuf; + t = F; + c = 1 << (BITSPERDIG - 1); +! while (t < F + PIXELS) { + *(t++) = (*s & c) ? 1 : 0; +! if ((c >>= 1) == 0) { + s++; + c = 1 << (BITSPERDIG - 1); + } + } + } + +- + void +! WriteFace(char *fbuf) + { +! char *s, *t; +! int i, bits, digits, words; + + s = F; + t = fbuf; + bits = digits = words = i = 0; +! while (s < F + PIXELS) { +! if ((bits == 0) && (digits == 0)) { + *(t++) = '0'; + *(t++) = 'x'; + } +! if (*(s++)) { + i = i * 2 + 1; +! } else { + i *= 2; + } +! if (++bits == BITSPERDIG) { +! *(t++) = *(i + HexDigits); + bits = i = 0; +! if (++digits == DIGSPERWORD) { + *(t++) = ','; + digits = 0; +! if (++words == WORDSPERLINE) { + *(t++) = '\n'; + words = 0; + } + } + } + } + *(t++) = '\0'; + } +--- 15,191 ---- + + #include "compface.h" + ++ int xbitmap=0; ++ + void +! BigRead(fbuf) +! register char *fbuf; + { +! register int c; + +! while (*fbuf != '\0') +! { + c = *(fbuf++); +! if ((c < FIRSTPRINT) || (c > LASTPRINT)) + continue; + BigMul(NUMPRINTS); + BigAdd((WORD)(c - FIRSTPRINT)); + } + } + + void +! BigWrite(fbuf) +! register char *fbuf; + { + static WORD tmp; + static char buf[DIGITS]; +! register char *s; +! register int i; + + s = buf; +! while (B.b_words > 0) +! { + BigDiv(NUMPRINTS, &tmp); + *(s++) = tmp + FIRSTPRINT; + } +! i = 7; /* leave room for the field name on the first line */ + *(fbuf++) = ' '; +! while (s-- > buf) +! { +! if (i == 0) + *(fbuf++) = ' '; + *(fbuf++) = *s; +! if (++i >= MAXLINELEN) +! { + *(fbuf++) = '\n'; + i = 0; + } + } +! if (i > 0) + *(fbuf++) = '\n'; + *(fbuf++) = '\0'; + } + + void +! ReadFace(fbuf) +! char *fbuf; + { +! register int c, i; +! register char *s, *t; + + t = s = fbuf; +! for(i = strlen(s); i > 0; i--) +! { +! c = (int)*(s++); +! if ((c >= '0') && (c <= '9')) +! { +! if (t >= fbuf + DIGITS) +! { + status = ERR_EXCESS; + break; + } + *(t++) = c - '0'; +! } +! else if ((c >= 'A') && (c <= 'F')) +! { +! if (t >= fbuf + DIGITS) +! { + status = ERR_EXCESS; + break; + } + *(t++) = c - 'A' + 10; +! } +! else if ((c >= 'a') && (c <= 'f')) +! { +! if (t >= fbuf + DIGITS) +! { + status = ERR_EXCESS; + break; + } + *(t++) = c - 'a' + 10; + } ++ else if (((c == 'x') || (c == 'X')) && (t > fbuf) && (*(t-1) == 0)) ++ t--; + } +! if (t < fbuf + DIGITS) + longjmp(comp_env, ERR_INSUFF); + s = fbuf; + t = F; + c = 1 << (BITSPERDIG - 1); +! while (t < F + PIXELS) +! { + *(t++) = (*s & c) ? 1 : 0; +! if ((c >>= 1) == 0) +! { + s++; + c = 1 << (BITSPERDIG - 1); + } + } + } + + void +! WriteFace(fbuf) +! char *fbuf; + { +! register char *s, *t; +! register int i, bits, digits, words; +! extern int xbitmap; +! int digsperword = DIGSPERWORD; +! int wordsperline = WORDSPERLINE; + + s = F; + t = fbuf; + bits = digits = words = i = 0; +! if (xbitmap) { +! sprintf(t,"#define noname_width 48\n#define noname_height 48\nstatic char noname_bits[] = {\n "); +! while (*t) t++; +! digsperword = 2; +! wordsperline = 15; +! } +! while (s < F + PIXELS) +! { +! if ((bits == 0) && (digits == 0)) +! { + *(t++) = '0'; + *(t++) = 'x'; + } +! if (xbitmap) { +! if (*(s++)) +! i = (i >> 1) | 0x8; +! else +! i >>= 1; +! } +! else { +! if (*(s++)) + i = i * 2 + 1; +! else + i *= 2; + } +! if (++bits == BITSPERDIG) +! { +! if (xbitmap) { +! t++; +! t[-(digits & 1) * 2] = *(i + HexDigits); +! } +! else *(t++) = *(i + HexDigits); + bits = i = 0; +! if (++digits == digsperword) +! { +! if (xbitmap && (s >= F + PIXELS)) break; + *(t++) = ','; + digits = 0; +! if (++words == wordsperline) +! { + *(t++) = '\n'; ++ if (xbitmap) *(t++) = ' '; + words = 0; + } + } + } + } ++ if (xbitmap) { ++ sprintf(t, "}\n"); ++ while (*t) t++; ++ } + *(t++) = '\0'; + } diff --git a/mail/faces/files/patch-compface_gen.c b/mail/faces/files/patch-compface_gen.c new file mode 100644 index 000000000000..9f1e78ef357c --- /dev/null +++ b/mail/faces/files/patch-compface_gen.c @@ -0,0 +1,186 @@ +*** compface/gen.c Tue Jan 15 23:58:46 2002 +--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/gen.c Wed Jun 19 08:29:13 1991 +*************** +*** 18,79 **** + + #define GEN(g) F[h] ^= G.g[k]; break + +! static void Gen(char *); + + static void +! Gen(char *f) + { +! int m, l, k, j, i, h; + +! for (j = 0; j < HEIGHT; j++) { +! for (i = 0; i < WIDTH; i++) { + h = i + j * WIDTH; + k = 0; +! for (l = i - 2; l <= i + 2; l++) { +! for (m = j - 2; m <= j; m++) { +! if ((l >= i) && (m == j)) { + continue; +! } +! if ((l > 0) && (l <= WIDTH) && (m > 0)) { + k = *(f + l + m * WIDTH) ? k * 2 + 1 : k * 2; + } +! } +! } +! switch (i) { + case 1 : +! switch (j) { + case 1 : GEN(g_22); + case 2 : GEN(g_21); + default : GEN(g_20); + } + break; +- + case 2 : +! switch (j) { + case 1 : GEN(g_12); + case 2 : GEN(g_11); + default : GEN(g_10); + } + break; +- + case WIDTH - 1 : +! switch (j) { + case 1 : GEN(g_42); + case 2 : GEN(g_41); + default : GEN(g_40); + } + break; +- + case WIDTH : +! switch (j) { + case 1 : GEN(g_32); + case 2 : GEN(g_31); + default : GEN(g_30); + } + break; +- + default : +! switch (j) { + case 1 : GEN(g_02); + case 2 : GEN(g_01); + default : GEN(g_00); +--- 17,81 ---- + + #define GEN(g) F[h] ^= G.g[k]; break + +! static void Gen P((char *)) ; + + static void +! Gen(f) +! register char *f; + { +! register int m, l, k, j, i, h; + +! for (j = 0; j < HEIGHT; j++) +! { +! for (i = 0; i < WIDTH; i++) +! { + h = i + j * WIDTH; + k = 0; +! for (l = i - 2; l <= i + 2; l++) +! for (m = j - 2; m <= j; m++) +! { +! if ((l >= i) && (m == j)) + continue; +! if ((l > 0) && (l <= WIDTH) && (m > 0)) + k = *(f + l + m * WIDTH) ? k * 2 + 1 : k * 2; + } +! switch (i) +! { + case 1 : +! switch (j) +! { + case 1 : GEN(g_22); + case 2 : GEN(g_21); + default : GEN(g_20); + } + break; + case 2 : +! switch (j) +! { + case 1 : GEN(g_12); + case 2 : GEN(g_11); + default : GEN(g_10); + } + break; + case WIDTH - 1 : +! switch (j) +! { + case 1 : GEN(g_42); + case 2 : GEN(g_41); + default : GEN(g_40); + } + break; + case WIDTH : +! switch (j) +! { + case 1 : GEN(g_32); + case 2 : GEN(g_31); + default : GEN(g_30); + } + break; + default : +! switch (j) +! { + case 1 : GEN(g_02); + case 2 : GEN(g_01); + default : GEN(g_00); +*************** +*** 84,109 **** + } + } + +- + void + GenFace() + { + static char new[PIXELS]; +! char *f1, *f2; +! int i; + + f1 = new; + f2 = F; + i = PIXELS; +! while (i-- > 0) { + *(f1++) = *(f2++); +- } + Gen(new); + } + +- + void + UnGenFace() + { + Gen(F); + } +--- 86,110 ---- + } + } + + void + GenFace() + { + static char new[PIXELS]; +! register char *f1; +! register char *f2; +! register int i; + + f1 = new; + f2 = F; + i = PIXELS; +! while (i-- > 0) + *(f1++) = *(f2++); + Gen(new); + } + + void + UnGenFace() + { + Gen(F); + } ++ diff --git a/mail/faces/files/patch-compface_uncmain.c b/mail/faces/files/patch-compface_uncmain.c new file mode 100644 index 000000000000..8df10e250e0f --- /dev/null +++ b/mail/faces/files/patch-compface_uncmain.c @@ -0,0 +1,296 @@ +*** compface/uncmain.c Thu Feb 21 16:42:54 2002 +--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/uncmain.c Sun Jan 19 19:35:35 2003 +*************** +*** 13,28 **** + * to me, then an attempt will be made to fix them. + */ + +- #include +- #include + #include + #include "compface.h" + +! #define STRCAT (void) strcat +! #define STRCPY (void) strcpy +! #define WRITE (void) write + +! /* The buffer is longer than needed to handle sparse input formats */ + #define FACEBUFLEN 2048 + char fbuf[FACEBUFLEN]; + +--- 15,26 ---- + * to me, then an attempt will be made to fix them. + */ + + #include + #include "compface.h" + +! extern int xbitmap; + +! /* the buffer is longer than needed to handle sparse input formats */ + #define FACEBUFLEN 2048 + char fbuf[FACEBUFLEN]; + +*************** +*** 32,87 **** + int outfile = 1; + char *outname = ""; + +! char *cmdname; /* Basename of executable */ + +! /* Error handling definitions follow */ + + extern int errno, sys_nerr; + extern char *sys_errlist[]; + + #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") +! #define INITERR(s) { \ +! STRCPY(fbuf, cmdname); \ +! STRCAT(fbuf, ": "); \ +! STRCAT(fbuf, (s));\ +! } +! #define ADDERR(s) STRCAT(fbuf, (s)); +! #define ERROR { \ +! STRCAT(fbuf, "\n"); \ +! WRITE(2, fbuf, strlen(fbuf)); \ +! exit(1); \ +! } +! #define INITWARN(s) { \ +! STRCPY(fbuf, cmdname); \ +! STRCAT(fbuf, ": (warning) "); \ +! STRCAT(fbuf, (s)); \ +! } +! #define ADDWARN(s) STRCAT(fbuf, (s)); +! #define WARN { \ +! STRCAT(fbuf, "\n"); \ +! WRITE(2, fbuf, strlen(fbuf)); \ +! } + + int +! main(int argc, char *argv[]) + { + cmdname = *argv; +! while (**argv) { +! if (*((*argv)++) == '/') { + cmdname = *argv; /* find the command's basename */ +! } + } + +! if (argc > 3) { + INITERR("usage: ") + ADDERR(cmdname) + ADDERR(" [infile [outfile]]") + ERROR + } + +! if ((argc > 1) && strcmp(*++argv, "-")) { + inname = *argv; +! if ((infile = open(inname, O_RDONLY)) == -1) { + INITERR(inname) + ADDERR(": ") + ADDERR(ERR) +--- 30,87 ---- + int outfile = 1; + char *outname = ""; + +! /* basename of executable */ +! char *cmdname; + +! /* error handling definitions follow */ + + extern int errno, sys_nerr; + extern char *sys_errlist[]; + ++ extern void exit P((int)) ; ++ + #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") +! #define INITERR(s) {(void)strcpy(fbuf, cmdname); (void)strcat(fbuf, ": ");\ +! (void)strcat(fbuf, (s));} +! #define ADDERR(s) (void)strcat(fbuf, (s)); +! #define ERROR {(void)strcat(fbuf, "\n");\ +! (void)write(2, fbuf, strlen(fbuf)); exit(1);} +! #define INITWARN(s) {(void)strcpy(fbuf, cmdname);\ +! (void)strcat(fbuf, ": (warning) ");\ +! (void)strcat(fbuf, (s));} +! #define ADDWARN(s) (void)strcat(fbuf, (s)); +! #define WARN {(void)strcat(fbuf, "\n"); (void)write(2, fbuf, strlen(fbuf));} + + int +! main(argc, argv) +! int argc; +! char *argv[]; + { + cmdname = *argv; +! while (**argv) +! if (*((*argv)++) == '/') + cmdname = *argv; /* find the command's basename */ +! +! if (argc > 1 && !strcmp(argv[1], "-X")) +! { +! xbitmap++; +! argc--; +! argv++; + } + +! if (argc > 3) +! { + INITERR("usage: ") + ADDERR(cmdname) + ADDERR(" [infile [outfile]]") + ERROR + } + +! if ((argc > 1) && strcmp(*++argv, "-")) +! { + inname = *argv; +! if ((infile = open(inname, O_RDONLY)) == -1) +! { + INITERR(inname) + ADDERR(": ") + ADDERR(ERR) +*************** +*** 89,98 **** + } + } + +! if (argc > 2) { + outname = *++argv; +! if ((outfile = open(outname, O_WRONLY | O_CREAT | +! O_TRUNC, 0644)) == -1) { + INITERR(outname) + ADDERR(": ") + ADDERR(ERR) +--- 89,99 ---- + } + } + +! if (argc > 2) +! { + outname = *++argv; +! if ((outfile = open(outname, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1) +! { + INITERR(outname) + ADDERR(": ") + ADDERR(ERR) +*************** +*** 101,107 **** + } + + (void) ReadBuf(); +! switch (uncompface(fbuf)) { + case -2 : INITERR("internal error") + ERROR + case -1 : INITERR(inname) +--- 102,109 ---- + } + + (void) ReadBuf(); +! switch (uncompface(fbuf)) +! { + case -2 : INITERR("internal error") + ERROR + case -1 : INITERR(inname) +*************** +*** 121,133 **** + int + WriteBuf() + { +! char *s, *t; +! int len; + + s = fbuf; + t = s + strlen(s); +! while (s < t) { +! if ((len = write(outfile, s, t - s)) == -1) { + INITERR(outname) + ADDERR(": ") + ADDERR(ERR) +--- 123,137 ---- + int + WriteBuf() + { +! register char *s, *t; +! register int len; + + s = fbuf; + t = s + strlen(s); +! while (s < t) +! { +! if ((len = write(outfile, s, t - s)) == -1) +! { + INITERR(outname) + ADDERR(": ") + ADDERR(ERR) +*************** +*** 135,161 **** + } + s += len; + } +! return(0); + } + + + int + ReadBuf() + { +! int count, len; +! char *t; + + count = 0; + t = fbuf; +! while ((len = read(infile, t, FACEBUFLEN - count))) { +! if (len == -1) { + INITERR(inname) + ADDERR(": ") + ADDERR(ERR) + ERROR + } + t += len; +! if ((count += len) >= FACEBUFLEN) { + INITWARN(inname) + ADDWARN(" exceeds internal buffer size. Data may be lost") + WARN +--- 139,168 ---- + } + s += len; + } +! return 0; + } + + + int + ReadBuf() + { +! register int count, len; +! register char *t; + + count = 0; + t = fbuf; +! while (len = read(infile, t, FACEBUFLEN - count)) +! { +! if (len == -1) +! { + INITERR(inname) + ADDERR(": ") + ADDERR(ERR) + ERROR + } + t += len; +! if ((count += len) >= FACEBUFLEN) +! { + INITWARN(inname) + ADDWARN(" exceeds internal buffer size. Data may be lost") + WARN +*************** +*** 163,167 **** + } + } + *t = '\0'; +! return(count); + } +--- 170,174 ---- + } + } + *t = '\0'; +! return count; + } diff --git a/mail/faces/files/patch-compface_uncompface.c b/mail/faces/files/patch-compface_uncompface.c new file mode 100644 index 000000000000..74d68d31bfc1 --- /dev/null +++ b/mail/faces/files/patch-compface_uncompface.c @@ -0,0 +1,40 @@ +*** compface/uncompface.c Thu Feb 21 16:42:54 2002 +--- /home/lkoeller/tmp/ports/mail/faces/work/faces/compface/uncompface.c Wed Jun 19 08:29:14 1991 +*************** +*** 14,29 **** + * to me, then an attempt will be made to fix them. + */ + + #include "compface.h" +- #include "vars.h" + + int +! uncompface(char *fbuf) + { +! if (!(status = setjmp(comp_env))) { +! UnCompAll(fbuf); /* compress otherwise */ + UnGenFace(); + WriteFace(fbuf); + } +! return(status); + } +--- 13,31 ---- + * to me, then an attempt will be made to fix them. + */ + ++ #define MAIN ++ + #include "compface.h" + + int +! uncompface(fbuf) +! char *fbuf; + { +! if (!(status = setjmp(comp_env))) +! { +! UnCompAll(fbuf);/* compress otherwise */ + UnGenFace(); + WriteFace(fbuf); + } +! return status; + } diff --git a/mail/faces/files/patch-faces_Faces.ad b/mail/faces/files/patch-faces_Faces.ad new file mode 100644 index 000000000000..2f32d2cee0de --- /dev/null +++ b/mail/faces/files/patch-faces_Faces.ad @@ -0,0 +1,17 @@ +*** faces/Faces.ad.orig Tue Dec 18 05:11:31 2001 +--- faces/Faces.ad Sun Mar 17 21:14:05 2002 +*************** +*** 12,17 **** + faces.button1clear: false + faces.displayHostname: false + +! faces.audioSupport: false +! faces.audioCommand: play + faces.bellAudioFile: +--- 12,17 ---- + faces.button1clear: false + faces.displayHostname: false + +! faces.audioSupport: true +! faces.audioCommand: rplay + faces.bellAudioFile: diff --git a/mail/hbiff/files/patch-01 b/mail/hbiff/files/patch-01 deleted file mode 100644 index 38e4cb7ac210..000000000000 --- a/mail/hbiff/files/patch-01 +++ /dev/null @@ -1,55 +0,0 @@ ---- hbiff.c.orig Sat Nov 22 19:17:50 1997 -+++ hbiff.c Sat Dec 26 14:11:06 1998 -@@ -26,6 +26,7 @@ - #include - #include - #include -+#include - #include - - extern int errno; -@@ -276,7 +277,7 @@ - /* - | default mail command - */ -- mail_command = "xterm -e mailx"; -+ mail_command = "xterm -e Mail"; - x = 100; - y = 100; - sx = 50; -@@ -517,7 +518,7 @@ - | if no font was specified, set font to "6x10" - */ - if (font_name == '\0') -- font_name = "6x10"; -+ font_name = "fixed"; - - /* - | get the font information -@@ -544,7 +545,7 @@ - - if (mail_file[0] == '\0') - { -- strcpy(mail_file, "/usr/mail/"); -+ strcpy(mail_file, "/var/mail/"); - strcat(mail_file, username); - } - -@@ -815,9 +816,14 @@ - | set up bitmaps for the different mailboxes - | (no mail, old mail, or new mail) - */ -- pix[0] = XCreateBitmapFromData(disp_ptr, window_id, nomail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); -- pix[1] = XCreateBitmapFromData(disp_ptr, window_id, newmail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); -- pix[2] = XCreateBitmapFromData(disp_ptr, window_id, oldmail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); -+ pix[0] = XCreateBitmapFromData(disp_ptr, window_id, nomail_bits, 64, 64); -+ pix[1] = XCreateBitmapFromData(disp_ptr, window_id, newmail_bits, 64, 64); -+ pix[2] = XCreateBitmapFromData(disp_ptr, window_id, oldmail_bits, 64, 64); -+/* -+ pix[0] = XCreatePixmapFromBitmapData(disp_ptr, window_id, nomail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); -+ pix[1] = XCreatePixmapFromBitmapData(disp_ptr, window_id, newmail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); -+ pix[2] = XCreatePixmapFromBitmapData(disp_ptr, window_id, oldmail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); -+*/ - - /* - | set up values for window diff --git a/mail/hbiff/files/patch-hbiff.c b/mail/hbiff/files/patch-hbiff.c new file mode 100644 index 000000000000..38e4cb7ac210 --- /dev/null +++ b/mail/hbiff/files/patch-hbiff.c @@ -0,0 +1,55 @@ +--- hbiff.c.orig Sat Nov 22 19:17:50 1997 ++++ hbiff.c Sat Dec 26 14:11:06 1998 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + + extern int errno; +@@ -276,7 +277,7 @@ + /* + | default mail command + */ +- mail_command = "xterm -e mailx"; ++ mail_command = "xterm -e Mail"; + x = 100; + y = 100; + sx = 50; +@@ -517,7 +518,7 @@ + | if no font was specified, set font to "6x10" + */ + if (font_name == '\0') +- font_name = "6x10"; ++ font_name = "fixed"; + + /* + | get the font information +@@ -544,7 +545,7 @@ + + if (mail_file[0] == '\0') + { +- strcpy(mail_file, "/usr/mail/"); ++ strcpy(mail_file, "/var/mail/"); + strcat(mail_file, username); + } + +@@ -815,9 +816,14 @@ + | set up bitmaps for the different mailboxes + | (no mail, old mail, or new mail) + */ +- pix[0] = XCreateBitmapFromData(disp_ptr, window_id, nomail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); +- pix[1] = XCreateBitmapFromData(disp_ptr, window_id, newmail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); +- pix[2] = XCreateBitmapFromData(disp_ptr, window_id, oldmail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); ++ pix[0] = XCreateBitmapFromData(disp_ptr, window_id, nomail_bits, 64, 64); ++ pix[1] = XCreateBitmapFromData(disp_ptr, window_id, newmail_bits, 64, 64); ++ pix[2] = XCreateBitmapFromData(disp_ptr, window_id, oldmail_bits, 64, 64); ++/* ++ pix[0] = XCreatePixmapFromBitmapData(disp_ptr, window_id, nomail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); ++ pix[1] = XCreatePixmapFromBitmapData(disp_ptr, window_id, newmail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); ++ pix[2] = XCreatePixmapFromBitmapData(disp_ptr, window_id, oldmail_bits, 64, 64, foreground, background, XDefaultDepth(disp_ptr, screen)); ++*/ + + /* + | set up values for window diff --git a/mail/imap-uw/files/patch-Makefile b/mail/imap-uw/files/patch-Makefile new file mode 100644 index 000000000000..1da592cee2a5 --- /dev/null +++ b/mail/imap-uw/files/patch-Makefile @@ -0,0 +1,110 @@ +*** Makefile.orig Wed May 9 00:50:45 2007 +--- Makefile Mon Jul 23 17:45:00 2007 +*************** +*** 164,170 **** + # std system standard (typically passwd file), determined by port + # two try alternative (defined by CHECKPWALT), then std + +! PASSWDTYPE=std + + + # SSL type. Defines whether or not SSL support is on this system +--- 164,170 ---- + # std system standard (typically passwd file), determined by port + # two try alternative (defined by CHECKPWALT), then std + +! PASSWDTYPE=pam + + + # SSL type. Defines whether or not SSL support is on this system +*************** +*** 253,264 **** + # British. As of 2005, the Julian calendar and the Gregorian calendar + # diverge by 15 days. + +! EXTRACFLAGS= + + + # Extra linker flags (additional/alternative libraries, etc.) + +! EXTRALDFLAGS= + + + # Special make flags (e.g. to override make environment variables) +--- 253,264 ---- + # British. As of 2005, the Julian calendar and the Gregorian calendar + # diverge by 15 days. + +! EXTRACFLAGS=-I$(PREFIX)/include/c-client + + + # Extra linker flags (additional/alternative libraries, etc.) + +! EXTRALDFLAGS=-L$(PREFIX)/lib -lc-client4 + + + # Special make flags (e.g. to override make environment variables) +*************** +*** 294,306 **** + + # Make the IMAP Toolkit + +! all: c-client SPECIALS rebuild bundled +! +! c-client: +! @echo Not processed yet. In a first-time build, you must specify +! @echo the system type so that the sources are properly processed. +! @false +! + + SPECIALS: + echo $(SPECIALS) > SPECIALS +--- 294,300 ---- + + # Make the IMAP Toolkit + +! all: bundled + + SPECIALS: + echo $(SPECIALS) > SPECIALS +*************** +*** 559,567 **** + @echo + In order to rectify this problem, you MUST build with: + @echo ++ SSLTYPE=$(SSLTYPE).nopwd + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +- @echo +- @echo Do you want to continue this build anyway? Type y or n please: +- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac' + + nounenc: + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +--- 553,558 ---- +*************** +*** 582,590 **** + @echo ++ SSLTYPE=nopwd + @echo + You must also have OpenSSL or equivalent installed. + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +- @echo +- @echo Do you want to continue this build anyway? Type y or n please: +- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nonossl;exit 1);; esac' + + nonossl: + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +--- 573,578 ---- +*************** +*** 659,665 **** + $(TOOLS)/$@ "$(LN)" src/tmail tmail + $(LN) $(TOOLS)/$@ . + +! build: OSTYPE rebuild rebuildclean bundled + + OSTYPE: + @$(MAKE) ip$(IP) +--- 647,653 ---- + $(TOOLS)/$@ "$(LN)" src/tmail tmail + $(LN) $(TOOLS)/$@ . + +! build: bundled + + OSTYPE: + @$(MAKE) ip$(IP) diff --git a/mail/imap-uw/files/patch-aa b/mail/imap-uw/files/patch-aa deleted file mode 100644 index 4615f235b3fb..000000000000 --- a/mail/imap-uw/files/patch-aa +++ /dev/null @@ -1,21 +0,0 @@ ---- src/osdep/unix/os_bsi.h.orig Sat Oct 19 20:30:04 1996 -+++ src/osdep/unix/os_bsi.h Sun May 24 10:46:33 1998 -@@ -37,7 +37,18 @@ - #include - #include - #include -+ -+/* -+ * FreeBSD v3.x and onward whines about being obsolete, so switch -+ * to POSIX semantics. -+ */ -+#if __FreeBSD__ >= 3 -+#include -+#define direct dirent -+#else - #include -+#endif -+ - #include - #include - #include diff --git a/mail/imap-uw/files/patch-ab b/mail/imap-uw/files/patch-ab deleted file mode 100644 index d81228f915c0..000000000000 --- a/mail/imap-uw/files/patch-ab +++ /dev/null @@ -1,154 +0,0 @@ -*** src/osdep/unix/Makefile.orig Sun Jun 17 17:37:44 2007 ---- src/osdep/unix/Makefile Mon Jul 23 17:34:03 2007 -*************** -*** 54,66 **** - - # Extended flags needed for SSL. You may need to modify. - -! SSLDIR=/usr/local/ssl -! SSLCERTS=$(SSLDIR)/certs - SSLKEYS=$(SSLCERTS) - SSLINCLUDE=$(SSLDIR)/include - SSLLIB=$(SSLDIR)/lib - -! SSLCRYPTO=-lcrypto - - # Older versions of MIT Kerberos also have a libcrypto. If so, you may need - # to use this instead ---- 54,66 ---- - - # Extended flags needed for SSL. You may need to modify. - -! #SSLDIR=/usr/local/ssl -! SSLCERTS=$(PREFIX)/certs - SSLKEYS=$(SSLCERTS) - SSLINCLUDE=$(SSLDIR)/include - SSLLIB=$(SSLDIR)/lib - -! SSLCRYPTO=-lcrypto -lcrypt - - # Older versions of MIT Kerberos also have a libcrypto. If so, you may need - # to use this instead -*************** -*** 73,79 **** - - SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\ - -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\" -! SSLLDFLAGS= -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA) - - - # Extended flags needed for non-standard passwd types. You may need to modify. ---- 73,79 ---- - - SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\ - -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\" -! SSLLDFLAGS= # -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA) - - - # Extended flags needed for non-standard passwd types. You may need to modify. -*************** -*** 87,93 **** - # AFSLDFLAGS may also need -L/usr/ucblib -lucb - DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\" - DCELDFLAGS= -ldce -! PAMLDFLAGS= -lpam -ldl - - - # Build parameters normally set by the individual port ---- 87,93 ---- - # AFSLDFLAGS may also need -L/usr/ucblib -lucb - DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\" - DCELDFLAGS= -ldce -! PAMLDFLAGS= # -lpam -lcrypt - - - # Build parameters normally set by the individual port -*************** -*** 125,131 **** - # Commands possibly overriden by the individual port - - ARRC=ar rc -! CC=cc - LN=ln -s - RANLIB=ranlib - ---- 125,131 ---- - # Commands possibly overriden by the individual port - - ARRC=ar rc -! CC?=cc - LN=ln -s - RANLIB=ranlib - -*************** -*** 149,155 **** - dummy.o pseudo.o netmsg.o flstring.o fdstring.o \ - rfc822.o nntp.o smtp.o imap4r1.o pop3.o \ - unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o -! CFLAGS=-g - - CAT=cat - MAKE=make ---- 149,155 ---- - dummy.o pseudo.o netmsg.o flstring.o fdstring.o \ - rfc822.o nntp.o smtp.o imap4r1.o pop3.o \ - unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o -! CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS) - - CAT=cat - MAKE=make -*************** -*** 232,237 **** ---- 232,246 ---- - BASECFLAGS="-g -B/usr/lib/big/ -Dvoid=char -Dconst=" \ - RANLIB=true ARRC="ar -rc" - -+ bfp: # FreeBSD Pluggable Authentication Modules -+ $(BUILD) `cat SPECIALS` OS=bsi SIGTYPE=psx CHECKPW=pam \ -+ SPOOLDIR=/var \ -+ ACTIVEFILE=/usr/local/news/lib/active \ -+ RSHPATH=/usr/bin/rsh \ -+ LOCKPGM=$(PREFIX)/libexec/mlock \ -+ BASECFLAGS="-DNFSKLUDGE" \ -+ BASELDFLAGS="-lpam -lcrypt" -+ - bs3: # BSD/i386 3.0 or higher - $(BUILD) `$(CAT) SPECIALS` OS=bsi \ - CHECKPW=bsi LOGINPW=bsi CRXTYPE=nfs \ -*************** -*** 251,258 **** - SPOOLDIR=/var \ - ACTIVEFILE=/usr/local/news/lib/active \ - RSHPATH=/usr/bin/rsh \ - BASECFLAGS="$(GCCCFLAGS)" \ -! BASELDFLAGS="-lcrypt" - - bsi: # BSD/i386 - $(BUILD) `$(CAT) SPECIALS` OS=$@ \ ---- 260,268 ---- - SPOOLDIR=/var \ - ACTIVEFILE=/usr/local/news/lib/active \ - RSHPATH=/usr/bin/rsh \ -+ LOCKPGM=$(PREFIX)/libexec/mlock \ - BASECFLAGS="$(GCCCFLAGS)" \ -! BASELDFLAGS="" - - bsi: # BSD/i386 - $(BUILD) `$(CAT) SPECIALS` OS=$@ \ -*************** -*** 842,848 **** - - build: clean once $(ARCHIVE) - -! all: $(ARCHIVE) - - $(ARCHIVE): $(BINARIES) - sh -c '$(RM) $(ARCHIVE) || true' ---- 852,858 ---- - - build: clean once $(ARCHIVE) - -! all: onceenv - - $(ARCHIVE): $(BINARIES) - sh -c '$(RM) $(ARCHIVE) || true' diff --git a/mail/imap-uw/files/patch-ac b/mail/imap-uw/files/patch-ac deleted file mode 100644 index 0eb221b2e8ee..000000000000 --- a/mail/imap-uw/files/patch-ac +++ /dev/null @@ -1,85 +0,0 @@ -*** src/imapd/Makefile.orig Thu Aug 31 02:10:44 2006 ---- src/imapd/Makefile Mon Jul 23 18:02:12 2007 -*************** -*** 25,35 **** - # Last Edited: 30 August 2006 - - -! ALERT=/etc/imapd.alert - USERALERT=.imapalert -! SHUTDOWN=/etc/nologin -! ANO=/etc/anonymous.newsgroups -! NNTP=/etc/imapd.nntp - SHELL= /bin/sh - - ---- 25,35 ---- - # Last Edited: 30 August 2006 - - -! ALERT=$(PREFIX)/etc/imapd.alert - USERALERT=.imapalert -! SHUTDOWN=$(PREFIX)/etc/nologin -! ANO=$(PREFIX)/etc/anonymous.newsgroups -! NNTP=$(PREFIX)//etc/imapd.nntp - SHELL= /bin/sh - - -*************** -*** 37,64 **** - # causes the "Manage Mail" menu item to open the given URL, e.g. to point to - # an alternative IMAP client (e.g. Pine) or perhaps to a homebrew mail - # account management page. -! #NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://www.washington.edu/pine\" - - - # Get local definitions from c-client directory - -! C = ../c-client -! CCLIENTLIB = $C/c-client.a -! CC = `cat $C/CCTYPE` -! CFLAGS = -I$C `cat $C/CFLAGS` $(NSBD) $(ENBD) -DANOFILE=\"$(ANO)\" \ - -DALERTFILE=\"$(ALERT)\" -DNNTPFILE=\"$(NNTP)\" \ - -DUSERALERTFILE=\"$(USERALERT)\" -DSHUTDOWNFILE=\"$(SHUTDOWN)\" -! LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` - - all: imapd - -! imapd: $(CCLIENTLIB) imapd.o - $(CC) $(CFLAGS) -o imapd imapd.o $(LDFLAGS) -- -- imapd.o: $C/mail.h $C/misc.h $C/osdep.h -- -- $(CCLIENTLIB): -- cd $C;make - - clean: - rm -f *.o imapd || true ---- 37,63 ---- - # causes the "Manage Mail" menu item to open the given URL, e.g. to point to - # an alternative IMAP client (e.g. Pine) or perhaps to a homebrew mail - # account management page. -! .if defined(WITH_NETSCAPE_BRAIN_DAMAGE) -! NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://www.washington.edu/pine\" -! .endif - - - # Get local definitions from c-client directory - -! CFLAGS = -DNFSKLUDGE -I$(LOCALBASE)/include/c-client $(NSBD) \ -! -DANOFILE=\"$(ANO)\" \ - -DALERTFILE=\"$(ALERT)\" -DNNTPFILE=\"$(NNTP)\" \ - -DUSERALERTFILE=\"$(USERALERT)\" -DSHUTDOWNFILE=\"$(SHUTDOWN)\" -! LDFLAGS+= $(EXTRALDFLAGS) -L$(LOCALBASE)/lib -lc-client4 -! .if defined(WITH_DRAC) -! CFLAGS+= -DETC_DIR=\"$(PREFIX)/etc\" -DDRAC_AUTH -! LDFLAGS+= -ldrac -! .endif - - all: imapd - -! imapd: imapd.o - $(CC) $(CFLAGS) -o imapd imapd.o $(LDFLAGS) - - clean: - rm -f *.o imapd || true diff --git a/mail/imap-uw/files/patch-ad b/mail/imap-uw/files/patch-ad deleted file mode 100644 index 1da592cee2a5..000000000000 --- a/mail/imap-uw/files/patch-ad +++ /dev/null @@ -1,110 +0,0 @@ -*** Makefile.orig Wed May 9 00:50:45 2007 ---- Makefile Mon Jul 23 17:45:00 2007 -*************** -*** 164,170 **** - # std system standard (typically passwd file), determined by port - # two try alternative (defined by CHECKPWALT), then std - -! PASSWDTYPE=std - - - # SSL type. Defines whether or not SSL support is on this system ---- 164,170 ---- - # std system standard (typically passwd file), determined by port - # two try alternative (defined by CHECKPWALT), then std - -! PASSWDTYPE=pam - - - # SSL type. Defines whether or not SSL support is on this system -*************** -*** 253,264 **** - # British. As of 2005, the Julian calendar and the Gregorian calendar - # diverge by 15 days. - -! EXTRACFLAGS= - - - # Extra linker flags (additional/alternative libraries, etc.) - -! EXTRALDFLAGS= - - - # Special make flags (e.g. to override make environment variables) ---- 253,264 ---- - # British. As of 2005, the Julian calendar and the Gregorian calendar - # diverge by 15 days. - -! EXTRACFLAGS=-I$(PREFIX)/include/c-client - - - # Extra linker flags (additional/alternative libraries, etc.) - -! EXTRALDFLAGS=-L$(PREFIX)/lib -lc-client4 - - - # Special make flags (e.g. to override make environment variables) -*************** -*** 294,306 **** - - # Make the IMAP Toolkit - -! all: c-client SPECIALS rebuild bundled -! -! c-client: -! @echo Not processed yet. In a first-time build, you must specify -! @echo the system type so that the sources are properly processed. -! @false -! - - SPECIALS: - echo $(SPECIALS) > SPECIALS ---- 294,300 ---- - - # Make the IMAP Toolkit - -! all: bundled - - SPECIALS: - echo $(SPECIALS) > SPECIALS -*************** -*** 559,567 **** - @echo + In order to rectify this problem, you MUST build with: - @echo ++ SSLTYPE=$(SSLTYPE).nopwd - @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- @echo -- @echo Do you want to continue this build anyway? Type y or n please: -- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac' - - nounenc: - @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ---- 553,558 ---- -*************** -*** 582,590 **** - @echo ++ SSLTYPE=nopwd - @echo + You must also have OpenSSL or equivalent installed. - @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- @echo -- @echo Do you want to continue this build anyway? Type y or n please: -- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nonossl;exit 1);; esac' - - nonossl: - @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ---- 573,578 ---- -*************** -*** 659,665 **** - $(TOOLS)/$@ "$(LN)" src/tmail tmail - $(LN) $(TOOLS)/$@ . - -! build: OSTYPE rebuild rebuildclean bundled - - OSTYPE: - @$(MAKE) ip$(IP) ---- 647,653 ---- - $(TOOLS)/$@ "$(LN)" src/tmail tmail - $(LN) $(TOOLS)/$@ . - -! build: bundled - - OSTYPE: - @$(MAKE) ip$(IP) diff --git a/mail/imap-uw/files/patch-ae b/mail/imap-uw/files/patch-ae deleted file mode 100644 index a3b490909a09..000000000000 --- a/mail/imap-uw/files/patch-ae +++ /dev/null @@ -1,47 +0,0 @@ ---- src/mtest/mtest.c.orig Sat May 29 08:07:06 1999 -+++ src/mtest/mtest.c Sun Dec 19 15:29:29 1999 -@@ -95,6 +95,7 @@ - void status (MAILSTREAM *stream); - void prompt (char *msg,char *txt); - void smtptest (long debug); -+char *safegets(char *buf); - - /* Main program - initialization */ - -@@ -528,7 +529,7 @@ - void prompt (char *msg,char *txt) - { - printf ("%s",msg); -- gets (txt); -+ safegets (txt); - } - - /* Interfaces to C-client */ -@@ -713,7 +714,7 @@ - puts (" Msg (end with a line with only a '.'):"); - body->type = TYPETEXT; - *text = '\0'; -- while (gets (line)) { -+ while (safegets (line)) { - if (line[0] == '.') { - if (line[1] == '\0') break; - else strcat (text,"."); -@@ -744,4 +745,18 @@ - else puts ("[Can't open connection to any server]"); - mail_free_envelope (&msg); - mail_free_body (&body); -+} -+ -+char *safegets(char *buf) { -+ char *p; -+ -+ if (!fgets(buf, MAILTMPLEN, stdin)) { -+ return NULL; -+ } -+ -+ if ((p = strchr(buf, '\n')) != NULL) { -+ *p = '\0'; -+ } -+ -+ return buf; - } diff --git a/mail/imap-uw/files/patch-af b/mail/imap-uw/files/patch-af deleted file mode 100644 index 2464eff218fd..000000000000 --- a/mail/imap-uw/files/patch-af +++ /dev/null @@ -1,41 +0,0 @@ ---- src/ipopd/Makefile.orig Wed Oct 25 01:55:07 2000 -+++ src/ipopd/Makefile Mon Oct 1 03:44:26 2001 -@@ -19,29 +19,25 @@ - - - C = ../c-client --CCLIENTLIB = $C/c-client.a -+#CCLIENTLIB = $C/c-client.a - SHELL = /bin/sh - - # Get local definitions from c-client directory - --CC = `cat $C/CCTYPE` --CFLAGS = -I$C `cat $C/CFLAGS` --LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` -+CFLAGS+= -DNFSKLUDGE -I$(LOCALBASE)/include/c-client -+LDFLAGS+= -L$(LOCALBASE)/lib -lc-client4 -+.if defined(WITH_DRAC) -+CFLAGS+= -DDRAC_AUTH -DETC_DIR=\"$(PREFIX)/etc\" -+LDFLAGS+= -ldrac -+.endif - - ipopd: ipop2d ipop3d - --ipop2d: $(CCLIENTLIB) ipop2d.o -+ipop2d: ipop2d.o - $(CC) $(CFLAGS) -o ipop2d ipop2d.o $(LDFLAGS) - --ipop3d: $(CCLIENTLIB) ipop3d.o -+ipop3d: ipop3d.o - $(CC) $(CFLAGS) -o ipop3d ipop3d.o $(LDFLAGS) -- --ipop2d.o: $C/mail.h $C/misc.h $C/osdep.h -- --ipop3d.o: $C/mail.h $C/misc.h $C/osdep.h -- --$(CCLIENTLIB): -- cd $C;make - - clean: - rm -f *.o ipop2d ipop3d || true diff --git a/mail/imap-uw/files/patch-ag b/mail/imap-uw/files/patch-ag deleted file mode 100644 index 041d6a63b98e..000000000000 --- a/mail/imap-uw/files/patch-ag +++ /dev/null @@ -1,30 +0,0 @@ ---- src/mtest/Makefile.orig Wed Oct 25 01:55:39 2000 -+++ src/mtest/Makefile Mon Oct 1 03:42:11 2001 -@@ -19,24 +19,17 @@ - - - C = ../c-client --CCLIENTLIB = $C/c-client.a - SHELL = /bin/sh - - # Get local definitions from c-client directory - --CC = `cat $C/CCTYPE` --CFLAGS = -I$C `cat $C/CFLAGS` --LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` -+CFLAGS+= -DNFSKLUDGE -I$(LOCALBASE)/include/c-client -+LDFLAGS+= -L$(LOCALBASE)/lib -lc-client4 - - all: mtest - --mtest: $(CCLIENTLIB) mtest.o -+mtest: mtest.o - $(CC) $(CFLAGS) -o mtest mtest.o $(LDFLAGS) -- --mtest.o: $C/mail.h $C/misc.h $C/osdep.h $C/rfc822.h $C/smtp.h $C/nntp.h -- --$(CCLIENTLIB): -- cd $C;make - - clean: - rm -f *.o mtest || true diff --git a/mail/imap-uw/files/patch-ah b/mail/imap-uw/files/patch-ah deleted file mode 100644 index a9f3715c6158..000000000000 --- a/mail/imap-uw/files/patch-ah +++ /dev/null @@ -1,131 +0,0 @@ ---- src/ipopd/ipop3d.c.orig 2008-06-04 20:18:34.000000000 +0200 -+++ src/ipopd/ipop3d.c 2009-01-16 10:19:50.000000000 +0100 -@@ -34,6 +34,11 @@ - #include - #include "c-client.h" - -+#ifdef DRAC_AUTH -+#include -+#include -+#include -+#endif /* DRAC_AUTH */ - - #define CRLF PSOUT ("\015\012") /* primary output terpri */ - -@@ -59,6 +64,12 @@ - - /* Global storage */ - -+#ifdef DRAC_AUTH -+#define DRACTIMEOUT 10*60 /* check every 10 minutes */ -+time_t lastdrac = 0; /* time of last drac check */ -+extern char *getenv (); -+#endif /* DRAC_AUTH */ -+ - char *version = "104"; /* edit number of this server */ - short state = AUTHORIZATION; /* server state */ - short critical = NIL; /* non-zero if in critical code */ -@@ -100,7 +111,53 @@ - int mbxopen (char *mailbox); - long blat (char *text,long lines,unsigned long size,STRING *st); - void rset (); -- -+#ifdef DRAC_AUTH -+void drac_auth(); -+#endif /* DRAC_AUTH */ -+ -+#ifdef DRAC_AUTH -+/* DRAC Authorization -+ */ -+void drac_auth () -+{ -+ if (time (0) > lastdrac + DRACTIMEOUT) -+ { -+ FILE *dracconf; -+ char host[100]; -+ char *drachost; -+ char *err; -+ char *p; -+ -+ if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL) -+ { -+ syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR); -+ exit(1); -+ } -+ -+ fgets(host, 100, dracconf); -+ p = strchr(host, '\n'); -+ if(p != NULL) -+ *p = '\0'; -+ fclose(dracconf); -+ -+ if( drachost = (host) ) -+ { -+ struct sockaddr_in sin; -+ int sinlen = sizeof (struct sockaddr_in); -+ char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ? -+ "UNKNOWN" : inet_ntoa (sin.sin_addr); -+ -+ lastdrac = time(0); -+ -+ if (dracauth(drachost, inet_addr(client), &err) != 0) -+ syslog (LOG_INFO, err); -+ else -+ syslog (LOG_INFO, "dracd: authorized ip %s", client); -+ } -+ } -+} -+#endif /* DRAC_AUTH */ -+ - /* Main program */ - - int main (int argc,char *argv[]) -@@ -113,7 +170,7 @@ - (((s = strrchr (argv[0],'/')) || (s = strrchr (argv[0],'\\'))) ? - s+1 : argv[0]) : "ipop3d"; - /* set service name before linkage */ -- mail_parameters (NIL,SET_SERVICENAME,(void *) "pop"); -+ mail_parameters (NIL,SET_SERVICENAME,(void *) "pop3"); - #include "linkage.c" - /* initialize server */ - server_init (pgmname,"pop3","pop3s",clkint,kodint,hupint,trmint,NIL); -@@ -228,9 +285,13 @@ - syslog (LOG_INFO,"AUTHENTICATE %s failure host=%.80s",s, - tcp_clienthost ()); - } -- else if ((state = mbxopen ("INBOX")) == TRANSACTION) -+ else if ((state = mbxopen ("INBOX")) == TRANSACTION) { -+ #ifdef DRAC_AUTH -+ drac_auth(); -+ #endif /* DRAC_AUTH */ - syslog (LOG_INFO,"Auth user=%.80s host=%.80s nmsgs=%lu/%lu", - user,tcp_clienthost (),nmsgs,stream->nmsgs); -+ } - else syslog (LOG_INFO,"Auth user=%.80s host=%.80s no mailbox", - user,tcp_clienthost ()); - } -@@ -260,9 +321,13 @@ - PSOUT ("-ERR Missing APOP argument\015\012"); - else if (!(user = apop_login (challenge,s,t,argc,argv))) - PSOUT ("-ERR Bad APOP\015\012"); -- else if ((state = mbxopen ("INBOX")) == TRANSACTION) -+ else if ((state = mbxopen ("INBOX")) == TRANSACTION) { -+ #ifdef DRAC_AUTH -+ drac_auth(); -+ #endif /* DRAC_AUTH */ - syslog (LOG_INFO,"APOP user=%.80s host=%.80s nmsgs=%lu/%lu", - user,tcp_clienthost (),nmsgs,stream->nmsgs); -+ } - else syslog (LOG_INFO,"APOP user=%.80s host=%.80s no mailbox", - user,tcp_clienthost ()); - } -@@ -665,6 +730,9 @@ - /* attempt the login */ - if (server_login (user,pass,t,argc,argv)) { - int ret = mbxopen ("INBOX"); -+ #ifdef DRAC_AUTH -+ drac_auth(); -+ #endif /* DRAC_AUTH */ - if (ret == TRANSACTION) /* mailbox opened OK? */ - syslog (LOG_INFO,"%sLogin user=%.80s host=%.80s nmsgs=%lu/%lu", - t ? "Admin " : "",user,tcp_clienthost (),nmsgs,stream->nmsgs); diff --git a/mail/imap-uw/files/patch-ai b/mail/imap-uw/files/patch-ai deleted file mode 100644 index a1dc32829b12..000000000000 --- a/mail/imap-uw/files/patch-ai +++ /dev/null @@ -1,89 +0,0 @@ ---- src/imapd/imapd.c.orig 2008-11-18 19:46:59.000000000 +0100 -+++ src/imapd/imapd.c 2009-01-16 10:23:02.000000000 +0100 -@@ -37,6 +37,11 @@ - #include "newsrc.h" - #include - -+#ifdef DRAC_AUTH -+#include -+#include -+#include -+#endif /* DRAC_AUTH */ - - #define CRLF PSOUT ("\015\012") /* primary output terpri */ - -@@ -207,6 +212,12 @@ - - /* Global storage */ - -+#ifdef DRAC_AUTH -+#define DRACTIMEOUT 10*60 /* check every 10 minutes */ -+time_t lastdrac = 0; /* time of last drac check */ -+extern char *getenv (); -+#endif /* DRAC_AUTH */ -+ - char *version = "404"; /* edit number of this server */ - char *logout = "Logout"; /* syslogreason for logout */ - char *goodbye = NIL; /* bye reason */ -@@ -283,7 +294,50 @@ - msg_string_next, /* get next byte in string structure */ - msg_string_setpos /* set position in string structure */ - }; -- -+ -+#ifdef DRAC_AUTH -+/* DRAC Authorization -+ */ -+void drac_auth () -+{ -+ if (time (0) > lastdrac + DRACTIMEOUT) -+ { -+ FILE *dracconf; -+ char host[100]; -+ char *drachost; -+ char *err; -+ char *p; -+ -+ if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL) -+ { -+ syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR); -+ exit(1); -+ } -+ -+ fgets(host, 100, dracconf); -+ p = strchr(host, '\n'); -+ if(p != NULL) -+ *p = '\0'; -+ fclose(dracconf); -+ -+ if( drachost = (host) ) -+ { -+ struct sockaddr_in sin; -+ int sinlen = sizeof (struct sockaddr_in); -+ char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ? -+ "UNKNOWN" : inet_ntoa (sin.sin_addr); -+ -+ lastdrac = time(0); -+ -+ if (dracauth(drachost, inet_addr(client), &err) != 0) -+ syslog (LOG_INFO, err); -+ else -+ syslog (LOG_INFO, "dracd: authorized ip %s", client); -+ } -+ } -+} -+#endif /* DRAC_AUTH */ -+ - /* Main program */ - - int main (int argc,char *argv[]) -@@ -1525,6 +1579,9 @@ - lasterror ()); - return; - } -+ #ifdef DRAC_AUTH -+ drac_auth(); -+ #endif /* DRAC_AUTH */ - /* change in number of messages? */ - if (existsquelled || (nmsgs != stream->nmsgs)) { - PSOUT ("* "); diff --git a/mail/imap-uw/files/patch-src_imapd_Makefile b/mail/imap-uw/files/patch-src_imapd_Makefile new file mode 100644 index 000000000000..0eb221b2e8ee --- /dev/null +++ b/mail/imap-uw/files/patch-src_imapd_Makefile @@ -0,0 +1,85 @@ +*** src/imapd/Makefile.orig Thu Aug 31 02:10:44 2006 +--- src/imapd/Makefile Mon Jul 23 18:02:12 2007 +*************** +*** 25,35 **** + # Last Edited: 30 August 2006 + + +! ALERT=/etc/imapd.alert + USERALERT=.imapalert +! SHUTDOWN=/etc/nologin +! ANO=/etc/anonymous.newsgroups +! NNTP=/etc/imapd.nntp + SHELL= /bin/sh + + +--- 25,35 ---- + # Last Edited: 30 August 2006 + + +! ALERT=$(PREFIX)/etc/imapd.alert + USERALERT=.imapalert +! SHUTDOWN=$(PREFIX)/etc/nologin +! ANO=$(PREFIX)/etc/anonymous.newsgroups +! NNTP=$(PREFIX)//etc/imapd.nntp + SHELL= /bin/sh + + +*************** +*** 37,64 **** + # causes the "Manage Mail" menu item to open the given URL, e.g. to point to + # an alternative IMAP client (e.g. Pine) or perhaps to a homebrew mail + # account management page. +! #NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://www.washington.edu/pine\" + + + # Get local definitions from c-client directory + +! C = ../c-client +! CCLIENTLIB = $C/c-client.a +! CC = `cat $C/CCTYPE` +! CFLAGS = -I$C `cat $C/CFLAGS` $(NSBD) $(ENBD) -DANOFILE=\"$(ANO)\" \ + -DALERTFILE=\"$(ALERT)\" -DNNTPFILE=\"$(NNTP)\" \ + -DUSERALERTFILE=\"$(USERALERT)\" -DSHUTDOWNFILE=\"$(SHUTDOWN)\" +! LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` + + all: imapd + +! imapd: $(CCLIENTLIB) imapd.o + $(CC) $(CFLAGS) -o imapd imapd.o $(LDFLAGS) +- +- imapd.o: $C/mail.h $C/misc.h $C/osdep.h +- +- $(CCLIENTLIB): +- cd $C;make + + clean: + rm -f *.o imapd || true +--- 37,63 ---- + # causes the "Manage Mail" menu item to open the given URL, e.g. to point to + # an alternative IMAP client (e.g. Pine) or perhaps to a homebrew mail + # account management page. +! .if defined(WITH_NETSCAPE_BRAIN_DAMAGE) +! NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://www.washington.edu/pine\" +! .endif + + + # Get local definitions from c-client directory + +! CFLAGS = -DNFSKLUDGE -I$(LOCALBASE)/include/c-client $(NSBD) \ +! -DANOFILE=\"$(ANO)\" \ + -DALERTFILE=\"$(ALERT)\" -DNNTPFILE=\"$(NNTP)\" \ + -DUSERALERTFILE=\"$(USERALERT)\" -DSHUTDOWNFILE=\"$(SHUTDOWN)\" +! LDFLAGS+= $(EXTRALDFLAGS) -L$(LOCALBASE)/lib -lc-client4 +! .if defined(WITH_DRAC) +! CFLAGS+= -DETC_DIR=\"$(PREFIX)/etc\" -DDRAC_AUTH +! LDFLAGS+= -ldrac +! .endif + + all: imapd + +! imapd: imapd.o + $(CC) $(CFLAGS) -o imapd imapd.o $(LDFLAGS) + + clean: + rm -f *.o imapd || true diff --git a/mail/imap-uw/files/patch-src_imapd_imapd.c b/mail/imap-uw/files/patch-src_imapd_imapd.c new file mode 100644 index 000000000000..a1dc32829b12 --- /dev/null +++ b/mail/imap-uw/files/patch-src_imapd_imapd.c @@ -0,0 +1,89 @@ +--- src/imapd/imapd.c.orig 2008-11-18 19:46:59.000000000 +0100 ++++ src/imapd/imapd.c 2009-01-16 10:23:02.000000000 +0100 +@@ -37,6 +37,11 @@ + #include "newsrc.h" + #include + ++#ifdef DRAC_AUTH ++#include ++#include ++#include ++#endif /* DRAC_AUTH */ + + #define CRLF PSOUT ("\015\012") /* primary output terpri */ + +@@ -207,6 +212,12 @@ + + /* Global storage */ + ++#ifdef DRAC_AUTH ++#define DRACTIMEOUT 10*60 /* check every 10 minutes */ ++time_t lastdrac = 0; /* time of last drac check */ ++extern char *getenv (); ++#endif /* DRAC_AUTH */ ++ + char *version = "404"; /* edit number of this server */ + char *logout = "Logout"; /* syslogreason for logout */ + char *goodbye = NIL; /* bye reason */ +@@ -283,7 +294,50 @@ + msg_string_next, /* get next byte in string structure */ + msg_string_setpos /* set position in string structure */ + }; +- ++ ++#ifdef DRAC_AUTH ++/* DRAC Authorization ++ */ ++void drac_auth () ++{ ++ if (time (0) > lastdrac + DRACTIMEOUT) ++ { ++ FILE *dracconf; ++ char host[100]; ++ char *drachost; ++ char *err; ++ char *p; ++ ++ if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL) ++ { ++ syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR); ++ exit(1); ++ } ++ ++ fgets(host, 100, dracconf); ++ p = strchr(host, '\n'); ++ if(p != NULL) ++ *p = '\0'; ++ fclose(dracconf); ++ ++ if( drachost = (host) ) ++ { ++ struct sockaddr_in sin; ++ int sinlen = sizeof (struct sockaddr_in); ++ char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ? ++ "UNKNOWN" : inet_ntoa (sin.sin_addr); ++ ++ lastdrac = time(0); ++ ++ if (dracauth(drachost, inet_addr(client), &err) != 0) ++ syslog (LOG_INFO, err); ++ else ++ syslog (LOG_INFO, "dracd: authorized ip %s", client); ++ } ++ } ++} ++#endif /* DRAC_AUTH */ ++ + /* Main program */ + + int main (int argc,char *argv[]) +@@ -1525,6 +1579,9 @@ + lasterror ()); + return; + } ++ #ifdef DRAC_AUTH ++ drac_auth(); ++ #endif /* DRAC_AUTH */ + /* change in number of messages? */ + if (existsquelled || (nmsgs != stream->nmsgs)) { + PSOUT ("* "); diff --git a/mail/imap-uw/files/patch-src_ipopd_Makefile b/mail/imap-uw/files/patch-src_ipopd_Makefile new file mode 100644 index 000000000000..2464eff218fd --- /dev/null +++ b/mail/imap-uw/files/patch-src_ipopd_Makefile @@ -0,0 +1,41 @@ +--- src/ipopd/Makefile.orig Wed Oct 25 01:55:07 2000 ++++ src/ipopd/Makefile Mon Oct 1 03:44:26 2001 +@@ -19,29 +19,25 @@ + + + C = ../c-client +-CCLIENTLIB = $C/c-client.a ++#CCLIENTLIB = $C/c-client.a + SHELL = /bin/sh + + # Get local definitions from c-client directory + +-CC = `cat $C/CCTYPE` +-CFLAGS = -I$C `cat $C/CFLAGS` +-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` ++CFLAGS+= -DNFSKLUDGE -I$(LOCALBASE)/include/c-client ++LDFLAGS+= -L$(LOCALBASE)/lib -lc-client4 ++.if defined(WITH_DRAC) ++CFLAGS+= -DDRAC_AUTH -DETC_DIR=\"$(PREFIX)/etc\" ++LDFLAGS+= -ldrac ++.endif + + ipopd: ipop2d ipop3d + +-ipop2d: $(CCLIENTLIB) ipop2d.o ++ipop2d: ipop2d.o + $(CC) $(CFLAGS) -o ipop2d ipop2d.o $(LDFLAGS) + +-ipop3d: $(CCLIENTLIB) ipop3d.o ++ipop3d: ipop3d.o + $(CC) $(CFLAGS) -o ipop3d ipop3d.o $(LDFLAGS) +- +-ipop2d.o: $C/mail.h $C/misc.h $C/osdep.h +- +-ipop3d.o: $C/mail.h $C/misc.h $C/osdep.h +- +-$(CCLIENTLIB): +- cd $C;make + + clean: + rm -f *.o ipop2d ipop3d || true diff --git a/mail/imap-uw/files/patch-src_ipopd_ipop3d.c b/mail/imap-uw/files/patch-src_ipopd_ipop3d.c new file mode 100644 index 000000000000..a9f3715c6158 --- /dev/null +++ b/mail/imap-uw/files/patch-src_ipopd_ipop3d.c @@ -0,0 +1,131 @@ +--- src/ipopd/ipop3d.c.orig 2008-06-04 20:18:34.000000000 +0200 ++++ src/ipopd/ipop3d.c 2009-01-16 10:19:50.000000000 +0100 +@@ -34,6 +34,11 @@ + #include + #include "c-client.h" + ++#ifdef DRAC_AUTH ++#include ++#include ++#include ++#endif /* DRAC_AUTH */ + + #define CRLF PSOUT ("\015\012") /* primary output terpri */ + +@@ -59,6 +64,12 @@ + + /* Global storage */ + ++#ifdef DRAC_AUTH ++#define DRACTIMEOUT 10*60 /* check every 10 minutes */ ++time_t lastdrac = 0; /* time of last drac check */ ++extern char *getenv (); ++#endif /* DRAC_AUTH */ ++ + char *version = "104"; /* edit number of this server */ + short state = AUTHORIZATION; /* server state */ + short critical = NIL; /* non-zero if in critical code */ +@@ -100,7 +111,53 @@ + int mbxopen (char *mailbox); + long blat (char *text,long lines,unsigned long size,STRING *st); + void rset (); +- ++#ifdef DRAC_AUTH ++void drac_auth(); ++#endif /* DRAC_AUTH */ ++ ++#ifdef DRAC_AUTH ++/* DRAC Authorization ++ */ ++void drac_auth () ++{ ++ if (time (0) > lastdrac + DRACTIMEOUT) ++ { ++ FILE *dracconf; ++ char host[100]; ++ char *drachost; ++ char *err; ++ char *p; ++ ++ if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL) ++ { ++ syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR); ++ exit(1); ++ } ++ ++ fgets(host, 100, dracconf); ++ p = strchr(host, '\n'); ++ if(p != NULL) ++ *p = '\0'; ++ fclose(dracconf); ++ ++ if( drachost = (host) ) ++ { ++ struct sockaddr_in sin; ++ int sinlen = sizeof (struct sockaddr_in); ++ char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ? ++ "UNKNOWN" : inet_ntoa (sin.sin_addr); ++ ++ lastdrac = time(0); ++ ++ if (dracauth(drachost, inet_addr(client), &err) != 0) ++ syslog (LOG_INFO, err); ++ else ++ syslog (LOG_INFO, "dracd: authorized ip %s", client); ++ } ++ } ++} ++#endif /* DRAC_AUTH */ ++ + /* Main program */ + + int main (int argc,char *argv[]) +@@ -113,7 +170,7 @@ + (((s = strrchr (argv[0],'/')) || (s = strrchr (argv[0],'\\'))) ? + s+1 : argv[0]) : "ipop3d"; + /* set service name before linkage */ +- mail_parameters (NIL,SET_SERVICENAME,(void *) "pop"); ++ mail_parameters (NIL,SET_SERVICENAME,(void *) "pop3"); + #include "linkage.c" + /* initialize server */ + server_init (pgmname,"pop3","pop3s",clkint,kodint,hupint,trmint,NIL); +@@ -228,9 +285,13 @@ + syslog (LOG_INFO,"AUTHENTICATE %s failure host=%.80s",s, + tcp_clienthost ()); + } +- else if ((state = mbxopen ("INBOX")) == TRANSACTION) ++ else if ((state = mbxopen ("INBOX")) == TRANSACTION) { ++ #ifdef DRAC_AUTH ++ drac_auth(); ++ #endif /* DRAC_AUTH */ + syslog (LOG_INFO,"Auth user=%.80s host=%.80s nmsgs=%lu/%lu", + user,tcp_clienthost (),nmsgs,stream->nmsgs); ++ } + else syslog (LOG_INFO,"Auth user=%.80s host=%.80s no mailbox", + user,tcp_clienthost ()); + } +@@ -260,9 +321,13 @@ + PSOUT ("-ERR Missing APOP argument\015\012"); + else if (!(user = apop_login (challenge,s,t,argc,argv))) + PSOUT ("-ERR Bad APOP\015\012"); +- else if ((state = mbxopen ("INBOX")) == TRANSACTION) ++ else if ((state = mbxopen ("INBOX")) == TRANSACTION) { ++ #ifdef DRAC_AUTH ++ drac_auth(); ++ #endif /* DRAC_AUTH */ + syslog (LOG_INFO,"APOP user=%.80s host=%.80s nmsgs=%lu/%lu", + user,tcp_clienthost (),nmsgs,stream->nmsgs); ++ } + else syslog (LOG_INFO,"APOP user=%.80s host=%.80s no mailbox", + user,tcp_clienthost ()); + } +@@ -665,6 +730,9 @@ + /* attempt the login */ + if (server_login (user,pass,t,argc,argv)) { + int ret = mbxopen ("INBOX"); ++ #ifdef DRAC_AUTH ++ drac_auth(); ++ #endif /* DRAC_AUTH */ + if (ret == TRANSACTION) /* mailbox opened OK? */ + syslog (LOG_INFO,"%sLogin user=%.80s host=%.80s nmsgs=%lu/%lu", + t ? "Admin " : "",user,tcp_clienthost (),nmsgs,stream->nmsgs); diff --git a/mail/imap-uw/files/patch-src_mtest_Makefile b/mail/imap-uw/files/patch-src_mtest_Makefile new file mode 100644 index 000000000000..041d6a63b98e --- /dev/null +++ b/mail/imap-uw/files/patch-src_mtest_Makefile @@ -0,0 +1,30 @@ +--- src/mtest/Makefile.orig Wed Oct 25 01:55:39 2000 ++++ src/mtest/Makefile Mon Oct 1 03:42:11 2001 +@@ -19,24 +19,17 @@ + + + C = ../c-client +-CCLIENTLIB = $C/c-client.a + SHELL = /bin/sh + + # Get local definitions from c-client directory + +-CC = `cat $C/CCTYPE` +-CFLAGS = -I$C `cat $C/CFLAGS` +-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` ++CFLAGS+= -DNFSKLUDGE -I$(LOCALBASE)/include/c-client ++LDFLAGS+= -L$(LOCALBASE)/lib -lc-client4 + + all: mtest + +-mtest: $(CCLIENTLIB) mtest.o ++mtest: mtest.o + $(CC) $(CFLAGS) -o mtest mtest.o $(LDFLAGS) +- +-mtest.o: $C/mail.h $C/misc.h $C/osdep.h $C/rfc822.h $C/smtp.h $C/nntp.h +- +-$(CCLIENTLIB): +- cd $C;make + + clean: + rm -f *.o mtest || true diff --git a/mail/imap-uw/files/patch-src_mtest_mtest.c b/mail/imap-uw/files/patch-src_mtest_mtest.c new file mode 100644 index 000000000000..a3b490909a09 --- /dev/null +++ b/mail/imap-uw/files/patch-src_mtest_mtest.c @@ -0,0 +1,47 @@ +--- src/mtest/mtest.c.orig Sat May 29 08:07:06 1999 ++++ src/mtest/mtest.c Sun Dec 19 15:29:29 1999 +@@ -95,6 +95,7 @@ + void status (MAILSTREAM *stream); + void prompt (char *msg,char *txt); + void smtptest (long debug); ++char *safegets(char *buf); + + /* Main program - initialization */ + +@@ -528,7 +529,7 @@ + void prompt (char *msg,char *txt) + { + printf ("%s",msg); +- gets (txt); ++ safegets (txt); + } + + /* Interfaces to C-client */ +@@ -713,7 +714,7 @@ + puts (" Msg (end with a line with only a '.'):"); + body->type = TYPETEXT; + *text = '\0'; +- while (gets (line)) { ++ while (safegets (line)) { + if (line[0] == '.') { + if (line[1] == '\0') break; + else strcat (text,"."); +@@ -744,4 +745,18 @@ + else puts ("[Can't open connection to any server]"); + mail_free_envelope (&msg); + mail_free_body (&body); ++} ++ ++char *safegets(char *buf) { ++ char *p; ++ ++ if (!fgets(buf, MAILTMPLEN, stdin)) { ++ return NULL; ++ } ++ ++ if ((p = strchr(buf, '\n')) != NULL) { ++ *p = '\0'; ++ } ++ ++ return buf; + } diff --git a/mail/imap-uw/files/patch-src_osdep_unix_Makefile b/mail/imap-uw/files/patch-src_osdep_unix_Makefile new file mode 100644 index 000000000000..d81228f915c0 --- /dev/null +++ b/mail/imap-uw/files/patch-src_osdep_unix_Makefile @@ -0,0 +1,154 @@ +*** src/osdep/unix/Makefile.orig Sun Jun 17 17:37:44 2007 +--- src/osdep/unix/Makefile Mon Jul 23 17:34:03 2007 +*************** +*** 54,66 **** + + # Extended flags needed for SSL. You may need to modify. + +! SSLDIR=/usr/local/ssl +! SSLCERTS=$(SSLDIR)/certs + SSLKEYS=$(SSLCERTS) + SSLINCLUDE=$(SSLDIR)/include + SSLLIB=$(SSLDIR)/lib + +! SSLCRYPTO=-lcrypto + + # Older versions of MIT Kerberos also have a libcrypto. If so, you may need + # to use this instead +--- 54,66 ---- + + # Extended flags needed for SSL. You may need to modify. + +! #SSLDIR=/usr/local/ssl +! SSLCERTS=$(PREFIX)/certs + SSLKEYS=$(SSLCERTS) + SSLINCLUDE=$(SSLDIR)/include + SSLLIB=$(SSLDIR)/lib + +! SSLCRYPTO=-lcrypto -lcrypt + + # Older versions of MIT Kerberos also have a libcrypto. If so, you may need + # to use this instead +*************** +*** 73,79 **** + + SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\ + -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\" +! SSLLDFLAGS= -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA) + + + # Extended flags needed for non-standard passwd types. You may need to modify. +--- 73,79 ---- + + SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\ + -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\" +! SSLLDFLAGS= # -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA) + + + # Extended flags needed for non-standard passwd types. You may need to modify. +*************** +*** 87,93 **** + # AFSLDFLAGS may also need -L/usr/ucblib -lucb + DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\" + DCELDFLAGS= -ldce +! PAMLDFLAGS= -lpam -ldl + + + # Build parameters normally set by the individual port +--- 87,93 ---- + # AFSLDFLAGS may also need -L/usr/ucblib -lucb + DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\" + DCELDFLAGS= -ldce +! PAMLDFLAGS= # -lpam -lcrypt + + + # Build parameters normally set by the individual port +*************** +*** 125,131 **** + # Commands possibly overriden by the individual port + + ARRC=ar rc +! CC=cc + LN=ln -s + RANLIB=ranlib + +--- 125,131 ---- + # Commands possibly overriden by the individual port + + ARRC=ar rc +! CC?=cc + LN=ln -s + RANLIB=ranlib + +*************** +*** 149,155 **** + dummy.o pseudo.o netmsg.o flstring.o fdstring.o \ + rfc822.o nntp.o smtp.o imap4r1.o pop3.o \ + unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o +! CFLAGS=-g + + CAT=cat + MAKE=make +--- 149,155 ---- + dummy.o pseudo.o netmsg.o flstring.o fdstring.o \ + rfc822.o nntp.o smtp.o imap4r1.o pop3.o \ + unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o +! CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS) + + CAT=cat + MAKE=make +*************** +*** 232,237 **** +--- 232,246 ---- + BASECFLAGS="-g -B/usr/lib/big/ -Dvoid=char -Dconst=" \ + RANLIB=true ARRC="ar -rc" + ++ bfp: # FreeBSD Pluggable Authentication Modules ++ $(BUILD) `cat SPECIALS` OS=bsi SIGTYPE=psx CHECKPW=pam \ ++ SPOOLDIR=/var \ ++ ACTIVEFILE=/usr/local/news/lib/active \ ++ RSHPATH=/usr/bin/rsh \ ++ LOCKPGM=$(PREFIX)/libexec/mlock \ ++ BASECFLAGS="-DNFSKLUDGE" \ ++ BASELDFLAGS="-lpam -lcrypt" ++ + bs3: # BSD/i386 3.0 or higher + $(BUILD) `$(CAT) SPECIALS` OS=bsi \ + CHECKPW=bsi LOGINPW=bsi CRXTYPE=nfs \ +*************** +*** 251,258 **** + SPOOLDIR=/var \ + ACTIVEFILE=/usr/local/news/lib/active \ + RSHPATH=/usr/bin/rsh \ + BASECFLAGS="$(GCCCFLAGS)" \ +! BASELDFLAGS="-lcrypt" + + bsi: # BSD/i386 + $(BUILD) `$(CAT) SPECIALS` OS=$@ \ +--- 260,268 ---- + SPOOLDIR=/var \ + ACTIVEFILE=/usr/local/news/lib/active \ + RSHPATH=/usr/bin/rsh \ ++ LOCKPGM=$(PREFIX)/libexec/mlock \ + BASECFLAGS="$(GCCCFLAGS)" \ +! BASELDFLAGS="" + + bsi: # BSD/i386 + $(BUILD) `$(CAT) SPECIALS` OS=$@ \ +*************** +*** 842,848 **** + + build: clean once $(ARCHIVE) + +! all: $(ARCHIVE) + + $(ARCHIVE): $(BINARIES) + sh -c '$(RM) $(ARCHIVE) || true' +--- 852,858 ---- + + build: clean once $(ARCHIVE) + +! all: onceenv + + $(ARCHIVE): $(BINARIES) + sh -c '$(RM) $(ARCHIVE) || true' diff --git a/mail/imap-uw/files/patch-src_osdep_unix_os_bsi.h b/mail/imap-uw/files/patch-src_osdep_unix_os_bsi.h new file mode 100644 index 000000000000..4615f235b3fb --- /dev/null +++ b/mail/imap-uw/files/patch-src_osdep_unix_os_bsi.h @@ -0,0 +1,21 @@ +--- src/osdep/unix/os_bsi.h.orig Sat Oct 19 20:30:04 1996 ++++ src/osdep/unix/os_bsi.h Sun May 24 10:46:33 1998 +@@ -37,7 +37,18 @@ + #include + #include + #include ++ ++/* ++ * FreeBSD v3.x and onward whines about being obsolete, so switch ++ * to POSIX semantics. ++ */ ++#if __FreeBSD__ >= 3 ++#include ++#define direct dirent ++#else + #include ++#endif ++ + #include + #include + #include diff --git a/mail/mail2sms/files/patch-aa b/mail/mail2sms/files/patch-aa deleted file mode 100644 index 9c6426113e45..000000000000 --- a/mail/mail2sms/files/patch-aa +++ /dev/null @@ -1,79 +0,0 @@ ---- main.c.orig Wed Apr 16 05:11:21 2003 -+++ main.c Wed Apr 16 05:12:16 2003 -@@ -18,7 +18,7 @@ - #ifdef AFS - #define CONFIGDIR "/var/mail2sms/" - #else --#define GLOBAL_CONFIG "/etc/mail/sms/mail2sms.conf" -+#define GLOBAL_CONFIG "%%PREFIX%%/etc/mail2sms.conf" - #endif - - extern FILE *logfile; /* write logs to this file pointer */ ---- parse.c.orig Wed Apr 16 05:06:23 2003 -+++ parse.c Wed Apr 16 05:45:31 2003 -@@ -48,8 +48,9 @@ - /* - ** strcasestr() - case insensitive strstr() - */ -- --char *strcasestr(char *haystack, char *needle) -+ -+/* FreeBSD defines this function a bit differently, so rename this version */ -+char *mail2sms_strcasestr(char *haystack, char *needle) - { - int nlen = strlen(needle); - int hlen = strlen(haystack); -@@ -325,7 +326,7 @@ struct body * process(char *mbox, /* - if (use_stdin || !mbox || !strcasecmp(mbox, "NONE")) - fp = stdin; - else if ((fp = fopen(mbox, "r")) == NULL) { -- return; /* add error code */ -+ return -1; /* add error code */ - } - - isinheader = 1; ---- mail2sms.1.orig Wed Apr 16 05:22:01 2003 -+++ mail2sms.1 Wed Apr 16 05:22:57 2003 -@@ -32,7 +32,7 @@ - .IP "-v" - Shows mail2sms' version number then quits. - .SH AUTHORS --mail2sms has been written by Daniel Stenberg with lofs of -+mail2sms has been written by Daniel Stenberg with lots of - help from friendly contributors, such as: - - - Linus Nielsen -@@ -48,4 +48,4 @@ - .SH WWW - http://www.contactor.se/~dast/mail2sms/ - .SH "SEE ALSO" --.BR mail2sms (4) -+.BR mail2sms (5) ---- mail2sms.4.orig Wed Apr 16 05:11:35 2003 -+++ mail2sms.4 Wed Apr 16 06:03:10 2003 -@@ -1,12 +1,12 @@ - .\" You can view this file with: --.\" nroff -man mail2sms.4 -+.\" nroff -man mail2sms.5 - .\" Written by Daniel Stenberg - .\" --.TH mail2sms 4 "11 October 1999" -+.TH mail2sms 5 "11 October 1999" - .SH NAME - mail2sms \- reads a (MIME) mail and converts it to a short message. - .SH SYNOPSIS --.B /etc/mail/sms/mail2sms.conf -+.B %%PREFIX%%/etc/mail2sms.conf - .br - .B ~/.mail2sms - .SH DESCRIPTION -@@ -67,7 +67,7 @@ - http://www.contactor.se/~dast/mail2sms/ - .SH "SEE ALSO" - .BR mail2sms (1), --.BR sendmail (1M), -+.BR sendmail (8), - .BR procmail (1), --.BR aliases (4) -+.BR aliases (5) - diff --git a/mail/mail2sms/files/patch-mail2sms.1 b/mail/mail2sms/files/patch-mail2sms.1 new file mode 100644 index 000000000000..34d60cfce867 --- /dev/null +++ b/mail/mail2sms/files/patch-mail2sms.1 @@ -0,0 +1,17 @@ +--- mail2sms.1.orig Wed Apr 16 05:22:01 2003 ++++ mail2sms.1 Wed Apr 16 05:22:57 2003 +@@ -32,7 +32,7 @@ + .IP "-v" + Shows mail2sms' version number then quits. + .SH AUTHORS +-mail2sms has been written by Daniel Stenberg with lofs of ++mail2sms has been written by Daniel Stenberg with lots of + help from friendly contributors, such as: + + - Linus Nielsen +@@ -48,4 +48,4 @@ + .SH WWW + http://www.contactor.se/~dast/mail2sms/ + .SH "SEE ALSO" +-.BR mail2sms (4) ++.BR mail2sms (5) diff --git a/mail/mail2sms/files/patch-mail2sms.4 b/mail/mail2sms/files/patch-mail2sms.4 new file mode 100644 index 000000000000..325d30d5548e --- /dev/null +++ b/mail/mail2sms/files/patch-mail2sms.4 @@ -0,0 +1,28 @@ +--- mail2sms.4.orig Wed Apr 16 05:11:35 2003 ++++ mail2sms.4 Wed Apr 16 06:03:10 2003 +@@ -1,12 +1,12 @@ + .\" You can view this file with: +-.\" nroff -man mail2sms.4 ++.\" nroff -man mail2sms.5 + .\" Written by Daniel Stenberg + .\" +-.TH mail2sms 4 "11 October 1999" ++.TH mail2sms 5 "11 October 1999" + .SH NAME + mail2sms \- reads a (MIME) mail and converts it to a short message. + .SH SYNOPSIS +-.B /etc/mail/sms/mail2sms.conf ++.B %%PREFIX%%/etc/mail2sms.conf + .br + .B ~/.mail2sms + .SH DESCRIPTION +@@ -67,7 +67,7 @@ + http://www.contactor.se/~dast/mail2sms/ + .SH "SEE ALSO" + .BR mail2sms (1), +-.BR sendmail (1M), ++.BR sendmail (8), + .BR procmail (1), +-.BR aliases (4) ++.BR aliases (5) + diff --git a/mail/mail2sms/files/patch-main.c b/mail/mail2sms/files/patch-main.c new file mode 100644 index 000000000000..ff54c97870b8 --- /dev/null +++ b/mail/mail2sms/files/patch-main.c @@ -0,0 +1,11 @@ +--- main.c.orig Wed Apr 16 05:11:21 2003 ++++ main.c Wed Apr 16 05:12:16 2003 +@@ -18,7 +18,7 @@ + #ifdef AFS + #define CONFIGDIR "/var/mail2sms/" + #else +-#define GLOBAL_CONFIG "/etc/mail/sms/mail2sms.conf" ++#define GLOBAL_CONFIG "%%PREFIX%%/etc/mail2sms.conf" + #endif + + extern FILE *logfile; /* write logs to this file pointer */ diff --git a/mail/mail2sms/files/patch-parse.c b/mail/mail2sms/files/patch-parse.c new file mode 100644 index 000000000000..0c46925f1574 --- /dev/null +++ b/mail/mail2sms/files/patch-parse.c @@ -0,0 +1,23 @@ +--- parse.c.orig Wed Apr 16 05:06:23 2003 ++++ parse.c Wed Apr 16 05:45:31 2003 +@@ -48,8 +48,9 @@ + /* + ** strcasestr() - case insensitive strstr() + */ +- +-char *strcasestr(char *haystack, char *needle) ++ ++/* FreeBSD defines this function a bit differently, so rename this version */ ++char *mail2sms_strcasestr(char *haystack, char *needle) + { + int nlen = strlen(needle); + int hlen = strlen(haystack); +@@ -325,7 +326,7 @@ struct body * process(char *mbox, /* + if (use_stdin || !mbox || !strcasecmp(mbox, "NONE")) + fp = stdin; + else if ((fp = fopen(mbox, "r")) == NULL) { +- return; /* add error code */ ++ return -1; /* add error code */ + } + + isinheader = 1; diff --git a/mail/mailagent/files/patch-ac b/mail/mailagent/files/patch-ac deleted file mode 100644 index ab4f26f2f2aa..000000000000 --- a/mail/mailagent/files/patch-ac +++ /dev/null @@ -1,21 +0,0 @@ ---- agent/filter/io.c.orig Wed Jul 29 02:41:11 1998 -+++ agent/filter/io.c Mon Aug 10 21:01:22 1998 -@@ -120,6 +120,9 @@ - #ifdef I_SYS_IOCTL - #include - #endif -+#ifdef I_SYS_PARAM -+#include -+#endif - - /* - * The following should be defined in . -@@ -713,7 +716,7 @@ - */ - - char **envp; /* Environment pointer */ --#ifdef UNION_WAIT -+#if defined(UNION_WAIT) && (!defined(BSD) || BSD < 199306) - union wait status; /* Waiting status */ - #else - int status; /* Status from command */ diff --git a/mail/mailagent/files/patch-agent-filter-io.c b/mail/mailagent/files/patch-agent-filter-io.c new file mode 100644 index 000000000000..ab4f26f2f2aa --- /dev/null +++ b/mail/mailagent/files/patch-agent-filter-io.c @@ -0,0 +1,21 @@ +--- agent/filter/io.c.orig Wed Jul 29 02:41:11 1998 ++++ agent/filter/io.c Mon Aug 10 21:01:22 1998 +@@ -120,6 +120,9 @@ + #ifdef I_SYS_IOCTL + #include + #endif ++#ifdef I_SYS_PARAM ++#include ++#endif + + /* + * The following should be defined in . +@@ -713,7 +716,7 @@ + */ + + char **envp; /* Environment pointer */ +-#ifdef UNION_WAIT ++#if defined(UNION_WAIT) && (!defined(BSD) || BSD < 199306) + union wait status; /* Waiting status */ + #else + int status; /* Status from command */ diff --git a/mail/mailagent/files/patch-agent-filter-logfile.c b/mail/mailagent/files/patch-agent-filter-logfile.c new file mode 100644 index 000000000000..60a0bcbc130a --- /dev/null +++ b/mail/mailagent/files/patch-agent-filter-logfile.c @@ -0,0 +1,15 @@ +--- agent/filter/logfile.c.orig Fri Mar 17 12:59:44 2006 ++++ agent/filter/logfile.c Fri Mar 17 13:02:25 2006 +@@ -47,6 +47,12 @@ + #include + #include + ++#ifdef I_STRING ++#include ++#else ++#include ++#endif ++ + #ifdef I_TIME + # include + #endif diff --git a/mail/mailagent/files/patch-agent-man-Makefile.SH b/mail/mailagent/files/patch-agent-man-Makefile.SH new file mode 100644 index 000000000000..9e4bb2cc9fcd --- /dev/null +++ b/mail/mailagent/files/patch-agent-man-Makefile.SH @@ -0,0 +1,12 @@ +--- agent/man/Makefile.SH.orig Sun Mar 18 03:31:22 2001 ++++ agent/man/Makefile.SH Tue Sep 3 07:51:50 2002 +@@ -85,8 +85,7 @@ + # Baseline for mailagent 3.0 netwide release. + # + +-MPAGES = mailagent.$(L) maildist.$(L) maillist.$(L) mailhelp.$(L) \ +- mailpatch.$(L) package.$(L) edusers.$(L) ++MPAGES = mailagent.$(L) mailhelp.$(L) package.$(L) edusers.$(L) + + all:: $(MPAGES) + diff --git a/mail/mailagent/files/patch-agent::filter::logfile.c b/mail/mailagent/files/patch-agent::filter::logfile.c deleted file mode 100644 index 60a0bcbc130a..000000000000 --- a/mail/mailagent/files/patch-agent::filter::logfile.c +++ /dev/null @@ -1,15 +0,0 @@ ---- agent/filter/logfile.c.orig Fri Mar 17 12:59:44 2006 -+++ agent/filter/logfile.c Fri Mar 17 13:02:25 2006 -@@ -47,6 +47,12 @@ - #include - #include - -+#ifdef I_STRING -+#include -+#else -+#include -+#endif -+ - #ifdef I_TIME - # include - #endif diff --git a/mail/mailagent/files/patch-agent::man::Makefile.SH b/mail/mailagent/files/patch-agent::man::Makefile.SH deleted file mode 100644 index 9e4bb2cc9fcd..000000000000 --- a/mail/mailagent/files/patch-agent::man::Makefile.SH +++ /dev/null @@ -1,12 +0,0 @@ ---- agent/man/Makefile.SH.orig Sun Mar 18 03:31:22 2001 -+++ agent/man/Makefile.SH Tue Sep 3 07:51:50 2002 -@@ -85,8 +85,7 @@ - # Baseline for mailagent 3.0 netwide release. - # - --MPAGES = mailagent.$(L) maildist.$(L) maillist.$(L) mailhelp.$(L) \ -- mailpatch.$(L) package.$(L) edusers.$(L) -+MPAGES = mailagent.$(L) mailhelp.$(L) package.$(L) edusers.$(L) - - all:: $(MPAGES) - diff --git a/mail/mess822/files/patch-aa b/mail/mess822/files/patch-aa deleted file mode 100644 index a32b04085e24..000000000000 --- a/mail/mess822/files/patch-aa +++ /dev/null @@ -1,73 +0,0 @@ -*** hier.c.orig Sat Sep 5 04:33:37 1998 ---- hier.c Thu Apr 15 12:55:16 2004 -*************** -*** 2,21 **** - - void hier() - { -! h(auto_home,-1,-1,02755); - -! d(auto_home,"bin",-1,-1,02755); -! d(auto_home,"lib",-1,-1,02755); -! d(auto_home,"include",-1,-1,02755); -! d(auto_home,"man",-1,-1,02755); -! d(auto_home,"man/man1",-1,-1,02755); -! d(auto_home,"man/man3",-1,-1,02755); -! d(auto_home,"man/man5",-1,-1,02755); -! d(auto_home,"man/man8",-1,-1,02755); -! d(auto_home,"man/cat1",-1,-1,02755); -! d(auto_home,"man/cat3",-1,-1,02755); -! d(auto_home,"man/cat5",-1,-1,02755); -! d(auto_home,"man/cat8",-1,-1,02755); - - c(auto_home,"lib","mess822.a",-1,-1,0644); - c(auto_home,"include","mess822.h",-1,-1,0644); ---- 2,18 ---- - - void hier() - { -! h(auto_home,-1,-1,0755); - -! d(auto_home,"bin",-1,-1,0755); -! d(auto_home,"lib",-1,-1,0755); -! d(auto_home,"include",-1,-1,0755); -! d(auto_home,"man",-1,-1,0755); -! d(auto_home,"man/man1",-1,-1,0755); -! d(auto_home,"man/man3",-1,-1,0755); -! d(auto_home,"man/man5",-1,-1,0755); -! d(auto_home,"man/man8",-1,-1,0755); -! d(auto_home,"etc",-1,-1,0755); - - c(auto_home,"lib","mess822.a",-1,-1,0644); - c(auto_home,"include","mess822.h",-1,-1,0644); -*************** -*** 48,70 **** - c(auto_home,"man/man3","mess822_token.3",-1,-1,0644); - c(auto_home,"man/man3","mess822_when.3",-1,-1,0644); - -! c(auto_home,"man/cat1","iftocc.0",-1,-1,0644); -! c(auto_home,"man/cat1","new-inject.0",-1,-1,0644); -! c(auto_home,"man/cat1","822field.0",-1,-1,0644); -! c(auto_home,"man/cat1","822header.0",-1,-1,0644); -! c(auto_home,"man/cat1","822date.0",-1,-1,0644); -! c(auto_home,"man/cat1","822received.0",-1,-1,0644); -! c(auto_home,"man/cat1","822print.0",-1,-1,0644); -! c(auto_home,"man/cat5","rewriting.0",-1,-1,0644); -! c(auto_home,"man/cat8","ofmipd.0",-1,-1,0644); -! c(auto_home,"man/cat8","ofmipname.0",-1,-1,0644); -! c(auto_home,"man/cat3","mess822.0",-1,-1,0644); -! c(auto_home,"man/cat3","mess822_addr.0",-1,-1,0644); -! c(auto_home,"man/cat3","mess822_date.0",-1,-1,0644); -! c(auto_home,"man/cat3","mess822_fold.0",-1,-1,0644); -! c(auto_home,"man/cat3","mess822_quote.0",-1,-1,0644); -! c(auto_home,"man/cat3","mess822_token.0",-1,-1,0644); -! c(auto_home,"man/cat3","mess822_when.0",-1,-1,0644); -! -! c("/etc",".","leapsecs.dat",-1,-1,0644); - } ---- 45,49 ---- - c(auto_home,"man/man3","mess822_token.3",-1,-1,0644); - c(auto_home,"man/man3","mess822_when.3",-1,-1,0644); - -! c(auto_home,"etc","leapsecs.dat",-1,-1,0644); - } diff --git a/mail/mess822/files/patch-hier.c b/mail/mess822/files/patch-hier.c new file mode 100644 index 000000000000..a32b04085e24 --- /dev/null +++ b/mail/mess822/files/patch-hier.c @@ -0,0 +1,73 @@ +*** hier.c.orig Sat Sep 5 04:33:37 1998 +--- hier.c Thu Apr 15 12:55:16 2004 +*************** +*** 2,21 **** + + void hier() + { +! h(auto_home,-1,-1,02755); + +! d(auto_home,"bin",-1,-1,02755); +! d(auto_home,"lib",-1,-1,02755); +! d(auto_home,"include",-1,-1,02755); +! d(auto_home,"man",-1,-1,02755); +! d(auto_home,"man/man1",-1,-1,02755); +! d(auto_home,"man/man3",-1,-1,02755); +! d(auto_home,"man/man5",-1,-1,02755); +! d(auto_home,"man/man8",-1,-1,02755); +! d(auto_home,"man/cat1",-1,-1,02755); +! d(auto_home,"man/cat3",-1,-1,02755); +! d(auto_home,"man/cat5",-1,-1,02755); +! d(auto_home,"man/cat8",-1,-1,02755); + + c(auto_home,"lib","mess822.a",-1,-1,0644); + c(auto_home,"include","mess822.h",-1,-1,0644); +--- 2,18 ---- + + void hier() + { +! h(auto_home,-1,-1,0755); + +! d(auto_home,"bin",-1,-1,0755); +! d(auto_home,"lib",-1,-1,0755); +! d(auto_home,"include",-1,-1,0755); +! d(auto_home,"man",-1,-1,0755); +! d(auto_home,"man/man1",-1,-1,0755); +! d(auto_home,"man/man3",-1,-1,0755); +! d(auto_home,"man/man5",-1,-1,0755); +! d(auto_home,"man/man8",-1,-1,0755); +! d(auto_home,"etc",-1,-1,0755); + + c(auto_home,"lib","mess822.a",-1,-1,0644); + c(auto_home,"include","mess822.h",-1,-1,0644); +*************** +*** 48,70 **** + c(auto_home,"man/man3","mess822_token.3",-1,-1,0644); + c(auto_home,"man/man3","mess822_when.3",-1,-1,0644); + +! c(auto_home,"man/cat1","iftocc.0",-1,-1,0644); +! c(auto_home,"man/cat1","new-inject.0",-1,-1,0644); +! c(auto_home,"man/cat1","822field.0",-1,-1,0644); +! c(auto_home,"man/cat1","822header.0",-1,-1,0644); +! c(auto_home,"man/cat1","822date.0",-1,-1,0644); +! c(auto_home,"man/cat1","822received.0",-1,-1,0644); +! c(auto_home,"man/cat1","822print.0",-1,-1,0644); +! c(auto_home,"man/cat5","rewriting.0",-1,-1,0644); +! c(auto_home,"man/cat8","ofmipd.0",-1,-1,0644); +! c(auto_home,"man/cat8","ofmipname.0",-1,-1,0644); +! c(auto_home,"man/cat3","mess822.0",-1,-1,0644); +! c(auto_home,"man/cat3","mess822_addr.0",-1,-1,0644); +! c(auto_home,"man/cat3","mess822_date.0",-1,-1,0644); +! c(auto_home,"man/cat3","mess822_fold.0",-1,-1,0644); +! c(auto_home,"man/cat3","mess822_quote.0",-1,-1,0644); +! c(auto_home,"man/cat3","mess822_token.0",-1,-1,0644); +! c(auto_home,"man/cat3","mess822_when.0",-1,-1,0644); +! +! c("/etc",".","leapsecs.dat",-1,-1,0644); + } +--- 45,49 ---- + c(auto_home,"man/man3","mess822_token.3",-1,-1,0644); + c(auto_home,"man/man3","mess822_when.3",-1,-1,0644); + +! c(auto_home,"etc","leapsecs.dat",-1,-1,0644); + } diff --git a/mail/ml/files/patch-Imakefile_1 b/mail/ml/files/patch-Imakefile_1 new file mode 100644 index 000000000000..21f8d4f6b707 --- /dev/null +++ b/mail/ml/files/patch-Imakefile_1 @@ -0,0 +1,35 @@ +--- Imakefile.orig Tue Mar 31 02:59:36 1998 ++++ Imakefile Sun Jun 13 13:44:39 1999 +@@ -4,7 +4,7 @@ + XCOMM We need /usr/include, the current src dir, the parent of this + XCOMM dir, the parent of X11, and the parent of the Motif (Xm) include dir + +-EXTRA_INCLUDES = -I../Xm -I/usr/openwin/include -I$(INCROOT) -I./ -I../ ++EXTRA_INCLUDES = -I/usr/dt/include -DDEFAULT_LIBDIR="\"${LOCALBASE}/lib/X11/ml\"" -I$(INCROOT) -I. -I.. + + + XCOMM `Compile time defines: +@@ -18,19 +18,19 @@ + XCOMM This hasn't yet been tested. + XCOMM -DNO_EDITRES If your X release doesn't have Xmu/Editres.h + +-CFLAGS= -g -DFALLBACK $(EXTRA_INCLUDES) ++CFLAGS+=-DFALLBACK $(EXTRA_INCLUDES) + + + XCOMM Location of Motif library. If Motif 2.0, add the location of + XCOMM the Xpm library also + +-XMLIB= -L../Xm -lXm ../Xm/libXpm.a ++XMLIB=${MOTIFLIB} -lXp + + LOCAL_LIBRARIES = ../imap-4/c-client/c-client.a + + +-OTHERLIBS=-lgen +-ML_LIBDIR=/usr/local/lib/ml ++OTHERLIBS=-lcrypt ++ML_LIBDIR=${LOCALBASE}/lib/X11/ml + HELP_FILES=`find ../lib -type f -print` + + XCOMM Default font sizes. Linux folks will want FONTSIZE=14 (or diff --git a/mail/ml/files/patch-Imakefile_2 b/mail/ml/files/patch-Imakefile_2 new file mode 100644 index 000000000000..c295f1b80a8e --- /dev/null +++ b/mail/ml/files/patch-Imakefile_2 @@ -0,0 +1,11 @@ +--- Imakefile.orig Wed Nov 1 07:26:10 2000 ++++ Imakefile Wed Nov 1 07:27:21 2000 +@@ -118,7 +118,7 @@ + + SYS_LIBRARIES = $(OTHERLIBS) $(XMLIB) $(XMULIB) $(XTOOLLIB) $(XEXTLIB) $(XLIB) + +-ComplexProgramTarget(ml) ++ComplexProgramTargetNoMan(ml) + + InstallAppDefaultsLong(../lib/ML,ML) + diff --git a/mail/ml/files/patch-aa b/mail/ml/files/patch-aa deleted file mode 100644 index 1b9178ffd035..000000000000 --- a/mail/ml/files/patch-aa +++ /dev/null @@ -1,21 +0,0 @@ ---- ../imap-4/src/osdep/unix/Makefile.orig Mon Mar 30 17:07:21 1998 -+++ ../imap-4/src/osdep/unix/Makefile Sat Jun 26 02:04:49 1999 -@@ -39,7 +39,7 @@ - netmsg.o rfc822.o nntp.o smtp.o imap4.o pop3.o \ - bezerk.o mbox.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o - EXTRACFLAGS= --CFLAGS=$(EXTRACFLAGS) -+#CFLAGS=$(EXTRACFLAGS) - EXTRADRIVERS=mbox mbx - DEFAULTDRIVERS=imap nntp pop3 mh tenex mtx mmdf bezerk news phile dummy - LN=ln -s -@@ -109,7 +109,8 @@ - bsi: # BSD/i386 - $(MAKE) mtest OS=$@ EXTRADRIVERS="$(EXTRADRIVERS)" \ - STDPROTO=bezerkproto \ -- RSHPATH=/usr/bin/rsh CFLAGS="-g -O -pipe $(EXTRACFLAGS)" -+ RSHPATH=/usr/bin/rsh CFLAGS="$(CFLAGS) $(EXTRACFLAGS)" \ -+ LDFLAGS="-lcrypt" - - cvx: # Convex - $(MAKE) mtest OS=$@ EXTRADRIVERS="$(EXTRADRIVERS)" \ diff --git a/mail/ml/files/patch-ab b/mail/ml/files/patch-ab deleted file mode 100644 index 21f8d4f6b707..000000000000 --- a/mail/ml/files/patch-ab +++ /dev/null @@ -1,35 +0,0 @@ ---- Imakefile.orig Tue Mar 31 02:59:36 1998 -+++ Imakefile Sun Jun 13 13:44:39 1999 -@@ -4,7 +4,7 @@ - XCOMM We need /usr/include, the current src dir, the parent of this - XCOMM dir, the parent of X11, and the parent of the Motif (Xm) include dir - --EXTRA_INCLUDES = -I../Xm -I/usr/openwin/include -I$(INCROOT) -I./ -I../ -+EXTRA_INCLUDES = -I/usr/dt/include -DDEFAULT_LIBDIR="\"${LOCALBASE}/lib/X11/ml\"" -I$(INCROOT) -I. -I.. - - - XCOMM `Compile time defines: -@@ -18,19 +18,19 @@ - XCOMM This hasn't yet been tested. - XCOMM -DNO_EDITRES If your X release doesn't have Xmu/Editres.h - --CFLAGS= -g -DFALLBACK $(EXTRA_INCLUDES) -+CFLAGS+=-DFALLBACK $(EXTRA_INCLUDES) - - - XCOMM Location of Motif library. If Motif 2.0, add the location of - XCOMM the Xpm library also - --XMLIB= -L../Xm -lXm ../Xm/libXpm.a -+XMLIB=${MOTIFLIB} -lXp - - LOCAL_LIBRARIES = ../imap-4/c-client/c-client.a - - --OTHERLIBS=-lgen --ML_LIBDIR=/usr/local/lib/ml -+OTHERLIBS=-lcrypt -+ML_LIBDIR=${LOCALBASE}/lib/X11/ml - HELP_FILES=`find ../lib -type f -print` - - XCOMM Default font sizes. Linux folks will want FONTSIZE=14 (or diff --git a/mail/ml/files/patch-ac b/mail/ml/files/patch-ac deleted file mode 100644 index 7cf9decb6b65..000000000000 --- a/mail/ml/files/patch-ac +++ /dev/null @@ -1,13 +0,0 @@ -*** ../lib/CheckConnection.ppp.orig Sun Mar 15 20:59:57 1998 ---- ../lib/CheckConnection.ppp Sun Mar 15 21:00:41 1998 -*************** -*** 1,4 **** - #!/bin/sh -! netstat -i | grep ppp >& /dev/null || exit 1 - exit 0 - ---- 1,4 ---- - #!/bin/sh -! netstat -i | grep tun0 >& /dev/null || exit 1 - exit 0 - diff --git a/mail/ml/files/patch-ad b/mail/ml/files/patch-ad deleted file mode 100644 index dcbdda8ac3fb..000000000000 --- a/mail/ml/files/patch-ad +++ /dev/null @@ -1,43 +0,0 @@ -*** ../lib/ML.ad.orig Sun Mar 15 21:35:32 1998 ---- ../lib/ML.ad Sun Mar 15 21:38:17 1998 -*************** -*** 8,26 **** - - ! All the fonts specified by the program - -! *XmCascadeButton*fontList: -*-courier-bold-r-normal--12-* -! *XmPushButton*fontList: -*-courier-bold-r-normal--12-* -! *XmLabel*fontList: -*-courier-bold-r-normal--12-* -! *XmText*fontList: -*-courier-medium-r-normal--12-* -! *XmTextField*fontList: -*-courier-medium-r-normal--12-* -! *XmList*fontList: -*-courier-medium-r-normal--12-* - - - *lview*XmList.FontList:\ -! *-courier-medium-r-*--12-*=NORMAL,\ -! *-courier-bold-r-*--12-*=BOLD,\ -! *-courier-medium-o-*--12-*=ITALIC,\ -! *-courier-bold-o-*--12-*=BOLD_ITALIC - - - !*ispellCommand: xterm -e ispell %s ---- 8,26 ---- - - ! All the fonts specified by the program - -! *XmCascadeButton*fontList: -*-helvetica-bold-r-normal--12-* -! *XmPushButton*fontList: -*-helvetica-bold-r-normal--12-* -! *XmLabel*fontList: -*-helvetica-bold-r-normal--12-* -! *XmText*fontList: -*-courier-medium-r-normal--14-* -! *XmTextField*fontList: -*-courier-medium-r-normal--14-* -! *XmList*fontList: -*-helvetica-medium-r-normal--12-* - - - *lview*XmList.FontList:\ -! *-courier-medium-r-*--14-*=NORMAL,\ -! *-courier-bold-r-*--14-*=BOLD,\ -! *-courier-medium-o-*--14-*=ITALIC,\ -! *-courier-bold-o-*--14-*=BOLD_ITALIC - - - !*ispellCommand: xterm -e ispell %s diff --git a/mail/ml/files/patch-ae b/mail/ml/files/patch-ae deleted file mode 100644 index c5d3797740e8..000000000000 --- a/mail/ml/files/patch-ae +++ /dev/null @@ -1,30 +0,0 @@ ---- ../imap-4/src/osdep/unix/os_bsi.h.orig Mon Mar 30 17:07:22 1998 -+++ ../imap-4/src/osdep/unix/os_bsi.h Sat Jun 26 02:13:22 1999 -@@ -34,13 +34,25 @@ - */ - - #define MAILFILE "/var/mail/%s" --#define ACTIVEFILE "/usr/lib/news/active" --#define NEWSSPOOL "/usr/spool/news" -+#define ACTIVEFILE "/usr/local/news/db/active" /* inn-stable port */ -+#define NEWSSPOOL "/var/spool/news" /* inn-stable port */ - - #include - #include - #include -+ -+/* -+ * From ports/mail/imap-uw: -+ * FreeBSD v3.x and onward whines about being obsolete, so switch -+ * to POSIX semantics. -+ */ -+#if __FreeBSD__ >= 3 -+#include -+#define direct dirent -+#else - #include -+#endif -+ - #include /* needed for writev() prototypes */ - #include - #include diff --git a/mail/ml/files/patch-af b/mail/ml/files/patch-af deleted file mode 100644 index d986c4773ff4..000000000000 --- a/mail/ml/files/patch-af +++ /dev/null @@ -1,20 +0,0 @@ ---- ../imap-4/src/c-client/mtest.c.orig Sun Jun 13 16:51:38 1999 -+++ ../imap-4/src/c-client/mtest.c Sun Jun 13 16:54:03 1999 -@@ -479,7 +479,7 @@ - void prompt (char *msg,char *txt) - { - printf ("%s",msg); -- gets (txt); -+ fgets (txt, (8 * MAILTMPLEN), stdin); - } - - /* Interfaces to C-client */ -@@ -664,7 +664,7 @@ - puts (" Msg (end with a line with only a '.'):"); - body->type = TYPETEXT; - *text = '\0'; -- while (gets (line)) { -+ while (fgets (line, MAILTMPLEN, stdin)) { - if (line[0] == '.') { - if (line[1] == '\0') break; - else strcat ((char *) text,"."); diff --git a/mail/ml/files/patch-ag b/mail/ml/files/patch-ag deleted file mode 100644 index c295f1b80a8e..000000000000 --- a/mail/ml/files/patch-ag +++ /dev/null @@ -1,11 +0,0 @@ ---- Imakefile.orig Wed Nov 1 07:26:10 2000 -+++ Imakefile Wed Nov 1 07:27:21 2000 -@@ -118,7 +118,7 @@ - - SYS_LIBRARIES = $(OTHERLIBS) $(XMLIB) $(XMULIB) $(XTOOLLIB) $(XEXTLIB) $(XLIB) - --ComplexProgramTarget(ml) -+ComplexProgramTargetNoMan(ml) - - InstallAppDefaultsLong(../lib/ML,ML) - diff --git a/mail/ml/files/patch-imap-4-src-c-client-mtest.c b/mail/ml/files/patch-imap-4-src-c-client-mtest.c new file mode 100644 index 000000000000..d986c4773ff4 --- /dev/null +++ b/mail/ml/files/patch-imap-4-src-c-client-mtest.c @@ -0,0 +1,20 @@ +--- ../imap-4/src/c-client/mtest.c.orig Sun Jun 13 16:51:38 1999 ++++ ../imap-4/src/c-client/mtest.c Sun Jun 13 16:54:03 1999 +@@ -479,7 +479,7 @@ + void prompt (char *msg,char *txt) + { + printf ("%s",msg); +- gets (txt); ++ fgets (txt, (8 * MAILTMPLEN), stdin); + } + + /* Interfaces to C-client */ +@@ -664,7 +664,7 @@ + puts (" Msg (end with a line with only a '.'):"); + body->type = TYPETEXT; + *text = '\0'; +- while (gets (line)) { ++ while (fgets (line, MAILTMPLEN, stdin)) { + if (line[0] == '.') { + if (line[1] == '\0') break; + else strcat ((char *) text,"."); diff --git a/mail/ml/files/patch-imap-4-src-osdep-unix-Makefile b/mail/ml/files/patch-imap-4-src-osdep-unix-Makefile new file mode 100644 index 000000000000..1b9178ffd035 --- /dev/null +++ b/mail/ml/files/patch-imap-4-src-osdep-unix-Makefile @@ -0,0 +1,21 @@ +--- ../imap-4/src/osdep/unix/Makefile.orig Mon Mar 30 17:07:21 1998 ++++ ../imap-4/src/osdep/unix/Makefile Sat Jun 26 02:04:49 1999 +@@ -39,7 +39,7 @@ + netmsg.o rfc822.o nntp.o smtp.o imap4.o pop3.o \ + bezerk.o mbox.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o + EXTRACFLAGS= +-CFLAGS=$(EXTRACFLAGS) ++#CFLAGS=$(EXTRACFLAGS) + EXTRADRIVERS=mbox mbx + DEFAULTDRIVERS=imap nntp pop3 mh tenex mtx mmdf bezerk news phile dummy + LN=ln -s +@@ -109,7 +109,8 @@ + bsi: # BSD/i386 + $(MAKE) mtest OS=$@ EXTRADRIVERS="$(EXTRADRIVERS)" \ + STDPROTO=bezerkproto \ +- RSHPATH=/usr/bin/rsh CFLAGS="-g -O -pipe $(EXTRACFLAGS)" ++ RSHPATH=/usr/bin/rsh CFLAGS="$(CFLAGS) $(EXTRACFLAGS)" \ ++ LDFLAGS="-lcrypt" + + cvx: # Convex + $(MAKE) mtest OS=$@ EXTRADRIVERS="$(EXTRADRIVERS)" \ diff --git a/mail/ml/files/patch-imap-4-src-osdep-unix-mmdf.c b/mail/ml/files/patch-imap-4-src-osdep-unix-mmdf.c new file mode 100644 index 000000000000..81a7a6ac7b47 --- /dev/null +++ b/mail/ml/files/patch-imap-4-src-osdep-unix-mmdf.c @@ -0,0 +1,20 @@ +--- ../imap-4/src/osdep/unix/mmdf.c.orig Tue Mar 31 13:07:25 1998 ++++ ../imap-4/src/osdep/unix/mmdf.c Sat Aug 20 00:17:25 2005 +@@ -869,7 +869,7 @@ + /* length of internal + message headers */ + iov[j].iov_len = (m->header + m->headersize) - m->internal; + /* suppress extra newline if present */ +- if ((iov[j].iov_base)[iov[j].iov_len - 2] == '\n') iov[j++].iov_len--; ++ if (((char *)iov[j].iov_base)[iov[j].iov_len - 2] == '\n') iov[j++].iov_len--; + else j++; /* unlikely but... */ + /* status */ + iov[j].iov_base = status; +@@ -1727,7 +1727,7 @@ + /* length of internal + message headers */ + iov[j].iov_len = (m->header + m->headersize) - m->internal; + /* suppress extra newline if present */ +- if ((iov[j].iov_base)[iov[j].iov_len - 2] == '\n') iov[j++].iov_len--; ++ if (((char *)iov[j].iov_base)[iov[j].iov_len - 2] == '\n') iov[j++].iov_len--; + else j++; /* unlikely but... */ + /* status */ + iov[j].iov_base = LOCAL->buf; diff --git a/mail/ml/files/patch-imap-4-src-osdep-unix-os_bsi.h b/mail/ml/files/patch-imap-4-src-osdep-unix-os_bsi.h new file mode 100644 index 000000000000..c5d3797740e8 --- /dev/null +++ b/mail/ml/files/patch-imap-4-src-osdep-unix-os_bsi.h @@ -0,0 +1,30 @@ +--- ../imap-4/src/osdep/unix/os_bsi.h.orig Mon Mar 30 17:07:22 1998 ++++ ../imap-4/src/osdep/unix/os_bsi.h Sat Jun 26 02:13:22 1999 +@@ -34,13 +34,25 @@ + */ + + #define MAILFILE "/var/mail/%s" +-#define ACTIVEFILE "/usr/lib/news/active" +-#define NEWSSPOOL "/usr/spool/news" ++#define ACTIVEFILE "/usr/local/news/db/active" /* inn-stable port */ ++#define NEWSSPOOL "/var/spool/news" /* inn-stable port */ + + #include + #include + #include ++ ++/* ++ * From ports/mail/imap-uw: ++ * FreeBSD v3.x and onward whines about being obsolete, so switch ++ * to POSIX semantics. ++ */ ++#if __FreeBSD__ >= 3 ++#include ++#define direct dirent ++#else + #include ++#endif ++ + #include /* needed for writev() prototypes */ + #include + #include diff --git a/mail/ml/files/patch-impa-4-src-osdep-unix-mmdf.c b/mail/ml/files/patch-impa-4-src-osdep-unix-mmdf.c deleted file mode 100644 index 81a7a6ac7b47..000000000000 --- a/mail/ml/files/patch-impa-4-src-osdep-unix-mmdf.c +++ /dev/null @@ -1,20 +0,0 @@ ---- ../imap-4/src/osdep/unix/mmdf.c.orig Tue Mar 31 13:07:25 1998 -+++ ../imap-4/src/osdep/unix/mmdf.c Sat Aug 20 00:17:25 2005 -@@ -869,7 +869,7 @@ - /* length of internal + message headers */ - iov[j].iov_len = (m->header + m->headersize) - m->internal; - /* suppress extra newline if present */ -- if ((iov[j].iov_base)[iov[j].iov_len - 2] == '\n') iov[j++].iov_len--; -+ if (((char *)iov[j].iov_base)[iov[j].iov_len - 2] == '\n') iov[j++].iov_len--; - else j++; /* unlikely but... */ - /* status */ - iov[j].iov_base = status; -@@ -1727,7 +1727,7 @@ - /* length of internal + message headers */ - iov[j].iov_len = (m->header + m->headersize) - m->internal; - /* suppress extra newline if present */ -- if ((iov[j].iov_base)[iov[j].iov_len - 2] == '\n') iov[j++].iov_len--; -+ if (((char *)iov[j].iov_base)[iov[j].iov_len - 2] == '\n') iov[j++].iov_len--; - else j++; /* unlikely but... */ - /* status */ - iov[j].iov_base = LOCAL->buf; diff --git a/mail/ml/files/patch-lib-CheckConnection.ppp b/mail/ml/files/patch-lib-CheckConnection.ppp new file mode 100644 index 000000000000..7cf9decb6b65 --- /dev/null +++ b/mail/ml/files/patch-lib-CheckConnection.ppp @@ -0,0 +1,13 @@ +*** ../lib/CheckConnection.ppp.orig Sun Mar 15 20:59:57 1998 +--- ../lib/CheckConnection.ppp Sun Mar 15 21:00:41 1998 +*************** +*** 1,4 **** + #!/bin/sh +! netstat -i | grep ppp >& /dev/null || exit 1 + exit 0 + +--- 1,4 ---- + #!/bin/sh +! netstat -i | grep tun0 >& /dev/null || exit 1 + exit 0 + diff --git a/mail/ml/files/patch-lib-ML.ad b/mail/ml/files/patch-lib-ML.ad new file mode 100644 index 000000000000..dcbdda8ac3fb --- /dev/null +++ b/mail/ml/files/patch-lib-ML.ad @@ -0,0 +1,43 @@ +*** ../lib/ML.ad.orig Sun Mar 15 21:35:32 1998 +--- ../lib/ML.ad Sun Mar 15 21:38:17 1998 +*************** +*** 8,26 **** + + ! All the fonts specified by the program + +! *XmCascadeButton*fontList: -*-courier-bold-r-normal--12-* +! *XmPushButton*fontList: -*-courier-bold-r-normal--12-* +! *XmLabel*fontList: -*-courier-bold-r-normal--12-* +! *XmText*fontList: -*-courier-medium-r-normal--12-* +! *XmTextField*fontList: -*-courier-medium-r-normal--12-* +! *XmList*fontList: -*-courier-medium-r-normal--12-* + + + *lview*XmList.FontList:\ +! *-courier-medium-r-*--12-*=NORMAL,\ +! *-courier-bold-r-*--12-*=BOLD,\ +! *-courier-medium-o-*--12-*=ITALIC,\ +! *-courier-bold-o-*--12-*=BOLD_ITALIC + + + !*ispellCommand: xterm -e ispell %s +--- 8,26 ---- + + ! All the fonts specified by the program + +! *XmCascadeButton*fontList: -*-helvetica-bold-r-normal--12-* +! *XmPushButton*fontList: -*-helvetica-bold-r-normal--12-* +! *XmLabel*fontList: -*-helvetica-bold-r-normal--12-* +! *XmText*fontList: -*-courier-medium-r-normal--14-* +! *XmTextField*fontList: -*-courier-medium-r-normal--14-* +! *XmList*fontList: -*-helvetica-medium-r-normal--12-* + + + *lview*XmList.FontList:\ +! *-courier-medium-r-*--14-*=NORMAL,\ +! *-courier-bold-r-*--14-*=BOLD,\ +! *-courier-medium-o-*--14-*=ITALIC,\ +! *-courier-bold-o-*--14-*=BOLD_ITALIC + + + !*ispellCommand: xterm -e ispell %s diff --git a/mail/mutt/files/patch-02 b/mail/mutt/files/patch-02 deleted file mode 100644 index 557432a6a60b..000000000000 --- a/mail/mutt/files/patch-02 +++ /dev/null @@ -1,29 +0,0 @@ ---- doc/Makefile.am.orig 2014-05-31 14:09:54.000000000 +0200 -+++ doc/Makefile.am 2014-05-31 14:12:07.000000000 +0200 -@@ -77,14 +77,7 @@ - -for f in $(HTML_DOCFILES) ; do \ - $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir) ; \ - done -- $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.dist -- -if [ -f $(DESTDIR)$(pkgdatadir)/Muttrc ] ; then \ -- mv $(DESTDIR)$(pkgdatadir)/Muttrc* $(DESTDIR)$(sysconfdir) ; \ -- elif [ -f $(DESTDIR)$(pkgdatadir)/../Muttrc ] ; then \ -- mv $(DESTDIR)$(pkgdatadir)/../Muttrc* $(DESTDIR)$(sysconfdir) ; \ -- elif [ ! -f $(DESTDIR)$(sysconfdir)/Muttrc ] ; then \ -- $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir) ; \ -- fi -+ $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.sample - - uninstall-local: - for f in mutt.1 mutt_dotlock.1 flea.1 muttbug.1 smime_keys.1 pgpewrap.1 pgpring.1; do \ -@@ -107,9 +100,7 @@ - - check: - manual.txt: manual.html -- -LC_ALL=C lynx -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@ || \ -- LC_ALL=C w3m -dump manual.html > $@ || \ -- LC_ALL=C elinks -dump -no-numbering -no-references manual.html | sed -e 's,\\001, ,g' > $@ -+ -LC_ALL=C lynx -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@ - - Muttrc: stamp-doc-rc - diff --git a/mail/mutt/files/patch-05 b/mail/mutt/files/patch-05 deleted file mode 100644 index bfbb5aa3ab9b..000000000000 --- a/mail/mutt/files/patch-05 +++ /dev/null @@ -1,43 +0,0 @@ ---- curs_lib.c.old Wed Sep 1 19:39:20 1999 -+++ curs_lib.c Sun Sep 26 23:47:03 1999 -@@ -156,6 +156,16 @@ - def = 0; - break; - } -+ else if (tolower(ch.ch) == 'y') -+ { -+ def = 1; -+ break; -+ } -+ else if (tolower(ch.ch) == 'n') -+ { -+ def = 0; -+ break; -+ } - else - { - BEEP(); -@@ -413,8 +423,9 @@ - { - event_t ch; - int choice; -- char *p; -+ char *p, *nletters; - -+ nletters = _(letters); - mvaddstr (LINES - 1, 0, prompt); - clrtoeol (); - FOREVER -@@ -428,6 +439,12 @@ - } - else - { -+ p = strchr (nletters, ch.ch); -+ if (p) -+ { -+ choice = p - nletters + 1; -+ break; -+ } - p = strchr (letters, ch.ch); - if (p) - { diff --git a/mail/mutt/files/patch-08 b/mail/mutt/files/patch-08 deleted file mode 100644 index 69d353f64b40..000000000000 --- a/mail/mutt/files/patch-08 +++ /dev/null @@ -1,10 +0,0 @@ ---- doc/Muttrc.orig Sat May 13 08:30:44 2000 -+++ doc/Muttrc Sat May 13 08:32:05 2000 -@@ -629,6 +629,7 @@ - # Type: boolean - # Default: yes - # -+set followup_to=no - # - # Controls whether or not the Mail-Followup-To header field is - # generated when sending mail. When set, Mutt will generate this diff --git a/mail/mutt/files/patch-curs_lib.c b/mail/mutt/files/patch-curs_lib.c new file mode 100644 index 000000000000..bfbb5aa3ab9b --- /dev/null +++ b/mail/mutt/files/patch-curs_lib.c @@ -0,0 +1,43 @@ +--- curs_lib.c.old Wed Sep 1 19:39:20 1999 ++++ curs_lib.c Sun Sep 26 23:47:03 1999 +@@ -156,6 +156,16 @@ + def = 0; + break; + } ++ else if (tolower(ch.ch) == 'y') ++ { ++ def = 1; ++ break; ++ } ++ else if (tolower(ch.ch) == 'n') ++ { ++ def = 0; ++ break; ++ } + else + { + BEEP(); +@@ -413,8 +423,9 @@ + { + event_t ch; + int choice; +- char *p; ++ char *p, *nletters; + ++ nletters = _(letters); + mvaddstr (LINES - 1, 0, prompt); + clrtoeol (); + FOREVER +@@ -428,6 +439,12 @@ + } + else + { ++ p = strchr (nletters, ch.ch); ++ if (p) ++ { ++ choice = p - nletters + 1; ++ break; ++ } + p = strchr (letters, ch.ch); + if (p) + { diff --git a/mail/mutt/files/patch-doc-Makefile.am b/mail/mutt/files/patch-doc-Makefile.am new file mode 100644 index 000000000000..557432a6a60b --- /dev/null +++ b/mail/mutt/files/patch-doc-Makefile.am @@ -0,0 +1,29 @@ +--- doc/Makefile.am.orig 2014-05-31 14:09:54.000000000 +0200 ++++ doc/Makefile.am 2014-05-31 14:12:07.000000000 +0200 +@@ -77,14 +77,7 @@ + -for f in $(HTML_DOCFILES) ; do \ + $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir) ; \ + done +- $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.dist +- -if [ -f $(DESTDIR)$(pkgdatadir)/Muttrc ] ; then \ +- mv $(DESTDIR)$(pkgdatadir)/Muttrc* $(DESTDIR)$(sysconfdir) ; \ +- elif [ -f $(DESTDIR)$(pkgdatadir)/../Muttrc ] ; then \ +- mv $(DESTDIR)$(pkgdatadir)/../Muttrc* $(DESTDIR)$(sysconfdir) ; \ +- elif [ ! -f $(DESTDIR)$(sysconfdir)/Muttrc ] ; then \ +- $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir) ; \ +- fi ++ $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.sample + + uninstall-local: + for f in mutt.1 mutt_dotlock.1 flea.1 muttbug.1 smime_keys.1 pgpewrap.1 pgpring.1; do \ +@@ -107,9 +100,7 @@ + + check: + manual.txt: manual.html +- -LC_ALL=C lynx -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@ || \ +- LC_ALL=C w3m -dump manual.html > $@ || \ +- LC_ALL=C elinks -dump -no-numbering -no-references manual.html | sed -e 's,\\001, ,g' > $@ ++ -LC_ALL=C lynx -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@ + + Muttrc: stamp-doc-rc + diff --git a/mail/mutt/files/patch-doc-Muttrc b/mail/mutt/files/patch-doc-Muttrc new file mode 100644 index 000000000000..69d353f64b40 --- /dev/null +++ b/mail/mutt/files/patch-doc-Muttrc @@ -0,0 +1,10 @@ +--- doc/Muttrc.orig Sat May 13 08:30:44 2000 ++++ doc/Muttrc Sat May 13 08:32:05 2000 +@@ -629,6 +629,7 @@ + # Type: boolean + # Default: yes + # ++set followup_to=no + # + # Controls whether or not the Mail-Followup-To header field is + # generated when sending mail. When set, Mutt will generate this diff --git a/mail/mutt14/files/patch-02 b/mail/mutt14/files/patch-02 deleted file mode 100644 index afeadc06b9d4..000000000000 --- a/mail/mutt14/files/patch-02 +++ /dev/null @@ -1,21 +0,0 @@ ---- doc/Makefile.in.orig 2007-05-23 03:17:52.000000000 +0200 -+++ doc/Makefile.in 2014-05-13 08:16:43.000000000 +0200 -@@ -98,18 +98,6 @@ - -rm -rf $(DESTDIR)$(docdir) - - check: --manual.txt: manual.sgml -- if sgml2txt -c latin manual ; then \ -- uniq < manual.txt | expand > _manual.txt ; \ -- rm manual.txt ; \ -- mv _manual.txt manual.txt ;\ -- fi -- --manual.html: manual.sgml -- sgml2html manual || true -- --manual.ps: manual.sgml -- sgml2latex --output=ps manual || true - - clean: - rm -f *~ *.html *.orig *.rej stamp-doc-sgml stamp-doc-man *.ps diff --git a/mail/mutt14/files/patch-03 b/mail/mutt14/files/patch-03 deleted file mode 100644 index b870f7f7aaec..000000000000 --- a/mail/mutt14/files/patch-03 +++ /dev/null @@ -1,13 +0,0 @@ ---- doc/manual.sgml.orig Tue May 9 17:15:26 2000 -+++ doc/manual.sgml Fri May 12 11:05:40 2000 -@@ -1,5 +1,8 @@ -- -- -+ -+]> -+ -+ -
- - The Mutt E-Mail Client diff --git a/mail/mutt14/files/patch-05 b/mail/mutt14/files/patch-05 deleted file mode 100644 index 13a52d9daa40..000000000000 --- a/mail/mutt14/files/patch-05 +++ /dev/null @@ -1,87 +0,0 @@ ---- curs_lib.c.old Wed Sep 1 19:39:20 1999 -+++ curs_lib.c Sun Sep 26 23:47:03 1999 -@@ -156,6 +156,16 @@ - def = 0; - break; - } -+ else if (tolower(ch.ch) == 'y') -+ { -+ def = 1; -+ break; -+ } -+ else if (tolower(ch.ch) == 'n') -+ { -+ def = 0; -+ break; -+ } - else - { - BEEP(); -@@ -413,8 +423,9 @@ - { - event_t ch; - int choice; -- char *p; -+ char *p, *nletters; - -+ nletters = _(letters); - mvaddstr (LINES - 1, 0, prompt); - clrtoeol (); - FOREVER -@@ -428,6 +439,12 @@ - } - else - { -+ p = strchr (nletters, ch.ch); -+ if (p) -+ { -+ choice = p - nletters + 1; -+ break; -+ } - p = strchr (letters, ch.ch); - if (p) - { ---- browser.c.orig Fri Sep 24 01:08:08 1999 -+++ browser.c Sun Sep 26 23:46:25 1999 -@@ -750,7 +750,7 @@ - switch (mutt_multi_choice ((reverse) ? - _("Reverse sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? ") : - _("Sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? "), -- _("dazn"))) -+ N_("dazn"))) - { - case -1: /* abort */ - resort = 0; ---- commands.c.orig Wed Jul 7 02:56:24 1999 -+++ commands.c Sun Sep 26 23:46:25 1999 -@@ -337,7 +337,7 @@ - switch (mutt_multi_choice (reverse ? - _("Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ") : - _("Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: "), -- _("dfrsotuzc"))) -+ N_("dfrsotuzc"))) - { - case -1: /* abort - don't resort */ - return -1; ---- compose.c.orig Mon Feb 12 18:02:38 2001 -+++ compose.c Fri Mar 30 17:04:09 2001 -@@ -130,7 +130,7 @@ - char input_signas[SHORT_STRING]; - - switch (mutt_multi_choice (_("(e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "), -- _("esabf"))) -+ N_("esabf"))) - { - case 1: /* (e)ncrypt */ - bits |= PGPENCRYPT; ---- muttlib.c.orig Sun Apr 9 14:39:02 2000 -+++ muttlib.c Fri May 12 11:26:58 2000 -@@ -671,7 +671,7 @@ - if (*append == 0 && access (fname, F_OK) == 0) - { - switch (mutt_multi_choice -- (_("File exists, (o)verwrite, (a)ppend, or (c)ancel?"), _("oac"))) -+ (_("File exists, (o)verwrite, (a)ppend, or (c)ancel?"), N_("oac"))) - { - case -1: /* abort */ - case 3: /* cancel */ diff --git a/mail/mutt14/files/patch-08 b/mail/mutt14/files/patch-08 deleted file mode 100644 index 3e50cbd13779..000000000000 --- a/mail/mutt14/files/patch-08 +++ /dev/null @@ -1,10 +0,0 @@ ---- Muttrc.orig Sat May 13 08:30:44 2000 -+++ Muttrc Sat May 13 08:32:05 2000 -@@ -629,6 +629,7 @@ - # Type: boolean - # Default: yes - # -+set followup_to=no - # - # Controls whether or not the Mail-Followup-To header field is - # generated when sending mail. When set, Mutt will generate this diff --git a/mail/mutt14/files/patch-Muttrc b/mail/mutt14/files/patch-Muttrc new file mode 100644 index 000000000000..3e50cbd13779 --- /dev/null +++ b/mail/mutt14/files/patch-Muttrc @@ -0,0 +1,10 @@ +--- Muttrc.orig Sat May 13 08:30:44 2000 ++++ Muttrc Sat May 13 08:32:05 2000 +@@ -629,6 +629,7 @@ + # Type: boolean + # Default: yes + # ++set followup_to=no + # + # Controls whether or not the Mail-Followup-To header field is + # generated when sending mail. When set, Mutt will generate this diff --git a/mail/mutt14/files/patch-doc-Makefile.in b/mail/mutt14/files/patch-doc-Makefile.in new file mode 100644 index 000000000000..afeadc06b9d4 --- /dev/null +++ b/mail/mutt14/files/patch-doc-Makefile.in @@ -0,0 +1,21 @@ +--- doc/Makefile.in.orig 2007-05-23 03:17:52.000000000 +0200 ++++ doc/Makefile.in 2014-05-13 08:16:43.000000000 +0200 +@@ -98,18 +98,6 @@ + -rm -rf $(DESTDIR)$(docdir) + + check: +-manual.txt: manual.sgml +- if sgml2txt -c latin manual ; then \ +- uniq < manual.txt | expand > _manual.txt ; \ +- rm manual.txt ; \ +- mv _manual.txt manual.txt ;\ +- fi +- +-manual.html: manual.sgml +- sgml2html manual || true +- +-manual.ps: manual.sgml +- sgml2latex --output=ps manual || true + + clean: + rm -f *~ *.html *.orig *.rej stamp-doc-sgml stamp-doc-man *.ps diff --git a/mail/mutt14/files/patch-doc_manual.sgml b/mail/mutt14/files/patch-doc_manual.sgml new file mode 100644 index 000000000000..b870f7f7aaec --- /dev/null +++ b/mail/mutt14/files/patch-doc_manual.sgml @@ -0,0 +1,13 @@ +--- doc/manual.sgml.orig Tue May 9 17:15:26 2000 ++++ doc/manual.sgml Fri May 12 11:05:40 2000 +@@ -1,5 +1,8 @@ +-<!doctype linuxdoc system> +- ++<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN" [ ++<!ENTITY dquot """> ++]> ++<linuxdoc> ++ + <article> + + <title>The Mutt E-Mail Client diff --git a/mail/mutt14/files/patch-string-handling b/mail/mutt14/files/patch-string-handling new file mode 100644 index 000000000000..13a52d9daa40 --- /dev/null +++ b/mail/mutt14/files/patch-string-handling @@ -0,0 +1,87 @@ +--- curs_lib.c.old Wed Sep 1 19:39:20 1999 ++++ curs_lib.c Sun Sep 26 23:47:03 1999 +@@ -156,6 +156,16 @@ + def = 0; + break; + } ++ else if (tolower(ch.ch) == 'y') ++ { ++ def = 1; ++ break; ++ } ++ else if (tolower(ch.ch) == 'n') ++ { ++ def = 0; ++ break; ++ } + else + { + BEEP(); +@@ -413,8 +423,9 @@ + { + event_t ch; + int choice; +- char *p; ++ char *p, *nletters; + ++ nletters = _(letters); + mvaddstr (LINES - 1, 0, prompt); + clrtoeol (); + FOREVER +@@ -428,6 +439,12 @@ + } + else + { ++ p = strchr (nletters, ch.ch); ++ if (p) ++ { ++ choice = p - nletters + 1; ++ break; ++ } + p = strchr (letters, ch.ch); + if (p) + { +--- browser.c.orig Fri Sep 24 01:08:08 1999 ++++ browser.c Sun Sep 26 23:46:25 1999 +@@ -750,7 +750,7 @@ + switch (mutt_multi_choice ((reverse) ? + _("Reverse sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? ") : + _("Sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? "), +- _("dazn"))) ++ N_("dazn"))) + { + case -1: /* abort */ + resort = 0; +--- commands.c.orig Wed Jul 7 02:56:24 1999 ++++ commands.c Sun Sep 26 23:46:25 1999 +@@ -337,7 +337,7 @@ + switch (mutt_multi_choice (reverse ? + _("Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ") : + _("Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: "), +- _("dfrsotuzc"))) ++ N_("dfrsotuzc"))) + { + case -1: /* abort - don't resort */ + return -1; +--- compose.c.orig Mon Feb 12 18:02:38 2001 ++++ compose.c Fri Mar 30 17:04:09 2001 +@@ -130,7 +130,7 @@ + char input_signas[SHORT_STRING]; + + switch (mutt_multi_choice (_("(e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "), +- _("esabf"))) ++ N_("esabf"))) + { + case 1: /* (e)ncrypt */ + bits |= PGPENCRYPT; +--- muttlib.c.orig Sun Apr 9 14:39:02 2000 ++++ muttlib.c Fri May 12 11:26:58 2000 +@@ -671,7 +671,7 @@ + if (*append == 0 && access (fname, F_OK) == 0) + { + switch (mutt_multi_choice +- (_("File exists, (o)verwrite, (a)ppend, or (c)ancel?"), _("oac"))) ++ (_("File exists, (o)verwrite, (a)ppend, or (c)ancel?"), N_("oac"))) + { + case -1: /* abort */ + case 3: /* cancel */ diff --git a/mail/popa3d/files/patch-Makefile b/mail/popa3d/files/patch-Makefile new file mode 100644 index 000000000000..ade5e6b8c8c9 --- /dev/null +++ b/mail/popa3d/files/patch-Makefile @@ -0,0 +1,22 @@ +--- Makefile.orig Mon Nov 17 04:50:31 2003 ++++ Makefile Mon Nov 17 04:52:25 2003 +@@ -1,15 +1,15 @@ +-CC = gcc +-LD = gcc ++CC? = gcc ++LD = ${CC} + RM = rm -f + MKDIR = mkdir -p + INSTALL = install -c +-CFLAGS = -Wall -O2 -fomit-frame-pointer ++CFLAGS?= -Wall -O2 -fomit-frame-pointer + # You may use OpenSSL's MD5 routines instead of the ones supplied here + #CFLAGS += -DHAVE_OPENSSL + LDFLAGS = -s + LIBS = + # Linux with glibc, FreeBSD, NetBSD +-#LIBS += -lcrypt ++LIBS += -lcrypt + # HP-UX trusted system + #LIBS += -lsec + # Solaris (POP_STANDALONE, POP_VIRTUAL) diff --git a/mail/popa3d/files/patch-aa b/mail/popa3d/files/patch-aa deleted file mode 100644 index 7d0d1221a136..000000000000 --- a/mail/popa3d/files/patch-aa +++ /dev/null @@ -1,22 +0,0 @@ ---- params.h.orig Tue Oct 16 06:10:34 2001 -+++ params.h Sat Dec 22 11:57:52 2001 -@@ -99,7 +99,7 @@ - * A pseudo-user to run as before authentication. The user and its UID - * must not be used for any other purpose. - */ --#define POP_USER POP_SERVER -+#define POP_USER "pop" - - /* - * An empty directory to chroot to before authentication. The directory -@@ -142,8 +142,8 @@ - * - * Note that there's no built-in password aging support. - */ --#define AUTH_PASSWD 0 --#define AUTH_SHADOW 1 -+#define AUTH_PASSWD 1 -+#define AUTH_SHADOW 0 - #define AUTH_PAM 0 - #define AUTH_PAM_USERPASS 0 - diff --git a/mail/popa3d/files/patch-ab b/mail/popa3d/files/patch-ab deleted file mode 100644 index ade5e6b8c8c9..000000000000 --- a/mail/popa3d/files/patch-ab +++ /dev/null @@ -1,22 +0,0 @@ ---- Makefile.orig Mon Nov 17 04:50:31 2003 -+++ Makefile Mon Nov 17 04:52:25 2003 -@@ -1,15 +1,15 @@ --CC = gcc --LD = gcc -+CC? = gcc -+LD = ${CC} - RM = rm -f - MKDIR = mkdir -p - INSTALL = install -c --CFLAGS = -Wall -O2 -fomit-frame-pointer -+CFLAGS?= -Wall -O2 -fomit-frame-pointer - # You may use OpenSSL's MD5 routines instead of the ones supplied here - #CFLAGS += -DHAVE_OPENSSL - LDFLAGS = -s - LIBS = - # Linux with glibc, FreeBSD, NetBSD --#LIBS += -lcrypt -+LIBS += -lcrypt - # HP-UX trusted system - #LIBS += -lsec - # Solaris (POP_STANDALONE, POP_VIRTUAL) diff --git a/mail/popa3d/files/patch-params.h b/mail/popa3d/files/patch-params.h new file mode 100644 index 000000000000..7d0d1221a136 --- /dev/null +++ b/mail/popa3d/files/patch-params.h @@ -0,0 +1,22 @@ +--- params.h.orig Tue Oct 16 06:10:34 2001 ++++ params.h Sat Dec 22 11:57:52 2001 +@@ -99,7 +99,7 @@ + * A pseudo-user to run as before authentication. The user and its UID + * must not be used for any other purpose. + */ +-#define POP_USER POP_SERVER ++#define POP_USER "pop" + + /* + * An empty directory to chroot to before authentication. The directory +@@ -142,8 +142,8 @@ + * + * Note that there's no built-in password aging support. + */ +-#define AUTH_PASSWD 0 +-#define AUTH_SHADOW 1 ++#define AUTH_PASSWD 1 ++#define AUTH_SHADOW 0 + #define AUTH_PAM 0 + #define AUTH_PAM_USERPASS 0 + diff --git a/mail/poppassd/files/patch-Makefile b/mail/poppassd/files/patch-Makefile new file mode 100644 index 000000000000..1ade77dca5b9 --- /dev/null +++ b/mail/poppassd/files/patch-Makefile @@ -0,0 +1,29 @@ +--- Makefile.orig Fri Dec 5 13:12:35 2003 ++++ Makefile Fri Dec 5 13:13:13 2003 +@@ -1,14 +1,14 @@ +-BINDIR = /usr/etc ++BINDIR = ${PREFIX}/libexec + LIBDIR = +-CFLAGS = -g +-LFLAGS = -g +-CCM = cc -Em ++CFLAGS?= -O ++LFLAGS?= ${LDFLAGS} ++CCM = $(CC) -Em + + OBJECTS = poppassd.o +-LIBS = ++LIBS = -lcrypt -lutil + + poppassd: $(OBJECTS) +- cc -o poppassd $(LFLAGS) $(OBJECTS) $(LIBS) ++ $(CC) -o poppassd $(LFLAGS) $(OBJECTS) $(LIBS) + + install: poppassd + install -g bin -o root -m 500 poppassd $(BINDIR) +@@ -17,4 +17,4 @@ + rm -f *.o *~* core Makefile.new Makefile.bak poppassd + + poppassd.o: poppassd.c +- cc -c $(CFLAGS) poppassd.c ++ $(CC) -c $(CFLAGS) poppassd.c diff --git a/mail/poppassd/files/patch-aa b/mail/poppassd/files/patch-aa deleted file mode 100644 index 1ade77dca5b9..000000000000 --- a/mail/poppassd/files/patch-aa +++ /dev/null @@ -1,29 +0,0 @@ ---- Makefile.orig Fri Dec 5 13:12:35 2003 -+++ Makefile Fri Dec 5 13:13:13 2003 -@@ -1,14 +1,14 @@ --BINDIR = /usr/etc -+BINDIR = ${PREFIX}/libexec - LIBDIR = --CFLAGS = -g --LFLAGS = -g --CCM = cc -Em -+CFLAGS?= -O -+LFLAGS?= ${LDFLAGS} -+CCM = $(CC) -Em - - OBJECTS = poppassd.o --LIBS = -+LIBS = -lcrypt -lutil - - poppassd: $(OBJECTS) -- cc -o poppassd $(LFLAGS) $(OBJECTS) $(LIBS) -+ $(CC) -o poppassd $(LFLAGS) $(OBJECTS) $(LIBS) - - install: poppassd - install -g bin -o root -m 500 poppassd $(BINDIR) -@@ -17,4 +17,4 @@ - rm -f *.o *~* core Makefile.new Makefile.bak poppassd - - poppassd.o: poppassd.c -- cc -c $(CFLAGS) poppassd.c -+ $(CC) -c $(CFLAGS) poppassd.c diff --git a/mail/poppassd/files/patch-ab b/mail/poppassd/files/patch-ab deleted file mode 100644 index e4169d6097b8..000000000000 --- a/mail/poppassd/files/patch-ab +++ /dev/null @@ -1,552 +0,0 @@ ---- poppassd.c.orig Thu Jan 4 23:19:36 2007 -+++ poppassd.c Thu Jan 4 23:24:26 2007 -@@ -13,11 +13,11 @@ - * - * Doesn't actually change any passwords itself. It simply listens for - * incoming requests, gathers the required information (user name, old -- * password, new password) and executes /bin/passwd, talking to it over -+ * password, new password) and executes /usr/bin/passwd, talking to it over - * a pseudo-terminal pair. The advantage of this is that we don't need - * to have any knowledge of either the password file format (which may - * include dbx files that need to be rebuilt) or of any file locking -- * protocol /bin/passwd and cohorts may use (and which isn't documented). -+ * protocol /usr/bin/passwd and cohorts may use (and which isn't documented). - * - * The current version has been tested at NU under SunOS release 4.1.2 - * and 4.1.3, and under HP-UX 8.02 and 9.01. We have tested the server -@@ -29,7 +29,7 @@ - * Note that unencrypted passwords are transmitted over the network. If - * this bothers you, think hard about whether you want to implement the - * password changing feature. On the other hand, it's no worse than what -- * happens when you run /bin/passwd while connected via telnet or rlogin. -+ * happens when you run /usr/bin/passwd while connected via telnet or rlogin. - * Well, maybe it is, since the use of a dedicated port makes it slightly - * easier for a network snooper to snarf passwords off the wire. - * -@@ -44,10 +44,10 @@ - * - * The front-end code (which talks to the client) is directly - * descended from Leavitt's original version. The back-end pseudo-tty stuff -- * (which talks to /bin/password) is directly descended from Smith's -+ * (which talks to /usr/bin/password) is directly descended from Smith's - * version, with changes for SunOS and HP-UX by Norstad (with help from - * sample code in "Advanced Programming in the UNIX Environment" -- * by W. Richard Stevens). The code to report /bin/passwd error messages -+ * by W. Richard Stevens). The code to report /usr/bin/passwd error messages - * back to the client in the final 500 response, and a new version of the - * code to find the next free pty, is by Norstad. - * -@@ -112,7 +112,7 @@ - - #define SUCCESS 1 - #define FAILURE 0 --#define BUFSIZE 512 -+#define BUFSIZE 768 - - #include <sys/types.h> - #include <sys/stat.h> -@@ -125,12 +125,23 @@ - #include <ctype.h> - #include <strings.h> - #include <errno.h> --#include <varargs.h> -+#include <stdarg.h> - #include <pwd.h> - #include <string.h> - #include <termios.h> - #include <dirent.h> -+#include <libutil.h> - -+/* prototypes to keep modern compilers happy */ -+void ReadFromClient (char *line); -+void WriteToClient (char *fmt, ...); -+int chkPass (char *user, char *pass, struct passwd *pw); -+int dochild (int master, char *slavedev, char *user); -+int expect (int master, char **expected, char *buf); -+void getemess (int master, char **expected, char *buf); -+int match (char *str, char *pat); -+int talktochild (int master, char *user, char *oldpass, char *newpass, char *emess); -+void writestring (int fd, char *s); - - /* Prompt strings expected from the "passwd" command. If you want - * to port this program to yet another flavor of UNIX, you may need to add -@@ -145,19 +156,24 @@ - static char *P1[] = - {"Old password:", - "Changing password for *.\nOld password:", -+ "Changing local password for *.\nOld password:", -+ "Changing local password for *\nOld Password:", - "Changing password for * on *.\nOld password:", - "Changing NIS password for * on *.\nOld password:", -+ "Changing NIS password for *\nOld Password:", - "Changing password for *\n*'s Old password:", - ""}; - - static char *P2[] = - {"\nNew password:", -+ "\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\nEnter new password: ", - "\n*'s New password:", - ""}; - - static char *P3[] = - {"\nRe-enter new password:", - "\nRetype new password:", -+ "\nRe-type new password: ", - "\nEnter the new password again:", - "\n*Re-enter *'s new password:", - "\nVerify:", -@@ -165,13 +181,14 @@ - - static char *P4[] = - {"\n", -+ "\npasswd: rebuilding the database...\npasswd: done\n", -+ "\npasswd: updating the database...\npasswd: done\n", - "NIS entry changed on *\n", -+ "\n\nNIS password has been changed on *.\n", - ""}; - - --main (argc, argv) --int argc; --char *argv[]; -+int main (int argc, char *argv[]) - { - char line[BUFSIZE]; - char user[BUFSIZE]; -@@ -180,17 +197,14 @@ - char emess[BUFSIZE]; - char *slavedev; - struct passwd *pw, *getpwnam(); -+ struct termios stermios; - int c, master; - pid_t pid, wpid; - int wstat; - - *user = *oldpass = *newpass = 0; - -- if (openlog ("poppassd", LOG_PID, LOG_LOCAL2) < 0) -- { -- WriteToClient ("500 Can't open syslog."); -- exit (1); -- } -+ openlog ("poppassd", LOG_PID, LOG_LOCAL2); - - WriteToClient ("200 poppassd v%s hello, who are you?", VERSION); - ReadFromClient (line); -@@ -212,12 +226,16 @@ - - if ((pw = getpwnam (user)) == NULL) - { -- WriteToClient ("500 Unknown user, %s.", user); -+ syslog (LOG_ERR, "Unknown user, %s", user); -+ sleep (5); -+ WriteToClient ("500 Old password is incorrect."); - exit(1); - } - - if (chkPass (user, oldpass, pw) == FAILURE) - { -+ syslog (LOG_ERR, "Incorrect password from %s", user); -+ sleep (5); - WriteToClient ("500 Old password is incorrect."); - exit(1); - } -@@ -232,215 +250,118 @@ - WriteToClient ("500 New password required."); - exit(1); - } -- /* get pty to talk to password program */ -- if ((master = findpty (&slavedev)) < 0) -- { -- syslog (LOG_ERR, "can't find pty"); -- WriteToClient("500 Server busy - try again later."); -- exit (1); -- } -- -- /* fork child process to talk to password program */ -- if ((pid = fork()) < 0) /* Error, can't fork */ -- { -- syslog (LOG_ERR, "can't fork for passwd: %m"); -- WriteToClient ("500 Server error (can't fork passwd), get help!"); -- exit (1); -- } - -- if (pid) /* Parent */ -- { -- sleep (1); /* Make sure child is ready. Is this really needed? */ -- if (talktochild (master, user, oldpass, newpass, emess) == FAILURE) -- { -- syslog (LOG_ERR, "failed attempt by %s", user); -- if (*emess == '\0') { -- WriteToClient ("500 Unable to change password." ); -- } else { -- WriteToClient ("500 %s", emess); -- } -- exit(1); -- } -- -- if ((wpid = waitpid (pid, &wstat, 0)) < 0) -- { -- syslog (LOG_ERR, "wait for /bin/passwd child failed: %m"); -- WriteToClient ("500 Server error (wait failed), get help!"); -- exit (1); -- } -- -- if (pid != wpid) -- { -- syslog (LOG_ERR, "wrong child (/bin/passwd waited for!"); -- WriteToClient ("500 Server error (wrong child), get help!"); -- exit (1); -- } -- -- if (WIFEXITED (wstat) == 0) -- { -- syslog (LOG_ERR, "child (/bin/passwd) killed?"); -- WriteToClient ("500 Server error (funny wstat), get help!"); -- exit (1); -- } -- -- if (WEXITSTATUS (wstat) != 0) -- { -- syslog (LOG_ERR, "child (/bin/passwd) exited abnormally"); -- WriteToClient ("500 Server error (abnormal exit), get help!"); -- exit (1); -- } -- -- syslog (LOG_ERR, "password changed for %s", user); -- WriteToClient ("200 Password changed, thank-you."); -- -- ReadFromClient (line); -- if (strncmp(line, "quit", 4) != 0) { -- WriteToClient("500 Quit required."); -+ /* we need a pty to run passwd on but we have to make sure it is set up -+ as we like it - no echo, canonical input processing, no map NL to CR/NL -+ on outputs - otherwise our expect function will be confused */ -+ (void)memset((void *)&stermios, 0, sizeof(stermios)); -+ stermios.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); -+ stermios.c_lflag |= ICANON; -+ stermios.c_oflag &= ~(ONLCR); -+ -+ /* get a pty and fork */ -+ switch(pid = forkpty(&master, NULL, &stermios, NULL)) { -+ case -1: -+ /* failure - can't get pty, can't fork etc */ -+ WriteToClient("500 Server Error - Contact Your Administrator"); -+ exit(1); -+ break; -+ case 0: -+ /* slave/child */ -+ /* Set login name */ -+ if (setlogin(user) < 0) { -+ syslog(LOG_ERR, "setlogin failed: %m"); -+ WriteToClient("500 Server Error - Contact Your Administrator"); -+ return(0); -+ } -+ setuid (pw->pw_uid); -+ setgid (pw->pw_gid); -+ dochild (master, NULL, user); -+ break; -+ default: -+ /* master/parent */ -+ sleep (1); /* Make sure child is ready. Is this really needed? */ -+ if (talktochild (master, user, oldpass, newpass, emess) == FAILURE) -+ { -+ syslog (LOG_ERR, "failed attempt by %s", user); -+ if (*emess == '\0') { -+ WriteToClient ("500 Password change unsuccessful, try a different password." ); -+ } else { -+ WriteToClient ("500 %s", emess); -+ } -+ exit(1); -+ } -+ -+ break; -+ } -+ -+ if ((wpid = waitpid (pid, &wstat, 0)) < 0) -+ { -+ syslog (LOG_ERR, "wait for /usr/bin/passwd child failed: %m"); -+ WriteToClient ("500 Server error (wait failed), get help!"); -+ exit (1); -+ } -+ -+ if (pid != wpid) -+ { -+ syslog (LOG_ERR, "wrong child (/usr/bin/passwd) waited for!"); -+ WriteToClient ("500 Server error (wrong child), get help!"); -+ exit (1); -+ } -+ -+ if (WIFEXITED (wstat) == 0) -+ { -+ syslog (LOG_ERR, "child (/usr/bin/passwd) killed?"); -+ WriteToClient ("500 Server error (funny wstat), get help!"); -+ exit (1); -+ } -+ -+ if (WEXITSTATUS (wstat) != 0) -+ { -+ syslog (LOG_ERR, "child (/usr/bin/passwd) exited abnormally"); -+ WriteToClient ("500 Server error (abnormal exit), get help!"); -+ exit (1); -+ } -+ -+ syslog (LOG_ERR, "password changed for %s", user); -+ WriteToClient ("200 Password changed, thank-you."); -+ -+ ReadFromClient (line); -+ if (strncmp(line, "quit", 4) != 0) { -+ WriteToClient("500 Quit required."); - exit (1); -- } -+ } - -- WriteToClient("200 Bye."); -- exit (0); -- } -- else /* Child */ -- { -- /* -- * Become the user trying who's password is being changed. We're -- * about to exec /bin/passwd with is setuid root anyway, but this -- * way it looks to the child completely like it's being run by -- * the normal user, which makes it do its own password verification -- * before doing any thing. In theory, we've already verified the -- * password, but this extra level of checking doesn't hurt. Besides, -- * the way I do it here, if somebody manages to change somebody -- * else's password, you can complain to your vendor about security -- * holes, not to me! -- */ -- setuid (pw->pw_uid); -- setgid (pw->pw_gid); -- dochild (master, slavedev, user); -- } -+ WriteToClient("200 Bye."); -+ exit (0); - } - - /* - * dochild - * -- * Do child stuff - set up slave pty and execl /bin/passwd. -+ * Do child stuff - set up slave pty and execl /usr/bin/passwd. - * - * Code adapted from "Advanced Programming in the UNIX Environment" - * by W. Richard Stevens. - * - */ - --dochild (master, slavedev, user) --int master; --char *slavedev, *user; -+int dochild (int master, char *slavedev, char *user) - { -- int slave; -- struct termios stermios; -+ /* Fork /usr/bin/passwd. */ - -- /* Start new session - gets rid of controlling terminal. */ -- -- if (setsid() < 0) { -- syslog(LOG_ERR, "setsid failed: %m"); -- return(0); -- } -- -- /* Open slave pty and acquire as new controlling terminal. */ -- -- if ((slave = open(slavedev, O_RDWR)) < 0) { -- syslog(LOG_ERR, "can't open slave pty: %m"); -- return(0); -- } -- -- /* Close master. */ -- -- close(master); -- -- /* Make slave stdin/out/err of child. */ -- -- if (dup2(slave, STDIN_FILENO) != STDIN_FILENO) { -- syslog(LOG_ERR, "dup2 error to stdin: %m"); -- return(0); -- } -- if (dup2(slave, STDOUT_FILENO) != STDOUT_FILENO) { -- syslog(LOG_ERR, "dup2 error to stdout: %m"); -- return(0); -- } -- if (dup2(slave, STDERR_FILENO) != STDERR_FILENO) { -- syslog(LOG_ERR, "dup2 error to stderr: %m"); -- return(0); -- } -- if (slave > 2) close(slave); -- -- /* Set proper terminal attributes - no echo, canonical input processing, -- no map NL to CR/NL on output. */ -- -- if (tcgetattr(0, &stermios) < 0) { -- syslog(LOG_ERR, "tcgetattr error: %m"); -- return(0); -- } -- stermios.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); -- stermios.c_lflag |= ICANON; -- stermios.c_oflag &= ~(ONLCR); -- if (tcsetattr(0, TCSANOW, &stermios) < 0) { -- syslog(LOG_ERR, "tcsetattr error: %m"); -- return(0); -- } -- -- /* Fork /bin/passwd. */ -- -- if (execl("/bin/passwd", "passwd", user, (char*)0) < 0) { -- syslog(LOG_ERR, "can't exec /bin/passwd: %m"); -+ if (execl("/usr/bin/passwd", "passwd", user, (char*)0) < 0) { -+ syslog(LOG_ERR, "can't exec /usr/bin/passwd: %m"); - return(0); - } - } - -- --/* -- * findpty() -- * -- * Finds the first available pseudo-terminal master/slave pair. The master -- * side is opened and a fd returned as the function value. A pointer to the -- * name of the slave side (i.e. "/dev/ttyp0") is returned in the argument, -- * which should be a char**. The name itself is stored in a static buffer. -- * -- * A negative value is returned on any sort of error. -- * -- * Modified by Norstad to remove assumptions about number of pty's allocated -- * on this UNIX box. -- */ --findpty (slave) --char **slave; --{ -- int master; -- static char *line = "/dev/ptyXX"; -- DIR *dirp; -- struct dirent *dp; -- -- dirp = opendir("/dev"); -- while ((dp = readdir(dirp)) != NULL) { -- if (strncmp(dp->d_name, "pty", 3) == 0 && strlen(dp->d_name) == 5) { -- line[8] = dp->d_name[3]; -- line[9] = dp->d_name[4]; -- if ((master = open(line, O_RDWR)) >= 0) { -- line[5] = 't'; -- *slave = line; -- closedir(dirp); -- return (master); -- } -- } -- } -- closedir(dirp); -- return (-1); --} -- - /* - * writestring() - * - * Write a string in a single write() system call. - */ --writestring (fd, s) --char *s; -+void writestring (int fd, char *s) - { - int l; - -@@ -458,9 +379,7 @@ - * FAILURE if any errors are encountered (in which case, it can be assumed - * that the password wasn't changed). - */ --talktochild (master, user, oldpass, newpass, emess) --int master; --char *user, *oldpass, *newpass, *emess; -+int talktochild (int master, char *user, char *oldpass, char *newpass, char *emess) - { - char buf[BUFSIZE]; - char pswd[BUFSIZE+1]; -@@ -485,9 +404,11 @@ - } - - writestring(master, pswd); -- -+ sleep(2); - if (!expect(master, P4, buf)) return FAILURE; - -+ close(master); -+ - return SUCCESS; - } - -@@ -507,9 +428,7 @@ - * the pattern. - * 2 if the string matches the full pattern. - */ --match (str, pat) --char *str; --char *pat; -+int match (char *str, char *pat) - { - int result; - -@@ -542,10 +461,7 @@ - * is not an initial segment of or exact match for at least one of - * the expected strings, the function returns FAILURE. - */ --expect (master, expected, buf) --int master; --char **expected; --char *buf; -+int expect (int master, char **expected, char *buf) - { - int n, m; - char **s; -@@ -596,10 +512,7 @@ - * returning just the error message text. Newlines in the error message - * text are replaced by spaces. - */ --getemess (master, expected, buf) --int master; --char **expected; --char *buf; -+void getemess (int master, char **expected, char *buf) - { - int n, m; - char **s; -@@ -630,21 +543,18 @@ - } - } - --WriteToClient (fmt, va_alist) --char *fmt; --va_dcl -+void WriteToClient (char *fmt, ...) - { - va_list ap; - -- va_start (ap); -+ va_start (ap, fmt); - vfprintf (stdout, fmt, ap); - fputs ("\r\n", stdout ); - fflush (stdout); - va_end (ap); - } - --ReadFromClient (line) --char *line; -+void ReadFromClient (char *line) - { - char *sp; - int i; -@@ -659,10 +569,7 @@ - for (sp = line; isalpha(*sp); sp++) *sp = tolower(*sp); - } - --int chkPass (user, pass, pw) --char *user; --char *pass; --struct passwd *pw; -+int chkPass (char *user, char *pass, struct passwd *pw) - { - /* Compare the supplied password with the password file entry */ - if (strcmp (crypt (pass, pw->pw_passwd), pw->pw_passwd) != 0) diff --git a/mail/poppassd/files/patch-poppassd.c b/mail/poppassd/files/patch-poppassd.c new file mode 100644 index 000000000000..e4169d6097b8 --- /dev/null +++ b/mail/poppassd/files/patch-poppassd.c @@ -0,0 +1,552 @@ +--- poppassd.c.orig Thu Jan 4 23:19:36 2007 ++++ poppassd.c Thu Jan 4 23:24:26 2007 +@@ -13,11 +13,11 @@ + * + * Doesn't actually change any passwords itself. It simply listens for + * incoming requests, gathers the required information (user name, old +- * password, new password) and executes /bin/passwd, talking to it over ++ * password, new password) and executes /usr/bin/passwd, talking to it over + * a pseudo-terminal pair. The advantage of this is that we don't need + * to have any knowledge of either the password file format (which may + * include dbx files that need to be rebuilt) or of any file locking +- * protocol /bin/passwd and cohorts may use (and which isn't documented). ++ * protocol /usr/bin/passwd and cohorts may use (and which isn't documented). + * + * The current version has been tested at NU under SunOS release 4.1.2 + * and 4.1.3, and under HP-UX 8.02 and 9.01. We have tested the server +@@ -29,7 +29,7 @@ + * Note that unencrypted passwords are transmitted over the network. If + * this bothers you, think hard about whether you want to implement the + * password changing feature. On the other hand, it's no worse than what +- * happens when you run /bin/passwd while connected via telnet or rlogin. ++ * happens when you run /usr/bin/passwd while connected via telnet or rlogin. + * Well, maybe it is, since the use of a dedicated port makes it slightly + * easier for a network snooper to snarf passwords off the wire. + * +@@ -44,10 +44,10 @@ + * + * The front-end code (which talks to the client) is directly + * descended from Leavitt's original version. The back-end pseudo-tty stuff +- * (which talks to /bin/password) is directly descended from Smith's ++ * (which talks to /usr/bin/password) is directly descended from Smith's + * version, with changes for SunOS and HP-UX by Norstad (with help from + * sample code in "Advanced Programming in the UNIX Environment" +- * by W. Richard Stevens). The code to report /bin/passwd error messages ++ * by W. Richard Stevens). The code to report /usr/bin/passwd error messages + * back to the client in the final 500 response, and a new version of the + * code to find the next free pty, is by Norstad. + * +@@ -112,7 +112,7 @@ + + #define SUCCESS 1 + #define FAILURE 0 +-#define BUFSIZE 512 ++#define BUFSIZE 768 + + #include <sys/types.h> + #include <sys/stat.h> +@@ -125,12 +125,23 @@ + #include <ctype.h> + #include <strings.h> + #include <errno.h> +-#include <varargs.h> ++#include <stdarg.h> + #include <pwd.h> + #include <string.h> + #include <termios.h> + #include <dirent.h> ++#include <libutil.h> + ++/* prototypes to keep modern compilers happy */ ++void ReadFromClient (char *line); ++void WriteToClient (char *fmt, ...); ++int chkPass (char *user, char *pass, struct passwd *pw); ++int dochild (int master, char *slavedev, char *user); ++int expect (int master, char **expected, char *buf); ++void getemess (int master, char **expected, char *buf); ++int match (char *str, char *pat); ++int talktochild (int master, char *user, char *oldpass, char *newpass, char *emess); ++void writestring (int fd, char *s); + + /* Prompt strings expected from the "passwd" command. If you want + * to port this program to yet another flavor of UNIX, you may need to add +@@ -145,19 +156,24 @@ + static char *P1[] = + {"Old password:", + "Changing password for *.\nOld password:", ++ "Changing local password for *.\nOld password:", ++ "Changing local password for *\nOld Password:", + "Changing password for * on *.\nOld password:", + "Changing NIS password for * on *.\nOld password:", ++ "Changing NIS password for *\nOld Password:", + "Changing password for *\n*'s Old password:", + ""}; + + static char *P2[] = + {"\nNew password:", ++ "\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\n*\nEnter new password: ", + "\n*'s New password:", + ""}; + + static char *P3[] = + {"\nRe-enter new password:", + "\nRetype new password:", ++ "\nRe-type new password: ", + "\nEnter the new password again:", + "\n*Re-enter *'s new password:", + "\nVerify:", +@@ -165,13 +181,14 @@ + + static char *P4[] = + {"\n", ++ "\npasswd: rebuilding the database...\npasswd: done\n", ++ "\npasswd: updating the database...\npasswd: done\n", + "NIS entry changed on *\n", ++ "\n\nNIS password has been changed on *.\n", + ""}; + + +-main (argc, argv) +-int argc; +-char *argv[]; ++int main (int argc, char *argv[]) + { + char line[BUFSIZE]; + char user[BUFSIZE]; +@@ -180,17 +197,14 @@ + char emess[BUFSIZE]; + char *slavedev; + struct passwd *pw, *getpwnam(); ++ struct termios stermios; + int c, master; + pid_t pid, wpid; + int wstat; + + *user = *oldpass = *newpass = 0; + +- if (openlog ("poppassd", LOG_PID, LOG_LOCAL2) < 0) +- { +- WriteToClient ("500 Can't open syslog."); +- exit (1); +- } ++ openlog ("poppassd", LOG_PID, LOG_LOCAL2); + + WriteToClient ("200 poppassd v%s hello, who are you?", VERSION); + ReadFromClient (line); +@@ -212,12 +226,16 @@ + + if ((pw = getpwnam (user)) == NULL) + { +- WriteToClient ("500 Unknown user, %s.", user); ++ syslog (LOG_ERR, "Unknown user, %s", user); ++ sleep (5); ++ WriteToClient ("500 Old password is incorrect."); + exit(1); + } + + if (chkPass (user, oldpass, pw) == FAILURE) + { ++ syslog (LOG_ERR, "Incorrect password from %s", user); ++ sleep (5); + WriteToClient ("500 Old password is incorrect."); + exit(1); + } +@@ -232,215 +250,118 @@ + WriteToClient ("500 New password required."); + exit(1); + } +- /* get pty to talk to password program */ +- if ((master = findpty (&slavedev)) < 0) +- { +- syslog (LOG_ERR, "can't find pty"); +- WriteToClient("500 Server busy - try again later."); +- exit (1); +- } +- +- /* fork child process to talk to password program */ +- if ((pid = fork()) < 0) /* Error, can't fork */ +- { +- syslog (LOG_ERR, "can't fork for passwd: %m"); +- WriteToClient ("500 Server error (can't fork passwd), get help!"); +- exit (1); +- } + +- if (pid) /* Parent */ +- { +- sleep (1); /* Make sure child is ready. Is this really needed? */ +- if (talktochild (master, user, oldpass, newpass, emess) == FAILURE) +- { +- syslog (LOG_ERR, "failed attempt by %s", user); +- if (*emess == '\0') { +- WriteToClient ("500 Unable to change password." ); +- } else { +- WriteToClient ("500 %s", emess); +- } +- exit(1); +- } +- +- if ((wpid = waitpid (pid, &wstat, 0)) < 0) +- { +- syslog (LOG_ERR, "wait for /bin/passwd child failed: %m"); +- WriteToClient ("500 Server error (wait failed), get help!"); +- exit (1); +- } +- +- if (pid != wpid) +- { +- syslog (LOG_ERR, "wrong child (/bin/passwd waited for!"); +- WriteToClient ("500 Server error (wrong child), get help!"); +- exit (1); +- } +- +- if (WIFEXITED (wstat) == 0) +- { +- syslog (LOG_ERR, "child (/bin/passwd) killed?"); +- WriteToClient ("500 Server error (funny wstat), get help!"); +- exit (1); +- } +- +- if (WEXITSTATUS (wstat) != 0) +- { +- syslog (LOG_ERR, "child (/bin/passwd) exited abnormally"); +- WriteToClient ("500 Server error (abnormal exit), get help!"); +- exit (1); +- } +- +- syslog (LOG_ERR, "password changed for %s", user); +- WriteToClient ("200 Password changed, thank-you."); +- +- ReadFromClient (line); +- if (strncmp(line, "quit", 4) != 0) { +- WriteToClient("500 Quit required."); ++ /* we need a pty to run passwd on but we have to make sure it is set up ++ as we like it - no echo, canonical input processing, no map NL to CR/NL ++ on outputs - otherwise our expect function will be confused */ ++ (void)memset((void *)&stermios, 0, sizeof(stermios)); ++ stermios.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); ++ stermios.c_lflag |= ICANON; ++ stermios.c_oflag &= ~(ONLCR); ++ ++ /* get a pty and fork */ ++ switch(pid = forkpty(&master, NULL, &stermios, NULL)) { ++ case -1: ++ /* failure - can't get pty, can't fork etc */ ++ WriteToClient("500 Server Error - Contact Your Administrator"); ++ exit(1); ++ break; ++ case 0: ++ /* slave/child */ ++ /* Set login name */ ++ if (setlogin(user) < 0) { ++ syslog(LOG_ERR, "setlogin failed: %m"); ++ WriteToClient("500 Server Error - Contact Your Administrator"); ++ return(0); ++ } ++ setuid (pw->pw_uid); ++ setgid (pw->pw_gid); ++ dochild (master, NULL, user); ++ break; ++ default: ++ /* master/parent */ ++ sleep (1); /* Make sure child is ready. Is this really needed? */ ++ if (talktochild (master, user, oldpass, newpass, emess) == FAILURE) ++ { ++ syslog (LOG_ERR, "failed attempt by %s", user); ++ if (*emess == '\0') { ++ WriteToClient ("500 Password change unsuccessful, try a different password." ); ++ } else { ++ WriteToClient ("500 %s", emess); ++ } ++ exit(1); ++ } ++ ++ break; ++ } ++ ++ if ((wpid = waitpid (pid, &wstat, 0)) < 0) ++ { ++ syslog (LOG_ERR, "wait for /usr/bin/passwd child failed: %m"); ++ WriteToClient ("500 Server error (wait failed), get help!"); ++ exit (1); ++ } ++ ++ if (pid != wpid) ++ { ++ syslog (LOG_ERR, "wrong child (/usr/bin/passwd) waited for!"); ++ WriteToClient ("500 Server error (wrong child), get help!"); ++ exit (1); ++ } ++ ++ if (WIFEXITED (wstat) == 0) ++ { ++ syslog (LOG_ERR, "child (/usr/bin/passwd) killed?"); ++ WriteToClient ("500 Server error (funny wstat), get help!"); ++ exit (1); ++ } ++ ++ if (WEXITSTATUS (wstat) != 0) ++ { ++ syslog (LOG_ERR, "child (/usr/bin/passwd) exited abnormally"); ++ WriteToClient ("500 Server error (abnormal exit), get help!"); ++ exit (1); ++ } ++ ++ syslog (LOG_ERR, "password changed for %s", user); ++ WriteToClient ("200 Password changed, thank-you."); ++ ++ ReadFromClient (line); ++ if (strncmp(line, "quit", 4) != 0) { ++ WriteToClient("500 Quit required."); + exit (1); +- } ++ } + +- WriteToClient("200 Bye."); +- exit (0); +- } +- else /* Child */ +- { +- /* +- * Become the user trying who's password is being changed. We're +- * about to exec /bin/passwd with is setuid root anyway, but this +- * way it looks to the child completely like it's being run by +- * the normal user, which makes it do its own password verification +- * before doing any thing. In theory, we've already verified the +- * password, but this extra level of checking doesn't hurt. Besides, +- * the way I do it here, if somebody manages to change somebody +- * else's password, you can complain to your vendor about security +- * holes, not to me! +- */ +- setuid (pw->pw_uid); +- setgid (pw->pw_gid); +- dochild (master, slavedev, user); +- } ++ WriteToClient("200 Bye."); ++ exit (0); + } + + /* + * dochild + * +- * Do child stuff - set up slave pty and execl /bin/passwd. ++ * Do child stuff - set up slave pty and execl /usr/bin/passwd. + * + * Code adapted from "Advanced Programming in the UNIX Environment" + * by W. Richard Stevens. + * + */ + +-dochild (master, slavedev, user) +-int master; +-char *slavedev, *user; ++int dochild (int master, char *slavedev, char *user) + { +- int slave; +- struct termios stermios; ++ /* Fork /usr/bin/passwd. */ + +- /* Start new session - gets rid of controlling terminal. */ +- +- if (setsid() < 0) { +- syslog(LOG_ERR, "setsid failed: %m"); +- return(0); +- } +- +- /* Open slave pty and acquire as new controlling terminal. */ +- +- if ((slave = open(slavedev, O_RDWR)) < 0) { +- syslog(LOG_ERR, "can't open slave pty: %m"); +- return(0); +- } +- +- /* Close master. */ +- +- close(master); +- +- /* Make slave stdin/out/err of child. */ +- +- if (dup2(slave, STDIN_FILENO) != STDIN_FILENO) { +- syslog(LOG_ERR, "dup2 error to stdin: %m"); +- return(0); +- } +- if (dup2(slave, STDOUT_FILENO) != STDOUT_FILENO) { +- syslog(LOG_ERR, "dup2 error to stdout: %m"); +- return(0); +- } +- if (dup2(slave, STDERR_FILENO) != STDERR_FILENO) { +- syslog(LOG_ERR, "dup2 error to stderr: %m"); +- return(0); +- } +- if (slave > 2) close(slave); +- +- /* Set proper terminal attributes - no echo, canonical input processing, +- no map NL to CR/NL on output. */ +- +- if (tcgetattr(0, &stermios) < 0) { +- syslog(LOG_ERR, "tcgetattr error: %m"); +- return(0); +- } +- stermios.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); +- stermios.c_lflag |= ICANON; +- stermios.c_oflag &= ~(ONLCR); +- if (tcsetattr(0, TCSANOW, &stermios) < 0) { +- syslog(LOG_ERR, "tcsetattr error: %m"); +- return(0); +- } +- +- /* Fork /bin/passwd. */ +- +- if (execl("/bin/passwd", "passwd", user, (char*)0) < 0) { +- syslog(LOG_ERR, "can't exec /bin/passwd: %m"); ++ if (execl("/usr/bin/passwd", "passwd", user, (char*)0) < 0) { ++ syslog(LOG_ERR, "can't exec /usr/bin/passwd: %m"); + return(0); + } + } + +- +-/* +- * findpty() +- * +- * Finds the first available pseudo-terminal master/slave pair. The master +- * side is opened and a fd returned as the function value. A pointer to the +- * name of the slave side (i.e. "/dev/ttyp0") is returned in the argument, +- * which should be a char**. The name itself is stored in a static buffer. +- * +- * A negative value is returned on any sort of error. +- * +- * Modified by Norstad to remove assumptions about number of pty's allocated +- * on this UNIX box. +- */ +-findpty (slave) +-char **slave; +-{ +- int master; +- static char *line = "/dev/ptyXX"; +- DIR *dirp; +- struct dirent *dp; +- +- dirp = opendir("/dev"); +- while ((dp = readdir(dirp)) != NULL) { +- if (strncmp(dp->d_name, "pty", 3) == 0 && strlen(dp->d_name) == 5) { +- line[8] = dp->d_name[3]; +- line[9] = dp->d_name[4]; +- if ((master = open(line, O_RDWR)) >= 0) { +- line[5] = 't'; +- *slave = line; +- closedir(dirp); +- return (master); +- } +- } +- } +- closedir(dirp); +- return (-1); +-} +- + /* + * writestring() + * + * Write a string in a single write() system call. + */ +-writestring (fd, s) +-char *s; ++void writestring (int fd, char *s) + { + int l; + +@@ -458,9 +379,7 @@ + * FAILURE if any errors are encountered (in which case, it can be assumed + * that the password wasn't changed). + */ +-talktochild (master, user, oldpass, newpass, emess) +-int master; +-char *user, *oldpass, *newpass, *emess; ++int talktochild (int master, char *user, char *oldpass, char *newpass, char *emess) + { + char buf[BUFSIZE]; + char pswd[BUFSIZE+1]; +@@ -485,9 +404,11 @@ + } + + writestring(master, pswd); +- ++ sleep(2); + if (!expect(master, P4, buf)) return FAILURE; + ++ close(master); ++ + return SUCCESS; + } + +@@ -507,9 +428,7 @@ + * the pattern. + * 2 if the string matches the full pattern. + */ +-match (str, pat) +-char *str; +-char *pat; ++int match (char *str, char *pat) + { + int result; + +@@ -542,10 +461,7 @@ + * is not an initial segment of or exact match for at least one of + * the expected strings, the function returns FAILURE. + */ +-expect (master, expected, buf) +-int master; +-char **expected; +-char *buf; ++int expect (int master, char **expected, char *buf) + { + int n, m; + char **s; +@@ -596,10 +512,7 @@ + * returning just the error message text. Newlines in the error message + * text are replaced by spaces. + */ +-getemess (master, expected, buf) +-int master; +-char **expected; +-char *buf; ++void getemess (int master, char **expected, char *buf) + { + int n, m; + char **s; +@@ -630,21 +543,18 @@ + } + } + +-WriteToClient (fmt, va_alist) +-char *fmt; +-va_dcl ++void WriteToClient (char *fmt, ...) + { + va_list ap; + +- va_start (ap); ++ va_start (ap, fmt); + vfprintf (stdout, fmt, ap); + fputs ("\r\n", stdout ); + fflush (stdout); + va_end (ap); + } + +-ReadFromClient (line) +-char *line; ++void ReadFromClient (char *line) + { + char *sp; + int i; +@@ -659,10 +569,7 @@ + for (sp = line; isalpha(*sp); sp++) *sp = tolower(*sp); + } + +-int chkPass (user, pass, pw) +-char *user; +-char *pass; +-struct passwd *pw; ++int chkPass (char *user, char *pass, struct passwd *pw) + { + /* Compare the supplied password with the password file entry */ + if (strcmp (crypt (pass, pw->pw_passwd), pw->pw_passwd) != 0) diff --git a/mail/procmail/files/patch-Makefile b/mail/procmail/files/patch-Makefile new file mode 100644 index 000000000000..91a38924c475 --- /dev/null +++ b/mail/procmail/files/patch-Makefile @@ -0,0 +1,50 @@ +*** Makefile.orig Mon Apr 28 04:27:40 1997 +--- Makefile Wed May 14 18:16:50 1997 +*************** +*** 2,8 **** + + # BASENAME should point to where the whole lot will be installed + # change BASENAME to your home directory if need be +! BASENAME = /usr + # For display in the man pages + VISIBLE_BASENAME= $(BASENAME) + +--- 2,8 ---- + + # BASENAME should point to where the whole lot will be installed + # change BASENAME to your home directory if need be +! BASENAME = $(DESTDIR)$(PREFIX) + # For display in the man pages + VISIBLE_BASENAME= $(BASENAME) + +*************** +*** 53,59 **** +--- 53,63 ---- + + # Makefile.0 - mark, don't (re)move this, a sed script needs it + ++ .if defined(BATCH) ++ LOCKINGTEST=/tmp . ++ .else + LOCKINGTEST=__defaults__ ++ .endif + + #LOCKINGTEST=/tmp . # Uncomment and add any directories you see fit. + # If LOCKINGTEST is defined, autoconf will NOT +*************** +*** 86,92 **** + #-Wimplicit -Wshadow -Wid-clash-6 #-Wuninitialized + + # The place to put your favourite extra cc flag +! CFLAGS0 = -O #$(GCC_WARNINGS) + LDFLAGS0= -s + # Read my libs :-) + LIBS= +--- 90,96 ---- + #-Wimplicit -Wshadow -Wid-clash-6 #-Wuninitialized + + # The place to put your favourite extra cc flag +! CFLAGS0 = #-O #$(GCC_WARNINGS) + LDFLAGS0= -s + # Read my libs :-) + LIBS= diff --git a/mail/procmail/files/patch-Makefile.1 b/mail/procmail/files/patch-Makefile.1 new file mode 100644 index 000000000000..d314a6af2685 --- /dev/null +++ b/mail/procmail/files/patch-Makefile.1 @@ -0,0 +1,15 @@ +--- Makefile.1.orig Tue Dec 28 10:33:26 1999 ++++ Makefile.1 Tue Dec 28 10:33:55 1999 +@@ -60,12 +60,7 @@ + sed -n 's/.*\(Mlocal.*procmail.*F=[a-zA-Z]*\)u/\1/p' `if test -f \ + /etc/sendmail.cf; then echo /etc/sendmail.cf; else \ + echo /usr/lib/sendmail.cf; fi`; fi +- @echo +- @echo \ +- "Also, HIGHLY RECOMMENDED (type 'make install-suid' to execute it):" +- @echo + @src/$@ $(BINDIR)/procmail $(BINDIR)/lockfile >suid.sh +- @src/$@ $(BINDIR)/procmail $(BINDIR)/lockfile + @echo ================================================================\ + =============== + diff --git a/mail/procmail/files/patch-aa b/mail/procmail/files/patch-aa deleted file mode 100644 index 91a38924c475..000000000000 --- a/mail/procmail/files/patch-aa +++ /dev/null @@ -1,50 +0,0 @@ -*** Makefile.orig Mon Apr 28 04:27:40 1997 ---- Makefile Wed May 14 18:16:50 1997 -*************** -*** 2,8 **** - - # BASENAME should point to where the whole lot will be installed - # change BASENAME to your home directory if need be -! BASENAME = /usr - # For display in the man pages - VISIBLE_BASENAME= $(BASENAME) - ---- 2,8 ---- - - # BASENAME should point to where the whole lot will be installed - # change BASENAME to your home directory if need be -! BASENAME = $(DESTDIR)$(PREFIX) - # For display in the man pages - VISIBLE_BASENAME= $(BASENAME) - -*************** -*** 53,59 **** ---- 53,63 ---- - - # Makefile.0 - mark, don't (re)move this, a sed script needs it - -+ .if defined(BATCH) -+ LOCKINGTEST=/tmp . -+ .else - LOCKINGTEST=__defaults__ -+ .endif - - #LOCKINGTEST=/tmp . # Uncomment and add any directories you see fit. - # If LOCKINGTEST is defined, autoconf will NOT -*************** -*** 86,92 **** - #-Wimplicit -Wshadow -Wid-clash-6 #-Wuninitialized - - # The place to put your favourite extra cc flag -! CFLAGS0 = -O #$(GCC_WARNINGS) - LDFLAGS0= -s - # Read my libs :-) - LIBS= ---- 90,96 ---- - #-Wimplicit -Wshadow -Wid-clash-6 #-Wuninitialized - - # The place to put your favourite extra cc flag -! CFLAGS0 = #-O #$(GCC_WARNINGS) - LDFLAGS0= -s - # Read my libs :-) - LIBS= diff --git a/mail/procmail/files/patch-ab b/mail/procmail/files/patch-ab deleted file mode 100644 index b5bc1b48f429..000000000000 --- a/mail/procmail/files/patch-ab +++ /dev/null @@ -1,37 +0,0 @@ ---- config.h.orig Tue Sep 11 08:53:50 2001 -+++ config.h Sun Mar 30 20:23:47 2003 -@@ -52,7 +52,7 @@ - is group writable or contained in a group writable home directory - if the group involved is the user's default group. */ - --/*#define LMTP /* uncomment this if you -+#define LMTP /* uncomment this if you - want to use procmail - as an LMTP (rfc2033) server, presumably for invocation by an MTA. - The file examples/local_procmail_lmtp.m4 contains info on how to -@@ -75,9 +75,9 @@ - >From_ field will be added in the header */ - - #define TRUSTED_IDS {"root","daemon","uucp","mail","x400","network",\ -- "list","slist","lists","news",0} -+ "list","slist","lists","news","mailnull","majordom","majordomo",0} - --/*#define NO_fcntl_LOCK /* uncomment any of these three if you */ -+#define NO_fcntl_LOCK /* uncomment any of these three if you */ - /*#define NO_lockf_LOCK /* definitely do not want procmail to make */ - /*#define NO_flock_LOCK /* use of those kernel-locking methods */ - /* If you set LOCKINGTEST to a binary number -@@ -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 "%%PREFIX%%/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 "%%PREFIX%%/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 diff --git a/mail/procmail/files/patch-ac b/mail/procmail/files/patch-ac deleted file mode 100644 index e363e3ac83e7..000000000000 --- a/mail/procmail/files/patch-ac +++ /dev/null @@ -1,13 +0,0 @@ ---- initmake.orig Sat Jan 29 09:52:13 2000 -+++ initmake Sun Aug 27 13:06:14 2000 -@@ -433,8 +433,8 @@ - test -z "$MAKE" && echo "MAKE = make" >>_Makefile - test a"$cc" != a"$CC" && echo "CC = $cc" >>_Makefile - --echo "CFLAGS = \$(CFLAGS1)$CFLAGS" >>_Makefile --echo "LDFLAGS = $LDFLAGS" >>_Makefile -+echo "CFLAGS += \$(CFLAGS1)$CFLAGS" >>_Makefile -+echo "LDFLAGS += $LDFLAGS" >>_Makefile - echo >>_Makefile - - MANSS="" diff --git a/mail/procmail/files/patch-ad b/mail/procmail/files/patch-ad deleted file mode 100644 index c73f9f9373cf..000000000000 --- a/mail/procmail/files/patch-ad +++ /dev/null @@ -1,12 +0,0 @@ -*** src/recommend.c.bak Wed Apr 2 07:15:45 1997 ---- src/recommend.c Tue Jun 17 21:48:49 1997 -*************** -*** 23,29 **** - { fprintf(stderr,"Please run this program via 'make recommend'\n"); - return EX_USAGE; - } -- strchr(mailspooldir,'\0')[-1]='\0'; /* strip last character */ - for(p=checkf;*p;p++) - if(!stat(*p,&stbuf)&&stbuf.st_mode&S_ISGID) - { if(stbuf.st_mode&S_ISGID) ---- 23,28 ---- diff --git a/mail/procmail/files/patch-ae b/mail/procmail/files/patch-ae deleted file mode 100644 index d314a6af2685..000000000000 --- a/mail/procmail/files/patch-ae +++ /dev/null @@ -1,15 +0,0 @@ ---- Makefile.1.orig Tue Dec 28 10:33:26 1999 -+++ Makefile.1 Tue Dec 28 10:33:55 1999 -@@ -60,12 +60,7 @@ - sed -n 's/.*\(Mlocal.*procmail.*F=[a-zA-Z]*\)u/\1/p' `if test -f \ - /etc/sendmail.cf; then echo /etc/sendmail.cf; else \ - echo /usr/lib/sendmail.cf; fi`; fi -- @echo -- @echo \ -- "Also, HIGHLY RECOMMENDED (type 'make install-suid' to execute it):" -- @echo - @src/$@ $(BINDIR)/procmail $(BINDIR)/lockfile >suid.sh -- @src/$@ $(BINDIR)/procmail $(BINDIR)/lockfile - @echo ================================================================\ - =============== - diff --git a/mail/procmail/files/patch-af b/mail/procmail/files/patch-af deleted file mode 100644 index 1cfe9af851dd..000000000000 --- a/mail/procmail/files/patch-af +++ /dev/null @@ -1,11 +0,0 @@ ---- src/pipes.c.bak Tue Sep 11 08:58:44 2001 -+++ src/pipes.c Mon Nov 11 02:11:49 2002 -@@ -194,7 +194,7 @@ - makeblock(&temp,Stdfilled); - tmemmove(temp.p,Stdout,Stdfilled); - readdyn(&temp,&Stdfilled,Stdfilled+backlen+1); -- Stdout=realloc(Stdout,&Stdfilled+1); -+ Stdout=realloc(Stdout,Stdfilled+1); - tmemmove(Stdout,temp.p,Stdfilled+1); - freeblock(&temp); - retStdout(Stdout,pwait&&pipw,!backblock); diff --git a/mail/procmail/files/patch-ag b/mail/procmail/files/patch-ag deleted file mode 100644 index 1ec12acc25bd..000000000000 --- a/mail/procmail/files/patch-ag +++ /dev/null @@ -1,11 +0,0 @@ ---- src/manconf.c.orig Fri Aug 25 11:04:33 2000 -+++ src/manconf.c Sun Aug 27 13:12:55 2000 -@@ -140,7 +140,7 @@ - sh before procmail ever sees it; it is however a necessary kludge against\1\ - overoptimising sendmail programs:\1"); - #else -- ps("FW_content","\"|exec @BINDIR@/procmail\""); -+ ps("FW_content","\"|exec @BINDIR@/procmail || exit 75\""); - ps("FW_comment",""); - #endif - #else diff --git a/mail/procmail/files/patch-ah b/mail/procmail/files/patch-ah deleted file mode 100644 index c3a84f47d61f..000000000000 --- a/mail/procmail/files/patch-ah +++ /dev/null @@ -1,14 +0,0 @@ ---- man/procmail.man.orig Fri Aug 25 11:04:32 2000 -+++ man/procmail.man Sun Aug 27 13:21:23 2000 -@@ -690,9 +690,8 @@ - .RE - .PP - @CF_procmail@ --In this case your $HOME/@DOT_FORWARD@ (beware, it --.B has --to be world readable) file should contain the line below. Be sure to include -+In this case your $HOME/@DOT_FORWARD@ -+file should contain the line below. Be sure to include - the single and double quotes, and unless you know your site to be running - smrsh (the SendMail Restricted SHell), it must be an - .I absolute diff --git a/mail/procmail/files/patch-ai b/mail/procmail/files/patch-ai deleted file mode 100644 index a267f97e9f87..000000000000 --- a/mail/procmail/files/patch-ai +++ /dev/null @@ -1,11 +0,0 @@ ---- src/procmail.c.bak Tue Sep 11 08:59:14 2001 -+++ src/procmail.c Sun Aug 3 05:34:55 2003 -@@ -652,7 +652,7 @@ - nrcond= -1; - if(tolock) /* clear temporary buffer for lockfile name */ - free(tolock); -- for(i=maxindex(flags);i;i--) /* clear the flags */ -+ for(i=maxindex(flags);i>=0;i--) /* clear the flags */ - flags[i]=0; - for(tolock=0,locknext=0;;) - { chp=skpspace(chp); diff --git a/mail/procmail/files/patch-aj b/mail/procmail/files/patch-aj deleted file mode 100644 index 02d3e9a9ba74..000000000000 --- a/mail/procmail/files/patch-aj +++ /dev/null @@ -1,11 +0,0 @@ ---- src/comsat.c.orig Tue Sep 11 08:55:46 2001 -+++ src/comsat.c Wed Nov 17 09:44:12 2004 -@@ -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/procmail/files/patch-config.h b/mail/procmail/files/patch-config.h new file mode 100644 index 000000000000..b5bc1b48f429 --- /dev/null +++ b/mail/procmail/files/patch-config.h @@ -0,0 +1,37 @@ +--- config.h.orig Tue Sep 11 08:53:50 2001 ++++ config.h Sun Mar 30 20:23:47 2003 +@@ -52,7 +52,7 @@ + is group writable or contained in a group writable home directory + if the group involved is the user's default group. */ + +-/*#define LMTP /* uncomment this if you ++#define LMTP /* uncomment this if you + want to use procmail + as an LMTP (rfc2033) server, presumably for invocation by an MTA. + The file examples/local_procmail_lmtp.m4 contains info on how to +@@ -75,9 +75,9 @@ + >From_ field will be added in the header */ + + #define TRUSTED_IDS {"root","daemon","uucp","mail","x400","network",\ +- "list","slist","lists","news",0} ++ "list","slist","lists","news","mailnull","majordom","majordomo",0} + +-/*#define NO_fcntl_LOCK /* uncomment any of these three if you */ ++#define NO_fcntl_LOCK /* uncomment any of these three if you */ + /*#define NO_lockf_LOCK /* definitely do not want procmail to make */ + /*#define NO_flock_LOCK /* use of those kernel-locking methods */ + /* If you set LOCKINGTEST to a binary number +@@ -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 "%%PREFIX%%/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 "%%PREFIX%%/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 diff --git a/mail/procmail/files/patch-initmake b/mail/procmail/files/patch-initmake new file mode 100644 index 000000000000..e363e3ac83e7 --- /dev/null +++ b/mail/procmail/files/patch-initmake @@ -0,0 +1,13 @@ +--- initmake.orig Sat Jan 29 09:52:13 2000 ++++ initmake Sun Aug 27 13:06:14 2000 +@@ -433,8 +433,8 @@ + test -z "$MAKE" && echo "MAKE = make" >>_Makefile + test a"$cc" != a"$CC" && echo "CC = $cc" >>_Makefile + +-echo "CFLAGS = \$(CFLAGS1)$CFLAGS" >>_Makefile +-echo "LDFLAGS = $LDFLAGS" >>_Makefile ++echo "CFLAGS += \$(CFLAGS1)$CFLAGS" >>_Makefile ++echo "LDFLAGS += $LDFLAGS" >>_Makefile + echo >>_Makefile + + MANSS="" diff --git a/mail/procmail/files/patch-man-procmail.man b/mail/procmail/files/patch-man-procmail.man new file mode 100644 index 000000000000..c3a84f47d61f --- /dev/null +++ b/mail/procmail/files/patch-man-procmail.man @@ -0,0 +1,14 @@ +--- man/procmail.man.orig Fri Aug 25 11:04:32 2000 ++++ man/procmail.man Sun Aug 27 13:21:23 2000 +@@ -690,9 +690,8 @@ + .RE + .PP + @CF_procmail@ +-In this case your $HOME/@DOT_FORWARD@ (beware, it +-.B has +-to be world readable) file should contain the line below. Be sure to include ++In this case your $HOME/@DOT_FORWARD@ ++file should contain the line below. Be sure to include + the single and double quotes, and unless you know your site to be running + smrsh (the SendMail Restricted SHell), it must be an + .I absolute diff --git a/mail/procmail/files/patch-src-comsat.c b/mail/procmail/files/patch-src-comsat.c new file mode 100644 index 000000000000..02d3e9a9ba74 --- /dev/null +++ b/mail/procmail/files/patch-src-comsat.c @@ -0,0 +1,11 @@ +--- src/comsat.c.orig Tue Sep 11 08:55:46 2001 ++++ src/comsat.c Wed Nov 17 09:44:12 2004 +@@ -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/procmail/files/patch-src-manconf.c b/mail/procmail/files/patch-src-manconf.c new file mode 100644 index 000000000000..1ec12acc25bd --- /dev/null +++ b/mail/procmail/files/patch-src-manconf.c @@ -0,0 +1,11 @@ +--- src/manconf.c.orig Fri Aug 25 11:04:33 2000 ++++ src/manconf.c Sun Aug 27 13:12:55 2000 +@@ -140,7 +140,7 @@ + sh before procmail ever sees it; it is however a necessary kludge against\1\ + overoptimising sendmail programs:\1"); + #else +- ps("FW_content","\"|exec @BINDIR@/procmail\""); ++ ps("FW_content","\"|exec @BINDIR@/procmail || exit 75\""); + ps("FW_comment",""); + #endif + #else diff --git a/mail/procmail/files/patch-src-pipes.c b/mail/procmail/files/patch-src-pipes.c new file mode 100644 index 000000000000..1cfe9af851dd --- /dev/null +++ b/mail/procmail/files/patch-src-pipes.c @@ -0,0 +1,11 @@ +--- src/pipes.c.bak Tue Sep 11 08:58:44 2001 ++++ src/pipes.c Mon Nov 11 02:11:49 2002 +@@ -194,7 +194,7 @@ + makeblock(&temp,Stdfilled); + tmemmove(temp.p,Stdout,Stdfilled); + readdyn(&temp,&Stdfilled,Stdfilled+backlen+1); +- Stdout=realloc(Stdout,&Stdfilled+1); ++ Stdout=realloc(Stdout,Stdfilled+1); + tmemmove(Stdout,temp.p,Stdfilled+1); + freeblock(&temp); + retStdout(Stdout,pwait&&pipw,!backblock); diff --git a/mail/procmail/files/patch-src-procmail.c b/mail/procmail/files/patch-src-procmail.c new file mode 100644 index 000000000000..a267f97e9f87 --- /dev/null +++ b/mail/procmail/files/patch-src-procmail.c @@ -0,0 +1,11 @@ +--- src/procmail.c.bak Tue Sep 11 08:59:14 2001 ++++ src/procmail.c Sun Aug 3 05:34:55 2003 +@@ -652,7 +652,7 @@ + nrcond= -1; + if(tolock) /* clear temporary buffer for lockfile name */ + free(tolock); +- for(i=maxindex(flags);i;i--) /* clear the flags */ ++ for(i=maxindex(flags);i>=0;i--) /* clear the flags */ + flags[i]=0; + for(tolock=0,locknext=0;;) + { chp=skpspace(chp); diff --git a/mail/procmail/files/patch-src-recommend.c b/mail/procmail/files/patch-src-recommend.c new file mode 100644 index 000000000000..c73f9f9373cf --- /dev/null +++ b/mail/procmail/files/patch-src-recommend.c @@ -0,0 +1,12 @@ +*** src/recommend.c.bak Wed Apr 2 07:15:45 1997 +--- src/recommend.c Tue Jun 17 21:48:49 1997 +*************** +*** 23,29 **** + { fprintf(stderr,"Please run this program via 'make recommend'\n"); + return EX_USAGE; + } +- strchr(mailspooldir,'\0')[-1]='\0'; /* strip last character */ + for(p=checkf;*p;p++) + if(!stat(*p,&stbuf)&&stbuf.st_mode&S_ISGID) + { if(stbuf.st_mode&S_ISGID) +--- 23,28 ---- diff --git a/mail/qpopper/files/patch-aa b/mail/qpopper/files/patch-aa deleted file mode 100644 index a5ca95186ebb..000000000000 --- a/mail/qpopper/files/patch-aa +++ /dev/null @@ -1,12 +0,0 @@ ---- popper/Makefile.in.orig 2011-06-08 23:45:12.000000000 -0700 -+++ popper/Makefile.in 2011-06-08 23:45:40.000000000 -0700 -@@ -213,7 +213,7 @@ - ${LIBS} ${LDFLAGS} - - popauth: ${POPAUTHOBJS} ${MISSING_OBJS} -- ${CC} -o popauth ${POPAUTHOBJS} ${NETWORK_LIBS} \ -+ ${CC} -o popauth ${POPAUTHOBJS} ${NETWORK_LIBS} ${LIBS}\ - ${DBM_LIBS} ${MISSING_OBJS} \ - ${common_dir}/libcommon.a - - diff --git a/mail/qpopper/files/patch-ac b/mail/qpopper/files/patch-ac deleted file mode 100644 index e4b4db0e0768..000000000000 --- a/mail/qpopper/files/patch-ac +++ /dev/null @@ -1,37 +0,0 @@ ---- man/popper.8.orig Wed Nov 1 11:33:06 2000 -+++ man/popper.8 Wed Nov 1 11:38:58 2000 -@@ -19,7 +19,7 @@ - .SH NAME - qpopper \-\- pop 3 server (v3.1b7) - .SH SYNOPSIS --.B /usr/local/lib/popper -+.B %%PREFIX%%/libexec/qpopper - [ - .I [ address ] - .I [ ":" ] -@@ -628,7 +628,7 @@ - systems with BSD 4.3 syslogging, the server logs (by default) to the - "local0" facility at priority "notice" for all messages except - debugging which is logged at priority "debug". The default log file is --/usr/spool/mqueue/POPlog. These can be changed, if desired. On -+/var/log/messages. These can be changed, if desired. On - systems with 4.2 syslogging all messages are logged to the local log - file, usually /usr/spool/mqueue/syslog. - .SH DEBUGGING -@@ -663,7 +663,7 @@ - .PP - The server implements several extended commands. - .PP --XTND XMIT: Sends a mail message using /usr/lib/sendmail. -+XTND XMIT: Sends a mail message using /usr/sbin/sendmail. - .PP - XTND XLIST header [num]: Extracts and returns the specified header line - for the specified message number. If the "num" parameter is missing, -@@ -688,6 +688,7 @@ - .SH FILES - .nf - /var/mail mail files -+/etc/ftpusers list of unwelcome/restricted users - /etc/inetd.conf pop program invocation - /etc/syslog.conf logging specifications - /var/spool/bulls bulletins diff --git a/mail/qpopper/files/patch-ao b/mail/qpopper/files/patch-ao deleted file mode 100644 index c1cf86d50025..000000000000 --- a/mail/qpopper/files/patch-ao +++ /dev/null @@ -1,17 +0,0 @@ ---- popper/popauth.c.orig Wed Nov 1 11:42:03 2000 -+++ popper/popauth.c Wed Nov 1 11:41:56 2000 -@@ -154,11 +154,11 @@ - char *name; - } modes[] = { - #define SCRAM_AUTH 0 -- { "scramauth" }, -+ { "qscramauth" }, - #define APOP_AUTH 1 -- { "apopauth" }, -+ { "qapopauth" }, - #define POP_AUTH 2 -- { "popauth" }, -+ { "qpopauth" }, - #define OTHER 3 - { NULL } - }; diff --git a/mail/qpopper/files/patch-ap b/mail/qpopper/files/patch-ap deleted file mode 100644 index 009b38f3b1a4..000000000000 --- a/mail/qpopper/files/patch-ap +++ /dev/null @@ -1,53 +0,0 @@ - -$FreeBSD$ - ---- man/popauth.8.orig Wed Apr 4 03:23:13 2001 -+++ man/popauth.8 Fri Apr 13 19:05:06 2001 -@@ -7,11 +7,11 @@ - .\" See License.txt file for terms and conditions for modification and - .\" redistribution. - .\" --.TH POPAUTH 8 -+.TH QPOPAUTH 8 - .SH NAME --popauth \-\- manipulate POP authorization DB -+qpopauth \-\- manipulate POP authorization DB - .SH SYNOPSIS --.B popauth -+.B qpopauth - [ - .BI \-trace " tracefile" - ] [ -@@ -46,18 +46,18 @@ - ] - - .SH DESCRIPTION --The \fIpopauth\fR program allows POP subscribers to add or change the secret -+The \fIqpopauth\fR program allows POP subscribers to add or change the secret - values used to generate their authentication credentials, or to verify the - existance of their records. - - In addition, the super\-user or master POP user can add, delete, or reset - credential data for a user, or list which records exist. Only the --super\-user may initialize the database. \fIpopauth\fR is useful only when -+super\-user may initialize the database. \fIqpopauth\fR is useful only when - the APOP (or SCRAM) configuration option is defined. See the INSTALL file - in the Qpopper distribution for more information. - - Under normal usage, --\fIpopauth\fR prompts for a new secret, -+\fIqpopauth\fR prompts for a new secret, - just like the \fIpasswd\fR program. It then updates the authorization DB. - - With the -@@ -85,8 +85,8 @@ - switch, the super-user or master POP user can remove - a user entry from the authorization DB. - .SH FILES --/etc/pop.auth.* POP authorization DB -+%%PREFIX%%/etc/qpopper/pop.auth.* POP authorization DB - .SH ACKNOWLEDGEMENTS - This program was derived from MH 6.8.3 - .SH SEE ALSO --popper(8), poppassd(8) -+qpopper(8) diff --git a/mail/qpopper/files/patch-aq b/mail/qpopper/files/patch-aq deleted file mode 100644 index 79c1b59753c8..000000000000 --- a/mail/qpopper/files/patch-aq +++ /dev/null @@ -1,14 +0,0 @@ ---- popper/scram.c.orig 2008-06-21 18:32:58.000000000 -0700 -+++ popper/scram.c 2011-06-08 21:50:54.000000000 -0700 -@@ -18,7 +18,10 @@ - #include <netinet/in.h> - - #include "uint4.h" --#include "md5.h" -+#include <md5.h> -+ -+#define UINT4 u_int32_t -+ - #include "hmac-md5.h" - #include "scram.h" - diff --git a/mail/qpopper/files/patch-ar b/mail/qpopper/files/patch-ar deleted file mode 100644 index 272aadbeccac..000000000000 --- a/mail/qpopper/files/patch-ar +++ /dev/null @@ -1,15 +0,0 @@ ---- popper/hmac.c.orig 2008-06-27 17:40:15.000000000 -0700 -+++ popper/hmac.c 2011-06-08 21:57:42.000000000 -0700 -@@ -13,7 +13,11 @@ - #include <stdio.h> - #include <string.h> - #include <sys/types.h> --#include "md5.h" -+#include <sys/types.h> -+#include <md5.h> -+ -+#define UINT4 u_int32_t -+ - #include "hmac-md5.h" - - diff --git a/mail/qpopper/files/patch-man__popper.8 b/mail/qpopper/files/patch-man__popper.8 new file mode 100644 index 000000000000..e4b4db0e0768 --- /dev/null +++ b/mail/qpopper/files/patch-man__popper.8 @@ -0,0 +1,37 @@ +--- man/popper.8.orig Wed Nov 1 11:33:06 2000 ++++ man/popper.8 Wed Nov 1 11:38:58 2000 +@@ -19,7 +19,7 @@ + .SH NAME + qpopper \-\- pop 3 server (v3.1b7) + .SH SYNOPSIS +-.B /usr/local/lib/popper ++.B %%PREFIX%%/libexec/qpopper + [ + .I [ address ] + .I [ ":" ] +@@ -628,7 +628,7 @@ + systems with BSD 4.3 syslogging, the server logs (by default) to the + "local0" facility at priority "notice" for all messages except + debugging which is logged at priority "debug". The default log file is +-/usr/spool/mqueue/POPlog. These can be changed, if desired. On ++/var/log/messages. These can be changed, if desired. On + systems with 4.2 syslogging all messages are logged to the local log + file, usually /usr/spool/mqueue/syslog. + .SH DEBUGGING +@@ -663,7 +663,7 @@ + .PP + The server implements several extended commands. + .PP +-XTND XMIT: Sends a mail message using /usr/lib/sendmail. ++XTND XMIT: Sends a mail message using /usr/sbin/sendmail. + .PP + XTND XLIST header [num]: Extracts and returns the specified header line + for the specified message number. If the "num" parameter is missing, +@@ -688,6 +688,7 @@ + .SH FILES + .nf + /var/mail mail files ++/etc/ftpusers list of unwelcome/restricted users + /etc/inetd.conf pop program invocation + /etc/syslog.conf logging specifications + /var/spool/bulls bulletins diff --git a/mail/qpopper/files/patch-popper__Makefile.in b/mail/qpopper/files/patch-popper__Makefile.in new file mode 100644 index 000000000000..a5ca95186ebb --- /dev/null +++ b/mail/qpopper/files/patch-popper__Makefile.in @@ -0,0 +1,12 @@ +--- popper/Makefile.in.orig 2011-06-08 23:45:12.000000000 -0700 ++++ popper/Makefile.in 2011-06-08 23:45:40.000000000 -0700 +@@ -213,7 +213,7 @@ + ${LIBS} ${LDFLAGS} + + popauth: ${POPAUTHOBJS} ${MISSING_OBJS} +- ${CC} -o popauth ${POPAUTHOBJS} ${NETWORK_LIBS} \ ++ ${CC} -o popauth ${POPAUTHOBJS} ${NETWORK_LIBS} ${LIBS}\ + ${DBM_LIBS} ${MISSING_OBJS} \ + ${common_dir}/libcommon.a + + diff --git a/mail/qpopper/files/patch-popper__hmac.c b/mail/qpopper/files/patch-popper__hmac.c new file mode 100644 index 000000000000..272aadbeccac --- /dev/null +++ b/mail/qpopper/files/patch-popper__hmac.c @@ -0,0 +1,15 @@ +--- popper/hmac.c.orig 2008-06-27 17:40:15.000000000 -0700 ++++ popper/hmac.c 2011-06-08 21:57:42.000000000 -0700 +@@ -13,7 +13,11 @@ + #include <stdio.h> + #include <string.h> + #include <sys/types.h> +-#include "md5.h" ++#include <sys/types.h> ++#include <md5.h> ++ ++#define UINT4 u_int32_t ++ + #include "hmac-md5.h" + + diff --git a/mail/qpopper/files/patch-popper__popauth.8 b/mail/qpopper/files/patch-popper__popauth.8 new file mode 100644 index 000000000000..009b38f3b1a4 --- /dev/null +++ b/mail/qpopper/files/patch-popper__popauth.8 @@ -0,0 +1,53 @@ + +$FreeBSD$ + +--- man/popauth.8.orig Wed Apr 4 03:23:13 2001 ++++ man/popauth.8 Fri Apr 13 19:05:06 2001 +@@ -7,11 +7,11 @@ + .\" See License.txt file for terms and conditions for modification and + .\" redistribution. + .\" +-.TH POPAUTH 8 ++.TH QPOPAUTH 8 + .SH NAME +-popauth \-\- manipulate POP authorization DB ++qpopauth \-\- manipulate POP authorization DB + .SH SYNOPSIS +-.B popauth ++.B qpopauth + [ + .BI \-trace " tracefile" + ] [ +@@ -46,18 +46,18 @@ + ] + + .SH DESCRIPTION +-The \fIpopauth\fR program allows POP subscribers to add or change the secret ++The \fIqpopauth\fR program allows POP subscribers to add or change the secret + values used to generate their authentication credentials, or to verify the + existance of their records. + + In addition, the super\-user or master POP user can add, delete, or reset + credential data for a user, or list which records exist. Only the +-super\-user may initialize the database. \fIpopauth\fR is useful only when ++super\-user may initialize the database. \fIqpopauth\fR is useful only when + the APOP (or SCRAM) configuration option is defined. See the INSTALL file + in the Qpopper distribution for more information. + + Under normal usage, +-\fIpopauth\fR prompts for a new secret, ++\fIqpopauth\fR prompts for a new secret, + just like the \fIpasswd\fR program. It then updates the authorization DB. + + With the +@@ -85,8 +85,8 @@ + switch, the super-user or master POP user can remove + a user entry from the authorization DB. + .SH FILES +-/etc/pop.auth.* POP authorization DB ++%%PREFIX%%/etc/qpopper/pop.auth.* POP authorization DB + .SH ACKNOWLEDGEMENTS + This program was derived from MH 6.8.3 + .SH SEE ALSO +-popper(8), poppassd(8) ++qpopper(8) diff --git a/mail/qpopper/files/patch-popper__popauth.c b/mail/qpopper/files/patch-popper__popauth.c new file mode 100644 index 000000000000..c1cf86d50025 --- /dev/null +++ b/mail/qpopper/files/patch-popper__popauth.c @@ -0,0 +1,17 @@ +--- popper/popauth.c.orig Wed Nov 1 11:42:03 2000 ++++ popper/popauth.c Wed Nov 1 11:41:56 2000 +@@ -154,11 +154,11 @@ + char *name; + } modes[] = { + #define SCRAM_AUTH 0 +- { "scramauth" }, ++ { "qscramauth" }, + #define APOP_AUTH 1 +- { "apopauth" }, ++ { "qapopauth" }, + #define POP_AUTH 2 +- { "popauth" }, ++ { "qpopauth" }, + #define OTHER 3 + { NULL } + }; diff --git a/mail/qpopper/files/patch-popper__scram.c b/mail/qpopper/files/patch-popper__scram.c new file mode 100644 index 000000000000..79c1b59753c8 --- /dev/null +++ b/mail/qpopper/files/patch-popper__scram.c @@ -0,0 +1,14 @@ +--- popper/scram.c.orig 2008-06-21 18:32:58.000000000 -0700 ++++ popper/scram.c 2011-06-08 21:50:54.000000000 -0700 +@@ -18,7 +18,10 @@ + #include <netinet/in.h> + + #include "uint4.h" +-#include "md5.h" ++#include <md5.h> ++ ++#define UINT4 u_int32_t ++ + #include "hmac-md5.h" + #include "scram.h" + diff --git a/mail/rbl-milter/files/patch-aa b/mail/rbl-milter/files/patch-aa deleted file mode 100644 index 743700ee030f..000000000000 --- a/mail/rbl-milter/files/patch-aa +++ /dev/null @@ -1,13 +0,0 @@ ---- configure.orig Thu Jun 13 11:26:23 2002 -+++ configure Sun Feb 15 18:31:33 2004 -@@ -1229,8 +1229,8 @@ - - - LDFLAGS="$LDFLAGS -L$SENDMAIL_OBJ/libmilter -L$SENDMAIL_OBJ/libsm -L$SENDMAIL_OBJ/libsmutil -L$SENDMAIL_OBJ/lib"; --CFLAGS="$CFLAGS -Wall -Werror" --LIBS="$LIBS -pthread -lpthread" -+CFLAGS="$CFLAGS $PTHREAD_CFLAGS -Wall -Werror" -+LIBS="$LIBS $PTHREAD_LIBS" - - - echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 diff --git a/mail/rbl-milter/files/patch-configure b/mail/rbl-milter/files/patch-configure new file mode 100644 index 000000000000..743700ee030f --- /dev/null +++ b/mail/rbl-milter/files/patch-configure @@ -0,0 +1,13 @@ +--- configure.orig Thu Jun 13 11:26:23 2002 ++++ configure Sun Feb 15 18:31:33 2004 +@@ -1229,8 +1229,8 @@ + + + LDFLAGS="$LDFLAGS -L$SENDMAIL_OBJ/libmilter -L$SENDMAIL_OBJ/libsm -L$SENDMAIL_OBJ/libsmutil -L$SENDMAIL_OBJ/lib"; +-CFLAGS="$CFLAGS -Wall -Werror" +-LIBS="$LIBS -pthread -lpthread" ++CFLAGS="$CFLAGS $PTHREAD_CFLAGS -Wall -Werror" ++LIBS="$LIBS $PTHREAD_LIBS" + + + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 diff --git a/mail/rblcheck/files/patch-aa b/mail/rblcheck/files/patch-aa deleted file mode 100644 index 3ab717674fb8..000000000000 --- a/mail/rblcheck/files/patch-aa +++ /dev/null @@ -1,122 +0,0 @@ ---- rblcheck.c.orig Thu Nov 8 14:05:27 2001 -+++ rblcheck.c Wed May 1 08:19:16 2002 -@@ -28,8 +28,10 @@ - #include <sys/types.h> - #include <netinet/in.h> - #include <arpa/nameser.h> -+#include <arpa/inet.h> - #include <resolv.h> - #include <netdb.h> -+#include <unistd.h> - - /*-- PORTABILITY ------------------------------------------------------------*/ - -@@ -184,7 +186,7 @@ - * domain. If "txt" is non-zero, we perform a TXT record lookup. We - * return the text returned from a TXT match, or an empty string, on - * a successful match, or NULL on an unsuccessful match. */ --char * rblcheck( int a, int b, int c, int d, char * rbldomain, int txt ) -+char * rblcheck( struct in_addr a, char * rbldomain, int txt ) - { - char * domain; - char * result = NULL; -@@ -195,12 +197,15 @@ - const u_char * cend; - const u_char * rend; - int len; -+ u_char *p; -+ int i, j; - - /* 16 characters max in a dotted-quad address, plus 1 for null */ - domain = ( char * )malloc( 17 + strlen( rbldomain ) ); - -+ p = (u_char *)&a; - /* Create a domain name, in reverse. */ -- sprintf( domain, "%d.%d.%d.%d.%s", d, c, b, a, rbldomain ); -+ sprintf( domain, "%d.%d.%d.%d.%s", p[3], p[2], p[1], p[0], rbldomain ); - - /* Make our DNS query. */ - res_init(); -@@ -242,8 +247,8 @@ - cp = answer + sizeof( HEADER ); - while( *cp != '\0' ) - { -- a = *cp++; -- while( a-- ) -+ i = *cp++; -+ while( i-- ) - cp++; - } - -@@ -258,8 +263,8 @@ - cp += ( NS_INT16SZ * 2 ) + NS_INT32SZ; - - /* Get the length and end of the buffer. */ -- NS_GET16( c, cp ); -- cend = cp + c; -+ NS_GET16( i, cp ); -+ cend = cp + i; - - /* Iterate over any multiple answers we might have. In - this context, it's unlikely, but anyway. */ -@@ -267,10 +272,10 @@ - rend = result + RESULT_SIZE - 1; - while( cp < cend && rp < rend ) - { -- a = *cp++; -- if( a != 0 ) -- for( b = a; b > 0 && cp < cend && rp < rend; -- b-- ) -+ i = *cp++; -+ if( i != 0 ) -+ for( j = i; j > 0 && cp < cend && rp < rend; -+ j-- ) - { - if( *cp == '\n' || *cp == '"' || - *cp == '\\' ) -@@ -289,22 +294,39 @@ - * RBL listing, handling output of results if necessary. */ - int full_rblcheck( char * addr ) - { -- int a, b, c, d; -+ struct hostent *ent; -+ struct in_addr a; - int count = 0; -+ int rblchecking = 0; - char * response; - struct rbl * ptr; -+ int fail; -+ int c; - - for( ptr = rblsites; ptr != NULL; ptr = ptr->next ) - { -- if( sscanf( addr, "%d.%d.%d.%d", &a, &b, &c, &d ) != 4 -- || a < 0 || a > 255 || b < 0 || b > 255 || c < 0 || c > 255 -- || d < 0 || d > 255 ) -- { -+ fail = 0; -+ if ((ent = gethostbyname(addr)) != NULL) { -+ memcpy(&a, ent->h_addr_list[0], sizeof(a)); -+ if (ent->h_addr_list[1]) { -+ if (!quiet && rblchecking == 0) -+ fprintf(stderr, -+ "%s resolved to mutiple addresses: ", -+ addr); -+ } -+ if (!quiet && rblchecking++ == 0) -+ fprintf(stderr, "checking %s\n", inet_ntoa(a)); -+ } else { -+ if (!inet_aton(addr, &a)) -+ fail++; -+ } -+ -+ if (fail) { - fprintf( stderr, "%s: warning: invalid address `%s'\n", - progname, addr ); - return 0; - } -- response = rblcheck( a, b, c, d, ptr->site, txt ); -+ response = rblcheck( a, ptr->site, txt ); - if( !quiet || response ) - printf( "%s %s%s%s%s%s%s", addr, - ( !quiet && !response ? "not " : "" ), diff --git a/mail/rblcheck/files/patch-rblcheck.c b/mail/rblcheck/files/patch-rblcheck.c new file mode 100644 index 000000000000..3ab717674fb8 --- /dev/null +++ b/mail/rblcheck/files/patch-rblcheck.c @@ -0,0 +1,122 @@ +--- rblcheck.c.orig Thu Nov 8 14:05:27 2001 ++++ rblcheck.c Wed May 1 08:19:16 2002 +@@ -28,8 +28,10 @@ + #include <sys/types.h> + #include <netinet/in.h> + #include <arpa/nameser.h> ++#include <arpa/inet.h> + #include <resolv.h> + #include <netdb.h> ++#include <unistd.h> + + /*-- PORTABILITY ------------------------------------------------------------*/ + +@@ -184,7 +186,7 @@ + * domain. If "txt" is non-zero, we perform a TXT record lookup. We + * return the text returned from a TXT match, or an empty string, on + * a successful match, or NULL on an unsuccessful match. */ +-char * rblcheck( int a, int b, int c, int d, char * rbldomain, int txt ) ++char * rblcheck( struct in_addr a, char * rbldomain, int txt ) + { + char * domain; + char * result = NULL; +@@ -195,12 +197,15 @@ + const u_char * cend; + const u_char * rend; + int len; ++ u_char *p; ++ int i, j; + + /* 16 characters max in a dotted-quad address, plus 1 for null */ + domain = ( char * )malloc( 17 + strlen( rbldomain ) ); + ++ p = (u_char *)&a; + /* Create a domain name, in reverse. */ +- sprintf( domain, "%d.%d.%d.%d.%s", d, c, b, a, rbldomain ); ++ sprintf( domain, "%d.%d.%d.%d.%s", p[3], p[2], p[1], p[0], rbldomain ); + + /* Make our DNS query. */ + res_init(); +@@ -242,8 +247,8 @@ + cp = answer + sizeof( HEADER ); + while( *cp != '\0' ) + { +- a = *cp++; +- while( a-- ) ++ i = *cp++; ++ while( i-- ) + cp++; + } + +@@ -258,8 +263,8 @@ + cp += ( NS_INT16SZ * 2 ) + NS_INT32SZ; + + /* Get the length and end of the buffer. */ +- NS_GET16( c, cp ); +- cend = cp + c; ++ NS_GET16( i, cp ); ++ cend = cp + i; + + /* Iterate over any multiple answers we might have. In + this context, it's unlikely, but anyway. */ +@@ -267,10 +272,10 @@ + rend = result + RESULT_SIZE - 1; + while( cp < cend && rp < rend ) + { +- a = *cp++; +- if( a != 0 ) +- for( b = a; b > 0 && cp < cend && rp < rend; +- b-- ) ++ i = *cp++; ++ if( i != 0 ) ++ for( j = i; j > 0 && cp < cend && rp < rend; ++ j-- ) + { + if( *cp == '\n' || *cp == '"' || + *cp == '\\' ) +@@ -289,22 +294,39 @@ + * RBL listing, handling output of results if necessary. */ + int full_rblcheck( char * addr ) + { +- int a, b, c, d; ++ struct hostent *ent; ++ struct in_addr a; + int count = 0; ++ int rblchecking = 0; + char * response; + struct rbl * ptr; ++ int fail; ++ int c; + + for( ptr = rblsites; ptr != NULL; ptr = ptr->next ) + { +- if( sscanf( addr, "%d.%d.%d.%d", &a, &b, &c, &d ) != 4 +- || a < 0 || a > 255 || b < 0 || b > 255 || c < 0 || c > 255 +- || d < 0 || d > 255 ) +- { ++ fail = 0; ++ if ((ent = gethostbyname(addr)) != NULL) { ++ memcpy(&a, ent->h_addr_list[0], sizeof(a)); ++ if (ent->h_addr_list[1]) { ++ if (!quiet && rblchecking == 0) ++ fprintf(stderr, ++ "%s resolved to mutiple addresses: ", ++ addr); ++ } ++ if (!quiet && rblchecking++ == 0) ++ fprintf(stderr, "checking %s\n", inet_ntoa(a)); ++ } else { ++ if (!inet_aton(addr, &a)) ++ fail++; ++ } ++ ++ if (fail) { + fprintf( stderr, "%s: warning: invalid address `%s'\n", + progname, addr ); + return 0; + } +- response = rblcheck( a, b, c, d, ptr->site, txt ); ++ response = rblcheck( a, ptr->site, txt ); + if( !quiet || response ) + printf( "%s %s%s%s%s%s%s", addr, + ( !quiet && !response ? "not " : "" ), diff --git a/mail/rftp/files/patch-01 b/mail/rftp/files/patch-01 deleted file mode 100644 index 30d18068fb8d..000000000000 --- a/mail/rftp/files/patch-01 +++ /dev/null @@ -1,23 +0,0 @@ ---- Makefile.orig Tue May 5 03:19:39 1998 -+++ Makefile Tue May 5 11:00:09 1998 -@@ -5,16 +5,16 @@ - ## - - ## Edit appropriately. --CC = gcc --CFLAGS = -O -+#CC = gcc -+#CFLAGS = -O - - ## Where executables should be put. - #DESTDIR = /home/archives/bin --DESTDIR = /usr/local/bin -+DESTDIR = $(PREFIX)/bin - - ## The manpage for "foo" goes in $(MANDIR)/foo.$1 - #MANDIR = /home/archives/man/cat1 --MANDIR = /usr/local/man/cat1 -+MANDIR = $(PREFIX)/man/man1 - - ## - ## END OF CONFIGURATION SECTION diff --git a/mail/rftp/files/patch-Makefile b/mail/rftp/files/patch-Makefile new file mode 100644 index 000000000000..30d18068fb8d --- /dev/null +++ b/mail/rftp/files/patch-Makefile @@ -0,0 +1,23 @@ +--- Makefile.orig Tue May 5 03:19:39 1998 ++++ Makefile Tue May 5 11:00:09 1998 +@@ -5,16 +5,16 @@ + ## + + ## Edit appropriately. +-CC = gcc +-CFLAGS = -O ++#CC = gcc ++#CFLAGS = -O + + ## Where executables should be put. + #DESTDIR = /home/archives/bin +-DESTDIR = /usr/local/bin ++DESTDIR = $(PREFIX)/bin + + ## The manpage for "foo" goes in $(MANDIR)/foo.$1 + #MANDIR = /home/archives/man/cat1 +-MANDIR = /usr/local/man/cat1 ++MANDIR = $(PREFIX)/man/man1 + + ## + ## END OF CONFIGURATION SECTION diff --git a/mail/sa-stats/files/patch-sa-stats-1.0.txt b/mail/sa-stats/files/patch-sa-stats-1.0.txt new file mode 100644 index 000000000000..f6ad8bbfbaa7 --- /dev/null +++ b/mail/sa-stats/files/patch-sa-stats-1.0.txt @@ -0,0 +1,20 @@ +--- sa-stats-1.0.txt 2014-05-09 07:43:35.000000000 +0200 ++++ sa-stats-1.0.txt 2014-05-24 08:00:28.000000000 +0200 +@@ -269,7 +269,7 @@ sub summarize { + #my $perc1=sprintf("%.2f",($SPAM_RULES{$key}/$NUM_EMAIL)*100); + my $perc1=sprintf("%.2f",(($SPAM_RULES{$key}+$HAM_RULES{$key})/$NUM_EMAIL)*100); + my $perc2=sprintf("%.2f",($SPAM_RULES{$key}/$NUM_SPAM)*100); +- my $perc3=sprintf("%.2f",($HAM_RULES{$key}/$NUM_HAM)*100); ++ my $perc3=sprintf("%.2f",($NUM_HAM > 0 ? $HAM_RULES{$key}/$NUM_HAM : 0)*100); + printf("%4d\t%-24s\t%5s\t%6.2f\t%6.2f\t%6.2f\n",$count+1,$key,$SPAM_RULES{$key},$perc1,$perc2,$perc3); + $count++; + if ($count >= $TOPRULES && $TOPRULES > 0) { +@@ -289,7 +289,7 @@ sub summarize { + foreach my $key (sort { $HAM_RULES{$b} <=> $HAM_RULES{$a} } keys %HAM_RULES) { + #my $perc1=sprintf("%.2f",($HAM_RULES{$key}/$NUM_EMAIL)*100); + my $perc1=sprintf("%.2f",(($SPAM_RULES{$key}+$HAM_RULES{$key})/$NUM_EMAIL)*100); +- my $perc2=sprintf("%.2f",($SPAM_RULES{$key}/$NUM_SPAM)*100); ++ my $perc2=sprintf("%.2f",($NUM_SPAM > 0 ? $SPAM_RULES{$key}/$NUM_SPAM : 0)*100); + my $perc3=sprintf("%.2f",($HAM_RULES{$key}/$NUM_HAM)*100); + printf("%4d\t%-24s\t%5s\t%6.2f\t%6.2f\t%6.2f\n",$count+1,$key,$HAM_RULES{$key},$perc1,$perc2,$perc3); + $count++; diff --git a/mail/sa-stats/files/patch-za b/mail/sa-stats/files/patch-za deleted file mode 100644 index f6ad8bbfbaa7..000000000000 --- a/mail/sa-stats/files/patch-za +++ /dev/null @@ -1,20 +0,0 @@ ---- sa-stats-1.0.txt 2014-05-09 07:43:35.000000000 +0200 -+++ sa-stats-1.0.txt 2014-05-24 08:00:28.000000000 +0200 -@@ -269,7 +269,7 @@ sub summarize { - #my $perc1=sprintf("%.2f",($SPAM_RULES{$key}/$NUM_EMAIL)*100); - my $perc1=sprintf("%.2f",(($SPAM_RULES{$key}+$HAM_RULES{$key})/$NUM_EMAIL)*100); - my $perc2=sprintf("%.2f",($SPAM_RULES{$key}/$NUM_SPAM)*100); -- my $perc3=sprintf("%.2f",($HAM_RULES{$key}/$NUM_HAM)*100); -+ my $perc3=sprintf("%.2f",($NUM_HAM > 0 ? $HAM_RULES{$key}/$NUM_HAM : 0)*100); - printf("%4d\t%-24s\t%5s\t%6.2f\t%6.2f\t%6.2f\n",$count+1,$key,$SPAM_RULES{$key},$perc1,$perc2,$perc3); - $count++; - if ($count >= $TOPRULES && $TOPRULES > 0) { -@@ -289,7 +289,7 @@ sub summarize { - foreach my $key (sort { $HAM_RULES{$b} <=> $HAM_RULES{$a} } keys %HAM_RULES) { - #my $perc1=sprintf("%.2f",($HAM_RULES{$key}/$NUM_EMAIL)*100); - my $perc1=sprintf("%.2f",(($SPAM_RULES{$key}+$HAM_RULES{$key})/$NUM_EMAIL)*100); -- my $perc2=sprintf("%.2f",($SPAM_RULES{$key}/$NUM_SPAM)*100); -+ my $perc2=sprintf("%.2f",($NUM_SPAM > 0 ? $SPAM_RULES{$key}/$NUM_SPAM : 0)*100); - my $perc3=sprintf("%.2f",($HAM_RULES{$key}/$NUM_HAM)*100); - printf("%4d\t%-24s\t%5s\t%6.2f\t%6.2f\t%6.2f\n",$count+1,$key,$HAM_RULES{$key},$perc1,$perc2,$perc3); - $count++; diff --git a/mail/sentinel/files/patch-aa b/mail/sentinel/files/patch-aa deleted file mode 100644 index dc3328b409b3..000000000000 --- a/mail/sentinel/files/patch-aa +++ /dev/null @@ -1,13 +0,0 @@ ---- sentinel.c.bak Mon Oct 27 02:03:32 2003 -+++ sentinel.c Sat Dec 20 07:59:32 2003 -@@ -3135,8 +3135,10 @@ - /* check if a rule defined for this header in [headers] section */ - for (smfhl = smfHeader_list[message->cfgNdx]; smfhl; smfhl = smfhl->next) { - if (!strcasecmp(smfhl->name, headerf)) { -+#ifndef DO_NOT_DECODE_SUBJECT - if (!strcasecmp(headerf, "Subject")) - headerv = smfMimeDecodeString(headerv, message->buf); -+#endif - if (headerv) { - for (smfel = smfhl->entr; smfel; smfel = smfel->next) { - if (!smfPatternMatch(message, headerv, smfel->event)) { diff --git a/mail/sentinel/files/patch-sentinel.c b/mail/sentinel/files/patch-sentinel.c new file mode 100644 index 000000000000..dc3328b409b3 --- /dev/null +++ b/mail/sentinel/files/patch-sentinel.c @@ -0,0 +1,13 @@ +--- sentinel.c.bak Mon Oct 27 02:03:32 2003 ++++ sentinel.c Sat Dec 20 07:59:32 2003 +@@ -3135,8 +3135,10 @@ + /* check if a rule defined for this header in [headers] section */ + for (smfhl = smfHeader_list[message->cfgNdx]; smfhl; smfhl = smfhl->next) { + if (!strcasecmp(smfhl->name, headerf)) { ++#ifndef DO_NOT_DECODE_SUBJECT + if (!strcasecmp(headerf, "Subject")) + headerv = smfMimeDecodeString(headerv, message->buf); ++#endif + if (headerv) { + for (smfel = smfhl->entr; smfel; smfel = smfel->next) { + if (!smfPatternMatch(message, headerv, smfel->event)) { diff --git a/mail/serialmail/files/patch-Makefile b/mail/serialmail/files/patch-Makefile new file mode 100644 index 000000000000..9f0f32f9337b --- /dev/null +++ b/mail/serialmail/files/patch-Makefile @@ -0,0 +1,11 @@ +--- Makefile.orig Sun Nov 15 02:28:23 1998 ++++ Makefile Tue Dec 29 15:31:42 1998 +@@ -260,7 +260,7 @@ + ./compile instcheck.c + + it: \ +-man prog install instcheck ++prog install instcheck + + leapsecs.0: \ + leapsecs.3 diff --git a/mail/serialmail/files/patch-aa b/mail/serialmail/files/patch-aa deleted file mode 100644 index 9f0f32f9337b..000000000000 --- a/mail/serialmail/files/patch-aa +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.orig Sun Nov 15 02:28:23 1998 -+++ Makefile Tue Dec 29 15:31:42 1998 -@@ -260,7 +260,7 @@ - ./compile instcheck.c - - it: \ --man prog install instcheck -+prog install instcheck - - leapsecs.0: \ - leapsecs.3 diff --git a/mail/wmpop3/files/patch-Makefile b/mail/wmpop3/files/patch-Makefile new file mode 100644 index 000000000000..9fa92fb40294 --- /dev/null +++ b/mail/wmpop3/files/patch-Makefile @@ -0,0 +1,24 @@ +--- Makefile.orig Tue Jun 8 14:56:00 1999 ++++ Makefile Sat Jun 19 16:30:16 1999 +@@ -1,6 +1,6 @@ +-LIBDIR = -L/usr/X11R6/lib ++LIBDIR = -L$(PREFIX)/lib + LIBS = -lXpm -lXext -lX11 +-FLAGS = -O2 ++CFLAGS += -Wall + OBJS = wmpop3.o \ + Pop3Client.o \ + ../wmgeneral/wmgeneral.o \ +@@ -9,10 +9,10 @@ + + + .c.o: +- cc -I/usr/X11R6/share/include $(FLAGS) -c -Wall $< -o $*.o ++ $(CC) -I$(PREFIX)/include $(CFLAGS) -c $< -o $@ + + wmpop3: $(OBJS) +- cc $(FLAGS) -o wmpop3 $^ -lXext $(LIBDIR) $(LIBS) ++ $(CC) $(CFLAGS) -o wmpop3 $(OBJS) -lXext $(LIBDIR) $(LIBS) + + all:: wmpop3 + diff --git a/mail/wmpop3/files/patch-Pop3Client.c b/mail/wmpop3/files/patch-Pop3Client.c new file mode 100644 index 000000000000..177071a9d7c9 --- /dev/null +++ b/mail/wmpop3/files/patch-Pop3Client.c @@ -0,0 +1,15 @@ +--- Pop3Client.c.orig Sat Mar 2 13:18:27 2002 ++++ Pop3Client.c Sat Mar 2 13:23:11 2002 +@@ -153,7 +153,12 @@ + + if( temp[0] != '+' ){ + perror("Error Reciving Stats"); ++ perror("This pop3 server dose not support LAST command."); ++ perror("I use 0 instread of the unkown result."); ++ pc->numOfUnreadMessages = pc->numOfMessages; ++/* + return -1; ++*/ + } + return 1; + diff --git a/mail/wmpop3/files/patch-aa b/mail/wmpop3/files/patch-aa deleted file mode 100644 index 9fa92fb40294..000000000000 --- a/mail/wmpop3/files/patch-aa +++ /dev/null @@ -1,24 +0,0 @@ ---- Makefile.orig Tue Jun 8 14:56:00 1999 -+++ Makefile Sat Jun 19 16:30:16 1999 -@@ -1,6 +1,6 @@ --LIBDIR = -L/usr/X11R6/lib -+LIBDIR = -L$(PREFIX)/lib - LIBS = -lXpm -lXext -lX11 --FLAGS = -O2 -+CFLAGS += -Wall - OBJS = wmpop3.o \ - Pop3Client.o \ - ../wmgeneral/wmgeneral.o \ -@@ -9,10 +9,10 @@ - - - .c.o: -- cc -I/usr/X11R6/share/include $(FLAGS) -c -Wall $< -o $*.o -+ $(CC) -I$(PREFIX)/include $(CFLAGS) -c $< -o $@ - - wmpop3: $(OBJS) -- cc $(FLAGS) -o wmpop3 $^ -lXext $(LIBDIR) $(LIBS) -+ $(CC) $(CFLAGS) -o wmpop3 $(OBJS) -lXext $(LIBDIR) $(LIBS) - - all:: wmpop3 - diff --git a/mail/wmpop3/files/patch-ab b/mail/wmpop3/files/patch-ab deleted file mode 100644 index 177071a9d7c9..000000000000 --- a/mail/wmpop3/files/patch-ab +++ /dev/null @@ -1,15 +0,0 @@ ---- Pop3Client.c.orig Sat Mar 2 13:18:27 2002 -+++ Pop3Client.c Sat Mar 2 13:23:11 2002 -@@ -153,7 +153,12 @@ - - if( temp[0] != '+' ){ - perror("Error Reciving Stats"); -+ perror("This pop3 server dose not support LAST command."); -+ perror("I use 0 instread of the unkown result."); -+ pc->numOfUnreadMessages = pc->numOfMessages; -+/* - return -1; -+*/ - } - return 1; - diff --git a/mail/xlbiff/Makefile b/mail/xlbiff/Makefile index 5f01316ea4d4..f71ca45d4829 100644 --- a/mail/xlbiff/Makefile +++ b/mail/xlbiff/Makefile @@ -6,12 +6,11 @@ PORTVERSION= 3.0 PORTREVISION= 2 CATEGORIES= mail MASTER_SITES= ftp://ftp.x.org/R5contrib/ -EXTRACT_SUFX= .tar.Z MAINTAINER= obrien@FreeBSD.org COMMENT= The X Literate Biff - displays the from and subject from incoming mails -USES= imake +USES= imake tar:Z USE_XORG= ice sm x11 xaw xext xmu xpm xt .include <bsd.port.mk> diff --git a/mail/xlbiff/files/patch-01 b/mail/xlbiff/files/patch-01 deleted file mode 100644 index 6cb0f76a6a09..000000000000 --- a/mail/xlbiff/files/patch-01 +++ /dev/null @@ -1,11 +0,0 @@ ---- Imakefile.orig Mon Oct 26 09:06:42 1992 -+++ Imakefile Fri Aug 23 14:45:17 1996 -@@ -8,6 +8,8 @@ - /* MAILPATH = /usr/mail/%s */ - #ifdef SYSV - MAILPATH = /usr/mail/%s -+#elif defined(i386BsdArchitecture) || defined(SYSVR4) -+MAILPATH = /var/mail/%s - #else - MAILPATH = /usr/spool/mail/%s - #endif diff --git a/mail/xlbiff/files/patch-02 b/mail/xlbiff/files/patch-02 deleted file mode 100644 index b7d34346b7b6..000000000000 --- a/mail/xlbiff/files/patch-02 +++ /dev/null @@ -1,20 +0,0 @@ ---- xlbiff.man.orig Mon Oct 26 09:06:44 1992 -+++ xlbiff.man Sun Nov 3 23:55:27 1996 -@@ -38,7 +38,7 @@ - .TP 8 - .B \-file \fIfilename\fP - This option specifies the name of the file which should be monitored. By --default, it watches /usr/spool/mail/\fIusername\fP, where \fIusername\fP -+default, it watches /var/mail/\fIusername\fP, where \fIusername\fP - is your login name. - .TP 8 - .B \-rows \fIheight\fP -@@ -230,7 +230,7 @@ - is used to get the default host and display number. - .SH FILES - .TP 8 --/usr/spool/mail/\fIusername\fP -+/var/mail/\fIusername\fP - default mail file to check. - .SH "SEE ALSO" - .IR X (1), diff --git a/mail/xlbiff/files/patch-Imakefile b/mail/xlbiff/files/patch-Imakefile new file mode 100644 index 000000000000..6cb0f76a6a09 --- /dev/null +++ b/mail/xlbiff/files/patch-Imakefile @@ -0,0 +1,11 @@ +--- Imakefile.orig Mon Oct 26 09:06:42 1992 ++++ Imakefile Fri Aug 23 14:45:17 1996 +@@ -8,6 +8,8 @@ + /* MAILPATH = /usr/mail/%s */ + #ifdef SYSV + MAILPATH = /usr/mail/%s ++#elif defined(i386BsdArchitecture) || defined(SYSVR4) ++MAILPATH = /var/mail/%s + #else + MAILPATH = /usr/spool/mail/%s + #endif diff --git a/mail/xlbiff/files/patch-xlbiff.man b/mail/xlbiff/files/patch-xlbiff.man new file mode 100644 index 000000000000..b7d34346b7b6 --- /dev/null +++ b/mail/xlbiff/files/patch-xlbiff.man @@ -0,0 +1,20 @@ +--- xlbiff.man.orig Mon Oct 26 09:06:44 1992 ++++ xlbiff.man Sun Nov 3 23:55:27 1996 +@@ -38,7 +38,7 @@ + .TP 8 + .B \-file \fIfilename\fP + This option specifies the name of the file which should be monitored. By +-default, it watches /usr/spool/mail/\fIusername\fP, where \fIusername\fP ++default, it watches /var/mail/\fIusername\fP, where \fIusername\fP + is your login name. + .TP 8 + .B \-rows \fIheight\fP +@@ -230,7 +230,7 @@ + is used to get the default host and display number. + .SH FILES + .TP 8 +-/usr/spool/mail/\fIusername\fP ++/var/mail/\fIusername\fP + default mail file to check. + .SH "SEE ALSO" + .IR X (1), diff --git a/mail/xmail/files/patch-Imakefile b/mail/xmail/files/patch-Imakefile new file mode 100644 index 000000000000..fd65a954a33a --- /dev/null +++ b/mail/xmail/files/patch-Imakefile @@ -0,0 +1,109 @@ +--- Imakefile.orig Mon Jan 30 22:41:47 1995 ++++ Imakefile Wed Oct 15 09:52:37 2003 +@@ -1,63 +1,62 @@ +-/* */# +-/* */# @(#)Imakefile - for xmail version 1 patchlevel 5 +-/* */# +-/* */# Uncomment USE_DIRENT if readdir() uses <dirent.h> instead of <sys/dir.h> +-/* */# ++# ++# @(#)Imakefile - for xmail version 1 patchlevel 5 ++# ++# Uncomment USE_DIRENT if readdir() uses <dirent.h> instead of <sys/dir.h> ++# + USE_DIRENT = -DUSE_DIRENT +-/* */# +-/* */# Uncomment X_FACE and COMPFACE if you have the compface library installed +-/* */# and you want xmail to automatically display the X-Face: header, if found +-/* */# in a message. +-/* */# ++# ++# Uncomment X_FACE and COMPFACE if you have the compface library installed ++# and you want xmail to automatically display the X-Face: header, if found ++# in a message. ++# + #ifdef USE_X_FACE + X_FACE = -DX_FACE + COMPFACE = -L./compface -lcompface + #endif +-/* */# +-/* */# Uncomment XPM if you have the Xpm version 3 library and want color icons +-/* */# ++# ++# Uncomment XPM if you have the Xpm version 3 library and want color icons ++# + XPM = -DXPM + LIBXPM = -lXpm +-/* */# +-/* */# Uncomment LPT if you require att environment support for pseudo ports. +-/* */# +-/* */# LPT = -lpt +-/* */# +-/* */# Uncomment REGEXP if your system supplies the regexp.h include file. +-/* */# Otherwise, xmail will use the regex procedures re_comp and re_exec. +-/* */# +-/* */# REGEXP = -DUSE_REGEXP +-/* */# +-/* */# Define MAILBOX_DIRECTORY if your mail spool is located in other than the +-/* */# default /usr/spool/mail. (If not specified, the default will be used.) +-/* */# +-/* */# MAILBOX_DIR = -DMAILBOX_DIRECTORY=\"/usr/spool/mail\" +-/* */# +-/* */# Define DEFAULT_VISUAL if your copy of vi lies in some place other than +-/* */# /usr/ucb. (If not specified, /usr/ucb/vi will be the default editor.) +-/* */# ++# ++# Uncomment LPT if you require att environment support for pseudo ports. ++# ++# LPT = -lpt ++# ++# Uncomment REGEXP if your system supplies the regexp.h include file. ++# Otherwise, xmail will use the regex procedures re_comp and re_exec. ++# ++# REGEXP = -DUSE_REGEXP ++# ++# Define MAILBOX_DIRECTORY if your mail spool is located in other than the ++# default /usr/spool/mail. (If not specified, the default will be used.) ++# ++ MAILBOX_DIR = -DMAILBOX_DIRECTORY=\"/var/mail\" ++# ++# Define DEFAULT_VISUAL if your copy of vi lies in some place other than ++# /usr/ucb. (If not specified, /usr/ucb/vi will be the default editor.) ++# + DEF_VISUAL = -DDEFAULT_VISUAL=\"/usr/bin/vi\" +-/* */# +-/* */# Define DEFAULT_MAILER if your mail program is not the standard +-/* */# /usr/ucb/Mail. CAUTION - Operation is NOT guaranteed with other mailers. ++# ++# Define DEFAULT_MAILER if your mail program is not the standard ++# /usr/ucb/Mail. CAUTION - Operation is NOT guaranteed with other mailers. + +-/* */# DEF_MAILER = -DDEFAULT_MAILER=\"/usr/ucb/Mail\" ++ DEF_MAILER = -DDEFAULT_MAILER=\"/usr/bin/Mail\" + +-/* */# +-/* */# Define SIGACTION if your system utilizes the sigaction() call rather +-/* */# than the sigvec() call (true on most SYSV and POSIX compilant systems) +-/* */# You may also need to add the following BSD define (true on SGI systems) +-/* */# +-/* */# SIGDEF = -D_BSD_SIGNALS +-/* */# ++# ++# Define SIGACTION if your system utilizes the sigaction() call rather ++# than the sigvec() call (true on most SYSV and POSIX compilant systems) ++# You may also need to add the following BSD define (true on SGI systems) ++# ++# SIGDEF = -D_BSD_SIGNALS ++# + SIGACT = -DSIGACTION +-/* */# + + XMAIL_DEFINES = $(MAILBOX_DIR) $(DEF_VISUAL) $(DEF_MAILER) $(SIGACT) $(SIGDEF) + DEFINES = $(USE_DIRENT) $(X_FACE) $(XPM) $(REGEXP) $(XMAIL_DEFINES) + + DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) +-LOCAL_LIBRARIES = $(LIBXPM) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT) ++LOCAL_LIBRARIES = $(LIBXPM) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT) -lcompat + + SRCS = Mailwatch.c HelpText.c actions.c callMail.c callbacks.c \ + confirm.c directory.c environs.c handler.c mail.c parser.c \ diff --git a/mail/xmail/files/patch-XMail.ad b/mail/xmail/files/patch-XMail.ad new file mode 100644 index 000000000000..514481fe10f9 --- /dev/null +++ b/mail/xmail/files/patch-XMail.ad @@ -0,0 +1,188 @@ +--- XMail.ad.orig Mon Jan 30 16:55:51 1995 ++++ XMail.ad Mon Sep 8 23:28:56 1997 +@@ -20,98 +20,98 @@ + ! d2b48c - tan daa520 - goldenrod 7fff00 - chartreuse + ! f0e68c - khaki ffe4e1 - mistyrose fffacd - lemonchiffon + ! +-! *expert: True +-! .geometry: +65+3 +-! *iconGeometry: +835+0 +-! *shapeStyle: oval ++*expert: True ++.geometry: +65+3 ++*iconGeometry: +835+0 ++*shapeStyle: oval + ! +-! *Abort.background: white +-! *Abort.foreground: red ++*Abort.background: white ++*Abort.foreground: red + *Abort.translations: #override <Btn2Down>: ShowHelp() +-! *Autograph.background: cyan ++*Autograph.background: cyan + *Autograph.translations: #override <Btn2Down>: ShowHelp() +-! *autograph.background: paleturquoise ++*autograph.background: paleturquoise + *autograph.translations: #override <Btn2Down>: ShowHelp() +-! *aliasList*Background: tan +-! *aliasList.table.entry.background: cyan +-! *alwaysignore*foreground: seagreen +-! *noalwaysignore*foreground: red +-! *autoprint*foreground: seagreen +-! *noautoprint*foreground: red +-! *background: yellow +-! *borderColor: brown +-! *Bcc.background: cyan +-! *Bcc*AsciiSink*Background: cyan ++*aliasList*Background: tan ++*aliasList.table.entry.background: cyan ++*alwaysignore*foreground: seagreen ++*noalwaysignore*foreground: red ++*autoprint*foreground: seagreen ++*noautoprint*foreground: red ++*background: yellow ++*borderColor: brown ++*Bcc.background: cyan ++*Bcc*AsciiSink*Background: cyan + *Bcc*scrollHorizontal: whenNeeded + *Bcc*Thickness: 5 + *Bcc*MinimumThumb: 3 +-! *Cancel.background: mistyrose +-! *Cancel.foreground: black ++*Cancel.background: mistyrose ++*Cancel.foreground: black + *Cancel.translations: #override <Btn2Down>: ShowHelp() +-! *Cc.background: cyan +-! *Cc*AsciiSink*Background: cyan ++*Cc.background: cyan ++*Cc*AsciiSink*Background: cyan + *Cc*scrollHorizontal: whenNeeded + *Cc*Thickness: 5 + *Cc*MinimumThumb: 3 +-! *Copy.foreground: blue +-! *commandPanel.background: goldenrod +-! *copy.background: cyan +-! *Deliver.background: green +-! *Deliver.foreground: brown +-! *Deliver.borderColor: brown ++*Copy.foreground: blue ++*commandPanel.background: goldenrod ++*copy.background: cyan ++*Deliver.background: green ++*Deliver.foreground: brown ++*Deliver.borderColor: brown + *Deliver.translations: #override <Btn2Down>: ShowHelp() +-! *delete.foreground: red +-! *delete.background: white +-! *Drop.foreground: red +-! *editheaders*foreground: seagreen +-! *noeditheaders*foreground: red +-! *editorCommand: xterm -name XMail -title "Message Edit" -display %s -e vi %s +-! *exit.foreground: blue +-! *expert*foreground: seagreen +-! *noexpert*foreground: red +-! *Folder.background: cyan +-! *Font: *-courier-bold-r-normal--14-* +-! *fileWindow*background: chartreuse ++*delete.foreground: red ++*delete.background: white ++*Drop.foreground: red ++*editheaders*foreground: seagreen ++*noeditheaders*foreground: red ++*editorCommand: xterm -name XMail -title "Message Edit" -display %s -e vi %s ++*exit.foreground: blue ++*expert*foreground: seagreen ++*noexpert*foreground: red ++*Folder.background: cyan ++!*Font: *-courier-bold-r-normal--14-* ++*fileWindow*background: chartreuse + *fileWindow*scrollHorizontal: whenNeeded + *fileWindow*Thickness: 5 + *fileWindow*MinimumThumb: 3 +-! *foreground: brown +-! *forward.foreground: green3 +-! *full.foreground: red ++*foreground: brown ++*forward.foreground: green3 ++*full.foreground: red + *grip*foreground: brown +-! *hold*foreground: seagreen +-! *nohold*foreground: red +-! *icon*background: lightgoldenrod +-! *icon*foreground: brown +-! *inc.background: cyan +-! *indexWindow*background: lemonchiffon ++*hold*foreground: seagreen ++*nohold*foreground: red ++*icon*background: lightgoldenrod ++*icon*foreground: brown ++*inc.background: cyan ++*indexWindow*background: lemonchiffon + *indexWindow*scrollHorizontal: whenNeeded + *indexWindow*Thickness: 10 + *indexWindow*MinimumThumb: 5 +-! *list.background: tan +-! *menu.background: tan +-! *menubutton.foreground: brown +-! *menubutton.background: cyan +-! *Newmail.foreground: blue +-! *previous.foreground: blue +-! *quit.foreground: red +-! *quit.background: white +-! *read.foreground: green3 +-! *ReEdit.background: khaki +-! *ReEdit.foreground: brown ++*list.background: tan ++*menu.background: tan ++*menubutton.foreground: brown ++*menubutton.background: cyan ++*Newmail.foreground: blue ++*previous.foreground: blue ++*quit.foreground: red ++*quit.background: white ++*read.foreground: green3 ++*ReEdit.background: khaki ++*ReEdit.foreground: brown + *ReEdit.translations: #override <Btn2Down>: ShowHelp() +-! *replyall.background: green +-! *save.background: cyan +-! *Save.foreground: blue +-! *set_menu.background: tan ++*replyall.background: green ++*save.background: cyan ++*Save.foreground: blue ++*set_menu.background: tan + *statusWindow.background: brown + *statusWindow.foreground: yellow +-! *Subject.background: cyan +-! *Subject*AsciiSink*Background: cyan ++*Subject.background: cyan ++*Subject*AsciiSink*Background: cyan + *Subject*scrollHorizontal: whenNeeded + *Subject*Thickness: 5 + *Subject*MinimumThumb: 3 +-! *textWindow*background: lemonchiffon ++*textWindow*background: lemonchiffon + *textWindow.text*Wrap: word + *textWindow.face.background: white + *textWindow.face.foreground: black +@@ -121,14 +121,14 @@ + *titleBar*Foreground: yellow + *titleBar.logo.background: white + *titleBar.logo.foreground: blue +-! *To.Background: cyan +-! *To*AsciiSink*Background: cyan ++*To.Background: cyan ++*To*AsciiSink*Background: cyan + *To*scrollHorizontal: whenNeeded + *To*Thickness: 5 + *To*MinimumThumb: 3 +-! *undelete.foreground: green3 +-! *write.foreground: green3 +-! *Write.foreground: red ++*undelete.foreground: green3 ++*write.foreground: green3 ++*Write.foreground: red + ! + *Bcc.translations: #override \n\ + <Key>Delete: delete-previous-character() \n\ diff --git a/mail/xmail/files/patch-aa b/mail/xmail/files/patch-aa deleted file mode 100644 index fd65a954a33a..000000000000 --- a/mail/xmail/files/patch-aa +++ /dev/null @@ -1,109 +0,0 @@ ---- Imakefile.orig Mon Jan 30 22:41:47 1995 -+++ Imakefile Wed Oct 15 09:52:37 2003 -@@ -1,63 +1,62 @@ --/* */# --/* */# @(#)Imakefile - for xmail version 1 patchlevel 5 --/* */# --/* */# Uncomment USE_DIRENT if readdir() uses <dirent.h> instead of <sys/dir.h> --/* */# -+# -+# @(#)Imakefile - for xmail version 1 patchlevel 5 -+# -+# Uncomment USE_DIRENT if readdir() uses <dirent.h> instead of <sys/dir.h> -+# - USE_DIRENT = -DUSE_DIRENT --/* */# --/* */# Uncomment X_FACE and COMPFACE if you have the compface library installed --/* */# and you want xmail to automatically display the X-Face: header, if found --/* */# in a message. --/* */# -+# -+# Uncomment X_FACE and COMPFACE if you have the compface library installed -+# and you want xmail to automatically display the X-Face: header, if found -+# in a message. -+# - #ifdef USE_X_FACE - X_FACE = -DX_FACE - COMPFACE = -L./compface -lcompface - #endif --/* */# --/* */# Uncomment XPM if you have the Xpm version 3 library and want color icons --/* */# -+# -+# Uncomment XPM if you have the Xpm version 3 library and want color icons -+# - XPM = -DXPM - LIBXPM = -lXpm --/* */# --/* */# Uncomment LPT if you require att environment support for pseudo ports. --/* */# --/* */# LPT = -lpt --/* */# --/* */# Uncomment REGEXP if your system supplies the regexp.h include file. --/* */# Otherwise, xmail will use the regex procedures re_comp and re_exec. --/* */# --/* */# REGEXP = -DUSE_REGEXP --/* */# --/* */# Define MAILBOX_DIRECTORY if your mail spool is located in other than the --/* */# default /usr/spool/mail. (If not specified, the default will be used.) --/* */# --/* */# MAILBOX_DIR = -DMAILBOX_DIRECTORY=\"/usr/spool/mail\" --/* */# --/* */# Define DEFAULT_VISUAL if your copy of vi lies in some place other than --/* */# /usr/ucb. (If not specified, /usr/ucb/vi will be the default editor.) --/* */# -+# -+# Uncomment LPT if you require att environment support for pseudo ports. -+# -+# LPT = -lpt -+# -+# Uncomment REGEXP if your system supplies the regexp.h include file. -+# Otherwise, xmail will use the regex procedures re_comp and re_exec. -+# -+# REGEXP = -DUSE_REGEXP -+# -+# Define MAILBOX_DIRECTORY if your mail spool is located in other than the -+# default /usr/spool/mail. (If not specified, the default will be used.) -+# -+ MAILBOX_DIR = -DMAILBOX_DIRECTORY=\"/var/mail\" -+# -+# Define DEFAULT_VISUAL if your copy of vi lies in some place other than -+# /usr/ucb. (If not specified, /usr/ucb/vi will be the default editor.) -+# - DEF_VISUAL = -DDEFAULT_VISUAL=\"/usr/bin/vi\" --/* */# --/* */# Define DEFAULT_MAILER if your mail program is not the standard --/* */# /usr/ucb/Mail. CAUTION - Operation is NOT guaranteed with other mailers. -+# -+# Define DEFAULT_MAILER if your mail program is not the standard -+# /usr/ucb/Mail. CAUTION - Operation is NOT guaranteed with other mailers. - --/* */# DEF_MAILER = -DDEFAULT_MAILER=\"/usr/ucb/Mail\" -+ DEF_MAILER = -DDEFAULT_MAILER=\"/usr/bin/Mail\" - --/* */# --/* */# Define SIGACTION if your system utilizes the sigaction() call rather --/* */# than the sigvec() call (true on most SYSV and POSIX compilant systems) --/* */# You may also need to add the following BSD define (true on SGI systems) --/* */# --/* */# SIGDEF = -D_BSD_SIGNALS --/* */# -+# -+# Define SIGACTION if your system utilizes the sigaction() call rather -+# than the sigvec() call (true on most SYSV and POSIX compilant systems) -+# You may also need to add the following BSD define (true on SGI systems) -+# -+# SIGDEF = -D_BSD_SIGNALS -+# - SIGACT = -DSIGACTION --/* */# - - XMAIL_DEFINES = $(MAILBOX_DIR) $(DEF_VISUAL) $(DEF_MAILER) $(SIGACT) $(SIGDEF) - DEFINES = $(USE_DIRENT) $(X_FACE) $(XPM) $(REGEXP) $(XMAIL_DEFINES) - - DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) --LOCAL_LIBRARIES = $(LIBXPM) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT) -+LOCAL_LIBRARIES = $(LIBXPM) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT) -lcompat - - SRCS = Mailwatch.c HelpText.c actions.c callMail.c callbacks.c \ - confirm.c directory.c environs.c handler.c mail.c parser.c \ diff --git a/mail/xmail/files/patch-ab b/mail/xmail/files/patch-ab deleted file mode 100644 index 2ccc84a8b246..000000000000 --- a/mail/xmail/files/patch-ab +++ /dev/null @@ -1,24 +0,0 @@ ---- callbacks.c.orig Sat Jan 28 08:09:15 1995 -+++ callbacks.c Sat Oct 26 00:13:40 2002 -@@ -43,10 +43,12 @@ - extern int noshare sys_nerr; - extern char noshare *sys_errlist[]; - #else -+#if !defined(__FreeBSD__) - extern int errno; - extern int sys_nerr; - extern char *sys_errlist[]; - #endif -+#endif - - extern char otherBuf[BUFSIZ]; - -@@ -608,7 +610,7 @@ - } - - if (! (m = GetMailEnv("sendmail"))) -- m = XtNewString("/usr/lib/sendmail"); -+ m = XtNewString("/usr/sbin/sendmail"); - #ifdef X_FACE - else { - add_face = (strcmp(&m[strlen(m)-14], "faces.sendmail") != 0) ? 1 : 0; diff --git a/mail/xmail/files/patch-ac b/mail/xmail/files/patch-ac deleted file mode 100644 index 514481fe10f9..000000000000 --- a/mail/xmail/files/patch-ac +++ /dev/null @@ -1,188 +0,0 @@ ---- XMail.ad.orig Mon Jan 30 16:55:51 1995 -+++ XMail.ad Mon Sep 8 23:28:56 1997 -@@ -20,98 +20,98 @@ - ! d2b48c - tan daa520 - goldenrod 7fff00 - chartreuse - ! f0e68c - khaki ffe4e1 - mistyrose fffacd - lemonchiffon - ! --! *expert: True --! .geometry: +65+3 --! *iconGeometry: +835+0 --! *shapeStyle: oval -+*expert: True -+.geometry: +65+3 -+*iconGeometry: +835+0 -+*shapeStyle: oval - ! --! *Abort.background: white --! *Abort.foreground: red -+*Abort.background: white -+*Abort.foreground: red - *Abort.translations: #override <Btn2Down>: ShowHelp() --! *Autograph.background: cyan -+*Autograph.background: cyan - *Autograph.translations: #override <Btn2Down>: ShowHelp() --! *autograph.background: paleturquoise -+*autograph.background: paleturquoise - *autograph.translations: #override <Btn2Down>: ShowHelp() --! *aliasList*Background: tan --! *aliasList.table.entry.background: cyan --! *alwaysignore*foreground: seagreen --! *noalwaysignore*foreground: red --! *autoprint*foreground: seagreen --! *noautoprint*foreground: red --! *background: yellow --! *borderColor: brown --! *Bcc.background: cyan --! *Bcc*AsciiSink*Background: cyan -+*aliasList*Background: tan -+*aliasList.table.entry.background: cyan -+*alwaysignore*foreground: seagreen -+*noalwaysignore*foreground: red -+*autoprint*foreground: seagreen -+*noautoprint*foreground: red -+*background: yellow -+*borderColor: brown -+*Bcc.background: cyan -+*Bcc*AsciiSink*Background: cyan - *Bcc*scrollHorizontal: whenNeeded - *Bcc*Thickness: 5 - *Bcc*MinimumThumb: 3 --! *Cancel.background: mistyrose --! *Cancel.foreground: black -+*Cancel.background: mistyrose -+*Cancel.foreground: black - *Cancel.translations: #override <Btn2Down>: ShowHelp() --! *Cc.background: cyan --! *Cc*AsciiSink*Background: cyan -+*Cc.background: cyan -+*Cc*AsciiSink*Background: cyan - *Cc*scrollHorizontal: whenNeeded - *Cc*Thickness: 5 - *Cc*MinimumThumb: 3 --! *Copy.foreground: blue --! *commandPanel.background: goldenrod --! *copy.background: cyan --! *Deliver.background: green --! *Deliver.foreground: brown --! *Deliver.borderColor: brown -+*Copy.foreground: blue -+*commandPanel.background: goldenrod -+*copy.background: cyan -+*Deliver.background: green -+*Deliver.foreground: brown -+*Deliver.borderColor: brown - *Deliver.translations: #override <Btn2Down>: ShowHelp() --! *delete.foreground: red --! *delete.background: white --! *Drop.foreground: red --! *editheaders*foreground: seagreen --! *noeditheaders*foreground: red --! *editorCommand: xterm -name XMail -title "Message Edit" -display %s -e vi %s --! *exit.foreground: blue --! *expert*foreground: seagreen --! *noexpert*foreground: red --! *Folder.background: cyan --! *Font: *-courier-bold-r-normal--14-* --! *fileWindow*background: chartreuse -+*delete.foreground: red -+*delete.background: white -+*Drop.foreground: red -+*editheaders*foreground: seagreen -+*noeditheaders*foreground: red -+*editorCommand: xterm -name XMail -title "Message Edit" -display %s -e vi %s -+*exit.foreground: blue -+*expert*foreground: seagreen -+*noexpert*foreground: red -+*Folder.background: cyan -+!*Font: *-courier-bold-r-normal--14-* -+*fileWindow*background: chartreuse - *fileWindow*scrollHorizontal: whenNeeded - *fileWindow*Thickness: 5 - *fileWindow*MinimumThumb: 3 --! *foreground: brown --! *forward.foreground: green3 --! *full.foreground: red -+*foreground: brown -+*forward.foreground: green3 -+*full.foreground: red - *grip*foreground: brown --! *hold*foreground: seagreen --! *nohold*foreground: red --! *icon*background: lightgoldenrod --! *icon*foreground: brown --! *inc.background: cyan --! *indexWindow*background: lemonchiffon -+*hold*foreground: seagreen -+*nohold*foreground: red -+*icon*background: lightgoldenrod -+*icon*foreground: brown -+*inc.background: cyan -+*indexWindow*background: lemonchiffon - *indexWindow*scrollHorizontal: whenNeeded - *indexWindow*Thickness: 10 - *indexWindow*MinimumThumb: 5 --! *list.background: tan --! *menu.background: tan --! *menubutton.foreground: brown --! *menubutton.background: cyan --! *Newmail.foreground: blue --! *previous.foreground: blue --! *quit.foreground: red --! *quit.background: white --! *read.foreground: green3 --! *ReEdit.background: khaki --! *ReEdit.foreground: brown -+*list.background: tan -+*menu.background: tan -+*menubutton.foreground: brown -+*menubutton.background: cyan -+*Newmail.foreground: blue -+*previous.foreground: blue -+*quit.foreground: red -+*quit.background: white -+*read.foreground: green3 -+*ReEdit.background: khaki -+*ReEdit.foreground: brown - *ReEdit.translations: #override <Btn2Down>: ShowHelp() --! *replyall.background: green --! *save.background: cyan --! *Save.foreground: blue --! *set_menu.background: tan -+*replyall.background: green -+*save.background: cyan -+*Save.foreground: blue -+*set_menu.background: tan - *statusWindow.background: brown - *statusWindow.foreground: yellow --! *Subject.background: cyan --! *Subject*AsciiSink*Background: cyan -+*Subject.background: cyan -+*Subject*AsciiSink*Background: cyan - *Subject*scrollHorizontal: whenNeeded - *Subject*Thickness: 5 - *Subject*MinimumThumb: 3 --! *textWindow*background: lemonchiffon -+*textWindow*background: lemonchiffon - *textWindow.text*Wrap: word - *textWindow.face.background: white - *textWindow.face.foreground: black -@@ -121,14 +121,14 @@ - *titleBar*Foreground: yellow - *titleBar.logo.background: white - *titleBar.logo.foreground: blue --! *To.Background: cyan --! *To*AsciiSink*Background: cyan -+*To.Background: cyan -+*To*AsciiSink*Background: cyan - *To*scrollHorizontal: whenNeeded - *To*Thickness: 5 - *To*MinimumThumb: 3 --! *undelete.foreground: green3 --! *write.foreground: green3 --! *Write.foreground: red -+*undelete.foreground: green3 -+*write.foreground: green3 -+*Write.foreground: red - ! - *Bcc.translations: #override \n\ - <Key>Delete: delete-previous-character() \n\ diff --git a/mail/xmail/files/patch-ad b/mail/xmail/files/patch-ad deleted file mode 100644 index 53fcd326af4e..000000000000 --- a/mail/xmail/files/patch-ad +++ /dev/null @@ -1,55 +0,0 @@ ---- callMail.c.orig Thu Jan 26 21:52:01 1995 -+++ callMail.c Wed Feb 4 23:30:07 1998 -@@ -38,11 +38,10 @@ - #include <sys/select.h> - #endif - --#if !(defined(SYSV) || defined(linux)) || defined(clipper) -+#if !(defined(SYSV) || defined(linux) || defined(__FreeBSD__)) || defined(clipper) - #include <sgtty.h> - #else --#include <sys/termio.h> --#include <sys/sysmacros.h> -+#include <sys/termios.h> - #include <fcntl.h> - #if defined(att) - #include <sys/stropts.h> -@@ -81,7 +80,7 @@ - #ifdef hpux - #define PTYCHAR2 "fedcba9876543210" - #else /* !hpux */ --#define PTYCHAR2 "0123456789abcdef" -+#define PTYCHAR2 "0123456789abcdefghijklmnopqrstuvwxyz" - #endif /* !hpux */ - #endif /* !PTYCHAR2 */ - -@@ -207,8 +206,8 @@ - callMail(argv) - char *argv[]; - { --#if defined(linux) || (defined(SYSV) && !defined(clipper)) -- struct termio tio; -+#if defined(linux) || defined(__FreeBSD__) || (defined(SYSV) && !defined(clipper)) -+ struct termios tio; - #else - struct sgttyb Sgtty; - #endif -@@ -223,14 +222,14 @@ - /* - ** Set minimal requirements for slave connection (no echo, no NL->CR, keep TABS) - */ --#if defined(linux) || (defined(SYSV) && !defined(clipper)) -- (void) ioctl(slave, TCGETA, &tio); -- tio.c_oflag &= ~(OCRNL|ONLCR|ONLRET|TABDLY); -+#if defined(linux) || defined(__FreeBSD__) || (defined(SYSV) && !defined(clipper)) -+ tcgetattr(slave, &tio); -+ tio.c_oflag &= ~(OCRNL|ONLCR|ONLRET|OXTABS); - tio.c_iflag &= ~IXOFF; - tio.c_iflag |= ICRNL; - tio.c_lflag &= ~(ISIG|ECHO); - tio.c_lflag |= ICANON; -- (void) ioctl(slave, TCSETA, &tio); -+ tcsetattr(slave, TCSANOW, &tio); - #else - (void) ioctl(slave, TIOCGETP, &Sgtty); - Sgtty.sg_flags &= ~(ECHO|CRMOD|XTABS); diff --git a/mail/xmail/files/patch-callMail.c b/mail/xmail/files/patch-callMail.c new file mode 100644 index 000000000000..53fcd326af4e --- /dev/null +++ b/mail/xmail/files/patch-callMail.c @@ -0,0 +1,55 @@ +--- callMail.c.orig Thu Jan 26 21:52:01 1995 ++++ callMail.c Wed Feb 4 23:30:07 1998 +@@ -38,11 +38,10 @@ + #include <sys/select.h> + #endif + +-#if !(defined(SYSV) || defined(linux)) || defined(clipper) ++#if !(defined(SYSV) || defined(linux) || defined(__FreeBSD__)) || defined(clipper) + #include <sgtty.h> + #else +-#include <sys/termio.h> +-#include <sys/sysmacros.h> ++#include <sys/termios.h> + #include <fcntl.h> + #if defined(att) + #include <sys/stropts.h> +@@ -81,7 +80,7 @@ + #ifdef hpux + #define PTYCHAR2 "fedcba9876543210" + #else /* !hpux */ +-#define PTYCHAR2 "0123456789abcdef" ++#define PTYCHAR2 "0123456789abcdefghijklmnopqrstuvwxyz" + #endif /* !hpux */ + #endif /* !PTYCHAR2 */ + +@@ -207,8 +206,8 @@ + callMail(argv) + char *argv[]; + { +-#if defined(linux) || (defined(SYSV) && !defined(clipper)) +- struct termio tio; ++#if defined(linux) || defined(__FreeBSD__) || (defined(SYSV) && !defined(clipper)) ++ struct termios tio; + #else + struct sgttyb Sgtty; + #endif +@@ -223,14 +222,14 @@ + /* + ** Set minimal requirements for slave connection (no echo, no NL->CR, keep TABS) + */ +-#if defined(linux) || (defined(SYSV) && !defined(clipper)) +- (void) ioctl(slave, TCGETA, &tio); +- tio.c_oflag &= ~(OCRNL|ONLCR|ONLRET|TABDLY); ++#if defined(linux) || defined(__FreeBSD__) || (defined(SYSV) && !defined(clipper)) ++ tcgetattr(slave, &tio); ++ tio.c_oflag &= ~(OCRNL|ONLCR|ONLRET|OXTABS); + tio.c_iflag &= ~IXOFF; + tio.c_iflag |= ICRNL; + tio.c_lflag &= ~(ISIG|ECHO); + tio.c_lflag |= ICANON; +- (void) ioctl(slave, TCSETA, &tio); ++ tcsetattr(slave, TCSANOW, &tio); + #else + (void) ioctl(slave, TIOCGETP, &Sgtty); + Sgtty.sg_flags &= ~(ECHO|CRMOD|XTABS); diff --git a/mail/xmail/files/patch-callbacks.c b/mail/xmail/files/patch-callbacks.c new file mode 100644 index 000000000000..2ccc84a8b246 --- /dev/null +++ b/mail/xmail/files/patch-callbacks.c @@ -0,0 +1,24 @@ +--- callbacks.c.orig Sat Jan 28 08:09:15 1995 ++++ callbacks.c Sat Oct 26 00:13:40 2002 +@@ -43,10 +43,12 @@ + extern int noshare sys_nerr; + extern char noshare *sys_errlist[]; + #else ++#if !defined(__FreeBSD__) + extern int errno; + extern int sys_nerr; + extern char *sys_errlist[]; + #endif ++#endif + + extern char otherBuf[BUFSIZ]; + +@@ -608,7 +610,7 @@ + } + + if (! (m = GetMailEnv("sendmail"))) +- m = XtNewString("/usr/lib/sendmail"); ++ m = XtNewString("/usr/sbin/sendmail"); + #ifdef X_FACE + else { + add_face = (strcmp(&m[strlen(m)-14], "faces.sendmail") != 0) ? 1 : 0; diff --git a/mail/xmailbox/Makefile b/mail/xmailbox/Makefile index 2b795398c65c..c4a8340a5a15 100644 --- a/mail/xmailbox/Makefile +++ b/mail/xmailbox/Makefile @@ -15,19 +15,15 @@ USE_XORG= xaw OPTIONS_DEFINE= DOCS -.include <bsd.port.options.mk> - post-patch: @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/XMailbox.ad post-install: - @${MKDIR} ${STAGEDIR}${PREFIX}/share/xmailbox - ${INSTALL_DATA} ${WRKSRC}/dingdong.au ${STAGEDIR}${PREFIX}/share/xmailbox - ${INSTALL_DATA} ${WRKSRC}/ugotmail.au ${STAGEDIR}${PREFIX}/share/xmailbox -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/xmailbox - ${INSTALL_DATA} ${WRKSRC}/DISCLAIMER ${STAGEDIR}${PREFIX}/share/doc/xmailbox - ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${PREFIX}/share/doc/xmailbox -.endif + @${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/dingdong.au ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/ugotmail.au ${STAGEDIR}${DATADIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/DISCLAIMER ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} .include <bsd.port.mk> diff --git a/mail/xmailbox/files/patch-Imakefile b/mail/xmailbox/files/patch-Imakefile new file mode 100644 index 000000000000..52c02b2c4a1e --- /dev/null +++ b/mail/xmailbox/files/patch-Imakefile @@ -0,0 +1,43 @@ +--- Imakefile.orig Thu Jul 17 01:36:17 1997 ++++ Imakefile Sat Apr 8 07:13:59 2000 +@@ -5,8 +5,8 @@ + # Note: you need to have XPM 3.4 or higher! + #------------------------------------------ + # +-XPMINCDIR = /usr/include/X11 +-XPMLIBDIR = /usr/X11/lib ++XPMINCDIR = $(INCDIR)/X11 ++XPMLIBDIR = $(USRLIBDIR) + XPMLIB = -L$(XPMLIBDIR) -lXpm + + #------------------------------- +@@ -20,7 +20,9 @@ + # Comment the following define if you + # want audio support + #------------------------------------------ ++#ifdef AlphaArcitecture + #define NO_AUDIO /* */ ++#endif + + #------------------------------------------ + # Uncomment the following define if your +@@ -42,7 +44,9 @@ + # uncomment the following define to + # turn on sound support. + #------------------------------------------ +-/* SUN_AUDIO = -DSUN_AUDIO /* */ ++#ifdef i386Architecture ++SUN_AUDIO = -DSUN_AUDIO /* */ ++#endif + + #------------------------------------------ + # Uncomment the following define if you +@@ -84,7 +88,7 @@ + EXTRA_DEFINES = -DCOM_AUDIO + #else + SNDLIB = +- INCLUDES = -I$(XPMINCDIR) -I/usr/public/include ++ INCLUDES = -I$(XPMINCDIR) + EXTRA_DEFINES = $(SUN_AUDIO) + #endif /* COM_AUDIO */ + #endif /* RPLAY_AUDIO */ diff --git a/mail/xmailbox/files/patch-Mailbox.c b/mail/xmailbox/files/patch-Mailbox.c new file mode 100644 index 000000000000..8730af0b6f0f --- /dev/null +++ b/mail/xmailbox/files/patch-Mailbox.c @@ -0,0 +1,11 @@ +--- Mailbox.c.orig Sun Sep 8 01:54:37 2002 ++++ Mailbox.c Sun Sep 8 01:54:50 2002 +@@ -75,7 +75,7 @@ + #ifdef linux + #include <linux/soundcard.h> + #else +-#include <machine/soundcard.h> ++#include <sys/soundcard.h> + #endif /* ifdef linux */ + + #define DEV_MIXER "/dev/mixer" diff --git a/mail/xmailbox/files/patch-MailboxP.h b/mail/xmailbox/files/patch-MailboxP.h new file mode 100644 index 000000000000..f87044adad2f --- /dev/null +++ b/mail/xmailbox/files/patch-MailboxP.h @@ -0,0 +1,16 @@ +--- MailboxP.h Mon Jul 1 11:13:47 1996 ++++ /home/andy/tmp/wrk/MailboxP.h Sun May 24 00:39:39 1998 +@@ -40,12 +40,10 @@ + + #ifdef SYSV + #define MAILBOX_DIRECTORY "/usr/mail" +-#else +-#ifdef SVR4 ++#elif defined(SVR4) || defined(__FreeBSD__) + #define MAILBOX_DIRECTORY "/var/mail" + #else + #define MAILBOX_DIRECTORY "/usr/spool/mail" +-#endif + #endif + + typedef struct { /* new fields for mailbox widget */ diff --git a/mail/xmailbox/files/patch-XMailbox.ad b/mail/xmailbox/files/patch-XMailbox.ad new file mode 100644 index 000000000000..fcdd7178f3a2 --- /dev/null +++ b/mail/xmailbox/files/patch-XMailbox.ad @@ -0,0 +1,11 @@ +--- XMailbox.ad.orig Thu Jul 17 01:13:32 1997 ++++ XMailbox.ad Sat Apr 8 07:03:20 2000 +@@ -9,7 +9,7 @@ + xmailbox*mailAnimOnce: true + ! xmailbox*mailAnimUpdate: 1000 + ! xmailbox*mailapp: echo 'setenv LINES 25; setenv COLUMNS 80; xterm -n Elm -e elm' | /bin/csh -f -s +-! xmailbox*mailSndFile: /usr/public/lib/sounds/bong.au ++xmailbox*mailSndFile: %%PREFIX%%/share/xmailbox/ugotmail.au + ! xmailbox*mailSndComm: /usr/public/bin/play %s + ! xmailbox*nomailXpmFile: /usr/X11/include/X11/pixmaps/mail0.xpm + ! xmailbox*mailXpmFile: /usr/X11/include/X11/pixmaps/mail1.xpm diff --git a/mail/xmailbox/files/patch-aa b/mail/xmailbox/files/patch-aa deleted file mode 100644 index 52c02b2c4a1e..000000000000 --- a/mail/xmailbox/files/patch-aa +++ /dev/null @@ -1,43 +0,0 @@ ---- Imakefile.orig Thu Jul 17 01:36:17 1997 -+++ Imakefile Sat Apr 8 07:13:59 2000 -@@ -5,8 +5,8 @@ - # Note: you need to have XPM 3.4 or higher! - #------------------------------------------ - # --XPMINCDIR = /usr/include/X11 --XPMLIBDIR = /usr/X11/lib -+XPMINCDIR = $(INCDIR)/X11 -+XPMLIBDIR = $(USRLIBDIR) - XPMLIB = -L$(XPMLIBDIR) -lXpm - - #------------------------------- -@@ -20,7 +20,9 @@ - # Comment the following define if you - # want audio support - #------------------------------------------ -+#ifdef AlphaArcitecture - #define NO_AUDIO /* */ -+#endif - - #------------------------------------------ - # Uncomment the following define if your -@@ -42,7 +44,9 @@ - # uncomment the following define to - # turn on sound support. - #------------------------------------------ --/* SUN_AUDIO = -DSUN_AUDIO /* */ -+#ifdef i386Architecture -+SUN_AUDIO = -DSUN_AUDIO /* */ -+#endif - - #------------------------------------------ - # Uncomment the following define if you -@@ -84,7 +88,7 @@ - EXTRA_DEFINES = -DCOM_AUDIO - #else - SNDLIB = -- INCLUDES = -I$(XPMINCDIR) -I/usr/public/include -+ INCLUDES = -I$(XPMINCDIR) - EXTRA_DEFINES = $(SUN_AUDIO) - #endif /* COM_AUDIO */ - #endif /* RPLAY_AUDIO */ diff --git a/mail/xmailbox/files/patch-ab b/mail/xmailbox/files/patch-ab deleted file mode 100644 index f87044adad2f..000000000000 --- a/mail/xmailbox/files/patch-ab +++ /dev/null @@ -1,16 +0,0 @@ ---- MailboxP.h Mon Jul 1 11:13:47 1996 -+++ /home/andy/tmp/wrk/MailboxP.h Sun May 24 00:39:39 1998 -@@ -40,12 +40,10 @@ - - #ifdef SYSV - #define MAILBOX_DIRECTORY "/usr/mail" --#else --#ifdef SVR4 -+#elif defined(SVR4) || defined(__FreeBSD__) - #define MAILBOX_DIRECTORY "/var/mail" - #else - #define MAILBOX_DIRECTORY "/usr/spool/mail" --#endif - #endif - - typedef struct { /* new fields for mailbox widget */ diff --git a/mail/xmailbox/files/patch-ac b/mail/xmailbox/files/patch-ac deleted file mode 100644 index fcdd7178f3a2..000000000000 --- a/mail/xmailbox/files/patch-ac +++ /dev/null @@ -1,11 +0,0 @@ ---- XMailbox.ad.orig Thu Jul 17 01:13:32 1997 -+++ XMailbox.ad Sat Apr 8 07:03:20 2000 -@@ -9,7 +9,7 @@ - xmailbox*mailAnimOnce: true - ! xmailbox*mailAnimUpdate: 1000 - ! xmailbox*mailapp: echo 'setenv LINES 25; setenv COLUMNS 80; xterm -n Elm -e elm' | /bin/csh -f -s --! xmailbox*mailSndFile: /usr/public/lib/sounds/bong.au -+xmailbox*mailSndFile: %%PREFIX%%/share/xmailbox/ugotmail.au - ! xmailbox*mailSndComm: /usr/public/bin/play %s - ! xmailbox*nomailXpmFile: /usr/X11/include/X11/pixmaps/mail0.xpm - ! xmailbox*mailXpmFile: /usr/X11/include/X11/pixmaps/mail1.xpm diff --git a/mail/xmailbox/files/patch-ad b/mail/xmailbox/files/patch-ad deleted file mode 100644 index 8730af0b6f0f..000000000000 --- a/mail/xmailbox/files/patch-ad +++ /dev/null @@ -1,11 +0,0 @@ ---- Mailbox.c.orig Sun Sep 8 01:54:37 2002 -+++ Mailbox.c Sun Sep 8 01:54:50 2002 -@@ -75,7 +75,7 @@ - #ifdef linux - #include <linux/soundcard.h> - #else --#include <machine/soundcard.h> -+#include <sys/soundcard.h> - #endif /* ifdef linux */ - - #define DEV_MIXER "/dev/mixer" diff --git a/mail/xmailbox/pkg-plist b/mail/xmailbox/pkg-plist index 880c73caf33e..6dc441209947 100644 --- a/mail/xmailbox/pkg-plist +++ b/mail/xmailbox/pkg-plist @@ -1,9 +1,9 @@ bin/xmailbox lib/X11/app-defaults/XMailbox man/man1/xmailbox.1.gz -%%PORTDOCS%%share/doc/xmailbox/DISCLAIMER -%%PORTDOCS%%share/doc/xmailbox/README -share/xmailbox/dingdong.au -share/xmailbox/ugotmail.au -%%PORTDOCS%%@dirrm share/doc/xmailbox -@dirrm share/xmailbox +%%PORTDOCS%%%%DOCSDIR%%/DISCLAIMER +%%PORTDOCS%%%%DOCSDIR%%/README +%%DATADIR%%/dingdong.au +%%DATADIR%%/ugotmail.au +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrm %%DATADIR%% diff --git a/mail/xmailwatcher/files/patch-aa b/mail/xmailwatcher/files/patch-aa deleted file mode 100644 index dfb562ea01f3..000000000000 --- a/mail/xmailwatcher/files/patch-aa +++ /dev/null @@ -1,20 +0,0 @@ ---- box.c.orig Sat Feb 3 18:13:00 2001 -+++ box.c Sat Feb 3 18:13:50 2001 -@@ -31,7 +31,7 @@ - #include <unistd.h> - #include <sys/stat.h> - #include <sys/types.h> --#include <sys/dir.h> -+#include <dirent.h> - #include <X11/Xos.h> - - /* MIME processing */ -@@ -235,7 +235,7 @@ - int n, i, tally; - char oneFrom[160]; - char *pos; -- char filename[PATH_MAX]; -+ char filename[FILENAME_MAX]; - - if (flags & BOX_DEBUG) (void) printf("MHparseMailbox(%s)\n", mailbox); - diff --git a/mail/xmailwatcher/files/patch-box.c b/mail/xmailwatcher/files/patch-box.c new file mode 100644 index 000000000000..dfb562ea01f3 --- /dev/null +++ b/mail/xmailwatcher/files/patch-box.c @@ -0,0 +1,20 @@ +--- box.c.orig Sat Feb 3 18:13:00 2001 ++++ box.c Sat Feb 3 18:13:50 2001 +@@ -31,7 +31,7 @@ + #include <unistd.h> + #include <sys/stat.h> + #include <sys/types.h> +-#include <sys/dir.h> ++#include <dirent.h> + #include <X11/Xos.h> + + /* MIME processing */ +@@ -235,7 +235,7 @@ + int n, i, tally; + char oneFrom[160]; + char *pos; +- char filename[PATH_MAX]; ++ char filename[FILENAME_MAX]; + + if (flags & BOX_DEBUG) (void) printf("MHparseMailbox(%s)\n", mailbox); + diff --git a/mail/xpbiff/files/patch-Imakefile b/mail/xpbiff/files/patch-Imakefile new file mode 100644 index 000000000000..e199776d4d41 --- /dev/null +++ b/mail/xpbiff/files/patch-Imakefile @@ -0,0 +1,8 @@ +--- Imakefile.org Thu Sep 21 23:42:04 2000 ++++ Imakefile Thu Sep 21 23:42:16 2000 +@@ -62,4 +62,4 @@ + SRCS = xpbiff.c $(CONVSRC) + OBJS = xpbiff.o $(CONVOBJ) + +-ComplexProgramTarget(xpbiff) ++ComplexProgramTargetNoMan(xpbiff) diff --git a/mail/xpbiff/files/patch-StrToPmap.c b/mail/xpbiff/files/patch-StrToPmap.c new file mode 100644 index 000000000000..2bf6efa618c6 --- /dev/null +++ b/mail/xpbiff/files/patch-StrToPmap.c @@ -0,0 +1,12 @@ +--- StrToPmap.c.org Fri Apr 11 01:27:17 1997 ++++ StrToPmap.c Fri Apr 11 01:27:38 1997 +@@ -90,8 +90,7 @@ + done(pixmap, Pixmap2); + return; + } +- +- pixmap[0] = locate_pixmap_file (*((Screen **) args[0].addr), name, ++ pixmap[0] = LocatePixmapFile(*((Screen **) args[0].addr), name, + NULL, 0, NULL, NULL, &pixmap[1]); + + if (pixmap[0] != None) { diff --git a/mail/xpbiff/files/patch-aa b/mail/xpbiff/files/patch-aa deleted file mode 100644 index 085a89f05d2d..000000000000 --- a/mail/xpbiff/files/patch-aa +++ /dev/null @@ -1,115 +0,0 @@ ---- config.h.orig Wed Oct 19 06:56:25 1994 -+++ config.h Fri Dec 12 13:16:55 2003 -@@ -8,7 +8,7 @@ - /* - * For X11R6 - */ --#undef X11R6 -+#define X11R6 - - /* - * For System V -@@ -33,6 +33,12 @@ - #undef NO_CUSERID - - /* -+ * Your system has getpwuid() in library -+ */ -+ -+#define HAVE_GETPWUID -+ -+/* - * For MH scan users - */ - -@@ -42,12 +48,12 @@ - * For Shape Extension - */ - --#undef SHAPE -+#define SHAPE - - /* - * Check Environment Variable MAIL for check file - */ --#undef GETENV_MAIL -+#define GETENV_MAIL - - /* - * Set Local Spool pathname -@@ -57,30 +63,47 @@ - /* - * For X pixmap - */ --#undef XPM --#undef DepXpmLib /usr/local/lib/libXpm.a -+#define XPM -+ -+#ifdef XPM -+#ifdef __FreeBSD__ -+#undef DepXpmLib -+#else -+#define DepXpmLib /usr/local/lib/libXpm.a -+#endif /* __FreeBSD__ */ -+#endif /* XPM */ - - /* - * For using I18N Xaw - */ --#undef XI18N --/* If you use X11R6, these settings below are not necessary */ -+#ifndef XI18N -+#ifdef __FreeBSD__ -+#define XI18N -+#endif -+#endif -+ -+#ifdef XI18N -+#undef X11R5_Xsi /* define if X11R5 Xsi */ -+#endif -+ -+#ifdef X11R5_Xsi /* When X11R5 Xsi, define followings if you want */ - #undef DepXawLib /usr/local/lib/I18N/libXaw.a - #undef DepXwcharLib /usr/local/lib/I18N/libXwchar.a - #undef Xi18nLibDir -L/usr/local/lib/I18N \ - -L/usr/local/lib - #undef Xi18nIncDir -I/usr/local/X11/include -+#endif - - /* - * Convert JIS to Japanese EUC - */ --#undef JCONVERT -+#define JCONVERT - #undef GUESS_JIS - - /* - * Process MIME header, charset=ISO-2022-JP, base 64 encoding - */ --#undef ISO_2022_JP -+#define ISO_2022_JP - - /* - * For SUN Audio -@@ -88,9 +111,19 @@ - #undef SUN_AUDIO - #undef AudioIncDir /usr/demo/SOUND - -+/* -+ * For BSD Audio (FreeBSD) -+ */ -+#ifndef __alpha -+#define BSD_AUDIO -+#endif -+ - /* - * For YOUBIN Service - */ - #undef YOUBIN --#undef YoubinBinDir /usr/local/bin --#undef YOUBIN_DEFAULT_SERVER_HOST "server" -+ -+#ifdef YOUBIN -+#define YoubinBinDir %YOUBINBINDIR% -+#define YOUBIN_DEFAULT_SERVER_HOST "server" -+#endif /* YOUBIN */ diff --git a/mail/xpbiff/files/patch-ab b/mail/xpbiff/files/patch-ab deleted file mode 100644 index 2bf6efa618c6..000000000000 --- a/mail/xpbiff/files/patch-ab +++ /dev/null @@ -1,12 +0,0 @@ ---- StrToPmap.c.org Fri Apr 11 01:27:17 1997 -+++ StrToPmap.c Fri Apr 11 01:27:38 1997 -@@ -90,8 +90,7 @@ - done(pixmap, Pixmap2); - return; - } -- -- pixmap[0] = locate_pixmap_file (*((Screen **) args[0].addr), name, -+ pixmap[0] = LocatePixmapFile(*((Screen **) args[0].addr), name, - NULL, 0, NULL, NULL, &pixmap[1]); - - if (pixmap[0] != None) { diff --git a/mail/xpbiff/files/patch-ad b/mail/xpbiff/files/patch-ad deleted file mode 100644 index e199776d4d41..000000000000 --- a/mail/xpbiff/files/patch-ad +++ /dev/null @@ -1,8 +0,0 @@ ---- Imakefile.org Thu Sep 21 23:42:04 2000 -+++ Imakefile Thu Sep 21 23:42:16 2000 -@@ -62,4 +62,4 @@ - SRCS = xpbiff.c $(CONVSRC) - OBJS = xpbiff.o $(CONVOBJ) - --ComplexProgramTarget(xpbiff) -+ComplexProgramTargetNoMan(xpbiff) diff --git a/mail/xpbiff/files/patch-ae b/mail/xpbiff/files/patch-ae deleted file mode 100644 index 0d36d557df4f..000000000000 --- a/mail/xpbiff/files/patch-ae +++ /dev/null @@ -1,958 +0,0 @@ ---- xpbiff.c.orig 1994-10-27 15:42:52.000000000 +0900 -+++ xpbiff.c 2010-11-17 14:40:26.457077878 +0900 -@@ -60,6 +60,7 @@ - - #include "config.h" - -+#include <paths.h> /* _PATH_MAILDIR */ - #include <X11/Intrinsic.h> - #include <X11/StringDefs.h> - #include <X11/Shell.h> -@@ -74,6 +75,12 @@ - #endif - #endif /* SUN_AUDIO */ - -+#ifdef BSD_AUDIO -+#include <sys/soundcard.h> -+#define MAX_SOUND_VOL 95 -+#define MIN_SOUND_VOL 05 -+#endif -+ - #ifndef X11R3 - #include <X11/Xaw/Box.h> - #include <X11/Xaw/Label.h> -@@ -116,7 +123,11 @@ - #include <sys/types.h> - #include <sys/stat.h> - #include <stdio.h> -+#include <stdlib.h> - #include <math.h> -+#ifdef HAVE_GETPWUID -+#include <pwd.h> -+#endif /* HAVE_GETPWUID */ - - #ifdef YOUBIN - -@@ -149,11 +160,7 @@ - - #ifndef YOUBIN - --#ifdef USG --#define SPOOLPATH "/usr/mail/" --#else --#define SPOOLPATH "/usr/spool/mail/" --#endif -+#define SPOOLPATH _PATH_MAILDIR - - #else /* YOUBIN */ - -@@ -256,34 +263,11 @@ - */ - - GC gcArrive, gcNo, gcAnimate, gcAnimateBack; --#ifdef XPM --Pixmap arrivePixmaps[2], noPixmaps[2]; --#define arrivePixmap arrivePixmaps[0] --#define noPixmap noPixmaps[0] --#else --Pixmap arrivePixmap, noPixmap; --#endif - Pixmap workPixmap; - int width, height; - unsigned char current_status = NO; - unsigned char showing_header = 0; - long mail_size = 0; --#ifndef YOUBIN --XtIntervalId polling_id; --#endif --Pixel colors[4]; --#ifndef YOUBIN --char spool_path[100]; --int polling_time; --#endif --int popup_time; -- --Boolean raise; --Boolean stay_raised; --Boolean animate; --Boolean popup; --Boolean bell; --Boolean popdown; - - unsigned int Arrive_pixmap_width, Arrive_pixmap_height; - unsigned int Arrive_pixmap_depth; -@@ -291,24 +275,11 @@ - unsigned int No_pixmap_width, No_pixmap_height; - unsigned int No_pixmap_depth; - --Boolean mono; --String popupGeometry; -- --#ifndef YOUBIN --String prefers; -- --String spoolPath; --#endif -- --#ifdef MHSCAN --Boolean mhscan; --String scanCommand; --String scanCommandPath; --#endif -- --#ifdef SHAPE --Boolean shape; --Pixmap noPixmapMask, arrivePixmapMask; -+#ifdef YOUBIN -+XtIntervalId timeout_id; -+#else -+XtIntervalId polling_id; -+char spool_path[100]; - #endif - - static String fallback_resources[] = { -@@ -324,86 +295,125 @@ - NULL - }; - --#ifdef SUN_AUDIO --String mail_sndfile; --int volume; -+typedef struct _appRes { -+#ifdef XPM -+ Pixmap arrivePixmaps[2]; -+ Pixmap noPixmaps[2]; -+#define arrivePixmap arrivePixmaps[0] -+#define noPixmap noPixmaps[0] -+#else -+ Pixmap arrivePixmap; -+ Pixmap noPixmap; - #endif -- -+ Pixel colors[4]; -+#ifndef YOUBIN -+ String prefers; -+ int polling_time; -+ String spoolPath; -+#endif -+ Boolean mono; -+ String popupGeometry; -+ Boolean raise; -+ Boolean stay_raised; -+ Boolean animate; -+ Boolean popup; -+ int popup_time; -+ Boolean bell; -+ Boolean popdown; - #ifdef YOUBIN --Boolean use_pipe; --String server; --Boolean preserve; --XtIntervalId timeout_id; -+ Boolean use_pipe; -+ String server; -+ Boolean preserve; -+#endif -+#ifdef MHSCAN -+ Boolean mhscan; -+ String scanCommand; -+ String scanCommandPath; - #endif -+#ifdef SHAPE -+ Boolean shape; -+ Pixmap arrivePixmapMask; -+ Pixmap noPixmapMask; -+#endif -+#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) -+ String mail_sndfile; -+ int volume; -+#endif -+} AppResourcesRec, *AppResources; -+ -+#define SetResOffset(n, field) resources[n].resource_offset = ((char *)&appResources.field - (char *)&appResources) -+#define offset(field) XtOffset(struct _appRes *, field) -+ -+AppResourcesRec appResources; - - static XtResource resources[] = { - {"arrivePixmap", "ArrivePixmap", RPixmap2, sizeof(Pixmap2), -- (Cardinal)&arrivePixmap, XtRString, "None"}, -+ offset(arrivePixmap), XtRString, "None"}, - {"nomailPixmap", "NomailPixmap", RPixmap2, sizeof(Pixmap2), -- (Cardinal)&noPixmap, XtRString, "None"}, -+ offset(noPixmap), XtRString, "None"}, - {"nomailForeground", "NomailForeground", XtRPixel, sizeof(Pixel), -- (Cardinal)&colors[0], XtRString, "black"}, -+ offset(colors[0]), XtRString, "black"}, - {"nomailBackground", "NomailBackground", XtRPixel, sizeof(Pixel), -- (Cardinal)&colors[1], XtRString, "cyan"}, -+ offset(colors[1]), XtRString, "cyan"}, - {"arriveForeground", "ArriveForeground", XtRPixel, sizeof(Pixel), -- (Cardinal)&colors[2], XtRString, "yellow"}, -+ offset(colors[2]), XtRString, "yellow"}, - {"arriveBackground", "ArriveBackground", XtRPixel, sizeof(Pixel), -- (Cardinal)&colors[3], XtRString, "red"}, -+ offset(colors[3]), XtRString, "red"}, - #ifndef YOUBIN - {"pollingTime", "PollingTime", XtRInt, sizeof(int), -- (Cardinal)&polling_time, XtRImmediate, (XtPointer)15000}, -+ offset(polling_time), XtRImmediate, (XtPointer)15000}, - {"prefer", "Prefer", XtRString, sizeof(String), -- (Cardinal)&prefers, XtRString, (XtPointer)"From Subject"}, -+ offset(prefers), XtRString, (XtPointer)"From Subject"}, - {"spoolPath", "SpoolPath", XtRString, sizeof(String), -- (Cardinal)&spoolPath, XtRString, None}, -+ offset(spoolPath), XtRString, None}, - #endif - {"mono", "Mono", XtRBoolean, sizeof(Boolean), -- (Cardinal)&mono, XtRImmediate, (XtPointer)False}, -+ offset(mono), XtRImmediate, (XtPointer)False}, - {"popupGeometry", "PopupGeometry", XtRString, sizeof(String), -- (Cardinal)&popupGeometry, XtRString, NULL}, -+ offset(popupGeometry), XtRString, NULL}, - {"raise", "Raise", XtRBoolean, sizeof(Boolean), -- (Cardinal)&raise, XtRImmediate, (XtPointer)True}, -+ offset(raise), XtRImmediate, (XtPointer)True}, - {"stayRaised", "StayRaised", XtRBoolean, sizeof(Boolean), -- (Cardinal)&stay_raised, XtRImmediate, (XtPointer)False}, -+ offset(stay_raised), XtRImmediate, (XtPointer)False}, - {"animate", "Animate", XtRBoolean, sizeof(Boolean), -- (Cardinal)&animate, XtRImmediate, (XtPointer)True}, -+ offset(animate), XtRImmediate, (XtPointer)True}, - {"popup", "Popup", XtRBoolean, sizeof(Boolean), -- (Cardinal)&popup, XtRImmediate, (XtPointer)True}, -+ offset(popup), XtRImmediate, (XtPointer)True}, - {"popupTime", "PopupTime", XtRInt, sizeof(int), -- (Cardinal)&popup_time, XtRImmediate, (XtPointer)15000}, -+ offset(popup_time), XtRImmediate, (XtPointer)15000}, - {"bell", "Bell", XtRBoolean, sizeof(Boolean), -- (Cardinal)&bell, XtRImmediate, (XtPointer)True}, -+ offset(bell), XtRImmediate, (XtPointer)True}, - {"popdown", "Popdown", XtRBoolean, sizeof(Boolean), -- (Cardinal)&popdown, XtRImmediate, (XtPointer)True}, -+ offset(popdown), XtRImmediate, (XtPointer)True}, - #ifdef YOUBIN - {"pipe", "Pipe", XtRBoolean, sizeof(Boolean), -- (Cardinal)&use_pipe, XtRString, "false"}, -+ offset(use_pipe), XtRString, "false"}, - {"server", "Server", XtRString, sizeof(String), -- (Cardinal)&server, XtRString, YOUBIN_DEFAULT_SERVER_HOST}, -+ offset(server), XtRString, YOUBIN_DEFAULT_SERVER_HOST}, - {"preserve", "preserve", XtRBoolean, sizeof(Boolean), -- (Cardinal)&preserve, XtRString, "true"}, -+ offset(preserve), XtRString, "true"}, - #endif - #ifdef MHSCAN - {"mhscan", "Mhscan", XtRBoolean, sizeof(Boolean), -- (Cardinal)&mhscan, XtRImmediate, (XtPointer)False}, -+ offset(mhscan), XtRImmediate, (XtPointer)False}, - {"scanCommand", "ScanCommand", XtRString, sizeof(String), -- (Cardinal)&scanCommand, XtRString, DEFAULT_SCAN_COMMAND}, -+ offset(scanCommand), XtRString, DEFAULT_SCAN_COMMAND}, - {"scanCommandPath", "ScanCommandPath", XtRString, sizeof(String), -- (Cardinal)&scanCommandPath, XtRString, DEFAULT_SCAN_COMMAND_PATH}, -+ offset(scanCommandPath), XtRString, DEFAULT_SCAN_COMMAND_PATH}, - #endif - #ifdef SHAPE - {"shape", "Shape", XtRBoolean, sizeof(Boolean), -- (Cardinal)&shape, XtRImmediate, (XtPointer)False}, -+ offset(shape), XtRImmediate, (XtPointer)False}, - {"arrivePixmapMask", "ArrivePixmapMask", XtRBitmap, sizeof(Pixmap), -- (Cardinal)&arrivePixmapMask, XtRBitmap, None}, -+ offset(arrivePixmapMask), XtRBitmap, None}, - {"nomailPixmapMask", "NomailPixmapMask", XtRBitmap, sizeof(Pixmap), -- (Cardinal)&noPixmapMask, XtRBitmap, None}, -+ offset(noPixmapMask), XtRBitmap, None}, - #endif --#ifdef SUN_AUDIO -+#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) - {"mailSndFile", "MailSndFile", XtRString, sizeof(String), -- (Cardinal)&mail_sndfile, XtRString, None}, -+ offset(mail_sndfile), XtRString, None}, - {"volume", "Volume", XtRInt, sizeof(int), -- (Cardinal)&volume, XtRString, "33"}, -+ offset(volume), XtRString, "33"}, - #endif - }; - -@@ -445,7 +455,7 @@ - {"-server", "*server", XrmoptionSepArg, NULL}, - {"-preserve", "*preserve", XrmoptionNoArg, "true"}, - #endif /* YOUBIN */ --#ifdef SUN_AUDIO -+#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) - {"-sndfile", "*mailSndFile", XrmoptionSepArg, NULL}, - {"-volume", "*volume", XrmoptionSepArg, NULL}, - #endif -@@ -461,6 +471,7 @@ - #ifdef JCONVERT - static Locale_ent locale_list[] = { - {"ja_JP.EUC", EUC}, -+ {"ja_JP.eucJP", EUC}, - {"ja_JP.SJIS", SJIS}, - {"ja_JP.jis7", JIS}, - {"ja_JP.jis8", JIS}, -@@ -485,9 +496,9 @@ - XGCValues values; - XtTranslations newTranslations; - static XtActionsRec redrawActions[] = { -- {"expose", (XtCallbackProc) redraw_callback}, -- {"select", (XtCallbackProc) popup_again}, -- {"quit", (XtCallbackProc) quit}, -+ {"expose", (XtActionProc) redraw_callback}, -+ {"select", (XtActionProc) popup_again}, -+ {"quit", (XtActionProc) quit}, - }; - - static char *overrideTranslations = -@@ -498,6 +509,9 @@ - int dummy; - int i; - -+#ifdef HAVE_GETPWUID -+ struct passwd *pw; -+#endif - #ifdef JCONVERT - char *locale_name; - Locale_ent *p; -@@ -514,28 +528,40 @@ - #endif /* !YOUBIN */ - - #ifdef YOUBIN -- if ((prog_name = strrchr(argv[0], '/')) != NULL) { -- prog_name++; -- } else { -- prog_name = argv[0]; -- } -+ if ((prog_name = strrchr(argv[0], '/')) != NULL) { -+ prog_name++; -+ } else { -+ prog_name = argv[0]; -+ } - #else /* !YOUBIN */ -- if (spoolPath != NULL && spoolPath[0] != '\0') -- strcpy(spool_path, spoolPath); -- else -+ if (appResources.spoolPath != NULL && appResources.spoolPath[0] != '\0') { -+ strcpy(spool_path, appResources.spoolPath); -+ } else { - strcpy(spool_path, SPOOLPATH); -- if (spool_path[strlen(spool_path) - 1] != '/') -+ } -+ if (spool_path[strlen(spool_path) - 1] != '/') { - strcat(spool_path, "/"); -+ } -+ - #ifdef GETENV_MAIL -- if (getenv("MAIL") != NULL) -+ if (getenv("MAIL") != NULL) { - strcpy(spool_path, getenv("MAIL")); -- else --#endif --#ifndef NO_CUSERID -- strcat(spool_path, cuserid(NULL)); --#else -+ } else { -+#endif /* GETENV_MAIL */ -+ -+#ifdef HAVE_GETPWUID -+ pw = getpwuid(getuid()); -+ strcat(spool_path, pw->pw_name); -+#elif defined(NO_CUSERID) - strcat(spool_path, getenv("USER")); --#endif -+#else -+ strcat(spool_path, (char *)cuserid(NULL)); -+#endif /* NO_CUSERID && HAVE_GETPWUID */ -+ -+#ifdef GETENV_MAIL -+ } -+#endif /* GETENV_MAIL */ -+ - #endif /* !YOUBIN */ - - #ifdef XI18N -@@ -646,7 +672,7 @@ - fprintf(stderr, " [-server host]\n"); - fprintf(stderr, " [-nopreserve]\n"); - #endif --#ifdef SUN_AUDIO -+#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) - fprintf(stderr, " [-sndfile audio_file]\n"); - fprintf(stderr, " [-volume percentage]\n"); - #endif -@@ -659,33 +685,33 @@ - convertArgs, XtNumber(convertArgs)); - #endif - -- XtGetApplicationResources(toplevel, (caddr_t) NULL, -+ XtGetApplicationResources(toplevel, (XtPointer)&appResources, - resources, XtNumber(resources), NULL, 0); - -- if (mono == True) { -- colors[0] = colors[3] = BlackPixelOfScreen(XtScreen(toplevel)); -- colors[1] = colors[2] = WhitePixelOfScreen(XtScreen(toplevel)); -+ if (appResources.mono == True) { -+ appResources.colors[0] = appResources.colors[3] = BlackPixelOfScreen(XtScreen(toplevel)); -+ appResources.colors[1] = appResources.colors[2] = WhitePixelOfScreen(XtScreen(toplevel)); - } - - #ifndef YOUBIN -- split_prefer(prefers); -+ split_prefer(appResources.prefers); - #endif - - #ifdef XPM -- if (arrivePixmapMask == None) -- arrivePixmapMask = arrivePixmaps[1]; -- if (noPixmapMask == None) -- noPixmapMask = noPixmaps[1]; -+ if (appResources.arrivePixmapMask == None) -+ appResources.arrivePixmapMask = appResources.arrivePixmaps[1]; -+ if (appResources.noPixmapMask == None) -+ appResources.noPixmapMask = appResources.noPixmaps[1]; - #endif - - #ifdef SHAPE -- if (shape == True -+ if (appResources.shape == True - && !XShapeQueryExtension(XtDisplay(toplevel), &dummy, &dummy)) -- shape = False; -+ appResources.shape = False; - #endif - -- if (noPixmap == None) { -- noPixmap = XCreatePixmapFromBitmapData -+ if (appResources.noPixmap == None) { -+ appResources.noPixmap = XCreatePixmapFromBitmapData - (XtDisplay(toplevel), RootWindowOfScreen(XtScreen(toplevel)), - no_bits, no_width, no_height, 1, 0, 1); - No_pixmap_width = no_width; -@@ -695,14 +721,14 @@ - else { - Window r; - unsigned int x, y, bw; -- XGetGeometry(XtDisplay(toplevel), noPixmap, -+ XGetGeometry(XtDisplay(toplevel), appResources.noPixmap, - &r, &x, &y, - &No_pixmap_width, &No_pixmap_height, - &bw, &No_pixmap_depth); - } - -- if (arrivePixmap == None) { -- arrivePixmap = XCreatePixmapFromBitmapData -+ if (appResources.arrivePixmap == None) { -+ appResources.arrivePixmap = XCreatePixmapFromBitmapData - (XtDisplay(toplevel), RootWindowOfScreen(XtScreen(toplevel)), - arrive_bits, arrive_width, arrive_height, - 1, 0, 1); -@@ -713,7 +739,7 @@ - else { - Window r; - unsigned int x, y, bw; -- XGetGeometry(XtDisplay(toplevel), arrivePixmap, -+ XGetGeometry(XtDisplay(toplevel), appResources.arrivePixmap, - &r, &x, &y, - &Arrive_pixmap_width, &Arrive_pixmap_height, - &bw, &Arrive_pixmap_depth); -@@ -741,14 +767,14 @@ - - /* Get graphic context */ - -- values.foreground = colors[0]; -- values.background = colors[1]; -+ values.foreground = appResources.colors[0]; -+ values.background = appResources.colors[1]; - values.graphics_exposures = False; - gcNo = XtGetGC(toplevel, - GCForeground | GCBackground | GCGraphicsExposures, - &values); -- values.foreground = colors[2]; -- values.background = colors[3]; -+ values.foreground = appResources.colors[2]; -+ values.background = appResources.colors[3]; - values.graphics_exposures = False; - gcArrive = XtGetGC(toplevel, - GCForeground | GCBackground | GCGraphicsExposures, -@@ -760,13 +786,13 @@ - Arrive_pixmap_width, Arrive_pixmap_height, - DefaultDepthOfScreen(XtScreen(toplevel))); - -- values.foreground = colors[2]; -+ values.foreground = appResources.colors[2]; - values.graphics_exposures = False; - gcAnimate = XtGetGC(toplevel, - GCForeground | GCGraphicsExposures, - &values); - -- values.foreground = colors[3]; -+ values.foreground = appResources.colors[3]; - values.graphics_exposures = False; - gcAnimateBack = XtGetGC(toplevel, - GCForeground | GCGraphicsExposures, -@@ -775,11 +801,11 @@ - /* Interval timer start */ - #ifndef YOUBIN - polling_id = XtAppAddTimeOut(app_con, -- (unsigned long) polling_time, Polling, NULL); -+ (unsigned long) appResources.polling_time, (XtTimerCallbackProc) Polling, NULL); - #else /* YOUBIN */ -- if (server == NULL) { -+ if (appResources.server == NULL) { - gethostname(serv_name, sizeof(serv_name)); -- server = serv_name; -+ appResources.server = serv_name; - } - - /* make new process group */ -@@ -789,9 +815,9 @@ - exit(EXIT_FAILURE); - } - -- if (use_pipe == False) { -+ if (appResources.use_pipe == False) { - sprintf(child_process, "%s/%s -b -s %s", -- BINDIR, CHILD_PROGRAM_NAME, server); -+ BINDIR, CHILD_PROGRAM_NAME, appResources.server); - if ((pfile = popen(child_process, "r")) == NULL) { - perror("popen"); - exit(EXIT_FAILURE); -@@ -831,21 +857,21 @@ - { - if (current_status == ARRIVE) { - if (Arrive_pixmap_depth == 1) -- XCopyPlane(XtDisplay(toplevel), arrivePixmap, XtWindow(biff), -+ XCopyPlane(XtDisplay(toplevel), appResources.arrivePixmap, XtWindow(biff), - gcArrive, - 0, 0, Arrive_pixmap_width, Arrive_pixmap_height, 0, 0, 1); - else -- XCopyArea(XtDisplay(toplevel), arrivePixmap, XtWindow(biff), -+ XCopyArea(XtDisplay(toplevel), appResources.arrivePixmap, XtWindow(biff), - gcArrive, - 0, 0, Arrive_pixmap_width, Arrive_pixmap_height, 0, 0); - } - else { - if (No_pixmap_depth == 1) -- XCopyPlane(XtDisplay(toplevel), noPixmap, XtWindow(biff), -+ XCopyPlane(XtDisplay(toplevel), appResources.noPixmap, XtWindow(biff), - gcNo, - 0, 0, No_pixmap_width, No_pixmap_height, 0, 0, 1); - else -- XCopyArea(XtDisplay(toplevel), noPixmap, XtWindow(biff), -+ XCopyArea(XtDisplay(toplevel), appResources.noPixmap, XtWindow(biff), - gcNo, 0, 0, No_pixmap_width, No_pixmap_height, 0, 0); - } - } -@@ -853,9 +879,9 @@ - #ifdef SHAPE - void shape_window() - { -- if (shape == True) { -+ if (appResources.shape == True) { - if (current_status == ARRIVE) { -- if (arrivePixmapMask == None) { -+ if (appResources.arrivePixmapMask == None) { - XRectangle rect; - rect.x = rect.y = 0; - rect.width = Arrive_pixmap_width; -@@ -866,11 +892,11 @@ - } - else - XShapeCombineMask(XtDisplay(toplevel), XtWindow(toplevel), -- ShapeBounding, 0, 0, arrivePixmapMask, -+ ShapeBounding, 0, 0, appResources.arrivePixmapMask, - ShapeSet); - } - else { -- if (noPixmapMask == None) { -+ if (appResources.noPixmapMask == None) { - XRectangle rect; - rect.x = rect.y = 0; - rect.width = No_pixmap_width; -@@ -881,7 +907,7 @@ - } - else - XShapeCombineMask(XtDisplay(toplevel), XtWindow(toplevel), -- ShapeBounding, 0, 0, noPixmapMask, -+ ShapeBounding, 0, 0, appResources.noPixmapMask, - ShapeSet); - } - } -@@ -915,53 +941,54 @@ - /* NEW mail !! */ - current_status = ARRIVE; - mail_size = file_stat.st_size; -- if (popup == True) -+ if (appResources.popup == True) - mail_header = GetMailHeader(); - XtResizeWidget(toplevel, Arrive_pixmap_width, Arrive_pixmap_height, 1); - XtResizeWidget(biff, Arrive_pixmap_width, Arrive_pixmap_height, 0); -- if (raise == True) -+ if (appResources.raise == True) - XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); -- if (animate == True) -+ if (appResources.animate == True) - AnimateBiff(); - redraw_window(); - #ifdef SHAPE - shape_window(); - #endif -- if (popup == True) -+ if (appResources.popup == True) - PopupMailHeader(mail_header); - XSync(XtDisplay(toplevel), 0); -- if (bell == True) -- beep(XtDisplay(toplevel), 0); -+ if (appResources.bell == True) -+ beep(XtDisplay(toplevel)); - /* XBell(XtDisplay(toplevel), 0); */ - } - else if (file_stat.st_size > mail_size) { - mail_size = file_stat.st_size; -- if (popup == True) -+ if (appResources.popup == True) - mail_header = GetMailHeader(); - /* more come! only ringing bell. */ -- if (popup == True) -+ if (appResources.popup == True) - BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); - XtResizeWidget(toplevel, Arrive_pixmap_width, Arrive_pixmap_height, 1); - XtResizeWidget(biff, Arrive_pixmap_width, Arrive_pixmap_height, 0); -- if (raise == True) -+ if (appResources.raise == True) - XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); -- if (animate == True) -+ if (appResources.animate == True) - AnimateBiff(); - redraw_window(); - #ifdef SHAPE - shape_window(); - #endif -- if (popup == True) -+ if (appResources.popup == True) - PopupMailHeader(mail_header); - XSync(XtDisplay(toplevel), 0); -- if (bell == True) -- XBell(XtDisplay(toplevel), 0); -+ if (appResources.bell == True) -+ beep(XtDisplay(toplevel)); -+ /* XBell(XtDisplay(toplevel), 0); */ - } - else { - mail_size = file_stat.st_size; -- if (raise == True && stay_raised == False) -+ if (appResources.raise == True && appResources.stay_raised == False) - XLowerWindow(XtDisplay(toplevel), XtWindow(toplevel)); -- if (popup == True) -+ if (appResources.popup == True) - BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); - } - } else -@@ -974,15 +1001,15 @@ - #ifdef SHAPE - shape_window(); - #endif -- if (raise == True && stay_raised == False) -+ if (appResources.raise == True && appResources.stay_raised == False) - XLowerWindow(XtDisplay(toplevel), XtWindow(toplevel)); -- if (popup == True) -+ if (appResources.popup == True) - BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); - } - /* No arrive */ - - polling_id = XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), -- (unsigned long) polling_time, Polling, NULL); -+ (unsigned long) appResources.polling_time, (XtTimerCallbackProc) Polling, NULL); - - } - #endif /* !YOUBIN */ -@@ -995,7 +1022,7 @@ - double r, angle, t1, t2, t3, t4; - - #ifdef SHAPE -- if(shape == True) { -+ if(appResources.shape == True) { - XRectangle rect; - rect.x = rect.y = 0; - rect.width = Arrive_pixmap_width; -@@ -1038,9 +1065,9 @@ - - /* Create Popup Shell */ - -- if (popupGeometry != NULL) { -+ if (appResources.popupGeometry != NULL) { - arg_count = 0; -- XtSetArg(args[arg_count], XtNgeometry, popupGeometry); -+ XtSetArg(args[arg_count], XtNgeometry, appResources.popupGeometry); - arg_count++; - } - else { -@@ -1068,10 +1095,10 @@ - info_base = XtCreateManagedWidget("info_base", boxWidgetClass, header, args, - arg_count); - -- if (popdown == True) { -+ if (appResources.popdown == True) { - popdown_button = XtCreateManagedWidget("popdown_button", commandWidgetClass, info_base, NULL, - ZERO); -- XtAddCallback(popdown_button, XtNcallback, BreakPopup, (XtPointer) NULL); -+ XtAddCallback(popdown_button, XtNcallback, (XtCallbackProc) BreakPopup, (XtPointer) NULL); - } - arg_count = 0; - XtSetArg(args[arg_count], XtNlabel, head); -@@ -1131,37 +1158,38 @@ - /* the click catchs new mail */ - current_status = ARRIVE; - mail_size = file_stat.st_size; -- if (popup == True) -+ if (appResources.popup == True) - mail_header = GetMailHeader(); - XtResizeWidget(toplevel, Arrive_pixmap_width, Arrive_pixmap_height, 1); - XtResizeWidget(biff, Arrive_pixmap_width, Arrive_pixmap_height, 0); -- if (raise == True) -+ if (appResources.raise == True) - XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); -- if (animate == True) -+ if (appResources.animate == True) - AnimateBiff(); - redraw_window(); - #ifdef SHAPE - shape_window(); - #endif -- if (popup == True) -+ if (appResources.popup == True) - PopupMailHeader(mail_header); - XSync(XtDisplay(toplevel), 0); -- if (bell == True) -- XBell(XtDisplay(toplevel), 0); -+ if (appResources.bell == True) -+ beep(XtDisplay(toplevel)); -+ /* XBell(XtDisplay(toplevel), 0); */ - } - else { - mail_size = file_stat.st_size; -- if (popup == True) -+ if (appResources.popup == True) - mail_header = GetMailHeader(); -- if (popup == True && showing_header) -+ if (appResources.popup == True && showing_header) - BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); -- if (raise == True) -+ if (appResources.raise == True) - XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); - redraw_window(); - #ifdef SHAPE - shape_window(); - #endif -- if (popup == True) -+ if (appResources.popup == True) - PopupMailHeader(mail_header); - XSync(XtDisplay(toplevel), 0); - } -@@ -1169,7 +1197,7 @@ - - XtRemoveTimeOut(polling_id); - polling_id = XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), -- (unsigned long) polling_time, Polling, NULL); -+ (unsigned long) appResources.polling_time, (XtTimerCallbackProc) Polling, NULL); - } - #endif /* !YOUBIN */ - -@@ -1749,14 +1777,23 @@ - static void beep (display) - Display *display; - { --#ifdef SUN_AUDIO -+#if defined(SUN_AUDIO) || defined(BSD_AUDIO) - int audiofd, filefd; -- int rn, wn, len; -+ int rn; -+#ifdef SUN_AUDIO -+ int wn, len; - unsigned char buf[256]; - Audio_filehdr *au_hdr; - audio_info_t ais; -- -- if (mail_sndfile) { -+#elif defined(BSD_AUDIO) -+ int mixerfd, mixerid, supported; -+ static int bsize; -+ static char *buf; -+ struct stat sbuf; -+ int level, level_tmp; -+#endif -+ -+ if (appResources.mail_sndfile) { - audiofd = open( "/dev/audio", O_WRONLY | O_NDELAY ); - if (audiofd < 0) - { -@@ -1766,6 +1803,7 @@ - return; - } - -+#ifdef SUN_AUDIO - if( ioctl( audiofd, AUDIO_GETINFO, &ais ) ) - { - fprintf(stderr, "%s: Problem retrieving /dev/audio info.\n", -@@ -1782,15 +1820,34 @@ - return; - } - -- filefd = open(mail_sndfile, O_RDONLY); -+#elif defined(BSD_AUDIO) -+ /* Open the mixer device */ -+ mixerfd = open ("/dev/mixer", O_RDWR, 0); -+ if (mixerfd > 0) -+ { -+ if (appResources.volume > MAX_SOUND_VOL) -+ appResources.volume = MAX_SOUND_VOL; -+ else if (appResources.volume < MIN_SOUND_VOL) -+ appResources.volume = MIN_SOUND_VOL; -+ mixerid = SOUND_MIXER_PCM; -+ /* storing volume level */ -+ ioctl(mixerfd,MIXER_READ(mixerid),&level_tmp); -+ -+ level = (appResources.volume << 8) | appResources.volume; -+ ioctl(mixerfd,MIXER_WRITE(mixerid),&level); -+ } -+#endif -+ -+ filefd = open(appResources.mail_sndfile, O_RDONLY); - if (filefd < 0) - { - fprintf(stderr, "%s: Couldn't play file \"%s\"\n", -- "Mailbox widget", mail_sndfile); -+ "Mailbox widget", appResources.mail_sndfile); - close(audiofd); - return; - } - -+#ifdef SUN_AUDIO - /* Read in the audio header */ - rn = read(filefd, buf, sizeof(Audio_filehdr)); - -@@ -1841,12 +1898,28 @@ - usleep(1000); - } - } -- close(audiofd); -+#elif defined(BSD_AUDIO) -+ ioctl(audiofd, SNDCTL_DSP_RESET, 0); -+ fstat(filefd, &sbuf); -+ bsize = sbuf.st_size; -+ buf = malloc((u_int)bsize); -+ if ( (rn = read(filefd, buf, bsize)) > 0) -+ write(audiofd, buf, rn); -+ ioctl(audiofd, SNDCTL_DSP_SYNC, 0); -+ free(buf); -+ if (mixerfd > 0) -+ { -+ /* restoring volume level */ -+ ioctl(mixerfd,MIXER_WRITE(mixerid),&level_tmp); -+ close(mixerfd); -+ } -+#endif -+ close(audiofd); - close(filefd); - } - else -- XBell (display, volume); --#else /* !SUN_AUDIO */ -+ XBell (display, 0); -+#else /* !SUN_AUDIO && !BSD_AUDIO */ - XBell (display, 0); - #endif /* SUN_AUDIO */ - return; -@@ -1888,7 +1961,7 @@ - - if (mail_size > saved_mail_size) { - /* NEW mail */ -- if (popup == True || *cp == ' ') { -+ if (appResources.popup == True || *cp == ' ') { - date = strtol(cp, &cp2, 10); - if (*cp2 == '\0' || isspace(*cp2)) { - get_mail_header((*cp2 == '\0') ? NULL : (cp2 + 1)); -@@ -1898,31 +1971,31 @@ - current_status = ARRIVE; - XtResizeWidget(toplevel, Arrive_pixmap_width, Arrive_pixmap_height, 1); - XtResizeWidget(biff, Arrive_pixmap_width, Arrive_pixmap_height, 0); -- if (popup == True) { -+ if (appResources.popup == True) { - BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); - } -- if (raise == True) { -+ if (appResources.raise == True) { - XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); - } -- if (animate == True && mail_header != NULL) { -+ if (appResources.animate == True && mail_header != NULL) { - AnimateBiff(); - } - redraw_window(); - #ifdef SHAPE - shape_window(); - #endif -- if (popup == True) { -+ if (appResources.popup == True) { - if (mail_header != NULL) { - PopupMailHeader(mail_header); - -- if (popup_time) -+ if (appResources.popup_time) - XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), -- (unsigned long) popup_time, BreakPopup, NULL); -+ (unsigned long) appResources.popup_time, (XtTimerCallbackProc) BreakPopup, NULL); - } - } - XSync(XtDisplay(toplevel), 0); -- if (bell == True) { -- beep(XtDisplay(toplevel), 0); -+ if (appResources.bell == True) { -+ beep(XtDisplay(toplevel)); - } - } else if (mail_size < saved_mail_size){ - /* No mail */ -@@ -1934,10 +2007,10 @@ - #ifdef SHAPE - shape_window(); - #endif -- if (popup == True) { -+ if (appResources.popup == True) { - BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); - } -- if (raise == True && stay_raised == False) { -+ if (appResources.raise == True && appResources.stay_raised == False) { - XLowerWindow(XtDisplay(toplevel), XtWindow(toplevel)); - } - free(mail_header); -@@ -1974,7 +2047,7 @@ - if (header_count > 1 || *cp == '\0') break; - cp = strtok(NULL, "\n"); - } -- if (preserve == False) { -+ if (appResources.preserve == False) { - free(mail_header); - mail_header = NULL; - } -@@ -2024,16 +2097,16 @@ - if (current_status == ARRIVE) { - redraw_window(); - -- if (popup == True) { -+ if (appResources.popup == True) { - BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); - if (mail_header != NULL) { - PopupMailHeader(mail_header); - } -- if (popup_time) -+ if (appResources.popup_time) - XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), -- (unsigned long) popup_time, BreakPopup, NULL); -+ (unsigned long) appResources.popup_time, (XtTimerCallbackProc) BreakPopup, NULL); - } -- if (raise == True) { -+ if (appResources.raise == True) { - XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); - } - #ifdef SHAPE diff --git a/mail/xpbiff/files/patch-config.h b/mail/xpbiff/files/patch-config.h new file mode 100644 index 000000000000..085a89f05d2d --- /dev/null +++ b/mail/xpbiff/files/patch-config.h @@ -0,0 +1,115 @@ +--- config.h.orig Wed Oct 19 06:56:25 1994 ++++ config.h Fri Dec 12 13:16:55 2003 +@@ -8,7 +8,7 @@ + /* + * For X11R6 + */ +-#undef X11R6 ++#define X11R6 + + /* + * For System V +@@ -33,6 +33,12 @@ + #undef NO_CUSERID + + /* ++ * Your system has getpwuid() in library ++ */ ++ ++#define HAVE_GETPWUID ++ ++/* + * For MH scan users + */ + +@@ -42,12 +48,12 @@ + * For Shape Extension + */ + +-#undef SHAPE ++#define SHAPE + + /* + * Check Environment Variable MAIL for check file + */ +-#undef GETENV_MAIL ++#define GETENV_MAIL + + /* + * Set Local Spool pathname +@@ -57,30 +63,47 @@ + /* + * For X pixmap + */ +-#undef XPM +-#undef DepXpmLib /usr/local/lib/libXpm.a ++#define XPM ++ ++#ifdef XPM ++#ifdef __FreeBSD__ ++#undef DepXpmLib ++#else ++#define DepXpmLib /usr/local/lib/libXpm.a ++#endif /* __FreeBSD__ */ ++#endif /* XPM */ + + /* + * For using I18N Xaw + */ +-#undef XI18N +-/* If you use X11R6, these settings below are not necessary */ ++#ifndef XI18N ++#ifdef __FreeBSD__ ++#define XI18N ++#endif ++#endif ++ ++#ifdef XI18N ++#undef X11R5_Xsi /* define if X11R5 Xsi */ ++#endif ++ ++#ifdef X11R5_Xsi /* When X11R5 Xsi, define followings if you want */ + #undef DepXawLib /usr/local/lib/I18N/libXaw.a + #undef DepXwcharLib /usr/local/lib/I18N/libXwchar.a + #undef Xi18nLibDir -L/usr/local/lib/I18N \ + -L/usr/local/lib + #undef Xi18nIncDir -I/usr/local/X11/include ++#endif + + /* + * Convert JIS to Japanese EUC + */ +-#undef JCONVERT ++#define JCONVERT + #undef GUESS_JIS + + /* + * Process MIME header, charset=ISO-2022-JP, base 64 encoding + */ +-#undef ISO_2022_JP ++#define ISO_2022_JP + + /* + * For SUN Audio +@@ -88,9 +111,19 @@ + #undef SUN_AUDIO + #undef AudioIncDir /usr/demo/SOUND + ++/* ++ * For BSD Audio (FreeBSD) ++ */ ++#ifndef __alpha ++#define BSD_AUDIO ++#endif ++ + /* + * For YOUBIN Service + */ + #undef YOUBIN +-#undef YoubinBinDir /usr/local/bin +-#undef YOUBIN_DEFAULT_SERVER_HOST "server" ++ ++#ifdef YOUBIN ++#define YoubinBinDir %YOUBINBINDIR% ++#define YOUBIN_DEFAULT_SERVER_HOST "server" ++#endif /* YOUBIN */ diff --git a/mail/xpbiff/files/patch-xpbiff.c b/mail/xpbiff/files/patch-xpbiff.c new file mode 100644 index 000000000000..0d36d557df4f --- /dev/null +++ b/mail/xpbiff/files/patch-xpbiff.c @@ -0,0 +1,958 @@ +--- xpbiff.c.orig 1994-10-27 15:42:52.000000000 +0900 ++++ xpbiff.c 2010-11-17 14:40:26.457077878 +0900 +@@ -60,6 +60,7 @@ + + #include "config.h" + ++#include <paths.h> /* _PATH_MAILDIR */ + #include <X11/Intrinsic.h> + #include <X11/StringDefs.h> + #include <X11/Shell.h> +@@ -74,6 +75,12 @@ + #endif + #endif /* SUN_AUDIO */ + ++#ifdef BSD_AUDIO ++#include <sys/soundcard.h> ++#define MAX_SOUND_VOL 95 ++#define MIN_SOUND_VOL 05 ++#endif ++ + #ifndef X11R3 + #include <X11/Xaw/Box.h> + #include <X11/Xaw/Label.h> +@@ -116,7 +123,11 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <stdio.h> ++#include <stdlib.h> + #include <math.h> ++#ifdef HAVE_GETPWUID ++#include <pwd.h> ++#endif /* HAVE_GETPWUID */ + + #ifdef YOUBIN + +@@ -149,11 +160,7 @@ + + #ifndef YOUBIN + +-#ifdef USG +-#define SPOOLPATH "/usr/mail/" +-#else +-#define SPOOLPATH "/usr/spool/mail/" +-#endif ++#define SPOOLPATH _PATH_MAILDIR + + #else /* YOUBIN */ + +@@ -256,34 +263,11 @@ + */ + + GC gcArrive, gcNo, gcAnimate, gcAnimateBack; +-#ifdef XPM +-Pixmap arrivePixmaps[2], noPixmaps[2]; +-#define arrivePixmap arrivePixmaps[0] +-#define noPixmap noPixmaps[0] +-#else +-Pixmap arrivePixmap, noPixmap; +-#endif + Pixmap workPixmap; + int width, height; + unsigned char current_status = NO; + unsigned char showing_header = 0; + long mail_size = 0; +-#ifndef YOUBIN +-XtIntervalId polling_id; +-#endif +-Pixel colors[4]; +-#ifndef YOUBIN +-char spool_path[100]; +-int polling_time; +-#endif +-int popup_time; +- +-Boolean raise; +-Boolean stay_raised; +-Boolean animate; +-Boolean popup; +-Boolean bell; +-Boolean popdown; + + unsigned int Arrive_pixmap_width, Arrive_pixmap_height; + unsigned int Arrive_pixmap_depth; +@@ -291,24 +275,11 @@ + unsigned int No_pixmap_width, No_pixmap_height; + unsigned int No_pixmap_depth; + +-Boolean mono; +-String popupGeometry; +- +-#ifndef YOUBIN +-String prefers; +- +-String spoolPath; +-#endif +- +-#ifdef MHSCAN +-Boolean mhscan; +-String scanCommand; +-String scanCommandPath; +-#endif +- +-#ifdef SHAPE +-Boolean shape; +-Pixmap noPixmapMask, arrivePixmapMask; ++#ifdef YOUBIN ++XtIntervalId timeout_id; ++#else ++XtIntervalId polling_id; ++char spool_path[100]; + #endif + + static String fallback_resources[] = { +@@ -324,86 +295,125 @@ + NULL + }; + +-#ifdef SUN_AUDIO +-String mail_sndfile; +-int volume; ++typedef struct _appRes { ++#ifdef XPM ++ Pixmap arrivePixmaps[2]; ++ Pixmap noPixmaps[2]; ++#define arrivePixmap arrivePixmaps[0] ++#define noPixmap noPixmaps[0] ++#else ++ Pixmap arrivePixmap; ++ Pixmap noPixmap; + #endif +- ++ Pixel colors[4]; ++#ifndef YOUBIN ++ String prefers; ++ int polling_time; ++ String spoolPath; ++#endif ++ Boolean mono; ++ String popupGeometry; ++ Boolean raise; ++ Boolean stay_raised; ++ Boolean animate; ++ Boolean popup; ++ int popup_time; ++ Boolean bell; ++ Boolean popdown; + #ifdef YOUBIN +-Boolean use_pipe; +-String server; +-Boolean preserve; +-XtIntervalId timeout_id; ++ Boolean use_pipe; ++ String server; ++ Boolean preserve; ++#endif ++#ifdef MHSCAN ++ Boolean mhscan; ++ String scanCommand; ++ String scanCommandPath; + #endif ++#ifdef SHAPE ++ Boolean shape; ++ Pixmap arrivePixmapMask; ++ Pixmap noPixmapMask; ++#endif ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) ++ String mail_sndfile; ++ int volume; ++#endif ++} AppResourcesRec, *AppResources; ++ ++#define SetResOffset(n, field) resources[n].resource_offset = ((char *)&appResources.field - (char *)&appResources) ++#define offset(field) XtOffset(struct _appRes *, field) ++ ++AppResourcesRec appResources; + + static XtResource resources[] = { + {"arrivePixmap", "ArrivePixmap", RPixmap2, sizeof(Pixmap2), +- (Cardinal)&arrivePixmap, XtRString, "None"}, ++ offset(arrivePixmap), XtRString, "None"}, + {"nomailPixmap", "NomailPixmap", RPixmap2, sizeof(Pixmap2), +- (Cardinal)&noPixmap, XtRString, "None"}, ++ offset(noPixmap), XtRString, "None"}, + {"nomailForeground", "NomailForeground", XtRPixel, sizeof(Pixel), +- (Cardinal)&colors[0], XtRString, "black"}, ++ offset(colors[0]), XtRString, "black"}, + {"nomailBackground", "NomailBackground", XtRPixel, sizeof(Pixel), +- (Cardinal)&colors[1], XtRString, "cyan"}, ++ offset(colors[1]), XtRString, "cyan"}, + {"arriveForeground", "ArriveForeground", XtRPixel, sizeof(Pixel), +- (Cardinal)&colors[2], XtRString, "yellow"}, ++ offset(colors[2]), XtRString, "yellow"}, + {"arriveBackground", "ArriveBackground", XtRPixel, sizeof(Pixel), +- (Cardinal)&colors[3], XtRString, "red"}, ++ offset(colors[3]), XtRString, "red"}, + #ifndef YOUBIN + {"pollingTime", "PollingTime", XtRInt, sizeof(int), +- (Cardinal)&polling_time, XtRImmediate, (XtPointer)15000}, ++ offset(polling_time), XtRImmediate, (XtPointer)15000}, + {"prefer", "Prefer", XtRString, sizeof(String), +- (Cardinal)&prefers, XtRString, (XtPointer)"From Subject"}, ++ offset(prefers), XtRString, (XtPointer)"From Subject"}, + {"spoolPath", "SpoolPath", XtRString, sizeof(String), +- (Cardinal)&spoolPath, XtRString, None}, ++ offset(spoolPath), XtRString, None}, + #endif + {"mono", "Mono", XtRBoolean, sizeof(Boolean), +- (Cardinal)&mono, XtRImmediate, (XtPointer)False}, ++ offset(mono), XtRImmediate, (XtPointer)False}, + {"popupGeometry", "PopupGeometry", XtRString, sizeof(String), +- (Cardinal)&popupGeometry, XtRString, NULL}, ++ offset(popupGeometry), XtRString, NULL}, + {"raise", "Raise", XtRBoolean, sizeof(Boolean), +- (Cardinal)&raise, XtRImmediate, (XtPointer)True}, ++ offset(raise), XtRImmediate, (XtPointer)True}, + {"stayRaised", "StayRaised", XtRBoolean, sizeof(Boolean), +- (Cardinal)&stay_raised, XtRImmediate, (XtPointer)False}, ++ offset(stay_raised), XtRImmediate, (XtPointer)False}, + {"animate", "Animate", XtRBoolean, sizeof(Boolean), +- (Cardinal)&animate, XtRImmediate, (XtPointer)True}, ++ offset(animate), XtRImmediate, (XtPointer)True}, + {"popup", "Popup", XtRBoolean, sizeof(Boolean), +- (Cardinal)&popup, XtRImmediate, (XtPointer)True}, ++ offset(popup), XtRImmediate, (XtPointer)True}, + {"popupTime", "PopupTime", XtRInt, sizeof(int), +- (Cardinal)&popup_time, XtRImmediate, (XtPointer)15000}, ++ offset(popup_time), XtRImmediate, (XtPointer)15000}, + {"bell", "Bell", XtRBoolean, sizeof(Boolean), +- (Cardinal)&bell, XtRImmediate, (XtPointer)True}, ++ offset(bell), XtRImmediate, (XtPointer)True}, + {"popdown", "Popdown", XtRBoolean, sizeof(Boolean), +- (Cardinal)&popdown, XtRImmediate, (XtPointer)True}, ++ offset(popdown), XtRImmediate, (XtPointer)True}, + #ifdef YOUBIN + {"pipe", "Pipe", XtRBoolean, sizeof(Boolean), +- (Cardinal)&use_pipe, XtRString, "false"}, ++ offset(use_pipe), XtRString, "false"}, + {"server", "Server", XtRString, sizeof(String), +- (Cardinal)&server, XtRString, YOUBIN_DEFAULT_SERVER_HOST}, ++ offset(server), XtRString, YOUBIN_DEFAULT_SERVER_HOST}, + {"preserve", "preserve", XtRBoolean, sizeof(Boolean), +- (Cardinal)&preserve, XtRString, "true"}, ++ offset(preserve), XtRString, "true"}, + #endif + #ifdef MHSCAN + {"mhscan", "Mhscan", XtRBoolean, sizeof(Boolean), +- (Cardinal)&mhscan, XtRImmediate, (XtPointer)False}, ++ offset(mhscan), XtRImmediate, (XtPointer)False}, + {"scanCommand", "ScanCommand", XtRString, sizeof(String), +- (Cardinal)&scanCommand, XtRString, DEFAULT_SCAN_COMMAND}, ++ offset(scanCommand), XtRString, DEFAULT_SCAN_COMMAND}, + {"scanCommandPath", "ScanCommandPath", XtRString, sizeof(String), +- (Cardinal)&scanCommandPath, XtRString, DEFAULT_SCAN_COMMAND_PATH}, ++ offset(scanCommandPath), XtRString, DEFAULT_SCAN_COMMAND_PATH}, + #endif + #ifdef SHAPE + {"shape", "Shape", XtRBoolean, sizeof(Boolean), +- (Cardinal)&shape, XtRImmediate, (XtPointer)False}, ++ offset(shape), XtRImmediate, (XtPointer)False}, + {"arrivePixmapMask", "ArrivePixmapMask", XtRBitmap, sizeof(Pixmap), +- (Cardinal)&arrivePixmapMask, XtRBitmap, None}, ++ offset(arrivePixmapMask), XtRBitmap, None}, + {"nomailPixmapMask", "NomailPixmapMask", XtRBitmap, sizeof(Pixmap), +- (Cardinal)&noPixmapMask, XtRBitmap, None}, ++ offset(noPixmapMask), XtRBitmap, None}, + #endif +-#ifdef SUN_AUDIO ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) + {"mailSndFile", "MailSndFile", XtRString, sizeof(String), +- (Cardinal)&mail_sndfile, XtRString, None}, ++ offset(mail_sndfile), XtRString, None}, + {"volume", "Volume", XtRInt, sizeof(int), +- (Cardinal)&volume, XtRString, "33"}, ++ offset(volume), XtRString, "33"}, + #endif + }; + +@@ -445,7 +455,7 @@ + {"-server", "*server", XrmoptionSepArg, NULL}, + {"-preserve", "*preserve", XrmoptionNoArg, "true"}, + #endif /* YOUBIN */ +-#ifdef SUN_AUDIO ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) + {"-sndfile", "*mailSndFile", XrmoptionSepArg, NULL}, + {"-volume", "*volume", XrmoptionSepArg, NULL}, + #endif +@@ -461,6 +471,7 @@ + #ifdef JCONVERT + static Locale_ent locale_list[] = { + {"ja_JP.EUC", EUC}, ++ {"ja_JP.eucJP", EUC}, + {"ja_JP.SJIS", SJIS}, + {"ja_JP.jis7", JIS}, + {"ja_JP.jis8", JIS}, +@@ -485,9 +496,9 @@ + XGCValues values; + XtTranslations newTranslations; + static XtActionsRec redrawActions[] = { +- {"expose", (XtCallbackProc) redraw_callback}, +- {"select", (XtCallbackProc) popup_again}, +- {"quit", (XtCallbackProc) quit}, ++ {"expose", (XtActionProc) redraw_callback}, ++ {"select", (XtActionProc) popup_again}, ++ {"quit", (XtActionProc) quit}, + }; + + static char *overrideTranslations = +@@ -498,6 +509,9 @@ + int dummy; + int i; + ++#ifdef HAVE_GETPWUID ++ struct passwd *pw; ++#endif + #ifdef JCONVERT + char *locale_name; + Locale_ent *p; +@@ -514,28 +528,40 @@ + #endif /* !YOUBIN */ + + #ifdef YOUBIN +- if ((prog_name = strrchr(argv[0], '/')) != NULL) { +- prog_name++; +- } else { +- prog_name = argv[0]; +- } ++ if ((prog_name = strrchr(argv[0], '/')) != NULL) { ++ prog_name++; ++ } else { ++ prog_name = argv[0]; ++ } + #else /* !YOUBIN */ +- if (spoolPath != NULL && spoolPath[0] != '\0') +- strcpy(spool_path, spoolPath); +- else ++ if (appResources.spoolPath != NULL && appResources.spoolPath[0] != '\0') { ++ strcpy(spool_path, appResources.spoolPath); ++ } else { + strcpy(spool_path, SPOOLPATH); +- if (spool_path[strlen(spool_path) - 1] != '/') ++ } ++ if (spool_path[strlen(spool_path) - 1] != '/') { + strcat(spool_path, "/"); ++ } ++ + #ifdef GETENV_MAIL +- if (getenv("MAIL") != NULL) ++ if (getenv("MAIL") != NULL) { + strcpy(spool_path, getenv("MAIL")); +- else +-#endif +-#ifndef NO_CUSERID +- strcat(spool_path, cuserid(NULL)); +-#else ++ } else { ++#endif /* GETENV_MAIL */ ++ ++#ifdef HAVE_GETPWUID ++ pw = getpwuid(getuid()); ++ strcat(spool_path, pw->pw_name); ++#elif defined(NO_CUSERID) + strcat(spool_path, getenv("USER")); +-#endif ++#else ++ strcat(spool_path, (char *)cuserid(NULL)); ++#endif /* NO_CUSERID && HAVE_GETPWUID */ ++ ++#ifdef GETENV_MAIL ++ } ++#endif /* GETENV_MAIL */ ++ + #endif /* !YOUBIN */ + + #ifdef XI18N +@@ -646,7 +672,7 @@ + fprintf(stderr, " [-server host]\n"); + fprintf(stderr, " [-nopreserve]\n"); + #endif +-#ifdef SUN_AUDIO ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) + fprintf(stderr, " [-sndfile audio_file]\n"); + fprintf(stderr, " [-volume percentage]\n"); + #endif +@@ -659,33 +685,33 @@ + convertArgs, XtNumber(convertArgs)); + #endif + +- XtGetApplicationResources(toplevel, (caddr_t) NULL, ++ XtGetApplicationResources(toplevel, (XtPointer)&appResources, + resources, XtNumber(resources), NULL, 0); + +- if (mono == True) { +- colors[0] = colors[3] = BlackPixelOfScreen(XtScreen(toplevel)); +- colors[1] = colors[2] = WhitePixelOfScreen(XtScreen(toplevel)); ++ if (appResources.mono == True) { ++ appResources.colors[0] = appResources.colors[3] = BlackPixelOfScreen(XtScreen(toplevel)); ++ appResources.colors[1] = appResources.colors[2] = WhitePixelOfScreen(XtScreen(toplevel)); + } + + #ifndef YOUBIN +- split_prefer(prefers); ++ split_prefer(appResources.prefers); + #endif + + #ifdef XPM +- if (arrivePixmapMask == None) +- arrivePixmapMask = arrivePixmaps[1]; +- if (noPixmapMask == None) +- noPixmapMask = noPixmaps[1]; ++ if (appResources.arrivePixmapMask == None) ++ appResources.arrivePixmapMask = appResources.arrivePixmaps[1]; ++ if (appResources.noPixmapMask == None) ++ appResources.noPixmapMask = appResources.noPixmaps[1]; + #endif + + #ifdef SHAPE +- if (shape == True ++ if (appResources.shape == True + && !XShapeQueryExtension(XtDisplay(toplevel), &dummy, &dummy)) +- shape = False; ++ appResources.shape = False; + #endif + +- if (noPixmap == None) { +- noPixmap = XCreatePixmapFromBitmapData ++ if (appResources.noPixmap == None) { ++ appResources.noPixmap = XCreatePixmapFromBitmapData + (XtDisplay(toplevel), RootWindowOfScreen(XtScreen(toplevel)), + no_bits, no_width, no_height, 1, 0, 1); + No_pixmap_width = no_width; +@@ -695,14 +721,14 @@ + else { + Window r; + unsigned int x, y, bw; +- XGetGeometry(XtDisplay(toplevel), noPixmap, ++ XGetGeometry(XtDisplay(toplevel), appResources.noPixmap, + &r, &x, &y, + &No_pixmap_width, &No_pixmap_height, + &bw, &No_pixmap_depth); + } + +- if (arrivePixmap == None) { +- arrivePixmap = XCreatePixmapFromBitmapData ++ if (appResources.arrivePixmap == None) { ++ appResources.arrivePixmap = XCreatePixmapFromBitmapData + (XtDisplay(toplevel), RootWindowOfScreen(XtScreen(toplevel)), + arrive_bits, arrive_width, arrive_height, + 1, 0, 1); +@@ -713,7 +739,7 @@ + else { + Window r; + unsigned int x, y, bw; +- XGetGeometry(XtDisplay(toplevel), arrivePixmap, ++ XGetGeometry(XtDisplay(toplevel), appResources.arrivePixmap, + &r, &x, &y, + &Arrive_pixmap_width, &Arrive_pixmap_height, + &bw, &Arrive_pixmap_depth); +@@ -741,14 +767,14 @@ + + /* Get graphic context */ + +- values.foreground = colors[0]; +- values.background = colors[1]; ++ values.foreground = appResources.colors[0]; ++ values.background = appResources.colors[1]; + values.graphics_exposures = False; + gcNo = XtGetGC(toplevel, + GCForeground | GCBackground | GCGraphicsExposures, + &values); +- values.foreground = colors[2]; +- values.background = colors[3]; ++ values.foreground = appResources.colors[2]; ++ values.background = appResources.colors[3]; + values.graphics_exposures = False; + gcArrive = XtGetGC(toplevel, + GCForeground | GCBackground | GCGraphicsExposures, +@@ -760,13 +786,13 @@ + Arrive_pixmap_width, Arrive_pixmap_height, + DefaultDepthOfScreen(XtScreen(toplevel))); + +- values.foreground = colors[2]; ++ values.foreground = appResources.colors[2]; + values.graphics_exposures = False; + gcAnimate = XtGetGC(toplevel, + GCForeground | GCGraphicsExposures, + &values); + +- values.foreground = colors[3]; ++ values.foreground = appResources.colors[3]; + values.graphics_exposures = False; + gcAnimateBack = XtGetGC(toplevel, + GCForeground | GCGraphicsExposures, +@@ -775,11 +801,11 @@ + /* Interval timer start */ + #ifndef YOUBIN + polling_id = XtAppAddTimeOut(app_con, +- (unsigned long) polling_time, Polling, NULL); ++ (unsigned long) appResources.polling_time, (XtTimerCallbackProc) Polling, NULL); + #else /* YOUBIN */ +- if (server == NULL) { ++ if (appResources.server == NULL) { + gethostname(serv_name, sizeof(serv_name)); +- server = serv_name; ++ appResources.server = serv_name; + } + + /* make new process group */ +@@ -789,9 +815,9 @@ + exit(EXIT_FAILURE); + } + +- if (use_pipe == False) { ++ if (appResources.use_pipe == False) { + sprintf(child_process, "%s/%s -b -s %s", +- BINDIR, CHILD_PROGRAM_NAME, server); ++ BINDIR, CHILD_PROGRAM_NAME, appResources.server); + if ((pfile = popen(child_process, "r")) == NULL) { + perror("popen"); + exit(EXIT_FAILURE); +@@ -831,21 +857,21 @@ + { + if (current_status == ARRIVE) { + if (Arrive_pixmap_depth == 1) +- XCopyPlane(XtDisplay(toplevel), arrivePixmap, XtWindow(biff), ++ XCopyPlane(XtDisplay(toplevel), appResources.arrivePixmap, XtWindow(biff), + gcArrive, + 0, 0, Arrive_pixmap_width, Arrive_pixmap_height, 0, 0, 1); + else +- XCopyArea(XtDisplay(toplevel), arrivePixmap, XtWindow(biff), ++ XCopyArea(XtDisplay(toplevel), appResources.arrivePixmap, XtWindow(biff), + gcArrive, + 0, 0, Arrive_pixmap_width, Arrive_pixmap_height, 0, 0); + } + else { + if (No_pixmap_depth == 1) +- XCopyPlane(XtDisplay(toplevel), noPixmap, XtWindow(biff), ++ XCopyPlane(XtDisplay(toplevel), appResources.noPixmap, XtWindow(biff), + gcNo, + 0, 0, No_pixmap_width, No_pixmap_height, 0, 0, 1); + else +- XCopyArea(XtDisplay(toplevel), noPixmap, XtWindow(biff), ++ XCopyArea(XtDisplay(toplevel), appResources.noPixmap, XtWindow(biff), + gcNo, 0, 0, No_pixmap_width, No_pixmap_height, 0, 0); + } + } +@@ -853,9 +879,9 @@ + #ifdef SHAPE + void shape_window() + { +- if (shape == True) { ++ if (appResources.shape == True) { + if (current_status == ARRIVE) { +- if (arrivePixmapMask == None) { ++ if (appResources.arrivePixmapMask == None) { + XRectangle rect; + rect.x = rect.y = 0; + rect.width = Arrive_pixmap_width; +@@ -866,11 +892,11 @@ + } + else + XShapeCombineMask(XtDisplay(toplevel), XtWindow(toplevel), +- ShapeBounding, 0, 0, arrivePixmapMask, ++ ShapeBounding, 0, 0, appResources.arrivePixmapMask, + ShapeSet); + } + else { +- if (noPixmapMask == None) { ++ if (appResources.noPixmapMask == None) { + XRectangle rect; + rect.x = rect.y = 0; + rect.width = No_pixmap_width; +@@ -881,7 +907,7 @@ + } + else + XShapeCombineMask(XtDisplay(toplevel), XtWindow(toplevel), +- ShapeBounding, 0, 0, noPixmapMask, ++ ShapeBounding, 0, 0, appResources.noPixmapMask, + ShapeSet); + } + } +@@ -915,53 +941,54 @@ + /* NEW mail !! */ + current_status = ARRIVE; + mail_size = file_stat.st_size; +- if (popup == True) ++ if (appResources.popup == True) + mail_header = GetMailHeader(); + XtResizeWidget(toplevel, Arrive_pixmap_width, Arrive_pixmap_height, 1); + XtResizeWidget(biff, Arrive_pixmap_width, Arrive_pixmap_height, 0); +- if (raise == True) ++ if (appResources.raise == True) + XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); +- if (animate == True) ++ if (appResources.animate == True) + AnimateBiff(); + redraw_window(); + #ifdef SHAPE + shape_window(); + #endif +- if (popup == True) ++ if (appResources.popup == True) + PopupMailHeader(mail_header); + XSync(XtDisplay(toplevel), 0); +- if (bell == True) +- beep(XtDisplay(toplevel), 0); ++ if (appResources.bell == True) ++ beep(XtDisplay(toplevel)); + /* XBell(XtDisplay(toplevel), 0); */ + } + else if (file_stat.st_size > mail_size) { + mail_size = file_stat.st_size; +- if (popup == True) ++ if (appResources.popup == True) + mail_header = GetMailHeader(); + /* more come! only ringing bell. */ +- if (popup == True) ++ if (appResources.popup == True) + BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); + XtResizeWidget(toplevel, Arrive_pixmap_width, Arrive_pixmap_height, 1); + XtResizeWidget(biff, Arrive_pixmap_width, Arrive_pixmap_height, 0); +- if (raise == True) ++ if (appResources.raise == True) + XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); +- if (animate == True) ++ if (appResources.animate == True) + AnimateBiff(); + redraw_window(); + #ifdef SHAPE + shape_window(); + #endif +- if (popup == True) ++ if (appResources.popup == True) + PopupMailHeader(mail_header); + XSync(XtDisplay(toplevel), 0); +- if (bell == True) +- XBell(XtDisplay(toplevel), 0); ++ if (appResources.bell == True) ++ beep(XtDisplay(toplevel)); ++ /* XBell(XtDisplay(toplevel), 0); */ + } + else { + mail_size = file_stat.st_size; +- if (raise == True && stay_raised == False) ++ if (appResources.raise == True && appResources.stay_raised == False) + XLowerWindow(XtDisplay(toplevel), XtWindow(toplevel)); +- if (popup == True) ++ if (appResources.popup == True) + BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); + } + } else +@@ -974,15 +1001,15 @@ + #ifdef SHAPE + shape_window(); + #endif +- if (raise == True && stay_raised == False) ++ if (appResources.raise == True && appResources.stay_raised == False) + XLowerWindow(XtDisplay(toplevel), XtWindow(toplevel)); +- if (popup == True) ++ if (appResources.popup == True) + BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); + } + /* No arrive */ + + polling_id = XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) polling_time, Polling, NULL); ++ (unsigned long) appResources.polling_time, (XtTimerCallbackProc) Polling, NULL); + + } + #endif /* !YOUBIN */ +@@ -995,7 +1022,7 @@ + double r, angle, t1, t2, t3, t4; + + #ifdef SHAPE +- if(shape == True) { ++ if(appResources.shape == True) { + XRectangle rect; + rect.x = rect.y = 0; + rect.width = Arrive_pixmap_width; +@@ -1038,9 +1065,9 @@ + + /* Create Popup Shell */ + +- if (popupGeometry != NULL) { ++ if (appResources.popupGeometry != NULL) { + arg_count = 0; +- XtSetArg(args[arg_count], XtNgeometry, popupGeometry); ++ XtSetArg(args[arg_count], XtNgeometry, appResources.popupGeometry); + arg_count++; + } + else { +@@ -1068,10 +1095,10 @@ + info_base = XtCreateManagedWidget("info_base", boxWidgetClass, header, args, + arg_count); + +- if (popdown == True) { ++ if (appResources.popdown == True) { + popdown_button = XtCreateManagedWidget("popdown_button", commandWidgetClass, info_base, NULL, + ZERO); +- XtAddCallback(popdown_button, XtNcallback, BreakPopup, (XtPointer) NULL); ++ XtAddCallback(popdown_button, XtNcallback, (XtCallbackProc) BreakPopup, (XtPointer) NULL); + } + arg_count = 0; + XtSetArg(args[arg_count], XtNlabel, head); +@@ -1131,37 +1158,38 @@ + /* the click catchs new mail */ + current_status = ARRIVE; + mail_size = file_stat.st_size; +- if (popup == True) ++ if (appResources.popup == True) + mail_header = GetMailHeader(); + XtResizeWidget(toplevel, Arrive_pixmap_width, Arrive_pixmap_height, 1); + XtResizeWidget(biff, Arrive_pixmap_width, Arrive_pixmap_height, 0); +- if (raise == True) ++ if (appResources.raise == True) + XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); +- if (animate == True) ++ if (appResources.animate == True) + AnimateBiff(); + redraw_window(); + #ifdef SHAPE + shape_window(); + #endif +- if (popup == True) ++ if (appResources.popup == True) + PopupMailHeader(mail_header); + XSync(XtDisplay(toplevel), 0); +- if (bell == True) +- XBell(XtDisplay(toplevel), 0); ++ if (appResources.bell == True) ++ beep(XtDisplay(toplevel)); ++ /* XBell(XtDisplay(toplevel), 0); */ + } + else { + mail_size = file_stat.st_size; +- if (popup == True) ++ if (appResources.popup == True) + mail_header = GetMailHeader(); +- if (popup == True && showing_header) ++ if (appResources.popup == True && showing_header) + BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); +- if (raise == True) ++ if (appResources.raise == True) + XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); + redraw_window(); + #ifdef SHAPE + shape_window(); + #endif +- if (popup == True) ++ if (appResources.popup == True) + PopupMailHeader(mail_header); + XSync(XtDisplay(toplevel), 0); + } +@@ -1169,7 +1197,7 @@ + + XtRemoveTimeOut(polling_id); + polling_id = XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) polling_time, Polling, NULL); ++ (unsigned long) appResources.polling_time, (XtTimerCallbackProc) Polling, NULL); + } + #endif /* !YOUBIN */ + +@@ -1749,14 +1777,23 @@ + static void beep (display) + Display *display; + { +-#ifdef SUN_AUDIO ++#if defined(SUN_AUDIO) || defined(BSD_AUDIO) + int audiofd, filefd; +- int rn, wn, len; ++ int rn; ++#ifdef SUN_AUDIO ++ int wn, len; + unsigned char buf[256]; + Audio_filehdr *au_hdr; + audio_info_t ais; +- +- if (mail_sndfile) { ++#elif defined(BSD_AUDIO) ++ int mixerfd, mixerid, supported; ++ static int bsize; ++ static char *buf; ++ struct stat sbuf; ++ int level, level_tmp; ++#endif ++ ++ if (appResources.mail_sndfile) { + audiofd = open( "/dev/audio", O_WRONLY | O_NDELAY ); + if (audiofd < 0) + { +@@ -1766,6 +1803,7 @@ + return; + } + ++#ifdef SUN_AUDIO + if( ioctl( audiofd, AUDIO_GETINFO, &ais ) ) + { + fprintf(stderr, "%s: Problem retrieving /dev/audio info.\n", +@@ -1782,15 +1820,34 @@ + return; + } + +- filefd = open(mail_sndfile, O_RDONLY); ++#elif defined(BSD_AUDIO) ++ /* Open the mixer device */ ++ mixerfd = open ("/dev/mixer", O_RDWR, 0); ++ if (mixerfd > 0) ++ { ++ if (appResources.volume > MAX_SOUND_VOL) ++ appResources.volume = MAX_SOUND_VOL; ++ else if (appResources.volume < MIN_SOUND_VOL) ++ appResources.volume = MIN_SOUND_VOL; ++ mixerid = SOUND_MIXER_PCM; ++ /* storing volume level */ ++ ioctl(mixerfd,MIXER_READ(mixerid),&level_tmp); ++ ++ level = (appResources.volume << 8) | appResources.volume; ++ ioctl(mixerfd,MIXER_WRITE(mixerid),&level); ++ } ++#endif ++ ++ filefd = open(appResources.mail_sndfile, O_RDONLY); + if (filefd < 0) + { + fprintf(stderr, "%s: Couldn't play file \"%s\"\n", +- "Mailbox widget", mail_sndfile); ++ "Mailbox widget", appResources.mail_sndfile); + close(audiofd); + return; + } + ++#ifdef SUN_AUDIO + /* Read in the audio header */ + rn = read(filefd, buf, sizeof(Audio_filehdr)); + +@@ -1841,12 +1898,28 @@ + usleep(1000); + } + } +- close(audiofd); ++#elif defined(BSD_AUDIO) ++ ioctl(audiofd, SNDCTL_DSP_RESET, 0); ++ fstat(filefd, &sbuf); ++ bsize = sbuf.st_size; ++ buf = malloc((u_int)bsize); ++ if ( (rn = read(filefd, buf, bsize)) > 0) ++ write(audiofd, buf, rn); ++ ioctl(audiofd, SNDCTL_DSP_SYNC, 0); ++ free(buf); ++ if (mixerfd > 0) ++ { ++ /* restoring volume level */ ++ ioctl(mixerfd,MIXER_WRITE(mixerid),&level_tmp); ++ close(mixerfd); ++ } ++#endif ++ close(audiofd); + close(filefd); + } + else +- XBell (display, volume); +-#else /* !SUN_AUDIO */ ++ XBell (display, 0); ++#else /* !SUN_AUDIO && !BSD_AUDIO */ + XBell (display, 0); + #endif /* SUN_AUDIO */ + return; +@@ -1888,7 +1961,7 @@ + + if (mail_size > saved_mail_size) { + /* NEW mail */ +- if (popup == True || *cp == ' ') { ++ if (appResources.popup == True || *cp == ' ') { + date = strtol(cp, &cp2, 10); + if (*cp2 == '\0' || isspace(*cp2)) { + get_mail_header((*cp2 == '\0') ? NULL : (cp2 + 1)); +@@ -1898,31 +1971,31 @@ + current_status = ARRIVE; + XtResizeWidget(toplevel, Arrive_pixmap_width, Arrive_pixmap_height, 1); + XtResizeWidget(biff, Arrive_pixmap_width, Arrive_pixmap_height, 0); +- if (popup == True) { ++ if (appResources.popup == True) { + BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); + } +- if (raise == True) { ++ if (appResources.raise == True) { + XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); + } +- if (animate == True && mail_header != NULL) { ++ if (appResources.animate == True && mail_header != NULL) { + AnimateBiff(); + } + redraw_window(); + #ifdef SHAPE + shape_window(); + #endif +- if (popup == True) { ++ if (appResources.popup == True) { + if (mail_header != NULL) { + PopupMailHeader(mail_header); + +- if (popup_time) ++ if (appResources.popup_time) + XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) popup_time, BreakPopup, NULL); ++ (unsigned long) appResources.popup_time, (XtTimerCallbackProc) BreakPopup, NULL); + } + } + XSync(XtDisplay(toplevel), 0); +- if (bell == True) { +- beep(XtDisplay(toplevel), 0); ++ if (appResources.bell == True) { ++ beep(XtDisplay(toplevel)); + } + } else if (mail_size < saved_mail_size){ + /* No mail */ +@@ -1934,10 +2007,10 @@ + #ifdef SHAPE + shape_window(); + #endif +- if (popup == True) { ++ if (appResources.popup == True) { + BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); + } +- if (raise == True && stay_raised == False) { ++ if (appResources.raise == True && appResources.stay_raised == False) { + XLowerWindow(XtDisplay(toplevel), XtWindow(toplevel)); + } + free(mail_header); +@@ -1974,7 +2047,7 @@ + if (header_count > 1 || *cp == '\0') break; + cp = strtok(NULL, "\n"); + } +- if (preserve == False) { ++ if (appResources.preserve == False) { + free(mail_header); + mail_header = NULL; + } +@@ -2024,16 +2097,16 @@ + if (current_status == ARRIVE) { + redraw_window(); + +- if (popup == True) { ++ if (appResources.popup == True) { + BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL); + if (mail_header != NULL) { + PopupMailHeader(mail_header); + } +- if (popup_time) ++ if (appResources.popup_time) + XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) popup_time, BreakPopup, NULL); ++ (unsigned long) appResources.popup_time, (XtTimerCallbackProc) BreakPopup, NULL); + } +- if (raise == True) { ++ if (appResources.raise == True) { + XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); + } + #ifdef SHAPE -- cgit v1.2.3