summaryrefslogtreecommitdiffstats
path: root/php-justinrainbow-json-schema-rpm.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-15 11:24:50 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-15 11:24:50 +0200
commit429ccf38f02f8aed5a3407d863ab5b3ec5f7ccd7 (patch)
tree6a8cee335716589d34ee72898481a72cf9eaec21 /php-justinrainbow-json-schema-rpm.patch
php-justinrainbow-json-schema: 2.0.0 (new package)
Diffstat (limited to 'php-justinrainbow-json-schema-rpm.patch')
-rw-r--r--php-justinrainbow-json-schema-rpm.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/php-justinrainbow-json-schema-rpm.patch b/php-justinrainbow-json-schema-rpm.patch
new file mode 100644
index 0000000..9d3962d
--- /dev/null
+++ b/php-justinrainbow-json-schema-rpm.patch
@@ -0,0 +1,45 @@
+diff -up bin/validate-json.rpm bin/validate-json
+--- bin/validate-json.rpm 2016-04-15 11:02:32.629960716 +0200
++++ bin/validate-json 2016-04-15 11:07:01.583136406 +0200
+@@ -6,28 +6,7 @@
+ * @author Christian Weiske <christian.weiske@netresearch.de>
+ */
+
+-/**
+- * Dead simple autoloader
+- *
+- * @param string $className Name of class to load
+- *
+- * @return void
+- */
+-function __autoload($className)
+-{
+- $className = ltrim($className, '\\');
+- $fileName = '';
+- $namespace = '';
+- if ($lastNsPos = strrpos($className, '\\')) {
+- $namespace = substr($className, 0, $lastNsPos);
+- $className = substr($className, $lastNsPos + 1);
+- $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
+- }
+- $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
+- if (stream_resolve_include_path($fileName)) {
+- require_once $fileName;
+- }
+-}
++require_once '/usr/share/php/JsonSchema2/autoload.php';
+
+ /**
+ * Show the json parse error that happened last
+@@ -84,11 +63,6 @@ function parseHeaderValue($headerValue)
+ }
+
+
+-// support running this tool from git checkout
+-if (is_dir(__DIR__ . '/../src/JsonSchema')) {
+- set_include_path(__DIR__ . '/../src' . PATH_SEPARATOR . get_include_path());
+-}
+-
+ $arOptions = array();
+ $arArgs = array();
+ array_shift($argv);//script itself