1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
Po Lu
070cb32463 ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
Po Lu
767da53fa3 Update Android port
ImageMagick now builds but does not link yet some of the time.

* INSTALL.android: Document ImageMagick and caveats.
* build-aux/ndk-build-helper-1.mk (NDK_SO_NAMES):
* build-aux/ndk-build-helper-2.mk (NDK_A_NAMES):
* build-aux/ndk-build-helper.mk (TARGET_ARCH_ABI): Define architecture
and don't respect explicitly specified library names.
* configure.ac: Enable ImageMagick and lcms2 on Android.
* cross/ndk-build/ndk-build-shared-library.mk (objname)::($(call
objname,$(LOCAL_MODULE),$(basename
$(1))))::(ALL_OBJECT_FILES$(LOCAL_MODULE)):
* cross/ndk-build/ndk-build-static-library.mk (objname)::($(call
objname,$(LOCAL_MODULE),$(basename $(1)))):
(NDK_CFLAGS, ALL_SOURCE_FILES): Handle sources files which start with
$(LOCAL_PATH).
* cross/ndk-build/ndk-clear-vars.mk: Don't undefine; clear variables
instead.
* m4/ndk-build.m4 (ndk_SEARCH_MODULE): Redirect make stderr to
config.log.xf64
2023-02-22 21:20:30 +08:00
Po Lu
98c90135fe Update Android port
* INSTALL.android: Explain how to build selinux.
* configure.ac: Enable selinux on Android.
* cross/ndk-build/ndk-build-shared-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix)::(NDK_CFLAGS_$(LOCAL_MODULE)):
* cross/ndk-build/ndk-build-static-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix)::(NDK_CFLAGS_$(LOCAL_MODULE)): Correctly
handle files with a .cc suffix, and clang-specific asflags.
* cross/ndk-build/ndk-clear-vars.mk: Handle AOSP extensions
LOCAL_ADDITIONAL_DEPENDENCIES,
LOCAL_CLANG_ASFLAGS_$(NDK_BUILD_ARCH) and LOCAL_IS_HOST_MODULE.

* doc/emacs/android.texi (Android Startup): Explain emacsclient
wrapper.

* java/org/gnu/emacs/EmacsView.java (EmacsView): New flag
`isCurrentlyTextEditor'.
(showOnScreenKeyboard, hideOnScreenKeyboard): Set as
appropriate.
(onCheckIsTextEditor): Return its value.

* lisp/touch-screen.el (touch-screen-handle-scroll): Don't ding
at buffer limits.
* m4/ndk-build.m4: Improve doc.

* src/Makefile.in (LIBSELINUX_CFLAGS): New variable.
(EMACS_CFLAGS): Add it.
2023-02-05 23:02:14 +08:00
Po Lu
22749d69e5 Add libtiff support to Android port
* INSTALL.android: Document how to build with libtiff.

* build-aux/ndk-build-helper-1.mk (NDK_SO_NAME):
* build-aux/ndk-build-helper-2.mk (NDK_A_NAME):
* build-aux/ndk-build-helper-4.mk: Decrease number of duplicate
dependencies found.
* configure.ac (ANDROID_SDK_18_OR_EARLIER, XCONFIGURE, PNG_CFLAGS)
(HAVE_TIFF): Allow using libtiff on Android.
* cross/ndk-build/ndk-clear-vars.mk: Undefine additional
variables.
* cross/ndk-build/ndk-resolve.mk: Split CFLAGS resolution from
a-name resolution, and do not recursively add archive or shared
object names for dependencies of shared libraries.

* src/Makefile.in (TIFF_CFLAGS): New variable.
(EMACS_CFLAGS): Use it.
2023-01-28 20:47:26 +08:00
Po Lu
e3b50ec8ec Update Android port
* INSTALL.android: Document support for gnutls and libgmp.
* build-aux/ndk-build-helper-1.mk (NDK_SO_NAMES, NDK_INCLUDES)
(SYSTEM_LIBRARIES):
* build-aux/ndk-build-helper-2.mk: Recursively resolve and add
shared library dependencies; even those of static libraries.
* build-aux/ndk-module-extract.awk: Fix makefile_imports code.
* configure.ac (ANDROID_SDK_18_OR_EARLIER, XCONFIGURE)
(LIBGMP_CFLAGS): Enable GMP and gnutls on Android.

* cross/ndk-build/Makefile.in (LOCAL_EXPORT_C_INCLUDES):
* cross/ndk-build/ndk-build-shared-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix)::($(LOCAL_MODULE_FILENAME)):
* cross/ndk-build/ndk-build-static-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix):
* cross/ndk-build/ndk-clear-vars.mk:
* cross/ndk-build/ndk-resolve.mk (NDK_SYSTEM_LIBRARIES):
(NDK_LOCAL_EXPORT_C_INCLUDES_$(LOCAL_MODULE)):
(NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)):
Implement ``LOCAL_ASM_RULE'' and ``LOCAL_C_ADDITIONAL_FLAGS''
extensions for libgmp.

* doc/emacs/input.texi (Touchscreens): Document how to
horizontally scroll.
* java/org/gnu/emacs/EmacsActivity.java (attachWindow): Give the
view focus again if necessary.
(onPause): Call right super function.
* java/org/gnu/emacs/EmacsPreferencesActivity.java (onClick):
Clear dumpFileName lest Emacs try to load a nonexistent dump
file.
* java/org/gnu/emacs/EmacsView.java (onDetachedFromWindow)
(onAttachedToWindow): Call super functions.
(onCreateInputConnection): Make sure the IME never obscures
Emacs.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, onKeyDown)
(onKeyUp): Improve tracking of quit keys.

* lisp/isearch.el (isearch-mode): Bring up the onscreen
keyboard.
* lisp/touch-screen.el (touch-screen-current-tool): Add three
fields.
(touch-screen-handle-scroll): Allow hscrolling as well.
(touch-screen-handle-touch): Add additional fields to
`touch-screen-current-tool'.
* src/Makefile.in (LIBGMP_CFLAGS, EMACS_CFLAGS): Add new
variable.
* src/android.c (android_run_select_thread):
(android_write_event): Use pthread_cond_broadcast because
pthread_cond_signal does nothing on some Android
versions/devices?
2023-01-28 14:29:51 +08:00
Po Lu
4de6b18793 Update Android port
* .gitignore: Update with new files.  Do not ignore std*.in.h.
* INSTALL.android: Explain how to build Emacs with external
dependencies.

