Wayland:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Manbuzhe留言 | 贡献
以内容'== wayland的编译 == === 准备工作 === ==== 基础知识 ==== # 具有lfs编译经验 # 一个可用的LFS系统(仅在LFS 7.1 64位版本验证过,其他版本…'创建新页面
 
Manbuzhe留言 | 贡献
无编辑摘要
 
(未显示2个用户的7个中间版本)
第1行: 第1行:
== wayland的编译 ==
== wayland的编译 ==


=== 准备工作 ===
==== 基础知识  ====


#具有LFS编译经验
#一个可用的LFS系统(仅在LFS 7.0 64位版本编译通过,其他系统或者LFS版本没有测试验证)
#本篇wayland编译笔记以Xorg7.7为基础,相应版本的软件包请参考Xorg7.7发布版本


==== 基础知识 ====
==== 设置环境变量 ====
# 具有lfs编译经验
<pre>WLD=/usr/   
# 一个可用的LFS系统(仅在LFS 7.1 64位版本验证过,其他版本没有测试)
==== 设置环境变量 ====
 
<pre>
WLD=/usr/   
LD_LIBRARY_PATH=$WLD/lib64
LD_LIBRARY_PATH=$WLD/lib64
PKG_CONFIG_PATH=$WLD/lib64/pkgconfig/:$WLD/share/pkgconfig/
PKG_CONFIG_PATH=$WLD/lib64/pkgconfig/:$WLD/share/pkgconfig/
ACLOCAL="aclocal -I $WLD/share/aclocal"
ACLOCAL="aclocal -I $WLD/share/aclocal"
XORG_CONFIG="--prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --localstatedir=/var"


export WLD LD_LIBRARY_PATH PKG_CONFIG_PATH ACLOCAL
export WLD LD_LIBRARY_PATH PKG_CONFIG_PATH ACLOCAL XORG_CONFIG  
</pre>
</pre>  
 
=== 安装一些基本工具 ===
<pre>
export XORG_CONFIG="--prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --localstatedir=/var"
</pre>
 
=== 安装一些基本工具 ===


==== openssl ====
==== openssl ====
<pre>
<pre>wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
tar -xvpf openssl-1.0.1c.tar.gz
tar -xvpf openssl-1.0.1c.tar.gz
cd openssl-1.0.1c
cd openssl-1.0.1c
patch -Np1 -i ../openssl-1.0.1c-fix_manpages-1.patch &&
./config --prefix=/usr zlib-dynamic --openssldir=/etc/ssl shared
./config --prefix=/usr zlib-dynamic --openssldir=/etc/ssl shared &&
make
make
make install
make install
</pre>
</pre>  
 
==== 安装 wget ====
==== 安装 wget ====
<pre>wget http://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz
 
<pre>
 
wget http://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz
tar -xvpf wget-1.14.tar.xz
tar -xvpf wget-1.14.tar.xz
cd wget-1.14
cd wget-1.14
./configure --prefix=/usr     \
./configure --prefix=/usr --sysconfdir=/etc  --with-ssl=openssl &amp;&amp;
            --sysconfdir=/etc  \
            --with-ssl=openssl &&
make
make
make install
make install
</pre>
==== 安装 git  ====


</pre>
最新版本为 1.8.0
 
<pre>wget http://git-core.googlecode.com/files/git-1.8.0.tar.gz  
==== 安装 git ====
tar -xvpf git-1.8.0.tar.gz
 
cd git-1.8.0
http://git-core.googlecode.com/files/git-1.8.0.tar.gz
 
./configure --without-python
./configure --without-python
 
make &amp;&amp; make install
==== 安装 libffi ====
</pre>
install libffi
==== 安装 pkg-config  ====
 
<pre>wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.1.tar.gz
wget ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz
tar -xvpf pkg-config-0.27.1.tar.gz
cd pkg-config-0.27.1
./configure --prefix=/usr --with-internal-glib &amp;&amp;
make
make install
</pre>
==== 安装 libffi ====
<pre>wget ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz
tar -xvpf libffi-3.0.11.tar.gz
tar -xvpf libffi-3.0.11.tar.gz
cd libffi-3.0.11
cd libffi-3.0.11
./configure --prefix=/usr &&
./configure --prefix=/usr &amp;&amp;
make -j10
make -j10
make install
make install
 
</pre>
==== 安装 expat ====
==== 安装 expat ====
 
<pre>wget http://downloads.sourceforge.net/expat/expat-2.1.0.tar.gz
install expat
tar -xvpf expat-2.1.0.tar.gz
 
cd expat-2.1.0
==== 安装 wayland ====
./configure --prefix=/usr &amp;&amp;
git clone git://anongit.freedesktop.org/wayland/wayland
make
 
make install
</pre>
==== 安装doxygen  ====
<pre>wget http://ftp.stack.nl/pub/doxygen/doxygen-1.8.2.src.tar.gz
tar -xvpf doxygen-1.8.2.src.tar.gz
cd doxygen-1.8.2.src
./configure --prefix /usr
make &amp;&amp; make install
</pre>
==== 安装 wayland ====
<pre>git clone git://anongit.freedesktop.org/wayland/wayland
cd wayland
cd wayland
./autogen.sh --prefix=$WLD --disable-documentation
./autogen.sh --prefix=$WLD --disable-documentation
make -j10
make -j10
make install
make install
==== libpthread-stubs-0.3 ====
</pre>
 
==== 安装 libpthread-stubs ====
wget http://xcb.freedesktop.org/dist/libpthread-stubs-0.3.tar.bz2
<pre>wget http://xcb.freedesktop.org/dist/libpthread-stubs-0.3.tar.bz2
tar -xvpf libpthread-stubs-0.3.tar.bz2
tar -xvpf libpthread-stubs-0.3.tar.bz2
cd libpthread-stubs-0.3
cd libpthread-stubs-0.3
./configure --prefix=/usr &&
./configure --prefix=/usr &amp;&amp;
make -j8
make -j8
make install
make install
==== libpciaccess ====
</pre>
 
==== libpciaccess ====
http://xorg.freedesktop.org/archive/individual/lib/libpciaccess-0.13.1.tar.gz
<pre>wget http://xorg.freedesktop.org/archive/individual/lib/libpciaccess-0.13.1.tar.gz
tar -xvpf libpciaccess-0.13.1.tar.gz
tar -xvpf libpciaccess-0.13.1.tar.gz
cd libpciaccess-0.13.1
cd libpciaccess-0.13.1
./configire --prefix=/usr
./configure --prefix=/usr
make
make
make install
make install
</pre>


==== 安装 drm ====
==== 安装 drm ====
 
<pre>git clone git://anongit.freedesktop.org/git/mesa/drm
git clone git://anongit.freedesktop.org/git/mesa/drm
cd drm
cd drm
./autogen.sh --prefix=$WLD
./autogen.sh --prefix=/usr
make -j8 && make install
make -j8 &amp;&amp; make install
 
</pre>
 
==== 安装 util-macros ====
 
<pre>wget http://xorg.freedesktop.org/releases/individual/util/util-macros-1.17.tar.bz2
 
 
==== 安装 util-macros-1.17 ====
 
wget http://xorg.freedesktop.org/releases/individual/util/util-macros-1.17.tar.bz2
tar -xvpf util-macros-1.17.tar.bz2
tar -xvpf util-macros-1.17.tar.bz2
cd util-macros-1.17
cd util-macros-1.17
./configure --prefix=$WLD
./configure --prefix=$WLD
make && make install
make &amp;&amp; make install
 
</pre>
 
==== 安装 proto-7.7  ====
<pre>
<pre>cat &gt; proto-7.7.md5 &lt;&lt; "EOF"
 
cat > proto-7.7.md5 << "EOF"
1a05fb01fa1d5198894c931cf925c025  bigreqsproto-1.1.2.tar.bz2
1a05fb01fa1d5198894c931cf925c025  bigreqsproto-1.1.2.tar.bz2
98482f65ba1e74a08bf5b056a4031ef0  compositeproto-0.4.2.tar.bz2
98482f65ba1e74a08bf5b056a4031ef0  compositeproto-0.4.2.tar.bz2
第143行: 第139行:
EOF
EOF


mkdir proto &&
mkdir proto &amp;&amp;
cd proto &&
cd proto &amp;&amp;
grep -v '^#' ../proto-7.7.md5 | awk '{print $2}' | wget -i- -c \
grep -v '^#' ../proto-7.7.md5 | awk '{print $2}' | wget -i- -c \
     -B http://xorg.freedesktop.org/releases/individual/proto/ &&
     -B http://xorg.freedesktop.org/releases/individual/proto/ &amp;&amp;
md5sum -c ../proto-7.7.md5
md5sum -c ../proto-7.7.md5


第164行: 第160行:
done
done


</pre>
</pre>  
 
==== 安装 makedepend ====
 
<pre>wget http://xorg.freedesktop.org/releases/individual/util/makedepend-1.0.4.tar.bz2
==== 安装pkg-config ====
==== 安装 makedepend-1.0.4 ====
wget http://xorg.freedesktop.org/releases/individual/util/makedepend-1.0.4.tar.bz2
tar -xvpf makedepend-1.0.4.tar.bz2
tar -xvpf makedepend-1.0.4.tar.bz2
cd makedepend-1.0.4
cd makedepend-1.0.4
./configure $XORG_CONFIG &&
./configure $XORG_CONFIG &amp;&amp;
make
make
make install
make install
 
</pre>
 
==== 安装 libxml2-2.9.0 ====
==== 安装 libxml2-2.9.0 ====
<pre>wget http://xmlsoft.org/sources/libxml2-2.9.0.tar.gz
wget http://xmlsoft.org/sources/libxml2-2.9.0.tar.gz
tar -xvpf libxml2-2.9.0.tar.gz
tar -xvpf libxml2-2.9.0.tar.gz
cd libxml2-2.9.0
cd libxml2-2.9.0
./configure --prefix=/usr --disable-static &&
./configure --prefix=/usr --disable-static &amp;&amp;
make
make
make install
</pre>


==== 安装libxslt ====
==== 安装 libxslt  ====
 
