File builders/xkbcomp-1.4.6/builder.sh copied from file builders/libxkbfile-1.1.2/builder.sh (similarity 51%) (mode: 100644) (index ca70fe3..1c9cbf9) |
1 |
|
src_name=libxkbfile |
|
|
1 |
|
src_name=xkbcomp |
2 |
2 |
version=${pkg_name##*-} |
version=${pkg_name##*-} |
3 |
3 |
slot=$version |
slot=$version |
4 |
4 |
archive_name=$src_name-$version.tar.xz |
archive_name=$src_name-$version.tar.xz |
5 |
|
url0=http://xorg.freedesktop.org/releases/individual/lib/$archive_name |
|
|
5 |
|
url0=http://www.x.org/releases/individual/app/$archive_name |
6 |
6 |
|
|
7 |
7 |
pkg_dir=$pkgs_dir_root/$src_name-$version |
pkg_dir=$pkgs_dir_root/$src_name-$version |
8 |
8 |
rm -Rf $pkg_dir |
rm -Rf $pkg_dir |
|
... |
... |
cd $build_dir |
21 |
21 |
mkdir -p $build_dir/bin |
mkdir -p $build_dir/bin |
22 |
22 |
cat >$build_dir/bin/cc <<EOF |
cat >$build_dir/bin/cc <<EOF |
23 |
23 |
#!/bin/sh |
#!/bin/sh |
24 |
|
eval \ |
|
|
24 |
|
exec \ |
25 |
25 |
/nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin/x86_64-nyan2-linux-gnu-gcc \ |
/nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin/x86_64-nyan2-linux-gnu-gcc \ |
26 |
26 |
\ |
\ |
27 |
27 |
-isystem /nyan/glibc/current/include \ |
-isystem /nyan/glibc/current/include \ |
28 |
28 |
-isystem /nyan/linux-headers/current/include \ |
-isystem /nyan/linux-headers/current/include \ |
29 |
29 |
\ |
\ |
30 |
|
-I/nyan/libXau/current/include \ |
|
31 |
|
-I/nyan/libxcb/current/include \ |
|
|
30 |
|
-I/nyan/libxkbfile/current/include \ |
32 |
31 |
-I/nyan/libX11/current/include \ |
-I/nyan/libX11/current/include \ |
33 |
|
-I/nyan/libXext/current/include \ |
|
34 |
|
-I/nyan/libXfixes/current/include \ |
|
35 |
32 |
-I/nyan/xorgproto/current/include \ |
-I/nyan/xorgproto/current/include \ |
36 |
33 |
\ |
\ |
37 |
34 |
-O2 -pipe -fPIC -static-libgcc -ftls-model=global-dynamic -fpic \ |
-O2 -pipe -fPIC -static-libgcc -ftls-model=global-dynamic -fpic \ |
38 |
35 |
\ |
\ |
39 |
36 |
-B/nyan/glibc/current/lib \ |
-B/nyan/glibc/current/lib \ |
40 |
37 |
\ |
\ |
41 |
|
-L/nyan/libXau/current/lib \ |
|
42 |
|
-L/nyan/libxcb/current/lib \ |
|
|
38 |
|
-L/nyan/libxkbfile/current/lib \ |
43 |
39 |
-L/nyan/libX11/current/lib \ |
-L/nyan/libX11/current/lib \ |
44 |
|
-L/nyan/libXext/current/lib \ |
|
45 |
|
-L/nyan/libXfixes/current/lib \ |
|
46 |
40 |
-L/nyan/glibc/current/lib \ |
-L/nyan/glibc/current/lib \ |
47 |
41 |
\ |
\ |
48 |
|
\ |
|
49 |
42 |
"\$@" |
"\$@" |
50 |
43 |
EOF |
EOF |
51 |
44 |
chmod +x $build_dir/bin/cc |
chmod +x $build_dir/bin/cc |
|
... |
... |
$build_dir/bin:\ |
55 |
48 |
$PATH\ |
$PATH\ |
56 |
49 |
" |
" |
57 |
50 |
|
|
58 |
|
libxkbfile_src_files="\ |
|
59 |
|
cout.c \ |
|
60 |
|
maprules.c \ |
|
61 |
|
srvmisc.c \ |
|
62 |
|
xkbatom.c \ |
|
63 |
|
xkbbells.c \ |
|
64 |
|
xkbconfig.c \ |
|
65 |
|
xkbdraw.c \ |
|
66 |
|
xkberrs.c \ |
|
67 |
|
xkbmisc.c \ |
|
68 |
|
xkbout.c \ |
|
69 |
|
xkbtext.c \ |
|
70 |
|
xkmout.c \ |
|
71 |
|
xkmread.c \ |
|
|
51 |
|
#/nyan/bison/current/bin/bison --defines=xkbparse.h -o $build_dir/xkbparse.c \ |
|
52 |
|
# $pkg_dir/xkbparse.y |
|
53 |
|
|
|
54 |
|
xkbcomp_src_files="\ |
|
55 |
|
$pkg_dir/xkbparse.c \ |
|
56 |
|
$pkg_dir/action.c \ |
|
57 |
|
$pkg_dir/alias.c \ |
|
58 |
|
$pkg_dir/compat.c \ |
|
59 |
|
$pkg_dir/expr.c \ |
|
60 |
|
$pkg_dir/geometry.c \ |
|
61 |
|
$pkg_dir/indicators.c \ |
|
62 |
|
$pkg_dir/keycodes.c \ |
|
63 |
|
$pkg_dir/keymap.c \ |
|
64 |
|
$pkg_dir/keytypes.c \ |
|
65 |
|
$pkg_dir/listing.c \ |
|
66 |
|
$pkg_dir/misc.c \ |
|
67 |
|
$pkg_dir/parseutils.c \ |
|
68 |
|
$pkg_dir/symbols.c \ |
|
69 |
|
$pkg_dir/utils.c \ |
|
70 |
|
$pkg_dir/vmod.c \ |
|
71 |
|
$pkg_dir/xkbcomp.c \ |
|
72 |
|
$pkg_dir/xkbpath.c \ |
|
73 |
|
$pkg_dir/xkbscan.c \ |
72 |
74 |
" |
" |
73 |
75 |
#--------------------------------------------------------------------------------------------------- |
#--------------------------------------------------------------------------------------------------- |
74 |
76 |
# TODO: we are still using the compiler driver, bad |
# TODO: we are still using the compiler driver, bad |
75 |
|
for f in $libxkbfile_src_files |
|
|
77 |
|
for f in $xkbcomp_src_files |
76 |
78 |
do |
do |
77 |
79 |
o=$(basename $f .c).o |
o=$(basename $f .c).o |
78 |
80 |
os="$os $o" |
os="$os $o" |
79 |
81 |
|
|
80 |
82 |
printf "CC $f->$o\n" |
printf "CC $f->$o\n" |
81 |
|
cc -c $pkg_dir/src/$f -o $build_dir/$o \ |
|
82 |
|
-DHAVE_UNLOCKED_STDIO \ |
|
|
83 |
|
cc -c $f -o $build_dir/$o \ |
|
84 |
|
-DDFLT_XKB_CONFIG_ROOT='"/usr/share/xkb"' \ |
|
85 |
|
-DHAVE_STRDUP \ |
83 |
86 |
-DHAVE_STRCASECMP \ |
-DHAVE_STRCASECMP \ |
84 |
|
-DHAVE_STRNDUP \ |
|
85 |
|
-I$pkg_dir/include/X11/extensions \ |
|
86 |
|
-I$pkg_dir/include & |
|
|
87 |
|
-DPACKAGE_VERSION=\"$version\" & |
87 |
88 |
done |
done |
88 |
89 |
#--------------------------------------------------------------------------------------------------- |
#--------------------------------------------------------------------------------------------------- |
89 |
90 |
wait |
wait |
90 |
91 |
#--------------------------------------------------------------------------------------------------- |
#--------------------------------------------------------------------------------------------------- |
91 |
92 |
# TODO: we are still using the compiler driver, bad |
# TODO: we are still using the compiler driver, bad |
92 |
|
# no version file and it expects all symbols to end up in dynamic table, aka must not use default |
|
93 |
|
# hidden visibility |
|
94 |
|
printf "CCLD libxkbfile.so.1.0.2\n" |
|
95 |
|
cc -o $build_dir/libxkbfile.so.1.0.2 \ |
|
96 |
|
-shared -Wl,--soname=libxkbfile.so.1 -Wl,-s -Wl,-no-undefined \ |
|
|
93 |
|
printf "CCLD xkbcomp\n" |
|
94 |
|
cc -o $build_dir/xkbcomp \ |
|
95 |
|
-Wl,-s \ |
97 |
96 |
$os \ |
$os \ |
|
97 |
|
-lxkbfile \ |
98 |
98 |
-lX11 |
-lX11 |
99 |
99 |
#--------------------------------------------------------------------------------------------------- |
#--------------------------------------------------------------------------------------------------- |
100 |
|
mkdir -p /nyan/$src_name/$slot/lib |
|
101 |
|
rm -Rf /nyan/$src_name/$slot/include/X11/extensions |
|
102 |
|
mkdir -p /nyan/$src_name/$slot/include/X11 |
|
103 |
|
|
|
104 |
|
cp -r $pkg_dir/include/X11/extensions /nyan/$src_name/$slot/include/X11 |
|
105 |
|
cp -f $build_dir/libxkbfile.so.1.0.2 /nyan/$src_name/$slot/lib |
|
106 |
|
|
|
107 |
|
ln -sTf libxkbfile.so.1.0.2 /nyan/$src_name/$slot/lib/libxkbfile.so |
|
108 |
|
#--------------------------------------------------------------------------------------------------- |
|
109 |
|
mkdir -p /usr/lib |
|
110 |
|
# XXX:current and not slot |
|
111 |
|
ln -sTf /nyan/$src_name/current/lib/libxkbfile.so.1.0.2 /usr/lib/libxkbfile.so.1 |
|
112 |
|
#--------------------------------------------------------------------------------------------------- |
|
|
100 |
|
# XXX: The xserver should have been configured to find xkbcomp properly. |
|
101 |
|
mkdir -p /nyan/$src_name/$slot/bin |
|
102 |
|
cp -f $build_dir/xkbcomp /nyan/$src_name/$slot/bin |
113 |
103 |
|
|
114 |
104 |
export PATH=$PATH_SAVED |
export PATH=$PATH_SAVED |
115 |
105 |
unset PATH_SAVED |
unset PATH_SAVED |