svn commit: r416078 - in head/www/trac-gantt: . files
Dmitry Marakasov
amdmi3 at FreeBSD.org
Sun May 29 01:21:57 UTC 2016
Author: amdmi3
Date: Sun May 29 01:21:55 2016
New Revision: 416078
URL: https://svnweb.freebsd.org/changeset/ports/416078
Log:
- Add LICENSE
- Add NO_ARCH
- Switch to options helpers
- Regenerate patches with `make makepatch`
Approved by: portmgr blanket
Modified:
head/www/trac-gantt/Makefile
head/www/trac-gantt/files/patch-setup.py
head/www/trac-gantt/files/patch-tracgantt-gantt.py
Modified: head/www/trac-gantt/Makefile
==============================================================================
--- head/www/trac-gantt/Makefile Sun May 29 01:20:40 2016 (r416077)
+++ head/www/trac-gantt/Makefile Sun May 29 01:21:55 2016 (r416078)
@@ -12,24 +12,20 @@ PKGNAMEPREFIX= trac-
MAINTAINER= dryice at dryice.name
COMMENT= Plugin to creates Gantt charts for trac
-RUN_DEPENDS+= trac>=0.11:www/trac
+LICENSE= BSD3CLAUSE
+
+RUN_DEPENDS= trac>=0.11:www/trac
USES= python:2
USE_PYTHON= distutils autoplist
+NO_ARCH= yes
-OPTIONS_DEFINE= DOCS
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= PKG-INFO README
-.endif
-post-install:
-.if ${PORT_OPTIONS:MDOCS}
- @${INSTALL} -d ${STAGEDIR}${DOCSDIR}
- @cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR}
-.endif
+OPTIONS_DEFINE= DOCS
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
-.include "${.CURDIR}/../../www/trac/plugin.mk"
.include <bsd.port.mk>
Modified: head/www/trac-gantt/files/patch-setup.py
==============================================================================
--- head/www/trac-gantt/files/patch-setup.py Sun May 29 01:20:40 2016 (r416077)
+++ head/www/trac-gantt/files/patch-setup.py Sun May 29 01:21:55 2016 (r416078)
@@ -1,6 +1,6 @@
---- setup.py.orig 2008-08-13 08:54:31.000000000 -0400
-+++ setup.py 2008-08-13 08:54:44.000000000 -0400
-@@ -9,8 +9,8 @@
+--- setup.py.orig 2006-07-20 17:08:15 UTC
++++ setup.py
+@@ -9,8 +9,8 @@ setup (
packages = ['tracgantt'],
package_data={'tracgantt': ['templates/*.cs', 'htdocs/*.css']},
Modified: head/www/trac-gantt/files/patch-tracgantt-gantt.py
==============================================================================
--- head/www/trac-gantt/files/patch-tracgantt-gantt.py Sun May 29 01:20:40 2016 (r416077)
+++ head/www/trac-gantt/files/patch-tracgantt-gantt.py Sun May 29 01:21:55 2016 (r416078)
@@ -1,25 +1,25 @@
---- tracgantt/gantt.py.orig 2006-07-20 21:07:06.000000000 +0400
-+++ tracgantt/gantt.py 2008-08-14 05:44:53.000000000 +0400
-@@ -115,7 +115,7 @@
+--- tracgantt/gantt.py.orig 2006-07-20 17:07:06 UTC
++++ tracgantt/gantt.py
+@@ -115,7 +115,7 @@ class GanttComponent(Component):
show_opened = self.env.config.getbool('gantt-charts',
'show_opened', 'false')
-
+
- tickets,dates,broken = self._tickets_for_report(db, report['query'])
+ tickets,dates,broken = self._tickets_for_report(db, report['query'], req.perm.username)
tickets,dates = self._paginate_tickets(tickets, dates)
-
+
req.hdf['gantt.tickets'] = tickets
-@@ -163,7 +163,7 @@
-
+@@ -163,7 +163,7 @@ class GanttComponent(Component):
+
return {'id':id, 'title':title, 'query':query, 'description':description}
-
+
- def _tickets_for_report(self, db, query):
+ def _tickets_for_report(self, db, query, username):
""" Get a list of Ticket instances for the tickets in a report """
-
+
tickets = []
-@@ -172,7 +172,7 @@
-
+@@ -172,7 +172,7 @@ class GanttComponent(Component):
+
## Get tickets for this report
cursor = db.cursor()
- cursor.execute(query)
@@ -27,22 +27,23 @@
info = cursor.fetchall() or []
cols = [s[0] for s in cursor.description or []]
db.rollback()
-@@ -344,7 +344,7 @@
+@@ -344,7 +344,7 @@ class GanttComponent(Component):
"use_creation_date", "true")
-
+
if use_cdate:
- start = datetime.date.fromtimestamp(ticket.time_created)
+ start = datetime.date.fromordinal(ticket.time_created.toordinal())
else:
raise ValueError, "Couldn't get start date"
-
-@@ -370,8 +370,8 @@
+
+@@ -370,8 +370,8 @@ class GanttComponent(Component):
% (str(ticket.id), str(start), str(due))
-
+
# Finally the ticket itself's open and close dates
- open = datetime.date.fromtimestamp(ticket.time_created)
- changed = datetime.date.fromtimestamp(ticket.time_changed)
+ open = ticket.time_created.date()
+ changed = ticket.time_changed.date()
-
+
return (start, due, open, changed)
+
More information about the svn-ports-head
mailing list