<pre>wget http://xmlsoft.org/sources/libxslt-1.1.27.tar.gz
wget http://xmlsoft.org/sources/libxslt-1.1.27.tar.gz
tar -xvpf libxslt-1.1.27.tar.gz
tar -xvpf libxslt-1.1.27.tar.gz
cd libxslt-1.1.27
cd libxslt-1.1.27
./configure --prefix=/usr --disable-static &&
./configure --prefix=/usr --disable-static &amp;&amp;
make
make
make install
make install
 
</pre>
==== 安装Python2.7.x ====
==== 安装 Python2.7.x ====
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.xz
<pre>wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.xz
tar -xvpf Python-2.7.3.tar.xz
tar -xvpf Python-2.7.3.tar.xz
cd Python-2.7.3
cd Python-2.7.3
sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" setup.py &&
sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" setup.py &amp;&amp;
./configure --prefix=/usr --enable-shared &&
./configure --prefix=/usr --enable-shared &amp;&amp;
make -j8
make -j8
==== 安装xcb-proto-1.7.1 ====
</pre>
wget http://xcb.freedesktop.org/dist/xcb-proto-1.7.1.tar.bz2
==== 安装 xcb-proto-1.7.1 ====
<pre>wget http://xcb.freedesktop.org/dist/xcb-proto-1.7.1.tar.bz2
tar -xvpf xcb-proto-1.7.1.tar.bz2
tar -xvpf xcb-proto-1.7.1.tar.bz2
cd xcb-proto-1.7.1
cd xcb-proto-1.7.1
./configure --prefix=/usr
./configure --prefix=/usr
make && make install
make &amp;&amp; make install
==== 安装libXau ====
</pre>
wget http://xorg.freedesktop.org/releases/individual/lib/libXau-1.0.7.tar.bz2
==== 安装libXau ====
<pre>wget http://xorg.freedesktop.org/releases/individual/lib/libXau-1.0.7.tar.bz2
tar -xvpf libXau-1.0.7.tar.bz2
tar -xvpf libXau-1.0.7.tar.bz2
cd libXau-1.0.7
cd libXau-1.0.7
./configure --prefix=/usr
./configure --prefix=/usr
make  
make  
make install  
make install
==== 安装libXdmcp ====
</pre>
wget http://xorg.freedesktop.org/releases/individual/lib/libXdmcp-1.1.1.tar.bz2
==== 安装libXdmcp ====
<pre>wget http://xorg.freedesktop.org/releases/individual/lib/libXdmcp-1.1.1.tar.bz2
tar -xvpf libXdmcp-1.1.1.tar.bz2
tar -xvpf libXdmcp-1.1.1.tar.bz2
cd libXdmcp-1.1.1
cd libXdmcp-1.1.1
./configure --prefix=/usr
./configure --prefix=/usr
make  
make  
make install  
make install
==== 安装libxcb ====
</pre>
wget http://xcb.freedesktop.org/dist/libxcb-1.8.1.tar.bz2
==== 安装 libxcb  ====
<pre>wget http://xcb.freedesktop.org/dist/libxcb-1.8.1.tar.bz2
tar -xvpf libxcb-1.8.1.tar.bz2
tar -xvpf libxcb-1.8.1.tar.bz2
cd libxcb-1.8.1
cd libxcb-1.8.1
第228行: 第224行:
make
make
make install
make install
==== 安装 Xorg lib ====
</pre>
<pre>
==== 安装 freetype-2.4.10  ====
cat > lib-7.7.md5 << "EOF"
<pre>wget http://downloads.sourceforge.net/freetype/freetype-2.4.10.tar.bz2
tar -xvpf freetype-2.4.10.tar.bz2
cd freetype-2.4.10
./configure --prefix=/usr --disable-static &amp;&amp;
make
make install
</pre>
==== fontconfig-2.10.  ====
<pre>wget http://fontconfig.org/release/fontconfig-2.10.1.tar.bz2
tar -xvpf fontconfig-2.10.1.tar.bz2
cd fontconfig-2.10.1
./configure --prefix=/usr \
            --sysconfdir=/etc \
            --localstatedir=/var \
            --docdir=/usr/share/doc/fontconfig-2.10.1 \
            --disable-docs \
            --disable-static &amp;&amp;
make
make install
</pre>
==== 安装 Xorg lib ====
<pre>cat &gt; lib-7.7.md5 &lt;&lt; "EOF"
84c66908cf003ad8c272b0eecbdbaee3  xtrans-1.2.7.tar.bz2
84c66908cf003ad8c272b0eecbdbaee3  xtrans-1.2.7.tar.bz2
78b4b3bab4acbdf0abcfca30a8c70cc6  libX11-1.5.0.tar.bz2
78b4b3bab4acbdf0abcfca30a8c70cc6  libX11-1.5.0.tar.bz2
第264行: 第281行:
EOF
EOF


 
mkdir lib &amp;&amp;
 
cd lib &amp;&amp;
mkdir lib &&
cd lib &&
grep -v '^#' ../lib-7.7.md5 | awk '{print $2}' | wget -i- -c \
grep -v '^#' ../lib-7.7.md5 | awk '{print $2}' | wget -i- -c \
     -B http://xorg.freedesktop.org/releases/individual/lib/ &&
     -B http://xorg.freedesktop.org/releases/individual/lib/ &amp;&amp;
md5sum -c ../lib-7.7.md5
md5sum -c ../lib-7.7.md5


第281行: 第296行:
     libXfont-[0-9]* )
     libXfont-[0-9]* )
       ./configure $XORG_CONFIG --disable-devel-docs
       ./configure $XORG_CONFIG --disable-devel-docs
    ;;
  &nbsp;;;
     libXt-[0-9]* )
     libXt-[0-9]* )
       ./configure $XORG_CONFIG \
       ./configure $XORG_CONFIG \
         --with-appdefaultdir=/etc/X11/app-defaults
         --with-appdefaultdir=/etc/X11/app-defaults
    ;;
  &nbsp;;;
     * )
     * )
       ./configure $XORG_CONFIG
       ./configure $XORG_CONFIG
    ;;
  &nbsp;;;
   esac
   esac
   make
   make
第296行: 第311行:
   /sbin/ldconfig
   /sbin/ldconfig
done
done
</pre>
</pre>  
 
==== 安装 llvm ====
==== 安装 llvm ====
<pre>wget http://llvm.org/releases/3.1/llvm-3.1.src.tar.gz
<pre>
wget http://llvm.org/releases/3.1/llvm-3.1.src.tar.gz
tar -xvpf llvm-3.1.src.tar.gz
tar -xvpf llvm-3.1.src.tar.gz
cd llvm-3.1.src
cd llvm-3.1.src
wget http://llvm.org/releases/3.1/clang-3.1.src.tar.gz
wget http://llvm.org/releases/3.1/clang-3.1.src.tar.gz
tar -xf clang-3.1.src.tar.gz -C tools &&
tar -xf clang-3.1.src.tar.gz -C tools &amp;&amp;
mv tools/clang-3.1.src tools/clang
mv tools/clang-3.1.src tools/clang
CC=gcc                                \
CC=gcc                                \
第317行: 第330行:
             --disable-debug-runtime    \
             --disable-debug-runtime    \
             --disable-assertions      \
             --disable-assertions      \
             --enable-optimized        &&
             --enable-optimized        &amp;&amp;


make  
make  
make install
make install
</pre>
</pre>  
==== 安装 Mesa  ====


==== 安装 Mesa ====
如果Mesa编译失败,可以在源码目录中尝试执行命令
Note on Mesa build failures: If you're not building in your Mesa git repo for the first time, the first thing to try is always "git clean -xfd", and possibly deleting your $WLD directory, as Mesa requires this often.
<pre> git clean -xfd </pre>
,原文如下


git clone git://anongit.freedesktop.org/mesa/mesa
Note on Mesa build failures: If you're not building in your Mesa git repo for the first time, the first thing to try is always "git clean -xfd", and possibly deleting your $WLD directory, as Mesa requires this often.
<pre>git clone git://anongit.freedesktop.org/mesa/mesa
cd mesa
cd mesa
./autogen.sh --prefix=$WLD \
./autogen.sh --prefix=$WLD \
第335行: 第351行:
--enable-shared-glapi \
--enable-shared-glapi \
--with-gallium-drivers=r300,r600,swrast,nouveau  
--with-gallium-drivers=r300,r600,swrast,nouveau  
make && make install
make &amp;&amp; make install
 
</pre>
wget ftp://ftp.freedesktop.org/pub/mesa/glu/glu-9.0.0.tar.bz2
==== 安装glu  ====
 
<pre>wget ftp://ftp.freedesktop.org/pub/mesa/glu/glu-9.0.0.tar.bz2
tar -xvpf glu-9.0.0.tar.bz2
cd glu-9.0.0
./configure --prefix=/usr --disable-static &amp;&amp;
make
make
make install
make install
 
</pre>
 
==== 安装 libxkbcommon ====
 
<pre>git clone git://anongit.freedesktop.org/git/xorg/lib/libxkbcommon
./configure --prefix=/usr                  \
            --sysconfdir=/etc              \
            --enable-texture-float        \
            --enable-gles1                \
            --enable-gles2                \
            --enable-openvg                \
            --enable-xa                    \
            --enable-gbm                  \
            --enable-gallium-egl          \
            --enable-gallium-gbm          \
            --enable-r600-llvm-compiler    \
            --enable-glx-tls              \
    --enable-shared-glapi   \
            --with-egl-platforms="x11,wayland,drm" \
            --with-gallium-drivers="nouveau,r300,r600,radeonsi,svga,swrast" &&
make
 
==== 安装 libxkbcommon ====
git clone git://people.freedesktop.org/xorg/lib/libxkbcommon.git
cd libxkbcommon/
cd libxkbcommon/
./autogen.sh --prefix=$WLD --with-xkb-config-root=/usr/share/X11/xkb
./autogen.sh --prefix=$WLD --with-xkb-config-root=/usr/share/X11/xkb
make && make install
make &amp;&amp; make install
==== pixman ====
</pre>
git clone git://anongit.freedesktop.org/pixman
==== 安装 pixman ====
<pre>git clone git://anongit.freedesktop.org/pixman
cd pixman
cd pixman
./autogen.sh --prefix=$WLD
./autogen.sh --prefix=$WLD
make && make install
make &amp;&amp; make install
==== libpng ====
</pre>
wget http://downloads.sourceforge.net/libpng/libpng-1.5.13.tar.xz
==== 安装 libpng ====
<pre>wget http://downloads.sourceforge.net/libpng/libpng-1.5.13.tar.xz
tar -xvpf libpng-1.5.13.tar.xz
tar -xvpf libpng-1.5.13.tar.xz
cd libpng-1.5.13
cd libpng-1.5.13
./configure --prefix=/usr --disable-static &&
./configure --prefix=/usr --disable-static &amp;&amp;
make -j10 && make install  
make -j10 &amp;&amp; make install
==== cairo ====
</pre>
<pre>
==== 安装 cairo ====
git clone git://anongit.freedesktop.org/cairo
<pre>git clone git://anongit.freedesktop.org/cairo
cd cairo
cd cairo
./autogen.sh --prefix=$WLD --enable-gl --enable-xcb --enable-tee
./autogen.sh --prefix=$WLD --enable-gl --enable-xcb --enable-tee
make && make install
make &amp;&amp; make install
</pre>
</pre>  
 
