integrate patches from Gerardo Curiel
[debian/jabref.git] / debian / patches / 02_libs.dpatch
index 0b7c365187ee7f0d8b2706fb7d0e294722f4b464..b36ceca8568375359c00e59325a1f78789062735 100755 (executable)
@@ -1,68 +1,60 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_libs.dpatch by  <gregor+debian@comodo.priv.at>
+## 02_libs.dpatch by  <gerardo@sophie.gerardo.com.ve>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: Use debian packages of libraries instead of shipped ones.
+## DP: Use debian libraries and disable unnecesary unjarlib target,
 
 @DPATCH@
-diff -urNad jabref-2.3~/build.xml jabref-2.3/build.xml
---- jabref-2.3~/build.xml      2008-04-12 23:31:44.000000000 +0200
-+++ jabref-2.3/build.xml       2008-04-12 23:56:35.000000000 +0200
-@@ -87,6 +87,7 @@
+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.debian" value="/usr/share/java" />
+-      <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"/>
-@@ -112,15 +113,15 @@
+@@ -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.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}/spin.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}/microba.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.debian}/antlr.jar" />
-+              <pathelement location="${library.directory.debian}/antlr3.jar" />
-+              <pathelement location="${library.directory.debian}/looks.jar" />
-+              <pathelement location="${library.directory.debian}/forms.jar" />
-+              <pathelement location="${library.directory.debian}/spin.jar" />
-+              <pathelement location="${library.directory.debian}/glazedlists.jar" />
-+              <pathelement location="${library.directory.debian}/microba.jar" />
-+              <pathelement location="${library.directory.debian}/pdfbox.jar" />
-+              <pathelement location="${library.directory.debian}/jempbox.jar" />
++              <pathelement location="${library.directory}/pdfbox.jar" />
++              <pathelement location="${library.directory}/jempbox.jar" />
        </path>
  
        <target name="run" depends="build">
-@@ -363,15 +364,15 @@
-       <!-- Unpacks jar needed jar files from lib directory into temp directory. -->
-       <target name="unjarlib" description="Unpacks jars from library">
+@@ -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}" />
--              <unjar src="${library.directory}/antlr.jar" dest="${build.tmp}" />
--              <unjar src="${library.directory}/antlr-3.0b5.jar" dest="${build.tmp}" />
--              <unjar src="${library.directory}/looks-2.0.4.jar" dest="${build.tmp}" />
--              <unjar src="${library.directory}/forms-1.1.0.jar" dest="${build.tmp}" />
--              <unjar src="${library.directory}/spin.jar" dest="${build.tmp}" />
--              <unjar src="${library.directory}/glazedlists-1.7.0_java15.jar" dest="${build.tmp}" />
--              <unjar src="${library.directory}/microba.jar" dest="${build.tmp}" />
--              <unjar src="${library.directory}/PDFBox-0.7.3-dev-reduced.jar" dest="${build.tmp}" />
--              <unjar src="${library.directory}/JempBox-0.1.0-dev.jar" dest="${build.tmp}" />
-+              <unjar src="${library.directory.debian}/antlr.jar" dest="${build.tmp}" />
-+              <unjar src="${library.directory.debian}/antlr3.jar" dest="${build.tmp}" />
-+              <unjar src="${library.directory.debian}/looks.jar" dest="${build.tmp}" />
-+              <unjar src="${library.directory.debian}/forms.jar" dest="${build.tmp}" />
-+              <unjar src="${library.directory.debian}/spin.jar" dest="${build.tmp}" />
-+              <unjar src="${library.directory.debian}/glazedlists.jar" dest="${build.tmp}" />
-+              <unjar src="${library.directory.debian}/microba.jar" dest="${build.tmp}" />
-+              <unjar src="${library.directory.debian}/pdfbox.jar" dest="${build.tmp}" />
-+              <unjar src="${library.directory.debian}/jempbox.jar" dest="${build.tmp}" />
-               <delete dir="${build.tmp}/META-INF" />
-               <!-- rename the microba license file -->
-               <move file="${build.tmp}/license.txt" tofile="${build.tmp}/microba-license.txt" />
+               <jar destfile="${build.lib}/${build.jar}">