1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # Xorg
|
---|
4 | #
|
---|
5 |
|
---|
6 | # NOTE: Xorg handles bi-arch very well (at least on x86_64, havent tried
|
---|
7 | # others).
|
---|
8 | # No need to set libdir or hack, libs automagically go to lib64
|
---|
9 | # or lib based on the emulation used.
|
---|
10 | #
|
---|
11 | # /usr/X11R6/lib/X11 holds fonts etc, and handles locales under
|
---|
12 | # there in lib/lib64 depending
|
---|
13 | #
|
---|
14 | # TODO: set libdir and libdirname in host.def to /usr/X11R6/lib and lib
|
---|
15 | # respectively if doing uni-arch x86_64 build.
|
---|
16 | # Will need to check how nvidia installer will deal with things though
|
---|
17 |
|
---|
18 | cd ${SRC}
|
---|
19 | LOG=xorg-blfs.log
|
---|
20 | SELF=`basename ${0}`
|
---|
21 | set_buildenv
|
---|
22 | set_libdirname
|
---|
23 | setup_multiarch
|
---|
24 |
|
---|
25 | unpack_tarball X11R${XORG_VER}-src &&
|
---|
26 | cd ${PKGDIR}
|
---|
27 |
|
---|
28 | # From blfs 20050112 (Xorg 6.8.1):
|
---|
29 | # Xorg insists on putting its boot and profile scripts into the /etc directory
|
---|
30 | # even if we specifically tell it not to compile anything Xprint server or
|
---|
31 | # client related (see host.def below). The following command will suppress any
|
---|
32 | # such modifications:
|
---|
33 | sed -i '/^SUBDIRS =/s/ etc$//' programs/Xserver/Xprint/Imakefile
|
---|
34 |
|
---|
35 | # First patch ensures objects packed into static libs get built position
|
---|
36 | # independant, so they can be linked into shared libs. A notable barf
|
---|
37 | # without this patch is with NAS linking against a static libXau
|
---|
38 | apply_patch X11R6.8.1-IncludeSharedObjectInNormalLib-1
|
---|
39 |
|
---|
40 | # This patch ensures that if SharedLibXau is defined in host.def that it
|
---|
41 | # links correctly
|
---|
42 | apply_patch X11R6.8.1-fix_shared_libXau_link-1
|
---|
43 |
|
---|
44 | # Build lndir ( NOTE: we don't particularly care whether this is 64 or 32 )
|
---|
45 | pushd config/util &&
|
---|
46 | make -f Makefile.ini lndir &&
|
---|
47 | cp lndir /usr/bin/ &&
|
---|
48 | popd
|
---|
49 |
|
---|
50 | test -d ${SRC}/xcbuild${suffix} &&
|
---|
51 | rm -rf ${SRC}/xcbuild${suffix}
|
---|
52 |
|
---|
53 | mkdir ${SRC}/xcbuild${suffix}
|
---|
54 |
|
---|
55 | # Create shadow tree
|
---|
56 | cd ${SRC}/xcbuild${suffix}
|
---|
57 | lndir ${SRC}/${PKGDIR} > /dev/null 2>&1
|
---|
58 |
|
---|
59 | # Create host.def file
|
---|
60 | echo " o creating config/cf/host.def"
|
---|
61 |
|
---|
62 | cat > config/cf/host.def << "EOF"
|
---|
63 | /* Begin Xorg host.def file */
|
---|
64 |
|
---|
65 | /* System Related Information. If you read and configure only one
|
---|
66 | * section then it should be this one. The Intel architecture defaults are
|
---|
67 | * set for a i686 and higher. Axp is for the Alpha architecture and Ppc is
|
---|
68 | * for the Power PC. AMD64 is for the Opteron processor. Note that there have
|
---|
69 | * been reports that the Ppc optimization line causes segmentation faults during
|
---|
70 | * build. If that happens, try building without the DefaultGcc2PpcOpt line. ***********/
|
---|
71 |
|
---|
72 | /* #define DefaultGcc2i386Opt -O2 -fno-strength-reduce -fno-strict-aliasing -march=i686 */
|
---|
73 | /* #define DefaultGccAMD64Opt -O2 -fno-strength-reduce -fno-strict-aliasing -march=athlon64 */
|
---|
74 | /* #define DefaultGcc2AxpOpt -O2 -mcpu=ev6 */
|
---|
75 | /* #define DefaultGcc2PpcOpt -O2 -mcpu=750 */
|
---|
76 |
|
---|
77 | #define HasFreetype2 YES
|
---|
78 | #define HasFontconfig YES
|
---|
79 | #define HasExpat YES
|
---|
80 | #define HasLibpng YES
|
---|
81 | #define HasZlib YES
|
---|
82 |
|
---|
83 | /*
|
---|
84 | * Which drivers to build. When building a static server, each of these
|
---|
85 | * will be included in it. When building the loadable server each of these
|
---|
86 | * modules will be built.
|
---|
87 | *
|
---|
88 | #define XF86CardDrivers mga glint nv tga s3virge sis rendition \
|
---|
89 | neomagic i740 tdfx savage \
|
---|
90 | cirrus vmware tseng trident chips apm \
|
---|
91 | GlideDriver fbdev i128 \
|
---|
92 | ati AgpGartDrivers DevelDrivers ark cyrix \
|
---|
93 | siliconmotion \
|
---|
94 | vesa vga XF86OSCardDrivers XF86ExtraCardDrivers
|
---|
95 | */
|
---|
96 | /*
|
---|
97 | * Select the XInput devices you want by uncommenting this.
|
---|
98 | *
|
---|
99 | #define XInputDrivers mouse keyboard acecad calcomp citron \
|
---|
100 | digitaledge dmc dynapro elographics \
|
---|
101 | microtouch mutouch penmount spaceorb summa \
|
---|
102 | wacom void magictouch aiptek
|
---|
103 | */
|
---|
104 | /* Most installs will only need this */
|
---|
105 |
|
---|
106 | #define XInputDrivers mouse keyboard
|
---|
107 |
|
---|
108 | /* Disable building Xprint server and clients until we get them figured
|
---|
109 | * out but build Xprint libraries to allow precompiled binaries such as
|
---|
110 | * Acrobat Reader to run.
|
---|
111 | */
|
---|
112 |
|
---|
113 | #define XprtServer NO
|
---|
114 | #define BuildXprintClients NO
|
---|
115 |
|
---|
116 | /* #define LibDirName lib64 */
|
---|
117 |
|
---|
118 | /* #define LibDir /usr/X11R6/lib64/X11 */
|
---|
119 |
|
---|
120 | /* End Xorg host.def file */
|
---|
121 | EOF
|
---|
122 |
|
---|
123 | # remove references to linux/config.h (when using linux-libc-headers)
|
---|
124 | sed -i -e "s@#include <linux/config.h>@/* & */@" \
|
---|
125 | `grep -lr linux/config.h *`
|
---|
126 |
|
---|
127 | # TODO: check if CFLAGS/CXXFLAGS can be defined...
|
---|
128 | # when applied in CC= or CXX= TGT_CFLAGS tend to be left out...
|
---|
129 | max_log_init Xorg ${XORG_VER} "blfs (shared)" ${BUILDLOGS} ${LOG}
|
---|
130 | CC="${CC-gcc} ${ARCH_CFLAGS}" \
|
---|
131 | CXX="${CXX-g++} ${ARCH_CFLAGS}" \
|
---|
132 | CFLAGS="${TGT_CFLAGS}" \
|
---|
133 | CXXFLAGS="${CFLAGS}" \
|
---|
134 | make World \
|
---|
135 | >> ${LOGFILE} 2>&1 &&
|
---|
136 | echo " o Build OK" &&
|
---|
137 |
|
---|
138 | min_log_init ${INSTLOGS} &&
|
---|
139 | #make DESTDIR=/mnt/scriptcheck/Xorg${suffix} install \
|
---|
140 | make install \
|
---|
141 | >> ${LOGFILE} 2>&1 &&
|
---|
142 | #make DESTDIR=/mnt/scriptcheck/Xorg${suffix} install.man \
|
---|
143 | make install.man \
|
---|
144 | >> ${LOGFILE} 2>&1 &&
|
---|
145 | echo " o ALL OK" || barf
|
---|
146 |
|
---|
147 | ln -sf ../X11R6/bin /usr/bin/X11 &&
|
---|
148 | ln -sf ../X11R6/lib/X11 /usr/lib/X11 &&
|
---|
149 | ln -sf ../X11R6/include/X11 /usr/include/X11
|
---|
150 |
|
---|
151 | if [ "Y" = "${MULTIARCH}" ]; then
|
---|
152 | use_wrapper /usr/X11R6/bin/xft-config /usr/X11R6/bin/xcursor-config \
|
---|
153 | /usr/X11R6/bin/gccmakedep /usr/X11R6/bin/ccmakedep \
|
---|
154 | /usr/X11R6/bin/imake /usr/X11R6/bin/xmkmf
|
---|
155 | fi
|
---|
156 |
|
---|
157 | echo "---------------------------------------------------------------"
|
---|
158 | echo "To configure/setup Xorg fonts / DRI please see blfs Chapter 25"
|
---|
159 | echo "---------------------------------------------------------------"
|
---|
160 | echo
|
---|
161 |
|
---|