==== 安装 mtdev-1.1.3 ====
==== wayland demon ====
<pre>wget http://bitmath.org/code/mtdev/mtdev-1.1.3.tar.bz2
 
wayland demon
 
not wayland parts
 
wget http://dri.freedesktop.org/libdrm/libdrm-2.4.39.tar.bz2
tar -xvpf libdrm-2.4.39.tar.bz2
cd libdrm-2.4.39
./configure --prefix=/usr \
            --enable-udev \
            --enable-vmwgfx-experimental-api &&
make
make install
 
==== mtdev-1.1.3 ====
 
wget http://bitmath.org/code/mtdev/mtdev-1.1.3.tar.bz2
tar -xvpf mtdev-1.1.3.tar.bz2
tar -xvpf mtdev-1.1.3.tar.bz2
cd mtdev-1.1.3
cd mtdev-1.1.3
./configure --prefix=/usr --disable-static &&
./configure --prefix=/usr --disable-static &amp;&amp;
make
make
make install
make install
==== libjpeg ====
</pre>
wget http://www.ijg.org/files/jpegsrc.v8d.tar.gz
==== 安装 libjpeg ====
<pre>wget http://www.ijg.org/files/jpegsrc.v8d.tar.gz
tar -xvpf jpegsrc.v8d.tar.gz
tar -xvpf jpegsrc.v8d.tar.gz
cd jpeg-8d
cd jpeg-8d
./configure --prefix=/usr &&
./configure --prefix=/usr &amp;&amp;
make
make
make install
make install
==== Linux PAM ====
</pre>
<pre>
==== 安装 Linux PAM ====
wget http://linux-pam.org/library/Linux-PAM-1.1.6.tar.bz2
<pre>wget http://linux-pam.org/library/Linux-PAM-1.1.6.tar.bz2
tar -xvpf Linux-PAM-1.1.6.tar.bz2
tar -xvpf Linux-PAM-1.1.6.tar.bz2
cd Linux-PAM-1.1.6
cd Linux-PAM-1.1.6
第423行: 第409行:
             --sysconfdir=/etc \
             --sysconfdir=/etc \
             --docdir=/usr/share/doc/Linux-PAM-1.1.6 \
             --docdir=/usr/share/doc/Linux-PAM-1.1.6 \
             --disable-nis &&
             --disable-nis &amp;&amp;
make -j10
make -j10
make install
make install
</pre>
</pre>  
 
==== 安装 xbitmaps  ====
==== weston ====
<pre>wget http://xorg.freedesktop.org/releases/individual/data/xbitmaps-1.1.1.tar.bz2
<pre>
git clone git://anongit.freedesktop.org/wayland/weston
cd weston
./autogen.sh --prefix=$WLD
make
make install
</pre>
 
配置 weston
<pre>
cp weston.ini $HOME/.config/weston.ini
export XDG_RUNTIME_DIR=/tmp
weston
</pre>
 
==== xbitmaps ====
 
 
wget http://xorg.freedesktop.org/releases/individual/data/xbitmaps-1.1.1.tar.bz2
tar -xvpf xbitmaps-1.1.1.tar.bz2
tar -xvpf xbitmaps-1.1.1.tar.bz2
cd xbitmaps-1.1.1
cd xbitmaps-1.1.1
./configure $XORG_CONFIG
./configure $XORG_CONFIG
 
</pre>
==== gperf ====
==== 安装 gperf ====
wget http://ftp.gnu.org/gnu/gperf/gperf-3.0.4.tar.gz
<pre>wget http://ftp.gnu.org/gnu/gperf/gperf-3.0.4.tar.gz
tar -xvpf gperf-3.0.4.tar.gz
tar -xvpf gperf-3.0.4.tar.gz
cd gperf-3.0.4
cd gperf-3.0.4
./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.0.4 &&
./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.0.4 &amp;&amp;
make &&
make &amp;&amp;
make install
make install
 
</pre>
==== xcb-util-0.3.9 ====
==== 安装 xcb-util-0.3.9 ====
wget http://xorg.freedesktop.org/releases/individual/xcb/xcb-util-0.3.9.tar.bz2
<pre>wget http://xorg.freedesktop.org/releases/individual/xcb/xcb-util-0.3.9.tar.bz2
tar -xvpf xcb-util-0.3.9.tar.bz2
tar -xvpf xcb-util-0.3.9.tar.bz2
cd xcb-util-0.3.9
cd xcb-util-0.3.9
./configure $XORG_CONFIG &&
./configure $XORG_CONFIG &amp;&amp;
make &&
make &amp;&amp;
make install
make install
==== freetype-2.4.10 ====  
</pre>
 
==== 安装 xkbcomp-1.2.4 ====
wget http://downloads.sourceforge.net/freetype/freetype-2.4.10.tar.bz2
<pre>wget http://www.x.org/releases/X11R7.7/src/app/xkbcomp-1.2.4.tar.gz
tar -xvpf freetype-2.4.10.tar.bz2
tar -xvpf xkbcomp-1.2.4.tar.gz
cd freetype-2.4.10
cd xkbcomp-1.2.4
./configure --prefix=/usr --disable-static &&
./configure $XORG_CONFIG
make
make &amp;&amp; make install
make install
</pre>  
==== fontconfig-2.10. ====
==== XML-Parser-2.41 ====
wget http://fontconfig.org/release/fontconfig-2.10.1.tar.bz2
<pre>wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/perl-modules/XML-Parser-2.41.tar.gz
tar -xvpf fontconfig-2.10.1.tar.bz2
cd fontconfig-2.10.1
./configure --prefix=/usr \
            --sysconfdir=/etc \
            --localstatedir=/var \
            --docdir=/usr/share/doc/fontconfig-2.10.1 \
            --disable-docs \
            --disable-static &&
make
make install
 
==== Xorg App====
<pre>
cat > app-7.7.md5 << "EOF"
4a7a4a848c43c42f7d499b60666434a4  bdftopcf-1.0.3.tar.bz2
08e3f6b523da8b0af179f22f339508b2  iceauth-1.0.5.tar.bz2
c4a3664e08e5a47c120ff9263ee2f20c  luit-1.1.1.tar.bz2
18c429148c96c2079edda922a2b67632  mkfontdir-1.0.7.tar.bz2
414fcb053418fb1418e3a39f4a37e0f7  mkfontscale-1.1.0.tar.bz2
e99172cbd72700eeeae99f64632b5dc2  sessreg-1.0.7.tar.bz2
1001771344608e120e943a396317c33a  setxkbmap-1.3.0.tar.bz2
edce41bd7562dcdfb813e05dbeede8ac  smproxy-1.0.5.tar.bz2
5c3c7431a38775caaea6051312a49bc9  x11perf-1.5.4.tar.bz2
cbcbd8f2156a53b609800bec4c6b6c0e  xauth-1.0.7.tar.bz2
c9891d6a3f3129d56cede72daa0ba26c  xbacklight-1.1.2.tar.bz2
5812be48cbbec1068e7b718eec801766  xcmsdb-1.0.4.tar.bz2
09f56978a62854534deacc8aa8ff3031  xcursorgen-1.0.5.tar.bz2
1ef08f4c8d0e669c2edd49e4a1bf650d  xdpyinfo-1.3.0.tar.bz2
3d3cad4d754e10e325438193433d59fd  xdriinfo-1.0.4.tar.bz2
2727c72f3eba0c23f8f6b2e618d195a2  xev-1.2.0.tar.bz2
c06067f572bc4a5298f324f27340da95  xgamma-1.0.5.tar.bz2
a0fcd2cb6ddd9f378944cc6f4f83cd7c  xhost-1.0.5.tar.bz2
d2459d35b4e0b41ded26a1d1159b7ac6  xinput-1.6.0.tar.bz2
a0fc1ac3fc4fe479ade09674347c5aa0  xkbcomp-1.2.4.tar.bz2
37ed71525c63a9acd42e7cde211dcc5b  xkbevd-1.1.3.tar.bz2
52ad6d8d87577a8ac736ab5488bec210  xkbutils-1.0.3.tar.bz2
e7f0d57b6ba49c384e9cf8c9ff3243c1  xkill-1.0.3.tar.bz2
9d0e16d116d1c89e6b668c1b2672eb57  xlsatoms-1.1.1.tar.bz2
760099f0af112401735801e3b9aa8595  xlsclients-1.1.2.tar.bz2
d9b65f6881afe0d6d9863b30e1081bde  xmodmap-1.0.7.tar.bz2
6101f04731ffd40803df80eca274ec4b  xpr-1.0.4.tar.bz2
d5529dc8d811efabd136ca2d8e857deb  xprop-1.2.1.tar.bz2
9735173a84dca9b05e06fd4686196b07  xrandr-1.3.5.tar.bz2
ed2e48cf33584455d74615ad4bbe4246  xrdb-1.0.9.tar.bz2
2f63f88ad0dcecd33c8cf000f38e9250  xrefresh-1.0.4.tar.bz2
d44e0057d6722b25d5a314e82e0b7e7c  xset-1.2.2.tar.bz2
b78a2da4cf128775031a5a3422fc0b78  xsetroot-1.1.0.tar.bz2
c88feb501083951a8f47a21aaeb1529d  xvinfo-1.1.1.tar.bz2
2113126f9ac9c02bb8547c112c5d037e  xwd-1.0.5.tar.bz2
9e8b58c8aa6172e87ab4f9cf3612fedd  xwininfo-1.1.2.tar.bz2
3025b152b4f13fdffd0c46d0be587be6  xwud-1.0.4.tar.bz2
EOF
 
 
for package in $(grep -v '^#' ../app-7.7.md5 | awk '{print $2}')
do
  packagedir=${package%.tar.bz2}
  tar -xf $package
  pushd $packagedir
  ./configure $XORG_CONFIG
  make
  make install
  popd
  rm -r $packagedir
