tags 389068 patch
thanks

Attached you'll find a patch to build the package and running jabref
using the current Debian libraries. The patch is the 'interdiff' output
between my changes and the current diff.gz of the package.

Here's an overview of the patch:

* 05build_with_debian_jars: use the java libraries from /usr/share/java,
and disable the 'unjarlib' target dependency from the 'jars' target.
Instead of include the whole set of classes in the same jar, Jabref now
use the libraries in the classpath to compile and run(see
jabref-wrapper).

Additionaly, I've commented the 'jarbundler' target, It's a
macosx-specific target, and uses the lib/jarbundler-1.4.jar(not in
debian and useless), which makes ant unhappy if not present. 

So you can repackage the upstream tarball and remove those jarfiles and
make it DFSG-Free.

* Moved jabref script to debian/ , renamed jabref-wrapper(as you already
did in the trunk version) and add the needed jars to the Classpath. 

* Added new Dependencies and Build-Dependencies to debian/control.
Jabref still depends on both antlr and antlr3, and it just works using
libjempbox-java (>= 0.2.0)

* 06proposed_upstream_fix_ruleNestingLevel: Upstream still uses antlr3
beta, the debian version is the stable one, this patch allows using the
debian version. I've not tested extensively, but it works for me :).

The patch is not proposed-upstream still, in despite of his name.

You can drop 02_libs.dpatch, the changes to the build.xml are covered
now in the 05build_with_debian_jars (with the additional changes in the
'jars' target), and the changes to EntryEditorTab.java are already
applied upstream.


-- 
Gerardo Curiel  <[EMAIL PROTECTED]>  <[EMAIL PROTECTED]>
Geek By NaTure,LiNuX By ChOiCe,DebiAn of CoUrsE
gpg fingerprint: 228B 0F96 8653 DF52 9740  B75E FB32 9C30 E179 7BD2
http://www.debian.org
unchanged:
--- jabref-2.3.1/debian/patches/00list
+++ jabref-2.3.1/debian/patches/00list
@@ -3,0 +4,2 @@
+05build_with_debian_jars
+06proposed_upstream_fix_ruleNestingLevel
unchanged:
--- jabref-2.3.1/debian/control
+++ jabref-2.3.1/debian/control
@@ -4,7 +4,7 @@
 Maintainer: gregor herrmann <[EMAIL PROTECTED]>
 Uploaders: tony mancill <[EMAIL PROTECTED]>
 Build-Depends: debhelper (>= 6), dpatch, ant
-Build-Depends-Indep: java-gcj-compat-dev, imagemagick, liblog4j1.2-java
+Build-Depends-Indep: java-gcj-compat-dev, imagemagick, liblog4j1.2-java, antlr, antlr3, libjgoodies-looks-java, libjgoodies-forms-java, libspin-java, libglazedlists-java, libmicroba-java, libpdfbox-java, libjempbox-java (>= 0.2.0) 
 Standards-Version: 3.7.3
 Homepage: http://jabref.sourceforge.net/
 Vcs-Svn: http://svn.toastfreeware.priv.at/debian/jabref/trunk/
@@ -12,7 +12,7 @@
 
 Package: jabref
 Architecture: all
-Depends: sun-java6-jre | sun-java5-jre
+Depends: sun-java6-jre | sun-java5-jre, antlr, antlr3, libjgoodies-looks-java, libjgoodies-forms-java, libspin-java, libglazedlists-java, libmicroba-java, libpdfbox-java, libjempbox-java (>= 0.2.0)
 Suggests: gv | postscript-viewer, xpdf | pdf-viewer
 Description: graphical frontend to manage BibTeX databases
  JabRef is a GUI to manage BibTeX databases, the standard LaTeX bibliography
unchanged:
--- jabref-2.3.1/debian/install
+++ jabref-2.3.1/debian/install
@@ -1,4 +1,3 @@
 build/lib/JabRef-2.3.1.jar usr/share/java
