OLD | NEW |
(Empty) | |
| 1 #!/bin/sh |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 PPATH=/usr/lib/pkgconfig |
| 7 LPATH="$(pwd)" |
| 8 export PKG_CONFIG_PATH="${LPATH}"/lib/pkgconfig:"${PPATH}" |
| 9 |
| 10 # Print an early message about what we think we're building. |
| 11 # Informative only, if this fails, comment it out. |
| 12 arch=$(python -c 'import platform; print platform.architecture()[0]') |
| 13 echo "Builiding for $arch ..." |
| 14 |
| 15 rm -f .xorg.stop |
| 16 for p in util-macros-1.11.0 xproto-7.0.20 xcb-proto-1.6 libXfont-1.4.3 \ |
| 17 dri2proto-2.3 libxkbfile-1.0.7 libdrm-2.4.26 \ |
| 18 libXmu-1.0.5 ; do |
| 19 if [ -f $p.succeeded ] ; then |
| 20 echo $p already done |
| 21 else |
| 22 tar xzf ../$p.tar.gz |
| 23 if [ -f $p/configure ] ; then |
| 24 ( cd $p && ./configure --prefix="$LPATH" --exec_prefix="$LPATH" && \ |
| 25 make && make install ) >$p.output 2>&1 && mv $p.output $p.succeeded |
| 26 else |
| 27 ( cd $p && ./autogen.sh --prefix="$LPATH" --exec_prefix="$LPATH" && \ |
| 28 make && make install ) >$p.output 2>&1 && mv $p.output $p.succeeded |
| 29 fi |
| 30 if [ -f $p.succeeded ] ; then |
| 31 echo $p done |
| 32 else |
| 33 echo $p FAILED ; tail -80 $p.output ; echo $p FAILED |
| 34 touch .xorg.stop |
| 35 break |
| 36 fi |
| 37 fi |
| 38 done |
| 39 |
| 40 mv=7.11 |
| 41 p=Mesa-${mv} |
| 42 |
| 43 if [ -f $p.succeeded ] ; then |
| 44 echo $p already done |
| 45 else |
| 46 tar xzf ../MesaGLUT-${mv}.tar.gz |
| 47 tar xzf ../MesaLib-${mv}.tar.gz |
| 48 ( cd $p && ./configure --prefix="$LPATH" --exec_prefix="$LPATH" \ |
| 49 --with-gallium-drivers= --with-dri-drivers= && \ |
| 50 make && make install ) >$p.output 2>&1 && mv $p.output $p.succeeded |
| 51 if [ -f $p.succeeded ] ; then |
| 52 echo $p done |
| 53 else |
| 54 echo $p FAILED ; tail -80 $p.output ; echo $p FAILED |
| 55 touch .xorg.stop |
| 56 fi |
| 57 fi |
| 58 |
| 59 |
| 60 # |
| 61 # The builders are wilder/older versions of linux. pixman is missing a |
| 62 # referenced symbol on Hardy. Xfont fails to read the fonts, and it has |
| 63 # recursive dependencies we have to add to the top level to link statically. |
| 64 # pixman is also a dependency of libfb.la, so we have to subvert that too. |
| 65 # Peter Mayo - Feb 24, 2011 |
| 66 # |
| 67 function makeXvfbMoreStatically() { |
| 68 [ -f Xvfb ] && rm -f Xvfb |
| 69 make -n Xvfb 2>&1 | tail -1 |\ |
| 70 sed -e "s/^.*;//" \ |
| 71 -e "s%libfb.la%.libs/libfb.a%" -e "s% -l\(pixman-1\)% /usr/lib/lib\1.a%" \ |
| 72 -e "s% -l\(Xfont\)% ../../../lib/lib\1.a -lfreetype -lfontenc%" \ |
| 73 | bash -x |
| 74 } |
| 75 |
| 76 if [ \! -f .xorg.stop ] ; then |
| 77 p=xorg-server-1.9.3.901 |
| 78 [ -d bin ] || mkdir bin |
| 79 tar xzf ../$p.tar.gz |
| 80 echo building in $p ... |
| 81 ( cd $p && ./configure --disable-config-hal --disable-dri --disable-glx \ |
| 82 --prefix=/usr && \ |
| 83 ( cd fb && make ) && \ |
| 84 ( cd xfixes && make ) && \ |
| 85 ( cd Xext && make ) && \ |
| 86 ( cd dbe && make ) && \ |
| 87 ( cd record && make ) && \ |
| 88 ( cd randr && make ) && \ |
| 89 ( cd render && make ) && \ |
| 90 ( cd damageext && make ) && \ |
| 91 ( cd miext/damage && make ) && \ |
| 92 ( cd miext/shadow && make ) && \ |
| 93 ( cd Xi && make ) && \ |
| 94 ( cd xkb && make ) && \ |
| 95 ( cd composite && make ) && \ |
| 96 ( cd dix && make ) && \ |
| 97 ( cd mi && make ) && \ |
| 98 ( cd os && make ) && \ |
| 99 ( cd glx && make ) && \ |
| 100 ( cd hw/vfb && make Xvfb && makeXvfbMoreStatically ) ) >$p.output 2>&1 && \ |
| 101 mv $p.output $p.succeeded |
| 102 if [ -f $p.succeeded ] ; then |
| 103 cp $p/hw/vfb/Xvfb bin/. |
| 104 echo "Built Xvfb for $arch sucessfully." |
| 105 else |
| 106 echo $p FAILED ; tail -80 $p.output ; echo $p FAILED \; see $p.output |
| 107 fi |
| 108 fi |
OLD | NEW |