done
 
</pre>
 
==== XML-Parser-2.41 ====
 
wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/perl-modules/XML-Parser-2.41.tar.gz
tar -xvpf XML-Parser-2.41.tar.gz
tar -xvpf XML-Parser-2.41.tar.gz
cd XML-Parser-2.41
cd XML-Parser-2.41
perl Makefile.PL &&
perl Makefile.PL &amp;&amp;
make &&
make &amp;&amp;
make install
make install
 
</pre>
==== intltool-0.50.2 ====
==== intltool-0.50.2 ====
wget http://launchpad.net/intltool/trunk/0.50.2/+download/intltool-0.50.2.tar.gz
<pre>wget http://launchpad.net/intltool/trunk/0.50.2/+download/intltool-0.50.2.tar.gz
tar -xvpf intltool-0.50.2.tar.gz
tar -xvpf intltool-0.50.2.tar.gz
cd intltool-0.50.2
cd intltool-0.50.2
./configure --prefix=/usr &&
./configure --prefix=/usr &amp;&amp;
make
make
make install
make install
==== xkeyboard-config-2.6 ====
</pre>
wget http://xorg.freedesktop.org/releases/individual/data/xkeyboard-config/xkeyboard-config-2.6.tar.bz2
==== xkeyboard-config-2.6 ====
<pre>wget http://xorg.freedesktop.org/releases/individual/data/xkeyboard-config/xkeyboard-config-2.6.tar.bz2
tar -xvpf xkeyboard-config-2.6.tar.bz2
tar -xvpf xkeyboard-config-2.6.tar.bz2
cd xkeyboard-config-2.6
cd xkeyboard-config-2.6
./configure $XORG_CONFIG --with-xkb-rules-symlink=xorg &amp;&amp;
make
</pre>
==== wayland demon  ====


./configure $XORG_CONFIG --with-xkb-rules-symlink=xorg &&
==== weston  ====
<pre>git clone git://anongit.freedesktop.org/wayland/weston
cd weston
./autogen.sh --prefix=$WLD
make
make
 
make install
 
</pre>
<pre>
配置 weston
    $ sudo groupadd weston-launch
<pre>cp weston.ini $HOME/.config/weston.ini
export XDG_RUNTIME_DIR=/tmp
weston
</pre>  
==== 启动weston-launch  ====
<pre>    $ sudo groupadd weston-launch
     $ sudo usermod -a -G weston-launch $USER
     $ sudo usermod -a -G weston-launch $USER
     $ # Log all the way out (of X, etc.)
     $ # Log all the way out (of X, etc.)
第577行: 第486行:
     $ sudo chmod +s weston-launch
     $ sudo chmod +s weston-launch
     $ weston-launch
     $ weston-launch
</pre>
</pre>  
 
== client for wayland ==
=== GTK+3.6 ===
==== icu4c ====
<pre>
wget http://download.icu-project.org/files/icu4c/49.1.2/icu4c-49_1_2-src.tgz
tar -xvpf icu4c-49_1_2-src.tgz
cd source &&
./configure --prefix=/usr &&
make
make install
</pre>
==== pcre-8.31 ====
<pre>
wget http://downloads.sourceforge.net/pcre/pcre-8.31.tar.bz2
tar -xvpf pcre-8.31.tar.bz2
pushd pcre-8.31
./configure --prefix=/usr \
            --docdir=/usr/share/doc/pcre-8.31 \
            --enable-utf \
            --enable-unicode-properties \
            --enable-pcregrep-libz \
            --enable-pcregrep-libbz2 \
            --disable-static &&
make
make install
popd
</pre>
==== glib ====
<pre>
git clone git://git.gnome.org/glib
pushd glib
./configure --prefix=/usr --with-pcre=system &&
make -j10
make install
popd
</pre>
 
==== harfbuzz-0.9.5 ====
<pre>
wget http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.5.tar.bz2
tar -xvpf harfbuzz-0.9.5.tar.bz2
pushd harfbuzz-0.9.5
./configure --prefix=/usr &&
make -j10
make install
popd
</pre>
 
==== Pango-1.32.1 ====
 
* Required
# Cairo-1.12.6
# glib-2.33
# Harfbuzz-0.9.5
# Xorg Libraries
   
 
<pre>
wget http://ftp.gnome.org/pub/gnome/sources/pango/1.32/pango-1.32.1.tar.xz
tar -xvpf pango-1.32.1.tar.xz
pushd pango-1.32.1
./configure --prefix=/usr --sysconfdir=/etc &&
make -j10
make uninstall
popd
 
</pre>


==== gdk-pixbuf-2.26.4 ====
=== GTK+-3.6 for wayland  ===
<pre>
wget http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.26/gdk-pixbuf-2.26.4.tar.xz
tar -xvpf gdk-pixbuf-2.26.4.tar.xz
cd gdk-pixbuf-2.26.4
./configure --prefix=/usr --without-libtiff
make -j4
make install
</pre>


==== dbus-1.6.8 ====
==== UnZip-6.0  ====
<pre>
<pre>wget http://downloads.sourceforge.net/infozip/unzip60.tar.gz
 
groupadd -g 18 messagebus &&
useradd -c "D-Bus Message Daemon User" -d /var/run/dbus \
        -u 18 -g messagebus -s /bin/false messagebus
 
 
wget http://dbus.freedesktop.org/releases/dbus/dbus-1.6.8.tar.gz
tar -xvpf dbus-1.6.8.tar.gz
cd dbus-1.6.8
./configure --prefix=/usr \
            --sysconfdir=/etc \
            --localstatedir=/var \
            --libexecdir=/usr/lib/dbus-1.0 \
            --with-console-auth-dir=/run/console/ \
            --without-systemdsystemunitdir \
            --disable-systemd \
            --disable-static &&
make
make install
 
cat > /etc/dbus-1/session-local.conf << "EOF"
<!DOCTYPE busconfig PUBLIC
  "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
 
  <!-- Search for .service files in /usr/local -->
  <servicedir>/usr/local/share/dbus-1/services</servicedir>
 
</busconfig>
EOF
 
wget http://www.linuxfromscratch.org/blfs/downloads/svn/blfs-bootscripts-20120828.tar.bz2
tar -xvpf blfs-bootscripts-20120828.tar.bz2
cd blfs-bootscripts-20120828
make install-dbus
 
</pre>
 
==== atk ====
<pre>
git clone git://git.gnome.org/atk
cd atk
./configure --prefix=/usr &&
make
make install
</pre>
 
==== at-spi2-core-2.6.1 ====
<pre>
wget http://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.6/at-spi2-core-2.6.1.tar.xz
tar -xvpf at-spi2-core-2.6.1.tar.xz
cd at-spi2-core-2.6.1
./configure --prefix=/usr \
            --sysconfdir=/etc \
            --libexecdir=/usr/lib/at-spi2-core &&
make
make install
</pre>
 
==== at-spi2-atk-2.6.1 ====
<pre>
wget http://ftp.gnome.org/pub/gnome/sources/at-spi2-atk/2.6/at-spi2-atk-2.6.1.tar.xz
tar -xvpf at-spi2-atk-2.6.1.tar.xz
cd at-spi2-atk-2.6.1
./configure --prefix=/usr &&
make
make install
 
</pre>
 
==== gtk+ ====
For correct functionality with current Wayland you must use the GTK+ master branch. As a precursor to these steps you must have downloaded and compiled Wayland as per the building instructions.
 
GTK+ master also currently depends on an unstable release version of glib and atk. To avoid problems it is advisable to install this into the prefix used in the Wayland build instructions.
 
<pre>
git clone git://git.gnome.org/gtk+
cd gtk+
./configure --prefix=/usr --sysconfdir=/etc --disable-packagekit --enable-wayland-backend &&
make -j10
make install
</pre>
 
=== GTK for wayland ===
 
==== UnZip-6.0 ====
<pre>
wget http://downloads.sourceforge.net/infozip/unzip60.tar.gz
tar -xvpf unzip60.tar.gz
tar -xvpf unzip60.tar.gz
cd unzip60
cd unzip60
第754行: 第500行:
     sed -i -e 's/DASM"/DASM -DNO_LCHMOD"/' unix/Makefile
     sed -i -e 's/DASM"/DASM -DNO_LCHMOD"/' unix/Makefile
     make -f unix/Makefile linux
     make -f unix/Makefile linux
    ;;
  &nbsp;;;
   *)
   *)
     sed -i -e 's/CFLAGS="-O -Wall/& -DNO_LCHMOD/' unix/Makefile
     sed -i -e 's/CFLAGS="-O -Wall/&amp; -DNO_LCHMOD/' unix/Makefile
     make -f unix/Makefile linux_noasm
     make -f unix/Makefile linux_noasm
    ;;
  &nbsp;;;
esac
esac


make prefix=/usr install
make prefix=/usr install


</pre>
</pre>  
 
==== docbook-xml-4.5.zip ====
==== docbook-xml-4.5.zip ====
<pre>wget http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip
<pre>
wget http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip
mkdir docbook-xml
mkdir docbook-xml
unzip -x docbook-xml-4.5.zip -d docbook-xml
unzip -x docbook-xml-4.5.zip -d docbook-xml
cd docbook-xml
cd docbook-xml


install -v -d -m755 /usr/share/xml/docbook/xml-dtd-4.5 &&
install -v -d -m755 /usr/share/xml/docbook/xml-dtd-4.5 &amp;&amp;
install -v -d -m755 /etc/xml &&
install -v -d -m755 /etc/xml &amp;&amp;
chown -R root:root . &&
chown -R root:root . &amp;&amp;
cp -v -af docbook.cat *.dtd ent/ *.mod /usr/share/xml/docbook/xml-dtd-4.5
cp -v -af docbook.cat *.dtd ent/ *.mod /usr/share/xml/docbook/xml-dtd-4.5


