1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
Commit Graph

61 Commits

Author SHA1 Message Date
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
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
3bcdf010a9 Generate Android shared library list automatically
* .gitignore: Ignore new generated files.

* cross/Makefile.in (src/Makefile): Remove leftover
specification of the source Gnulib directory.

* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_READELF): New
variable.

* java/Makefile.in (CONFIG_FILE, ALL_DEPENDENCIES, READELF)
(cf-stamp-1, cf-stamp): New variables and rules; compute the set
of library files in the order of loading and generate a file
with this information.
(ALL_CLASS_FILES): New variable; if builddir is not srcdir,
$($(CONFIG_FILE), $(CLASS_FILES)): Depend on EmacsConfig.java.
add generated files in the build directory.
(classes.dex): Adjust to match.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative)
<static initializer>: Load shared libraries from
EMACS_SHARED_LIBRARIES rather than a hard-coded list.

* m4/ndk-build.m4 (ndk_INIT): Search for readelf...
(ndk_CHECK_MODULES): ...and substitute its path as
NDK_BUILD_READELF.
2024-04-22 16:30:15 +08:00
Po Lu
ad428e39d7 Guarantee presence of emacs-module.h during cross-compilation
* cross/Makefile.in (src/emacs-module.h): New rule.
(src/libemacs.so): Depend on the same.
2024-04-11 10:31:17 +08:00
Po Lu
3b6bc312f2 Guarantee presence of epaths.h during cross-compilation
* cross/Makefile.in (src/epaths.h): New rule.
(src/libemacs.so): Depend on the same.
2024-04-11 10:25:29 +08: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
8d09e1def5 Port to GNU Make 03ecd94488b85adc38746ec3e7c2a297a522598e
Problem reported by Collin Funk (Bug#68996).
* GNUmakefile (.): New macro.
(help): Use ‘$.’ instead of ‘$ ’.
* cross/verbose.mk.android, src/verbose.mk.in (.): New macro.
(AM_V_AR, AM_V_CC, AM_V_CXX, AM_V_CCLD, AM_V_CXXLD, AM_V_GEN):
Use ‘$.’ instead of ‘$ ’.
* lib-src/Makefile.in (install): Use ‘$.’ instead of ‘$ ’.
2024-02-08 23:22:00 -08:00
Po Lu
070cb32463 ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
Stefan Kangas
06a12b0ccc ; Fix typos 2023-12-10 13:22:04 +01:00
Po Lu
b35431b218 Fix bootstrap-clean in the cross directory on USG
* cross/Makefile.in (FIND_DELETE): New variable.
(CLEAN_SUBDIRS): Avoid including src if not already present.
(clean, bootstrap-clean, etc): Use FIND_DELETE.
2023-08-13 09:45:36 +08:00
Po Lu
fcf53bf9f5 Fix doc file generation on Android
* .gitignore: Ignore cross/etc/DOC.
* configure.ac: Make the directory `cross/etc'.
* cross/Makefile.in (CLEAN_SUBDIRS): Clean files inside `etc' as
well.
* java/Makefile.in (install_temp): Copy cross/etc/DOC to the
package if it is available.
* src/Makefile.in (SOME_MACHINE_OBJECTS): Add androidselect.c,
sfntfont-android.c and sfntfont.c.
(libemacs.so): Depend on $(etc)/DOC.
2023-07-11 16:47:13 +08:00
Po Lu
3198b7dc56 Update Android port
* cross/verbose.mk.android: Get rid of badly aligned ANDROID_CC
messages.
* java/org/gnu/emacs/EmacsInputConnection.java (syncAfterCommit)
(extractAbsoluteOffsets): Add workarounds for several kinds of
machines.
(commitText, getExtractedText): Likewise.
* src/textconv.c (really_commit_text): Improve definition of
POSITION.
(get_extracted_text): Default to providing at least 4
characters.
2023-05-06 11:32:56 +08:00
Po Lu
af7f0b6f9b Update Android port
* cross/Makefile.in (lib/gnulib.mk): Edit out
build-aux stuff.
* m4/ndk-build.m4: Also look for cross ranlib.
2023-03-15 16:17:32 +08:00
Po Lu
5b9d6738d1 Update Android port
* configure.ac (XCONFIGURE): Disable NS.
* cross/Makefile.in (lib-src/config.h):

(lib/libgnu.a):
(src/android-emacs): Port sed invocation to Mac OS without GNU
sed.
2023-03-15 15:07:29 +08:00
Po Lu
e0f4002161 Fix cross compilation of cross/lib in some cases
* cross/Makefile.in: (config.status): Depend on
top_builddir/config.status instead.
2023-03-05 11:04:06 +08:00
Po Lu
bf66725034 ; * cross/Makefile.in (builddir): Define. 2023-03-05 10:42:41 +08:00
Po Lu
56d783cf9d ; * cross/README: Update. 2023-03-05 10:22:49 +08:00
Po Lu
f484f6b74f Remove redundant gnulib files
* cross/lib: Delete.  Make configure generate it instead.
2023-03-05 10:22:33 +08:00
Po Lu
3be448f429 Remove redundant second copy of gnulib
* .gitignore: Simplify cross/lib rule.
* admin/merge-gnulib (avoided_flags): Stop copying to cross/lib.
* configure.ac: Link gnulib source and header files to
cross/lib.
* cross/Makefile.in (LIB_SRCDIR): Make relative to builddir.
(maintainer-clean): Merge with distclean.  Remove links created
by configure.
2023-03-05 10:18:28 +08:00
Po Lu
b5bf4dc5b5 Fix x86_64 builds of libjpeg on Android
* cross/ndk-build/ndk-build-shared-library.mk:
* cross/ndk-build/ndk-build-static-library.mk: Specify right ELF
format for 64 bit executables.
2023-03-04 21:05:02 +08:00
Po Lu
8f3f9c2550 Fix calls to nasm in cross/ndk-build
* cross/ndk-build/ndk-build-shared-library.mk:
* cross/ndk-build/ndk-build-static-library.mk: Ensure nasm
generates ELF objects.
2023-03-04 21:01:28 +08:00
Po Lu
0e995d06a8 Improve support for building Android C++ dependencies
* configure.ac: Call ndk_LATE after gl_EARLY.
* cross/ndk-build/Makefile.in (NDK_BUILD_CXX): New variable.
* cross/ndk-build/ndk-build-shared-library.mk:
* cross/ndk-build/ndk-build-static-library.mk: Use it.
* java/INSTALL: Describe how to build C++ dependencies.
* m4/ndk-build.m4 (ndk_LATE): New macro.
(ndk_INIT): Try to find a suitable C++ compiler.
(ndk_CHECK_MODULES): Make sure the C++ compiler works before
allowing C++ dependencies.
2023-03-04 11:19:25 +08:00
Po Lu
0d363aded1 Fix cross-compilation of C++ code with old NDK versions
* cross/ndk-build/Makefile.in (NDK_BUILD_CFLAGS_CXX): New variable.
* cross/ndk-build/ndk-build-shared-library.mk
($(call objname,$(LOCAL_MODULE),$(basename $(1)))):
* cross/ndk-build/ndk-build-static-library.mk
($(call objname,$(LOCAL_MODULE),$(basename $(1)))): Use it to build
C++ code.
2023-03-04 08:45:11 +08:00
Po Lu
ece6d61301 Fix out-of-tree builds with native dependencies
* cross/ndk-build/ndk-build-shared-library.mk:
* cross/ndk-build/ndk-build-static-library.mk: Include
ndk-resolve.mk in srcdir.
2023-03-03 21:22:00 +08:00
Po Lu
468e8d7322 ; * cross/ndk-build/README: Update accordingly. 2023-03-03 21:14:08 +08:00
Po Lu
960230d88d Summary: Update Android port
* INSTALL: Document where to find Android installation
instructions.
* configure.ac (CHECK_LISP_OBJECT_TYPE): Pacify
-Wsuggest-attribute=noreturn only on Android.
* cross/ndk-build/README: New file.
* doc/emacs/android.texi (Android):
* doc/emacs/emacs.texi (Top):
* doc/emacs/input.texi (Other Input Devices): Untabify menus.
* etc/NEWS: Move INSTALL.android to java/INSTALL.
* java/INSTALL: New file.
* java/README:
* src/coding.c (from_unicode_buffer): Make Android specific code
only build on Android.
2023-03-02 18:31:35 +08:00
Po Lu
cb233cb88a Fix Makefile race conditions
* configure.ac: Make cross/* and related directories.
* cross/Makefile.in (src/verbose.mk, lib/libgnu.a)
(src/config.h): Stop making directories here.
(lib-src/config.h): New config.h rule.
($(LIBSRC_BINARIES)): Add it.
(clean): Don't remove CLEAN_SUBDIRS, but clean inside.
2023-03-02 15:59:33 +08:00
Po Lu
daf9c62871 Fix out-of-tree Android builds
* configure.ac (JAVA_PUSH_LINT): Push to WARN_JAVAFLAGS instead
of JAVAFLAGS.
(cross/lib): Always AS_MKDIR_P.
* cross/Makefile.in (srcdir): New variable.
(LIB_SRCDIR): Take realpath relative to srcdir, not
.:(src/verbose.mk): Depend on verbose.mk.android in srcdir.
(lib/Makefile): Edit srcdir and VPATH to LIB_SRCDIR.
(src/Makefile): Edit -I$$(top_srcdir) to -I../$(srcdir)/lib,
instead of ommitting it.
(clean): Allow ndk-build clean to fail.

* java/Makefile.in (builddir): New variable.
(WARN_JAVAFLAGS): Likewise.
(JAVAFLAGS): Define in terms of WARN_JAVAFLAGS.
(SIGN_EMACS, SIGN_EMACS_V2): Use emacs.keystore relative to
srcdir.  Allow inclusion of ndk-build.mk to fail.
(install_temp, emacs.apk-in)
(../config.status): Depend relative to top_srcdir.
(AndroidManifest.xml, $(APK_NAME)): Likewise.
(RESOURCE_FILE, CLASS_FILES, classes.dex): Output class files
to $(srcdir); these are arch independents, so this is okay.
2023-03-01 19:35:19 +08:00
Po Lu
920168c5d8 Fix mostlyclean rules
* cross/Makefile.in: Remove outdated comment.
* src/Makefile.in: (.PHONY): Clean android-emacs and
libemacs.so, not emacs.so and aemacs.
2023-03-01 15:54:57 +08:00
Po Lu
74a7d34361 Update from gnulib
* cross/lib/unistd.in.h:
* lib/gnulib.mk.in (INT64_MAX_EQ_LONG_MAX):
* m4/gnulib-comp.m4 (gl_EARLY): Update from gnulib.
2023-02-26 14:14:43 +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
1d84465236 ; Fix typo
* cross/ndk-build/ndk-build-shared-library.mk: Fix typo.
2023-02-22 21:24:59 +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
8ca4162ecd Update from gnulib
* admin/merge-gnulib (GNULIB_MODULES):
* cross/lib/getopt-pfx-core.h (optind):
* cross/lib/limits.in.h (BOOL_WIDTH):
* cross/lib/math.in.h:
* cross/lib/stpncpy.c (__stpncpy):
* cross/lib/string.in.h:
* lib/getopt-pfx-core.h (optind):
* lib/gnulib.mk.in (ANDROID_MIN_SDK):
(GL_COND_OBJ_STDIO_READ_CONDITION):
(LIBS):
(NDK_BUILD_AR):
(REPLACE__EXIT):
(libgnu_a_SOURCES):
* lib/limits.in.h (BOOL_WIDTH):
* lib/math.in.h:
* lib/stpncpy.c (__stpncpy):
* lib/string.in.h:
* m4/assert_h.m4 (gl_ASSERT_H):
* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR):
* m4/getdelim.m4 (gl_FUNC_GETDELIM):
* m4/getline.m4 (gl_FUNC_GETLINE):
* m4/gnulib-common.m4 (gl_COMMON_BODY):
(gl_CONDITIONAL_HEADER):
(gl_CHECK_FUNCS_ANDROID):
* m4/gnulib-comp.m4 (gl_EARLY):
(gl_INIT):
(gl_FILE_LIST):
* m4/limits-h.m4:
* m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK):
* m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
* m4/printf.m4 (gl_PRINTF_SIZES_C99):
(gl_PRINTF_INFINITE):
(gl_PRINTF_INFINITE_LONG_DOUBLE):
(gl_PRINTF_DIRECTIVE_A):
(gl_PRINTF_DIRECTIVE_F):
(gl_PRINTF_FLAG_ZERO):
(gl_SNPRINTF_PRESENCE):
(gl_SNPRINTF_DIRECTIVE_N):
(gl_VSNPRINTF_ZEROSIZE_C99):
* m4/pselect.m4 (gl_FUNC_PSELECT):
* m4/readlink.m4 (gl_FUNC_READLINK):
* m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
* m4/signbit.m4 (gl_SIGNBIT):
* m4/stpncpy.m4 (gl_FUNC_STPNCPY):
* m4/symlink.m4 (gl_FUNC_SYMLINK): Add gnulib module stpncpy.
* src/android.c: Include string.h.
2023-02-21 16:29:57 +08:00
Po Lu
05791d09f6 * cross/Makefile.in (src/libemacs.so): Depend on libgnu.a. 2023-02-19 21:57:17 +08:00
Po Lu
585ee91b21 More fixes to parallel Make
* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_MODULES)
(NDK_BUILD_SHARED, NDK_BUILD_STATIC): Define group rule to build
all files so that they are built within one make process.
* java/Makefile.in: Reorganize cross compilation and make sure
there is only one make subprocess for each subdirectory of
cross.
2023-02-19 21:52:21 +08:00
Po Lu
f319605207 More parallel build fixes
* cross/Makefile.in: (.PHONY):
* java/Makefile.in: (.PHONY):
* src/Makefile.in: (libemacs.so): Avoid calling ndk-build from
two places at once.  Build android-emacs separately from
libemacs.so.
2023-02-19 21:25:37 +08:00
Po Lu
18f723faa8 Fix parallel compilation of Android port
* cross/Makefile.in ($(top_builddir)/lib/libgnu.a):
* java/Makefile.in (CROSS_LIBS): Explicitly depend on gnulib
to prevent it from being built at the same time from different
jobs.
2023-02-19 20:45:32 +08:00
Po Lu
dc120c7ad6 Improve appearance of the Android preferences screen
* .gitignore: Add org/gnu/emacs/R.java.
* cross/Makefile.in (top_builddir): Include verbose.mk.  Rewrite
rules to print nice looking statements.
* doc/emacs/android.texi (Android, Android Startup)
(Android Environment, Android Windowing, Android Fonts):
* doc/emacs/emacs.texi (Top): Add an extra ``Android
Troubleshooting'' node and move troubleshooting details there.
* java/Makefile.in: Generate R.java; improve appearance by using
verbose.mk.

* java/org/gnu/emacs/EmacsPreferencesActivity.java: Reimplement
in terms of PreferencesActivity.
* java/org/gnu/emacs/EmacsView.java (handleDirtyBitmap): Avoid
flicker.
* java/res/xml/preferences.xml: New file.
* src/verbose.mk.in (AM_V_AAPT, AM_V_SILENT): New variables.
2023-02-10 23:03:43 +08:00
Po Lu
e1c7b8ad61 Adjust ndk-build implementation for old NDK versions
* configure.ac: Pass ANDROID_CFLAGS to ndk_INIT.
* cross/ndk-build/Makefile.in (NDK_BUILD_CFLAGS):
* cross/ndk-build/ndk-build-shared-library.mk
($(call objname,$(LOCAL_MODULE),$(basename $(1)))):
($$(error Unsupported suffix):
* cross/ndk-build/ndk-build-static-library.mk
($(call objname,$(LOCAL_MODULE),$(basename $(1)))):
($$(error Unsupported suffix): Use NDK_BUILD_CFLAGS.
* m4/ndk-build.m4 (ndk_INIT): Accept cflags.
(ndk_CONFIG_FILES): Export NDK_BUILD_CFLAGS.
2023-02-06 22:26:45 +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
1b8beed960 Update from gnulib
* admin/merge-gnulib (avoided_flags):
* cross/lib/cdefs.h (__bos):
(__glibc_unsigned_or_positive):
(__glibc_unsafe_len):
(__glibc_fortify):
(__glibc_fortify_n):
* cross/lib/isnan.c:
* cross/lib/libc-config.h:
* cross/lib/openat-proc.c (openat_proc_name):
* cross/lib/vasnprintf.c (VASNPRINTF):
* cross/lib/verify.h (_Static_assert):
(_GL_SA3):
* lib/gnulib.mk.in (HAVE_GRANTPT):
(HAVE_SPAWN_H):
(NEXT_AS_FIRST_DIRECTIVE_LIMITS_H):
(NEXT_LIMITS_H):
(REPLACE_GETSUBOPT):
(REPLACE_ILOGB):
(SYSTEM_TYPE):
(BUILT_SOURCES):
* lib/isnan.c:
* lib/vasnprintf.c (VASNPRINTF):
* lib/verify.h (_GL_SA3):
* m4/gnulib-common.m4 (gl_COMMON_BODY):
* m4/gnulib-comp.m4 (gl_INIT): Update from gnulib.
2023-02-05 21:06:11 +08:00
Po Lu
f69583941c Update Android port
* cross/ndk-build/ndk-build-shared-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1)))):
* cross/ndk-build/ndk-build-static-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1)))): Revert broken typo
fixes.
* src/sfnt.c (TEST_STATIC): Define ARRAYELTS.
(sfnt_table_names): New CVT and FPGM tables.
(sfnt_decompose_compound_glyph, sfnt_decompose_glyph)
(struct sfnt_large_integer, sfnt_multiply_divide_1)
(sfnt_count_leading_zero_bits, sfnt_multiply_divide_2)
(sfnt_multiply_divide, sfnt_mul_fixed, sfnt_div_fixed)
(sfnt_ceil_fixed, sfnt_build_glyph_outline): Fix fixed point
multiplication routines on systems without 64 bit long long
type.
(SFNT_ENABLE_HINTING, struct sfnt_test_dcontext, sfnt_test_move_to)
(sfnt_test_line_to, sfnt_test_curve_to, sfnt_test_get_glyph)
(sfnt_test_free_glyph, sfnt_test_span, sfnt_test_edge_ignore)
(sfnt_read_cvt_table, sfnt_test_edge, sfnt_test_raster)
(sfnt_read_fpgm_table, struct sfnt_unit_vector)
(struct sfnt_interpreter_definition)
(struct sfnt_interpreter_graphics_state, struct sfnt_interpreter)
(sfnt_div_f26dot6, sfnt_mul_f26dot6, sfnt_floor_f26dot6)
(sfnt_ceil_f26dot6, sfnt_round_f26dot6, sfnt_init_graphics_state)
(sfnt_make_interpreter, enum sfnt_interpreter_run_context)
(sfnt_interpret_trap, STACKSIZE, sfnt_set_srounding_state)
(sfnt_skip_code, sfnt_interpret_unimplemented, sfnt_interpret_fdef)
(sfnt_interpret_idef, sfnt_interpret_if, sfnt_interpret_else)
(sfnt_round_none, sfnt_round_to_grid, sfnt_round_to_double_grid)
(sfnt_round_down_to_grid, sfnt_round_up_to_grid)
(sfnt_round_to_half_grid, sfnt_round_super, sfnt_validate_gs)
(sfnt_interpret_run, sfnt_interpret_font_program)
(test_interpreter_profile, test_cvt_values, test_interpreter_cvt)
(test_interpreter_head, sfnt_make_test_interpreter)
(struct sfnt_interpreter_test, sfnt_run_interpreter_test)
(struct sfnt_generic_test_args, sfnt_generic_check)
(sfnt_check_srp0, sfnt_check_szp0, sfnt_check_sloop)
(struct sfnt_rounding_test_args, sfnt_check_rounding)
(sfnt_check_smd, sfnt_check_scvtci, sfnt_check_sswci)
(sfnt_check_ssw, sfnt_check_flipon, sfnt_check_flipoff)
(npushb_test_args, npushw_test_args, pushb_test_args)
(pushw_test_args, stack_overflow_test_args)
(stack_underflow_test_args, rtg_test_args, rtg_symmetric_test_args)
(rtg_1_test_args, rtg_1_symmetric_test_args, rthg_test_args)
(rthg_1_test_args, rtdg_test_args, rtdg_1_test_args)
(rtdg_2_test_args, rtdg_3_test_args, else_test_args)
(jmpr_test_args, dup_test_args, pop_test_args, clear_test_args)
(swap_test_args, depth_test_args, cindex_test_args)
(mindex_test_args, raw_test_args, loopcall_test_args)
(call_test_args, fdef_test_args, fdef_1_test_args, endf_test_args)
(ws_test_args, rs_test_args, wcvtp_test_args, rcvt_test_args)
(mppem_test_args, mps_test_args, debug_test_args, lt_test_args)
(all_tests, main): Check in WIP hinting code.

* src/sfnt.h (enum sfnt_table): Add `cvt ' and `fpgm' tables.
2023-01-30 21:19:33 +08:00
Po Lu
ad90fe7db7 Check in missing files
* .gitignore:
* cross/lib/_Noreturn.h (_Noreturn): Add missing gnulib files.
2023-01-29 12:48:54 +08:00
Po Lu
492aa74b13 Update Android port
* INSTALL.android (module_target): Clarify documentation.
* cross/ndk-build/ndk-build-shared-library.mk:
* cross/ndk-build/ndk-build-static-library.mk: Fix building Neon objects.
* java/AndroidManifest.xml.in: Add a version code.
2023-01-29 11:21:07 +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
6f2a518f27 Update from gnulib
* cross/lib/stdalign.in.h (_GL_STDALIGN_H):
(_):
(__alignof_is_defined):
* cross/lib/vasnprintf.c:
* lib/gnulib.mk.in (ANDROID_MIN_SDK):
(HAVE_SPAWN_H):
(LIBGCCJIT_LIBS):
(NATIVE_COMPILATION_AOT):
(NEXT_AS_FIRST_DIRECTIVE_LIMITS_H):
(NEXT_LIMITS_H):
(SIZEOF_LONG):
(stdalign.h):
* ../../../../dev/null:
* lib/stdalign.in.h (_GL_STDALIGN_H):
(_):
(__alignof_is_defined):
* lib/vasnprintf.c:
* m4/gnulib-common.m4 (gl_COMMON_BODY):
* m4/stdalign.m4 (gl_ALIGNASOF):
* m4/stddef_h.m4: Update from gnulib.
2023-01-28 14:33:58 +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
b0e7ae6d5b Update Android port
* INSTALL.android: Describe that apksigner is also required.
* configure.ac: Correctly add cross/Makefile to
SUBDIR_MAKEFILES.
* cross/Makefile.in: (config.status): Depend on
$(top_srcdir)/config.status.
* doc/emacs/input.texi (On-Screen Keyboards): Document how to
quit without a physical keyboard.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function `quit'.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): New field
`lastVolumeButtonPress'.
(onKeyDown): Quit if necessary.
* m4/ndk-build.m4 (ndk_where_cc): Fix search if CC is not a
single word.
* src/android.c (android_open): Remove unused variable.
(quit): New function.
* src/androidmenu.c (android_process_events_for_menu): Allow
quitting the menu.
* src/xterm.c (handle_one_xevent, x_term_init, syms_of_xterm):
Implement features described above, so they work on free
operating systems.
* src/xterm.h (struct x_display_info): New fields `quit_keysym',
`quit_keysym_time'.
2023-01-26 22:11:04 +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