From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-java/json-simple/Manifest | 6 +++ ...imple-1.1-extra-constructors-from-azureus.patch | 48 ++++++++++++++++++++++ dev-java/json-simple/json-simple-1.1.ebuild | 47 +++++++++++++++++++++ dev-java/json-simple/metadata.xml | 18 ++++++++ 4 files changed, 119 insertions(+) create mode 100644 dev-java/json-simple/Manifest create mode 100644 dev-java/json-simple/files/json-simple-1.1-extra-constructors-from-azureus.patch create mode 100644 dev-java/json-simple/json-simple-1.1.ebuild create mode 100644 dev-java/json-simple/metadata.xml (limited to 'dev-java/json-simple') diff --git a/dev-java/json-simple/Manifest b/dev-java/json-simple/Manifest new file mode 100644 index 000000000000..5d5f8a0faf3b --- /dev/null +++ b/dev-java/json-simple/Manifest @@ -0,0 +1,6 @@ +AUX json-simple-1.1-extra-constructors-from-azureus.patch 1943 SHA256 4d2721add0dae5abfaa5d2b31be61dff88e72db1b69e4f3b8c8263b4541673be SHA512 603d6f580e4e546a0eb230b521416b7d5409ec896359f4ccf5755adf79bd666da9cb0b1496b58439323b1c8cc18ebf5f550e3c1fd4894ba85b89aa2854584380 WHIRLPOOL e684a75b848dc98274f267f1814627a7ac1de92e81587db27a2ea454207a6a68db25c3466a5f7c367f4096f964f62792548552f4774c85b01ad055968eaa5d5d +DIST json_simple-1.1-all.zip 44814 SHA256 007568a235ed018142756080e73ec7582af83bd90bbdc227489d186e1529ccf7 SHA512 02a5300456dbe2a1b5331b247ad964237d11d2281b35351f1f7bed6867eaf5bb6fb07ca1a50f87e30cd93221c5119e8b5f6f273357ab5fcfeda164ec119c0404 WHIRLPOOL f1169a8a52349a65469c8ef5ea61fbde469ebd30fdb57b591b0148e2244edb1f78ef99b5d79bc66e4cbfcced3f74436cbbd71e0463aa5b5e6737e81eccea1c82 +EBUILD json-simple-1.1.ebuild 1003 SHA256 8bc41ee24f21ad314ff5946dc057c659ea6d1297226cffddd9cc522716ce2e2f SHA512 2db813f156311abcf75e6c518cb96e1396c8a27ea9c0de11615ca860be88e211ebc137b772d01cb39b6a5087c4621f316c2289a2db0221ce194b98151316aade WHIRLPOOL 2a56341c5ee130366bac609a732bdfc8c87a046d91530f5549d82fca2abc8d0545cbef35fbe67231cbe9707c2d245bc15faa5b486146d5a30860b61d663ec9cd +MISC ChangeLog 2942 SHA256 8cf79250108ee22fa5862a7ec8694b57e2561f1f71e260b47ee96796a76b8095 SHA512 e3544ddccbaf7f7755eb77ec5fc7c2434f5224f26907d420b1e2b1f810e879dcfc584eaa8839bf5b4c05e9c151d196ad1026668a1c693b2935462d2387e2e986 WHIRLPOOL 716ebb17249fb3cf5e1750099f6b293fa391c07c1e4491e036624cc9f1262cab9c9f66043c7b9cad3d8194abd46eaa69bfd85285968dfc83b3f803275d44e35d +MISC ChangeLog-2015 2534 SHA256 0df3dba82f8fa7b5b3b25c74c2f935a6661b39114a336a65e2d4a71b09c840da SHA512 9d8b8803ac939fa0af6bdf9cd738ae7e9af18781ad2685c199cea2837b42af122f5c53ae846308b33fce2cf9022b621d0e3466915b6ef9806e969c506c785cad WHIRLPOOL 15c92e9821c9bcd281d642f58757f4092046b8eb1ef68e8f82e26119f7fb562eb3307cebe49be328b145e68d323ca71253529bcbfd6f3d2392709e04ee571987 +MISC metadata.xml 884 SHA256 48c3395d0a309839ee622ca312e72512f56d557e3a88dbb1efaf7f72682b58bb SHA512 c62d038f6913bb8beb903930ed6d354c89b9b5fa231d9096690d263ee35812aad52696a3d15d74c83d99c02392f5ed3ab997bc6e9d2532cbb4ea12cbaab1ebe9 WHIRLPOOL b53b460ad64bae9fa5063cca85e170c510c1924ab800a8dc169f228b0523f022fefb43a9d7f494088c77c55cc2c03c00e41ad63ad684ecd4776d69dc16ff1b36 diff --git a/dev-java/json-simple/files/json-simple-1.1-extra-constructors-from-azureus.patch b/dev-java/json-simple/files/json-simple-1.1-extra-constructors-from-azureus.patch new file mode 100644 index 000000000000..5b45a973e41d --- /dev/null +++ b/dev-java/json-simple/files/json-simple-1.1-extra-constructors-from-azureus.patch @@ -0,0 +1,48 @@ +diff -Nur json_simple-1.1-all/src/org/json/simple/JSONArray.java json_simple-1.1-all_patched//src/org/json/simple/JSONArray.java +--- json_simple-1.1-all/src/org/json/simple/JSONArray.java 2009-02-01 12:45:34.000000000 +0200 ++++ json_simple-1.1-all_patched//src/org/json/simple/JSONArray.java 2011-09-25 11:23:37.398818358 +0300 +@@ -19,6 +19,18 @@ + public class JSONArray extends ArrayList implements List, JSONAware, JSONStreamAware { + private static final long serialVersionUID = 3957988303675231981L; + ++ public JSONArray() { ++ super(); ++ } ++ ++ public JSONArray(java.util.Collection arg0) { ++ super(arg0); ++ } ++ ++ public JSONArray(int initialCapacity) { ++ super(initialCapacity); ++ } ++ + /** + * Encode a list into JSON text and write it to out. + * If this list is also a JSONStreamAware or a JSONAware, JSONStreamAware and JSONAware specific behaviours will be ignored at this top level. +diff -Nur json_simple-1.1-all/src/org/json/simple/JSONObject.java json_simple-1.1-all_patched//src/org/json/simple/JSONObject.java +--- json_simple-1.1-all/src/org/json/simple/JSONObject.java 2009-02-01 12:45:34.000000000 +0200 ++++ json_simple-1.1-all_patched//src/org/json/simple/JSONObject.java 2011-09-25 11:24:34.815103065 +0300 +@@ -18,6 +18,22 @@ + public class JSONObject extends HashMap implements Map, JSONAware, JSONStreamAware{ + private static final long serialVersionUID = -503443796854799292L; + ++ public JSONObject() { ++ super(); ++ } ++ ++ public JSONObject(int initialCapacity, float loadFactor) { ++ super(initialCapacity, loadFactor); ++ } ++ ++ public JSONObject(int initialCapacity) { ++ super(initialCapacity); ++ } ++ ++ public JSONObject(Map arg0) { ++ super(arg0); ++ } ++ + /** + * Encode a map into JSON text and write it to out. + * If this map is also a JSONAware or JSONStreamAware, JSONAware or JSONStreamAware specific behaviours will be ignored at this top level. diff --git a/dev-java/json-simple/json-simple-1.1.ebuild b/dev-java/json-simple/json-simple-1.1.ebuild new file mode 100644 index 000000000000..039d5734474f --- /dev/null +++ b/dev-java/json-simple/json-simple-1.1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="2" +JAVA_PKG_IUSE="source test" + +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="Simple Java toolkit for JSON" +HOMEPAGE="http://www.json.org" + +MY_PN="${PN/-/_}" +MY_P="${MY_PN}-${PV}-all" +SRC_URI="https://json-simple.googlecode.com/files/${MY_P}.zip" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ppc64 x86" +IUSE="" + +DEPEND=">=virtual/jdk-1.4 + test? ( dev-java/ant-junit ) + app-arch/unzip" +RDEPEND=">=virtual/jre-1.4" + +S="${WORKDIR}/${MY_P}" + +java_prepare() { + epatch "${FILESDIR}/${P}-extra-constructors-from-azureus.patch" + rm -rv build lib || die +} + +#JAVA_ANT_ENCODING="ISO-8859-1" +#EANT_BUILD_TARGET="dist" + +JAVA_PKG_BSFIX_NAME+=" test.xml" + +src_test() { + java-pkg_jar-from --into lib junit + ANT_TASKS="ant-junit" eant -f test.xml +} + +src_install() { + java-pkg_newjar lib/${MY_P/-all/}.jar ${PN}.jar + dodoc README.txt AUTHORS.txt ChangeLog.txt || die + 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..92e38406b83b --- /dev/null +++ b/dev-java/json-simple/metadata.xml @@ -0,0 +1,18 @@ + + + + + java@gentoo.org + Java + + 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. + + json-simple + + -- cgit v1.2.3