* Makefile.in (xcompile, cross): Rename to `cross'.
(clean_dirs): Clean cross, not xcompile.

* README: Document new directories.

* build-aux/ndk-build-helper-1.mk (build_kind, NDK_SO_NAMES):
* build-aux/ndk-build-helper-2.mk (build_kind, NDK_SO_NAMES):
* build-aux/ndk-build-helper-3.mk (build_kind):
* build-aux/ndk-build-helper-4.mk:
* build-aux/ndk-build-helper.mk (NDK_BUILD_DIR, my-dir):
* build-aux/ndk-module-extract.awk: New files.
* configure.ac: Set up libgif, libwebp, and libpng for
ndk-build.
* cross/ndk-build/Makefile.in (srcdir, NDK_BUILD_ANDROID_MK):
* cross/ndk-build/ndk-build-executable.mk:
* cross/ndk-build/ndk-build-shared-library.mk (eq, objname):
* cross/ndk-build/ndk-build-static-library.mk (eq, objname):
* cross/ndk-build/ndk-build.in (NDK_BUILD_MODULES):
* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_MODULES)
(NDK_BUILD_SHARED):
* cross/ndk-build/ndk-clear-vars.mk:
* cross/ndk-build/ndk-prebuilt-shared-library.mk:
* cross/ndk-build/ndk-prebuilt-static-library.mk: New files.
* doc/emacs/android.texi (Android, Android Environment):
Document clipboard support on Android.
* doc/emacs/emacs.texi (Top): Update menus.
* etc/MACHINES: Document Android.
* java/AndroidManifest.xml.in: Respect new
`--with-android-debug' option.
* java/Makefile.in (CROSS_BINS, CROSS_LIBS): Adjust for rename.
Include ndk-build.mk.:(emacs.apk-in): Depend on shared
libraries.  Then, package shared libraries.
* java/org/gnu/emacs/EmacsClipboard.java (EmacsClipboard): New
class.
* java/org/gnu/emacs/EmacsFontDriver.java: Update comment to say
this is unused.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function `sendExpose'.
* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(EmacsSdk11Clipboard):
* java/org/gnu/emacs/EmacsSdk8Clipboard.java
(EmacsSdk8Clipboard): New classes.
* java/org/gnu/emacs/EmacsView.java (EmacsView, handleDirtyBitmap)
(onDetachedFromWindow): When window is reattached, expose the
frame.

* lib/Makefile.in (VPATH):
(ALL_CFLAGS): Adjust for rename.

* lisp/term/android-win.el (android-clipboard-exists-p)
(android-get-clipboard, android-set-clipboard)
(android-clipboard-owner-p, android-primary-selection)
(android-get-clipboard-1, android-get-primary)
(android-selection-bounds, android-encode-select-string)
(gui-backend-get-selection, gui-backend-selection-exists-p)
(gui-backend-selection-owner-p, gui-backend-set-selection): New
functions.

* m4/ndk-build.m4: New file.
* src/Makefile.in (GIF_CFLAGS, ANDROID_LDFLAGS): New variables.
(EMACS_CFLAGS): Add GIF_CFLAGS.  Include
ndk-build.mk.
(libemacs.so): Depend on and link with required
libraries.

* src/android.c (android_check_compressed_file): New function.
(android_open): Work around Android platform bug.
(sendExpose): New function.
(android_readdir): Set d_type if this is a directory.

* src/androidgui.h (enum android_event_type)
(struct android_expose_event, union android_event): Add expose
events.

* src/androidselect.c (struct android_emacs_clipboard)
(android_init_emacs_clipboard, Fandroid_clipboard_owner_p)
(Fandroid_set_clipboard, Fandroid_get_clipboard)
(Fandroid_clipboard_exists_p, init_androidselect)
(syms_of_androidselect): New file.

* src/androidterm.c (handle_one_android_event): Handle
exposures.
* src/androidterm.h: Update prototypes.
* src/emacs.c (android_emacs_init): Initialize androidselect.
2023-01-24 10:34:40 +08:00