summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiao-Long Chen2015-06-08 22:05:47 -0400
committerXiao-Long Chen2015-06-08 22:05:47 -0400
commitc0cb6f2494176ba5cdd1cf7cbe8ff506b6fd5ff4 (patch)
tree896f1cdcbb268e3d28fdf619624849a67f4dc402
downloadaur-c0cb6f2494176ba5cdd1cf7cbe8ff506b6fd5ff4.tar.gz
Import from old AUR
-rw-r--r--.SRCINFO36
-rw-r--r--0001-Remove-avalon-logkit.patch45
-rw-r--r--0003-Use-system-jars.patch197
-rw-r--r--0004-JDBC-41-compat.patch19
-rw-r--r--PKGBUILD74
5 files changed, 371 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..667d00a33b9f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,36 @@
+# Generated by makepkg 4.2.0
+# Thu Jan 1 02:53:35 UTC 2015
+pkgbase = velocity
+ pkgdesc = Free open-source templating engine
+ pkgver = 1.7
+ pkgrel = 1
+ url = http://velocity.apache.org/
+ arch = any
+ license = Apache
+ makedepends = antlr2
+ makedepends = apache-ant
+ depends = jakarta-oro
+ depends = java-bcel
+ depends = java-commons-collections
+ depends = java-commons-logging
+ depends = java-commons-lang
+ depends = java-jdom1
+ depends = java-servlet3.0-tomcat
+ depends = junit
+ depends = log4j
+ depends = werken-xpath
+ source = http://www.us.apache.org/dist/velocity/engine/1.7/velocity-1.7.tar.gz
+ source = 0001-Remove-avalon-logkit.patch
+ source = 0003-Use-system-jars.patch
+ source = 0004-JDBC-41-compat.patch
+ md5sums = 6af13ea297dee7ddbabeaa8e3963c184
+ md5sums = 3de9a9b9637520fd19d157549f3f0830
+ md5sums = 377f16d1baab0ca30c69fb036e7eca30
+ md5sums = b1a47ba7da5b3e2c7e6e7cc0fc4cb920
+ sha1sums = 513c8a8c2aa4459d777a53634fc331bfd986e033
+ sha1sums = effe4fb6ca27ba90978f1978865953d2ecb1904a
+ sha1sums = 9365f137bf47934daf606efa24f0a3ea2751cc36
+ sha1sums = e07d06e5c9a08de4c043a6e67986884681559114
+
+pkgname = velocity
+
diff --git a/0001-Remove-avalon-logkit.patch b/0001-Remove-avalon-logkit.patch
new file mode 100644
index 000000000000..fd5160f583ca
--- /dev/null
+++ b/0001-Remove-avalon-logkit.patch
@@ -0,0 +1,45 @@
+From 1d2f89cb3e954b943751fa8dd587fdb404eb9338 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky@redhat.com>
+Date: Mon, 21 Feb 2011 15:53:34 +0100
+Subject: [PATCH 1/3] Remove avalon-logkit
+
+we don't have it packaged so change defaults and remove it from pom.xml
+---
+ pom.xml | 6 ------
+ .../velocity/runtime/defaults/velocity.properties | 4 ++--
+ .../apache/velocity/runtime/log/LogManager.java | 2 +-
+ 3 files changed, 3 insertions(+), 9 deletions(-)
+
+diff --git a/src/java/org/apache/velocity/runtime/defaults/velocity.properties b/src/java/org/apache/velocity/runtime/defaults/velocity.properties
+index 750a59a..7fac119 100644
+--- a/src/java/org/apache/velocity/runtime/defaults/velocity.properties
++++ b/src/java/org/apache/velocity/runtime/defaults/velocity.properties
+@@ -20,10 +20,10 @@
+ # ----------------------------------------------------------------------------
+
+ # ----------------------------------------------------------------------------
+-# default LogChute to use: default: AvalonLogChute, Log4JLogChute, CommonsLogLogChute, ServletLogChute, JdkLogChute
++# default LogChute to use: default: Log4JLogChute, CommonsLogLogChute, ServletLogChute, JdkLogChute
+ # ----------------------------------------------------------------------------
+
+-runtime.log.logsystem.class = org.apache.velocity.runtime.log.AvalonLogChute,org.apache.velocity.runtime.log.Log4JLogChute,org.apache.velocity.runtime.log.CommonsLogLogChute,org.apache.velocity.runtime.log.ServletLogChute,org.apache.velocity.runtime.log.JdkLogChute
++runtime.log.logsystem.class = org.apache.velocity.runtime.log.Log4JLogChute,org.apache.velocity.runtime.log.CommonsLogLogChute,org.apache.velocity.runtime.log.ServletLogChute,org.apache.velocity.runtime.log.JdkLogChute
+
+ # ---------------------------------------------------------------------------
+ # This is the location of the Velocity Runtime log.
+diff --git a/src/java/org/apache/velocity/runtime/log/LogManager.java b/src/java/org/apache/velocity/runtime/log/LogManager.java
+index 19d1016..97dceef 100644
+--- a/src/java/org/apache/velocity/runtime/log/LogManager.java
++++ b/src/java/org/apache/velocity/runtime/log/LogManager.java
+@@ -119,7 +119,7 @@ public class LogManager
+ * classes, and we use the first one we find.
+ *
+ * Note that the default value of this property contains the
+- * AvalonLogChute, the Log4JLogChute, CommonsLogLogChute,
++ * Log4JLogChute, CommonsLogLogChute,
+ * ServletLogChute, and the JdkLogChute for
+ * convenience - so we use whichever we works first.
+ */
+--
+1.7.4
+
diff --git a/0003-Use-system-jars.patch b/0003-Use-system-jars.patch
new file mode 100644
index 000000000000..3d37ee829538
--- /dev/null
+++ b/0003-Use-system-jars.patch
@@ -0,0 +1,197 @@
+From 813085c72e9906a53bec5954bcce7305a7c320d1 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky@redhat.com>
+Date: Mon, 21 Feb 2011 17:58:39 +0100
+Subject: [PATCH 3/3] Use system jars
+
+---
+ build/build.xml | 56 +++++++++++----------------------------------------
+ build/testcases.xml | 6 -----
+ 2 files changed, 12 insertions(+), 50 deletions(-)
+
+diff --git a/build/build.xml b/build/build.xml
+index c667553..479ef2d 100644
+--- a/build/build.xml
++++ b/build/build.xml
+@@ -140,28 +140,6 @@
+ <!-- =================================================================== -->
+ <!-- sets up the build environment (classpath and libs) -->
+ <!-- =================================================================== -->
+- <target name="build-prepare">
+- <ant antfile="${velocity.build.dir}/download.xml" target="build-download" />
+-
+- <!-- Build classpath -->
+- <path id="velocity.build.classpath">
+- <fileset dir="${build.lib}">
+- <include name="**/*.jar"/>
+- </fileset>
+- </path>
+-
+- <!-- Test classpath, contains dependencies needed only for Testing -->
+- <path id="velocity.test.classpath">
+- <fileset dir="${build.test.lib}">
+- <include name="**/*.jar"/>
+- </fileset>
+- </path>
+-
+- <path id="velocity.run.classpath">
+- <path refid="velocity.build.classpath"/>
+- <pathelement location="${build.dir}/${final.name}.jar"/>
+- </path>
+- </target>
+
+ <!-- =================================================================== -->
+ <!-- checks for the existence/non-existence of various java features -->
+@@ -174,12 +152,11 @@
+ <target name="prepare-jdbc" depends="check-jdbc,check-jdbc-true,check-jdbc-false"/>
+ <target name="prepare-jdk14" depends="check-jdk14,check-jdk14-true,check-jdk14-false"/>
+
+- <target name="check-jdbc" depends="build-prepare">
++ <target name="check-jdbc">
+ <!-- note: check to see if required class is available. -->
+ <!-- might be j2ee.jar, jdbc2_0-stdext.jar, or simply JDK 1.4+ -->
+ <available classname="javax.sql.DataSource"
+ property="jdbc.present">
+- <classpath refid="velocity.build.classpath"/>
+ </available>
+ </target>
+
+@@ -210,10 +187,9 @@
+ </echo>
+ </target>
+
+- <target name="check-jdk14" depends="build-prepare">
++ <target name="check-jdk14">
+ <available classname="java.util.logging.Logger"
+ property="jdk14.present">
+- <classpath refid="velocity.build.classpath"/>
+ </available>
+ </target>
+
+@@ -248,7 +224,7 @@
+ <!-- =================================================================== -->
+ <target name="compile" depends="compile-src,compile-test"/>
+
+- <target name="compile-src" depends="prepare,build-prepare,check-jdbc,check-jdk14"
++ <target name="compile-src" depends="prepare,check-jdbc,check-jdk14"
+ description="Compiles the Velocity source">
+ <javac srcdir="${build.src}"
+ destdir="${build.dest}"
+@@ -257,8 +233,7 @@
+ target="${javac.target}"
+ source="${javac.source}"
+ deprecation="${deprecation}"
+- optimize="${optimize}"
+- classpathref="velocity.build.classpath"/>
++ optimize="${optimize}"/>
+
+ <copy todir="${build.dest}" filtering="yes">
+ <fileset dir="${src.java.dir}">
+@@ -268,7 +243,7 @@
+
+ </target>
+
+- <target name="compile-test" depends="prepare,build-prepare,compile-src"
++ <target name="compile-test" depends="prepare,compile-src"
+ description="Compiles the Velocity test classes">
+ <javac srcdir="${build.test.src}"
+ destdir="${build.test.dest}"
+@@ -279,8 +254,6 @@
+
+ <!-- Don't use the run classpath, build using the exploded class tree -->
+ <classpath>
+- <path refid="velocity.build.classpath"/>
+- <path refid="velocity.test.classpath" />
+ <pathelement location="${build.dest}"/>
+ </classpath>
+ </javac>
+@@ -561,7 +534,7 @@
+ <!-- =================================================================== -->
+ <!-- Compiles the example code -->
+ <!-- =================================================================== -->
+- <target name="examples" depends="build-prepare,jar"
++ <target name="examples"
+ description="Compiles the Velocity Example code">
+
+ <echo>
+@@ -585,8 +558,7 @@
+ encoding="UTF-8"
+ debug="${debug}"
+ deprecation="${deprecation}"
+- optimize="${optimize}"
+- classpathref="velocity.run.classpath"/>
++ optimize="${optimize}"/>
+ </target>
+
+ <target name="examples-clean" depends="examples-clean-anakia">
+@@ -604,7 +576,7 @@
+ <!-- =================================================================== -->
+ <!-- Creates the API documentation -->
+ <!-- =================================================================== -->
+- <target name="javadocs" depends="prepare,build-prepare"
++ <target name="javadocs" depends="prepare"
+ description="Creates the Javadoc API documentation">
+
+ <mkdir dir="${build.javadoc}"/>
+@@ -620,8 +592,7 @@
+ doctitle="${name} ${version} API"
+ encoding="UTF-8"
+ docencoding="UTF-8"
+- bottom="Copyright &#169; 2000-${build.year} &lt;a href=&quot;http://www.apache.org/&quot;&gt;Apache Software Foundation&lt;/a&gt;. All Rights Reserved."
+- classpathref="velocity.build.classpath">
++ bottom="Copyright &#169; 2000-${build.year} &lt;a href=&quot;http://www.apache.org/&quot;&gt;Apache Software Foundation&lt;/a&gt;. All Rights Reserved.">
+
+ <link href="${javadocs.ref.jsdk}"/>
+ <link href="http://www.jdom.org/docs/apidocs"/>
+@@ -1024,12 +995,11 @@
+ <!-- Make HTML version of Velocity documentation -->
+ <!-- =================================================================== -->
+
+- <target name="docs" depends="build-prepare,jar"
++ <target name="docs" depends="jar"
+ description="Generates the Velocity HTML documentation">
+
+ <taskdef name="anakia"
+- classname="org.apache.velocity.anakia.AnakiaTask"
+- classpathref="velocity.run.classpath"/>
++ classname="org.apache.velocity.anakia.AnakiaTask"/>
+
+ <echo>
+ #######################################################
+@@ -1231,7 +1201,7 @@
+ <!-- =================================================================== -->
+ <!-- JUnit Tests for Velocity -->
+ <!-- =================================================================== -->
+- <target name="test-main" depends="build-prepare,compile-test"
++ <target name="test-main" depends="compile-test"
+ description="Run the Velocity testcases">
+
+ <!-- Require ant 1.7+ for Junit compatibility -->
+@@ -1264,8 +1234,6 @@
+
+ <!-- Don't use the run classpath, test using the exploded class tree -->
+ <classpath>
+- <path refid="velocity.build.classpath" />
+- <path refid="velocity.test.classpath" />
+ <pathelement path="${build.dest}"/>
+ <pathelement path="${build.test.dest}"/>
+ </classpath>
+diff --git a/build/testcases.xml b/build/testcases.xml
+index 06bb36e..f3749bc 100644
+--- a/build/testcases.xml
++++ b/build/testcases.xml
+@@ -36,12 +36,6 @@
+
+ <!-- Build classpath -->
+ <path id="velocity.test.classpath">
+- <fileset dir="${build.lib}">
+- <include name="**/*.jar"/>
+- </fileset>
+- <fileset dir="${build.test.lib}">
+- <include name="**/*.jar"/>
+- </fileset>
+ <pathelement location="${build.dest}"/>
+ <pathelement location="${build.test.dest}"/>
+ </path>
+--
+1.7.4
+
diff --git a/0004-JDBC-41-compat.patch b/0004-JDBC-41-compat.patch
new file mode 100644
index 000000000000..c137bacf421a
--- /dev/null
+++ b/0004-JDBC-41-compat.patch
@@ -0,0 +1,19 @@
+--- a/src/test/org/apache/velocity/test/sql/HsqlDataSource.java 2012-02-15 19:49:20.202936454 -0500
++++ b/src/test/org/apache/velocity/test/sql/HsqlDataSource.java 2012-02-15 19:52:35.062574871 -0500
+@@ -23,6 +23,7 @@
+ import java.sql.Connection;
+ import java.sql.DriverManager;
+ import java.sql.SQLException;
++import java.sql.SQLFeatureNotSupportedException;
+
+ import javax.sql.DataSource;
+
+@@ -73,5 +74,8 @@
+ public Object unwrap(final Class iface) throws SQLException {
+ throw new SQLException("Not implemented");
+ }
++ public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException {
++ throw new SQLFeatureNotSupportedException("getParentLogger() not supported");
++ }
+
+ }
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..297aa012a5d0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,74 @@
+# Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
+
+# Based on Fedora 18's packaging
+
+pkgname=velocity
+pkgver=1.7
+pkgrel=1
+pkgdesc="Free open-source templating engine"
+arch=(any)
+url="http://velocity.apache.org/"
+license=(Apache)
+depends=(#hsqldb-java-updated
+ jakarta-oro
+ java-bcel
+ java-commons-collections
+ java-commons-logging
+ java-commons-lang
+ java-jdom1
+ java-servlet3.0-tomcat
+ junit
+ log4j
+ werken-xpath)
+makedepends=(antlr2 apache-ant)
+source=("http://www.us.apache.org/dist/velocity/engine/${pkgver}/velocity-${pkgver}.tar.gz"
+ 0001-Remove-avalon-logkit.patch
+ 0003-Use-system-jars.patch
+ 0004-JDBC-41-compat.patch)
+md5sums=('6af13ea297dee7ddbabeaa8e3963c184')
+sha1sums=('513c8a8c2aa4459d777a53634fc331bfd986e033')
+# Patches
+md5sums+=('3de9a9b9637520fd19d157549f3f0830'
+ '377f16d1baab0ca30c69fb036e7eca30'
+ 'b1a47ba7da5b3e2c7e6e7cc0fc4cb920')
+sha1sums+=('effe4fb6ca27ba90978f1978865953d2ecb1904a'
+ '9365f137bf47934daf606efa24f0a3ea2751cc36'
+ 'e07d06e5c9a08de4c043a6e67986884681559114')
+
+build() {
+ cd "${pkgname}-${pkgver}"
+
+ # Patch from Fedora to use system jar files
+ patch -p1 -i ../0003-Use-system-jars.patch
+
+ find . -name '*.jar' -o -name '*.class' -delete
+
+ # Remove dependency on unpackaged avalon-logkit
+ patch -p1 -i ../0001-Remove-avalon-logkit.patch
+ rm -v src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
+ rm -v src/java/org/apache/velocity/runtime/log/AvalonLogSystem.java
+ rm -v src/java/org/apache/velocity/runtime/log/VelocityFormatter.java
+
+ patch -p1 -i ../0004-JDBC-41-compat.patch
+
+ # Servlet test needs to be ported to the new API
+ rm -v src/test/org/apache/velocity/test/VelocityServletTestCase.java
+
+ # Not working tests
+ rm -v src/test/org/apache/velocity/test/ClassloaderChangeTestCase.java
+
+ export CLASSPATH="/usr/share/java/commons-lang/commons-lang.jar:/usr/share/java/log4j.jar:/usr/share/java/commons-collections/commons-collections.jar:/usr/share/java/servlet3.0-tomcat/servlet-api-3.0.jar:/usr/share/java/jdom/jdom.jar:/usr/share/java/jakarta-oro.jar:/usr/share/java/werken.xpath.jar:/usr/share/java/commons-logging/commons-logging-api.jar:/usr/share/java/hsqldb.jar:/usr/share/java/antlr2.jar"
+ ant -buildfile build/build.xml -Dbuild.sysclasspath=first jar test
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+
+ install -dm755 "${pkgdir}/usr/share/java/"
+ install -m644 bin/${pkgname}-${pkgver}.jar \
+ "${pkgdir}/usr/share/java/${pkgname}.jar"
+
+ install -dm755 "${pkgdir}/usr/share/apache-ant/lib/"
+ install -m644 bin/${pkgname}-${pkgver}.jar \
+ "${pkgdir}/usr/share/apache-ant/lib/${pkgname}.jar"
+}