The TracMath plugin allows embedded equations in wiki pages. Basically a

port of mt-math to trac.

WWW: http://trac-hacks.org/wiki/TracMathPlugin
This commit is contained in:
Brooks Davis 2009-12-31 22:35:03 +00:00
parent b09f7cb232
commit 19f7d1f020
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=246950
6 changed files with 76 additions and 0 deletions

View File

@ -1571,6 +1571,7 @@
SUBDIR += trac-ldap
SUBDIR += trac-macropost
SUBDIR += trac-mastertickets
SUBDIR += trac-math
SUBDIR += trac-mercurial
SUBDIR += trac-multirepos
SUBDIR += trac-nav

56
www/trac-math/Makefile Normal file
View File

@ -0,0 +1,56 @@
# New ports collection makefile for: trac-math
# Date created: Dec 31, 2009
# Whom: Brooks Davis <brooks@freebsd.org>
#
# $FreeBSD$
#
PORTNAME= ${PYDISTUTILS_PKGNAME:S;^Trac;;S;Plugin$;;:L}
PORTVERSION= 0.1
CATEGORIES= www math python
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= brooks
PKGNAMEPREFIX= trac-
MAINTAINER= brooks@freebsd.org
COMMENT= Support for LaTeX math formulas in wiki pages
RUN_DEPENDS+= tracd:${PORTSDIR}/www/trac \
latex:${PORTSDIR}/print/teTeX-base
BUILD_DEPENDS+= easy_install:${PORTSDIR}/devel/py-setuptools
SUB_FILES= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
USE_PYTHON= yes
USE_PYDISTUTILS=easy_install
PYDISTUTILS_PKGNAME= TracMath
post-install:
${CAT} ${PKGMESSAGE}
# Maintainter targets below this point
# Retrieve the latest version from SVN and package in a tarball.
.if defined(BOOTSTRAP)
FETCH_DEPENDS+= svn:${PORTSDIR}/devel/subversion
do-fetch:
${MKDIR} ${WRKDIR}
cd ${WRKDIR} && \
svn export http://trac-hacks.org/svn/tracmathplugin/ \
${DISTNAME}
cd ${WRKDIR} && tar cvf ${DISTDIR}/${DISTNAME}.tar.gz ${DISTNAME}
.endif
# Create a pkg-plist after the package is installed.
EGGDIR= ${PYTHON_SITELIBDIR}/${PYEASYINSTALL_EGG}
PLIST_EGGDIR= %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%
build-plist:
${FIND} ${EGGDIR} -type f | \
${SED} -e 's|${EGGDIR}|${PLIST_EGGDIR}|' | \
${SORT} > pkg-plist
${FIND} ${EGGDIR} -type d | \
${SED} -e 's|${EGGDIR}|@dirrm ${PLIST_EGGDIR}|' | \
${SORT} -r >> pkg-plist
.include <bsd.port.mk>

3
www/trac-math/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (math-0.1.tar.gz) = 8cf9beca984fe8717cb0e554c6994ef1
SHA256 (math-0.1.tar.gz) = 6690f91e1905b6a3f213edb2a69e9268695a7acc1b3df921e963d453d9b2b2db
SIZE (math-0.1.tar.gz) = 12800

View File

@ -0,0 +1,11 @@
To use the plugin, you must add at least the following to your trac.ini.
[tracmath]
latex_cmd = %%LOCALBASE%%/bin/latex
dvipng_cmd = %%LOCALBASE%%/bin/dvipng
You may also wish to set:
cache_dir = <cache directory>
max_png = <max number of pngs in cache - defaults to 500>
use_dollars = enabled

4
www/trac-math/pkg-descr Normal file
View File

@ -0,0 +1,4 @@
Allow embedded equations in wiki pages. Basically a port of mt-math to
trac.
WWW: http://trac-hacks.org/wiki/TracMathPlugin

1
www/trac-math/pkg-plist Normal file
View File

@ -0,0 +1 @@
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%