upgrade to 2.1

PR:		43715
Submitted by:	Stephen J. Roznowski <sjr@comcast.net>
This commit is contained in:
Ying-Chieh Liao 2003-01-03 06:45:31 +00:00
parent bf71c68ccb
commit 24b1d2fd36
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=72350
10 changed files with 95 additions and 373 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= tkrat
PORTVERSION= 2.0.3
PORTVERSION= 2.1
CATEGORIES= mail tk83
MASTER_SITES= ftp://ftp.md.chalmers.se/pub/tkrat/ \
ftp://ftp.sunet.se/pub/unix/mail/tkrat/ \
@ -25,7 +25,6 @@ CONFIGURE_ARGS= --with-tcl-config=${PREFIX}/lib/tcl8.3 \
--with-tcl-include=${PREFIX}/include/tcl8.3 \
--with-tk-include=${PREFIX}/include/tk8.3
MAKE_ARGS+= -j2 -B
EXTRACT_AFTER_ARGS=| ${TAR} -xf - --exclude '*/imap/*'
DOCFILES= CONFIGURATION COPYRIGHT README doc/interface doc/userprocs \
doc/userproc.example

View File

@ -1 +1 @@
MD5 (tkrat-2.0.3.tar.gz) = 484f46b21af62705cb8948c821c8bfdb
MD5 (tkrat-2.1.tar.gz) = b843c6e1c482739986548fb9c5268660

View File

@ -1,11 +0,0 @@
--- configure.orig Fri Nov 3 02:48:38 2000
+++ configure Tue Dec 5 21:08:05 2000
@@ -1953,7 +1953,7 @@
for i in $tcl_dirs ; do
tcl_include_dirs="$tcl_include_dirs $i/include"
done
-tcl_include_dirs="$tcl_with_include $tcl_include_dirs /usr/include/tcl /usr/include"
+tcl_include_dirs="$tcl_with_include $tcl_include_dirs /usr/local/include/tcl8.3 /usr/local/include/tk8.3 /usr/include/tcl /usr/include"
tcl_dir=0
for i in $tcl_include_dirs ; do
if test -r $i/tcl.h ; then

View File

