set -e
if [ "$PREFIX" = "" ]; then
- PREFIX=`pwd`/xorg.build
+ PREFIX=`pwd`/xorg.build
fi
export ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"
MAKE="make"
-CFGFLAGS=
+STATIC=0
modules="dri2proto \
libpthread-stubs \
libfontenc \
libXfont \
libpciaccess \
- xkbcomp \
pixman"
tar jxf ~/.tigervnc-build/${module}.tar.bz2
done
tar jxf ~/.tigervnc-build/Mesa.tar.bz2
+ tar jxf ~/.tigervnc-build/freetype.tar.bz2
tar jxf ~/.tigervnc-build/xorg-server.tar.bz2
cp -r xorg-server-1.*/* ../xserver
popd
build ()
{
-
# Build VNC
echo "*** Building VNC ***"
cd ..
+ VNCCFGFLAGS=
+ if [ $STATIC = 1 ]; then
+ VNCCFGFLAGS=--with-included-zlib
+ fi
make distclean || true
- ./configure ${1+"$@"} --prefix=${PREFIX}
+ ./configure ${1+"$@"} ${VNCCFGFLAGS} --prefix=${PREFIX}
make
cd unix
if [ "${module}" = "libSM" ]; then
extraoptions="${extraoptions} --without-libuuid"
fi
+ if [ $STATIC = 1 ]; then
+ extraoptions="${extraoptions} --enable-static --disable-shared"
+ fi
./configure ${1+"$@"} --prefix="${PREFIX}" ${extraoptions}
echo ======================
echo building ${module}
# build mesa
echo "*** Building Mesa ***"
pushd Mesa-*
- ./configure ${1+"$@"} --prefix=${PREFIX} --with-driver=dri --disable-glut --without-demos
+ MESACFGFLAGS='--with-driver=xlib --disable-glut --without-demos'
+ if [ $STATIC = 1 ]; then
+ MESACFGFLAGS=${MESACFGFLAGS}' --enable-static --disable-shared'
+ fi
+ ./configure ${1+"$@"} --prefix=${PREFIX} ${MESACFGFLAGS}
if [ $? -ne 0 ]; then
echo "Failed to configure Mesa."
exit
fi
($MAKE)
make install
+ cd src/mesa/drivers/dri/
+ make install
popd
+ # build freetype
+ if [ $STATIC = 1 ]; then
+ echo "*** Building freetype ***"
+ pushd freetype-*
+ ./configure ${1+"$@"} --prefix=${PREFIX} --enable-static --disable-shared
+ if [ $? -ne 0 ]; then
+ echo "Failed to configure freetype."
+ exit
+ fi
+ ($MAKE)
+ make install
+ popd
+ fi
+
popd
# build xserver
echo "*** Building xserver ***"
cd xserver
autoreconf -fiv
- ./configure ${1+"$@"} --prefix=${PREFIX} --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg
+ XORGCFGFLAGS='--disable-xinerama --disable-xvfb --disable-xnest --disable-xorg'
+ if [ $STATIC = 1 ]; then
+ XORGCFGFLAGS="${XORGCFGFLAGS} --disable-shared --enable-static"
+ fi
+ ./configure ${1+"$@"} --prefix=${PREFIX} ${XORGCFGFLAGS}
if [ $? -ne 0 ]; then
echo "Failed to configure X server."
exit
case "$1" in
init)
shift
+ if [ "$1" = "-static" ]; then
+ STATIC=1
+ shift
+ fi
init ${1+"$@"}
;;
build)
shift
+ if [ "$1" = "-static" ]; then
+ STATIC=1
+ shift
+ fi
build ${1+"$@"}
;;
update)
+ shift
+ if [ "$1" = "-static" ]; then
+ STATIC=1
+ shift
+ fi
update_modules
;;
*)
- echo "Usage: $0 init | build | update [additional configure flags]"
+ echo "Usage: $0 init | build | update [-static] [additional configure flags]"
exit 3
esac
"util-macros": UTIL + "util-macros-1.1.6.tar.bz2",
"xorg-server": SERVER + "xorg-server-1.5.3.tar.bz2",
"xkeyboard-config": DATA + "xkeyboard-config-1.4.tar.bz2",
- "xkbcomp": APP + "xkbcomp-1.0.5.tar.bz2",
"libdrm": "http://dri.freedesktop.org/libdrm/libdrm-2.4.0.tar.bz2",
"Mesa": "http://downloads.sourceforge.net/mesa3d/MesaLib-7.2.tar.bz2",
+ "freetype": "http://downloads.sourceforge.net/freetype/freetype-2.3.11.tar.bz2",
"libxcb": "http://xcb.freedesktop.org/dist/libxcb-1.1.91.tar.bz2",
"libpthread-stubs": "http://xcb.freedesktop.org/dist/libpthread-stubs-0.1.tar.bz2",
"xcb-proto": "http://xcb.freedesktop.org/dist/xcb-proto-1.2.tar.bz2",