aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/p5-XML-XML2JSON
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2011-07-14 14:50:52 +0800
committersunpoet <sunpoet@FreeBSD.org>2011-07-14 14:50:52 +0800
commitc406d978f86de720d5e1f7af42fcbf30a553f7cb (patch)
tree64df31c817c6c0ab2ecdfb054f6c424b5a938b96 /textproc/p5-XML-XML2JSON
parentb67dc728200cba89d2a07801bef8b211f79bb121 (diff)
downloadfreebsd-ports-gnome-c406d978f86de720d5e1f7af42fcbf30a553f7cb.tar.gz
freebsd-ports-gnome-c406d978f86de720d5e1f7af42fcbf30a553f7cb.tar.zst
freebsd-ports-gnome-c406d978f86de720d5e1f7af42fcbf30a553f7cb.zip
- Add p5-XML-XML2JSON 0.05
XML::XML2JSON is a Perl module to convert XML to JSON (and JSON to XML) using the following rules from Google (http://code.google.com/apis/gdata/json.html): Basic: - The feed is represented as a JSON object; each nested element or attribute is represented as a name/value property of the object. - Attributes are converted to String properties. - Child elements are converted to Object properties. - Elements that may appear more than once are converted to Array properties. - Text values of tags are converted to $t properties. Namespace: - If an element has a namespace alias, the alias and element are concatenated using "$". For example, ns:element becomes ns$element. XML: - XML version and encoding attributes are converted to version and encoding attributes of the root element, respectively. WWW: http://search.cpan.org/dist/XML-XML2JSON/
Diffstat (limited to 'textproc/p5-XML-XML2JSON')
-rw-r--r--textproc/p5-XML-XML2JSON/Makefile51
-rw-r--r--textproc/p5-XML-XML2JSON/distinfo2
-rw-r--r--textproc/p5-XML-XML2JSON/pkg-descr20
-rw-r--r--textproc/p5-XML-XML2JSON/pkg-plist5
4 files changed, 78 insertions, 0 deletions
diff --git a/textproc/p5-XML-XML2JSON/Makefile b/textproc/p5-XML-XML2JSON/Makefile
new file mode 100644
index 000000000000..85e61957a223
--- /dev/null
+++ b/textproc/p5-XML-XML2JSON/Makefile
@@ -0,0 +1,51 @@
+# New ports collection makefile for: p5-XML-XML2JSON
+# Date created: 2011-07-11
+# Whom: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= XML-XML2JSON
+PORTVERSION= 0.05
+CATEGORIES= textproc perl5
+MASTER_SITES= CPAN
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Convert XML into JSON (and back again) using XML::LibXML
+
+RUN_DEPENDS= p5-XML-LibXML>=1.59:${PORTSDIR}/textproc/p5-XML-LibXML
+
+# the order of options follows the search order of JSON module by XML::XML2JSON
+OPTIONS= JSON_SYCK "Use JSON::Syck" on \
+ JSON_XS "Use JSON::XS" off \
+ JSON "Use JSON" off \
+ JSON_DWIW "Use JSON::DWIW" off
+
+PERL_CONFIGURE= yes
+
+MAN3= XML::XML2JSON.3
+
+.include <bsd.port.options.mk>
+
+.if defined(WITHOUT_JSON_SYCK) && !defined(WITH_JSON_XS) && !defined(WITH_JSON) && !defined(WITH_JSON_DWIW)
+IGNORE= You must choose at least one JSON module.
+.endif
+
+.if !defined(WITHOUT_JSON_SYCK)
+RUN_DEPENDS+= p5-YAML-Syck>=0:${PORTSDIR}/textproc/p5-YAML-Syck
+.endif
+
+.if defined(WITH_JSON_XS)
+RUN_DEPENDS+= p5-JSON-XS>=0:${PORTSDIR}/converters/p5-JSON-XS
+.endif
+
+.if defined(WITH_JSON)
+RUN_DEPENDS+= p5-JSON>=0:${PORTSDIR}/converters/p5-JSON
+.endif
+
+.if defined(WITH_JSON_)
+RUN_DEPENDS+= p5-JSON-DWIW>=0:${PORTSDIR}/converters/p5-JSON-DWIW
+.endif
+
+.include <bsd.port.mk>
diff --git a/textproc/p5-XML-XML2JSON/distinfo b/textproc/p5-XML-XML2JSON/distinfo
new file mode 100644
index 000000000000..ad84047a64e2
--- /dev/null
+++ b/textproc/p5-XML-XML2JSON/distinfo
@@ -0,0 +1,2 @@
+SHA256 (XML-XML2JSON-0.05.tar.gz) = a287c1bd058bf5aa2cd8c8e9d57647c92317d713a5c03a91ee23c3785bc7e7d7
+SIZE (XML-XML2JSON-0.05.tar.gz) = 23882
diff --git a/textproc/p5-XML-XML2JSON/pkg-descr b/textproc/p5-XML-XML2JSON/pkg-descr
new file mode 100644
index 000000000000..ee6c69e2e2c2
--- /dev/null
+++ b/textproc/p5-XML-XML2JSON/pkg-descr
@@ -0,0 +1,20 @@
+XML::XML2JSON is a Perl module to convert XML to JSON (and JSON to XML) using
+the following rules from Google (http://code.google.com/apis/gdata/json.html):
+
+Basic:
+- The feed is represented as a JSON object; each nested element or attribute
+ is represented as a name/value property of the object.
+- Attributes are converted to String properties.
+- Child elements are converted to Object properties.
+- Elements that may appear more than once are converted to Array properties.
+- Text values of tags are converted to $t properties.
+
+Namespace:
+- If an element has a namespace alias, the alias and element are concatenated
+ using "$". For example, ns:element becomes ns$element.
+
+XML:
+- XML version and encoding attributes are converted to version and encoding
+ attributes of the root element, respectively.
+
+WWW: http://search.cpan.org/dist/XML-XML2JSON/
diff --git a/textproc/p5-XML-XML2JSON/pkg-plist b/textproc/p5-XML-XML2JSON/pkg-plist
new file mode 100644
index 000000000000..a60031a6d42d
--- /dev/null
+++ b/textproc/p5-XML-XML2JSON/pkg-plist
@@ -0,0 +1,5 @@
+%%SITE_PERL%%/XML/XML2JSON.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/XML/XML2JSON/.packlist
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/XML/XML2JSON
+@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/XML
+@dirrmtry %%SITE_PERL%%/XML