build.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. --- build.xml 2009-06-26 16:46:58.829728329 +0200
  2. +++ build.xml.new 2009-06-26 16:48:44.654930593 +0200
  3. @@ -5,64 +5,7 @@
  4. <property name="build" location="build"/>
  5. <property name="lib" location="lib"/>
  6. <property name="dist" location="dist"/>
  7. - <property name="deps" location="deps"/>
  8. -
  9. - <property name="bcdist" value="lcrypto-jdk14-138"/>
  10. - <property name="freenetjarurl.url" value="http://downloads.freenetproject.org/alpha/freenet-testing-latest.jar.url"/>
  11. - <property name="freenetjarurl.localpath" value="${deps}/freenet-testing-latest.jar.url"/>
  12. - <property name="freenetjar" value="freenet-main.jar"/>
  13. -
  14. - <target name="freenetjar-check">
  15. - <available file="${deps}/${freenetjar}" property="freenetjar.present" />
  16. - </target>
  17. -
  18. - <!-- Fetching the Freenet jar here is far from optimal:
  19. - Ideally we'd compile against a the freenet jar or class files
  20. - which the user almost certainly has on their computer already.
  21. - Unfortunately about the only sensible way of doing this would
  22. - be with Maven2, and both Freenet and Freemail import code from
  23. - other projects which would make things difficult and/or ugly.
  24. - -->
  25. - <target name="freenetjar-fetch" depends="freenetjar-check" unless="freenetjar.present">
  26. - <echo>
  27. - Attempting to fetch Freenet main jar - ant cannot do this reliably, so if it fails, delete ${deps}/${freenetjar} and ${freenetjarurl.localpath} and run ant again.
  28. - </echo>
  29. - <mkdir dir="${deps}" />
  30. - <!-- loadresource directly from an HTTP URL is causing problems -->
  31. - <get src="${freenetjarurl.url}"
  32. - dest="${freenetjarurl.localpath}" />
  33. - <loadfile property="freenetjar.url"
  34. - srcFile="${freenetjarurl.localpath}" />
  35. - <get src="${freenetjar.url}"
  36. - dest="${deps}/${freenetjar}"
  37. - verbose="true" />
  38. - </target>
  39. -
  40. - <target name="bouncycastle-check">
  41. - <available file="${deps}/${bcdist}" property="bouncycastle-dist.present" />
  42. - <available file="${build}/org/bouncycastle" property="bouncycastle-bin.present" />
  43. - </target>
  44. -
  45. - <target name="bouncycastle-fetch" depends="bouncycastle-check" unless="bouncycastle-dist.present">
  46. - <mkdir dir="${deps}" />
  47. - <get src="http://www.bouncycastle.org/download/${bcdist}.zip"
  48. - dest="${deps}/${bcdist}.zip"
  49. - verbose="true"
  50. - usetimestamp="true" />
  51. -
  52. - <unzip src="${deps}/${bcdist}.zip" dest="${deps}" />
  53. - </target>
  54. -
  55. - <target name="bouncycastle-compile" depends="bouncycastle-fetch" unless="bouncycastle-bin.present">
  56. - <mkdir dir="build" />
  57. - <javac srcdir="${deps}/${bcdist}/src" destdir="${build}" debug="on" optimize="on" source="1.4" nowarn="true">
  58. - <exclude name="**/test/*" />
  59. - <exclude name="org/bouncycastle/util/IPTest.java" />
  60. - <exclude name="org/bouncycastle/util/AllTests.java" />
  61. - </javac>
  62. - </target>
  63. -
  64. - <target name="compile" depends="bouncycastle-compile, freenetjar-fetch">
  65. + <target name="compile">
  66. <mkdir dir="${build}"/>
  67. <tstamp/>