From 5e931b21d4689bcf16e8bc26d856d65fe5bad08e Mon Sep 17 00:00:00 2001 From: Robert Theis Date: Sun, 23 Aug 2015 18:26:29 -0700 Subject: [PATCH] Fix Android 4.4 libpng linking issue. Closes #106. --- tess-two/jni/com_googlecode_leptonica_android/Android.mk | 2 +- tess-two/jni/libpng/Android.mk | 2 +- tess-two/src/com/googlecode/leptonica/android/AdaptiveMap.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Binarize.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Box.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Boxa.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Clip.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Convert.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Edge.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Enhance.java | 2 +- tess-two/src/com/googlecode/leptonica/android/GrayQuant.java | 2 +- tess-two/src/com/googlecode/leptonica/android/JpegIO.java | 2 +- tess-two/src/com/googlecode/leptonica/android/MorphApp.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Pix.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Pixa.java | 2 +- tess-two/src/com/googlecode/leptonica/android/ReadFile.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Rotate.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Scale.java | 2 +- tess-two/src/com/googlecode/leptonica/android/Skew.java | 2 +- tess-two/src/com/googlecode/leptonica/android/WriteFile.java | 2 +- tess-two/src/com/googlecode/tesseract/android/PageIterator.java | 2 +- .../src/com/googlecode/tesseract/android/ResultIterator.java | 2 +- tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java | 2 +- .../src/com/googlecode/tesseract/android/TessPdfRenderer.java | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tess-two/jni/com_googlecode_leptonica_android/Android.mk b/tess-two/jni/com_googlecode_leptonica_android/Android.mk index aa8e8dff7..559aef044 100644 --- a/tess-two/jni/com_googlecode_leptonica_android/Android.mk +++ b/tess-two/jni/com_googlecode_leptonica_android/Android.mk @@ -45,7 +45,7 @@ LOCAL_LDLIBS += \ -llog # common -LOCAL_SHARED_LIBRARIES:= libpng +LOCAL_SHARED_LIBRARIES:= libpngt LOCAL_PRELINK_MODULE:= false diff --git a/tess-two/jni/libpng/Android.mk b/tess-two/jni/libpng/Android.mk index d5ea293f3..69a8efbdf 100644 --- a/tess-two/jni/libpng/Android.mk +++ b/tess-two/jni/libpng/Android.mk @@ -43,5 +43,5 @@ LOCAL_SRC_FILES_arm64 := $(my_src_files_arm) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) LOCAL_SHARED_LIBRARIES := libz LOCAL_LDLIBS := -lz -LOCAL_MODULE:= libpng +LOCAL_MODULE:= libpngt include $(BUILD_SHARED_LIBRARY) \ No newline at end of file diff --git a/tess-two/src/com/googlecode/leptonica/android/AdaptiveMap.java b/tess-two/src/com/googlecode/leptonica/android/AdaptiveMap.java index c7c3c133f..a0c4fbc55 100644 --- a/tess-two/src/com/googlecode/leptonica/android/AdaptiveMap.java +++ b/tess-two/src/com/googlecode/leptonica/android/AdaptiveMap.java @@ -23,7 +23,7 @@ */ public class AdaptiveMap { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Binarize.java b/tess-two/src/com/googlecode/leptonica/android/Binarize.java index ea85649dd..4c5cf9397 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Binarize.java +++ b/tess-two/src/com/googlecode/leptonica/android/Binarize.java @@ -23,7 +23,7 @@ */ public class Binarize { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Box.java b/tess-two/src/com/googlecode/leptonica/android/Box.java index 466396da7..54c573b94 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Box.java +++ b/tess-two/src/com/googlecode/leptonica/android/Box.java @@ -26,7 +26,7 @@ */ public class Box { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Boxa.java b/tess-two/src/com/googlecode/leptonica/android/Boxa.java index 08303f90f..721b4dd9d 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Boxa.java +++ b/tess-two/src/com/googlecode/leptonica/android/Boxa.java @@ -26,7 +26,7 @@ */ public class Boxa { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Clip.java b/tess-two/src/com/googlecode/leptonica/android/Clip.java index a8c64ee81..0425b7cc7 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Clip.java +++ b/tess-two/src/com/googlecode/leptonica/android/Clip.java @@ -20,7 +20,7 @@ */ public class Clip { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Convert.java b/tess-two/src/com/googlecode/leptonica/android/Convert.java index 06a7ae0e7..43c9f53d8 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Convert.java +++ b/tess-two/src/com/googlecode/leptonica/android/Convert.java @@ -23,7 +23,7 @@ */ public class Convert { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Edge.java b/tess-two/src/com/googlecode/leptonica/android/Edge.java index 4bbd81420..5e1f49eff 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Edge.java +++ b/tess-two/src/com/googlecode/leptonica/android/Edge.java @@ -21,7 +21,7 @@ */ public class Edge { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Enhance.java b/tess-two/src/com/googlecode/leptonica/android/Enhance.java index d9f71c1a1..4619904e4 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Enhance.java +++ b/tess-two/src/com/googlecode/leptonica/android/Enhance.java @@ -23,7 +23,7 @@ */ public class Enhance { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/GrayQuant.java b/tess-two/src/com/googlecode/leptonica/android/GrayQuant.java index 6d5d8b324..7682ed8bb 100644 --- a/tess-two/src/com/googlecode/leptonica/android/GrayQuant.java +++ b/tess-two/src/com/googlecode/leptonica/android/GrayQuant.java @@ -18,7 +18,7 @@ public class GrayQuant { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/JpegIO.java b/tess-two/src/com/googlecode/leptonica/android/JpegIO.java index 3aefcf238..6f9d37b5f 100644 --- a/tess-two/src/com/googlecode/leptonica/android/JpegIO.java +++ b/tess-two/src/com/googlecode/leptonica/android/JpegIO.java @@ -29,7 +29,7 @@ */ public class JpegIO { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/MorphApp.java b/tess-two/src/com/googlecode/leptonica/android/MorphApp.java index ecf68de64..0e9f513ad 100644 --- a/tess-two/src/com/googlecode/leptonica/android/MorphApp.java +++ b/tess-two/src/com/googlecode/leptonica/android/MorphApp.java @@ -21,7 +21,7 @@ */ public class MorphApp { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Pix.java b/tess-two/src/com/googlecode/leptonica/android/Pix.java index 28eb65a3b..22393e2e3 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Pix.java +++ b/tess-two/src/com/googlecode/leptonica/android/Pix.java @@ -25,7 +25,7 @@ */ public class Pix { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Pixa.java b/tess-two/src/com/googlecode/leptonica/android/Pixa.java index cb6df480c..7d5870cac 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Pixa.java +++ b/tess-two/src/com/googlecode/leptonica/android/Pixa.java @@ -31,7 +31,7 @@ */ public class Pixa implements Iterable { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/ReadFile.java b/tess-two/src/com/googlecode/leptonica/android/ReadFile.java index d416a76e8..58314c65b 100644 --- a/tess-two/src/com/googlecode/leptonica/android/ReadFile.java +++ b/tess-two/src/com/googlecode/leptonica/android/ReadFile.java @@ -29,7 +29,7 @@ */ public class ReadFile { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Rotate.java b/tess-two/src/com/googlecode/leptonica/android/Rotate.java index 55f51c44d..aa79b4128 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Rotate.java +++ b/tess-two/src/com/googlecode/leptonica/android/Rotate.java @@ -21,7 +21,7 @@ */ public class Rotate { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Scale.java b/tess-two/src/com/googlecode/leptonica/android/Scale.java index 68614e779..3677d2e7f 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Scale.java +++ b/tess-two/src/com/googlecode/leptonica/android/Scale.java @@ -23,7 +23,7 @@ */ public class Scale { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/Skew.java b/tess-two/src/com/googlecode/leptonica/android/Skew.java index 7e27c837a..d736e8797 100644 --- a/tess-two/src/com/googlecode/leptonica/android/Skew.java +++ b/tess-two/src/com/googlecode/leptonica/android/Skew.java @@ -23,7 +23,7 @@ */ public class Skew { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/leptonica/android/WriteFile.java b/tess-two/src/com/googlecode/leptonica/android/WriteFile.java index e2fdc1515..cdfe28795 100644 --- a/tess-two/src/com/googlecode/leptonica/android/WriteFile.java +++ b/tess-two/src/com/googlecode/leptonica/android/WriteFile.java @@ -25,7 +25,7 @@ */ public class WriteFile { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); } diff --git a/tess-two/src/com/googlecode/tesseract/android/PageIterator.java b/tess-two/src/com/googlecode/tesseract/android/PageIterator.java index e6c3426fb..8e33124cf 100644 --- a/tess-two/src/com/googlecode/tesseract/android/PageIterator.java +++ b/tess-two/src/com/googlecode/tesseract/android/PageIterator.java @@ -22,7 +22,7 @@ public class PageIterator { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); System.loadLibrary("tess"); } diff --git a/tess-two/src/com/googlecode/tesseract/android/ResultIterator.java b/tess-two/src/com/googlecode/tesseract/android/ResultIterator.java index e9ebf01b1..0c266df30 100644 --- a/tess-two/src/com/googlecode/tesseract/android/ResultIterator.java +++ b/tess-two/src/com/googlecode/tesseract/android/ResultIterator.java @@ -33,7 +33,7 @@ */ public class ResultIterator extends PageIterator { static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); System.loadLibrary("tess"); } diff --git a/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java b/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java index c8d933d5b..8126ca29a 100644 --- a/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java +++ b/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java @@ -40,7 +40,7 @@ public class TessBaseAPI { private long mNativeData; static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); System.loadLibrary("tess"); diff --git a/tess-two/src/com/googlecode/tesseract/android/TessPdfRenderer.java b/tess-two/src/com/googlecode/tesseract/android/TessPdfRenderer.java index b68837bce..b3e417d9f 100644 --- a/tess-two/src/com/googlecode/tesseract/android/TessPdfRenderer.java +++ b/tess-two/src/com/googlecode/tesseract/android/TessPdfRenderer.java @@ -27,7 +27,7 @@ public class TessPdfRenderer { private final long mNativePdfRenderer; static { - System.loadLibrary("png"); + System.loadLibrary("pngt"); System.loadLibrary("lept"); System.loadLibrary("tess"); }