aboutsummaryrefslogtreecommitdiff
path: root/japanese/trac
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2006-08-22 11:15:36 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2006-08-22 11:15:36 +0000
commit0f2ab9c1d685bc0e7b44859589ba2cc0e3980e52 (patch)
tree71cc5ed4d7c25a3b25842be62b6342cde3e21745 /japanese/trac
parent0774425e0ea98e743116c4bce30bb32a049ef95d (diff)
downloadports-0f2ab9c1d685bc0e7b44859589ba2cc0e3980e52.tar.gz
ports-0f2ab9c1d685bc0e7b44859589ba2cc0e3980e52.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.
Notes
Notes: svn path=/head/; revision=171192
Diffstat (limited to 'japanese/trac')
-rw-r--r--japanese/trac/Makefile8
-rw-r--r--japanese/trac/files/extra-patch-Notify.py11
-rw-r--r--japanese/trac/files/patch-Notify.py10
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