1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
Commit Graph

249 Commits

Author SHA1 Message Date
Po Lu
1a13c5e63e ; Update from Gnulib
* configure.ac:

* src/conf_post.h: Remove workarounds now rendered redundant by
Gnulib.
2024-09-05 08:45:18 +08:00
Paul Eggert
f5dbdedcc5 Update from Gnulib by running admin/merge-gnulib 2024-07-16 15:37:18 -07:00
Po Lu
c8473ee8c1 * build-aux/ndk-module-extract.awk: Do not generate newlines in output. 2024-06-30 12:11:32 +08:00
Po Lu
cab91300d0 Enable caching values generated by the Android build system
* build-aux/ndk-build-helper-1.mk:

* build-aux/ndk-build-helper-2.mk:

* build-aux/ndk-build-helper.mk: Do not generate file names with
redundant directory separators, to port to systems where the
semantics of this are undefined.

* configure.ac: Provide a cache file to the recursive invocation
of configure if one is specified for the initial.

* cross/ndk-build/Makefile.in (my-dir): Better conform to the
original ndk-build by generating directory names with no
trailing separator.

* m4/ndk-build.m4 (ndk_resolve_import_module, ndk_SEARCH_MODULE):
Cache the names of Android.mk files and the commands produced
from them.
2024-06-30 12:10:21 +08:00
Paul Eggert
4a8c8021cc Update from Gnulib by running admin/merge-gnulib
* m4/wchar_t.m4: Remove; no longer needed.
2024-06-30 01:03:16 +01:00
Eli Zaretskii
eb5aafb0f4 Fix info/DIR generation broken by update to Org manual
* build-aux/make-info-dir: Adapt to latest changes in Org manual's
markup.
2024-06-12 11:46:36 +03:00
Po Lu
a48f062e36 Minor enhancements to the Android build system
* build-aux/ndk-build-helper-1.mk:

* build-aux/ndk-build-helper-2.mk:

* cross/ndk-build/ndk-build-shared-library.mk:

* cross/ndk-build/ndk-build-static-library.mk:

* cross/ndk-build/ndk-resolve.mk
(NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)):
(NDK_LOCAL_SO_NAMES_$(LOCAL_MODULE)):
(NDK_LOCAL_A_NAMES_$(LOCAL_MODULE)): Reinforce tests for string
prefixes.

* m4/ndk-build.m4 (ndk_INIT): Guarantee that a module's
dependencies are recorded.

* configure.ac (XCONFIGURE): Prepare for building librsvg.
2024-06-06 20:56:33 +08:00
Po Lu
b86359d4ab Complete pacification of build warnings on Android
* build-aux/makecounter.sh: Introduce extern declaration of
emacs_shortlisp_counter.

* src/android.c (android_class_path): Declare static.

* src/androidfont.c (font_driver_class, font_spec_class)
(integer_class, font_metrics_class, font_object_class): Declare
static.

* src/androidterm.c (android_frame_parm_handlers): Move
declaration...