@ -1,140 +0,0 @@
This fairly intrusive patch fixes handling of the charsets, which are
not explicitly known to the TkRat, but whose TCL encoding is the same
as the charset (like koi8-u or koi8-r).
Such charsets can be added explicitly to the user's
~/.ratatosk/ratatoskrc
The patch also considers the charset of the original message when replying,
instead of just ignoring it.
The patch was submitted to the developer and may be included when the next
version comes out.
-mi
--- tkrat/compose.tcl Tue Feb 13 00:59:37 2001
+++ tkrat/compose.tcl Tue Jun 26 14:29:18 2001
@@ -49,4 +49,10 @@
}
set handler [$msg reply $to]
+ global $handler
+ set charset [[$msg body] parameter charset]
+ if {"" == $charset} {
+ set charset auto ;# or US-ASCII?
+ }
+ array set $handler [list charset $charset]
return [DoCompose $handler \
[expr {($option(reply_bottom)) ? "1" : "-1"}] \
@@ -377,6 +378,4 @@
proc ComposeExtracted {mgh} {
- global charsetMapping
-
upvar #0 $mgh mh
if [info exists mh(body)] {
@@ -411,15 +410,10 @@
if [info exists p(charset)] {
set charset $p(charset)
- } else {
- if [info exists mh(charset)] {
- set charset $mh(charset)
- } else {
- set charset auto
- }
+ } elseif [info exists mh(charset)] {
+ set charset $mh(charset)
+ } else {
+ set charset [encoding system]
}
- if {"auto" == $charset} {
- set charset utf-8
- }
- fconfigure $fh -encoding $charsetMapping($charset)
+ ConfigureEncoding $fh [SaneCharset $charset]
set mh(data) [read $fh]
close $fh
@@ -1024,4 +1017,31 @@
}
+# Cache the known charsets for subsequent SaneCharset invocations:
+set KnownCharsets [encoding names]
+
+proc SaneCharset args {
+ global charsetMapping KnownCharsets
+ foreach charset $args {
+ if {[info exists charsetMapping($charset)]} {
+ set charset $charsetMapping($charset)
+ }
+ if {[lsearch -exact $KnownCharsets $charset] != -1} {
+ return $charset
+ }
+ }
+ # XXX what else?
+ return _binary
+}
+
+# If we were unable to figure out the encoding for some reason,
+# output the file without translations and hope for the best:
+proc ConfigureEncoding {fh encoding} {
+ if {"_binary" == $encoding} {
+ fconfigure $fh -translation binary
+ } else {
+ fconfigure $fh -encoding $encoding
+ }
+}
+
# ComposeBuildStruct --
#
@@ -1066,5 +1092,5 @@
if {0 != [RatDialog $mh(toplevel) $t(warning) $t(bad_charset) {} 0 \
$t(continue) $t(abort)]} {
- return
+ return -1
}
set charset $fallback
@@ -1074,10 +1096,9 @@
lappend bh(parameter) [list charset $charset]
}
- } else {
- if {"auto" == $charset} {
- set charset utf-8
- }
}
- fconfigure $fh -encoding $charsetMapping($charset)
+
+ set mh(charset) [set charset [SaneCharset $charset]]
+ ConfigureEncoding $fh $charset
+
puts -nonewline $fh $bodydata
close $fh
@@ -1172,8 +1193,12 @@
# Write data, change text visible and edit
set ecmd [lindex $editor($e) 0]
- set charset $charsetMapping([lindex $editor($e) 1])
+ # If the charset preferred by the editor is not known, try the one
+ # used by the message itself -- so we get what was written already
+ # unmodified. It should be possible to specify _a list_ of charsets
+ # the editor can handle. XXX
+ set charset [SaneCharset [lindex $editor($e) 1] $mh(charset)]
set fname $option(tmp)/rat.[RatGenId]
set fh [open $fname w 0600]
- fconfigure $fh -encoding $charset
+ ConfigureEncoding $fh $charset
puts -nonewline $fh [$mh(composeBody) get 0.0 end]
close $fh
@@ -1195,5 +1220,6 @@
$mh(composeBody) delete 0.0 end
set fh [open $fname r]
- fconfigure $fh -encoding $charset
+ # The charset is already sanitized by ComposeEEdit
+ ConfigureEncoding $fh $charset
while { -1 != [gets $fh line]} {
$mh(composeBody) insert end "$line\n"
@@ -2605,5 +2631,5 @@
}
set editor($t(external_editor)) \
- [list $option(editor) $charset]
+ [list $option(editor) [SaneCharset $charset]]
}
if ![info exists option(eeditor)] {

View File

@ -1,33 +0,0 @@
Add the ability to paste an entire message to clipboard -- raw,
without any decodings...
-mi
--- tkrat/folder.tcl Mon Feb 12 11:41:02 2001
+++ tkrat/folder.tcl Mon May 14 20:13:21 2001
@@ -165,2 +165,7 @@
menu $m.move -postcommand "PostMove $handler current $m.move"
+ $m add command -label $t(copy_all) \
+ -command "CopyToClipboard $handler"
+ set fh(copy_menu) [list $m [$m index end]]
+ lappend fh(menu_nokeep) [list $m [$m index end]]
+ set b($m,[$m index end]) copy
$m add command -label $t(delete) \
@@ -2082,2 +2088,17 @@
}
+}
+
+proc CopyToClipboard handler {
+ set msg [GetMsgSet $handler current]
+ selection clear
+ selection own .
+ selection handle . "DoPasting $msg"
+}
+
+proc DoPasting {msg offset maxChars} {
+ if {[catch {$msg rawText} rawText]} {
+ return ""
+ }
+ regsub -all \r\n $rawText \n rawText
+ return [string range $rawText $offset [expr $offset+$maxChars]]
}

View File

