diff --git a/android-patches.diff b/android-patches.diff new file mode 100644 index 0000000000..cec06d5732 --- /dev/null +++ b/android-patches.diff @@ -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(); diff --git a/makefile b/makefile index 8aba1ebd78..6b97ec1a1a 100755 --- a/makefile +++ b/makefile @@ -1579,16 +1579,20 @@ $(build)/android.dep: $(luni-javas) $(libdvm-javas) $(crypto-javas) \ @echo "compiling luni classes" @mkdir -p $(classpath-build) @mkdir -p $(build)/android + @rm -rf $(build)/android-src @mkdir -p $(build)/android-src/external/fdlibm @mkdir -p $(build)/android-src/libexpat cp $(android)/external/fdlibm/fdlibm.h $(build)/android-src/external/fdlibm/ cp $(android)/external/expat/lib/expat*.h $(build)/android-src/libexpat/ cp -a $(luni-java)/* $(libdvm-java)/* $(crypto-java)/* $(dalvik-java)/* \ $(xml-java)/* $(build)/android-src/ - sed -i -e 's/return ordinal - o.ordinal;/return ordinal - o.ordinal();/' \ - $(build)/android-src/java/lang/Enum.java - # sed makes this file read-only which in turn breaks re-builds; so marking it as writable - chmod +w $(build)/android-src/java/lang/Enum.java + # convert line endings... otherwise patches are difficult + # do that by first "dry-running" the patch to determine which files are patched + patch -d $(build)/android-src -p1 --dry-run -f < android-patches.diff | \ + 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 $(javac) -Xmaxerrs 1000 -d $(build)/android -sourcepath $(luni-java) \ @$(build)/android.txt