diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2006-08-22 19:15:36 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2006-08-22 19:15:36 +0800 |
commit | 90b2c2e989f8d8c3fe76b3bb1f5e76b685166eb4 (patch) | |
tree | 1dc261ef27bcf2eea6abedbad156938c910e96df /japanese | |
parent | 25cd8bc7ba5fed53b4ac9fad2859dd3584017988 (diff) | |
download | freebsd-ports-gnome-90b2c2e989f8d8c3fe76b3bb1f5e76b685166eb4.tar.gz freebsd-ports-gnome-90b2c2e989f8d8c3fe76b3bb1f5e76b685166eb4.tar.zst freebsd-ports-gnome-90b2c2e989f8d8c3fe76b3bb1f5e76b685166eb4.zip |
- Add an experimental patch to use local TZ in notify mail Date:
header (default off).
- Alter indent in patch-Notify.py to improve readability.
Diffstat (limited to 'japanese')
-rw-r--r-- | japanese/trac/Makefile | 8 | ||||
-rw-r--r-- | japanese/trac/files/extra-patch-Notify.py | 11 | ||||
-rw-r--r-- | japanese/trac/files/patch-Notify.py | 10 |
3 files changed, 23 insertions, 6 deletions
diff --git a/japanese/trac/Makefile b/japanese/trac/Makefile index 538b67a671e3..9f2f0b0d1607 100644 --- a/japanese/trac/Makefile +++ b/japanese/trac/Makefile @@ -7,6 +7,7 @@ PORTNAME= trac PORTVERSION= 0.9.6 +PORTREVISION= 1 CATEGORIES= japanese www devel python MASTER_SITES= http://dist.bsdlab.org/ \ http://www.i-act.co.jp/project/products/downloads/ @@ -22,7 +23,8 @@ BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/pysqlite2/__init__.py:${PORTSDIR}/databases/ RUN_DEPENDS= ${BUILD_DEPENDS} OPTIONS= SILVERCITY "Use Silvercity for syntax highlighting" On \ - DOCUTILS "Allow additional text markup" On + DOCUTILS "Allow additional text markup" On \ + LOCALTZ "Use local TZ in notify mail Date: header" Off CONFLICTS= trac-0.* WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-ja-1 @@ -61,4 +63,8 @@ RUN_DEPENDS+= ${PREFIX}/bin/source2html.py:${PORTSDIR}/textproc/silvercity RUN_DEPENDS+= ${PREFIX}/bin/rst2html:${PORTSDIR}/textproc/py-docutils .endif +.if defined(WITH_LOCALTZ) +EXTRA_PATCHES= ${FILESDIR}/extra-patch-Notify.py +.endif + .include <bsd.port.post.mk> diff --git a/japanese/trac/files/extra-patch-Notify.py b/japanese/trac/files/extra-patch-Notify.py new file mode 100644 index 000000000000..5e7d1e044d10 --- /dev/null +++ b/japanese/trac/files/extra-patch-Notify.py @@ -0,0 +1,11 @@ +--- trac/Notify.py.orig2 Tue Aug 22 19:47:42 2006 ++++ trac/Notify.py Tue Aug 22 19:48:00 2006 +@@ -139,7 +139,7 @@ + msg['Sender'] = self.from_email + msg['Reply-To'] = self.replyto_email + msg['To'] = rcpt +- msg['Date'] = formatdate() ++ msg['Date'] = formatdate(time.time(), self.config.getbool('notification', 'local_timezone')) + for hdr in mime_headers.keys(): + msg[hdr] = mime_headers[hdr] + self.env.log.debug("Sending SMTP notification to %s on port %d" diff --git a/japanese/trac/files/patch-Notify.py b/japanese/trac/files/patch-Notify.py index 56ea29d2cf0c..b05ecfdc183b 100644 --- a/japanese/trac/files/patch-Notify.py +++ b/japanese/trac/files/patch-Notify.py @@ -15,8 +15,8 @@ - msg = MIMEMultipart() - msg.attach(MIMEText(body, 'plain', 'utf-8')) - msg.epilogue = '' -+ body_esc = string.replace(unicode(body, 'utf-8'), u'\uff5e', u'\u301c') -+ body = body_esc.encode('japanese.c.iso-2022-jp') ++ body_esc = string.replace(unicode(body, 'utf-8'), u'\uff5e', u'\u301c') ++ body = body_esc.encode('japanese.c.iso-2022-jp') + msg = MIMEText(body, 'plain', 'iso-2022-jp') msg['X-Mailer'] = 'Trac %s, by Edgewall Software' % __version__ msg['X-Trac-Version'] = __version__ @@ -24,9 +24,9 @@ msg['X-Trac-Project'] = projname msg['X-URL'] = self.config.get('project','url') - msg['Subject'] = Header(self.subject, 'utf-8') -+ subj = unicode(self.subject, 'utf-8') -+ subj_esc = string.replace(subj, u'\uff5e', u'\u301c') -+ msg['Subject'] = Header(subj_esc.encode('japanese.c.iso-2022-jp'), 'iso-2022-jp') ++ subj = unicode(self.subject, 'utf-8') ++ subj_esc = string.replace(subj, u'\uff5e', u'\u301c') ++ msg['Subject'] = Header(subj_esc.encode('japanese.c.iso-2022-jp'), 'iso-2022-jp') msg['From'] = '%s <%s>' % (projname, self.from_email) msg['Sender'] = self.from_email msg['Reply-To'] = self.replyto_email |