Skip to content
Snippets Groups Projects
Commit e6902c57 authored by Thierry Thomas's avatar Thierry Thomas
Browse files

textproc/apache-xmlbeans: adding XMLBeans, Java classes for XML

Note: this is release 3.1.0. The latest release is 5.0.3, but it is not
yet compatible with XLConnect (math/R-cran-XLConnect).
parent ec501875
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,7 @@
SUBDIR += apache-commons-digester
SUBDIR += apache-poi
SUBDIR += apache-solr
SUBDIR += apache-xmlbeans
SUBDIR += apertium
SUBDIR += apertium-eng
SUBDIR += artha
......
# Created by: Thierry Thomas <thierry@pompo.net>
PORTNAME= xmlbeans
PORTVERSION= 3.1.0 # Do not upgrade without checking compatibility with math/R-cran-XLConnect
CATEGORIES= textproc java
MASTER_SITES= https://archive.apache.org/dist/poi/xmlbeans/release/bin/:xb \
https://repo1.maven.org/maven2/org/apache/poi/ooxml-schemas/${SCHEMAS_VER}/:sch
PKGNAMEPREFIX= apache-
DISTFILES= ${PORTNAME}-bin-${PORTVERSION}${EXTRACT_SUFX}:xb \
ooxml-schemas-${SCHEMAS_VER}.jar:sch
EXTRACT_ONLY= ${PORTNAME}-bin-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= thierry@FreeBSD.org
COMMENT= Java classes for XML
LICENSE= APACHE20
USES= tar:tgz
USE_JAVA= yes
JAVA_VERSION= 8+
SCHEMAS_VER= 1.4
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
NO_BUILD= yes
NO_ARCH= yes
SUB_FILES= pkg-message
OTHERDOCS= LICENSE.txt NOTICE.txt README.txt
PORTDOCS= *
PORTEXAMPLES= *
OPTIONS_DEFINE= DOCS EXAMPLES
pre-configure:
${REINPLACE_CMD} -e 's|%%JAVAJARDIR%%|${JAVAJARDIR}|' \
${WRKSRC}/bin/_setlib
${SED} -i '' -e 's|xbean.jar|xmlbeans.jar|;s|:$$XMLBEANS_LIB/xmlbeans-qname.jar||;s|:$XMLBEANS_LIB/jsr173_1.0_api.jar||;s|:$XMLBEANS_LIB/resolver.jar||' \
${WRKSRC}/bin/*
do-install:
@${MKDIR} ${STAGEDIR}${JAVAJARDIR} \
${STAGEDIR}${PREFIX}/bin \
${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/lib/${PORTNAME}-${PORTVERSION}.jar \
${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar
${INSTALL_DATA} ${DISTDIR}/ooxml-schemas-${SCHEMAS_VER}.jar \
${STAGEDIR}${JAVAJARDIR}/ooxml-schemas.jar
${FIND} ${WRKSRC}/bin ! -name "*.cmd" -type f -exec \
${INSTALL_SCRIPT} {} ${STAGEDIR}${PREFIX}/bin \;
(cd ${WRKSRC} && ${COPYTREE_SHARE} schemas ${STAGEDIR}${DATADIR})
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC} && ${INSTALL_DATA} ${OTHERDOCS} ${STAGEDIR}${DOCSDIR})
(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
do-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(cd ${WRKSRC}/samples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
.include <bsd.port.mk>
TIMESTAMP = 1651435086
SHA256 (xmlbeans-bin-3.1.0.tgz) = abc4883f38b6147090c5995a31ec71b5c8d8207e03665acadc076c1fc21c8b32
SIZE (xmlbeans-bin-3.1.0.tgz) = 6509656
SHA256 (ooxml-schemas-1.4.jar) = f8256738040d66ccb677814873674c1212464e00af491e9df490fc45decbd932
SIZE (ooxml-schemas-1.4.jar) = 16356588
--- bin/_setlib.orig 2019-02-25 00:31:32 UTC
+++ bin/_setlib
@@ -19,14 +19,10 @@ if [ -z "$XMLBEANS_HOME" ]; then
XMLBEANS_HOME=`dirname $0`/..
fi
-XMLBEANS_LIB=
-if [ -f "$XMLBEANS_HOME"/build/lib/xbean.jar ]; then
- XMLBEANS_LIB=$XMLBEANS_HOME/build/lib
+if [ -f %%JAVAJARDIR%%/xmlbeans.jar ]; then
+ XMLBEANS_LIB=%%JAVAJARDIR%%
fi
-if [ -f "$XMLBEANS_HOME"/lib/xbean.jar ]; then
- XMLBEANS_LIB=$XMLBEANS_HOME/lib
-fi
if [ -z "$XMLBEANS_LIB" ]; then
- echo "ERROR: Could not find xbean.jar, try set XMLBEANS_LIB to the directory containing xbean.jar"
+ echo "ERROR: Could not find xmlbeans.jar, try set XMLBEANS_LIB to the directory containing xmlbeans.jar"
fi
To use XMLBeans you might have to define the following variables:
export XMLBEANS_HOME=%%JAVAJARDIR%%
export CLASSPATH=%%JAVAJARDIR%%/xmlbeans.jar:$CLASSPATH
XMLBeans is a technology for accessing XML by binding it to Java types. XMLBeans
provides several ways to get at the XML, including:
- Through XML schema that has been compiled to generate Java types that
represent schema types. In this way, you can access instances of the schema
through JavaBeans-style accessors after the fashion of "getFoo" and "setFoo".
The XMLBeans API also allows you to reflect into the XML schema itself through
an XML Schema Object model.
- A cursor model through which you can traverse the full XML infoset.
- Support for XML DOM.
This port contains also the OOXML Schemas, XmlBeans generated from the Ecma
supplied xsds.
See https://poi.apache.org/help/faq.html#faq-N10025 .
WWW: https://xmlbeans.apache.org/
bin/_setlib
bin/dumpxsb
bin/inst2xsd
bin/scomp
bin/sdownload
bin/sfactor
bin/svalidate
bin/validate
bin/xpretty
bin/xsd2inst
bin/xsdtree
bin/xstc
%%JAVAJARDIR%%/ooxml-schemas.jar
%%JAVAJARDIR%%/xmlbeans.jar
%%DATADIR%%/schemas/easypo.xsd
%%DATADIR%%/schemas/easypo.xsdconfig
%%DATADIR%%/schemas/nameworld.xsd
%%DATADIR%%/schemas/numerals.xsd
%%DATADIR%%/schemas/s4s/XML.xsd
%%DATADIR%%/schemas/s4s/XMLSchema.xsd
%%PORTEXAMPLES%%@dir %%EXAMPLESDIR%%/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/employees/impl
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment