From 15c0abf978bd92374e247a67ef7aa7ed33d684ec6fbdc33f61789b091b065061 Mon Sep 17 00:00:00 2001 From: Avindra Goolcharan Date: Tue, 26 Jan 2021 16:32:23 +0000 Subject: [PATCH] Accepting request 866964 from devel:tools:compiler move quickjs to javascript project OBS-URL: https://build.opensuse.org/request/show/866964 OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/quickjs?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++ .gitignore | 1 + quickjs-2020-11-08.tar.xz | 3 ++ quickjs-rpmlintrc | 4 +++ quickjs.changes | 33 +++++++++++++++++ quickjs.spec | 76 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 140 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 quickjs-2020-11-08.tar.xz create mode 100644 quickjs-rpmlintrc create mode 100644 quickjs.changes create mode 100644 quickjs.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/quickjs-2020-11-08.tar.xz b/quickjs-2020-11-08.tar.xz new file mode 100644 index 0000000..5844d4a --- /dev/null +++ b/quickjs-2020-11-08.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e9d63dab390a95ed365238f21d8e9069187f7ed195782027f0ab311bb64187b +size 752132 diff --git a/quickjs-rpmlintrc b/quickjs-rpmlintrc new file mode 100644 index 0000000..644a820 --- /dev/null +++ b/quickjs-rpmlintrc @@ -0,0 +1,4 @@ +# +# static binary that qjsc currently depends on +addFilter("devel-file-in-non-devel-package .*/usr/lib/quickjs/libquickjs.a") + diff --git a/quickjs.changes b/quickjs.changes new file mode 100644 index 0000000..facb3af --- /dev/null +++ b/quickjs.changes @@ -0,0 +1,33 @@ +------------------------------------------------------------------- +Mon Nov 23 20:50:09 UTC 2020 - Avindra Goolcharan + +- update to 2020-11-08: + * improved function parameter initializers + * added std.setenv(), std.unsetenv() and std.getenviron() + * added JS_EvalThis() + * misc bug fixes +- includes 2020-09-06: + * added logical assignment operators + * added IsHTMLDDA support + * faster for-of loops + * os.Worker now takes a module filename as parameter + * qjsc: added -D option to compile dynamically loaded modules or + workers + * misc bug fixes +- includes 2020-07-05: + * modified JS_GetPrototype() to return a live value + * REPL: support unicode characters larger than 16 bits + * added os.Worker + * improved object serialization + * added std.parseExtJSON + * misc bug fixes +- add qjscalc binary +- pass optflags to build +- cleanup build steps +- cleanup description + +------------------------------------------------------------------- +Sat May 16 16:16:45 UTC 2020 - Duncan Mac-Vicar + +- Initial package + diff --git a/quickjs.spec b/quickjs.spec new file mode 100644 index 0000000..22d7690 --- /dev/null +++ b/quickjs.spec @@ -0,0 +1,76 @@ +# +# spec file for package quickjs +# +# Copyright (c) 2020 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define ver 2020-11-08 +Name: quickjs +Version: 20201108 +Release: 0 +Summary: Small and embeddable Javascript engine +License: MIT +URL: https://bellard.org/quickjs/ +Source0: https://bellard.org/quickjs/%{name}-%{ver}.tar.xz +Source10: quickjs-rpmlintrc +BuildRequires: c_compiler +BuildRequires: make + +%description +QuickJS is a small and embeddable JavaScript engine and compiler that supports reference ES2020. + +%package docs +Summary: Documentation for quickjs + +%description docs +Documentation for quickjs + +%package devel +Summary: Development headers for quickjs + +%description devel +Development headers for quickjs + +%prep +%setup -q -n %{name}-%{ver} +# inject optflags (cannot be passed normally to build) +cat >> "./Makefile" <<-EOF +CFLAGS += %{optflags} +LDFLAGS += %{optflags} +EOF + +%build +%make_build prefix=%{_prefix} + +%install +%make_install prefix=%{_prefix} +#remove extraneous binary +rm -f %{buildroot}%{_prefix}/lib/quickjs/libquickjs.lto.a + +%files +%{_bindir}/qjs +%{_bindir}/qjsc +%{_bindir}/qjscalc +%dir %{_prefix}/lib/%{name} +# qjsc relies on it +%{_prefix}/lib/%{name}/lib%{name}.a + +%files devel +%{_includedir}/%{name} + +%files docs +%doc doc + +%changelog