? work Index: Makefile =================================================================== RCS file: /home/pcvs/ports/www/trac-gantt/Makefile,v retrieving revision 1.5 diff -u -r1.5 Makefile --- Makefile 7 Jul 2008 12:37:20 -0000 1.5 +++ Makefile 13 Aug 2008 13:49:31 -0000 @@ -7,7 +7,7 @@ PORTNAME= TracGantt PORTVERSION= 0.3.2a -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= www devel python MASTER_SITES= http://willbarton.com/files/ \ http://dryice.name/computer/FreeBSD/distfiles/ @@ -16,30 +16,24 @@ MAINTAINER= dryice@dryice.name COMMENT= A plugin to creates Gantt charts for trac -RUN_DEPENDS+= tracd:${PORTSDIR}/www/trac BUILD_DEPENDS+= easy_install:${PORTSDIR}/devel/py-setuptools +RUN_DEPENDS+= trac>=0.11:${PORTSDIR}/www/trac +NO_BUILD= yes USE_PYTHON= 2.3+ +USE_PYDISTUTILS=yes PLIST_SUB+= PORTVERSION=${PORTVERSION} PYTHONVERSION=${_PYTHON_VERSION} +PYDISTUTILS_NOEGGINFO= yes .if !defined(NOPORTDOCS) PORTDOCS= PKG-INFO README .endif -do-build: - cd ${WRKSRC}; \ - ${PYTHON_CMD} setup.py bdist_egg - -do-install: -.for i in * - ${INSTALL_DATA} ${WRKSRC}/dist/${i} ${PYTHON_SITELIBDIR}/ -.endfor - +post-install: .if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} -.for i in ${PORTDOCS} - ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} -.endfor + @${INSTALL} -d ${DOCSDIR} + @cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDOCS}" ${DOCSDIR} .endif + @${CAT} ${PKGMESSAGE} .include Index: pkg-descr =================================================================== RCS file: /home/pcvs/ports/www/trac-gantt/pkg-descr,v retrieving revision 1.3 diff -u -r1.3 pkg-descr --- pkg-descr 11 Feb 2007 08:41:26 -0000 1.3 +++ pkg-descr 13 Aug 2008 13:49:31 -0000 @@ -1,6 +1,5 @@ A plugin for the Trac project/source code management system that -creates Gantt charts based on ticket reports. It is a -work-in-progress. +creates Gantt charts based on ticket reports. It is a work-in-progress. A Gantt chart is a graphical representation of the duration of tasks against the progression of time. Gantt charts are very useful for @@ -14,4 +13,4 @@ generated on-the-fly from the ticket reports, using only the tickets provided by the report. -WWW: http://willbarton.com/ +WWW: http://willbarton.com/code/tracgantt/ Index: pkg-message =================================================================== RCS file: pkg-message diff -N pkg-message --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg-message 13 Aug 2008 13:49:31 -0000 @@ -0,0 +1,73 @@ +---------------------------------------------------------------------- +To use the TracGantt plugin, please follow these instructions: + +Edit your Trac config file to add custom fields to tickets, as well +as set the expected date format of those fields. + +The first things to add are the new ticket fields. If you already +have a ticket-custom section, append these to it: + + [ticket-custom] + due_assign = text + due_assign.label = Due to assign + due_assign.value = DD/MM/YYYY + + dependencies = text + dependencies.label = Dependencies + dependencies.value = + due_close= text + + due_close.label = Due to close + due_close.value = DD/MM/YYYY + + include_gantt = checkbox + include_gantt.label = Include in GanttChart + include_gantt.value = + +This will add four new fields to tickets, a "Due to assign" field, +which contains the date by which this ticket should be assigned, a +"Dependencies" field, for listing ticket numbers upon which this +ticket depends, a "Due to close" field, which contains the date by +which this ticket should be closed, and finally a checkbox that +allows the ticket to be included in Gantt charts. + +In addition, TracGantt provides several tweakable configuration +knobs that you can use to change the behavior of the gantt charts. +They are listed below with their default values. + + [gantt-charts] + + # The format of dates entered by humans in the above ticket + # fields + date_format = %m/%d/%Y + + # Include the ticket summary in the gantt chart display + include_summary = true + + # Trim the included summary to the given number of characters + summary_length = 16 + + # Use the creation date of a ticket as the "due assign" + # date if no assignment date is given + use_creation_date = true + + # Show on the gantt chart the date the ticket was opened, + # to contrast with the assignment date. + show_opened = true + + +NOTE: If you are placing the module anywhere outside of Trac's +standard 'plugins' directory (i.e. to share across Trac instances), +then you will also need to add: + + [components] + tracgantt.* = enabled + +to your Trac config file. Again, this is only necessary if the egg +file is placed outside of the Trac 'plugins' folder, in a standard +Python search path. + +If you are using Trac with Apache and mod_python, you may also need +to restart Apache, to avoid the plugin being accessible from one +Apache process, but not others. +---------------------------------------------------------------------- Index: files/patch-setup.py =================================================================== RCS file: files/patch-setup.py diff -N files/patch-setup.py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-setup.py 13 Aug 2008 13:49:31 -0000 @@ -0,0 +1,13 @@ +--- 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 @@ + packages = ['tracgantt'], + package_data={'tracgantt': ['templates/*.cs', 'htdocs/*.css']}, + +- #install_requires = ['trac>=0.9'], +- #entry_points = {'trac.plugins': ['module_name = gantt']}, ++ install_requires = ['trac>=0.11'], ++ entry_points = {'trac.plugins': ['tracgantt = tracgantt']}, + + author = "Will Barton", + author_email = "wbb4@opendarwin.org", Index: files/patch-tracgantt-gantt.py =================================================================== RCS file: files/patch-tracgantt-gantt.py diff -N files/patch-tracgantt-gantt.py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-tracgantt-gantt.py 13 Aug 2008 13:49:31 -0000 @@ -0,0 +1,14 @@ +--- tracgantt/gantt.py.orig 2008-07-31 05:36:39.000000000 +0400 ++++ tracgantt/gantt.py 2008-07-31 05:37:45.000000000 +0400 +@@ -370,8 +370,8 @@ + % (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) + +