From 19f7d1f0205f6c589ded54f022ff3b8011e0d1a7 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Thu, 31 Dec 2009 22:35:03 +0000 Subject: [PATCH] The TracMath plugin allows embedded equations in wiki pages. Basically a port of mt-math to trac. WWW: http://trac-hacks.org/wiki/TracMathPlugin --- www/Makefile | 1 + www/trac-math/Makefile | 56 ++++++++++++++++++++++++++++++ www/trac-math/distinfo | 3 ++ www/trac-math/files/pkg-message.in | 11 ++++++ www/trac-math/pkg-descr | 4 +++ www/trac-math/pkg-plist | 1 + 6 files changed, 76 insertions(+) create mode 100644 www/trac-math/Makefile create mode 100644 www/trac-math/distinfo create mode 100644 www/trac-math/files/pkg-message.in create mode 100644 www/trac-math/pkg-descr create mode 100644 www/trac-math/pkg-plist diff --git a/www/Makefile b/www/Makefile index c59c6759f67d..1987d25c4077 100644 --- a/www/Makefile +++ b/www/Makefile @@ -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 diff --git a/www/trac-math/Makefile b/www/trac-math/Makefile new file mode 100644 index 000000000000..4244acb7608c --- /dev/null +++ b/www/trac-math/Makefile @@ -0,0 +1,56 @@ +# New ports collection makefile for: trac-math +# Date created: Dec 31, 2009 +# Whom: Brooks Davis +# +# $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 diff --git a/www/trac-math/distinfo b/www/trac-math/distinfo new file mode 100644 index 000000000000..b68139c36312 --- /dev/null +++ b/www/trac-math/distinfo @@ -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 diff --git a/www/trac-math/files/pkg-message.in b/www/trac-math/files/pkg-message.in new file mode 100644 index 000000000000..364ae669fac1 --- /dev/null +++ b/www/trac-math/files/pkg-message.in @@ -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 = + max_png = + use_dollars = enabled diff --git a/www/trac-math/pkg-descr b/www/trac-math/pkg-descr new file mode 100644 index 000000000000..7cd03b7abc9d --- /dev/null +++ b/www/trac-math/pkg-descr @@ -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 diff --git a/www/trac-math/pkg-plist b/www/trac-math/pkg-plist new file mode 100644 index 000000000000..ddf68a1c022f --- /dev/null +++ b/www/trac-math/pkg-plist @@ -0,0 +1 @@ +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%