-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_xorg.sh
108 lines (104 loc) · 3.58 KB
/
build_xorg.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#! /bin/bash
# This a simple build script which uses sub-scripts to build an X.Org server
# from scratch, along with all of it's necessary dependencies.
START_DIR=$(pwd)
SCRIPT_DIR="$START_DIR/build_scripts/xorg"
PACKAGE_DIR="$START_DIR/packs/xorg"
XORG_CONFIG="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-static "
# Configurables
# Choose from: "amd", "intel" or "rpi"
# Nvidia cards are not supported because I do not have one to test on
GRAPHICS_DRIVER="rpi"
INSTALL=1
CORES=$(grep -c ^processor /proc/cpuinfo)
# Start script
set -o errexit
echo "Building xorg server"
## Start building some things
# util-macros
source "$SCRIPT_DIR/std_xorg_install.sh" "util-macros" "1.19.0"
# X.Org protocol headers
source "$SCRIPT_DIR/group_build.sh" "proto"
# libXau
source "$SCRIPT_DIR/std_xorg_build.sh" "libXau" "1.0.8"
# libXdmcp
source "$SCRIPT_DIR/std_xorg_build.sh" "libXdmcp" "1.1.2"
# xcb-proto
source "$SCRIPT_DIR/std_xorg_install.sh" "xcb-proto" "1.11"
# build libxcb
source "$SCRIPT_DIR/libxcb.sh" "1.11.1"
## Start dependencies for Fontconfig which is a dependency for X.Org libraries
# build libpng
source "$SCRIPT_DIR/libpng.sh" "1.6.21"
# build FreeType
source "$SCRIPT_DIR/freetype.sh" "2.6.3"
# build elfutils (a glib optional dependency, but needed for Mesa later)
source "$SCRIPT_DIR/elfutils.sh" "0.166"
# build GLib
source "$SCRIPT_DIR/glib.sh" "2.48.0"
# build ICU
source "$SCRIPT_DIR/icu.sh" "57_1"
# build HarfBuzz
source "$SCRIPT_DIR/harfbuzz.sh" "1.2.6"
## Rebuild FreeType with HarfBuzz as a dependency
source "$SCRIPT_DIR/freetype.sh" "2.6.3"
# Finally, build Fontconfig
source "$SCRIPT_DIR/fontconfig.sh" "2.11.1"
# build the X.Org libraries group
source "$SCRIPT_DIR/group_build.sh" "lib"
# build xcb-util
source "$SCRIPT_DIR/std_xorg_build.sh" "xcb-util" "0.4.0"
# build xcb-util-image
source "$SCRIPT_DIR/std_xorg_build.sh" "xcb-util-image" "0.4.0"
# build xcb-util-keysms
source "$SCRIPT_DIR/std_xorg_build.sh" "xcb-util-keysyms" "0.4.0"
# build xcb-util-renderutil
source "$SCRIPT_DIR/std_xorg_build.sh" "xcb-util-renderutil" "0.3.9"
# build xcb-util-wm
source "$SCRIPT_DIR/std_xorg_build.sh" "xcb-util-wm" "0.4.1"
# build xcb-util-cursor
source "$SCRIPT_DIR/std_xorg_build.sh" "xcb-util-cursor" "0.1.2"
# Start Mesa build dependencies
# build libdrm
source "$SCRIPT_DIR/libdrm.sh" "2.4.67"
# build llvm (without clang)
source "$SCRIPT_DIR/llvm.sh" "3.8.0"
# build libvpdau
source "$SCRIPT_DIR/libvdpau.sh" "1.1.1"
# mesa
source "$SCRIPT_DIR/mesa.sh" "11.2.1"
# xbitmaps
source "$SCRIPT_DIR/std_xorg_install.sh" "xbitmaps" "1.1.1"
# X.Org applications group
source "$SCRIPT_DIR/group_build.sh" "app"
source "$SCRIPT_DIR/std_xorg_build.sh" "xcursor-themes" "1.0.4"
source "$SCRIPT_DIR/group_build.sh" "font"
source "$SCRIPT_DIR/xkeyboardconfig.sh" "2.17"
source "$SCRIPT_DIR/pixman.sh" "0.34.0"
source "$SCRIPT_DIR/libepoxy.sh" "1.3.1"
source "$SCRIPT_DIR/xorgserver.sh" "1.18.3"
## This is the part where it gets messy. Time to install drivers...
## Please make sure your kernel is configured correctly.
source "$SCRIPT_DIR/libevdev.sh" "1.4.6"
source "$SCRIPT_DIR/mtdev.sh" "1.1.5"
# Might try this alternative in the future
source "$SCRIPT_DIR/libinput.sh" "1.2.4"
source "$SCRIPT_DIR/input-evdev.sh" "2.10.1"
case "$GRAPHICS_DRIVER" in
"amd")
echo "Making AMD/ATI graphics driver"
sleep 2
source "$SCRIPT_DIR/amd.sh" "7.7.0"
;;
"intel")
source "$SCRIPT_DIR/intel.sh" "0340718"
;;
"rpi")
echo "Making the RPi framebuffer driver 'fbturbo'"
source "$SCRIPT_DIR/fbturbo.sh"
;;
esac
# xinit
source "$SCRIPT_DIR/xinit.sh" "1.3.4"
echo "All done! Enjoy the remainder of your day"
## End script