* src/androidterm.h (android_frame_parm_handlers): ... here.
2024-05-13 08:25:39 +08:00
Eli Zaretskii
687c4137fa Merge from origin/emacs-29
f37f01b504 Fix a typo in Introduction to Emacs Lisp (bug#70571).
d8687fd6cd Fix last change
494dfd9cf2 Fix indentation of if/else in 'csharp-ts-mode' (bug#70345)
1cc6322e61 ; * etc/PROBLEMS: Document crashes due to tree-sitter ABI...
42766f95e5 * build-aux/make-info-dir: Avoid bashism (bug#70484).
81476fa19e Improve documentation of selection and navigation in *xre...
2a53351492 Fix Widget manual typos, markup and omissions (bug#70502)
90be3015b4 ; Document bookmark fringe mark in the user manual
afd0b548fc Fix python-ts-mode built-in functions and attributes (bug...
dc720decc3 Fix markup and indexing in the Calendar chapter of user m...
f593bf79a9 Fix the user manual for `calendar-time-zone-style'
aed2b7a3d8 Avoid assertion violations in 'push_prefix_prop'
c929532b46 Remove ert-equal-including-properties from manual
e3aae5fd38 ; Document 'filtered-frame-list'
2024-04-27 06:23:46 -04:00
Ulrich Müller
42766f95e5 * build-aux/make-info-dir: Avoid bashism (bug#70484). 2024-04-23 21:08:02 +02:00
Po Lu
7a0f4de3c1 Improve C++ standard library detection on Android
* configure.ac: Stop relaying --with-ndk-cxx-shared to the
nested invocation of configure.

* build-aux/ndk-build-helper-1.mk (SYSTEM_LIBRARIES):

* build-aux/ndk-build-helper-2.mk (SYSTEM_LIBRARIES): Insert all
of the C++ libraries available on Android.

* configure.ac: Call ndk_LATE and ndk_LATE_EARLY within if
statement at toplevel, averting needless calls to AC_PROG_CXX.

* cross/ndk-build/Makefile.in (NDK_BUILD_CXX_STL)
(NDK_BUILD_CXX_LDFLAGS):

* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_CXX_STL)
(NDK_BUILD_CXX_LDFLAGS): New variables.

* cross/ndk-build/ndk-resolve.mk (NDK_SYSTEM_LIBRARIES):
Introduce several other C++ libraries sometimes present on
Android.
(NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)): Insert NDK_BUILD_CXX_STL
when any of these new C++ libraries are requested.

* m4/ndk-build.m4: Completely rewrite C++ compiler and library
detection.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative): Attempt to
load more libraries from static initializer.

* java/INSTALL: Remove obsolete information.
2024-03-17 19:34:09 +08:00
Paul Eggert
3add626f14 Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
Po Lu
070cb32463 ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
Po Lu
ecf08f0621 Merge from savannah/emacs-29
dc4e6b1329 ; Update copyright years in more files
64b3777631 ; Run set-copyright from admin.el
8e1c56ae46 ; Add 2024 to copyright years

# Conflicts:
#	doc/misc/modus-themes.org
#	doc/misc/texinfo.tex
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	etc/themes/modus-operandi-theme.el
#	etc/themes/modus-themes.el
#	etc/themes/modus-vivendi-theme.el
#	lib/alloca.in.h
#	lib/binary-io.h
#	lib/c-ctype.h
#	lib/c-strcasecmp.c
#	lib/c-strncasecmp.c
#	lib/careadlinkat.c
#	lib/cloexec.c
#	lib/close-stream.c
#	lib/diffseq.h
#	lib/dup2.c
#	lib/filemode.h
#	lib/fpending.c
#	lib/fpending.h
#	lib/fsusage.c
#	lib/getgroups.c
#	lib/getloadavg.c
#	lib/gettext.h
#	lib/gettime.c
#	lib/gettimeofday.c
#	lib/group-member.c
#	lib/malloc.c
#	lib/md5-stream.c
#	lib/md5.c
#	lib/md5.h
#	lib/memmem.c
#	lib/memrchr.c
#	lib/nanosleep.c
#	lib/save-cwd.h
#	lib/sha1.c
#	lib/sig2str.c
#	lib/stdlib.in.h
#	lib/strtoimax.c
#	lib/strtol.c
#	lib/strtoll.c
#	lib/time_r.c
#	lib/xalloc-oversized.h
#	lisp/auth-source-pass.el
#	lisp/emacs-lisp/lisp-mnt.el
#	lisp/emacs-lisp/timer.el
#	lisp/info-look.el
#	lisp/jit-lock.el
#	lisp/loadhist.el
#	lisp/mail/rmail.el
#	lisp/net/ntlm.el
#	lisp/net/webjump.el
#	lisp/progmodes/asm-mode.el
#	lisp/progmodes/project.el
#	lisp/progmodes/sh-script.el
#	lisp/textmodes/flyspell.el
#	lisp/textmodes/reftex-toc.el
#	lisp/textmodes/reftex.el
#	lisp/textmodes/tex-mode.el
#	lisp/url/url-gw.el
#	m4/alloca.m4
#	m4/clock_time.m4
#	m4/d-type.m4
#	m4/dirent_h.m4
#	m4/dup2.m4
#	m4/euidaccess.m4
#	m4/fchmodat.m4
#	m4/filemode.m4
#	m4/fsusage.m4
#	m4/getgroups.m4
#	m4/getloadavg.m4
#	m4/getrandom.m4
#	m4/gettime.m4
#	m4/gettimeofday.m4
#	m4/gnulib-common.m4
#	m4/group-member.m4
#	m4/inttypes.m4
#	m4/malloc.m4
#	m4/manywarnings.m4
#	m4/mempcpy.m4
#	m4/memrchr.m4
#	m4/mkostemp.m4
#	m4/mktime.m4
#	m4/nproc.m4
#	m4/nstrftime.m4
#	m4/pathmax.m4
#	m4/pipe2.m4
#	m4/pselect.m4
#	m4/pthread_sigmask.m4
#	m4/readlink.m4
#	m4/realloc.m4
#	m4/sig2str.m4
#	m4/ssize_t.m4
#	m4/stat-time.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/stdio_h.m4
#	m4/stdlib_h.m4
#	m4/stpcpy.m4
#	m4/strnlen.m4
#	m4/strtoimax.m4
#	m4/strtoll.m4
#	m4/time_h.m4
#	m4/timegm.m4
#	m4/timer_time.m4
#	m4/timespec.m4
#	m4/unistd_h.m4
#	m4/warnings.m4
#	nt/configure.bat
#	nt/preprep.c
#	test/lisp/register-tests.el
2024-01-02 10:28:14 +08:00
Po Lu
8e1c56ae46 ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
Stefan Kangas
1e270e580d ; Grammar fixes ("allow to" et al)
Ref:
https://lists.gnu.org/r/emacs-devel/2016-01/msg01598.html
https://lists.gnu.org/r/emacs-devel/2016-01/msg01465.html
2023-09-17 16:49:21 +02:00
Jim Porter
0df2efa4d6 ; Fix issues running gitmerge
* .gitattributes: Ignore whitespace issues in java/INSTALL.

* build-aux/git-hooks/pre-commit (git_diff): Explicitly allow
"ChangeLog.android".

* java/README: Remove extra trailing newline.
2023-08-21 18:22:59 -07:00
Robert Pluim
39e0121354 Escape braces in regexp in make-info-dir
This fixes a build failure on Alpine Linux.

* build-aux/make-info-dir (detexinfo): Escape the braces, since some
awk variants (such as BusyBox's) don't like regexp interval
specifications that aren't numbers.  Bug#65323
2023-08-17 12:21:46 +02:00
Paul Eggert
f3868cb9d1 Update from Gnulib by running admin/merge-gnulib 2023-08-12 12:57:35 -07:00
Po Lu
8c607783b9 Run Git hooks within xcu4
* build-aux/git-hooks/pre-commit (LC_ALL):
* build-aux/git-hooks/prepare-commit-msg (SHA1): Run using xcu4
tools.
2023-08-09 09:48:32 +08:00
Po Lu
db48c88e7e Update Android port
* build-aux/makecounter.sh (curcount): Rename `counter' to
`emacs_shortlisp_counter'.
* doc/emacs/input.texi (Touchscreens): Document
`touch-screen-extend-selection'.
* doc/lispref/commands.texi (Touchscreen Events): Document
`touchscreen-restart-drag'.
* lisp/touch-screen.el (touch-screen-extend-selection): New user
option.
(touch-screen-restart-drag): New function.
(touch-screen-handle-point-update): Handle `restart-drag'
gestures.
(touch-screen-handle-touch): Check if the prerequisites for
extending a previous drag gesture are met, and generate such
events if so.
(touch-screen-translate-touch): Update doc string.
* src/Makefile.in (otherobj): Remove BUILD_COUNTER_OBJ.
($(lispsource)/international/charprop.el):
(%.elc): Don't depend on bootstrap-emacs if cross configuring
for Android.
(libemacs.so): Directly depend on and link with
BUILD_COUNTER_OBJ.
2023-07-19 12:46:02 +08:00
Po Lu
69828fba28 Make sure Android builds are redumped upon changes to shortlisp
* build-aux/makecounter.sh: New script.
* src/Makefile.in (abs_top_builddir): New variable.
(BUILD_COUNTER_OBJ): Define to build-counter.o
if compiling for Android.
(build-counter.c): New target.  Generate this file using
makecounter.sh upon changes to lisp.mk or shortlisp.
(lisp.mk): Make and load relative to abs_top_builddir.
(emacs$(EXEEXT)): Adjust acordingly.
(mostlyclean): Remove build-counter.c.
2023-07-19 09:53:58 +08:00
Po Lu
8dd34ad8d8 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-10 08:21:59 +08:00
Paul Eggert
c3cfada3c0 Update from Gnulib by running admin/merge-gnulib 2023-07-09 13:45:13 -07:00
Po Lu
96f9fe6514 Merge remote-tracking branch 'origin/master' into feature/android 2023-05-06 07:55:02 +08:00
Jim Porter
f204c4a6cf ; Use a Bourne shell-compatible form for command substitution
* build-aux/git-hooks/post-commit:
* build-aux/git-hooks/pre-push: Use `` instead of $().
2023-05-04 22:44:40 -07:00
Jim Porter
eb3a90619f ; Allow spaces in directory names for Git hooks
* build-aux/git-hooks/post-commit:
* build-aux/git-hooks/pre-push: Quote "$HOOKS_DIR" to allow spaces.
2023-05-04 21:04:46 -07:00
Po Lu
daccdf7e6d Merge remote-tracking branch 'origin/master' into feature/android 2023-05-05 08:27:30 +08:00
Jim Porter
d3ec68f5e4 ; Fix post-commit and pre-push hooks in worktrees again
* build-aux/git-hooks/post-commit:
* build-aux/git-hooks/pre-push: Use "$(dirname $0)" to get the hooks
directory.
2023-05-04 09:22:40 -07:00
Po Lu
86b7ed619c Merge remote-tracking branch 'origin/master' into feature/android 2023-05-02 08:09:17 +08:00
Jim Porter
d01543f114 ; Use $GIT_DIR to find the .git directory inside our hooks
This resolves an issue with running the hooks from a worktree.  See
<https://lists.gnu.org/archive/html/emacs-devel/2023-05/msg00000.html>.

* build-aux/git-hooks/post-commit:
* build-aux/git-hooks/pre-push: Use $GIT_DIR.
2023-05-01 09:51:56 -07:00
Po Lu
3d7c06869d Update Android port
* build-aux/ndk-build-helper.mk (TARGET_ARCH): Define variable.
* configure.ac (ENABLE_CHECKING, CHECK_STRUCTS)
(GC_CHECK_STRING_OVERRUN, GC_CHECK_STRING_FREE_LIST, GLYPH_DEBUG)
(GC_CHECK_STRING_BYTES): Enable checking correctly on Android.
* java/README: Fix typos.
* m4/ndk-build.m4 (ndk_run_test): Pass target arch.
* src/android.c (android_get_content_name, android_close)
(android_fclose, android_check_string): Fix various typos caught
by checking.
* src/charset.c (load_charset_map_from_file): Call emacs_fclose,
not fclose.
* src/image.c (image_set_transform): Fix thinko.
(png_load_body, jpeg_load_body, gif_load): Call emacs_fclose,
not fclose.  Use open instead of fdopen.
* src/xfaces.c (Fx_load_color_file): Likewise.
2023-04-29 08:27:44 +08:00
Po Lu
85a9757b3c Merge remote-tracking branch 'origin/master' into feature/android 2023-04-24 08:49:30 +08:00
Jim Porter
65735cee71 ; Fix last change 2023-04-23 12:08:32 -07:00
Jim Porter
3ce462c8fd When examining merge commits in our Git hooks, only check the first parent
This does two things:

  1. We can properly validate log entries in merge commits.
  2. We don't check commits that were merged in from other branches.

* build-aux/git-hooks/commit-msg-files.awk (get_commit_changes): Get
the changes compared to the first parent.

* build-aux/git-hooks/pre-push: Only get the first parent of merge
commits when returning the rev-list, and only check "master" or
"emacs-NN" branches.
2023-04-23 12:07:08 -07:00
Jim Porter
e26dcc0e14 ; Fix logic of Git pre-push hook when pushing a new branch
* build-aux/git-hooks/pre-push: Update the Git command to run on each
iteration.
2023-04-23 12:07:08 -07:00
Jim Porter
9914de503b Improve the logic of the file entry Git hooks to support more cases
In addition to starting with a "*", file entries now need a ":"
somewhere in them.  This helps reduce false positives with bulleted
lists.  Also, support multiple files separated by commas after a "*".

* build-aux/git-hooks/commit-msg-files.awk (check_commit_msg_files):
Accumulate file entries over multiple lines to support the above.
2023-04-23 12:07:08 -07:00
Po Lu
74fd40c030 Merge remote-tracking branch 'origin/master' into feature/android 2023-04-22 09:21:25 +08:00
Jim Porter
4416262f59 Add Git hooks to check filenames listed in the commit message
See <https://lists.gnu.org/archive/html/emacs-devel/2023-04/msg00274.html>.

* build-aux/git-hooks/commit-msg-files.awk:
* build-aux/git-hooks/post-commit:
* build-aux/git-hooks/pre-push: New files...
* autogen.sh: ... add them.
2023-04-20 21:40:02 -07:00
Po Lu
d8ea139e83 Improve ndk-build implementation
* build-aux/ndk-build-helper.mk: Define in terms of BUILD_AUXDIR.
* m4/ndk-build.m4 (ndk_INIT): Find right build-aux directory.
Remove uses of unportable shell constructs.
2023-03-03 21:13:58 +08:00
Po Lu
351813556d Fix ImageMagick build on Android
* INSTALL.android (-linux_arm_sources):
* build-aux/ndk-build-helper-1.mk:
(NDK_$(LOCAL_MODULE)_STATIC_LIBRARIES)::(NDK_CXX_FLAG_$(LOCAL_MODULE)):
* build-aux/ndk-build-helper-2.mk:
(NDK_$(LOCAL_MODULE)_STATIC_LIBRARIES)::(NDK_CXX_FLAG_$(LOCAL_MODULE)):
* 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))))::(ALL_OBJECT_FILES$(LOCAL_MODULE)):
(ALL_SOURCE_FILES): Update ImageMagick build instructions and
C++ module detection.
2023-02-23 21:31:42 +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
Paul Eggert
04d97e76a9 Update from Gnulib by running admin/merge-gnulib 2023-02-04 15:14:16 -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
22f7ad1057 Update Android port
* INSTALL.android: Document how to install sqlite3.
* build-aux/ndk-build-helper-1.mk (SYSTEM_LIBRARIES):
* build-aux/ndk-build-helper-2.mk (SYSTEM_LIBRARIES): Add liblog
and libandroid.
* configure.ac (SQLITE3_LIBS, HAVE_SQLITE3)
(HAVE_SQLITE3_LOAD_EXTENSION): Support on Android.
(APKSIGNER): Look for this new required binary.

* cross/ndk-build/ndk-build-shared-library.mk (objname):
* cross/ndk-build/ndk-build-static-library.mk (objname): Avoid
duplicate rules by prefixing objects with module type.

* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_SHARED): Fix
definition.
* cross/ndk-build/ndk-resolve.mk:
(NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)): Handle new system
libraries.

