mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
Added patching of Android sources by a patchfile, now used to comment call to System.loadLibrary("conscrypt_jni")
This commit is contained in:
parent
b52cbc21b2
commit
61b1c93805
12
android-patches.diff
Normal file
12
android-patches.diff
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -ru android-src.old/org/conscrypt/NativeCrypto.java android-src/org/conscrypt/NativeCrypto.java
|
||||||
|
--- android-src.old/org/conscrypt/NativeCrypto.java 2014-03-30 23:53:27 +0400
|
||||||
|
+++ android-src/org/conscrypt/NativeCrypto.java 2014-03-30 23:53:39 +0400
|
||||||
|
@@ -51,7 +51,7 @@
|
||||||
|
* name.
|
||||||
|
*/
|
||||||
|
if (!"com.android.org.conscrypt".equals(NativeCrypto.class.getPackage().getName())) {
|
||||||
|
- System.loadLibrary("conscrypt_jni");
|
||||||
|
+ //System.loadLibrary("conscrypt_jni");
|
||||||
|
}
|
||||||
|
|
||||||
|
clinit();
|
12
makefile
12
makefile
@ -1579,16 +1579,20 @@ $(build)/android.dep: $(luni-javas) $(libdvm-javas) $(crypto-javas) \
|
|||||||
@echo "compiling luni classes"
|
@echo "compiling luni classes"
|
||||||
@mkdir -p $(classpath-build)
|
@mkdir -p $(classpath-build)
|
||||||
@mkdir -p $(build)/android
|
@mkdir -p $(build)/android
|
||||||
|
@rm -rf $(build)/android-src
|
||||||
@mkdir -p $(build)/android-src/external/fdlibm
|
@mkdir -p $(build)/android-src/external/fdlibm
|
||||||
@mkdir -p $(build)/android-src/libexpat
|
@mkdir -p $(build)/android-src/libexpat
|
||||||
cp $(android)/external/fdlibm/fdlibm.h $(build)/android-src/external/fdlibm/
|
cp $(android)/external/fdlibm/fdlibm.h $(build)/android-src/external/fdlibm/
|
||||||
cp $(android)/external/expat/lib/expat*.h $(build)/android-src/libexpat/
|
cp $(android)/external/expat/lib/expat*.h $(build)/android-src/libexpat/
|
||||||
cp -a $(luni-java)/* $(libdvm-java)/* $(crypto-java)/* $(dalvik-java)/* \
|
cp -a $(luni-java)/* $(libdvm-java)/* $(crypto-java)/* $(dalvik-java)/* \
|
||||||
$(xml-java)/* $(build)/android-src/
|
$(xml-java)/* $(build)/android-src/
|
||||||
sed -i -e 's/return ordinal - o.ordinal;/return ordinal - o.ordinal();/' \
|
# convert line endings... otherwise patches are difficult
|
||||||
$(build)/android-src/java/lang/Enum.java
|
# do that by first "dry-running" the patch to determine which files are patched
|
||||||
# sed makes this file read-only which in turn breaks re-builds; so marking it as writable
|
patch -d $(build)/android-src -p1 --dry-run -f < android-patches.diff | \
|
||||||
chmod +w $(build)/android-src/java/lang/Enum.java
|
grep -E '^patching file ' | sed -e 's/^patching file \(.*\)/\1/g' | \
|
||||||
|
( cd $(build)/android-src && xargs dos2unix )
|
||||||
|
# now patch the files
|
||||||
|
( cd $(build)/android-src && patch -p1 ) < android-patches.diff
|
||||||
find $(build)/android-src -name '*.java' > $(build)/android.txt
|
find $(build)/android-src -name '*.java' > $(build)/android.txt
|
||||||
$(javac) -Xmaxerrs 1000 -d $(build)/android -sourcepath $(luni-java) \
|
$(javac) -Xmaxerrs 1000 -d $(build)/android -sourcepath $(luni-java) \
|
||||||
@$(build)/android.txt
|
@$(build)/android.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user