1a54f892c0
* fix(outdated): Use `latest` tag even when it's the same as the current version (#27699) * fix(outdated): retain strict semver specifier when updating (#27701) * fix(check/lsp): fix bugs with tsc type resolution, allow npm packages to augment `ImportMeta` (#27690) * fix(ext/console): change Temporal color (#27684) * docs: adding jsdocs info for console interface (#27666) * docs: JSDocs examples for prompt, confirm, and alert (#27695) * docs:Adds examples in JSDocs for localStorage and sessionStorage (#27668) * chore: add missing internal `core_import_map` file paths (#27691) * fix(check/lsp): correctly resolve compilerOptions.types (#27686) * refactor: create deno_lib crate (#27673) * fix(ext/node): add chown method to FileHandle class (#27638) * refactor: add 'deno_os' crate (#27655) * fix(ext/node): fix playwright http client (#27662) * refactor: move `CliNpmResolver` to `deno_resolver::npm::NpmResolver` (#27659) * feat(unstable): refactor js lint plugin AST (#27615) * refactor: deno_config 0.45 (#27660) * fix(node/fs): add utimes method to the FileHandle class (#27582) * fix(ext/node): add `writev` method to `FileHandle` (#27563) * fix(compile/windows): better handling of deno_dir on different drive letter than code (#27654) * refactor: create `NpmInstaller` (#27626) * fix(node): Prevent node:child_process from always inheriting the parent environment (#27343) (#27340) * fix(compile): store embedded fs case sensitivity (#27653) * refactor(node_resolver): make conditions_from_resolution_mode configurable (#27596) * fix(lsp): handle pathless untitled URIs (#27637) * fix(ext/node): apply `@npmcli/agent` workaround to `npm-check-updates` (#27639) * fix(lsp/check): don't resolve unknown media types to a `.js` extension (#27631) * fix(regression): show bare-node-builtin hint when using an import map (#27632) * refactor: remove `CliNpmReqResolver` trait in deno_resolver (#27616) * fix(ext/node): use primordials in `ext/node/polyfills/_fs_common.ts` (#27589) * refactor: implement `NpmPackageFolderResolver` in deno_resolver (#27614) * refactor(npm): move `SloppyImportsCachedFs` to deno_resolver (#27610) OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/deno?expand=0&rev=277
172 lines
5.2 KiB
RPMSpec
172 lines
5.2 KiB
RPMSpec
#
|
|
# spec file for package deno
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC
|
|
# Copyright (c) 2020-2024 Avindra Goolcharan <avindra@opensuse.org>
|
|
# Copyright (c) 2018-2024 the Deno authors
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%global _lto_cflags %nil
|
|
%global _v8_version 130.0.7
|
|
Name: deno
|
|
Version: 2.1.6
|
|
Release: 0
|
|
Summary: A secure JavaScript and TypeScript runtime
|
|
License: MIT
|
|
Group: Productivity/Other
|
|
URL: https://github.com/denoland/deno
|
|
Source0: %{name}-%{version}.tar.zst
|
|
Source1: registry.tar.zst
|
|
BuildRequires: cargo-packaging
|
|
|
|
%if 0%{?suse_version} > 1600
|
|
BuildRequires: clang19
|
|
%else
|
|
BuildRequires: gcc
|
|
BuildRequires: gcc-c++
|
|
%endif
|
|
|
|
# needed by `libz-ng-sys` after 1.36.1
|
|
# see: https://build.opensuse.org/package/show/devel:languages:javascript/deno#comment-1808174
|
|
BuildRequires: cmake
|
|
BuildRequires: cargo >= 1.80
|
|
BuildRequires: gn
|
|
BuildRequires: lld
|
|
BuildRequires: llvm
|
|
BuildRequires: llvm-gold
|
|
BuildRequires: ninja
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: python3-base
|
|
BuildRequires: rusty_v8 = %{_v8_version}
|
|
BuildRequires: zstd
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
BuildRequires: pkgconfig(gmodule-2.0)
|
|
BuildRequires: pkgconfig(gobject-2.0)
|
|
BuildRequires: pkgconfig(gthread-2.0)
|
|
BuildRequires: pkgconfig(protobuf)
|
|
ExclusiveArch: %{rust_tier1_arches}
|
|
# PATCH-FIX-OPENSUSE - Disable LTO (to reduce req memory)
|
|
Patch10: deno-disable-lto.patch
|
|
|
|
%package fish-completion
|
|
Summary: Fish Completion for %{name}
|
|
Group: System/Shells
|
|
Supplements: (%{name} and fish)
|
|
Requires: %{name}
|
|
Requires: fish
|
|
BuildArch: noarch
|
|
|
|
%description fish-completion
|
|
Fish command-line completion support for %{name}.
|
|
|
|
%package zsh-completion
|
|
Summary: Zsh Completion for %{name}
|
|
Group: System/Shells
|
|
Supplements: (%{name} and zsh)
|
|
Requires: %{name}
|
|
Requires: zsh
|
|
BuildArch: noarch
|
|
|
|
%description zsh-completion
|
|
Zsh command-line completion support for %{name}.
|
|
|
|
%package bash-completion
|
|
Summary: Bash Completion for %{name}
|
|
Group: System/Shells
|
|
Supplements: (%{name} and bash-completion)
|
|
Requires: %{name}
|
|
Requires: bash-completion
|
|
BuildArch: noarch
|
|
|
|
%description bash-completion
|
|
Bash command-line completion support for %{name}.
|
|
|
|
%description
|
|
A JavaScript and TypeScript platform built on V8
|
|
|
|
Deno has standard library and has features such as
|
|
a linter, a language server protocol, a code formatter and
|
|
a unit test runner.
|
|
|
|
Remote code is fetched and cached on first execution, and only
|
|
updated with the --reload flag.
|
|
|
|
%prep
|
|
%autosetup -a1 -p1 -n %{name}
|
|
|
|
unlink rusty_v8 || true
|
|
ln -sf %{_libdir}/crates/rusty_v8/ $PWD/rusty_v8
|
|
echo -e "\n[patch.crates-io]\nv8 = { path = './rusty_v8' }" >> Cargo.toml
|
|
|
|
%build
|
|
export CARGO_HOME="$PWD/.cargo"
|
|
# Ensure that the clang version matches. This command came from Archlinux. Thanks.
|
|
export CLANG_VERSION=$(clang --version | grep -m1 version | sed 's/.* \([0-9]\+\).*/\1/')
|
|
export V8_FROM_SOURCE=1
|
|
export CLANG_BASE_PATH=%{_prefix}
|
|
%if 0%{?suse_version} > 1600
|
|
export CC=clang
|
|
export CXX=clang++
|
|
export CFLAGS="%{optflags} -Wno-unknown-warning-option"
|
|
export CXXFLAGS="%{optflags} -Wno-unknown-warning-option"
|
|
%else
|
|
export CFLAGS="%{optflags}"
|
|
export CXXFLAGS="%{optflags}"
|
|
%endif
|
|
|
|
# https://www.chromium.org/developers/gn-build-configuration
|
|
export GN_ARGS="clang_version=${CLANG_VERSION} use_lld=true enable_nacl = false blink_symbol_level = 0 v8_symbol_level = 0"
|
|
%{cargo_build}
|
|
|
|
%install
|
|
# place deno cli manually (cannot cargo install)
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
export PATH="%{buildroot}%{_bindir}:${PATH}"
|
|
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
|
mkdir -p %{buildroot}%{_datadir}/fish/vendor_completions.d
|
|
mkdir -p %{buildroot}%{_datadir}/zsh/site-functions
|
|
|
|
cp target/release/deno %{buildroot}%{_bindir}
|
|
|
|
deno completions bash > %{buildroot}%{_datadir}/bash-completion/completions/%{name}
|
|
deno completions fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish
|
|
deno completions zsh > %{buildroot}%{_datadir}/zsh/site-functions/_%{name}
|
|
|
|
%check
|
|
export PATH="${PATH}:%{buildroot}%{_bindir}"
|
|
deno run tests/testdata/run/002_hello.ts
|
|
|
|
%files
|
|
%license LICENSE.md
|
|
%doc README.md
|
|
%{_bindir}/%{name}
|
|
|
|
%files bash-completion
|
|
%dir %{_datadir}/bash-completion
|
|
%dir %{_datadir}/bash-completion/completions
|
|
%{_datadir}/bash-completion/completions/%{name}
|
|
|
|
%files fish-completion
|
|
%dir %{_datadir}/fish
|
|
%dir %{_datadir}/fish/vendor_completions.d
|
|
%{_datadir}/fish/vendor_completions.d/%{name}.fish
|
|
|
|
%files zsh-completion
|
|
%dir %{_datadir}/zsh
|
|
%dir %{_datadir}/zsh/site-functions
|
|
%{_datadir}/zsh/site-functions/_%{name}
|
|
|
|
%changelog
|