diff --git a/Allow-javascript-in-javadoc.patch b/Allow-javascript-in-javadoc.patch new file mode 100644 index 0000000..f9e3260 --- /dev/null +++ b/Allow-javascript-in-javadoc.patch @@ -0,0 +1,17 @@ +From: Michael Simacek +Date: Wed, 1 Feb 2017 13:10:03 +0100 +Subject: [PATCH] Allow javascript in javadoc + + +diff --git a/fop/build.xml b/fop/build.xml +index a4a921e1c..a30d95130 100644 +--- a/fop/build.xml ++++ b/fop/build.xml +@@ -1009,6 +1009,7 @@ NOTE: + overview="${src.java.dir}/org/apache/fop/overview.html" + maxmemory="256M"> + ++ +
+
+ diff --git a/Disable-javadoc-doclint.patch b/Disable-javadoc-doclint.patch new file mode 100644 index 0000000..f61daa7 --- /dev/null +++ b/Disable-javadoc-doclint.patch @@ -0,0 +1,17 @@ +From: Mikolaj Izdebski +Date: Thu, 14 May 2015 06:26:09 +0200 +Subject: [PATCH] Disable javadoc doclint + + +diff --git a/fop/build.xml b/fop/build.xml +index 3110bf00d..a4a921e1c 100644 +--- a/fop/build.xml ++++ b/fop/build.xml +@@ -1008,6 +1008,7 @@ NOTE: + bottom="Copyright ${year} The Apache Software Foundation. All Rights Reserved." + overview="${src.java.dir}/org/apache/fop/overview.html" + maxmemory="256M"> ++ +
+
+ diff --git a/LICENSE-1.1.txt b/LICENSE-1.1.txt new file mode 100644 index 0000000..de6706f --- /dev/null +++ b/LICENSE-1.1.txt @@ -0,0 +1,58 @@ +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2000 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * Portions of this software are based upon public domain software + * originally written at the National Center for Supercomputing Applications, + * University of Illinois, Urbana-Champaign. + */ + diff --git a/Non-free-colour-profile-was-removed.patch b/Non-free-colour-profile-was-removed.patch new file mode 100644 index 0000000..48a8abb --- /dev/null +++ b/Non-free-colour-profile-was-removed.patch @@ -0,0 +1,22 @@ +From: Peter Lemenkov +Date: Thu, 17 May 2018 16:26:24 +0300 +Subject: [PATCH] Non-free colour profile was removed + +See commit e0d614e3ab7019a7ac97471ebcc7d5b173abff99 for further details. + +Signed-off-by: Peter Lemenkov + +diff --git a/README b/README +index cc83c7216..f9231ba92 100644 +--- a/README ++++ b/README +@@ -42,9 +42,6 @@ Legal information on libraries used by Apache FOP can be found in the + + Here is a list of files included in Apache FOP but not published under Apache + License version 2.0: +-- sRGB IEC61966-2.1 color profile +- File: src/java/org/apache/fop/pdf/sRGB Color Space Profile.icm +- Info: src/java/org/apache/fop/pdf/sRGB Color Space Profile.icm.LICENSE.txt + - K3 3 of 9 barcode font (TrueType) + File: examples/fo/advanced/K3.TTF + Info: examples/fo/advanced/K3.README diff --git a/Port-to-QDox-2.0.patch b/Port-to-QDox-2.0.patch new file mode 100644 index 0000000..c395e39 --- /dev/null +++ b/Port-to-QDox-2.0.patch @@ -0,0 +1,145 @@ +From: Michael Simacek +Date: Tue, 17 Mar 2015 10:59:41 +0100 +Subject: [PATCH] Port to QDox 2.0 + + +diff --git a/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java b/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java +index 2351fc870..64cd7edf0 100644 +--- a/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java ++++ b/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java +@@ -21,6 +21,7 @@ package org.apache.fop.tools; + + import java.io.File; + import java.io.IOException; ++import java.util.Collection; + import java.util.Collections; + import java.util.List; + import java.util.Map; +@@ -31,14 +32,11 @@ import org.apache.fop.events.model.EventModel; + import org.apache.fop.events.model.EventProducerModel; + import org.apache.fop.events.model.EventSeverity; + +-import com.thoughtworks.qdox.JavaDocBuilder; +-import com.thoughtworks.qdox.model.DefaultDocletTagFactory; ++import com.thoughtworks.qdox.JavaProjectBuilder; + import com.thoughtworks.qdox.model.DocletTag; +-import com.thoughtworks.qdox.model.DocletTagFactory; + import com.thoughtworks.qdox.model.JavaClass; + import com.thoughtworks.qdox.model.JavaMethod; + import com.thoughtworks.qdox.model.JavaParameter; +-import com.thoughtworks.qdox.model.Type; + + /** + * Finds EventProducer interfaces and builds the event model for them. +@@ -61,22 +59,12 @@ class EventProducerCollector { + PRIMITIVE_MAP = Collections.unmodifiableMap(m); + } + +- private DocletTagFactory tagFactory; + private List models = new java.util.ArrayList(); + + /** + * Creates a new EventProducerCollector. + */ + EventProducerCollector() { +- this.tagFactory = createDocletTagFactory(); +- } +- +- /** +- * Creates the {@link DocletTagFactory} to be used by the collector. +- * @return the doclet tag factory +- */ +- protected DocletTagFactory createDocletTagFactory() { +- return new DefaultDocletTagFactory(); + } + + /** +@@ -89,9 +77,9 @@ class EventProducerCollector { + */ + public boolean scanFile(File src) + throws IOException, EventConventionException, ClassNotFoundException { +- JavaDocBuilder builder = new JavaDocBuilder(this.tagFactory); ++ JavaProjectBuilder builder = new JavaProjectBuilder(); + builder.addSource(src); +- JavaClass[] classes = builder.getClasses(); ++ Collection classes = builder.getClasses(); + boolean eventProducerFound = false; + for (JavaClass clazz : classes) { + if (clazz.isInterface() && implementsInterface(clazz, CLASSNAME_EVENT_PRODUCER)) { +@@ -103,7 +91,7 @@ class EventProducerCollector { + } + + private boolean implementsInterface(JavaClass clazz, String intf) { +- JavaClass[] classes = clazz.getImplementedInterfaces(); ++ List classes = clazz.getInterfaces(); + for (JavaClass cl : classes) { + if (cl.getFullyQualifiedName().equals(intf)) { + return true; +@@ -121,7 +109,7 @@ class EventProducerCollector { + protected void processEventProducerInterface(JavaClass clazz) + throws EventConventionException, ClassNotFoundException { + EventProducerModel prodMeta = new EventProducerModel(clazz.getFullyQualifiedName()); +- JavaMethod[] methods = clazz.getMethods(true); ++ List methods = clazz.getMethods(true); + for (JavaMethod method : methods) { + EventMethodModel methodMeta = createMethodModel(method); + prodMeta.addMethod(methodMeta); +@@ -133,20 +121,20 @@ class EventProducerCollector { + + private EventMethodModel createMethodModel(JavaMethod method) + throws EventConventionException, ClassNotFoundException { +- JavaClass clazz = method.getParentClass(); ++ JavaClass clazz = method.getDeclaringClass(); + //Check EventProducer conventions +- if (!method.getReturnType().isVoid()) { ++ if (!method.getReturns().isVoid()) { + throw new EventConventionException("All methods of interface " + + clazz.getFullyQualifiedName() + " must have return type 'void'!"); + } + String methodSig = clazz.getFullyQualifiedName() + "." + method.getCallSignature(); +- JavaParameter[] params = method.getParameters(); +- if (params.length < 1) { ++ List params = method.getParameters(); ++ if (params.size() < 1) { + throw new EventConventionException("The method " + methodSig + + " must have at least one parameter: 'Object source'!"); + } +- Type firstType = params[0].getType(); +- if (firstType.isPrimitive() || !"source".equals(params[0].getName())) { ++ JavaClass firstType = params.get(0).getJavaClass(); ++ if (firstType.isPrimitive() || !"source".equals(params.get(0).getName())) { + throw new EventConventionException("The first parameter of the method " + methodSig + + " must be: 'Object source'!"); + } +@@ -161,12 +149,12 @@ class EventProducerCollector { + } + EventMethodModel methodMeta = new EventMethodModel( + method.getName(), severity); +- if (params.length > 1) { +- for (int j = 1, cj = params.length; j < cj; j++) { +- JavaParameter p = params[j]; ++ if (params.size() > 1) { ++ for (int j = 1, cj = params.size(); j < cj; j++) { ++ JavaParameter p = params.get(j); + Class type; +- JavaClass pClass = p.getType().getJavaClass(); +- if (p.getType().isPrimitive()) { ++ JavaClass pClass = p.getJavaClass(); ++ if (pClass.isPrimitive()) { + type = PRIMITIVE_MAP.get(pClass.getName()); + if (type == null) { + throw new UnsupportedOperationException( +@@ -179,10 +167,10 @@ class EventProducerCollector { + methodMeta.addParameter(type, p.getName()); + } + } +- Type[] exceptions = method.getExceptions(); +- if (exceptions != null && exceptions.length > 0) { ++ List exceptions = method.getExceptions(); ++ if (exceptions != null && exceptions.size() > 0) { + //We only use the first declared exception because that is always thrown +- JavaClass cl = exceptions[0].getJavaClass(); ++ JavaClass cl = exceptions.get(0); + methodMeta.setExceptionClass(cl.getFullyQualifiedName()); + methodMeta.setSeverity(EventSeverity.FATAL); //In case it's not set in the comments + } diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 7e6f78d..0000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# fop - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index c22c926..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# fop - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/batik-pdf-MANIFEST.MF b/batik-pdf-MANIFEST.MF new file mode 100644 index 0000000..13ef52c --- /dev/null +++ b/batik-pdf-MANIFEST.MF @@ -0,0 +1,20 @@ +Manifest-Version: 1.0 +Main-Class: org.apache.fop.cli.Main +Bundle-RequiredExecutionEnvironment: J2SE-1.4 +Bundle-SymbolicName: org.apache.batik.pdf +Import-Package: org.apache.batik.bridge,org.apache.batik.dom.svg,org.a + pache.batik.dom.util,org.apache.batik.ext.awt,org.apache.batik.ext.aw + t.g2d,org.apache.batik.gvt,org.apache.batik.gvt.renderer,org.apache.b + atik.gvt.text,org.apache.batik.transcoder,org.apache.batik.transcoder + .image,org.apache.batik.transcoder.keys,org.apache.batik.util,org.w3c + .dom +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-Localization: plugin +Bundle-Version: 1.6.0.v200806031500 +Bundle-Vendor: %Bundle-Vendor +Export-Package: org.apache.fop.apps,org.apache.fop.fo,org.apache.fop.f + onts,org.apache.fop.fonts.apps,org.apache.fop.fonts.base14,org.apache + .fop.fonts.truetype,org.apache.fop.fonts.type1,org.apache.fop.image,o + rg.apache.fop.image.analyser,org.apache.fop.pdf,org.apache.fop.render + .pdf,org.apache.fop.render.ps,org.apache.fop.svg,org.apache.fop.util diff --git a/fop-2.2-src.tar.gz b/fop-2.2-src.tar.gz new file mode 100644 index 0000000..23285c0 Binary files /dev/null and b/fop-2.2-src.tar.gz differ diff --git a/fop-2.2.pom b/fop-2.2.pom new file mode 100644 index 0000000..92fa1e4 --- /dev/null +++ b/fop-2.2.pom @@ -0,0 +1,155 @@ + + + + + 4.0.0 + org.apache.xmlgraphics + fop + jar + Apache FOP + 2.2 + http://xmlgraphics.apache.org/fop/ + Apache FOP (Formatting Objects Processor) is the world's first print formatter driven by XSL formatting objects (XSL-FO) and the world's first output independent formatter. It is a Java application that reads a formatting object (FO) tree and renders the resulting pages to a specified output. Output formats currently supported include PDF, PCL, PS, AFP, TIFF, PNG, SVG, XML (area tree representation), Print, AWT and TXT. The primary output target is PDF. + 1999 + + + FOP Users List + fop-users-subscribe@xmlgraphics.apache.org + fop-users-unsubscribe@xmlgraphics.apache.org + http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/ + + + FOP Developer List + fop-dev-subscribe@xmlgraphics.apache.org + fop-dev-unsubscribe@xmlgraphics.apache.org + http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-dev/ + + + FOP Commit List + fop-commits-subscribe@xmlgraphics.apache.org + fop-commits-unsubscribe@xmlgraphics.apache.org + http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/ + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + scm:svn:http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk + scm:svn:https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk + http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/?root=Apache-SVN + + + Apache Software Foundation + http://www.apache.org/ + + + org.apache + apache + 7 + + + + + org.apache.xmlgraphics + xmlgraphics-commons + 2.1 + + + org.apache.xmlgraphics + batik-svg-dom + 1.8 + + + org.apache.xmlgraphics + batik-bridge + 1.8 + + + org.apache.xmlgraphics + batik-awt-util + 1.8 + + + org.apache.xmlgraphics + batik-gvt + 1.8 + + + org.apache.xmlgraphics + batik-transcoder + 1.8 + + + org.apache.xmlgraphics + fop + + + + + org.apache.xmlgraphics + batik-extension + 1.8 + + + org.apache.xmlgraphics + batik-ext + 1.8 + + + + commons-logging + commons-logging + 1.0.4 + + + commons-io + commons-io + 1.3.1 + + + org.apache.avalon.framework + avalon-framework-api + 4.3.1 + + + org.apache.avalon.framework + avalon-framework-impl + 4.3.1 + + + javax.servlet + servlet-api + 2.2 + provided + + + xalan + xalan + 2.7.2 + provided + + + diff --git a/fop.script b/fop.script new file mode 100644 index 0000000..0fdccb8 --- /dev/null +++ b/fop.script @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Fop script +# JPackage Project + +# Source functions library +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi + +# Load system-wide configuration +if [ -f /etc/fop.conf ] ; then + . /etc/fop.conf +fi + +# Load user configuration +if [ -f $HOME/.foprc ] ; then + . $HOME/.foprc +fi + +# Rest of the configuration +MAIN_CLASS=org.apache.fop.cli.Main +BASE_JARS="commons-io batik-all avalon-framework-api avalon-framework-impl xmlgraphics-commons xml-commons-apis-ext commons-logging fontbox fop" +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/fop.spec b/fop.spec new file mode 100644 index 0000000..498a957 --- /dev/null +++ b/fop.spec @@ -0,0 +1,86 @@ +Name: fop +Version: 2.2 +Release: 4 +Summary: Formatter for printing XSL-driven XML Files +License: ASL 2.0 and ASL 1.1 +URL: https://xmlgraphics.apache.org/fop +Source0: https://www.apache.org/dist/xmlgraphics/%{name}/source/%{name}-%{version}-src.tar.gz +Source1: https://www.apache.org/licenses/LICENSE-1.1.txt +Source2: batik-pdf-MANIFEST.MF +Source3: %{name}.script +Source4: https://maven.ibiblio.org/maven2/org/apache/xmlgraphics/%{name}/%{version}/%{name}-%{version}.pom + +Patch0001: Disable-javadoc-doclint.patch +Patch0002: Port-to-QDox-2.0.patch +Patch0003: Allow-javascript-in-javadoc.patch +Patch0004: Non-free-colour-profile-was-removed.patch +BuildRequires: ant apache-commons-io apache-commons-logging avalon-framework +BuildRequires: batik fontbox javapackages-local junit qdox servlet +BuildRequires: xmlunit xmlgraphics-commons >= 1.5 + +BuildArch: noarch + +Requires: apache-commons-io >= 1.2 apache-commons-logging >= 1.0.4 +Requires: avalon-framework >= 4.1.4 batik >= 1.7 fontbox +Requires: java jakarta-commons-httpclient xalan-j2 >= 2.7.0 +Requires: xmlgraphics-commons >= 1.5 xml-commons-apis >= 1.3.04 + +Provides: fop-javadoc = %{version}-%{release} +Obsoletes: fop-javadoc < %{version}-%{release} + +%description +FOP (Formatting Objects Processor) is a print formatter driven by XSL +formatting objects (XSL-FO) and an output independent formatter. It +is a Java application that reads a formatting object (FO) tree and +renders the resulting pages to a specified output. Output formats +currently supported include PDF, PS, PCL, AFP, XML (area tree +representation), Print, AWT and PNG, and to a lesser extent, RTF and +TXT. The primary output target is PDF. + +%prep +%autosetup -p1 + +cp %{SOURCE1} LICENSE-1.1 +rm -f fop/lib/*.jar fop/lib/build/*.jar +ln -s %{_javadir}/qdox.jar fop/lib/build/qdox.jar + +%build +export CLASSPATH=$(build-classpath apache-commons-logging apache-commons-io \ + avalon-framework-api avalon-framework-impl batik-all batik/batik-svg-dom \ + fontbox servlet objectweb-asm/asm-all xml-commons-apis \ + xml-commons-apis-ext xmlgraphics-commons xmlunit) +export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 +ant -f fop/build.xml jar-main transcoder-pkg javadocs + + +%install +jar ufm fop/build/%{name}.jar %{SOURCE2} + + +install -D -p -m 644 fop/build/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar +install -p -m 644 fop/build/%{name}-transcoder.jar %{buildroot}%{_javadir}/pdf-transcoder.jar + +install -D -p -m 755 %{SOURCE3} %{buildroot}%{_bindir}/fop + +install -d -m 755 %{buildroot}%{_datadir}/%{name}/conf +cp -rp fop/conf/* %{buildroot}%{_datadir}/%{name}/conf + +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -rp fop/build/javadocs/* %{buildroot}%{_javadocdir}/%{name} + +install -D -p -m 644 %{SOURCE4} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom +%add_maven_depmap JPP-%{name}.pom %{name}.jar + + +%files -f .mfiles +%doc README NOTICE +%doc %{_javadocdir}/%{name} +%license LICENSE LICENSE-1.1 +%{_bindir}/fop +%{_datadir}/%{name} +%{_javadir}/pdf-transcoder.jar + + +%changelog +* Tue Dec 10 2019 huyan - 2.2-4 +- Package Initialization