Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Android Emacs using Termux #230

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lisp/pdf-tools.el
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ Returns the buffer of the compilation process."
(process-environment process-environment)
(default-directory build-directory)
(autobuild (shell-quote-argument
(expand-file-name "autobuild" build-directory)))
(expand-file-name (if (eq system-type 'android) "autobuild.android" "autobuild") build-directory)))
(msys2-p (equal "bash.exe" (file-name-nondirectory shell-file-name))))
(unless shell-file-name
(error "No suitable shell found"))
Expand Down
22 changes: 22 additions & 0 deletions server/autobuild
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,26 @@ os_debian() {
return 0
}

# Android using Termux
os_android() {
if ! [ -d "/data/data/com.termux/files/home" ]; then
return 1
fi
PACKAGES="autoconf
automake
binutils
clang
libpng
poppler
zlib
make
xorgproto
pkg-config"
PKGCMD=pkg
PKGARGS="install"
return 0
}

# Msys2
os_msys2() {
if [ -z "$MSYSTEM" ] || ! [ -r "/etc/profile" ]; then
Expand Down Expand Up @@ -511,6 +531,7 @@ os_argument() {
void) os_void "$@";;
opensuse) os_opensuse "$@";;
alpine) os_alpine "$@";;
android) os_android "$@";;
*) echo "Invalid --os argument: $OS"
exit 1
esac || {
Expand Down Expand Up @@ -541,6 +562,7 @@ os_nixos "$@" || \
os_void "$@" || \
os_opensuse "$@" || \
os_alpine "$@" || \
os_android "$@" || \
{
OS_IS_HANDLED=
if [ -z "$DRY_RUN" ]; then
Expand Down
2 changes: 2 additions & 0 deletions server/autobuild.android
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
sh autobuild $@