if [ ! -e /etc/xml/docbook ]; then
if [&nbsp;! -e /etc/xml/docbook ]; then
     xmlcatalog --noout --create /etc/xml/docbook
     xmlcatalog --noout --create /etc/xml/docbook
fi &&
fi &amp;&amp;
xmlcatalog --noout --add "public" \
xmlcatalog --noout --add "public" \
     "-//OASIS//DTD DocBook XML V4.5//EN" \
     "-//OASIS//DTD DocBook XML V4.5//EN" \
     "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
     "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
     /etc/xml/docbook &&
     /etc/xml/docbook &amp;&amp;
xmlcatalog --noout --add "public" \
xmlcatalog --noout --add "public" \
     "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
     "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
     /etc/xml/docbook &&
     /etc/xml/docbook &amp;&amp;
xmlcatalog --noout --add "public" \
xmlcatalog --noout --add "public" \
     "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
     "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
     /etc/xml/docbook &&
     /etc/xml/docbook &amp;&amp;
xmlcatalog --noout --add "public" \
xmlcatalog --noout --add "public" \
     "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
     "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
     /etc/xml/docbook &&
     /etc/xml/docbook &amp;&amp;
xmlcatalog --noout --add "public" \
xmlcatalog --noout --add "public" \
     "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
     "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
     /etc/xml/docbook &&
     /etc/xml/docbook &amp;&amp;
xmlcatalog --noout --add "public" \
xmlcatalog --noout --add "public" \
     "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
     "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
     /etc/xml/docbook &&
     /etc/xml/docbook &amp;&amp;
xmlcatalog --noout --add "public" \
xmlcatalog --noout --add "public" \
     "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
     "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
     /etc/xml/docbook &&
     /etc/xml/docbook &amp;&amp;
xmlcatalog --noout --add "public" \
xmlcatalog --noout --add "public" \
     "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
     "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
     /etc/xml/docbook &&
     /etc/xml/docbook &amp;&amp;
xmlcatalog --noout --add "public" \
xmlcatalog --noout --add "public" \
     "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
     "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
     /etc/xml/docbook &&
     /etc/xml/docbook &amp;&amp;
xmlcatalog --noout --add "rewriteSystem" \
xmlcatalog --noout --add "rewriteSystem" \
     "http://www.oasis-open.org/docbook/xml/4.5" \
     "http://www.oasis-open.org/docbook/xml/4.5" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5" \
     /etc/xml/docbook &&
     /etc/xml/docbook &amp;&amp;
xmlcatalog --noout --add "rewriteURI" \
xmlcatalog --noout --add "rewriteURI" \
     "http://www.oasis-open.org/docbook/xml/4.5" \
     "http://www.oasis-open.org/docbook/xml/4.5" \
第825行: 第569行:
     /etc/xml/docbook
     /etc/xml/docbook


if [ ! -e /etc/xml/catalog ]; then
if [&nbsp;! -e /etc/xml/catalog ]; then
     xmlcatalog --noout --create /etc/xml/catalog
     xmlcatalog --noout --create /etc/xml/catalog
fi &&
fi &amp;&amp;
xmlcatalog --noout --add "delegatePublic" \
xmlcatalog --noout --add "delegatePublic" \
     "-//OASIS//ENTITIES DocBook XML" \
     "-//OASIS//ENTITIES DocBook XML" \
     "file:///etc/xml/docbook" \
     "file:///etc/xml/docbook" \
     /etc/xml/catalog &&
     /etc/xml/catalog &amp;&amp;
xmlcatalog --noout --add "delegatePublic" \
xmlcatalog --noout --add "delegatePublic" \
     "-//OASIS//DTD DocBook XML" \
     "-//OASIS//DTD DocBook XML" \
     "file:///etc/xml/docbook" \
     "file:///etc/xml/docbook" \
     /etc/xml/catalog &&
     /etc/xml/catalog &amp;&amp;
xmlcatalog --noout --add "delegateSystem" \
xmlcatalog --noout --add "delegateSystem" \
     "http://www.oasis-open.org/docbook/" \
     "http://www.oasis-open.org/docbook/" \
     "file:///etc/xml/docbook" \
     "file:///etc/xml/docbook" \
     /etc/xml/catalog &&
     /etc/xml/catalog &amp;&amp;
xmlcatalog --noout --add "delegateURI" \
xmlcatalog --noout --add "delegateURI" \
     "http://www.oasis-open.org/docbook/" \
     "http://www.oasis-open.org/docbook/" \
第845行: 第589行:
     /etc/xml/catalog
     /etc/xml/catalog


</pre>
for DTDVERSION in 4.1.2 4.2 4.3 4.4
 
do
==== docbook-xsl-1.77.1 ====
  xmlcatalog --noout --add "public" \
<pre>
    "-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \
wget http://downloads.sourceforge.net/docbook/docbook-xsl-1.77.1.tar.bz2
    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \
    /etc/xml/docbook
  xmlcatalog --noout --add "rewriteSystem" \
    "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5" \
    /etc/xml/docbook
  xmlcatalog --noout --add "rewriteURI" \
    "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5" \
    /etc/xml/docbook
  xmlcatalog --noout --add "delegateSystem" \
    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
    "file:///etc/xml/docbook" \
    /etc/xml/catalog
  xmlcatalog --noout --add "delegateURI" \
    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
    "file:///etc/xml/docbook" \
    /etc/xml/catalog
done
</pre>  
==== docbook-xsl-1.77.1 ====
<pre>wget http://downloads.sourceforge.net/docbook/docbook-xsl-1.77.1.tar.bz2
tar -xvpf docbook-xsl-1.77.1.tar.bz2
tar -xvpf docbook-xsl-1.77.1.tar.bz2
cd docbook-xsl-1.77.1  
cd docbook-xsl-1.77.1  


install -v -m755 -d /usr/share/xml/docbook/xsl-stylesheets-1.77.1 &&
install -v -m755 -d /usr/share/xml/docbook/xsl-stylesheets-1.77.1 &amp;&amp;


cp -v -R VERSION common eclipse epub extensions fo highlighting html \
cp -v -R VERSION common eclipse epub extensions fo highlighting html \
第859行: 第624行:
         roundtrip slides template tests tools webhelp website \
         roundtrip slides template tests tools webhelp website \
         xhtml xhtml-1_1 \
         xhtml xhtml-1_1 \
     /usr/share/xml/docbook/xsl-stylesheets-1.77.1 &&
     /usr/share/xml/docbook/xsl-stylesheets-1.77.1 &amp;&amp;


ln -s VERSION /usr/share/xml/docbook/xsl-stylesheets-1.77.1/VERSION.xsl &&
ln -s VERSION /usr/share/xml/docbook/xsl-stylesheets-1.77.1/VERSION.xsl &amp;&amp;


install -v -m644 -D README /usr/share/doc/docbook-xsl-1.77.1/README.txt &&
install -v -m644 -D README /usr/share/doc/docbook-xsl-1.77.1/README.txt &amp;&amp;
install -v -m755    RELEASE-NOTES* NEWS* /usr/share/doc/docbook-xsl-1.77.1
install -v -m755    RELEASE-NOTES* NEWS* /usr/share/doc/docbook-xsl-1.77.1


if [ ! -d /etc/xml ]; then install -v -m755 -d /etc/xml; fi &&
if [&nbsp;! -d /etc/xml ]; then install -v -m755 -d /etc/xml; fi &amp;&amp;
if [ ! -f /etc/xml/catalog ]; then
if [&nbsp;! -f /etc/xml/catalog ]; then
     xmlcatalog --noout --create /etc/xml/catalog
     xmlcatalog --noout --create /etc/xml/catalog
fi &&
fi &amp;&amp;


xmlcatalog --noout --add "rewriteSystem" \
xmlcatalog --noout --add "rewriteSystem" \
           "http://docbook.sourceforge.net/release/xsl/1.77.1" \
           "http://docbook.sourceforge.net/release/xsl/1.77.1" \
           "/usr/share/xml/docbook/xsl-stylesheets-1.77.1" \
           "/usr/share/xml/docbook/xsl-stylesheets-1.77.1" \
     /etc/xml/catalog &&
     /etc/xml/catalog &amp;&amp;


xmlcatalog --noout --add "rewriteURI" \
xmlcatalog --noout --add "rewriteURI" \
           "http://docbook.sourceforge.net/release/xsl/1.77.1" \
           "http://docbook.sourceforge.net/release/xsl/1.77.1" \
           "/usr/share/xml/docbook/xsl-stylesheets-1.77.1" \
           "/usr/share/xml/docbook/xsl-stylesheets-1.77.1" \
     /etc/xml/catalog &&
     /etc/xml/catalog &amp;&amp;


xmlcatalog --noout --add "rewriteSystem" \
xmlcatalog --noout --add "rewriteSystem" \
           "http://docbook.sourceforge.net/release/xsl/current" \
           "http://docbook.sourceforge.net/release/xsl/current" \
           "/usr/share/xml/docbook/xsl-stylesheets-1.77.1" \
           "/usr/share/xml/docbook/xsl-stylesheets-1.77.1" \
     /etc/xml/catalog &&
     /etc/xml/catalog &amp;&amp;


xmlcatalog --noout --add "rewriteURI" \
xmlcatalog --noout --add "rewriteURI" \
第892行: 第657行:




</pre>
</pre>  
 
==== gtk-doc-1.18 ====
==== gtk-doc-1.18 ====
<pre>wget http://ftp.gnome.org/pub/gnome/sources/gtk-doc/1.18/gtk-doc-1.18.tar.xz
<pre>
wget http://ftp.gnome.org/pub/gnome/sources/gtk-doc/1.18/gtk-doc-1.18.tar.xz
tar -xvpf gtk-doc-1.18.tar.xz
tar -xvpf gtk-doc-1.18.tar.xz
cd gtk-doc-1.18
cd gtk-doc-1.18
./configure --prefix=/usr &&
./configure --prefix=/usr &amp;&amp;
make
make install
</pre>
==== gobject-introspection  ====
<pre>wget http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/1.34/gobject-introspection-1.34.2.tar.xz
tar -xvpf gobject-introspection-1.34.2.tar.xz
cd gobject-introspection-1.34.2
./configure --prefix=/usr --disable-static &amp;&amp;
make
make install
</pre>
==== glib-2.34.2  ====
<pre>http://ftp.gnome.org/pub/gnome/sources/glib/2.34/glib-2.34.2.tar.xz
tar -xvpf glib-2.34.2.tar.xz
cd glib-2.34.2
./configure --prefix=/usr --with-pcre=system &amp;&amp;
make
make install
</pre>
==== Atk-2.6.0  ====
<pre>wget http://ftp.gnome.org/pub/gnome/sources/atk/2.6/atk-2.6.0.tar.xz
tar -xvpf atk-2.6.0.tar.xz
cd atk-2.6.0
./configure --prefix=/usr &amp;&amp;
make
make
make install
make install
</pre>
</pre>  
 
