Gentoo Archives: gentoo-commits

From: "Thomas Sachau (tommy)" <tommy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-p2p/freenet/files: build.xml 0.7.5_p1297-ext.patch
Date: Sun, 31 Oct 2010 21:24:45
Message-Id: 20101031212441.21A6E20054@flycatcher.gentoo.org
1 tommy 10/10/31 21:24:41
2
3 Added: build.xml 0.7.5_p1297-ext.patch
4 Log:
5 Version bump, drop old. Use build.xml from previous version until the issues with the new version are sorted out
6
7 (Portage version: 2.2.0_alpha2-r1/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 net-p2p/freenet/files/build.xml
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/freenet/files/build.xml?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/freenet/files/build.xml?rev=1.1&content-type=text/plain
14
15 Index: build.xml
16 ===================================================================
17 <?xml version="1.0" encoding="UTF-8"?>
18 <project default="dist" basedir="." name="Freenet" >
19 <description >
20 This file builds Freenet: What is Freenet?
21
22 Freenet is free software which lets you publish and obtain information on the Internet without fear of censorship. To achieve this freedom, the network is entirely decentralized and publishers and consumers of information are anonymous. Without anonymity there can never be true freedom of speech, and without decentralization the network would be vulnerable to attack.
23
24 Possible targets: compile, dist (default), clean
25 </description>
26
27
28 <property file="build.properties" ></property>
29
30
31
32 <property name="src" location="src" ></property>
33 <property name="test" location="test" ></property>
34 <property name="build" location="build" ></property>
35 <property name="build-test" location="build-test" ></property>
36 <property name="lib" location="lib" ></property>
37 <property name="freenet-ext.location" location="${lib}/freenet-ext.jar" ></property>
38 <property name="javadoc" location="javadoc" ></property>
39 <property name="minExtVersion" value="-1" ></property>
40 <property name="recommendedExtVersion" value="-1" ></property>
41 <property name="GWT.generatedjs" value="${src}/freenet/clients/http/staticfiles/freenetjs" ></property>
42 <property name="GWT.lib" value="generator/js/lib" ></property>
43 <property name="GWT.lib.dev" value="${GWT.lib}/gwt-dev.jar" ></property>
44 <property name="GWT.lib.user" value="${GWT.lib}/gwt-user.jar" ></property>
45 <property name="version.src" value="freenet/node/Version.java" ></property>
46 <property name="version.build" value="freenet/node/Version.class" ></property>
47 <property name="junit.location" value="/usr/share/java/junit.jar" ></property>
48 <available property="junit.present" file="${junit.location}" ></available>
49
50 <path id="lib.path" >
51 <pathelement location="${freenet-ext.location}" ></pathelement>
52 <pathelement location="gnu-crypto.jar" ></pathelement>
53 <pathelement location="javax-security.jar" ></pathelement>
54 <pathelement location="javax-crypto.jar" ></pathelement>
55 </path>
56
57 <assertions >
58 <enable ></enable>
59 </assertions>
60
61 <exec failifexecutionfails="false" executable="git" errorProperty="git.errror" resultproperty="git.result" outputproperty="git.describe" >
62 <arg value="describe" ></arg>
63 <arg value="--always" ></arg>
64 <arg value="--abbrev=4" ></arg>
65 </exec>
66 <condition property="git.revision" value="${git.describe}" else="@unknown@" >
67 <and >
68 <equals arg1="${git.result}" arg2="0" ></equals>
69 <isset property="git.describe" ></isset>
70 </and>
71 </condition>
72
73
74 <target name="mkdir" >
75 <mkdir dir="${build}" ></mkdir>
76 <mkdir dir="${build-test}" ></mkdir>
77 <mkdir dir="${lib}" ></mkdir>
78 </target>
79
80 <target depends="mkdir" name="env" description="Learn about the environment" >
81 <available property="freenet-ext.present" file="${lib}/freenet-ext.jar" ></available>
82
83 <available property="generatedjs.present" type="dir" file="${GWT.generatedjs}" ></available>
84 <echo level="verbose" >Javascript generation present:${generatedjs.present}</echo>
85 <available property="GWT.lib.dev.present" file="${GWT.lib.dev}" ></available>
86 <echo level="verbose" >gwt-dev-linux.jar present:${GWT.lib.dev.present}</echo>
87 <available property="GWT.lib.user.present" file="${GWT.lib.user}" ></available>
88 <echo level="verbose" >gwt-user.jar present:${GWT.lib.user.present}</echo>
89 </target>
90
91 <target depends="env" unless="GWT.lib.dev.present" name="get-GWT-lib-dev" >
92 <mkdir dir="${GWT.lib}" ></mkdir>
93 <get dest="${GWT.lib}/gwt-dev.jar" src="http://localhost/gwt-dev.jar" verbose="true" usetimestamp="true" ></get>
94 <property name="GWT.lib.dev.present" value="true" ></property>
95 </target>
96
97 <target depends="env" unless="GWT.lib.user.present" name="get-GWT-lib-user" >
98 <mkdir dir="${GWT.lib}" ></mkdir>
99 <get dest="${GWT.lib}/gwt-user.jar" src="http://localhost/gwt-user.jar" verbose="true" usetimestamp="true" ></get>
100 <property name="GWT.lib.user.present" value="true" ></property>
101 </target>
102
103 <target unless="generatedjs.present" name="get-GWT-libs" >
104 <antcall target="get-GWT-lib-dev" ></antcall>
105 <antcall target="get-GWT-lib-user" ></antcall>
106 </target>
107
108 <target depends="env,get-GWT-libs" unless="generatedjs.present" name="generate-js" >
109 <ant antfile="build.xml" dir="generator/js" ></ant>
110 </target>
111
112 <target depends="env" unless="freenet-ext.present" name="get-extjar" description="Download some external libraries which Freenet relies on" >
113 <mkdir dir="${lib}" ></mkdir>
114 <get dest="${freenet-ext.location}" src="http://checksums.freenetproject.org/cc/freenet-ext.jar" verbose="true" usetimestamp="true" ></get>
115 <property name="freenet-ext.present" value="true" ></property>
116 </target>
117
118 <condition property="do.junit" value="true" >
119 <and >
120 <isfalse value="${skip_tests}" ></isfalse>
121 <isset property="junit.present" ></isset>
122 </and>
123 </condition>
124
125
126 <target depends="mkdir" name="compile" >
127
128 <tstamp ></tstamp>
129
130
131 <copy tofile="${build}/${version.src}" overwrite="true" file="${src}/${version.src}" ></copy>
132 <delete quiet="true" file="${build}/${version.build}" ></delete>
133 <replace file="${build}/${version.src}" >
134 <replacefilter token="@custom@" value="${git.revision}" ></replacefilter>
135 </replace>
136 <echo message="Updated build version to ${git.revision} in ${build}/${version.src}" ></echo>
137
138
139 <javac target="1.5" destdir="${build}" source="1.5" debug="on" srcdir="${src}" optimize="on" classpath="${gentoo.classpath}" >
140 <compilerarg value="-Xlint" ></compilerarg>
141
142 <sourcepath >
143 <pathelement path="${build}" ></pathelement>
144 </sourcepath>
145 <classpath >
146 <path refid="lib.path" ></path>
147 </classpath>
148
149 <include name="freenet/**/*.java" ></include>
150 <include name="net/i2p/util/*.java" ></include>
151 <include name="org/**/*.java" ></include>
152 <exclude name="**/package-info.java" ></exclude>
153 <exclude name="${version.src}" ></exclude>
154 </javac>
155
156
157 <javac target="1.5" destdir="${build}" source="1.5" debug="on" srcdir="${build}" optimize="on" classpath="${gentoo.classpath}" >
158 <classpath >
159 <path refid="lib.path" ></path>
160 </classpath>
161 <include name="${version.src}" ></include>
162 </javac>
163
164
165 <copy todir="${build}/freenet/clients/http/staticfiles" >
166 <fileset dir="${src}/freenet/clients/http/staticfiles" ></fileset>
167 </copy>
168
169 <copy todir="${build}/freenet/l10n" >
170 <fileset dir="${src}/freenet/l10n" >
171 <include name="freenet.l10n.*.properties" ></include>
172 <include name="freenet.l10n.*.tab" ></include>
173 </fileset>
174 </copy>
175
176 </target>
177
178
179
180
181 <target depends="compile,unit" name="dist" description="generate the distribution" >
182
183 <jar basedir="${build}" jarfile="${lib}/freenet-cvs-snapshot.jar" >
184 <manifest >
185 <attribute name="Main-Class" value="freenet/node/Node" ></attribute>
186 <attribute name="Built-By" value="${user.name}" ></attribute>
187 <attribute name="Required-Ext-Version" value="${minExtVersion}" ></attribute>
188 <attribute name="Recommended-Ext-Version" value="${recommendedExtVersion}" ></attribute>
189 <attribute name="Class-Path" value="freenet-ext.jar" ></attribute>
190 <section name="common" >
191 <attribute name="Specification-Title" value="Freenet" ></attribute>
192 <attribute name="Specification-Version" value="0.7.5" ></attribute>
193 <attribute name="Specification-Vendor" value="freenetproject.org" ></attribute>
194 <attribute name="Implementation-Title" value="Freenet" ></attribute>
195 <attribute name="Implementation-Version" value="0.7.5 ${TODAY} ${git.revision}" ></attribute>
196 <attribute name="Implementation-Vendor" value="Freenetproject.org" ></attribute>
197 </section>
198 </manifest>
199 <exclude name="${version.src}" ></exclude>
200 </jar>
201 </target>
202
203
204
205 <target depends="compile" name="unit-build" if="do.junit" >
206 <delete dir="${build-test}" ></delete>
207 <mkdir dir="${build-test}" ></mkdir>
208
209 <javac target="1.5" destdir="${build-test}" source="1.5" debug="on" srcdir="${test}" optimize="on" classpath="${gentoo.classpath}" >
210 <classpath >
211 <path refid="lib.path" ></path>
212 <pathelement path="${build}" ></pathelement>
213 <pathelement location="${junit.location}" ></pathelement>
214 </classpath>
215 <compilerarg value="-Xlint" ></compilerarg>
216 <include name="**/*.java" ></include>
217 <exclude name="*.java" ></exclude>
218 </javac>
219 <copy todir="${build-test}/freenet/client/filter/png" >
220 <fileset dir="${test}/freenet/client/filter/png" ></fileset>
221 </copy>
222 <copy todir="${build-test}/freenet/client/filter/bmp" >
223 <fileset dir="${test}/freenet/client/filter/bmp" ></fileset>
224 </copy>
225 </target>
226
227 <target depends="unit-build" name="unit" if="do.junit" >
228 <junit fork="yes" haltonfailure="yes" printsummary="yes" >
229 <classpath >
230 <path refid="lib.path" ></path>
231 <pathelement path="${build}" ></pathelement>
232 <pathelement path="${build-test}" ></pathelement>
233 <pathelement location="${junit.location}" ></pathelement>
234 </classpath>
235
236 <formatter usefile="false" type="plain" ></formatter>
237
238 <batchtest fork="yes" >
239 <fileset dir="${build-test}" >
240 <include name="**/*Test.class" ></include>
241 </fileset>
242 </batchtest>
243 <sysproperty value="${benchmark}" key="benchmark" ></sysproperty>
244 <sysproperty value="${extensiveTesting}" key="extensiveTesting" ></sysproperty>
245
246 <assertions >
247 <enable ></enable>
248 </assertions>
249 </junit>
250 </target>
251
252
253
254 <target name="clean" description="Delete class files and docs dir." >
255 <delete dir="${build}" ></delete>
256 <delete dir="${build-test}" ></delete>
257 </target>
258 <target name="distclean" description="Delete class files, lib dir and docs dir." >
259 <delete dir="${build}" ></delete>
260 <delete dir="${build-test}" ></delete>
261 <delete dir="${lib}" ></delete>
262 <delete dir="${javadoc}" ></delete>
263 <ant antfile="build.xml" target="deleteGenerated" dir="generator/js" ></ant>
264
265 </target>
266
267
268 <target name="javadoc" >
269 <javadoc sourcepath="${src}" use="true" destdir="${javadoc}" >
270 <fileset dir="${src}" includes="**/*.java" ></fileset>
271 <classpath >
272 <pathelement location="${freenet-ext.location}" ></pathelement>
273 </classpath>
274 <link href="http://java.sun.com/j2se/1.5.0/docs/api" ></link>
275 </javadoc>
276 </target>
277 </project>
278
279
280
281 1.1 net-p2p/freenet/files/0.7.5_p1297-ext.patch
282
283 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/freenet/files/0.7.5_p1297-ext.patch?rev=1.1&view=markup
284 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/freenet/files/0.7.5_p1297-ext.patch?rev=1.1&content-type=text/plain
285
286 Index: 0.7.5_p1297-ext.patch
287 ===================================================================
288 --- src/freenet-old/node/NodeStarter.java 2010-05-10 21:19:25.000000000 +0200
289 +++ src/freenet/node/NodeStarter.java 2010-05-10 21:35:30.000000000 +0200
290 @@ -168,37 +168,8 @@
291 }
292
293 private void getExtBuild() {
294 - try {
295 - extBuildNumber = ExtVersion.buildNumber;
296 - extRevisionNumber = ExtVersion.cvsRevision;
297 - String builtWithMessage = "freenet.jar built with freenet-ext.jar Build #" + extBuildNumber + " r" + extRevisionNumber;
298 - Logger.normal(this, builtWithMessage);
299 - System.out.println(builtWithMessage);
300 - extBuildNumber = ExtVersion.buildNumber();
301 - if(extBuildNumber == -42) {
302 - extBuildNumber = ExtVersion.extBuildNumber();
303 - extRevisionNumber = ExtVersion.extRevisionNumber();
304 - }
305 - if(extBuildNumber == 0) {
306 - String buildMessage = "extBuildNumber is 0; perhaps your freenet-ext.jar file is corrupted?";
307 - Logger.error(this, buildMessage);
308 - System.err.println(buildMessage);
309 - extBuildNumber = -1;
310 - }
311 - if(extRevisionNumber == null) {
312 - String revisionMessage = "extRevisionNumber is null; perhaps your freenet-ext.jar file is corrupted?";
313 - Logger.error(this, revisionMessage);
314 - System.err.println(revisionMessage);
315 - extRevisionNumber = "INVALID";
316 - }
317 - } catch(Throwable t) {
318 - // Compatibility code ... will be removed
319 - Logger.error(this, "Unable to get the version of your freenet-ext file : it's probably corrupted!");
320 - System.err.println("Unable to get the version of your freenet-ext file : it's probably corrupted!");
321 - System.err.println(t.getMessage());
322 - extRevisionNumber = "INVALID";
323 - extBuildNumber = -1;
324 - }
325 + extRevisionNumber = "";
326 + extBuildNumber = RECOMMENDED_EXT_BUILD_NUMBER;
327 }
328
329 /**