1 |
ercpe 13/11/24 15:09:02 |
2 |
|
3 |
Added: 1.1.0.1-unbundle-snappy.patch 1.x-build.xml |
4 |
1.1.0.1-gentoo.patch |
5 |
1.0.3_rc3-unbundle-snappy.patch |
6 |
1.0.3_rc3-gentoo.patch |
7 |
Log: |
8 |
Added ebuild for dev-java/snappy, a JNI library for app-arch/snappy. |
9 |
Version 1.1.0.1 is the latest; 1.0.3_rc3 is a dependency of picard (#491816) |
10 |
|
11 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 77C501ED) |
12 |
|
13 |
Revision Changes Path |
14 |
1.1 dev-java/snappy/files/1.1.0.1-unbundle-snappy.patch |
15 |
|
16 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/snappy/files/1.1.0.1-unbundle-snappy.patch?rev=1.1&view=markup |
17 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/snappy/files/1.1.0.1-unbundle-snappy.patch?rev=1.1&content-type=text/plain |
18 |
|
19 |
Index: 1.1.0.1-unbundle-snappy.patch |
20 |
=================================================================== |
21 |
diff --git a/Makefile b/Makefile |
22 |
index 0821c87..04f0435 100644 |
23 |
--- a/Makefile |
24 |
+++ b/Makefile |
25 |
@@ -7,7 +7,8 @@ all: snappy |
26 |
|
27 |
SNAPPY_OUT:=$(TARGET)/$(snappy)-$(os_arch) |
28 |
SNAPPY_ARCHIVE:=$(TARGET)/snappy-$(VERSION).tar.gz |
29 |
-SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy.cc |
30 |
+#SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy.cc |
31 |
+SNAPPY_CC:= |
32 |
SNAPPY_SRC_DIR:=$(TARGET)/snappy-$(VERSION) |
33 |
SNAPPY_SRC:=$(addprefix $(SNAPPY_SRC_DIR)/,$(SNAPPY_CC)) |
34 |
SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/,$(patsubst %.cc,%.o,$(SNAPPY_CC)) SnappyNative.o) |
35 |
@@ -46,7 +47,8 @@ src/main/resources/org/xerial/snappy/SnappyNativeLoader.bytecode: src/main/resou |
36 |
$(JAVAC) -source 1.5 -target 1.5 -d $(TARGET)/temp $< |
37 |
cp $(TARGET)/temp/org/xerial/snappy/SnappyNativeLoader.class $@ |
38 |
|
39 |
-$(SNAPPY_SRC): $(SNAPPY_UNPACKED) |
40 |
+$(SNAPPY_SRC): |
41 |
+# $(SNAPPY_UNPACKED) |
42 |
|
43 |
$(SNAPPY_OUT)/%.o : $(SNAPPY_SRC_DIR)/%.cc |
44 |
@mkdir -p $(@D) |
45 |
@@ -58,7 +60,7 @@ $(SNAPPY_OUT)/SnappyNative.o : $(SRC)/org/xerial/snappy/SnappyNative.cpp $(SRC)/ |
46 |
|
47 |
|
48 |
$(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ) |
49 |
- $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) |
50 |
+ $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy |
51 |
$(STRIP) $@ |
52 |
|
53 |
clean-native: |
54 |
@@ -73,14 +75,15 @@ NATIVE_DLL:=$(NATIVE_DIR)/$(LIBNAME) |
55 |
|
56 |
snappy-jar-version:=snappy-java-$(shell $(JAVA) -jar lib/silk-weaver.jar find 'project(artifactId, version)' pom.xml | grep snappy-java | awk '{ print $$2; }') |
57 |
|
58 |
-native: $(SNAPPY_UNPACKED) $(NATIVE_DLL) |
59 |
-snappy: native $(TARGET)/$(snappy-jar-version).jar |
60 |
+native: $(NATIVE_DLL) |
61 |
+snappy: native |
62 |
|
63 |
$(NATIVE_DLL): $(SNAPPY_OUT)/$(LIBNAME) |
64 |
@mkdir -p $(@D) |
65 |
cp $< $@ |
66 |
@mkdir -p $(NATIVE_TARGET_DIR) |
67 |
cp $< $(NATIVE_TARGET_DIR)/$(LIBNAME) |
68 |
+ cp $< $(TARGET)/ |
69 |
|
70 |
|
71 |
$(TARGET)/$(snappy-jar-version).jar: native $(NATIVE_DLL) |
72 |
|
73 |
|
74 |
|
75 |
1.1 dev-java/snappy/files/1.x-build.xml |
76 |
|
77 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/snappy/files/1.x-build.xml?rev=1.1&view=markup |
78 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/snappy/files/1.x-build.xml?rev=1.1&content-type=text/plain |
79 |
|
80 |
Index: 1.x-build.xml |
81 |
=================================================================== |
82 |
<?xml version="1.0" encoding="UTF-8"?> |
83 |
|
84 |
<project name="snappy-java-from-maven" default="package" basedir="."> |
85 |
|
86 |
<property file="${user.home}/.m2/maven.properties" /> |
87 |
<property file="maven-build.properties" /> |
88 |
|
89 |
<property name="maven.build.finalName" value="snappy" /> |
90 |
<property name="maven.build.dir" value="target" /> |
91 |
<property name="maven.build.outputDir" value="${maven.build.dir}/classes" /> |
92 |
<property name="maven.build.srcDir.0" value="src/main/java" /> |
93 |
<property name="maven.build.resourceDir.0" value="src/main/java" /> |
94 |
<property name="maven.build.resourceDir.1" value="src/main/resources" /> |
95 |
<property name="maven.build.resourceDir.2" value="." /> |
96 |
<property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes" /> |
97 |
<property name="maven.build.testDir.0" value="src/test/java" /> |
98 |
<property name="maven.build.testResourceDir.0" value="src/test/java" /> |
99 |
<property name="maven.build.testResourceDir.1" value="src/test/resources" /> |
100 |
<property name="maven.test.reports" value="${maven.build.dir}/test-reports" /> |
101 |
<property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site" /> |
102 |
|
103 |
<property name="maven.repo.local" value="${user.home}/.m2/repository" /> |
104 |
<property name="maven.settings.offline" value="false" /> |
105 |
<property name="maven.settings.interactiveMode" value="true" /> |
106 |
|
107 |
<!-- ====================================================================== --> |
108 |
<!-- Defining classpaths --> |
109 |
<!-- ====================================================================== --> |
110 |
|
111 |
<path id="build.classpath"> |
112 |
</path> |
113 |
<path id="build.test.classpath"> |
114 |
</path> |
115 |
|
116 |
<!-- ====================================================================== --> |
117 |
<!-- Cleaning up target --> |
118 |
<!-- ====================================================================== --> |
119 |
|
120 |
<target name="clean" description="Clean the output directory"> |
121 |
<delete dir="${maven.build.dir}" /> |
122 |
</target> |
123 |
|
124 |
<!-- ====================================================================== --> |
125 |
<!-- Compilation target --> |
126 |
<!-- ====================================================================== --> |
127 |
|
128 |
<target name="compile" description="Compile the code"> |
129 |
<mkdir dir="${maven.build.outputDir}" /> |
130 |
<javac destdir="${maven.build.outputDir}" nowarn="false" debug="true" optimize="false" deprecation="true" target="1.6" verbose="false" fork="false" source="1.6"> |
131 |
<src> |
132 |
<pathelement location="${maven.build.srcDir.0}" /> |
133 |
</src> |
134 |
<classpath refid="build.classpath" /> |
135 |
</javac> |
136 |
<copy todir="${maven.build.outputDir}"> |
137 |
<fileset dir="${maven.build.resourceDir.0}"> |
138 |
<include name="org/xerial/snappy/VERSION" /> |
139 |
</fileset> |
140 |
</copy> |
141 |
<copy todir="${maven.build.outputDir}"> |
142 |
<fileset dir="${maven.build.resourceDir.1}"> |
143 |
<include name="org/xerial/snappy/*.bytecode" /> |
144 |
<include name="org/xerial/snappy/native/**" /> |
145 |
</fileset> |
146 |
</copy> |
147 |
<mkdir dir="${maven.build.outputDir}/META-INF/maven/org.xerial.snappy/snappy-java" /> |
148 |
<copy todir="${maven.build.outputDir}/META-INF/maven/org.xerial.snappy/snappy-java"> |
149 |
<fileset dir="${maven.build.resourceDir.2}"> |
150 |
<include name="LICENSE*" /> |
151 |
</fileset> |
152 |
</copy> |
153 |
</target> |
154 |
|
155 |
<!-- ====================================================================== --> |
156 |
<!-- Test-compilation target --> |
157 |
<!-- ====================================================================== --> |
158 |
|
159 |
<target name="compile-tests" depends="compile" description="Compile the test code" unless="maven.test.skip"> |
160 |
<mkdir dir="${maven.build.testOutputDir}" /> |
161 |
<javac destdir="${maven.build.testOutputDir}" nowarn="false" debug="true" optimize="false" deprecation="true" target="1.6" verbose="false" fork="false" source="1.6"> |
162 |
<src> |
163 |
<pathelement location="${maven.build.testDir.0}" /> |
164 |
</src> |
165 |
<classpath> |
166 |
<path refid="build.test.classpath" /> |
167 |
<pathelement location="${maven.build.outputDir}" /> |
168 |
</classpath> |
169 |
</javac> |
170 |
<copy todir="${maven.build.testOutputDir}"> |
171 |
<fileset dir="${maven.build.testResourceDir.0}"> |
172 |
<exclude name="**/*.java" /> |
173 |
</fileset> |
174 |
</copy> |
175 |
</target> |
176 |
|
177 |
<!-- ====================================================================== --> |
178 |
<!-- Run all tests --> |
179 |
<!-- ====================================================================== --> |
180 |
|
181 |
<target name="test" depends="compile-tests, junit-missing" unless="junit.skipped" description="Run the test cases"> |
182 |
<mkdir dir="${maven.test.reports}" /> |
183 |
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir="."> |
184 |
<sysproperty key="basedir" value="." /> |
185 |
<formatter type="xml" /> |
186 |
<formatter type="plain" usefile="false" /> |
187 |
<classpath> |
188 |
<path refid="build.test.classpath" /> |
189 |
<pathelement location="${maven.build.outputDir}" /> |
190 |
<pathelement location="${maven.build.testOutputDir}" /> |
191 |
</classpath> |
192 |
<batchtest todir="${maven.test.reports}" unless="test"> |
193 |
<fileset dir="${maven.build.testDir.0}"> |
194 |
<include name="**/Test*.java" /> |
195 |
<include name="**/*Test.java" /> |
196 |
<include name="**/*TestCase.java" /> |
197 |
<exclude name="**/*Abstract*Test.java" /> |
198 |
</fileset> |
199 |
</batchtest> |
200 |
<batchtest todir="${maven.test.reports}" if="test"> |
201 |
<fileset dir="${maven.build.testDir.0}"> |
202 |
<include name="**/${test}.java" /> |
203 |
<exclude name="**/*Abstract*Test.java" /> |
204 |
</fileset> |
205 |
</batchtest> |
206 |
</junit> |
207 |
</target> |
208 |
|
209 |
<target name="test-junit-present"> |
210 |
<available classname="junit.framework.Test" property="junit.present" /> |
211 |
</target> |
212 |
|
213 |
<target name="test-junit-status" depends="test-junit-present"> |
214 |
<condition property="junit.missing"> |
215 |
<and> |
216 |
<isfalse value="${junit.present}" /> |
217 |
<isfalse value="${maven.test.skip}" /> |
218 |
</and> |
219 |
</condition> |
220 |
<condition property="junit.skipped"> |
221 |
<or> |
222 |
<isfalse value="${junit.present}" /> |
223 |
<istrue value="${maven.test.skip}" /> |
224 |
</or> |
225 |
</condition> |
226 |
</target> |
227 |
|
228 |
<target name="junit-missing" depends="test-junit-status" if="junit.missing"> |
229 |
<echo>=================================== WARNING ===================================</echo> |
230 |
<echo> JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.</echo> |
231 |
<echo>===============================================================================</echo> |
232 |
</target> |
233 |
|
234 |
<!-- ====================================================================== --> |
235 |
<!-- Javadoc target --> |
236 |
<!-- ====================================================================== --> |
237 |
|
238 |
<target name="javadoc" description="Generates the Javadoc of the application"> |
239 |
<javadoc sourcepath="${maven.build.srcDir.0}" packagenames="*" destdir="${maven.reporting.outputDirectory}/apidocs" access="public" old="false" verbose="false" locale="en_US" version="true" use="true" author="true" splitindex="false" nodeprecated="false" nodeprecatedlist="false" notree="false" noindex="false" nohelp="false" nonavbar="false" serialwarn="false" charset="UTF-8" linksource="false" breakiterator="false" /> |
240 |
</target> |
241 |
|
242 |
<!-- ====================================================================== --> |
243 |
<!-- Package target --> |
244 |
<!-- ====================================================================== --> |
245 |
|
246 |
<target name="package" depends="compile,test" description="Package the application"> |
247 |
<jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar" compress="true" index="true" basedir="${maven.build.outputDir}" excludes="**/package.html" /> |
248 |
</target> |
249 |
|
250 |
<!-- ====================================================================== --> |
251 |
<!-- A dummy target for the package named after the type it creates --> |
252 |
<!-- ====================================================================== --> |
253 |
|
254 |
<target name="jar" depends="package" description="Builds the jar for the application" /> |
255 |
|
256 |
<!-- ====================================================================== --> |
257 |
<!-- Download dependencies target --> |
258 |
<!-- ====================================================================== --> |
259 |
|
260 |
<target name="test-offline"> |
261 |
<condition property="maven.mode.offline"> |
262 |
<equals arg1="${maven.settings.offline}" arg2="true" /> |
263 |
</condition> |
264 |
</target> |
265 |
|
266 |
</project> |
267 |
|
268 |
|
269 |
|
270 |
1.1 dev-java/snappy/files/1.1.0.1-gentoo.patch |
271 |
|
272 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/snappy/files/1.1.0.1-gentoo.patch?rev=1.1&view=markup |
273 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/snappy/files/1.1.0.1-gentoo.patch?rev=1.1&content-type=text/plain |
274 |
|
275 |
Index: 1.1.0.1-gentoo.patch |
276 |
=================================================================== |
277 |
diff --git a/Makefile b/Makefile |
278 |
index 04f0435..0249d09 100644 |
279 |
--- a/Makefile |
280 |
+++ b/Makefile |
281 |
@@ -60,8 +60,7 @@ $(SNAPPY_OUT)/SnappyNative.o : $(SRC)/org/xerial/snappy/SnappyNative.cpp $(SRC)/ |
282 |
|
283 |
|
284 |
$(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ) |
285 |
- $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy |
286 |
- $(STRIP) $@ |
287 |
+ $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy $(LDFLAGS) |
288 |
|
289 |
clean-native: |
290 |
rm -rf $(SNAPPY_OUT) |
291 |
|
292 |
|
293 |
|
294 |
1.1 dev-java/snappy/files/1.0.3_rc3-unbundle-snappy.patch |
295 |
|
296 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/snappy/files/1.0.3_rc3-unbundle-snappy.patch?rev=1.1&view=markup |
297 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/snappy/files/1.0.3_rc3-unbundle-snappy.patch?rev=1.1&content-type=text/plain |
298 |
|
299 |
Index: 1.0.3_rc3-unbundle-snappy.patch |
300 |
=================================================================== |
301 |
diff --git a/Makefile b/Makefile |
302 |
index b67855a..a9d5cdc 100644 |
303 |
--- a/Makefile |
304 |
+++ b/Makefile |
305 |
@@ -7,7 +7,8 @@ all: snappy |
306 |
|
307 |
SNAPPY_OUT:=$(TARGET)/$(snappy)-$(os_arch) |
308 |
SNAPPY_ARCHIVE:=$(TARGET)/snappy-$(VERSION).tar.gz |
309 |
-SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy.cc |
310 |
+#SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy.cc |
311 |
+SNAPPY_CC:= |
312 |
SNAPPY_SRC_DIR:=$(TARGET)/snappy-$(VERSION) |
313 |
SNAPPY_SRC:=$(addprefix $(SNAPPY_SRC_DIR)/,$(SNAPPY_CC)) |
314 |
SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/,$(patsubst %.cc,%.o,$(SNAPPY_CC)) SnappyNative.o) |
315 |
@@ -30,7 +31,8 @@ jni-header: $(SRC)/org/xerial/snappy/SnappyNative.h |
316 |
$(SRC)/org/xerial/snappy/SnappyNative.h: $(SRC)/org/xerial/snappy/SnappyNative.java |
317 |
$(JAVAH) -classpath $(TARGET)/classes -o $@ org.xerial.snappy.SnappyNative |
318 |
|
319 |
-$(SNAPPY_SRC): $(SNAPPY_UNPACKED) |
320 |
+$(SNAPPY_SRC): |
321 |
+# $(SNAPPY_UNPACKED) |
322 |
|
323 |
$(SNAPPY_OUT)/%.o : $(SNAPPY_SRC_DIR)/%.cc |
324 |
@mkdir -p $(@D) |
325 |
@@ -42,7 +44,7 @@ $(SNAPPY_OUT)/SnappyNative.o : $(SRC)/org/xerial/snappy/SnappyNative.cpp $(SRC)/ |
326 |
|
327 |
|
328 |
$(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ) |
329 |
- $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) |
330 |
+ $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy |
331 |
$(STRIP) $@ |
332 |
|
333 |
clean-native: |
334 |
@@ -57,15 +59,15 @@ NATIVE_DLL:=$(NATIVE_DIR)/$(LIBNAME) |
335 |
|
336 |
snappy-jar-version:=snappy-java-$(shell $(JAVA) -jar lib/silk-weaver.jar find 'project(artifactId, version)' pom.xml | grep snappy-java | awk '{ print $$2; }') |
337 |
|
338 |
-native: $(SNAPPY_UNPACKED) $(NATIVE_DLL) |
339 |
-snappy: $(TARGET)/$(snappy-jar-version).jar |
340 |
+native: $(NATIVE_DLL) |
341 |
+snappy: native |
342 |
|
343 |
$(NATIVE_DLL): $(SNAPPY_OUT)/$(LIBNAME) |
344 |
@mkdir -p $(@D) |
345 |
cp $< $@ |
346 |
@mkdir -p $(NATIVE_TARGET_DIR) |
347 |
cp $< $(NATIVE_TARGET_DIR)/$(LIBNAME) |
348 |
- |
349 |
+ cp $< $(TARGET) |
350 |
|
351 |
$(TARGET)/$(snappy-jar-version).jar: native $(NATIVE_DLL) |
352 |
$(MVN) package -Dmaven.test.skip=true |
353 |
|
354 |
|
355 |
|
356 |
1.1 dev-java/snappy/files/1.0.3_rc3-gentoo.patch |
357 |
|
358 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/snappy/files/1.0.3_rc3-gentoo.patch?rev=1.1&view=markup |
359 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/snappy/files/1.0.3_rc3-gentoo.patch?rev=1.1&content-type=text/plain |
360 |
|
361 |
Index: 1.0.3_rc3-gentoo.patch |
362 |
=================================================================== |
363 |
diff --git a/Makefile b/Makefile |
364 |
index a9d5cdc..8026741 100644 |
365 |
--- a/Makefile |
366 |
+++ b/Makefile |
367 |
@@ -44,8 +44,7 @@ $(SNAPPY_OUT)/SnappyNative.o : $(SRC)/org/xerial/snappy/SnappyNative.cpp $(SRC)/ |
368 |
|
369 |
|
370 |
$(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ) |
371 |
- $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy |
372 |
- $(STRIP) $@ |
373 |
+ $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy $(LDFLAGS) |
374 |
|
375 |
clean-native: |
376 |
rm -rf $(SNAPPY_OUT) |