-jabref usr/bin
 build/*.xpm usr/share/pixmaps
 debian/jabref.desktop usr/share/applications
unchanged:
--- jabref-2.3.1/debian/rules
+++ jabref-2.3.1/debian/rules
@@ -37,6 +37,7 @@
 	dh_testroot
 	dh_clean -k
 	dh_installdirs
+	install -m 755 debian/jabref-wrapper $(CURDIR)/debian/jabref/usr/bin/jabref
 	touch install-stamp
                                                         
 # Build architecture-independent files here.
only in patch2:
unchanged:
--- jabref-2.3.1/jabref
+++ jabref-2.3.1.orig/jabref
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-# jabref wrapper script
-# code for java detection borrowed from tuxguitar
-
-if [ -z "$JAVA_HOME" ] ; then
-	t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t
-	t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t
-	t=/usr/lib/jvm/java-7-icedtea && test -d $t && JAVA_HOME=$t
-	test -n "$JAVA_HOME" && JAVA=${JAVA_HOME}/jre/bin/java
-fi
-
-export JAVA=${JAVA:=java}
-
-exec $JAVA -jar /usr/share/java/jabref.jar "$@"
only in patch2:
unchanged:
--- jabref-2.3.1.orig/debian/jabref-wrapper
+++ jabref-2.3.1/debian/jabref-wrapper
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# jabref wrapper script
+# code for java detection borrowed from tuxguitar
+
+if [ -z "$JAVA_HOME" ] ; then
+	t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t
+	t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t
+	t=/usr/lib/jvm/java-7-icedtea && test -d $t && JAVA_HOME=$t
+	test -n "$JAVA_HOME" && JAVA=${JAVA_HOME}/jre/bin/java
+fi
+
+export JAVA=${JAVA:=java}
+
+exec $JAVA -cp /usr/share/java/jabref.jar:/usr/share/java/antlr.jar:/usr/share/java/antlr3.jar:/usr/share/java/looks.jar:/usr/share/java/forms.jar:/usr/share/java/spin.jar:/usr/share/java/glazedlists.jar:/usr/share/java/microba.jar:/usr/share/java/pdfbox.jar:/usr/share/java/jempbox.jar net.sf.jabref.JabRefMain "$@"
+
only in patch2:
unchanged:
--- jabref-2.3.1.orig/debian/patches/06proposed_upstream_fix_ruleNestingLevel.dpatch
+++ jabref-2.3.1/debian/patches/06proposed_upstream_fix_ruleNestingLevel.dpatch
@@ -0,0 +1,41 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 06proposed_upstream_fix_ruleNestingLevel.dpatch by  <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use antlr3 stable release API, missing ruleNestingLevel member on the antlr3 beta API
+
[EMAIL PROTECTED]@
+diff -urNad jabref-2.3.1~/src/java/net/sf/jabref/bst/BstLexer.java jabref-2.3.1/src/java/net/sf/jabref/bst/BstLexer.java
+--- jabref-2.3.1~/src/java/net/sf/jabref/bst/BstLexer.java	2008-04-19 03:48:20.000000000 -0430
++++ jabref-2.3.1/src/java/net/sf/jabref/bst/BstLexer.java	2008-04-19 03:48:53.000000000 -0430
+@@ -3,11 +3,12 @@
+ // $ANTLR 3.0b5 Bst.g 2006-11-23 23:20:24
+ 
+ import org.antlr.runtime.*;
++import org.antlr.codegen.*;
+ import java.util.Stack;
+ import java.util.List;
+ import java.util.ArrayList;
+ 
+-public class BstLexer extends Lexer {
++public class BstLexer extends ActionTranslatorLexer {
+     public static final int LETTER=21;
+     public static final int T29=29;
+     public static final int T33=33;
+@@ -40,6 +41,9 @@
+     public static final int IDLIST=4;
+     public static final int NUMERAL=22;
+     public static final int READ=13;
++    
++    int ruleNestingLevel = 0;
++    
+     public BstLexer() {;} 
+     public BstLexer(CharStream input) {
+         super(input);
+@@ -1656,4 +1660,4 @@
+ 
+  
+ 
+-}
+\ No newline at end of file
++}
only in patch2:
unchanged:
--- jabref-2.3.1.orig/debian/patches/05build_with_debian_jars.dpatch
+++ jabref-2.3.1/debian/patches/05build_with_debian_jars.dpatch
@@ -0,0 +1,60 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## build_with_debian_jars.dpatch by  <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use debian libraries and disable unnecesary unjarlib target,
+
[EMAIL PROTECTED]@
+diff -urNad jabref-2.3.1~/build.xml jabref-2.3.1/build.xml
+--- jabref-2.3.1~/build.xml	2008-04-19 04:13:24.000000000 -0430
++++ jabref-2.3.1/build.xml	2008-04-19 04:16:57.000000000 -0430
+@@ -86,7 +86,7 @@
+ 	<property name="layout.dir" value="${src.dir}/resource/layout" />
+ 
+ 	<!-- Set the properties for library directories -->
+-	<property name="library.directory" value="lib" />
++	<property name="library.directory" value="/usr/share/java" />
+ 
+ <!--    <property name="nsis.executable" value="makensis.exe"/> -->
+ 	<property name="nsis.executable.linux" value="makensis"/>
+@@ -105,22 +105,21 @@
+ 		</and>
+ 	</condition>
+ 
+-	<taskdef name="jarbundler" classpath="${library.directory}/jarbundler-1.4.jar" classname="com.loomcom.ant.tasks.jarbundler.JarBundler" />
+-
+-
++<!--	<taskdef name="jarbundler" classpath="${library.directory}/jarbundler-1.4.jar" classname="com.loomcom.ant.tasks.jarbundler.JarBundler" />
++-->
+ 	<!-- Build classpath -->
+ 	<path id="classpath">
+ 		<pathelement path="${build.classes}" />
+ 		<pathelement path="${build.dir}" />
+ 		<pathelement location="${library.directory}/antlr.jar" />
+-		<pathelement location="${library.directory}/antlr-3.0b5.jar" />
+-		<pathelement location="${library.directory}/looks-2.0.4.jar" />
+-		<pathelement location="${library.directory}/forms-1.1.0.jar" />
++		<pathelement location="${library.directory}/antlr3.jar" />
++		<pathelement location="${library.directory}/looks.jar" />
++		<pathelement location="${library.directory}/forms.jar" />
+ 		<pathelement location="${library.directory}/spin.jar" />
+-		<pathelement location="${library.directory}/glazedlists-1.7.0_java15.jar" />
++		<pathelement location="${library.directory}/glazedlists.jar" />
+ 		<pathelement location="${library.directory}/microba.jar" />
+-		<pathelement location="${library.directory}/PDFBox-0.7.3-dev-reduced.jar" />
+-		<pathelement location="${library.directory}/JempBox-0.1.0-dev.jar" />
++		<pathelement location="${library.directory}/pdfbox.jar" />
++		<pathelement location="${library.directory}/jempbox.jar" />
+ 	</path>
+ 
+ 	<target name="run" depends="build">
+@@ -194,7 +193,8 @@
+ 	</target>
+ 
+ 	<!-- Jars up project -->
+-	<target name="jars" depends="build, unjarlib">
++	<!-- The unjarlib target is not needed, we'll use the jars in the classpath -->
++	<target name="jars" depends="build">
+ 		<mkdir dir="${build.lib}" />
+ 		<mkdir dir="${build.tmp}" />
+ 		<jar destfile="${build.lib}/${build.jar}">

Attachment: signature.asc
Description: Esta parte del mensaje está firmada digitalmente

Reply via email to