]> Pileus Git - ~andy/sunrise/blob - net-p2p/freenet/files/ext.patch
net-p2p/freenet: Update patch
[~andy/sunrise] / net-p2p / freenet / files / ext.patch
1 diff -ur freenet-old/build.xml freenet/build.xml
2 --- freenet-old/build.xml       2008-03-30 14:55:10.000000000 +0200
3 +++ freenet/build.xml   2008-03-30 16:02:56.000000000 +0200
4 @@ -13,7 +13,9 @@
5         <property name="build" location="build"/>
6         <property name="build-test" location="build-test"/>
7         <property name="lib"    location="lib"/>
8 -       <property name="freenet-ext.location" location="${lib}/freenet-ext.jar"/>
9 +       <property name="wrapper.location" location="${lib}/wrapper.jar"/>
10 +       <property name="je.location" location="${lib}/je.jar"/>
11 +       <property name="fec.location" location="${lib}/fec.jar"/>
12         <property name="javadoc" location="javadoc"/>
13         <property name="svn.revision" value="@custom@"/>
14         <property name="CSSTokenizerFilter.relative.jflex" value="freenet/clients/http/filter/CSSTokenizerFilter.jflex"/>
15 @@ -34,7 +36,6 @@
16         </target>
17  
18         <target name="env" depends="mkdir"   description="Learn about the environment">
19 -               <available file="${lib}/freenet-ext.jar" property="freenet-ext.present"/>
20                 <available file="${CSSTokenizerFilter.java}" property="CSSTokenizerFilter.present"/>
21                 <available file="${junit.location}" property="junit.present"/>
22         </target>
23 @@ -48,19 +49,9 @@
24                 </exec>
25         </target>
26  
27 -       <target name="get-extjar" depends="env" unless="freenet-ext.present"
28 -               description="Download some external libraries which Freenet relies on">
29 -               <mkdir dir="${lib}"/>
30 -               <get src="http://downloads.freenetproject.org/alpha/freenet-ext.jar" 
31 -                       dest="${freenet-ext.location}" 
32 -                       verbose="true"
33 -                       usetimestamp="true"/>
34 -               <property name="freenet-ext.present" value="true"/>
35 -       </target>
36 -
37         <!-- ================================================== -->
38  
39 -       <target name="compile" depends="get-extjar, generate-CSSTokenizerFilter">
40 +       <target name="compile" depends="generate-CSSTokenizerFilter">
41                 <!-- Create the time stamp -->
42                 <tstamp/>
43  
44 @@ -75,7 +66,9 @@
45                 <!-- FIXME: remove the debug and replace with optimize -->
46                 <javac srcdir="${src}" destdir="${build}" debug="on" optimize="on" source="1.4">
47                         <classpath>
48 -                               <pathelement location="${freenet-ext.location}"/>
49 +                               <pathelement location="${wrapper.location}"/>
50 +                               <pathelement location="${je.location}"/>
51 +                               <pathelement location="${fec.location}"/>
52                                 <pathelement location="gnu-crypto.jar"/>
53                                 <pathelement location="javax-security.jar"/>
54                                 <pathelement location="javax-crypto.jar"/>
55 @@ -131,7 +124,9 @@
56                 <javac srcdir="${test}" destdir="${build-test}" debug="on" optimize="on" source="1.4">
57                         <classpath>
58                                 <pathelement path="${build}"/>
59 -                               <pathelement location="${freenet-ext.location}"/>
60 +                               <pathelement location="${wrapper.location}"/>
61 +                               <pathelement location="${je.location}"/>
62 +                               <pathelement location="${fec.location}"/>
63                                 <pathelement location="${junit.location}"/>
64                         </classpath>
65                         <include name="**/*.java"/>
66 @@ -144,7 +139,9 @@
67                         <classpath>
68                                 <pathelement path="${build}"/>
69                                 <pathelement path="${build-test}"/>
70 -                               <pathelement location="${freenet-ext.location}"/>
71 +                               <pathelement location="${wrapper.location}"/>
72 +                               <pathelement location="${je.location}"/>
73 +                               <pathelement location="${fec.location}"/>
74                                 <pathelement location="${junit.location}"/>
75                         </classpath>
76  
77 --- freenet/src/freenet/node/NodeStarter.java   2008-07-03 23:05:20.000000000 +0200
78 +++ freenet/src/freenet/node/NodeStarter.java.new       2008-07-03 23:08:14.000000000 +0200
79 @@ -162,37 +162,8 @@
80         }
81  
82         private void getExtBuild() {
83 -               try {
84 -                       extBuildNumber = ExtVersion.buildNumber;
85 -                       extRevisionNumber = ExtVersion.cvsRevision;
86 -                       String builtWithMessage = "freenet.jar built with freenet-ext.jar Build #" + extBuildNumber + " r" + extRevisionNumber;
87 -                       Logger.normal(this, builtWithMessage);
88 -                       System.out.println(builtWithMessage);
89 -                       extBuildNumber = ExtVersion.buildNumber();
90 -                       if(extBuildNumber == -42) {
91 -                               extBuildNumber = ExtVersion.extBuildNumber();
92 -                               extRevisionNumber = ExtVersion.extRevisionNumber();
93 -                       }
94 -                       if(extBuildNumber == 0) {
95 -                               String buildMessage = "extBuildNumber is 0; perhaps your freenet-ext.jar file is corrupted?";
96 -                               Logger.error(this, buildMessage);
97 -                               System.err.println(buildMessage);
98 -                               extBuildNumber = -1;
99 -                       }
100 -                       if(extRevisionNumber == null) {
101 -                               String revisionMessage = "extRevisionNumber is null; perhaps your freenet-ext.jar file is corrupted?";
102 -                               Logger.error(this, revisionMessage);
103 -                               System.err.println(revisionMessage);
104 -                               extRevisionNumber = "INVALID";
105 -                       }
106 -               } catch(Throwable t) {
107 -                       // Compatibility code ... will be removed
108 -                       Logger.error(this, "Unable to get the version of your freenet-ext file : it's probably corrupted!");
109 -                       System.err.println("Unable to get the version of your freenet-ext file : it's probably corrupted!");
110 -                       System.err.println(t.getMessage());
111 -                       extRevisionNumber = "INVALID";
112 -                       extBuildNumber = -1;
113 -               }
114 +               extRevisionNumber = "";
115 +               extBuildNumber = RECOMMENDED_EXT_BUILD_NUMBER;  
116         }
117  
118         /**