Name: quickjs-ng Summary: Small and embeddable JavaScript engine # QuickJS's original code is all MIT. # # libunicode-table.h contains generated code, based on data from the # Unicode Character Database, subject to the Unicode License v3. License: MIT AND Unicode-3.0 Version: 0.14.0 Release: 1%{?dist} URL: https://github.com/quickjs-ng/quickjs Source0: %{URL}/archive/v%{version}/%{name}-%{version}.tar.gz # License text not included upstream Source1: Unicode-3.0.txt # Enable checking against test262, the Official ECMAScript Conformance Test Suite %global with_test262 1 %if 0%{?with_test262} %global test262_commit a6f387de323eb9ae56448bdb71c5d315df631ce4 Source90: https://github.com/tc39/test262/archive/%{test262_commit}/test262-%{test262_commit}.tar.gz # Fix an endianness-affected test that works only on little-endian Patch90: qjsng-bigendian.patch %endif BuildRequires: cmake BuildRequires: gcc BuildRequires: help2man BuildRequires: make Requires: %{name}-libs%{?_isa} = %{version}-%{release} %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. # -- libs %package libs Summary: Library providing a small JavaScript engine %description libs This package provides QuickJS-NG as a shared library. # -- devel %package devel Summary: Development files for %{name} Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel This package provides files required for developing programs requiring %{name}. # -- docs %package docs BuildArch: noarch Summary: Documentation for %{name} %description docs This package provides example files showing how to develop programs using %{name}. # -- subpackages end %prep %autosetup -N -n quickjs-%{version} sed -e '/^QJS=.*$/d' -e '/^QJSC=.*$/d' -e 's/^codegen:.*$/codegen:/' -i Makefile ln %{SOURCE1} ./ %if 0%{?with_test262} rmdir test262 tar xzf %{SOURCE90} mv test262-%{test262_commit} test262 %endif %autopatch -p1 %build # QuickJS comes with an interpreter and a bytecode compiler. The interpreter embeds some bytecode. # First, build the compiler and regenerate the bytecode. %cmake %cmake_build --target qjsc make codegen QJSC="$(pwd)/%{__cmake_builddir}/qjsc" # We could probably do only a partial rebuild, but eh. rm -rf "%{__cmake_builddir}" # Having regenerated what's needed, build everything a second time. %cmake %cmake_build help2man ./%{__cmake_builddir}/qjs > qjs.1 help2man ./%{__cmake_builddir}/qjsc > qjsc.1 %install %cmake_install install -m 755 -d %{buildroot}%{_mandir}/man1 install -m 644 qjs.1 %{buildroot}%{_mandir}/man1/ install -m 644 qjsc.1 %{buildroot}%{_mandir}/man1/ %check # make test ./%{__cmake_builddir}/run-test262 -c tests.conf %if 0%{?with_test262} # make test262 ./%{__cmake_builddir}/run-test262 -m -c test262.conf -a # make test262-fast ./%{__cmake_builddir}/run-test262 -m -c test262.conf -c test262-fast.conf -a %endif %files %{_bindir}/qjs %{_bindir}/qjsc %{_mandir}/man1/qjs*.1* %files libs %license LICENSE Unicode-3.0.txt %{_libdir}/libqjs.so.%{version} %{_libdir}/libqjs.so.0 %files devel %{_libdir}/libqjs.so %{_libdir}/cmake/quickjs/ %{_includedir}/quickjs.h %files docs %license LICENSE %{_docdir}/quickjs/ %changelog * Sat Apr 11 2026 Artur Frenszek-Iwicki - 0.14.0-1 - Update to v0.14.0 * Fri Dec 12 2025 Artur Frenszek-Iwicki - 0.11.0-2 - Add patches to fix test failures in i686 and s390x * Sun Nov 09 2025 Artur Frenszek-Iwicki - 0.11.0-1 - Update to v0.11.0 - Fix license file not being installed - Fix .so.0 file being put in -devel package - Fix running the test suite in %%check - Add help2man-generated man pages * Thu May 15 2025 Artur Frenszek-Iwicki - 0.10.1-1 - Update to v0.10.1 * Wed May 07 2025 Artur Frenszek-Iwicki - 0.10.0-1 - Update to v0.10.0 * Tue Feb 04 2025 Artur Frenszek-Iwicki - 0.8.0-1 - Initial packaging