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
This commit is contained in:
Avindra Goolcharan 2021-01-26 16:32:23 +00:00 committed by Git OBS Bridge
commit 15c0abf978
6 changed files with 140 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2e9d63dab390a95ed365238f21d8e9069187f7ed195782027f0ab311bb64187b
size 752132

4
quickjs-rpmlintrc Normal file
View File

@ -0,0 +1,4 @@
#
# static binary that qjsc currently depends on
addFilter("devel-file-in-non-devel-package .*/usr/lib/quickjs/libquickjs.a")

33
quickjs.changes Normal file
View File

@ -0,0 +1,33 @@
-------------------------------------------------------------------
Mon Nov 23 20:50:09 UTC 2020 - Avindra Goolcharan <avindra@opensuse.org>
- 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 <dmacvicar@suse.de>
- Initial package

76
quickjs.spec Normal file
View File

@ -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