diff --git a/fontforge/build.gradle.kts b/fontforge/build.gradle.kts index 1357522..af7e462 100644 --- a/fontforge/build.gradle.kts +++ b/fontforge/build.gradle.kts @@ -116,6 +116,9 @@ tasks.extractSrc { // fontforgeexe/startnoui.c srcDir.resolve("fontforgeexe/startnoui.c").patch(projectDir.resolve("patches/fontforgeexe-startnoui.FindOrMakeEncoding.patch")) + // https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md + srcDir.resolve("config.h.in").patch(projectDir.resolve("patches/file_offset_bits.patch")) + // android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/pwd.h // #if __ANDROID_API__ >= 26 // struct passwd* getpwent(void) __INTRODUCED_IN(26); @@ -198,14 +201,13 @@ if (portVersion == "20170731") { autoconf { args( "--disable-programs", - "--disable-native-scripting", "--disable-python-scripting", "--disable-python-extension", "--without-included-ltdl", ) generatedDependencies.resolve(toolchain.abi.triple).let { - // libfontforge fails to pick up libpng on it's own. + // libfontforge fails to pick up libpng on its own. // Vars generated by PKG_CONFIG_LIBDIR=${it.resolve("lib/pkgconfig")} pkg-config --libs --static libpng env["LIBPNG_CFLAGS"] = "-I${it.resolve("include/libpng16")}" @@ -239,7 +241,6 @@ if (portVersion == "20170731") { cmake { args( "-DENABLE_GUI=OFF", -// "-DENABLE_NATIVE_SCRIPTING=OFF", "-DENABLE_PYTHON_SCRIPTING=OFF", "-DENABLE_PYTHON_EXTENSION=OFF", ) diff --git a/fontforge/patches/file_offset_bits.patch b/fontforge/patches/file_offset_bits.patch new file mode 100644 index 0000000..fefda97 --- /dev/null +++ b/fontforge/patches/file_offset_bits.patch @@ -0,0 +1,13 @@ +--- config.h.in 2017-07-31 11:31:43.570015000 +0300 ++++ config.h.in 2023-11-03 06:04:58.549000000 +0200 +@@ -1514,8 +1514,10 @@ + /* Enable large inode numbers on Mac OS X 10.5. */ + #undef _DARWIN_USE_64_BIT_INODE + ++#if __ANDROID_MIN_SDK_VERSION__ >= 24 + /* Number of bits in a file offset, on hosts where this is settable. */ + #undef _FILE_OFFSET_BITS ++#endif + + /* Platform specific stuff */ + #undef _Keyboard