attempts to use debianized libraries
[debian/jabref.git] / debian / patches / 02_libs.dpatch
index f9c6cd2..6717179 100755 (executable)
 #! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_libs.dpatch by  <gregor+debian@comodo.priv.at>
+## 02_libs.dpatch by  <gregor+debian@comodo.priv.at>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: Replace pre-compiled libs by Debian packages
+## DP: Use debian packages of libraries instead of shipped ones.
 
 @DPATCH@
 diff -urNad jabref~/build.xml jabref/build.xml
---- jabref~/build.xml  2006-09-30 11:57:24.000000000 +0200
-+++ jabref/build.xml   2006-10-15 18:19:19.000000000 +0200
-@@ -86,6 +86,7 @@
+--- jabref~/build.xml  2007-09-30 23:56:59.000000000 +0200
++++ jabref/build.xml   2007-10-01 00:26:56.000000000 +0200
+@@ -87,6 +87,7 @@
  
-         <!-- Set the properties for library directories -->
-         <property name="library.directory" value="lib" />
-+        <property name="library.directory.debian" value="/usr/share/java" />
+       <!-- Set the properties for library directories -->
+       <property name="library.directory" value="lib" />
++      <property name="library.directory.debian" value="/usr/share/java" />
  
+ <!--    <property name="nsis.executable" value="makensis.exe"/> -->
  
-     <taskdef name="jarbundler"
-@@ -101,6 +102,9 @@
-                 <fileset dir="${library.directory}">
-                         <include name="*.jar" />
-                 </fileset>
-+                <fileset dir="${library.directory.debian}">
-+                        <include name="*.jar" />
-+                </fileset>
-         </path>
+@@ -111,15 +112,14 @@
+       <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.0.4.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}/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}/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" />
+       </path>
  
