summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2008-04-20 14:33:15 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2008-04-20 14:33:15 +0000
commit82f1059002a985f3968735b76d51f812a9bc5f38 (patch)
tree25c9124736568cf12442b3ded27057b851909596 /dev-java
parentx86 stable, bug #217407 (diff)
downloadhistorical-82f1059002a985f3968735b76d51f812a9bc5f38.tar.gz
historical-82f1059002a985f3968735b76d51f812a9bc5f38.tar.bz2
historical-82f1059002a985f3968735b76d51f812a9bc5f38.zip
Initial addition. Thanks to serkan for the original ebuild which was then improved by me.
Package-Manager: portage-2.1.5_rc3
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/json-simple/ChangeLog12
-rw-r--r--dev-java/json-simple/Manifest16
-rw-r--r--dev-java/json-simple/files/build.xml49
-rw-r--r--dev-java/json-simple/files/extra-constructors-from-azureus.patch121
-rw-r--r--dev-java/json-simple/json-simple-20080420.ebuild43
-rw-r--r--dev-java/json-simple/metadata.xml14
6 files changed, 255 insertions, 0 deletions
diff --git a/dev-java/json-simple/ChangeLog b/dev-java/json-simple/ChangeLog
new file mode 100644
index 000000000000..8b0dfe19b2a7
--- /dev/null
+++ b/dev-java/json-simple/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for dev-java/json-simple
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/json-simple/ChangeLog,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
+
+*json-simple-20080420 (20 Apr 2008)
+
+ 20 Apr 2008; Petteri Räty <betelgeuse@gentoo.org> +files/build.xml,
+ +files/extra-constructors-from-azureus.patch, +metadata.xml,
+ +json-simple-20080420.ebuild:
+ Initial addition. Thanks to serkan for the original ebuild which was then
+ improved by me.
+
diff --git a/dev-java/json-simple/Manifest b/dev-java/json-simple/Manifest
new file mode 100644
index 000000000000..6c05693c28fe
--- /dev/null
+++ b/dev-java/json-simple/Manifest
@@ -0,0 +1,16 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX build.xml 1524 RMD160 faadd94f56f942c6e8f0b10b77fc7be143fe3751 SHA1 2a0d962ace8a4ba111dafeb22ba5187ed47963c4 SHA256 4dc2f58cb9611dbe1e03aee77fa48c17b98f3da93b91ac8655bda5468cf6f8c8
+AUX extra-constructors-from-azureus.patch 5464 RMD160 1cadb186e006b9adef1f6affde14c97c8a34d77c SHA1 25f64966701bc968a666493638ecac076b1c55df SHA256 07e8df19e2b7729611b98e43e10b6513f93eb3a3312a4b0a29ae8db42284fa0a
+DIST json_simple-20080420.zip 50835 RMD160 7cbc378e159d5038112a1edea1c8fd08209cae5b SHA1 cbb49ca71d2beeb4a7e7344736c9384957af9d8e SHA256 0942dabbf8bea388caf6c1cbb550dbbabfa9e359fb2a9e980d660b572c3a0077
+EBUILD json-simple-20080420.ebuild 1045 RMD160 3d00e4899dfb194fa80109dc3d34ca1b99d2a9a4 SHA1 acda3cdc120375178dbf44c9edc9f981f92f8267 SHA256 098e7e45b9f9ea7dc198632822ed1003a903d9651bdc034e3737077e1a10503f
+MISC ChangeLog 515 RMD160 434780abdfd0c5b7790a6979c037f978875518de SHA1 83ed927e2a8835ae283af599f56c3cfdcddced1f SHA256 ffa8d45507dba4bc655e7e9387be9e84207c825686f9fd5b7be6941a6f1dd4ef
+MISC metadata.xml 729 RMD160 872a35b2ec851360e4e2b0c130935cdcd0c295be SHA1 59937765a382a57adbf49e5eef1f1a0fe445f08a SHA256 35ca99cca4fd36ebd8e646c31f67df981f73ce9798be98e98551c054ed102561
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.9 (GNU/Linux)
+
+iEYEARECAAYFAkgLVBAACgkQcxLzpIGCsLRs1ACfduHEb7g6M8EGDxjhYpdAGNEg
+u1QAn1w8NWede1vm5BIaGFoh/Wo38GiQ
+=CI1u
+-----END PGP SIGNATURE-----
diff --git a/dev-java/json-simple/files/build.xml b/dev-java/json-simple/files/build.xml
new file mode 100644
index 000000000000..9157aa4b95a6
--- /dev/null
+++ b/dev-java/json-simple/files/build.xml
@@ -0,0 +1,49 @@
+<project name="TimingFramework" default="dist" basedir=".">
+ <description>
+ simple example build file
+ </description>
+ <!-- set global properties for this build -->
+ <property name="src" location="src"/>
+ <property name="build" location="build"/>
+ <property name="dist" location="dist"/>
+ <property name="javadoc" location="javadoc"/>
+
+ <target name="init">
+ <!-- Create the time stamp -->
+ <tstamp/>
+ <!-- Create the build directory structure used by compile -->
+ <mkdir dir="${build}"/>
+ </target>
+
+ <target name="compile" depends="init"
+ description="compile the source " >
+ <!-- Compile the java code from ${src} into ${build} -->
+ <javac srcdir="${src}" destdir="${build}"/>
+ </target>
+
+ <target name="dist" depends="compile"
+ description="generate the distribution" >
+ <!-- Create the distribution directory -->
+ <mkdir dir="${dist}/lib"/>
+
+ <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
+ <jar jarfile="${dist}/lib/json-simple.jar" basedir="${build}"/>
+ </target>
+
+ <target name="clean"
+ description="clean up" >
+ <!-- Delete the ${build} and ${dist} directory trees -->
+ <delete dir="${build}"/>
+ <delete dir="${dist}"/>
+ <delete dir="${javadoc}"/>
+ </target>
+
+ <target name="javadoc" description="Produce package javadoc">
+ <javadoc destdir="${javadoc}" >
+ <fileset dir="src" defaultexcludes="yes">
+ <include name="org/json/**"/>
+ </fileset>
+ </javadoc>
+ </target>
+
+</project>
diff --git a/dev-java/json-simple/files/extra-constructors-from-azureus.patch b/dev-java/json-simple/files/extra-constructors-from-azureus.patch
new file mode 100644
index 000000000000..825daf9feda5
--- /dev/null
+++ b/dev-java/json-simple/files/extra-constructors-from-azureus.patch
@@ -0,0 +1,121 @@
+Only in work/org/json/simple: AUTHORS.txt
+diff -ur /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/ItemList.java work/org/json/simple/ItemList.java
+--- /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/ItemList.java 2006-04-16 04:04:26.000000000 +0300
++++ work/org/json/simple/ItemList.java 2007-06-04 17:43:56.000000000 +0300
+@@ -1,5 +1,5 @@
+ /*
+- * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
++ * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
+ * Created on 2006-3-24
+ */
+ package org.json.simple;
+diff -ur /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/JSONArray.java work/org/json/simple/JSONArray.java
+--- /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/JSONArray.java 2006-04-16 04:04:24.000000000 +0300
++++ work/org/json/simple/JSONArray.java 2007-06-04 17:43:56.000000000 +0300
+@@ -1,10 +1,11 @@
+ /*
+- * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
++ * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
+ * Created on 2006-4-10
+ */
+ package org.json.simple;
+
+ import java.util.ArrayList;
++import java.util.Collection;
+ import java.util.Iterator;
+
+
+@@ -12,6 +13,18 @@
+ * @author FangYidong<fangyidong@yahoo.com.cn>
+ */
+ public class JSONArray extends ArrayList {
++ public JSONArray() {
++ super();
++ }
++
++ public JSONArray(Collection arg0) {
++ super(arg0);
++ }
++
++ public JSONArray(int initialCapacity) {
++ super(initialCapacity);
++ }
++
+ public String toString(){
+ ItemList list=new ItemList();
+
+diff -ur /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/JSONObject.java work/org/json/simple/JSONObject.java
+--- /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/JSONObject.java 2006-04-16 11:26:38.000000000 +0300
++++ work/org/json/simple/JSONObject.java 2007-06-04 17:43:56.000000000 +0300
+@@ -1,5 +1,5 @@
+ /*
+- * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
++ * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
+ * Created on 2006-4-10
+ */
+ package org.json.simple;
+@@ -13,6 +13,22 @@
+ */
+ public class JSONObject extends HashMap{
+
++ public JSONObject() {
++ super();
++ }
++
++ public JSONObject(int initialCapacity, float loadFactor) {
++ super(initialCapacity, loadFactor);
++ }
++
++ public JSONObject(int initialCapacity) {
++ super(initialCapacity);
++ }
++
++ public JSONObject(Map arg0) {
++ super(arg0);
++ }
++
+ public String toString(){
+ ItemList list=new ItemList();
+ Iterator iter=entrySet().iterator();
+diff -ur /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/JSONValue.java work/org/json/simple/JSONValue.java
+--- /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/JSONValue.java 2006-04-16 04:04:42.000000000 +0300
++++ work/org/json/simple/JSONValue.java 2007-06-04 17:43:56.000000000 +0300
+@@ -1,5 +1,5 @@
+ /*
+- * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
++ * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
+ * Created on 2006-4-15
+ */
+ package org.json.simple;
+Only in work/org/json/simple: LICENSE.txt
+diff -ur /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/parser/JSONParser.java work/org/json/simple/parser/JSONParser.java
+--- /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/parser/JSONParser.java 2006-04-16 04:04:44.000000000 +0300
++++ work/org/json/simple/parser/JSONParser.java 2007-06-04 17:43:56.000000000 +0300
+@@ -1,5 +1,5 @@
+ /*
+- * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
++ * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
+ * Created on 2006-4-15
+ */
+ package org.json.simple.parser;
+diff -ur /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/parser/Yytoken.java work/org/json/simple/parser/Yytoken.java
+--- /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/parser/Yytoken.java 2006-04-16 04:04:44.000000000 +0300
++++ work/org/json/simple/parser/Yytoken.java 2007-06-04 17:43:56.000000000 +0300
+@@ -1,5 +1,5 @@
+ /*
+- * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
++ * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
+ * Created on 2006-4-15
+ */
+ package org.json.simple.parser;
+Only in work/org/json/simple: README.txt
+diff -ur /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/Test.java work/org/json/simple/Test.java
+--- /var/tmp/portage/dev-java/json-simple-20080420/work/json_simple/src/org/json/simple/Test.java 2006-04-16 13:56:20.000000000 +0300
++++ work/org/json/simple/Test.java 2007-06-04 17:43:56.000000000 +0300
+@@ -1,5 +1,5 @@
+ /*
+- * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
++ * $Id: extra-constructors-from-azureus.patch,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
+ * Created on 2006-4-15
+ */
+ package org.json.simple;
diff --git a/dev-java/json-simple/json-simple-20080420.ebuild b/dev-java/json-simple/json-simple-20080420.ebuild
new file mode 100644
index 000000000000..70129f0a7ad1
--- /dev/null
+++ b/dev-java/json-simple/json-simple-20080420.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/json-simple/json-simple-20080420.ebuild,v 1.1 2008/04/20 14:33:15 betelgeuse Exp $
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Simple Java toolkit for JSON"
+HOMEPAGE="http://www.json.org"
+
+MY_PN="${PN/-/_}"
+# Bad usptream not having versioned releases
+# orig SRC_URI="http://www.json.org/java/${MY_PN}.zip"
+SRC_URI="mirror://gentoo/${MY_PN}-20080420.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=virtual/jdk-1.4"
+RDEPEND=">=virtual/jre-1.4"
+
+S="${WORKDIR}/${MY_PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/extra-constructors-from-azureus.patch"
+ rm -rv build lib || die
+ cp -v "${FILESDIR}/build.xml" . || die
+}
+
+JAVA_ANT_ENCODING="ISO-8859-1"
+EANT_BUILD_TARGET="dist"
+
+src_install() {
+ java-pkg_dojar dist/lib/*.jar
+ dodoc README.txt || die
+
+ use doc && java-pkg_dojavadoc javadoc
+ use source && java-pkg_dosrc src/org
+}
diff --git a/dev-java/json-simple/metadata.xml b/dev-java/json-simple/metadata.xml
new file mode 100644
index 000000000000..172c7095576d
--- /dev/null
+++ b/dev-java/json-simple/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+ <longdescription lang="en">
+ Why the Simple Java toolkit (also named as JSON.simple) for JSON?
+ When I use JSON as the data exchange format between the AJAX client and JSP
+ for the first time, what worry me mostly is how to encode Java strings and
+ numbers correctly in the server side so the AJAX client will receive a well
+ formed JSON data. When I looked into the 'JSON in Java' directory in JSON
+ website,I found that wrappers to JSONObject and JSONArray can be simpler,
+ due to the simplicity of JSON itself. So I wrote the JSON.simple package.
+ </longdescription>
+</pkgmetadata>