@ -1,79 +0,0 @@
This file contains the sequences of patches that make TkRat use the
standard c-client library from instead of building and using it own
version (based on the now ancient version).
This involved some Makefile hackery, but most importantly, teaching the
code in ratStdMessage.c to not look for the ``optional'' parts of the
ENVELOPE structure, but take the type and subtype of the message from
the BODY directly.
This changes allow to use the latest versions of the _standard_ UW-UMAP
(and they now have goodies like SSL support) and save some space and
invocation time by using the shared lib.
-mi
--- Makefile.in Fri May 12 16:17:06 2000
+++ Makefile.in Sun Apr 8 15:56:19 2001
@@ -19,8 +19,2 @@
build:
- -cd imap; \
- if test "`cat OSTYPE 2>/dev/null`" = "${OSTYPE}" ; then \
- ${MAKE} EXTRACFLAGS="${EXTRACFLAGS}"; \
- else \
- ${MAKE} ${OSTYPE} EXTRACFLAGS="${EXTRACFLAGS}"; \
- fi
cd lib; ${MAKE}
@@ -43,3 +37,2 @@
clean:
- cd imap; ${MAKE} clean
cd lib; ${MAKE} clean
--- lib/Makefile.in Mon May 1 16:31:01 2000
+++ lib/Makefile.in Sun Apr 8 16:01:07 2001
@@ -30,3 +30,3 @@
# Pointer to the imap c-client directory
- C_CLIENT = ${TOP_DIR}/imap/c-client
+ C_CLIENT = ${prefix}/include/c-client
@@ -65,3 +65,3 @@
${SHLIB_CFLAGS} -DVERSION=\"${VERSION}\"
-C_CLIENT_LIB = ${C_CLIENT}/c-client.a
+C_CLIENT_LIB = -L${prefix}/lib -lc-client4
RATLIB = ratatosk${RATLIB_SUFFIX}
@@ -81,3 +81,3 @@
-${RATLIB}: ${OBJ} ${C_CLIENT_LIB}
+${RATLIB}: ${OBJ}
${SHLIB_LD} -o ${RATLIB} ${OBJ} ${C_CLIENT_LIB} $(EXTRA_LIBS) ${SHLIB_LD_LIBS}
--- lib/ratDisFolder.c Fri Jan 12 11:23:20 2001
+++ lib/ratDisFolder.c Sun Apr 8 16:26:44 2001
@@ -40,1 +40,0 @@
-#include "mbx.h"
--- lib/ratStdMessage.c Tue Dec 26 05:27:42 2000
+++ lib/ratStdMessage.c Sun Apr 8 17:44:07 2001
@@ -584,18 +584,10 @@
case RAT_FOLDER_TYPE:
- if (stdMsgPtr->envPtr->optional.subtype) {
- oPtr = Tcl_NewStringObj(
- body_types[stdMsgPtr->envPtr->optional.type], -1);
- Tcl_AppendStringsToObj(oPtr, "/",
- stdMsgPtr->envPtr->optional.subtype,
- NULL);
- } else {
- if (!stdMsgPtr->bodyPtr) {
- stdMsgPtr->envPtr = mail_fetchstructure_full(
- stdMsgPtr->stream, msgPtr->msgNo+1,
- &stdMsgPtr->bodyPtr, NIL);
- }
- oPtr =Tcl_NewStringObj(body_types[stdMsgPtr->bodyPtr->type],-1);
- Tcl_AppendStringsToObj(oPtr, "/",
- stdMsgPtr->bodyPtr->subtype, NULL);
+ if (!stdMsgPtr->bodyPtr) {
+ stdMsgPtr->envPtr = mail_fetchstructure_full(
+ stdMsgPtr->stream, msgPtr->msgNo+1,
+ &stdMsgPtr->bodyPtr, NIL);
}
+ oPtr = Tcl_NewStringObj(body_types[stdMsgPtr->bodyPtr->type], -1);
+ Tcl_AppendStringsToObj(oPtr, "/", stdMsgPtr->bodyPtr->subtype,
+ NULL);
break;

View File

@ -1,16 +0,0 @@
This file fixes the pkgIndex.tcl generating code. If the pkgIndex.tcl
is generated properly, the bug is never triggered, which is why this
went unnoticed for so long. But there is no ``outs'' command in Tcl --
this resulted in a double error, and you were not be able to see why
the pkgIndex generation failed.
-mi
--- util/Makefile.in Mon May 1 16:31:01 2000
+++ util/Makefile.in Sun Apr 8 17:17:12 2001
@@ -91 +91 @@
- {outs \$$error; exit 1}" | ${TCLSH}
+ {puts \$$error; exit 1}" | ${TCLSH}
@@ -122 +122 @@
- {outs \$$error; exit 1}" | ${TCLSH}
+ {puts \$$error; exit 1}" | ${TCLSH}

View File

@ -0,0 +1,11 @@
--- imap/src/osdep/unix/Makefile.orig Wed Sep 11 22:01:08 2002
+++ imap/src/osdep/unix/Makefile Wed Sep 11 22:02:49 2002
@@ -30,7 +30,7 @@
SSLDIR=/usr/local/ssl
SSLCERTS=$(SSLDIR)/certs
-SSLINCLUDE=$(SSLDIR)/include
+SSLINCLUDE=/usr/include/openssl
SSLLIB=$(SSLDIR)/lib
SSLCRYPTO=-lcrypto

View File

@ -1,20 +0,0 @@
Use the TCL_STUBS when compiling and linking loadable TCL modules.
The need for stubs should be detectable by configure, I guess, but
I'm lazy today...
-mi
--- lib/Makefile.in Mon May 1 16:31:01 2000
+++ lib/Makefile.in Sun Apr 8 16:58:09 2001
@@ -68,2 +68,4 @@
DUMMYLIB = ratDummy${SHLIB_SUFFIX}
+CFLAGS+= -DUSE_TCL_STUBS
+SHLIB_LD_LIBS+=-L${prefix}/lib -ltclstub83
--- util/Makefile.in Mon May 1 16:31:01 2000
+++ util/Makefile.in Sun Apr 8 17:19:49 2001
@@ -69,2 +69,4 @@
BUSYLIB = blt_busy${BUSYLIB_SUFFIX}
+CFLAGS+= -DUSE_TCL_STUBS
+SHLIB_LD_LIBS+=-L${prefix}/lib -ltclstub83

View File

@ -1,81 +1,92 @@
bin/tkrat
lib/ratatosk/ratatoskrc
lib/tkrat2.0/blt_busy1.0.so
lib/tkrat2.0/pkgIndex.tcl
lib/tkrat2.0/ratatosk2.0.so
lib/tkrat2.1/blt_busy1.0.so
lib/tkrat2.1/pkgIndex.tcl
lib/tkrat2.1/ratatosk2.1.so
%%PORTDOCS%%share/doc/tkrat/CONFIGURATION
%%PORTDOCS%%share/doc/tkrat/COPYRIGHT
%%PORTDOCS%%share/doc/tkrat/README
%%PORTDOCS%%share/doc/tkrat/interface
%%PORTDOCS%%share/doc/tkrat/userproc.example
%%PORTDOCS%%share/doc/tkrat/userprocs
share/tkrat2.0/alias.tcl
share/tkrat2.0/client.tcl
share/tkrat2.0/compose.tcl
share/tkrat2.0/convert.tcl
share/tkrat2.0/dbase.tcl
share/tkrat2.0/dialog.tcl
share/tkrat2.0/dsn.tcl
share/tkrat2.0/exp.tcl
share/tkrat2.0/folder.tcl
share/tkrat2.0/font.tcl
share/tkrat2.0/help.tcl
share/tkrat2.0/info.tcl
share/tkrat2.0/keydef.tcl
share/tkrat2.0/languages.tcl
share/tkrat2.0/options.tcl
share/tkrat2.0/pgp.tcl
share/tkrat2.0/pkgIndex.tcl
share/tkrat2.0/preferences.tcl
share/tkrat2.0/print.tcl
share/tkrat2.0/show.tcl
share/tkrat2.0/source.tcl
share/tkrat2.0/start.tcl
share/tkrat2.0/tclIndex
share/tkrat2.0/text_balText_de.tcl
share/tkrat2.0/text_balText_en.tcl
share/tkrat2.0/text_balText_fr.tcl
share/tkrat2.0/text_balText_it.tcl
share/tkrat2.0/text_balText_sr.tcl
share/tkrat2.0/text_balText_sv.tcl
share/tkrat2.0/text_changes_de.tcl
share/tkrat2.0/text_changes_en.tcl
share/tkrat2.0/text_changes_fr.tcl
share/tkrat2.0/text_changes_it.tcl
share/tkrat2.0/text_changes_sr.tcl
share/tkrat2.0/text_changes_sv.tcl
share/tkrat2.0/text_help_de.tcl
share/tkrat2.0/text_help_en.tcl
share/tkrat2.0/text_help_fr.tcl
share/tkrat2.0/text_help_it.tcl
share/tkrat2.0/text_help_sr.tcl
share/tkrat2.0/text_help_sv.tcl
share/tkrat2.0/text_t_de.tcl
share/tkrat2.0/text_t_en.tcl
share/tkrat2.0/text_t_fr.tcl
share/tkrat2.0/text_t_it.tcl
share/tkrat2.0/text_t_sr.tcl
share/tkrat2.0/text_t_sv.tcl
share/tkrat2.0/tkrat.xbm
share/tkrat2.0/tkrat.xpm
share/tkrat2.0/tkrat_small.xbm
share/tkrat2.0/tkrat_smallmask.xbm
share/tkrat2.0/tkratmask.xbm
share/tkrat2.0/util/pkgIndex.tcl
share/tkrat2.0/util/rat_balloon.tcl
share/tkrat2.0/util/rat_ed.tcl
share/tkrat2.0/util/rat_edit.tcl
share/tkrat2.0/util/rat_fbox.tcl
share/tkrat2.0/util/rat_ispell.tcl
share/tkrat2.0/util/rat_list.tcl
share/tkrat2.0/util/rat_tabbed.tcl
share/tkrat2.0/util/rat_textlist.tcl
share/tkrat2.0/vfolder.tcl
share/tkrat2.0/vfolderdef.tcl
share/tkrat2.0/watcher.tcl
share/tkrat2.0/winctl.tcl
share/tkrat2.1/alias.tcl
share/tkrat2.1/client.tcl
share/tkrat2.1/compose.tcl
share/tkrat2.1/convert.tcl
share/tkrat2.1/dbase.tcl
share/tkrat2.1/dialog.tcl
share/tkrat2.1/dsn.tcl
share/tkrat2.1/exp.tcl
share/tkrat2.1/folder.tcl
share/tkrat2.1/font.tcl
share/tkrat2.1/help.tcl
share/tkrat2.1/html.tcl
share/tkrat2.1/info.tcl
share/tkrat2.1/keydef.tcl
share/tkrat2.1/languages.tcl
share/tkrat2.1/mime.tcl
share/tkrat2.1/options.tcl
share/tkrat2.1/pgp.tcl
share/tkrat2.1/pkgIndex.tcl
share/tkrat2.1/preferences.tcl
share/tkrat2.1/print.tcl
share/tkrat2.1/show.tcl
share/tkrat2.1/source.tcl
share/tkrat2.1/start.tcl
share/tkrat2.1/tclIndex
share/tkrat2.1/text_balText_de.tcl
share/tkrat2.1/text_balText_en.tcl
share/tkrat2.1/text_balText_fr.tcl
share/tkrat2.1/text_balText_it.tcl
share/tkrat2.1/text_balText_pl.tcl
share/tkrat2.1/text_balText_pt.tcl
share/tkrat2.1/text_balText_sr.tcl
share/tkrat2.1/text_balText_sv.tcl
share/tkrat2.1/text_changes_de.tcl
share/tkrat2.1/text_changes_en.tcl
share/tkrat2.1/text_changes_fr.tcl
share/tkrat2.1/text_changes_it.tcl
share/tkrat2.1/text_changes_pl.tcl
share/tkrat2.1/text_changes_pt.tcl
share/tkrat2.1/text_changes_sr.tcl
share/tkrat2.1/text_changes_sv.tcl
share/tkrat2.1/text_help_de.tcl
share/tkrat2.1/text_help_en.tcl
share/tkrat2.1/text_help_fr.tcl
share/tkrat2.1/text_help_it.tcl
share/tkrat2.1/text_help_pl.tcl
share/tkrat2.1/text_help_pt.tcl
share/tkrat2.1/text_help_sr.tcl
share/tkrat2.1/text_help_sv.tcl
share/tkrat2.1/text_t_de.tcl
share/tkrat2.1/text_t_en.tcl
share/tkrat2.1/text_t_fr.tcl
share/tkrat2.1/text_t_it.tcl
share/tkrat2.1/text_t_pl.tcl
share/tkrat2.1/text_t_pt.tcl
share/tkrat2.1/text_t_sr.tcl
share/tkrat2.1/text_t_sv.tcl
share/tkrat2.1/tkrat.xbm
share/tkrat2.1/tkrat.xpm
share/tkrat2.1/tkrat_small.xbm
share/tkrat2.1/tkrat_smallmask.xbm
share/tkrat2.1/tkratmask.xbm
share/tkrat2.1/util/pkgIndex.tcl
share/tkrat2.1/util/rat_balloon.tcl
share/tkrat2.1/util/rat_ed.tcl
share/tkrat2.1/util/rat_edit.tcl
share/tkrat2.1/util/rat_enriched.tcl
share/tkrat2.1/util/rat_fbox.tcl
share/tkrat2.1/util/rat_ispell.tcl
share/tkrat2.1/util/rat_list.tcl
share/tkrat2.1/util/rat_textlist.tcl
share/tkrat2.1/util/rat_tree.tcl
share/tkrat2.1/vfolder.tcl
share/tkrat2.1/vfolderdef.tcl
share/tkrat2.1/watcher.tcl
share/tkrat2.1/winctl.tcl
%%PORTDOCS%%@dirrm share/doc/tkrat
@dirrm share/tkrat2.0/util
@dirrm share/tkrat2.0
@dirrm share/tkrat2.1/util
@dirrm share/tkrat2.1
@dirrm lib/ratatosk
@dirrm lib/tkrat2.0
@dirrm lib/tkrat2.1