From e0172230e05ab49eba6d1735d054bc2924462e44 Mon Sep 17 00:00:00 2001 From: metcya <134973769+metcya@users.noreply.github.com> Date: Sat, 13 Dec 2025 15:20:40 -0600 Subject: [PATCH] add: quickjs-ng (#8165) * add: quickjs-ng * use macro Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Signed-off-by: metcya <134973769+metcya@users.noreply.github.com> * change cflags * add packager field --------- Signed-off-by: metcya <134973769+metcya@users.noreply.github.com> Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> --- anda/lib/quickjs-ng/anda.hcl | 5 +++ anda/lib/quickjs-ng/quickjs-ng.spec | 68 +++++++++++++++++++++++++++++ anda/lib/quickjs-ng/update.rhai | 1 + 3 files changed, 74 insertions(+) create mode 100644 anda/lib/quickjs-ng/anda.hcl create mode 100644 anda/lib/quickjs-ng/quickjs-ng.spec create mode 100644 anda/lib/quickjs-ng/update.rhai diff --git a/anda/lib/quickjs-ng/anda.hcl b/anda/lib/quickjs-ng/anda.hcl new file mode 100644 index 0000000000..12f6c808dd --- /dev/null +++ b/anda/lib/quickjs-ng/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "quickjs-ng.spec" + } +} diff --git a/anda/lib/quickjs-ng/quickjs-ng.spec b/anda/lib/quickjs-ng/quickjs-ng.spec new file mode 100644 index 0000000000..76f37f717a --- /dev/null +++ b/anda/lib/quickjs-ng/quickjs-ng.spec @@ -0,0 +1,68 @@ +%global _distro_extra_cflags -Wno-discarded-qualifiers + +Name: quickjs-ng +Version: 0.11.0 +Release: 1%?dist +License: MIT +Summary: A mighty JavaScript engine +URL: https://github.com/quickjs-ng/quickjs +Source: %{url}/archive/refs/tags/v%{version}.tar.gz +Packager: Metcya +Provides: qjs +Provides: qjsc + +BuildRequires: gcc +BuildRequires: cmake + +Requires: %{name}-libs%{_isa} = %evr + +%description +QuickJS is a small and embeddable JavaScript engine. It aims to support the +latest ECMAScript specification. This project is a fork of the original QuickJS +project by Fabrice Bellard and Charlie Gordon, after it went dormant, with the +intent of reigniting its development. + +%package libs +%pkg_libs_files + +%files libs +%license LICENSE + +%package devel +Requires: %{name}-libs%{_isa} = %evr +%pkg_devel_files + +%files devel +%{_libdir}/cmake/quickjs/*.cmake + + +%package examples +Summary: Example files for %{name} + +%description examples +Example files for %{name} + +%prep +%autosetup -p1 -n quickjs-%{version} + +%build +%cmake +%cmake_build + +%install +%cmake_install +rm %{buildroot}%{_docdir}/quickjs/LICENSE + +%files +%doc README.md +%license LICENSE +%{_bindir}/qjs +%{_bindir}/qjsc + +%files examples +%license LICENSE +%{_docdir}/quickjs/examples/* + +%changelog +* Sun Dec 07 2025 metcya - 0.11.0 +- Package quickjs-ng diff --git a/anda/lib/quickjs-ng/update.rhai b/anda/lib/quickjs-ng/update.rhai new file mode 100644 index 0000000000..aa5b808180 --- /dev/null +++ b/anda/lib/quickjs-ng/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("quickjs-ng/quickjs"));