==== gdk-pixbuf-2.26.4 ====
 
<pre>wget http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.26/gdk-pixbuf-2.26.4.tar.xz
==== glib ====
<pre>
git clone git://git.gnome.org/glib
pushd glib
./autogen.sh --prefix=$WLD
make && make install
popd
</pre>
 
==== atk ====
<pre>
git clone git://git.gnome.org/atk
pushd atk
./autogen.sh --prefix=$WLD
make && make install
popd
</pre>
 
==== gobject-introspection ====
git clone git://git.gnome.org/gobject-introspection
==== gdk-pixbuf-2.26.4 ====
<pre>
wget http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.26/gdk-pixbuf-2.26.4.tar.xz
tar -xvpf gdk-pixbuf-2.26.4.tar.xz
tar -xvpf gdk-pixbuf-2.26.4.tar.xz
cd gdk-pixbuf-2.26.4
cd gdk-pixbuf-2.26.4
第933行: 第697行:
make -j4
make -j4
make install
make install
gdk-pixbuf-query-loaders --update-cache
</pre>
</pre>


==== gtk+ ====
==== cairo-1.12.8  ====
<pre>
<pre>wget http://cairographics.org/releases/cairo-1.12.8.tar.xz
git clone git://git.gnome.org/gtk+
tar -xvpf cairo-1.12.8.tar.xz
cd cairo-1.12.8
./configure --prefix=/usr \
            --enable-tee  \
            --enable-xcb  \
            --disable-static &amp;&amp;
make
make install
</pre>
==== harfbuzz-0.9.6  ====
<pre>wget http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.6.tar.bz2
tar -xvpf harfbuzz-0.9.6.tar.bz2
cd harfbuzz-0.9.6
./configure --prefix=/usr &amp;&amp;
make
make install
</pre>
==== pango-1.32.2  ====
<pre>wget http://ftp.gnome.org/pub/gnome/sources/pango/1.32/pango-1.32.2.tar.xz
tar -xvpf pango-1.32.2.tar.xz
cd pango-1.32.2
./configure --prefix=/usr --sysconfdir=/etc &amp;&amp;
make
make install
pango-querymodules --update-cache
</pre>
==== gtk+ ====
<pre>git clone git://git.gnome.org/gtk+
pushd gtk+
pushd gtk+
./autogen.sh --prefix=$WLD --enable-wayland-backend
./autogen.sh --prefix=$WLD --enable-wayland-backend
make && make install
make &amp;&amp; make install
popd
popd
</pre>
</pre>

2013年1月18日 (五) 10:26的最新版本

wayland的编译

基础知识

  1. 具有LFS编译经验
  2. 一个可用的LFS系统(仅在LFS 7.0 64位版本编译通过,其他系统或者LFS版本没有测试验证)
  3. 本篇wayland编译笔记以Xorg7.7为基础,相应版本的软件包请参考Xorg7.7发布版本

设置环境变量

WLD=/usr/  
LD_LIBRARY_PATH=$WLD/lib64
PKG_CONFIG_PATH=$WLD/lib64/pkgconfig/:$WLD/share/pkgconfig/
ACLOCAL="aclocal -I $WLD/share/aclocal"
XORG_CONFIG="--prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --localstatedir=/var"

export WLD LD_LIBRARY_PATH PKG_CONFIG_PATH ACLOCAL XORG_CONFIG 

安装一些基本工具

openssl

wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
tar -xvpf openssl-1.0.1c.tar.gz
cd openssl-1.0.1c
./config --prefix=/usr zlib-dynamic --openssldir=/etc/ssl shared
make
make install

安装 wget

wget http://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz
tar -xvpf wget-1.14.tar.xz
cd wget-1.14
./configure --prefix=/usr  --sysconfdir=/etc  --with-ssl=openssl &&
make
make install

安装 git

最新版本为 1.8.0

wget http://git-core.googlecode.com/files/git-1.8.0.tar.gz 
tar -xvpf git-1.8.0.tar.gz
cd git-1.8.0 
./configure --without-python
make && make install

安装 pkg-config

wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.1.tar.gz
tar -xvpf pkg-config-0.27.1.tar.gz
cd pkg-config-0.27.1
./configure --prefix=/usr --with-internal-glib &&
make
make install

安装 libffi

wget ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz
tar -xvpf libffi-3.0.11.tar.gz
cd libffi-3.0.11
./configure --prefix=/usr &&
make -j10
make install

安装 expat

wget http://downloads.sourceforge.net/expat/expat-2.1.0.tar.gz
tar -xvpf expat-2.1.0.tar.gz
cd expat-2.1.0
./configure --prefix=/usr &&
make
make install

安装doxygen

wget http://ftp.stack.nl/pub/doxygen/doxygen-1.8.2.src.tar.gz
tar -xvpf doxygen-1.8.2.src.tar.gz
cd doxygen-1.8.2.src
./configure --prefix /usr
make && make install

安装 wayland

git clone git://anongit.freedesktop.org/wayland/wayland
cd wayland
./autogen.sh --prefix=$WLD --disable-documentation
make -j10
make install

安装 libpthread-stubs

wget http://xcb.freedesktop.org/dist/libpthread-stubs-0.3.tar.bz2
tar -xvpf libpthread-stubs-0.3.tar.bz2
cd libpthread-stubs-0.3
./configure --prefix=/usr &&
make -j8
make install

libpciaccess

wget http://xorg.freedesktop.org/archive/individual/lib/libpciaccess-0.13.1.tar.gz
tar -xvpf libpciaccess-0.13.1.tar.gz
cd libpciaccess-0.13.1
./configure --prefix=/usr
make
make install

安装 drm

git clone git://anongit.freedesktop.org/git/mesa/drm
cd drm
./autogen.sh --prefix=/usr
make -j8 && make install

安装 util-macros

wget http://xorg.freedesktop.org/releases/individual/util/util-macros-1.17.tar.bz2
tar -xvpf util-macros-1.17.tar.bz2
cd util-macros-1.17
./configure --prefix=$WLD
make && make install

安装 proto-7.7

cat > proto-7.7.md5 << "EOF"
1a05fb01fa1d5198894c931cf925c025  bigreqsproto-1.1.2.tar.bz2
98482f65ba1e74a08bf5b056a4031ef0  compositeproto-0.4.2.tar.bz2
998e5904764b82642cc63d97b4ba9e95  damageproto-1.2.1.tar.bz2
4ee175bbd44d05c34d43bb129be5098a  dmxproto-2.3.1.tar.bz2
2eb74959684f47c862081099059a11ab  dri2proto-2.6.tar.bz2
e7431ab84d37b2678af71e29355e101d  fixesproto-5.0.tar.bz2
c5f4f1fb4ba7766eedbc9489e81f3be2  fontsproto-2.1.2.tar.bz2
d1ff0c1acc605689919c1ee2fc9b5582  glproto-1.4.15.tar.bz2
13c8aedaf98a92e282b7e456c0a5bed9  inputproto-2.2.tar.bz2
677ea8523eec6caca86121ad2dca0b71  kbproto-1.0.6.tar.bz2
597491c0d8055e2a66f11350c4985775  randrproto-1.3.2.tar.bz2
1b4e5dede5ea51906f1530ca1e21d216  recordproto-1.14.2.tar.bz2
a914ccc1de66ddeb4b611c6b0686e274  renderproto-0.11.1.tar.bz2
cfdb57dae221b71b2703f8e2980eaaf4  resourceproto-1.2.0.tar.bz2
edd8a73775e8ece1d69515dd17767bfb  scrnsaverproto-1.2.2.tar.bz2
c3b348c6e2031b72b11ae63fc7f805c2  videoproto-2.3.1.tar.bz2
5f4847c78e41b801982c8a5e06365b24  xcmiscproto-1.2.2.tar.bz2
eaac343af094e6b608cf15cfba0f77c5  xextproto-7.2.1.tar.bz2
120e226ede5a4687b25dd357cc9b8efe  xf86bigfontproto-1.2.0.tar.bz2
a036dc2fcbf052ec10621fd48b68dbb1  xf86dgaproto-2.1.tar.bz2
1d716d0dac3b664e5ee20c69d34bc10e  xf86driproto-2.1.1.tar.bz2
e793ecefeaecfeabd1aed6a01095174e  xf86vidmodeproto-2.3.1.tar.bz2
9959fe0bfb22a0e7260433b8d199590a  xineramaproto-1.2.1.tar.bz2
d4d241a4849167e4e694fe73371c328c  xproto-7.0.23.tar.bz2
EOF

mkdir proto &&
cd proto &&
grep -v '^#' ../proto-7.7.md5 | awk '{print $2}' | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/proto/ &&
md5sum -c ../proto-7.7.md5

export XORG_PREFIX="/usr"
export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc \
    --mandir=$XORG_PREFIX/share/man --localstatedir=/var"

for package in $(grep -v '^#' ../proto-7.7.md5 | awk '{print $2}')
do
  packagedir=${package%.tar.bz2}
  tar -xf $package
  pushd $packagedir
  ./configure $XORG_CONFIG
  make install
  popd
  rm -r $packagedir
done

安装 makedepend

wget http://xorg.freedesktop.org/releases/individual/util/makedepend-1.0.4.tar.bz2
tar -xvpf makedepend-1.0.4.tar.bz2
cd makedepend-1.0.4
./configure $XORG_CONFIG &&
make
make install

安装 libxml2-2.9.0

wget http://xmlsoft.org/sources/libxml2-2.9.0.tar.gz
tar -xvpf libxml2-2.9.0.tar.gz
cd libxml2-2.9.0
./configure --prefix=/usr --disable-static &&
make
make install

安装 libxslt

wget http://xmlsoft.org/sources/libxslt-1.1.27.tar.gz
tar -xvpf libxslt-1.1.27.tar.gz
cd libxslt-1.1.27
./configure --prefix=/usr --disable-static &&
make
make install

