diff --git a/pdf2htmlEX/build.gradle.kts b/pdf2htmlEX/build.gradle.kts index aac8b87..13d8e21 100644 --- a/pdf2htmlEX/build.gradle.kts +++ b/pdf2htmlEX/build.gradle.kts @@ -37,6 +37,10 @@ dependencies { implementation("com.viliussutkus89.ndk.thirdparty:fontforge${ndkVersionSuffix}-static:20200314-beta-9") implementation("com.viliussutkus89.ndk.thirdparty:poppler${ndkVersionSuffix}-static:0.89.0-beta-3") } +// "0.18.8.rc2" -> { +// implementation("com.viliussutkus89.ndk.thirdparty:fontforge${ndkVersionSuffix}-static:20230101-beta-8") +// implementation("com.viliussutkus89.ndk.thirdparty:poppler${ndkVersionSuffix}-static:21.02.0-beta-3") +// } } } @@ -95,6 +99,9 @@ tasks.extractSrc { .patch("cflags.patch") .patch("missing-tests.patch") srcDir.patch("make-a-library.patch") + + srcDir.resolve("pdf2htmlEX/src/util/ffw.c") + .patch("fontforge-share.patch") } } } @@ -114,7 +121,6 @@ tasks.register("buildPort") { cmake { } doLast { - // @TODO: verify other ABIs have matching assets val dst = layout.buildDirectory.asFile.get().resolve("assets/pdf2htmlEX/share/pdf2htmlEX").apply { mkdirs() } installDirectoryFor(com.android.ndkports.Abi.Arm).resolve("share/pdf2htmlEX").copyRecursively(dst) { file, exception -> if (exception !is FileAlreadyExistsException) { diff --git a/pdf2htmlEX/patches/0.18.8.rc1/fontforge-share.patch b/pdf2htmlEX/patches/0.18.8.rc1/fontforge-share.patch new file mode 100644 index 0000000..34e1c50 --- /dev/null +++ b/pdf2htmlEX/patches/0.18.8.rc1/fontforge-share.patch @@ -0,0 +1,13 @@ +--- pdf2htmlEX/src/util/ffw.c 2023-12-14 07:45:44.994000000 +0200 ++++ pdf2htmlEX/src/util/ffw.c 2023-12-14 07:46:21.870000000 +0200 +@@ -70,7 +70,9 @@ + void ffw_init(const char* progPath, int debug) + { + ffwSetAction("initialize"); +- char *localProgPath = strdup(progPath); ++ char *localProgPath = NULL; ++ if (progPath != NULL) ++ localProgPath = strdup(progPath); + FindProgDir(localProgPath); + InitSimpleStuff(); + if ( default_encoding==NULL )