-     <!-- Runs project (e.g. in NetBeans 4) -->
-@@ -110,12 +114,12 @@
-             <pathelement location="${build.lib}/jabref.jar"/>
-             <!--<pathelement location="${library.directory}/commons-httpclient-2.0.jar" />
-             <pathelement location="${library.directory}/commons-logging.jar" />-->
--            <pathelement location="${library.directory}/antlr.jar" />
--            <pathelement location="${library.directory}/looks-2.0.4.jar" />
--            <pathelement location="${library.directory}/forms-1.0.4.jar" />
--            <pathelement location="${library.directory}/spin-1.4.jar" />
--            <pathelement location="${library.directory}/glazedlists-1.5.0_java14.jar" />
--            <pathelement location="${library.directory}/microba.jar" />
-+            <pathelement location="${library.directory.debian}/antlr.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" />
-         </classpath>
-          </java>
-     </target>
-@@ -139,11 +143,11 @@
-       <nbprofiledirect>
-           <classpath>
-             <pathelement location="${build.lib}/jabref.jar"/>
--            <pathelement location="${library.directory}/antlr.jar" />
--            <pathelement location="${library.directory}/looks-2.0.4.jar" />
--            <pathelement location="${library.directory}/forms-1.0.4.jar" />
--            <pathelement location="${library.directory}/spin-1.4.jar" />
--            <pathelement location="${library.directory}/glazedlists-1.5.0_java14.jar" />
-+            <pathelement location="${library.directory.debian}/antlr.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" />
-         </classpath>
-       </nbprofiledirect>
-@@ -155,11 +159,11 @@
-           <env key="LD_LIBRARY_PATH" path="${profiler.info.agentpath}:${env.LD_LIBRARY_PATH}"/>
-           <classpath>
-             <pathelement location="${build.lib}/jabref.jar"/>
--            <pathelement location="${library.directory}/antlr.jar" />
--            <pathelement location="${library.directory}/looks-2.0.4.jar" />
--            <pathelement location="${library.directory}/forms-1.0.4.jar" />
--            <pathelement location="${library.directory}/spin-1.4.jar" />
--            <pathelement location="${library.directory}/glazedlists-1.5.0_java14.jar" />
-+            <pathelement location="${library.directory.debian}/antlr.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" />
-         </classpath>
-       </java>
-@@ -175,12 +179,12 @@
-                                 <pathelement path="${build.classes}" />
-                                 <!--<pathelement location="${library.directory}/commons-httpclient-2.0.jar" />
-                                 <pathelement location="${library.directory}/commons-logging.jar" />-->
--                                <pathelement location="${library.directory}/antlr.jar" />
--                                <pathelement location="${library.directory}/looks-2.0.4.jar" />
--                                <pathelement location="${library.directory}/forms-1.0.4.jar" />
--                                <pathelement location="${library.directory}/spin-1.4.jar" />
--                                <pathelement location="${library.directory}/glazedlists-1.5.0_java14.jar" />
--                                <pathelement location="${library.directory}/microba.jar" />
-+                                <pathelement location="${library.directory.debian}/antlr.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" />
-                         </classpath>
-                 </javac>
-         </target>
-@@ -194,9 +198,9 @@
-                                 <pathelement path="${build.classes}" />
-                                 <!--<pathelement location="${library.directory}/commons-httpclient-2.0.jar" />
-                                 <pathelement location="${library.directory}/commons-logging.jar" />-->
--                                <pathelement location="${library.directory}/antlr.jar" />
--                                <pathelement location="${library.directory}/looks-2.0.4.jar" />
--                                <pathelement location="${library.directory}/spin-1.4.jar" />
-+                                <pathelement location="${library.directory.debian}/antlr.jar" />
-+                                <pathelement location="${library.directory.debian}/looks.jar" />
-+                                <pathelement location="${library.directory.debian}/spin.jar" />
-                         </classpath>
-                 </javac>
-@@ -409,16 +413,16 @@
-                 <mkdir dir="${build.tmp}"/>
-                 <!--<unjar src="${library.directory}/commons-httpclient-2.0.jar" dest="${build.tmp}" />
-                 <unjar src="${library.directory}/commons-logging.jar" dest="${build.tmp}" />-->
--                <unjar src="${library.directory}/antlr.jar" dest="${build.tmp}" />
-+                <unjar src="${library.directory.debian}/antlr.jar" dest="${build.tmp}" />
-                 <!--                <unjar src="${library.directory}/plastic-1.2.1.jar" dest="${build.classes}" />-->
--                <unjar src="${library.directory}/looks-2.0.4.jar" dest="${build.tmp}" />
--                <unjar src="${library.directory}/forms-1.0.4.jar" dest="${build.tmp}" />
--                <unjar src="${library.directory}/spin-1.4.jar" dest="${build.tmp}" />
--                <unjar src="${library.directory}/glazedlists-1.5.0_java14.jar" dest="${build.tmp}" />
--                <unjar src="${library.directory}/microba.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}" />
-             <delete dir="${build.tmp}/META-INF"/>
-           <!-- rename the microba license file -->
--          <move file="${build.tmp}/license.txt" tofile="${build.tmp}/microba-license.txt"/>
-+          <!-- <move file="${build.tmp}/license.txt" tofile="${build.tmp}/microba-license.txt"/> -->
-         </target>
-@@ -447,6 +451,9 @@
-                                 <fileset dir="${library.directory}">
-                                         <include name="*.jar" />
-                                 </fileset>
-+                                <fileset dir="${library.directory.debian}">
-+                                        <include name="*.jar" />
-+                                </fileset>
-                         </classpath>
-                 </taskdef>
-                 <!-- allowed Pretty Much Done rulsets -->
-@@ -483,6 +490,9 @@
-                                 <fileset dir="${library.directory}">
-                                         <include name="*.jar" />
-                                 </fileset>
-+                                <fileset dir="${library.directory.debian}">
-+                                        <include name="*.jar" />
-+                                </fileset>
-                         </classpath>
-                 </taskdef>
-                 <cpd format="text" minimumTokenCount="100" outputFile="${build.dir}/duplicated_code_report.txt">
-@@ -500,6 +510,9 @@
-                                 <fileset dir="${library.directory}">
-                                         <include name="*.jar" />
-                                 </fileset>
-+                                <fileset dir="${library.directory.debian}">
-+                                        <include name="*.jar" />
-+                                </fileset>
-                         </classpath>
-                 </taskdef>
-                 <echo>Cyclomatic
-@@ -523,6 +536,9 @@
-                                 <fileset dir="${library.directory}">
-                                         <include name="*.jar" />
-                                 </fileset>
-+                                <fileset dir="${library.directory.debian}">
-+                                        <include name="*.jar" />
-+                                </fileset>
-                         </classpath>
-                 </taskdef>
-                 <jalopy fileformat="unix" convention="${src.dir}/java/jalopy.format.convention.xml" history="file" historymethod="adler32" loglevel="error" threads="2" classpathref="classpath" backup="bak">
-@@ -545,10 +561,10 @@
-                                 <pathelement location="${build.lib}/jabref.jar" />
-                                 <!--<pathelement location="${library.directory}/commons-httpclient-2.0.jar" />
-                                 <pathelement location="${library.directory}/commons-logging.jar" />-->
--                                <pathelement location="${library.directory}/antlr.jar" />
--                                <pathelement location="${library.directory}/looks-2.0.4.jar" />
--                                <pathelement location="${library.directory}/looks-2.0.4.jar" />
--                                <pathelement location="${library.directory}/spin-1.4.jar" />
-+                                <pathelement location="${library.directory.debian}/antlr.jar" />
-+                                <pathelement location="${library.directory.debian}/looks.jar" />
-+                                <pathelement location="${library.directory.debian}/forms.jar" />
-+                                <pathelement location="${library.directory.debian}/spin.jar" />
-                         </classpath>
-                         <!--<test name="tests.net.sf.jabref.export.layout.format.AuthorLastFirstAbbreviatorTester"/>-->
+       <target name="run" depends="build">
+@@ -356,15 +356,14 @@
+       <!-- Unpacks jar needed jar files from lib directory into temp directory. -->
+       <target name="unjarlib" description="Unpacks jars from library">
+               <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.0.4.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}/looks" dest="${build.tmp}" />
++              <unjar src="${library.directory.debian}/forms" 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" />