File builders/libxkbcommon-1318bedbb7ec4a761edfb93a3dbdde00fd1e8127/builder.sh copied from file builders/libxkbcommon-0/builder.sh (similarity 51%) (mode: 100644) (index cbbdb2a..d219bc6) |
1 |
1 |
src_name=libxkbcommon |
src_name=libxkbcommon |
|
2 |
|
git_commit=${pkg_name##*-} |
|
3 |
|
slot=$git_commit |
2 |
4 |
# version is at the top of the root meson.build file |
# version is at the top of the root meson.build file |
3 |
|
version=0.10.0 |
|
4 |
|
git_commit=a0c1c2f42dafecbad7b9912dcaba7f206805981d |
|
|
5 |
|
version=1.3.0 |
5 |
6 |
git_url0=git://github.com/xkbcommon/libxkbcommon |
git_url0=git://github.com/xkbcommon/libxkbcommon |
6 |
7 |
|
|
7 |
|
slot=0 |
|
8 |
|
|
|
9 |
8 |
pkg_dir=$pkgs_dir_root/$pkg_name |
pkg_dir=$pkgs_dir_root/$pkg_name |
10 |
9 |
src_dir=$src_dir_root/$src_name |
src_dir=$src_dir_root/$src_name |
11 |
10 |
rm -Rf $pkg_dir |
rm -Rf $pkg_dir |
|
... |
... |
cp -L -r $src_dir $pkg_dir |
14 |
13 |
|
|
15 |
14 |
cd $pkg_dir |
cd $pkg_dir |
16 |
15 |
|
|
17 |
|
git checkout --force $git_commit |
|
18 |
|
git reset --hard |
|
|
16 |
|
if test x$git_commit != x; then |
|
17 |
|
git checkout --force $git_commit |
|
18 |
|
git reset --hard |
|
19 |
|
fi |
19 |
20 |
|
|
20 |
21 |
build_dir=$builds_dir_root/$pkg_name |
build_dir=$builds_dir_root/$pkg_name |
21 |
22 |
rm -Rf $build_dir |
rm -Rf $build_dir |
|
... |
... |
cd $build_dir |
24 |
25 |
|
|
25 |
26 |
# X11 locale is the "compose" mini input method |
# X11 locale is the "compose" mini input method |
26 |
27 |
cat >config.h <<EOF |
cat >config.h <<EOF |
27 |
|
#define DFLT_XKB_CONFIG_ROOT "/nyan/xkeyboard-config/current/share/X11/xkb" |
|
28 |
|
#define XLOCALEDIR "/nyan/libX11/current/share/X11/locale" |
|
29 |
|
#define LIBXKBCOMMON_VERSION "$version" |
|
30 |
|
#define DEFAULT_XKB_RULES "evdev" |
|
31 |
|
#define DEFAULT_XKB_MODEL "pc105" |
|
32 |
|
#define DEFAULT_XKB_LAYOUT "us" |
|
33 |
|
#define DEFAULT_XKB_VARIANT "" |
|
34 |
|
#define DEFAULT_XKB_OPTIONS "" |
|
|
28 |
|
#define DFLT_XKB_CONFIG_ROOT "/nyan/xkeyboard-config/current/share/X11/xkb" |
|
29 |
|
#define DFLT_XKB_CONFIG_EXTRA_PATH "" |
|
30 |
|
#define XLOCALEDIR "/nyan/libX11/current/share/X11/locale" |
|
31 |
|
#define LIBXKBCOMMON_VERSION "$version" |
|
32 |
|
#define DEFAULT_XKB_RULES "evdev" |
|
33 |
|
#define DEFAULT_XKB_MODEL "pc105" |
|
34 |
|
#define DEFAULT_XKB_LAYOUT "us" |
|
35 |
|
#define DEFAULT_XKB_VARIANT "" |
|
36 |
|
#define DEFAULT_XKB_OPTIONS "" |
35 |
37 |
/* glibc */ |
/* glibc */ |
36 |
38 |
#define _GNU_SOURCE 1 |
#define _GNU_SOURCE 1 |
37 |
39 |
#define HAVE__BUILTIN_EXPECT 1 |
#define HAVE__BUILTIN_EXPECT 1 |
38 |
|
#define HAVE_EACCESS 1 |
|
39 |
40 |
#define HAVE_EUIDACCESS 1 |
#define HAVE_EUIDACCESS 1 |
40 |
41 |
#define HAVE_MMAP 1 |
#define HAVE_MMAP 1 |
41 |
42 |
#define HAVE_MKOSTEMP 1 |
#define HAVE_MKOSTEMP 1 |
42 |
43 |
#define HAVE_POSIX_FALLOCATE 1 |
#define HAVE_POSIX_FALLOCATE 1 |
43 |
44 |
#define HAVE_STRNDUP 1 |
#define HAVE_STRNDUP 1 |
|
45 |
|
#define HAVE_UNISTD_H 1 |
44 |
46 |
/* no */ |
/* no */ |
45 |
47 |
#undef HAVE_ASPRINTF |
#undef HAVE_ASPRINTF |
46 |
48 |
#undef HAVE_VASPRINTF |
#undef HAVE_VASPRINTF |
|
... |
... |
EOF |
53 |
55 |
# DON'T USE A YACC PROGRAM, THOSE ARE _BAD_ PARSERS AND IT CREATES NASTY BUILD |
# DON'T USE A YACC PROGRAM, THOSE ARE _BAD_ PARSERS AND IT CREATES NASTY BUILD |
54 |
56 |
# DEPS. |
# DEPS. |
55 |
57 |
# ALWAYS MANUALLY WRITE YOUR PARSERS! |
# ALWAYS MANUALLY WRITE YOUR PARSERS! |
56 |
|
# JEZUS! FOR GOD SAKE! YOU ANIMALS! |
|
|
58 |
|
# JEZUS! FOR GOD SAKE! YOU ANIMALS! PYTHON IS NOT ENOUGH ALREADY! |
|
59 |
|
# TOXIC HUMAN BEINGS! |
57 |
60 |
bison --defines=parser.h -o $build_dir/parser.c -p _xkbcommon_ \ |
bison --defines=parser.h -o $build_dir/parser.c -p _xkbcommon_ \ |
58 |
61 |
$pkg_dir/src/xkbcomp/parser.y |
$pkg_dir/src/xkbcomp/parser.y |
59 |
62 |
srcs="\ |
srcs="\ |
|
... |
... |
do |
95 |
98 |
obj=$build_dir/$(dirname $f)/$(basename $f .c).o |
obj=$build_dir/$(dirname $f)/$(basename $f .c).o |
96 |
99 |
mkdir -p $build_dir/$(dirname $f) |
mkdir -p $build_dir/$(dirname $f) |
97 |
100 |
gcc -fvisibility=hidden -fPIC -c \ |
gcc -fvisibility=hidden -fPIC -c \ |
|
101 |
|
-D_GNU_SOURCE \ |
|
102 |
|
-isystem /nyan/glibc/current/include \ |
|
103 |
|
-isystem /nyan/linux-headers/current/include \ |
98 |
104 |
-I$build_dir \ |
-I$build_dir \ |
99 |
105 |
-I$pkg_dir/src \ |
-I$pkg_dir/src \ |
|
106 |
|
-I$pkg_dir/include \ |
100 |
107 |
-I$pkg_dir \ |
-I$pkg_dir \ |
101 |
108 |
$f -o $obj & |
$f -o $obj & |
102 |
109 |
objs="$obj $objs" |
objs="$obj $objs" |
|
... |
... |
gcc -B/nyan/glibc/current/lib -shared \ |
110 |
117 |
ln -sTf libxkbcommon.so.0.0.0 $build_dir/libxkbcommon.so.0 |
ln -sTf libxkbcommon.so.0.0.0 $build_dir/libxkbcommon.so.0 |
111 |
118 |
ln -sTf libxkbcommon.so.0 $build_dir/libxkbcommon.so |
ln -sTf libxkbcommon.so.0 $build_dir/libxkbcommon.so |
112 |
119 |
|
|
113 |
|
sed -E -e \ |
|
114 |
|
"s:@prefix@:/nyan/$src_name/current:;\ |
|
115 |
|
s:@exec_prefix@:/nyan/$src_name/current:;\ |
|
116 |
|
s:@libdir@:/nyan/$src_name/current/lib:;\ |
|
117 |
|
s:@includedir@:/nyan/$src_name/current/include:;\ |
|
118 |
|
s:@PACKAGE_VERSION@:$version:" \ |
|
119 |
|
$pkg_dir/xkbcommon.pc.in \ |
|
120 |
|
>$build_dir/xkbcommon.pc |
|
|
120 |
|
cat >$build_dir/xkbcommon.pc <<EOF |
|
121 |
|
prefix=/nyan/libxkbcommon/current |
|
122 |
|
exec_prefix=/nyan/libxkbcommon/current |
|
123 |
|
libdir=/nyan/libxkbcommon/current/lib |
|
124 |
|
includedir=/nyan/libxkbcommon/current/include |
|
125 |
|
|
|
126 |
|
Name: xkbcommon |
|
127 |
|
Description: XKB API common to servers and clients |
|
128 |
|
Version: $version |
|
129 |
|
Cflags: -I\${includedir} |
|
130 |
|
Libs: -L\${libdir} -lxkbcommon |
|
131 |
|
EOF |
121 |
132 |
#------------------------------------------------------------------------------- |
#------------------------------------------------------------------------------- |
122 |
133 |
# x11 helper lib |
# x11 helper lib |
123 |
134 |
srcs="\ |
srcs="\ |
|
... |
... |
for f in $srcs |
133 |
144 |
do |
do |
134 |
145 |
obj=$build_dir/$(dirname $f)/$(basename $f .c).o |
obj=$build_dir/$(dirname $f)/$(basename $f .c).o |
135 |
146 |
mkdir -p $build_dir/$(dirname $f) |
mkdir -p $build_dir/$(dirname $f) |
136 |
|
gcc -fvisibility=hidden -fPIC -c -I$build_dir -I$pkg_dir/src \ |
|
|
147 |
|
gcc -fvisibility=hidden -fPIC -c \ |
|
148 |
|
-isystem /nyan/glibc/current/include \ |
|
149 |
|
-isystem /nyan/linux-headers/current/include \ |
|
150 |
|
-I$build_dir \ |
|
151 |
|
-I$pkg_dir/src \ |
|
152 |
|
-I$pkg_dir/include \ |
137 |
153 |
-I$pkg_dir \ |
-I$pkg_dir \ |
138 |
154 |
-I/nyan/libxcb/current/include \ |
-I/nyan/libxcb/current/include \ |
139 |
155 |
$f -o $obj & |
$f -o $obj & |
|
... |
... |
gcc -B/nyan/glibc/current/lib -shared \ |
150 |
166 |
ln -sTf libxkbcommon-x11.so.0.0.0 $build_dir/libxkbcommon-x11.so.0 |
ln -sTf libxkbcommon-x11.so.0.0.0 $build_dir/libxkbcommon-x11.so.0 |
151 |
167 |
ln -sTf libxkbcommon-x11.so.0 $build_dir/libxkbcommon-x11.so |
ln -sTf libxkbcommon-x11.so.0 $build_dir/libxkbcommon-x11.so |
152 |
168 |
|
|
153 |
|
sed -E -e \ |
|
154 |
|
"s:@prefix@:/nyan/$src_name/current:;\ |
|
155 |
|
s:@exec_prefix@:/nyan/$src_name/current:;\ |
|
156 |
|
s:@libdir@:/nyan/$src_name/current/lib:;\ |
|
157 |
|
s:@includedir@:/nyan/$src_name/current/include:;\ |
|
158 |
|
s:@PACKAGE_VERSION@:$version:" \ |
|
159 |
|
$pkg_dir/xkbcommon-x11.pc.in \ |
|
160 |
|
>$build_dir/xkbcommon-x11.pc |
|
|
169 |
|
cat >$build_dir/xkbcommon-x11.pc <<EOF |
|
170 |
|
prefix=/nyan/libxkbcommon/current |
|
171 |
|
exec_prefix=/nyan/libxkbcommon/current |
|
172 |
|
libdir=/nyan/libxkbcommon/current/lib |
|
173 |
|
includedir=/nyan/libxkbcommon/current/include |
|
174 |
|
|
|
175 |
|
Name: xkbcommon-x11 |
|
176 |
|
Description: XKB API common to servers and clients - X11 support |
|
177 |
|
Version: $version |
|
178 |
|
Requires: xkbcommon |
|
179 |
|
Requires.private: xcb xcb-xkb |
|
180 |
|
Cflags: -I\${includedir} |
|
181 |
|
Libs: -L\${libdir} -lxkbcommon-x11 |
|
182 |
|
EOF |
|
183 |
|
#------------------------------------------------------------------------------- |
|
184 |
|
# registry, pulling libxml2... jez... not event support for expat |
|
185 |
|
# some other fanatics will push for json I guess |
|
186 |
|
srcs="\ |
|
187 |
|
$pkg_dir/src/registry.c \ |
|
188 |
|
$pkg_dir/src/utils.c \ |
|
189 |
|
$pkg_dir/src/util-list.c \ |
|
190 |
|
" |
|
191 |
|
objs= |
|
192 |
|
for f in $srcs |
|
193 |
|
do |
|
194 |
|
obj=$build_dir/$(dirname $f)/$(basename $f .c).o |
|
195 |
|
mkdir -p $build_dir/$(dirname $f) |
|
196 |
|
gcc -fvisibility=hidden -fPIC -c \ |
|
197 |
|
-isystem /nyan/glibc/current/include \ |
|
198 |
|
-isystem /nyan/linux-headers/current/include \ |
|
199 |
|
-I$build_dir \ |
|
200 |
|
-I$pkg_dir/src \ |
|
201 |
|
-I$pkg_dir/include \ |
|
202 |
|
-I$pkg_dir \ |
|
203 |
|
-I/nyan/libxml2/current/include/libxml2 \ |
|
204 |
|
$f -o $obj & |
|
205 |
|
objs="$obj $objs" |
|
206 |
|
done |
|
207 |
|
wait |
|
208 |
|
gcc -B/nyan/glibc/current/lib -shared \ |
|
209 |
|
-Wl,--version-script=$pkg_dir/xkbregistry.map \ |
|
210 |
|
-Wl,-soname=libxkbregistry.so.0 \ |
|
211 |
|
$objs \ |
|
212 |
|
-L/nyan/libxml2/current/lib -lxml2 \ |
|
213 |
|
-L/nyan/zlib/current/lib -lz \ |
|
214 |
|
-lm \ |
|
215 |
|
-o $build_dir/libxkbregistry.so.0.0.0 |
|
216 |
|
ln -sTf libxkbregistry.so.0.0.0 $build_dir/libxkbregistry.so.0 |
|
217 |
|
ln -sTf libxkbregistry.so.0 $build_dir/libxkbregistry.so |
|
218 |
|
|
|
219 |
|
cat >$build_dir/xkbregistry.pc <<EOF |
|
220 |
|
prefix=/nyan/libxkbcommon/current |
|
221 |
|
exec_prefix=/nyan/libxkbcommon/current |
|
222 |
|
libdir=/nyan/libxkbcommon/current/lib |
|
223 |
|
includedir=/nyan/libxkbcommon/current/include |
|
224 |
|
|
|
225 |
|
Name: xkbregistry |
|
226 |
|
Description: XKB API to query available rules, models, layouts, variants and options |
|
227 |
|
Version: $version |
|
228 |
|
Requires.private: libxml-2.0 |
|
229 |
|
Cflags: -I\${includedir} |
|
230 |
|
Libs: -L\${libdir} -lxkbregistry |
|
231 |
|
EOF |
161 |
232 |
#------------------------------------------------------------------------------- |
#------------------------------------------------------------------------------- |
162 |
233 |
mkdir -p /nyan/$src_name/$slot/include/xkbcommon |
mkdir -p /nyan/$src_name/$slot/include/xkbcommon |
163 |
234 |
mkdir -p /nyan/$src_name/$slot/lib/pkgconfig |
mkdir -p /nyan/$src_name/$slot/lib/pkgconfig |
164 |
|
mv -f $pkg_dir/xkbcommon/xkbcommon.h \ |
|
165 |
|
$pkg_dir/xkbcommon/xkbcommon-compat.h \ |
|
166 |
|
$pkg_dir/xkbcommon/xkbcommon-compose.h \ |
|
167 |
|
$pkg_dir/xkbcommon/xkbcommon-keysyms.h \ |
|
168 |
|
$pkg_dir/xkbcommon/xkbcommon-names.h \ |
|
169 |
|
$pkg_dir/xkbcommon/xkbcommon-x11.h \ |
|
|
235 |
|
mv -f $pkg_dir/include/xkbcommon/xkbcommon.h \ |
|
236 |
|
$pkg_dir/include/xkbcommon/xkbcommon-compat.h \ |
|
237 |
|
$pkg_dir/include/xkbcommon/xkbcommon-compose.h \ |
|
238 |
|
$pkg_dir/include/xkbcommon/xkbcommon-keysyms.h \ |
|
239 |
|
$pkg_dir/include/xkbcommon/xkbcommon-names.h \ |
|
240 |
|
$pkg_dir/include/xkbcommon/xkbcommon-x11.h \ |
|
241 |
|
$pkg_dir/include/xkbcommon/xkbregistry.h \ |
170 |
242 |
/nyan/$src_name/$slot/include/xkbcommon |
/nyan/$src_name/$slot/include/xkbcommon |
171 |
243 |
mv -f $build_dir/*.pc /nyan/$src_name/$slot/lib/pkgconfig |
mv -f $build_dir/*.pc /nyan/$src_name/$slot/lib/pkgconfig |
172 |
244 |
strip -s $build_dir/*.so |
strip -s $build_dir/*.so |
173 |
245 |
mv -f $build_dir/*.so* /nyan/$src_name/$slot/lib |
mv -f $build_dir/*.so* /nyan/$src_name/$slot/lib |
174 |
246 |
|
|
175 |
247 |
rm -Rf $build_dir $pkg_dir |
rm -Rf $build_dir $pkg_dir |
176 |
|
rmdir /run/pkgs /run/builds |
|