diff options
author | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2011-12-15 23:27:49 +0800 |
---|---|---|
committer | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2011-12-15 23:27:49 +0800 |
commit | cdbd5fbfc1b53a1f822d272f58daa1b4b741506a (patch) | |
tree | f87c68b2552eb018dc2015af93da21aa970f14e0 /lang | |
parent | e14bc9bc9d7a0eb09034b98736cc3a63a3b5b44b (diff) | |
download | marcuscom-ports-cdbd5fbfc1b53a1f822d272f58daa1b4b741506a.tar marcuscom-ports-cdbd5fbfc1b53a1f822d272f58daa1b4b741506a.tar.gz marcuscom-ports-cdbd5fbfc1b53a1f822d272f58daa1b4b741506a.tar.bz2 marcuscom-ports-cdbd5fbfc1b53a1f822d272f58daa1b4b741506a.tar.lz marcuscom-ports-cdbd5fbfc1b53a1f822d272f58daa1b4b741506a.tar.xz marcuscom-ports-cdbd5fbfc1b53a1f822d272f58daa1b4b741506a.tar.zst marcuscom-ports-cdbd5fbfc1b53a1f822d272f58daa1b4b741506a.zip |
Fix:
JS ERROR: !!! WARNING: 'char is a reserved identifier'
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@16614 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'lang')
-rw-r--r-- | lang/gjs/Makefile | 3 | ||||
-rw-r--r-- | lang/gjs/files/patch-modules_overrides_GLib.js | 79 |
2 files changed, 81 insertions, 1 deletions
diff --git a/lang/gjs/Makefile b/lang/gjs/Makefile index c708b122c..d7bd00805 100644 --- a/lang/gjs/Makefile +++ b/lang/gjs/Makefile @@ -3,11 +3,12 @@ # Whom: Pawel Worach <pawel.worach@gmail.com> # # $FreeBSD$ -# $MCom: ports/lang/gjs/Makefile,v 1.20 2011/09/22 15:24:22 kwm Exp $ +# $MCom: ports/lang/gjs/Makefile,v 1.21 2011/10/04 17:33:06 kwm Exp $ # PORTNAME= gjs PORTVERSION= 1.30.0 +PORTREVISION= 1 CATEGORIES= lang gnome MASTER_SITES= GNOME DIST_SUBDIR= gnome3 diff --git a/lang/gjs/files/patch-modules_overrides_GLib.js b/lang/gjs/files/patch-modules_overrides_GLib.js new file mode 100644 index 000000000..5bf70a844 --- /dev/null +++ b/lang/gjs/files/patch-modules_overrides_GLib.js @@ -0,0 +1,79 @@ +--- modules/overrides/GLib.js.orig 2011-12-15 16:10:34.000000000 +0100 ++++ modules/overrides/GLib.js 2011-12-15 16:23:47.000000000 +0100 +@@ -25,27 +25,27 @@ let originalVariantClass; + const SIMPLE_TYPES = ['b', 'y', 'n', 'q', 'i', 'u', 'x', 't', 'h', 'd', 's', 'o', 'g']; + + function _read_single_type(signature, forceSimple) { +- let char = signature.shift(); ++ let xchar = signature.shift(); + let isSimple = false; + +- if (SIMPLE_TYPES.indexOf(char) == -1) { ++ if (SIMPLE_TYPES.indexOf(xchar) == -1) { + if (forceSimple) + throw new TypeError('Invalid GVariant signature (a simple type was expected)'); + } else + isSimple = true; + +- if (char == 'm' || char == 'a') +- return [char].concat(_read_single_type(signature, false)); +- if (char == '{') { ++ if (xchar == 'm' || xchar == 'a') ++ return [xchar].concat(_read_single_type(signature, false)); ++ if (xchar == '{') { + let key = _read_single_type(signature, true); + let val = _read_single_type(signature, false); + let close = signature.shift(); + if (close != '}') + throw new TypeError('Invalid GVariant signature for type DICT_ENTRY (expected "}"'); +- return [char].concat(key, val, close); ++ return [xchar].concat(key, val, close); + } +- if (char == '(') { +- let res = [char]; ++ if (xchar == '(') { ++ let res = [xchar]; + while (true) { + if (signature.length == 0) + throw new TypeError('Invalid GVariant signature for type TUPLE (expected ")")'); +@@ -60,10 +60,10 @@ function _read_single_type(signature, fo + } + + // Valid types are simple types, arrays, maybes, tuples, dictionary entries and variants +- if (!isSimple && char != 'v') +- throw new TypeError('Invalid GVariant signature (' + char + ' is not a valid type)'); ++ if (!isSimple && xchar != 'v') ++ throw new TypeError('Invalid GVariant signature (' + xchar + ' is not a valid type)'); + +- return [char]; ++ return [xchar]; + } + + +@@ -71,8 +71,8 @@ function _pack_variant(signature, value) + if (signature.length == 0) + throw new TypeError('GVariant signature cannot be empty'); + +- let char = signature.shift(); +- switch (char) { ++ let xchar = signature.shift(); ++ switch (xchar) { + case 'b': + return GLib.Variant.new_boolean(value); + case 'y': +@@ -160,7 +160,7 @@ function _pack_variant(signature, value) + + return GLib.Variant.new_dict_entry(key, child); + default: +- throw new TypeError('Invalid GVariant signature (unexpected character ' + char + ')'); ++ throw new TypeError('Invalid GVariant signature (unexpected character ' + xchar + ')'); + } + } + +@@ -258,4 +258,4 @@ function _init() { + this.Variant.prototype.toString = function() { + return '[object variant of type "' + this.get_type_string() + '"]'; + } +-} +\ No newline at end of file ++} |