Edgewall Software

Version 14 (modified by TomS, 17 years ago) ( diff )

ClearSilver

Clearsilver (http://www.clearsilver.net/) is a powerful and flexible HTML templating engine.


Clearsilver has its drawbacks, and after a few years of successful (but sometimes frustrating) use, the TracTeam unanimously—and enthusiastically--decided to go for another templating engine: Genshi.

Therefore, starting with 0.11, Trac will no longer require Clearsilver. However, that version (and perhaps the following one, it's not yet decided), will retain the infrastructure needed to support plugins using Clearsilver.

Plugin developers should nonetheless consider switching to Genshi during the transition phase of 0.11 development. See TracDev/ApiChanges/0.11


Download

Official downloads

Unofficial windows builds of ClearSilver 0.9.14 are also available from http://clearsilver.yi.org/ as installers for Python 2.3 and 2.4.

For Python 2.5, you need to build the package yourself, and you probably need the following patch: googlegroups:trac-users:5b502b38f4e13c8f

Building the package yourself

If you have to build the package yourself, be sure to build a thread-safe version of the library. There's no explicit configuration switch for that. Just pay attention to the Checking pthread.h… yes line during configuration. If it's no, then you'll have to fix the configuration step yourself (see that comment).

Non thread-safe builds have been reported to not work with Trac in a multi-threaded setup (see the comment linked above).

On x86_64 platforms, the 0.10.x series is needed. For gcc4, the latest release (0.10.2) should be used.

ClearSilver 0.10.2

There's a typo in the configure scripts. You'll need to apply the following patch first:

  • configure

    diff -r 1f523c238d93 -r 74f546b8d58b configure
    a b  
    60456045    PYTHON=$python_bin
    60466046    PYTHON_INC="-I$python_inc"
    60476047    PYTHON_LIB=$python_lib
    6048     if test ! $?PYTHON_SITE; then
     6048    if test ! $PYTHON_SITE; then
    60496049       PYTHON_SITE=$python_site
    60506050    fi
    60516051    BUILD_WRAPPERS="$BUILD_WRAPPERS python"
  • configure.in

    diff -r 1f523c238d93 -r 74f546b8d58b configure.in
    a b  
    288288    PYTHON=$python_bin
    289289    PYTHON_INC="-I$python_inc"
    290290    PYTHON_LIB=$python_lib
    291     if test ! $?PYTHON_SITE; then
     291    if test ! $PYTHON_SITE; then
    292292       PYTHON_SITE=$python_site
    293293    fi
    294294    BUILD_WRAPPERS="$BUILD_WRAPPERS python"

Then, you can call configure, for example like this:

./configure --prefix=/opt/clearsilver-0.10.2 \
  --with-python=/opt/python-2.4.2/bin/python \
  --disable-ruby --disable-java --disable-perl --disable-apache --disable-csharp

At this point, make && make install should work. (Be Warned: Should is very relative).

Note for *BSD: you may have to use GNUmake by using gmake because make may not work.

Note: See TracWiki for help on using the wiki.