* doc/emacs/android.texi (Android File System): Document Android
10 system restriction.

* java/AndroidManifest.xml.in: Target Android 33, not 28.
* java/Makefile.in (SIGN_EMACS_V2, APKSIGNER): New variables.
($(APK_NAME)): Make sure to apply a ``version 2 signature'' to
the package as well.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
argument apiLevel.
* java/org/gnu/emacs/EmacsNoninteractive.java (main):
* java/org/gnu/emacs/EmacsThread.java (run): Pass API level.
* m4/ndk-build.m4 (ndk_package_mape): Add package mapping for
sqlite3.
* src/Makefile.in (SQLITE3_CFLAGS): New substition.
(EMACS_CFLAGS): Add that variable.

* src/android.c (android_api_level): New variable.
(initEmacs): Set it.
(android_file_access_p): Make static.
(android_hack_asset_fd): Adjust for restrictions in Android 29
and later.
(android_close_on_exec): New function.
(android_open): Adjust to not duplicate file descriptor even if
CLOEXEC.
(android_faccessat): Use fstatat at-func emulation.

* src/android.h: Update prototypes.
* src/dired.c (file_name_completion_dirp):
* src/fileio.c (file_access_p, Faccess_file): Now that
sys_faccessat takes care of everything, stop calling
android_file_access_p.
2023-01-26 19:54:38 +08:00
Po Lu
4255d7f051 Update Android port
* .gitignore: Ignore lib/math.h.
* INSTALL.android: Update accordingly.
* build-aux/ndk-build-helper-1.mk:
* build-aux/ndk-build-helper-2.mk:
* build-aux/ndk-build-helper.mk:
* build-aux/ndk-module-extract.awk: Handle C++ modules.
* configure.ac: Enable libxml2 on Android.

