BUILD_DIR=/tmp/rrdbuild
INSTALL_DIR=/usr/local/build
mkdir $BUILD_DIR
mkdir $INSTALL_DIR
export CFLAGS="-O3 -fPIC"
export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib"
export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig
export PATH=$INSTALL_DIR/bin:$PATH
export PKG_CONFIG=$INSTALL_DIR/bin/pkg-config
cd $BUILD_DIR
yum -y install libtool gcc-c++
#Building pkgconfig
# wget
gunzip -c pkg-config-0.23.tar.gz | tar xf -
cd pkg-config-0.23
./configure --prefix=$INSTALL_DIR
make
make install
#Building zlib
cd $BUILD_DIR
# wget
gunzip -c zlib-1.2.3.tar.gz | tar xf -
cd zlib-1.2.3
./configure --prefix=$INSTALL_DIR --shared
make
make install
#Building libpng
cd $BUILD_DIR
# wget
gunzip -c libpng-1.2.38.tar.gz | tar xf -
cd libpng-1.2.38
./configure --prefix=$INSTALL_DIR
make
make install
#Building freetype
cd $BUILD_DIR
# wget
gunzip -c freetype-2.3.9.tar.gz | tar xf -
cd freetype-2.3.9
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --enable-shared
make
make install
#Building LibXML2
cd $BUILD_DIR
# wget
gunzip -c libxml2-2.7.3.tar.gz | tar xf -
cd libxml2-2.7.3
./configure --prefix=$INSTALL_DIR
make
make install
#Building fontconfig
cd $BUILD_DIR
# wget
gunzip -c fontconfig-2.7.1.tar.gz | tar xf -
cd fontconfig-2.7.1
./configure --prefix=$INSTALL_DIR --with-freetype-config=$INSTALL_DIR/bin/freetype-config
make
make install
#Building Pixman
cd $BUILD_DIR
# wget
gunzip -c pixman-0.15.20.tar.gz | tar xf -
cd pixman-0.15.20
./configure --prefix=$INSTALL_DIR
make
make install
#Building Cairo
cd $BUILD_DIR
# wget
gunzip -c cairo-1.6.4.tar.tar | tar xf -
cd cairo-1.6.4
./configure --prefix=$INSTALL_DIR \
--enable-xlib=no \
--enable-xlib-render=no \
--enable-win32=no
make
make install
#Building Glib
cd $BUILD_DIR
# wget
gunzip -c glib-2.21.4.tar.gz | tar xf -
cd glib-2.21.4
./configure --prefix=$INSTALL_DIR
make
make install
#Building Pango
cd $BUILD_DIR
# wget
bunzip2 -c pango-1.21.1.tar.bz2 | tar xf -
cd pango-1.21.1
./configure --prefix=$INSTALL_DIR --without-x
make
make install
pango-1.25时需要手动copy
gunzip -c pango-1.25.3.tar.gz | tar xf - && cd pango-1.25.3 && ./configure --prefix=$INSTALL_DIR --without-x && make && make install
cp /tmp/rrdbuild/pango-1.25.3/pango/pangocairo.h $INSTALL_DIR/include/pango-1.0/pango/
#Building XML-Parser
cd $BUILD_DIR
wget
gunzip -c XML-Parser-2.36.tar.gz | tar xf -
cd XML-Parser-2.36
perl Makefile.PL
make && make install
#Building intltool
cd $BUILD_DIR
gunzip -c intltool-0.40.6.tar.gz | tar xf -
cd intltool-0.40.6
./configure --prefix=$INSTALL_DIR
make && make install
#Building libart_lgpl
cd $BUILD_DIR
gunzip -c libart_lgpl-2.3.20.tar.gz |tar xf -
cd libart_lgpl-2.3.20
./configure --prefix=$INSTALL_DIR
make && make install
#Building rrdtool
cd $BUILD_DIR
gunzip -c rrdtool-1.3.8.tar.tar | tar xf -
cd rrdtool-1.3.8
./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
make clean
make
make install
阅读(1666) | 评论(0) | 转发(0) |