[guice] 05/12: Use links to the system jars instead of patching the build script
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Thu Oct 9 15:15:39 BST 2014
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository guice.
commit f17b276824056694388045fc96b89ff2ef1cebf4
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Thu Oct 9 14:42:00 2014 +0200
Use links to the system jars instead of patching the build script
---
debian/changelog | 1 +
debian/patches/01_fix_build.diff | 44 ++++----------------
debian/patches/03_system-dependencies.diff | 66 ------------------------------
debian/patches/series | 1 -
debian/rules | 13 ++++++
5 files changed, 21 insertions(+), 104 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 8d01138..2bffe06 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ guice (3.0-6) UNRELEASED; urgency=medium
* Build and install the servlet extension
* Fixed a build failure caused by the cglib/asm transition
+ * Use links to the system jars instead of patching the build script
* Standards-Version updated to 3.9.6 (no changes)
-- Emmanuel Bourg <ebourg at apache.org> Thu, 09 Oct 2014 11:40:23 +0200
diff --git a/debian/patches/01_fix_build.diff b/debian/patches/01_fix_build.diff
index 76d96aa..abc8461 100644
--- a/debian/patches/01_fix_build.diff
+++ b/debian/patches/01_fix_build.diff
@@ -4,20 +4,9 @@ Bug-Debian: http://bugs.debian.org/579121
Forwarded: no
Last-Update: 2011-09-06
---- guice-3.0.orig/build.xml
-+++ guice-3.0/build.xml
-@@ -5,15 +5,21 @@
- <import file="common.xml"/>
-
- <path id="compile.classpath">
-- <fileset dir="${lib.dir}" includes="*.jar"/>
-- <fileset dir="${lib.dir}/build" includes="*.jar"/>
-+ <fileset dir="${debian.lib.dir}">
-+ <include name="atinject-jsr330-api.jar"/>
-+ <include name="aopalliance.jar"/>
-+ <include name="asm4.jar"/>
-+ <include name="cglib3.jar"/>
-+ </fileset>
+--- a/build.xml
++++ b/build.xml
+@@ -10,10 +10,12 @@
</path>
@@ -32,7 +21,7 @@ Last-Update: 2011-09-06
</jar>
</target>
-@@ -118,7 +124,6 @@
+@@ -118,7 +120,6 @@
<!-- Generate API for current version. -->
<javadoc packagenames="com.google.*"
@@ -40,7 +29,7 @@ Last-Update: 2011-09-06
maxmemory="512M"
classpath="lib/javax.inject.jar${path.separator}lib/aopalliance.jar">
<fileset dir="${src.dir}" defaultexcludes="yes">
-@@ -166,14 +171,14 @@
+@@ -166,14 +167,14 @@
<target name="javadoc">
<javadoc packagenames="com.google.*"
destdir="build/docs"
@@ -57,7 +46,7 @@ Last-Update: 2011-09-06
<fileset dir="${servlet.src.dir}"/>
<fileset dir="${spring.src.dir}"/>
<fileset dir="${assistedinject.src.dir}"/>
-@@ -183,9 +188,11 @@
+@@ -183,9 +184,11 @@
<fileset dir="${multibindings.src.dir}"/>
<fileset dir="${persist.src.dir}"/>
<fileset dir="${grapher.src.dir}"/>
@@ -69,7 +58,7 @@ Last-Update: 2011-09-06
<doclet name="com.google.doclava.Doclava">
<param name="-hdf"/> <param name="project.name"/> <param name="Guice"/>
<param name="-since"/> <param name="lib/build/guice-1.0.xml"/> <param name="Guice_1.0" />
-@@ -193,15 +200,18 @@
+@@ -193,15 +196,18 @@
<param name="-apiversion" value="Guice_${new.api}"/>
<param name="-assetsdir" value="javadoc/assets"/>
<param name="-apixml" value="build/docs/guice-${new.api}.xml"/>
@@ -89,22 +78,3 @@ Last-Update: 2011-09-06
</target>
<target name="no_aop"
---- guice-3.0.orig/build.properties
-+++ guice-3.0/build.properties
-@@ -1,4 +1,5 @@
- lib.dir=lib
-+debian.lib.dir=/usr/share/java
- src.dir=core/src
- test.dir=core/test
- servlet.src.dir=extensions/servlet/src
---- guice-3.0.orig/common.xml
-+++ guice-3.0/common.xml
-@@ -26,7 +26,7 @@
- <target name="manifest" description="Generate OSGi manifest." depends="compile">
- <dirname property="common.basedir" file="${ant.file.common}"/>
- <taskdef resource="aQute/bnd/ant/taskdef.properties"
-- classpath="${common.basedir}/lib/build/bnd-0.0.384.jar"/>
-+ classpath="${debian.lib.dir}/bnd.jar"/>
-
- <fail unless="module" message="Missing 'module' property (use the primary package name in this jar)"/>
- <property name="imports" value=""/>
diff --git a/debian/patches/03_system-dependencies.diff b/debian/patches/03_system-dependencies.diff
deleted file mode 100644
index 4cda671..0000000
--- a/debian/patches/03_system-dependencies.diff
+++ /dev/null
@@ -1,66 +0,0 @@
-Description: Enable build of extensions using the system dependencies
-Author: Miguel Landaeta <miguel at miguel.cc>, Emmanuel Bourg <ebourg at pache.org>
-Bug-Debian: http://bugs.debian.org/683644
-Forwarded: not-needed
---- a/extensions/assistedinject/build.properties
-+++ b/extensions/assistedinject/build.properties
-@@ -5,3 +5,4 @@
- test.class=com.google.inject.assistedinject.FactoryProviderTest
- module=com.google.inject.assistedinject
- fragment=true
-+debian.lib.dir=/usr/share/java
---- a/extensions/assistedinject/build.xml
-+++ b/extensions/assistedinject/build.xml
-@@ -5,8 +5,9 @@
- <import file="../../common.xml"/>
-
- <path id="compile.classpath">
-- <fileset dir="${lib.dir}" includes="*.jar"/>
-- <fileset dir="${lib.dir}/build" includes="*.jar"/>
-+ <fileset dir="${debian.lib.dir}">
-+ <include name="atinject-jsr330-api.jar"/>
-+ </fileset>
- <pathelement path="../../build/classes"/>
- </path>
-
---- a/common.xml
-+++ b/common.xml
-@@ -139,11 +139,11 @@
- <mkdir dir="${build.dir}/dist"/>
- <dirname property="common.basedir" file="${ant.file.common}"/>
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
-- classpath="${common.basedir}/lib/build/jarjar-snapshot.jar"/>
-+ classpath="${debian.lib.dir}/jarjar.jar"/>
- <jarjar jarfile="${build.dir}/${ant.project.name}-with-deps.jar">
- <fileset dir="${build.dir}/classes"/>
-- <zipfileset src="${common.basedir}/lib/build/cglib-2.2.1-snapshot.jar"/>
-- <zipfileset src="${common.basedir}/lib/build/asm-3.1.jar"/>
-+ <zipfileset src="${debian.lib.dir}/cglib3.jar"/>
-+ <zipfileset src="${debian.lib.dir}/asm4.jar"/>
- <rule pattern="net.sf.cglib.*" result="com.google.inject.internal.cglib.$@1"/>
- <rule pattern="net.sf.cglib.**.*" result="com.google.inject.internal.cglib. at 1.$@2"/>
- <rule pattern="org.objectweb.asm.*" result="com.google.inject.internal.asm.$@1"/>
---- a/extensions/servlet/build.properties
-+++ b/extensions/servlet/build.properties
-@@ -6,3 +6,4 @@
- test.class=com.google.inject.servlet.AllTests
- module=com.google.inject.servlet
- fragment=true
-+debian.lib.dir=/usr/share/java
---- a/extensions/servlet/build.xml
-+++ b/extensions/servlet/build.xml
-@@ -5,10 +5,10 @@
- <import file="../../common.xml"/>
-
- <path id="compile.classpath">
-- <fileset dir="${lib.dir}" includes="*.jar"/>
-- <fileset dir="${lib.dir}/build" includes="*.jar"/>
-- <fileset dir="${ext.lib.dir}" includes="*.jar"/>
-- <fileset dir="${ext.lib.dir}/build" includes="*.jar"/>
-+ <fileset dir="${debian.lib.dir}">
-+ <include name="atinject-jsr330-api.jar"/>
-+ <include name="servlet-api-3.1.jar"/>
-+ </fileset>
- <pathelement path="../../build/classes"/>
- </path>
-
diff --git a/debian/patches/series b/debian/patches/series
index 4db286c..7b2914d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
01_fix_build.diff
02_link_javadocs.diff
-03_system-dependencies.diff
04_java8-compatibility.diff
05_upgrade-asm-and-cglib.patch
diff --git a/debian/rules b/debian/rules
index e2cdbe0..21b04ef 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,18 @@ VERSION := \$(shell dpkg-parsechangelog | grep ^Version: | sed -r 's/^.*:\ (.*)-
dh $@ --with javahelper
override_dh_auto_build:
+ # install the links to the jars in the lib directory
+ mkdir -p extensions/servlet/lib/build
+ ln -s /usr/share/java/atinject-jsr330-api.jar lib/javax.inject.jar
+ ln -s /usr/share/java/aopalliance.jar lib/aopalliance.jar
+ ln -s /usr/share/java/asm4.jar lib/build/asm-3.1.jar
+ ln -s /usr/share/java/bnd.jar lib/build/bnd-0.0.384.jar
+ ln -s /usr/share/java/cglib3.jar lib/build/cglib-2.2.1-snapshot.jar
+ ln -s /usr/share/java/jarjar.jar lib/build/jarjar-snapshot.jar
+ ln -s /usr/share/java/servlet-api-3.1.jar lib/build/servlet.jar
+
dh_auto_build
+
ant -Dversion=$(VERSION) jar javadoc
# build assistedinject extension
cd extensions/assistedinject && ant -Dversion=$(VERSION) jar
@@ -33,6 +44,8 @@ override_dh_auto_install:
override_dh_auto_clean:
dh_auto_clean
+ # remove the symbolic links
+ rm -f lib/*.jar lib/build/*.jar
# clean extensions build files
cd extensions/assistedinject && ant clean
cd extensions/servlet && ant clean
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/guice.git
More information about the pkg-java-commits
mailing list