XSDL: instructions how to build statically-linked xkbcomp, xsel and xli executables, fixed more paths in XSDL

This commit is contained in:
pelya
2015-01-01 02:18:31 +02:00
parent 50a6d7e253
commit 0a23656b96
8 changed files with 215 additions and 9 deletions

View File

@@ -72,7 +72,11 @@ cp $CURDIR/xserver/data/busybox-$1 ./busybox
cp $CURDIR/ssh ./
cp $CURDIR/sshpass ./
mkdir -p usr/bin
# Executables linked with NDK, which crash on some devices.
for f in xhost xkbcomp xli xsel; do cp $CURDIR/xserver/android/$1/$f ./usr/bin/ ; done
# Statically-linked prebuilt executables, generated using Debian chroot.
# There are no executables for old ARMv5, so we'll use NDK executables instead for that arch.
for f in xhost xkbcomp xli xsel; do cp $CURDIR/xserver/data/$f-$1 ./usr/bin/$f ; done
rm -f ../AndroidData/binaries-$1.zip
zip -r ../AndroidData/binaries-$1.zip .

View File

@@ -203,7 +203,7 @@ void setupEnv(void)
{
uid_t uid = geteuid();
struct passwd * pwd;
char buf[32];
char buf[PATH_MAX];
errno = 0;
pwd = getpwuid(uid);
if( !pwd )
@@ -215,6 +215,13 @@ void setupEnv(void)
__android_log_print(ANDROID_LOG_INFO, "XSDL", "User %s ID %s", pwd->pw_name, buf);
setenv("USER_ID", buf, 1);
setenv("USER", pwd->pw_name, 1);
sprintf( buf, "%s/usr/share/X11/XErrorDB", getenv("SECURE_STORAGE_DIR") );
setenv("XERRORDB", buf, 1);
sprintf( buf, "%s/usr/lib/X11/XKeysymDB", getenv("SECURE_STORAGE_DIR") );
setenv("XKEYSYMDB", buf, 1);
sprintf( buf, "%s/usr/share/X11/locale", getenv("SECURE_STORAGE_DIR") );
setenv("XLOCALEDIR", buf, 1);
sprintf( buf, "%s/usr/share/X11/locale", getenv("SECURE_STORAGE_DIR") );
}
void showError(void)

View File

@@ -16,7 +16,8 @@ x11proto-xext-dev x11proto-xf86bigfont-dev \
x11proto-xf86dga-dev x11proto-xf86dri-dev \
x11proto-xf86vidmode-dev x11proto-xinerama-dev \
libxmuu-dev libxt-dev libsm-dev libice-dev \
libxrender-dev libxrandr-dev curl autoconf automake libtool
libxrender-dev libxrandr-dev curl autoconf automake libtool \
pkg-config libjpeg-dev libpng-dev
You will need both xcb-proto and python-xcbgen packages
to have version 1.10-1, you may download newer packages
@@ -32,3 +33,67 @@ ln -s xserver project/jni/application/src
./changeAppSettings.sh -a
android update project -p project
./build.sh
New releases of XSDL contain statically linked xkbcomp, xli and xhost executables
for XSDL, because NDK r10c toolchain for some reason builds xkbcomp, which crashes
on Toshiba AT-330 with Android 4.0.3. To create these executables, you will need
to create Debian x86 and armhf chroot installations, like this:
sudo apt-get install qemu-user-static
sudo qemu-debootstrap --arch=i386 --verbose \
--components=main,universe,restricted,multiverse \
--include=fakeroot,libc-bin,locales-all,build-essential,sudo \
wheezy wheezy-x86 http://ftp.ua.debian.org/debian/
sudo qemu-debootstrap --arch=armhf --verbose \
--components=main,universe,restricted,multiverse \
--include=fakeroot,libc-bin,locales-all,build-essential,sudo \
wheezy wheezy-armhf http://ftp.ua.debian.org/debian/
sudo qemu-debootstrap --arch=mipsel --verbose \
--components=main,universe,restricted,multiverse \
--include=fakeroot,libc-bin,locales-all,build-essential,sudo \
wheezy wheezy-mipsel http://ftp.ua.debian.org/debian/
Put this into /etc/apt/sources.list in each chroot, then do sudo apt-get update:
deb http://http.debian.net/debian/ wheezy contrib main non-free
deb-src http://http.debian.net/debian/ wheezy main contrib
deb http://security.debian.org/ wheezy/updates contrib main non-free
deb-src http://security.debian.org/ wheezy/updates main contrib
deb http://http.debian.net/debian/ wheezy-updates contrib main non-free
deb-src http://http.debian.net/debian/ wheezy-updates main contrib
deb http://http.debian.net/debian/ wheezy-backports contrib main non-free
deb-src http://http.debian.net/debian/ wheezy-backports contrib main
Go to each of these chroots using chroot or schroot command, install all packages
mentioned in the previous section, then download and compile static executables:
wget http://cgit.freedesktop.org/xorg/app/xhost/snapshot/xhost-1.0.6.tar.gz
wget http://cgit.freedesktop.org/xorg/app/xkbcomp/snapshot/xkbcomp-1.2.4.tar.gz
apt-get source xli
wget https://github.com/kfish/xsel/archive/master.tar.gz
xhost:
./autogen.sh
env XHOST_LIBS="-static -lX11 -lxcb -lXau -lXdmcp -lXmuu -lpthread" ./configure
make V=1
xkbcomp:
./autogen.sh
env XKBCOMP_LIBS="-static -lxkbfile -lX11 -lxcb -lXau -lXdmcp -lXmuu -lpthread" ./configure
make V=1
xli:
cat debian/patches/series | while read F ; do patch -p1 < debian/patches/$F ; done
xmkmf
env EXTRA_LIBRARIES="-static -lxcb -lXau -lXdmcp -lXmuu -lpthread -ldl" make -e
xsel:
./autogen.sh
env LIBS="-static -lX11 -lxcb -lXau -lXdmcp -lXmuu -lpthread" ./configure ; make
make V=1