安装 Python2.7.x

wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.xz
tar -xvpf Python-2.7.3.tar.xz
cd Python-2.7.3
sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" setup.py &&
./configure --prefix=/usr --enable-shared &&
make -j8

安装 xcb-proto-1.7.1

wget http://xcb.freedesktop.org/dist/xcb-proto-1.7.1.tar.bz2
tar -xvpf xcb-proto-1.7.1.tar.bz2
cd xcb-proto-1.7.1
./configure --prefix=/usr
make && make install

安装libXau

wget http://xorg.freedesktop.org/releases/individual/lib/libXau-1.0.7.tar.bz2
tar -xvpf libXau-1.0.7.tar.bz2
cd libXau-1.0.7
./configure --prefix=/usr
make 
make install

安装libXdmcp

wget http://xorg.freedesktop.org/releases/individual/lib/libXdmcp-1.1.1.tar.bz2
tar -xvpf libXdmcp-1.1.1.tar.bz2
cd libXdmcp-1.1.1
./configure --prefix=/usr
make 
make install

安装 libxcb

wget http://xcb.freedesktop.org/dist/libxcb-1.8.1.tar.bz2
tar -xvpf libxcb-1.8.1.tar.bz2
cd libxcb-1.8.1
./configure $XORG_CONFIG
make
make install

安装 freetype-2.4.10

wget http://downloads.sourceforge.net/freetype/freetype-2.4.10.tar.bz2
tar -xvpf freetype-2.4.10.tar.bz2
cd freetype-2.4.10
./configure --prefix=/usr --disable-static &&
make
make install

fontconfig-2.10.

wget http://fontconfig.org/release/fontconfig-2.10.1.tar.bz2
tar -xvpf fontconfig-2.10.1.tar.bz2
cd fontconfig-2.10.1
./configure --prefix=/usr \
            --sysconfdir=/etc \
            --localstatedir=/var \
            --docdir=/usr/share/doc/fontconfig-2.10.1 \
            --disable-docs \
            --disable-static &&
make 
make install

安装 Xorg lib

cat > lib-7.7.md5 << "EOF"
84c66908cf003ad8c272b0eecbdbaee3  xtrans-1.2.7.tar.bz2
78b4b3bab4acbdf0abcfca30a8c70cc6  libX11-1.5.0.tar.bz2
71251a22bc47068d60a95f50ed2ec3cf  libXext-1.3.1.tar.bz2
645f83160cf7b562734e2038045106d1  libFS-1.0.4.tar.bz2
471b5ca9f5562ac0d6eac7a0bf650738  libICE-1.0.8.tar.bz2
766de9d1e1ecf8bf74cebe2111d8e2bd  libSM-1.2.1.tar.bz2
7a773b16165e39e938650bcc9027c1d5  libXScrnSaver-1.2.2.tar.bz2
a6f137ae100e74ebe3b71eb4a38c40b3  libXt-1.1.3.tar.bz2
a4efff8de85bd45dd3da124285d10c00  libXmu-1.1.1.tar.bz2
7ae7eff7a14d411e84a67bd166bcec1a  libXpm-3.5.10.tar.bz2
f39942f2cab379fc9b4c3731bf191b84  libXaw-1.0.11.tar.bz2
678071bd7f9f7467e2fc712d81022318  libXfixes-5.0.tar.bz2
a60e0b5c276d0aa9e2d3b982c98f61c8  libXcomposite-0.4.3.tar.bz2
ee62f4c7f0f16ced4da63308963ccad2  libXrender-0.9.7.tar.bz2
52efa81b7f26c8eda13510a2fba98eea  libXcursor-1.1.13.tar.bz2
44774e1a065158b52f1a0da5100cebec  libXdamage-1.1.3.tar.bz2
a2a861f142c3b4367f14fc14239fc1f7  libfontenc-1.1.1.tar.bz2
6851da5dae0a6cf5f7c9b9e2b05dd3b4  libXfont-1.4.5.tar.bz2
78d64dece560c9e8699199f3faa521c0  libXft-2.3.1.tar.bz2
78ee882e1ff3b192cf54070bdb19938e  libXi-1.6.1.tar.bz2
cb45d6672c93a608f003b6404f1dd462  libXinerama-1.1.2.tar.bz2
92473da2fccf5fac665be4fa4f2037fa  libXrandr-1.3.2.tar.bz2
80d0c6d8522fa7a645e4f522e9a9cd20  libXres-1.0.6.tar.bz2
e8abc5c00c666f551cf26aa53819d592  libXtst-1.2.1.tar.bz2
5e1ac203ccd3ce3e89755ed1fbe75b0b  libXv-1.0.7.tar.bz2
3340c99ff556ea2457b4be47f5cb96fa  libXvMC-1.0.7.tar.bz2
b7f38465c46e7145782d37dbb9da8c09  libXxf86dga-1.1.3.tar.bz2
ffd93bcedd8b2b5aeabf184e7b91f326  libXxf86vm-1.1.2.tar.bz2
782ced3a9e754dfeb53a8a006a75eb1a  libdmx-1.1.2.tar.bz2
399a419ac6a54f0fc07c69c9bdf452dc  libpciaccess-0.13.1.tar.bz2
19e6533ae64abba0773816a23f2b9507  libxkbfile-1.0.8.tar.bz2
EOF

mkdir lib &&
cd lib &&
grep -v '^#' ../lib-7.7.md5 | awk '{print $2}' | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/lib/ &&
md5sum -c ../lib-7.7.md5


for package in $(grep -v '^#' ../lib-7.7.md5 | awk '{print $2}')
do
  packagedir=${package%.tar.bz2}
  tar -xf $package
  pushd $packagedir
  case $packagedir in
    libXfont-[0-9]* )
      ./configure $XORG_CONFIG --disable-devel-docs
    ;;
    libXt-[0-9]* )
      ./configure $XORG_CONFIG \
        --with-appdefaultdir=/etc/X11/app-defaults
    ;;
    * )
      ./configure $XORG_CONFIG
    ;;
  esac
  make
  make install
  popd
  rm -r $packagedir
  /sbin/ldconfig
done

安装 llvm

wget http://llvm.org/releases/3.1/llvm-3.1.src.tar.gz
tar -xvpf llvm-3.1.src.tar.gz
cd llvm-3.1.src
wget http://llvm.org/releases/3.1/clang-3.1.src.tar.gz
tar -xf clang-3.1.src.tar.gz -C tools &&
mv tools/clang-3.1.src tools/clang
CC=gcc                                 \
CXX=g++                                \
./configure --prefix=/usr              \
            --libdir=/usr/lib/llvm     \
            --sysconfdir=/etc          \
            --enable-shared            \
            --enable-libffi            \
            --enable-targets=all       \
            --disable-expensive-checks \
            --disable-debug-runtime    \
            --disable-assertions       \
            --enable-optimized        &&

make 
make install

安装 Mesa

如果Mesa编译失败,可以在源码目录中尝试执行命令

 git clean -xfd 

,原文如下

Note on Mesa build failures: If you're not building in your Mesa git repo for the first time, the first thing to try is always "git clean -xfd", and possibly deleting your $WLD directory, as Mesa requires this often.

git clone git://anongit.freedesktop.org/mesa/mesa
cd mesa
./autogen.sh --prefix=$WLD \
	--enable-gles2 \
	--disable-gallium-egl \
	--with-egl-platforms=x11,wayland,drm \
	--enable-gbm \
	--enable-shared-glapi \
	--with-gallium-drivers=r300,r600,swrast,nouveau 
make && make install

安装glu

wget ftp://ftp.freedesktop.org/pub/mesa/glu/glu-9.0.0.tar.bz2
tar -xvpf glu-9.0.0.tar.bz2
cd glu-9.0.0
./configure --prefix=/usr --disable-static &&
make
make install

安装 libxkbcommon

git clone git://anongit.freedesktop.org/git/xorg/lib/libxkbcommon
cd libxkbcommon/
./autogen.sh --prefix=$WLD --with-xkb-config-root=/usr/share/X11/xkb
make && make install

安装 pixman

git clone git://anongit.freedesktop.org/pixman
cd pixman
./autogen.sh --prefix=$WLD
make && make install

安装 libpng

wget http://downloads.sourceforge.net/libpng/libpng-1.5.13.tar.xz
tar -xvpf libpng-1.5.13.tar.xz
cd libpng-1.5.13
./configure --prefix=/usr --disable-static &&
make -j10 && make install

安装 cairo

git clone git://anongit.freedesktop.org/cairo
cd cairo
./autogen.sh --prefix=$WLD --enable-gl --enable-xcb --enable-tee
make && make install

安装 mtdev-1.1.3

wget http://bitmath.org/code/mtdev/mtdev-1.1.3.tar.bz2
tar -xvpf mtdev-1.1.3.tar.bz2
cd mtdev-1.1.3
./configure --prefix=/usr --disable-static &&
make
make install

安装 libjpeg

wget http://www.ijg.org/files/jpegsrc.v8d.tar.gz
tar -xvpf jpegsrc.v8d.tar.gz
cd jpeg-8d
./configure --prefix=/usr &&
make
make install

安装 Linux PAM

wget http://linux-pam.org/library/Linux-PAM-1.1.6.tar.bz2
tar -xvpf Linux-PAM-1.1.6.tar.bz2
cd Linux-PAM-1.1.6
./configure --prefix=/usr \
            --sysconfdir=/etc \
            --docdir=/usr/share/doc/Linux-PAM-1.1.6 \
            --disable-nis &&
make -j10
make install

安装 xbitmaps

wget http://xorg.freedesktop.org/releases/individual/data/xbitmaps-1.1.1.tar.bz2
tar -xvpf xbitmaps-1.1.1.tar.bz2
cd xbitmaps-1.1.1
./configure $XORG_CONFIG

安装 gperf

wget http://ftp.gnu.org/gnu/gperf/gperf-3.0.4.tar.gz
tar -xvpf gperf-3.0.4.tar.gz
cd gperf-3.0.4
./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.0.4 &&
make &&
make install

安装 xcb-util-0.3.9

wget http://xorg.freedesktop.org/releases/individual/xcb/xcb-util-0.3.9.tar.bz2
tar -xvpf xcb-util-0.3.9.tar.bz2
cd xcb-util-0.3.9
./configure $XORG_CONFIG &&
make &&
make install