* cross/ndk-build/Makefile.in:
* cross/ndk-build/ndk-build-shared-library.mk:
* cross/ndk-build/ndk-build-static-library.mk:
* cross/ndk-build/ndk-build.mk.in:
* cross/ndk-build/ndk-resolve.mk: Fix dependency resolution of
includes.

* java/org/gnu/emacs/EmacsView.java (popupMenu): Fix minimum SDK
version for actual popup menus.
* lib/math.h: Delete file.

* m4/ndk-build.m4 (ndk_SEARCH_MODULE, ndk_CHECK_MODULES): Look
for nasm and C++ libraries.

* src/android.c (faccessat): Rename to `android_faccessat'.
* src/android.h: Update prototypes.
* src/dired.c (file_name_completion_dirp):
* src/fileio.c (file_access_p, Faccess_file, file_directory_p):
* src/lisp.h:
* src/lread.c (openp):
* src/process.c (allocate_pty): Use sys_faccessat.
* src/sysdep.c (sys_faccessat): New function.
2023-01-26 15:37:04 +08:00
Po Lu
54836c47c7 Enable libjpeg on Android
* INSTALL.android: Update documentation.
* build-aux/ndk-build-helper-1.mk: When building shared
libraries, do not link libemacs.so with dependent archive files.
* build-aux/ndk-build-helper-2.mk: Add whole archive
dependencies as well.

* configure.ac (HAVE_JPEG): Enable on Android.

* cross/ndk-build/ndk-build-shared-library.mk: Link the shared
object with archive file dependencies.
* cross/ndk-build/ndk-build-static-library.mk: Build all code
position-independently.
* cross/ndk-build/ndk-resolve.mk: Separately resolve a names of
archive and whole archive dependencies.

* src/Makefile.in (JPEG_CFLAGS): New variable.
(EMACS_CFLAGS): Add it.
2023-01-24 19:10:58 +08:00
Po Lu
56e55a8008 Update Android port
* INSTALL.android: Update.
* build-aux/ndk-build-helper-1.mk: Fix typo.
* configure.ac: Enable --with-json on Android.
* cross/ndk-build/ndk-build-shared-library.mk:
(NDK_CFLAGS_$(LOCAL_MODULE)):
(LOCAL_MODULE_FILENAME):
* cross/ndk-build/ndk-build-static-library.mk:
(ALL_OBJECT_FILES$(LOCAL_MODULE)):
(LOCAL_MODULE_FILENAME): Recursively resolve dependencies.
* cross/ndk-build/ndk-resolve.mk: New function.

* doc/emacs/android.texi (Android Startup): Document how Emacs
is dumped during initial startup.

* java/Makefile.in (filename): Fix build with multiple shared
libraries.
* java/README: Improve commentary.
* java/org/gnu/emacs/EmacsApplication.java (onCreate): Look and
set dump file.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function getFingerprint.
* java/org/gnu/emacs/EmacsPreferencesActivity.java (onCreate):
Add option to erase the dump file.
* java/org/gnu/emacs/EmacsService.java (browseUrl): New
function.
* java/org/gnu/emacs/EmacsThread.java (run): Specify dump file
if found.
* lisp/loadup.el: Always dump during loadup on Android.

* lisp/net/browse-url.el (browse-url--browser-defcustom-type):
(browse-url-default-browser):
(browse-url-default-android-browser): New browse url type.

* m4/ndk-build.m4 (ndk_package_map): Map jansson to libjansson.
* src/android.c (struct android_emacs_service): New method
`browse_url'.
(getFingerprint): New function.
(android_init_emacs_service): Initialize new method.
(android_browse_url): New function.

* src/android.h: Update prototypes.

* src/androidselect.c (Fandroid_browse_url): New function.
(syms_of_androidselect): Define it.

* src/emacs.c (load_pdump): Don't look in fancy places on
Android.
* src/pdumper.c (Fdump_emacs_portable): Allow dumping while
interactive on Android.
(syms_of_pdumper): New variable `pdumper-fingerprint'.

* src/sfntfont-android.c (sfntfont_android_composite_bitmap):
Fix unused variables.
2023-01-24 17:31:16 +08:00
Po Lu
3267a2d6d2 Update from gnulib
Update from gnulib.  In addition,

* admin/merge-gnulib: Fix paths for rename.
2023-01-24 10:46:53 +08:00