1#
 2# pygments
 3#
 4# Status: Required for core functionality
 5# Purpose: Source code highlighting used in the web interface
 6
 7function build_pygments() {
 8    PYGMENTS=1.4
 9    cd $BUILD_DIR
10    rm -rf Pygments-$PYGMENTS
11    tar xf $PACKAGE_DIR/Pygments-$PYGMENTS.tar.gz
12    cd Pygments-$PYGMENTS
13    cp $PATCH_DIR/pygments/rnc.py pygments/lexers
14    cd pygments/lexers
15    python _mapping.py
16    cd ../..
17    cat $PATCH_DIR/pygments/Pygments-1.4.rst-directive.patch | patch -p0
18    python setup.py install
19    # note the file rename below
20    cp external/rst-directive.py $PREFIX/lib/python2.7/site-packages/docutils/parsers/rst/directives/rst_directive.py
21    python setup.py build
22    python setup.py install
23}