pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
conkeror: include two patches from upstream
Module Name: pkgsrc-wip
Committed By: Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By: yhardy
Date: Wed Dec 14 22:54:50 2016 +0200
Changeset: d1c448062b8b5b7d97e550f6278741f58bb9bc73
Modified Files:
conkeror/Makefile
conkeror/distinfo
Added Files:
conkeror/patches/patch-modules_keywords.js
conkeror/patches/patch-modules_page-modes_key-kill.js
Log Message:
conkeror: include two patches from upstream
key-kill.js: eliminate a strict mode warning
keywords.js: restyle to eliminate strict mode warnings
There were several warnings like this:
JavaScript strict warning: chrome://conkeror/content/keywords.js,
line 20: SyntaxError: in strict mode code, functions may be declared
only at top level or immediately within another function
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d1c448062b8b5b7d97e550f6278741f58bb9bc73
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
conkeror/Makefile | 4 +-
conkeror/distinfo | 2 +
conkeror/patches/patch-modules_keywords.js | 176 +++++++++++++++++++++
.../patches/patch-modules_page-modes_key-kill.js | 32 ++++
4 files changed, 212 insertions(+), 2 deletions(-)
diffs:
diff --git a/conkeror/Makefile b/conkeror/Makefile
index ca07f7b..afb1249 100644
--- a/conkeror/Makefile
+++ b/conkeror/Makefile
@@ -2,7 +2,7 @@
PKGNAME= conkeror-1.0.3
DISTNAME= 11121bed996ce84e3536c3c8266cdf3164e02b5a
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= www
MASTER_SITES= http://repo.or.cz/conkeror.git/snapshot/
DIST_SUBDIR= conkeror
@@ -23,7 +23,7 @@ INSTALLATION_DIRS+= bin
INSTALLATION_DIRS+= share/applications
post-patch:
- ${RM} ${WRKSRC}/modules/*.orig
+ ${RM} ${WRKSRC}/modules/*.orig ${WRKSRC}/modules/page-modes/*.orig
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/conkeror/distinfo b/conkeror/distinfo
index c085567..6e3c593 100644
--- a/conkeror/distinfo
+++ b/conkeror/distinfo
@@ -6,4 +6,6 @@ SHA512 (conkeror/11121bed996ce84e3536c3c8266cdf3164e02b5a.tar.gz) = 1ae2144b86ac
Size (conkeror/11121bed996ce84e3536c3c8266cdf3164e02b5a.tar.gz) = 315860 bytes
SHA1 (patch-application.ini) = ed51742eff6309256cb6bb5f4b401d8791a6914a
SHA1 (patch-modules_download-manager.js) = 8125b1369ecd942b12d6e3fcceec7552586082d1
+SHA1 (patch-modules_keywords.js) = 639a51fb8e0cbefc360d34972d1bb38613ff22b6
+SHA1 (patch-modules_page-modes_key-kill.js) = 73e0ee87bf6e7e8e0338626ea2ef04da4e0dea24
SHA1 (patch-modules_permission-manager.js) = 8d90c8fa3734c7ea410718e7aca1e4854e1f1211
diff --git a/conkeror/patches/patch-modules_keywords.js b/conkeror/patches/patch-modules_keywords.js
new file mode 100644
index 0000000..f3a0fa1
--- /dev/null
+++ b/conkeror/patches/patch-modules_keywords.js
@@ -0,0 +1,176 @@
+$NetBSD$
+
+From: John Foerch <jjfoerch%earthlink.net@localhost>
+Date: Thu, 10 Nov 2016 01:07:18 +0000 (-0500)
+Subject: keywords.js: restyle to eliminate strict mode warnings
+X-Git-Url: http://repo.or.cz/conkeror.git/commitdiff_plain/88566433998f7ebeaf01010c20703ab9636b381b
+
+keywords.js: restyle to eliminate strict mode warnings
+
+There were several warnings like this:
+
+ JavaScript strict warning: chrome://conkeror/content/keywords.js,
+ line 20: SyntaxError: in strict mode code, functions may be declared
+ only at top level or immediately within another function
+---
+
+diff --git a/modules/keywords.js b/modules/keywords.js
+dissimilarity index 90%
+index bf5fc8a..79f2b23 100644
+--- modules/keywords.js
++++ modules/keywords.js
+@@ -1,77 +1,77 @@
+-/**
+- * (C) Copyright 2007-2008 Jeremy Maitin-Shepard
+- *
+- * Use, modification, and distribution are subject to the terms specified in the
+- * COPYING file.
+- **/
+-
+-{
+- let _keyword_argument_list = [];
+- let _get_keyword_argument_setter = function _get_keyword_argument_setter (name) {
+- return function (value) { _keyword_argument_list.push(name); return value; };
+- };
+-
+- let _get_keyword_argument_getter = function _get_keyword_argument_getter (name) {
+- return function () { _keyword_argument_list.push(name); return true; };
+- };
+-
+- // This function must be called with all string arguments, all of
+- // which must begin with "$".
+- function define_keywords () {
+- for (var i = 0, alen = arguments.length; i < alen; ++i) {
+- var name = arguments[i];
+- this.__defineSetter__(name, _get_keyword_argument_setter(name));
+- this.__defineGetter__(name, _get_keyword_argument_getter(name));
+- }
+- }
+-
+- var define_keyword = define_keywords;
+-
+- function write_keywords (output, input, first_index) {
+- if (first_index == null)
+- first_index = input.callee.length;
+- let max_index = input.length;
+- let count = max_index - first_index;
+- if (count > 0) {
+- let offset = _keyword_argument_list.length - 1;
+- for (let i = max_index - 1; i >= first_index; --i) {
+- let value = input[i];
+- if (value instanceof keyword_argument_forwarder) {
+- for (let x in value)
+- output[x] = value[x];
+- --count;
+- } else {
+- let name = _keyword_argument_list[offset--];
+- output[name] = value;
+- }
+- }
+- _keyword_argument_list.length -= count;
+- }
+- }
+-
+- let keyword_argument_forwarder = function keyword_argument_forwarder (args) {
+- if ("_processed_keywords" in args) {
+- for (let x in args) {
+- if (x[0] == "$")
+- this[x] = args[x];
+- }
+- } else
+- write_keywords(this, args);
+- };
+-
+- function keywords (args) {
+- write_keywords(args, arguments);
+- write_keywords(args, args);
+- args._processed_keywords = true;
+- }
+-
+- function forward_keywords (args) {
+- return new keyword_argument_forwarder(args);
+- }
+-
+- function protect_keywords () {
+- return new keyword_argument_forwarder(arguments);
+- }
+-}
+-
+-provide("keywords");
++/**
++ * (C) Copyright 2007-2008 Jeremy Maitin-Shepard
++ *
++ * Use, modification, and distribution are subject to the terms specified in the
++ * COPYING file.
++ **/
++
++var _keyword_argument_list = [];
++function _get_keyword_argument_setter (name) {
++ return function (value) { _keyword_argument_list.push(name); return value; };
++}
++
++function _get_keyword_argument_getter (name) {
++ return function () { _keyword_argument_list.push(name); return true; };
++}
++
++// This function must be called with all string arguments, all of
++// which must begin with "$".
++function define_keywords () {
++ for (var i = 0, alen = arguments.length; i < alen; ++i) {
++ var name = arguments[i];
++ this.__defineSetter__(name, _get_keyword_argument_setter(name));
++ this.__defineGetter__(name, _get_keyword_argument_getter(name));
++ }
++}
++
++var define_keyword = define_keywords;
++
++function write_keywords (output, input, first_index) {
++ if (first_index == null) {
++ first_index = input.callee.length;
++ }
++ let max_index = input.length;
++ let count = max_index - first_index;
++ if (count > 0) {
++ let offset = _keyword_argument_list.length - 1;
++ for (let i = max_index - 1; i >= first_index; --i) {
++ let value = input[i];
++ if (value instanceof keyword_argument_forwarder) {
++ for (let x in value)
++ output[x] = value[x];
++ --count;
++ } else {
++ let name = _keyword_argument_list[offset--];
++ output[name] = value;
++ }
++ }
++ _keyword_argument_list.length -= count;
++ }
++}
++
++function keyword_argument_forwarder (args) {
++ if ("_processed_keywords" in args) {
++ for (let x in args) {
++ if (x[0] == "$")
++ this[x] = args[x];
++ }
++ } else {
++ write_keywords(this, args);
++ }
++}
++
++function keywords (args) {
++ write_keywords(args, arguments);
++ write_keywords(args, args);
++ args._processed_keywords = true;
++}
++
++function forward_keywords (args) {
++ return new keyword_argument_forwarder(args);
++}
++
++function protect_keywords () {
++ return new keyword_argument_forwarder(arguments);
++}
++
++provide("keywords");
diff --git a/conkeror/patches/patch-modules_page-modes_key-kill.js b/conkeror/patches/patch-modules_page-modes_key-kill.js
new file mode 100644
index 0000000..0ccf5ea
--- /dev/null
+++ b/conkeror/patches/patch-modules_page-modes_key-kill.js
@@ -0,0 +1,32 @@
+$NetBSD$
+
+From: John Foerch <jjfoerch%earthlink.net@localhost>
+Date: Thu, 10 Nov 2016 01:21:34 +0000 (-0500)
+Subject: key-kill.js: eliminate a strict mode warning
+X-Git-Url: http://repo.or.cz/conkeror.git/commitdiff_plain/65fb97af472e0e91cec0a6279dfbe20e6a7715fd
+
+key-kill.js: eliminate a strict mode warning
+---
+
+diff --git a/modules/page-modes/key-kill.js b/modules/page-modes/key-kill.js
+index e426743..9f86e72 100644
+--- modules/page-modes/key-kill.js
++++ modules/page-modes/key-kill.js
+@@ -9,7 +9,7 @@ define_variable("key_kill_input_fields", false,
+ "When true, key-kill-mode will operate in input fields and textareas.");
+
+ { let mozilla_version_below_25 = version_compare(get_mozilla_version(), "25.0") < 0;
+- function key_kill_event_kill (event) {
++ var key_kill_event_kill = function key_kill_event_kill (event) {
+ var elem = event.target;
+ if (!key_kill_input_fields &&
+ (elem instanceof Ci.nsIDOMHTMLInputElement ||
+@@ -21,7 +21,7 @@ define_variable("key_kill_input_fields", false,
+ event.preventDefault();
+ }
+ event.stopPropagation();
+- }
++ };
+ }
+
+ define_page_mode("key-kill-mode",
Home |
Main Index |
Thread Index |
Old Index