安装 xkbcomp-1.2.4

wget http://www.x.org/releases/X11R7.7/src/app/xkbcomp-1.2.4.tar.gz
tar -xvpf xkbcomp-1.2.4.tar.gz
cd xkbcomp-1.2.4
./configure $XORG_CONFIG
make && make install

XML-Parser-2.41

wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/perl-modules/XML-Parser-2.41.tar.gz
tar -xvpf XML-Parser-2.41.tar.gz
cd XML-Parser-2.41
perl Makefile.PL &&
make &&
make install

intltool-0.50.2

wget http://launchpad.net/intltool/trunk/0.50.2/+download/intltool-0.50.2.tar.gz
tar -xvpf intltool-0.50.2.tar.gz
cd intltool-0.50.2
./configure --prefix=/usr &&
make
make install

xkeyboard-config-2.6

wget http://xorg.freedesktop.org/releases/individual/data/xkeyboard-config/xkeyboard-config-2.6.tar.bz2
tar -xvpf xkeyboard-config-2.6.tar.bz2
cd xkeyboard-config-2.6
./configure $XORG_CONFIG --with-xkb-rules-symlink=xorg &&
make

wayland demon

weston

git clone git://anongit.freedesktop.org/wayland/weston
cd weston
./autogen.sh --prefix=$WLD
make
make install

配置 weston

cp weston.ini $HOME/.config/weston.ini
export XDG_RUNTIME_DIR=/tmp
weston

启动weston-launch

    $ sudo groupadd weston-launch
    $ sudo usermod -a -G weston-launch $USER
    $ # Log all the way out (of X, etc.)
    $ sudo chown root weston-launch
    $ sudo chmod +s weston-launch
    $ weston-launch

client for wayland

GTK+-3.6 for wayland

UnZip-6.0

wget http://downloads.sourceforge.net/infozip/unzip60.tar.gz
tar -xvpf unzip60.tar.gz
cd unzip60

case `uname -m` in
  i?86)
    sed -i -e 's/DASM"/DASM -DNO_LCHMOD"/' unix/Makefile
    make -f unix/Makefile linux
    ;;
  *)
    sed -i -e 's/CFLAGS="-O -Wall/& -DNO_LCHMOD/' unix/Makefile
    make -f unix/Makefile linux_noasm
    ;;
esac

make prefix=/usr install

docbook-xml-4.5.zip

wget http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip
mkdir docbook-xml
unzip -x docbook-xml-4.5.zip -d docbook-xml
cd docbook-xml

install -v -d -m755 /usr/share/xml/docbook/xml-dtd-4.5 &&
install -v -d -m755 /etc/xml &&
chown -R root:root . &&
cp -v -af docbook.cat *.dtd ent/ *.mod /usr/share/xml/docbook/xml-dtd-4.5

if [ ! -e /etc/xml/docbook ]; then
    xmlcatalog --noout --create /etc/xml/docbook
fi &&
xmlcatalog --noout --add "public" \
    "-//OASIS//DTD DocBook XML V4.5//EN" \
    "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
    /etc/xml/docbook &&
xmlcatalog --noout --add "public" \
    "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
    /etc/xml/docbook &&
xmlcatalog --noout --add "public" \
    "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
    /etc/xml/docbook &&
xmlcatalog --noout --add "public" \
    "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
    /etc/xml/docbook &&
xmlcatalog --noout --add "public" \
    "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
    /etc/xml/docbook &&
xmlcatalog --noout --add "public" \
    "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
    /etc/xml/docbook &&
xmlcatalog --noout --add "public" \
    "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
    /etc/xml/docbook &&
xmlcatalog --noout --add "public" \
    "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
    /etc/xml/docbook &&
xmlcatalog --noout --add "public" \
    "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
    /etc/xml/docbook &&
xmlcatalog --noout --add "rewriteSystem" \
    "http://www.oasis-open.org/docbook/xml/4.5" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5" \
    /etc/xml/docbook &&
xmlcatalog --noout --add "rewriteURI" \
    "http://www.oasis-open.org/docbook/xml/4.5" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5" \
    /etc/xml/docbook

if [ ! -e /etc/xml/catalog ]; then
    xmlcatalog --noout --create /etc/xml/catalog
fi &&
xmlcatalog --noout --add "delegatePublic" \
    "-//OASIS//ENTITIES DocBook XML" \
    "file:///etc/xml/docbook" \
    /etc/xml/catalog &&
xmlcatalog --noout --add "delegatePublic" \
    "-//OASIS//DTD DocBook XML" \
    "file:///etc/xml/docbook" \
    /etc/xml/catalog &&
xmlcatalog --noout --add "delegateSystem" \
    "http://www.oasis-open.org/docbook/" \
    "file:///etc/xml/docbook" \
    /etc/xml/catalog &&
xmlcatalog --noout --add "delegateURI" \
    "http://www.oasis-open.org/docbook/" \
    "file:///etc/xml/docbook" \
    /etc/xml/catalog

for DTDVERSION in 4.1.2 4.2 4.3 4.4
do
  xmlcatalog --noout --add "public" \
    "-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \
    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \
    /etc/xml/docbook
  xmlcatalog --noout --add "rewriteSystem" \
    "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5" \
    /etc/xml/docbook
  xmlcatalog --noout --add "rewriteURI" \
    "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
    "file:///usr/share/xml/docbook/xml-dtd-4.5" \
    /etc/xml/docbook
  xmlcatalog --noout --add "delegateSystem" \
    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
    "file:///etc/xml/docbook" \
    /etc/xml/catalog
  xmlcatalog --noout --add "delegateURI" \
    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
    "file:///etc/xml/docbook" \
    /etc/xml/catalog
done

docbook-xsl-1.77.1

wget http://downloads.sourceforge.net/docbook/docbook-xsl-1.77.1.tar.bz2
tar -xvpf docbook-xsl-1.77.1.tar.bz2
cd docbook-xsl-1.77.1 

install -v -m755 -d /usr/share/xml/docbook/xsl-stylesheets-1.77.1 &&

cp -v -R VERSION common eclipse epub extensions fo highlighting html \
         htmlhelp images javahelp lib manpages params profiling \
         roundtrip slides template tests tools webhelp website \
         xhtml xhtml-1_1 \
    /usr/share/xml/docbook/xsl-stylesheets-1.77.1 &&

ln -s VERSION /usr/share/xml/docbook/xsl-stylesheets-1.77.1/VERSION.xsl &&

install -v -m644 -D README /usr/share/doc/docbook-xsl-1.77.1/README.txt &&
install -v -m755    RELEASE-NOTES* NEWS* /usr/share/doc/docbook-xsl-1.77.1

if [ ! -d /etc/xml ]; then install -v -m755 -d /etc/xml; fi &&
if [ ! -f /etc/xml/catalog ]; then
    xmlcatalog --noout --create /etc/xml/catalog
fi &&

xmlcatalog --noout --add "rewriteSystem" \
           "http://docbook.sourceforge.net/release/xsl/1.77.1" \
           "/usr/share/xml/docbook/xsl-stylesheets-1.77.1" \
    /etc/xml/catalog &&

xmlcatalog --noout --add "rewriteURI" \
           "http://docbook.sourceforge.net/release/xsl/1.77.1" \
           "/usr/share/xml/docbook/xsl-stylesheets-1.77.1" \
    /etc/xml/catalog &&

xmlcatalog --noout --add "rewriteSystem" \
           "http://docbook.sourceforge.net/release/xsl/current" \
           "/usr/share/xml/docbook/xsl-stylesheets-1.77.1" \
    /etc/xml/catalog &&

xmlcatalog --noout --add "rewriteURI" \
           "http://docbook.sourceforge.net/release/xsl/current" \
           "/usr/share/xml/docbook/xsl-stylesheets-1.77.1" \
    /etc/xml/catalog


gtk-doc-1.18

wget http://ftp.gnome.org/pub/gnome/sources/gtk-doc/1.18/gtk-doc-1.18.tar.xz
tar -xvpf gtk-doc-1.18.tar.xz
cd gtk-doc-1.18
./configure --prefix=/usr &&
make
make install

gobject-introspection

wget http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/1.34/gobject-introspection-1.34.2.tar.xz
tar -xvpf gobject-introspection-1.34.2.tar.xz
cd gobject-introspection-1.34.2
./configure --prefix=/usr --disable-static &&
make
make install

glib-2.34.2

http://ftp.gnome.org/pub/gnome/sources/glib/2.34/glib-2.34.2.tar.xz
tar -xvpf glib-2.34.2.tar.xz
cd glib-2.34.2
./configure --prefix=/usr --with-pcre=system &&
make
make install

Atk-2.6.0

wget http://ftp.gnome.org/pub/gnome/sources/atk/2.6/atk-2.6.0.tar.xz
tar -xvpf atk-2.6.0.tar.xz
cd atk-2.6.0
./configure --prefix=/usr &&
make
make install

gdk-pixbuf-2.26.4

wget http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.26/gdk-pixbuf-2.26.4.tar.xz
tar -xvpf gdk-pixbuf-2.26.4.tar.xz
cd gdk-pixbuf-2.26.4
./configure --prefix=/usr --without-libtiff
make -j4
make install
gdk-pixbuf-query-loaders --update-cache

cairo-1.12.8

wget http://cairographics.org/releases/cairo-1.12.8.tar.xz
tar -xvpf cairo-1.12.8.tar.xz
cd cairo-1.12.8
./configure --prefix=/usr \
            --enable-tee  \
            --enable-xcb  \
            --disable-static &&
make
make install

harfbuzz-0.9.6

wget http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.6.tar.bz2
tar -xvpf harfbuzz-0.9.6.tar.bz2
cd harfbuzz-0.9.6
./configure --prefix=/usr &&
make
make install

pango-1.32.2

wget http://ftp.gnome.org/pub/gnome/sources/pango/1.32/pango-1.32.2.tar.xz
tar -xvpf pango-1.32.2.tar.xz
cd pango-1.32.2
./configure --prefix=/usr --sysconfdir=/etc &&
make
make install
pango-querymodules --update-cache

gtk+

git clone git://git.gnome.org/gtk+
pushd gtk+
./autogen.sh --prefix=$WLD --enable-wayland-backend
make && make install
popd