1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
|
<?xml version="1.0"?>
<!--
Copyright 1999-2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project default="transcoder-pkg" basedir=".">
<!-- used to set values for testing etc. -->
<!-- build-local.properties is not stored in CVS and overrides values from build.properties -->
<property file="${basedir}/build-local.properties"/>
<property file="${basedir}/build.properties"/>
<patternset id="exclude-jimi">
<exclude name="org/apache/fop/image/JimiImage.java" unless="jimi.present"/>
</patternset>
<patternset id="exclude-jai">
<exclude name="org/apache/fop/image/JAIImage.java" unless="jai.present"/>
</patternset>
<patternset id="exclude-jce-dependencies">
<exclude name="org/apache/fop/pdf/PDFEncryptionJCE.java" unless="jce.present"/>
</patternset>
<patternset id="base-sources">
<include name="**/*.java"/>
<exclude name="**/*${ignore_this}"/>
</patternset>
<!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init" depends="init-avail">
<tstamp/>
<property name="Name" value="Fop"/>
<property name="name" value="fop"/>
<property name="NAME" value="FOP"/>
<property name="version" value="1.0dev"/>
<filter token="version" value="${version}"/>
<property name="year" value="1999-2005"/>
<echo message="------------------- ${Name} ${version} [${year}] ----------------"/>
<echo message="See build.properties and build-local.properties for additional build settings"/>
<property name="debug" value="on"/>
<property name="optimize" value="off"/>
<property name="deprecation" value="on"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="src.java" value="${src.dir}/java"/>
<property name="docs.dir" value="${basedir}/docs"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="packages" value="org.apache.fop.*"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="build.src" value="${build.dir}/src"/>
<property name="build.dest" value="${build.dir}/classes"/>
<property name="build.docs" value="${build.dir}/docs"/>
<property name="build.javadocs" value="${build.dir}/javadocs"/>
<property name="dist.bin.dir" value="${basedir}/dist-bin"/>
<property name="dist.src.dir" value="${basedir}/dist-src"/>
<property name="dist.bin.result.dir" value="${dist.bin.dir}/${Name}-${version}"/>
<property name="dist.src.result.dir" value="${dist.src.dir}/${Name}-${version}"/>
<property name="properties.dir" value="org/apache/fop/fo/properties"/>
<property name="fonts.dir" value="org/apache/fop/fonts/base14"/>
<property name="replacestring" value="org/apache/fop"/>
<property name="ignore_this" value="ignore_this.dummy"/>
<property name="jimi" value="JimiImage.java"/>
<property name="jai" value="JAIImage.java"/>
</target>
<target name="init-avail">
<echo message="${ant.version}"/>
<available property="jimi.present" classname="com.sun.jimi.core.Jimi"/>
<condition property="jimi.message" value="Jimi Support PRESENT">
<equals arg1="${jimi.present}" arg2="true"/>
</condition>
<condition property="jimi.message" value="Jimi Support NOT Present">
<not>
<equals arg1="${jimi.present}" arg2="true"/>
</not>
</condition>
<echo message="${jimi.message}"/>
<available property="jai.present" classname="javax.media.jai.JAI"/>
<condition property="jai.message" value="JAI Support PRESENT">
<equals arg1="${jai.present}" arg2="true"/>
</condition>
<condition property="jai.message" value="JAI Support NOT Present">
<not>
<equals arg1="${jai.present}" arg2="true"/>
</not>
</condition>
<echo message="${jai.message}"/>
<available property="jce.present" classname="javax.crypto.Cipher"/>
<condition property="jce.message" value="JCE Support PRESENT">
<equals arg1="${jce.present}" arg2="true"/>
</condition>
<condition property="jce.message" value="JCE Support NOT Present">
<not>
<equals arg1="${jce.present}" arg2="true"/>
</not>
</condition>
<echo message="${jce.message}"/>
<available property="jdk14.present" classname="java.lang.CharSequence"/>
</target>
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
<target name="compile" depends="init">
<echo message="Compiling the sources "/>
<!-- create directories -->
<mkdir dir="${build.dest}"/>
<mkdir dir="${build.src}"/>
<javac destdir="${build.dest}" debug="${debug}" deprecation="${deprecation}" optimize="${optimize}" nowarn="true">
<src path="${src.java}"/>
<patternset refid="exclude-jce-dependencies"/>
<patternset refid="exclude-jai"/>
<patternset refid="exclude-jimi"/>
<patternset refid="base-sources"/>
<classpath>
<pathelement location="/usr/share/java/xercesImpl.jar"/>
<pathelement location="/usr/share/java/xalan2.jar"/>
<pathelement location="/usr/share/java/xml-apis.jar"/>
<pathelement location="/usr/share/java/avalon-framework.jar"/>
<pathelement location="/usr/share/java/commons-logging.jar"/>
<pathelement location="/usr/share/java/commons-logging-api.jar"/>
<pathelement location="/usr/share/java/commons-io.jar"/>
<pathelement location="../batik-1.6/lib/batik-all.jar"/>
</classpath>
</javac>
</target>
<target name="transcoder-pkg" depends="compile" description="Generates the jar for the transcoder package for Batik">
<echo message="Creating the jar file ${build.dir}/fop-transcoder.jar"/>
<property name="fop-transcoder.name" value="FOP Transcoder Package"/>
<property name="fop-transcoder.version" value="1.0beta2"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
<patternset id="transcoder-classes">
<!-- General classes -->
<patternset>
<include name="org/apache/fop/apps/Fop.class"/>
<include name="org/apache/fop/apps/FOPException.class"/>
<include name="org/apache/fop/fo/Constants.class"/>
<include name="org/apache/fop/fo/FOTreeBuilder.class"/>
<include name="org/apache/fop/area/AreaTreeControl*"/>
<include name="org/apache/fop/svg/**"/>
<include name="org/apache/fop/fonts/**"/>
<!--include name="org/apache/fop/layout/Font*.class"/-->
<include name="org/apache/fop/image/FopImag*.class"/>
<include name="org/apache/fop/image/Jpeg*"/>
<include name="org/apache/fop/image/EPS*"/>
<include name="org/apache/fop/image/Abstract*"/>
<include name="org/apache/fop/image/analyser/*.class"/>
<include name="org/apache/fop/util/CMYKColorSpace*.class"/>
<include name="org/apache/fop/util/ASCII*.class"/>
<include name="org/apache/fop/util/*OutputStream.class"/>
<include name="org/apache/fop/util/Finalizable.class"/>
</patternset>
<!-- PDF transcoder -->
<patternset>
<include name="org/apache/fop/render/pdf/**"/>
<exclude name="org/apache/fop/render/pdf/PDFRenderer.class"/>
<exclude name="org/apache/fop/render/pdf/PDFXMLHandler*"/>
<include name="org/apache/fop/pdf/**"/>
</patternset>
<!-- PS transcoder -->
<patternset>
<include name="org/apache/fop/render/ps/**"/>
<exclude name="org/apache/fop/render/pdf/PSRenderer.class"/>
<exclude name="org/apache/fop/render/pdf/PSXMLHandler*"/>
</patternset>
</patternset>
<!-- lean transcoder jar -->
<jar jarfile="${build.dir}/fop-transcoder.jar">
<fileset dir="${build.dest}">
<patternset refid="transcoder-classes"/>
</fileset>
<manifest>
<attribute name="Implementation-Title" value="${fop-transcoder.name}"/>
<attribute name="Implementation-Version" value="${fop-transcoder.version}"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation (http://xml.apache.org/fop/)"/>
<attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}])"/>
</manifest>
</jar>
</target>
</project>
|