From 818bea218f5a2e14847fb8f9c7e75c9d8a934439 Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Aug 01 2020 21:03:36 +0000 Subject: Bump to commit c382bd3c16ff2fef9b5fe0dd8bf4c4ec6bfe62c1 Signed-off-by: Robert-André Mauchin --- diff --git a/.gitignore b/.gitignore index 3cd6b19..b61de6c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /otto-3b44b4d.tar.gz /otto-6c383dd335ef8dcccef05e651ce1eccfe4d0f011.tar.gz /otto-15f95af6e78dcd2030d8195a138bd88d4f403546.tar.gz +/otto-c382bd3c16ff2fef9b5fe0dd8bf4c4ec6bfe62c1.tar.gz diff --git a/0001-Convert-int-to-string-using-rune.patch b/0001-Convert-int-to-string-using-rune.patch new file mode 100644 index 0000000..5ba7b77 --- /dev/null +++ b/0001-Convert-int-to-string-using-rune.patch @@ -0,0 +1,50 @@ +From 58e27b326c4403cb51042806cbd8c43c8e35fa37 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= +Date: Sat, 1 Aug 2020 22:47:27 +0200 +Subject: [PATCH] Convert int to string using rune() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +See https://github.com/golang/go/issues/32479 + +Fix #384. + +Signed-off-by: Robert-André Mauchin +--- + builtin.go | 4 ++-- + regexp_test.go | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/builtin.go b/builtin.go +index 256ee3c..5902390 100644 +--- a/builtin.go ++++ b/builtin.go +@@ -48,9 +48,9 @@ var parseInt_alphabetTable = func() []string { + for radix := 3; radix <= 36; radix += 1 { + alphabet := table[radix-1] + if radix <= 10 { +- alphabet += string(radix + 47) ++ alphabet += string(rune(radix + 47)) + } else { +- alphabet += string(radix+54) + string(radix+86) ++ alphabet += string(rune(radix+54)) + string(rune(radix+86)) + } + table = append(table, alphabet) + } +diff --git a/regexp_test.go b/regexp_test.go +index 8e65ee4..364c497 100644 +--- a/regexp_test.go ++++ b/regexp_test.go +@@ -256,7 +256,7 @@ func TestRegExp_controlCharacter(t *testing.T) { + test, _ := test() + + for code := 0x41; code < 0x5a; code++ { +- string_ := string(code - 64) ++ string_ := string(rune(code - 64)) + test(fmt.Sprintf(` + var code = 0x%x; + var string = String.fromCharCode(code %% 32); +-- +2.26.2 + diff --git a/golang-github-robertkrimen-otto.spec b/golang-github-robertkrimen-otto.spec index a64ed3d..80e27e0 100644 --- a/golang-github-robertkrimen-otto.spec +++ b/golang-github-robertkrimen-otto.spec @@ -7,7 +7,7 @@ # https://github.com/robertkrimen/otto %global goipath github.com/robertkrimen/otto -%global commit 15f95af6e78dcd2030d8195a138bd88d4f403546 +%global commit c382bd3c16ff2fef9b5fe0dd8bf4c4ec6bfe62c1 %gometa @@ -19,12 +19,14 @@ Package Otto is a JavaScript parser and interpreter written natively in Go.} Name: %{goname} Version: 0 -Release: 0.12%{?dist} +Release: 0.13%{?dist} Summary: JavaScript interpreter in Go License: MIT URL: %{gourl} Source0: %{gosource} +# Go 1.15: https://github.com/robertkrimen/otto/issues/384 +Patch0: 0001-Convert-int-to-string-using-rune.patch BuildRequires: golang(gopkg.in/readline.v1) BuildRequires: golang(gopkg.in/sourcemap.v1) @@ -36,6 +38,7 @@ BuildRequires: golang(gopkg.in/sourcemap.v1) %prep %goprep +%patch0 -p1 %install %gopkginstall @@ -48,6 +51,9 @@ BuildRequires: golang(gopkg.in/sourcemap.v1) %gopkgfiles %changelog +* Sat Aug 01 22:10:11 CEST 2020 Robert-André Mauchin - 0-0.13.20200801gitc382bd3 +- Bump to commit c382bd3c16ff2fef9b5fe0dd8bf4c4ec6bfe62c1 + * Sat Aug 01 2020 Fedora Release Engineering - 0-0.12 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 4964c5f..63787da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (otto-15f95af6e78dcd2030d8195a138bd88d4f403546.tar.gz) = 581f2a02313b1951e57f9fb6e8d2462a7a98752c8605f59510ea0c28a413fc1ae0f9d510630779a12dd24ebb66a59216df855df09ebd0b34dddb103df282b5fd +SHA512 (otto-c382bd3c16ff2fef9b5fe0dd8bf4c4ec6bfe62c1.tar.gz) = b3c42ae340ed1b110fa6f80ce08dc1ba7f663865f9ea02915f76d538de8f9cc374e5cf8c87cdbb566771acab017fbeb74b4fb422d548e7980af68f42f5a795d2