diff options
author | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2012-12-26 18:58:07 +0200 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2012-12-26 19:09:44 +0200 |
commit | 5a5b6ac2ff063945db12c780c6593ee5a4155d16 (patch) | |
tree | 9f669626edb7b01babfef0d2d6458b485cf14f6a | |
parent | 4291868832c68626537274d0d52c01ca64bc1791 (diff) |
They are neither user-friendly nor fool-proof. But they allow
to clone cairo and pixman repositories, compile them and run
the benchmarks (if the cairo build dependencies are available
in the system, and the tools like git, make, gcc are also
installed).
-rwxr-xr-x | bench.sh | 15 | ||||
-rwxr-xr-x | setup.sh | 77 |
2 files changed, 92 insertions, 0 deletions
diff --git a/bench.sh b/bench.sh new file mode 100755 index 0000000..73ae6e8 --- /dev/null +++ b/bench.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +export CAIRO_TEST_TARGET=image + +export PREFIX=`pwd`/tmp +export LD_LIBRARY_PATH=$PREFIX/pixman/lib:$PREFIX/cairo/lib + +if [ ! -d "$PREFIX" ]; then + echo "Please run the setup.sh script first" + exit 1 +fi + +# run the benchmarks + +cairo/perf/.libs/cairo-perf-trace benchmark diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..eba30ce --- /dev/null +++ b/setup.sh @@ -0,0 +1,77 @@ +#!/bin/sh + +export CAIRO_TEST_TARGET=image +export CFLAGS="-O2 -g" +export CC=gcc +export CAIRO_VERSION=1.12.8 +export MAKEOPTS=-j2 + +# setup build environment + +export PREFIX=`pwd`/tmp +export LD_LIBRARY_PATH=$PREFIX/pixman/lib:$PREFIX/cairo/lib +export LD_RUN_PATH=$PREFIX/pixman/lib:$PREFIX/cairo/lib +export PKG_CONFIG_PATH=$PREFIX/pixman/lib/pkgconfig:$PREFIX/cairo/lib/pkgconfig + +if [ ! -d "$PREFIX" ]; then + mkdir $PREFIX +fi + +# clone repositories + +if [ ! -d "pixman" ]; then + git clone git://anongit.freedesktop.org/pixman +fi + +if [ ! -d "cairo" ]; then + git clone git://anongit.freedesktop.org/cairo + pushd cairo + git checkout $CAIRO_VERSION + popd +fi + +# first time configure for pixman and cairo + +if [ ! -f "pixman/configure" ]; then + pushd pixman + ./autogen.sh --prefix=$PREFIX/pixman --disable-gtk || exit 1 + popd +fi + +if [ ! -f "cairo/configure" ]; then + pushd cairo + ./autogen.sh --prefix=$PREFIX/cairo || exit 1 + popd +fi + +# first time compile and install for pixman and cairo + +if [ ! -d "tmp/pixman" ]; then + echo "Compiling pixman..." + pushd pixman + make $MAKEOPTS install || exit 1 + # make symlinks from pixman directory to make further installations unnecessary + rm $PREFIX/pixman/lib/libpixman-1.so + rm $PREFIX/pixman/lib/libpixman-1.so.0 + ln -s ../../../pixman/pixman/.libs/libpixman-1.so $PREFIX/pixman/lib/libpixman-1.so + ln -s ../../../pixman/pixman/.libs/libpixman-1.so.0 $PREFIX/pixman/lib/libpixman-1.so.0 + popd +fi + +if [ ! -d "tmp/cairo" ]; then + echo "Compiling cairo..." + pushd cairo + make $MAKEOPTS install || exit 1 + popd + + # bind traces + echo "Binding traces..." + make clean + make || exit 1 +fi + +echo +echo "Now you can do all the pixman hacking in 'pixman' directory" +echo "and run benchmarks using 'bench.sh script. The pixman shared" +echo "libraries used for the benchmark will be picked from" +echo "'pixman/pixman/.libs' directory." |