File builders/libXi-1.8.1/builder.sh added (mode: 100644) (index 0000000..7b71a08) |
|
1 |
|
src_name=libXi |
|
2 |
|
version=${pkg_name##*-} |
|
3 |
|
slot=$version |
|
4 |
|
archive_name=$src_name-$version.tar.xz |
|
5 |
|
url0=http://xorg.freedesktop.org/releases/individual/lib/$archive_name |
|
6 |
|
|
|
7 |
|
pkg_dir=$pkgs_dir_root/$src_name-$version |
|
8 |
|
rm -Rf $pkg_dir |
|
9 |
|
mkdir -p $pkgs_dir_root |
|
10 |
|
cp -f $src_dir_root/$archive_name $pkgs_dir_root |
|
11 |
|
cd $pkgs_dir_root |
|
12 |
|
tar xf $archive_name |
|
13 |
|
|
|
14 |
|
build_dir=$builds_dir_root/$pkg_name |
|
15 |
|
rm -Rf $build_dir |
|
16 |
|
mkdir -p $build_dir |
|
17 |
|
cd $build_dir |
|
18 |
|
|
|
19 |
|
# XXX: for all X11 based header we do not define MALLOC_0_RETURNS_NULL for glibc allocator |
|
20 |
|
|
|
21 |
|
mkdir -p $build_dir/bin |
|
22 |
|
cat >$build_dir/bin/cc <<EOF |
|
23 |
|
#!/bin/sh |
|
24 |
|
eval \ |
|
25 |
|
/nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin/x86_64-nyan2-linux-gnu-gcc \ |
|
26 |
|
\ |
|
27 |
|
-isystem /nyan/glibc/current/include \ |
|
28 |
|
-isystem /nyan/linux-headers/current/include \ |
|
29 |
|
\ |
|
30 |
|
-I/nyan/libXau/current/include \ |
|
31 |
|
-I/nyan/libxcb/current/include \ |
|
32 |
|
-I/nyan/libX11/current/include \ |
|
33 |
|
-I/nyan/libXext/current/include \ |
|
34 |
|
-I/nyan/libXfixes/current/include \ |
|
35 |
|
-I/nyan/xorgproto/current/include \ |
|
36 |
|
\ |
|
37 |
|
-O2 -pipe -fPIC -static-libgcc -ftls-model=global-dynamic -fpic \ |
|
38 |
|
\ |
|
39 |
|
-B/nyan/glibc/current/lib \ |
|
40 |
|
\ |
|
41 |
|
-L/nyan/libXau/current/lib \ |
|
42 |
|
-L/nyan/libxcb/current/lib \ |
|
43 |
|
-L/nyan/libX11/current/lib \ |
|
44 |
|
-L/nyan/libXext/current/lib \ |
|
45 |
|
-L/nyan/libXfixes/current/lib \ |
|
46 |
|
-L/nyan/glibc/current/lib \ |
|
47 |
|
\ |
|
48 |
|
\ |
|
49 |
|
"\$@" |
|
50 |
|
EOF |
|
51 |
|
chmod +x $build_dir/bin/cc |
|
52 |
|
export PATH_SAVED=$PATH |
|
53 |
|
export PATH="\ |
|
54 |
|
$build_dir/bin:\ |
|
55 |
|
$PATH\ |
|
56 |
|
" |
|
57 |
|
|
|
58 |
|
XI2_src_files="\ |
|
59 |
|
XIAllowEvents.c \ |
|
60 |
|
XIGrabDevice.c \ |
|
61 |
|
XIQueryVersion.c \ |
|
62 |
|
XIQueryDevice.c \ |
|
63 |
|
XISetDevFocus.c \ |
|
64 |
|
XIGetDevFocus.c \ |
|
65 |
|
XIPassiveGrab.c \ |
|
66 |
|
XIProperties.c \ |
|
67 |
|
XISelEv.c \ |
|
68 |
|
XISetCPtr.c \ |
|
69 |
|
XIWarpPointer.c \ |
|
70 |
|
XIHierarchy.c \ |
|
71 |
|
XIDefineCursor.c \ |
|
72 |
|
XIQueryPointer.c \ |
|
73 |
|
XIBarrier.c \ |
|
74 |
|
" |
|
75 |
|
|
|
76 |
|
libXi_src_files="\ |
|
77 |
|
XAllowDv.c \ |
|
78 |
|
XChDProp.c \ |
|
79 |
|
XChgDCtl.c \ |
|
80 |
|
XChgFCtl.c \ |
|
81 |
|
XChgKbd.c \ |
|
82 |
|
XChgKMap.c \ |
|
83 |
|
XChgPnt.c \ |
|
84 |
|
XChgProp.c \ |
|
85 |
|
XCloseDev.c \ |
|
86 |
|
XDelDProp.c \ |
|
87 |
|
XDevBell.c \ |
|
88 |
|
XExtToWire.c \ |
|
89 |
|
XGetBMap.c \ |
|
90 |
|
XGetCPtr.c \ |
|
91 |
|
XGetDCtl.c \ |
|
92 |
|
XGetDProp.c \ |
|
93 |
|
XGetFCtl.c \ |
|
94 |
|
XGetKMap.c \ |
|
95 |
|
XGetMMap.c \ |
|
96 |
|
XGetProp.c \ |
|
97 |
|
XGetVers.c \ |
|
98 |
|
XGMotion.c \ |
|
99 |
|
XGrabDev.c \ |
|
100 |
|
XGrDvBut.c \ |
|
101 |
|
XGrDvKey.c \ |
|
102 |
|
XGtFocus.c \ |
|
103 |
|
XGtSelect.c \ |
|
104 |
|
XListDev.c \ |
|
105 |
|
XListDProp.c \ |
|
106 |
|
XOpenDev.c \ |
|
107 |
|
XQueryDv.c \ |
|
108 |
|
XSelect.c \ |
|
109 |
|
XSetBMap.c \ |
|
110 |
|
XSetDVal.c \ |
|
111 |
|
XSetMMap.c \ |
|
112 |
|
XSetMode.c \ |
|
113 |
|
XSndExEv.c \ |
|
114 |
|
XStFocus.c \ |
|
115 |
|
XUngrDev.c \ |
|
116 |
|
XUngrDvB.c \ |
|
117 |
|
XUngrDvK.c \ |
|
118 |
|
XExtInt.c \ |
|
119 |
|
$XI2_src_files \ |
|
120 |
|
" |
|
121 |
|
#--------------------------------------------------------------------------------------------------- |
|
122 |
|
# TODO: we are still using the compiler driver, bad |
|
123 |
|
for f in $libXi_src_files |
|
124 |
|
do |
|
125 |
|
o=$(basename $f .c).o |
|
126 |
|
os="$os $o" |
|
127 |
|
|
|
128 |
|
printf "CC $f->$o\n" |
|
129 |
|
cc -c $pkg_dir/src/$f -o $build_dir/$o \ |
|
130 |
|
-I$pkg_dir/include & |
|
131 |
|
done |
|
132 |
|
#--------------------------------------------------------------------------------------------------- |
|
133 |
|
wait |
|
134 |
|
#--------------------------------------------------------------------------------------------------- |
|
135 |
|
# TODO: we are still using the compiler driver, bad |
|
136 |
|
# no version file and it expects all symbols to end up in dynamic table, aka must not use default |
|
137 |
|
# hidden visibility |
|
138 |
|
printf "CCLD libXi.so.6.1.0\n" |
|
139 |
|
cc -o $build_dir/libXi.so.6.1.0 \ |
|
140 |
|
-shared -Wl,--soname=libXi.so.6 -Wl,-s -Wl,-no-undefined \ |
|
141 |
|
$os \ |
|
142 |
|
-lX11 \ |
|
143 |
|
-lXext |
|
144 |
|
#--------------------------------------------------------------------------------------------------- |
|
145 |
|
mkdir -p /nyan/$src_name/$slot/lib |
|
146 |
|
rm -Rf /nyan/$src_name/$slot/include/X11/extensions |
|
147 |
|
mkdir -p /nyan/$src_name/$slot/include/X11 |
|
148 |
|
|
|
149 |
|
cp -r $pkg_dir/include/X11/extensions /nyan/$src_name/$slot/include/X11 |
|
150 |
|
cp -f $build_dir/libXi.so.6.1.0 /nyan/$src_name/$slot/lib |
|
151 |
|
|
|
152 |
|
ln -sTf libXi.so.6.1.0 /nyan/$src_name/$slot/lib/libXi.so |
|
153 |
|
#--------------------------------------------------------------------------------------------------- |
|
154 |
|
mkdir -p /usr/lib |
|
155 |
|
ln -sTf /nyan/$src_name/current/lib/libXi.so.6.1.0 /usr/lib/libXi.so.6 |
|
156 |
|
#--------------------------------------------------------------------------------------------------- |
|
157 |
|
export PATH=$PATH_SAVED |
|
158 |
|
unset PATH_SAVED |
|
159 |
|
rm -f $pkgs_dir_root/$archive_name |
|
160 |
|
rm -Rf $build_dir $pkg_dir |