mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e24dd04226 | |||
| ebf3b0cb11 | |||
| a266c86f90 | |||
| eaa58229b4 | |||
| 959388a160 | |||
| f1f5f498b4 | |||
| 3c0b27a57c | |||
| 48a490c600 |
@@ -0,0 +1,17 @@
|
||||
diff --git a/cmake/targets/BuildBrotli.cmake b/cmake/targets/BuildBrotli.cmake
|
||||
index f9bc8d9601..8d9bfaf956 100644
|
||||
--- a/cmake/targets/BuildBrotli.cmake
|
||||
+++ b/cmake/targets/BuildBrotli.cmake
|
||||
@@ -7,12 +7,6 @@ register_repository(
|
||||
v1.1.0
|
||||
)
|
||||
|
||||
-# Tests fail with "BrotliDecompressionError" when LTO is enabled
|
||||
-# only on Linux x64 (non-baseline). It's a mystery.
|
||||
-if(LINUX AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|X86_64|x64|X64|amd64|AMD64" AND NOT ENABLE_BASELINE)
|
||||
- set(BROTLI_CMAKE_ARGS "-DCMAKE_C_FLAGS=-fno-lto")
|
||||
-endif()
|
||||
-
|
||||
register_cmake_command(
|
||||
TARGET
|
||||
brotli
|
||||
@@ -1,5 +1,8 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "bun-bin.spec"
|
||||
spec = "bun.spec"
|
||||
}
|
||||
labels {
|
||||
updbranch = 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
%define debug_package %nil
|
||||
%ifarch x86_64
|
||||
%global a x64-baseline
|
||||
%elifarch aarch64
|
||||
%global a aarch64
|
||||
%endif
|
||||
|
||||
%global appid sh.oven.bun
|
||||
|
||||
Name: bun-bin
|
||||
Version: 1.3.5
|
||||
Release: 1%?dist
|
||||
Summary: Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
|
||||
License: MIT
|
||||
URL: https://bun.sh
|
||||
Source0: https://github.com/oven-sh/bun/releases/download/bun-v%version/bun-linux-%a.zip
|
||||
Source1: sh.oven.bun.metainfo.xml
|
||||
BuildRequires: unzip anda-srpm-macros terra-appstream-helper
|
||||
|
||||
%description
|
||||
%summary.
|
||||
|
||||
%pkg_completion -bfz bun
|
||||
|
||||
%prep
|
||||
%autosetup -n bun-linux-%a
|
||||
cat<<EOF > LICENSE
|
||||
MIT License
|
||||
|
||||
Copyright (c) Jarred Sumner
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
EOF
|
||||
|
||||
%install
|
||||
declare -a shells=("zsh" "bash" "fish")
|
||||
for s in "${shells[@]}"; do
|
||||
SHELL=$s ./bun completions > bun.$s
|
||||
done
|
||||
|
||||
install -Dpm755 bun -t %buildroot%_bindir
|
||||
install -Dm644 bun.zsh %buildroot%zsh_completions_dir/_bun
|
||||
install -Dm644 bun.bash -t %buildroot%bash_completions_dir
|
||||
install -Dm644 bun.fish -t %buildroot%fish_completions_dir
|
||||
ln -s bun %buildroot%_bindir/bunx
|
||||
|
||||
%terra_appstream -o %{SOURCE1}
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%_bindir/bun
|
||||
%_bindir/bunx
|
||||
%{_datadir}/metainfo/sh.oven.bun.metainfo.xml
|
||||
@@ -0,0 +1,24 @@
|
||||
From 1d33218cfda59b6656aca0a7d85236e93c37658b Mon Sep 17 00:00:00 2001
|
||||
From: Carl Smedstad <carsme@archlinux.org>
|
||||
Date: Thu, 25 Dec 2025 14:37:31 +0100
|
||||
Subject: [PATCH 1/2] Fix webkit include paths
|
||||
|
||||
---
|
||||
cmake/tools/SetupWebKit.cmake | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/cmake/tools/SetupWebKit.cmake b/cmake/tools/SetupWebKit.cmake
|
||||
index aa07c060ec..29c4def156 100644
|
||||
--- a/cmake/tools/SetupWebKit.cmake
|
||||
+++ b/cmake/tools/SetupWebKit.cmake
|
||||
@@ -28,6 +28,7 @@ if(WEBKIT_LOCAL)
|
||||
# make jsc-compile-debug jsc-copy-headers
|
||||
include_directories(
|
||||
${WEBKIT_PATH}
|
||||
+ ${WEBKIT_PATH}/JavaScriptCore/Headers
|
||||
${WEBKIT_PATH}/JavaScriptCore/Headers/JavaScriptCore
|
||||
${WEBKIT_PATH}/JavaScriptCore/PrivateHeaders
|
||||
${WEBKIT_PATH}/bmalloc/Headers
|
||||
--
|
||||
2.52.0
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
%global appid sh.oven.Bun
|
||||
# Bun REQUIRES Clang, it uses flags GCC cannot support such as -glldb
|
||||
%global toolchain clang
|
||||
%if 0%{?fedora} >= 42
|
||||
%global llvm_major 20
|
||||
%global __cc clang-%{llvm_major}
|
||||
%global __cxx clang++-%{llvm_major}
|
||||
%global __cpp clang-cpp-%{llvm_major}
|
||||
%endif
|
||||
%global zig_version 0.15.2
|
||||
# We love programs with multiple levels of bootstrapping
|
||||
%bcond bootstrap 1
|
||||
%bcond webkit 1
|
||||
%bcond self_build %{without bootstrap}
|
||||
|
||||
Name: bun
|
||||
Version: 1.3.5
|
||||
Release: 2%?dist
|
||||
Summary: Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
|
||||
License: MIT
|
||||
URL: https://bun.sh
|
||||
Source0: https://github.com/oven-sh/bun/archive/refs/tags/%{name}-v%{version}.tar.gz
|
||||
Source1: sh.oven.Bun.metainfo.xml
|
||||
Patch0: bun-fix-webkit-include-paths.patch
|
||||
BuildRequires: anda-srpm-macros
|
||||
%if %{with self_build}
|
||||
BuildRequires: bun
|
||||
%endif
|
||||
BuildRequires: cargo
|
||||
BuildRequires: cargo-rpm-macros
|
||||
BuildRequires: ccache
|
||||
BuildRequires: clang%{?llvm_major}
|
||||
BuildRequires: cmake
|
||||
BuildRequires: cmake-rpm-macros
|
||||
%if %{with webkit}
|
||||
BuildRequires: git-core
|
||||
%endif
|
||||
BuildRequires: golang
|
||||
BuildRequires: glibc-common
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: libatomic-static
|
||||
BuildRequires: libicu-devel
|
||||
BuildRequires: libdeflate-devel
|
||||
BuildRequires: libstdc++-static
|
||||
BuildRequires: libtool
|
||||
BuildRequires: lld%{?llvm_major}
|
||||
BuildRequires: llvm%{?llvm_major}
|
||||
BuildRequires: mold
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: nodejs
|
||||
BuildRequires: pkg-config
|
||||
%if %{with webkit}
|
||||
BuildRequires: perl(English)
|
||||
BuildRequires: perl(FindBin)
|
||||
BuildRequires: perl(JSON::PP)
|
||||
BuildRequires: perl(Math::BigInt::Trace)
|
||||
%endif
|
||||
BuildRequires: perl(Math::BigInt)
|
||||
BuildRequires: python3
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: ruby
|
||||
BuildRequires: ruby-bundled-gems
|
||||
BuildRequires: sed
|
||||
BuildRequires: unzip
|
||||
%if %{with bootstrap}
|
||||
BuildRequires: yarnpkg-berry
|
||||
%endif
|
||||
BuildRequires: zig
|
||||
Requires: c-ares
|
||||
Requires: libarchive
|
||||
Requires: libuv
|
||||
Requires: mimalloc
|
||||
Requires: (zlib-ng-compat or zlib)
|
||||
Requires: zstd
|
||||
Obsoletes: bun-bin <= 1.3.5
|
||||
|
||||
%description
|
||||
%summary.
|
||||
|
||||
%package doc
|
||||
Summary: Doc files for Bun.
|
||||
|
||||
%description doc
|
||||
Documentation for Bun.
|
||||
|
||||
%pkg_completion -bfz bun
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{name}-v%{version}
|
||||
%cargo_prep_online
|
||||
|
||||
%if %{with webkit}
|
||||
git clone -c advice.detachedHead=false --recurse-submodules %{?_smp_mflags} https://github.com/oven-sh/WebKit.git vendor/WebKit --depth 1 -b autobuild-$(grep -Eom1 [a-f0-9]{40} cmake/tools/SetupWebKit.cmake)
|
||||
%endif
|
||||
|
||||
%build
|
||||
#CXXFLAGS="-Wno-unused-result ${CXXFLAGS}"
|
||||
#export CFLAGS="-Wno-unused-command-line-argument -I%{_includedir}/pthread.h"
|
||||
#export CXXFLAGS="-Wno-unused-command-line-argument -Wno-unused-result -Wno-missing-braces -Wno-reorder-ctor -Wno-unused-variable -Wno-unused-function -Wno-logical-op-parentheses -Wno-overloaded-virtual -fno-c++-static-destructors -include %{_includedir}/c++/*/cstdint"
|
||||
|
||||
%if %{with bootstrap}
|
||||
%set_node_build_flags
|
||||
%endif
|
||||
|
||||
# Force build Cargo config
|
||||
export CARGO_HOME="%{_cargo_home}"
|
||||
|
||||
%if %{defined llvm_major}
|
||||
export LLVM_DIR=%{_libdir}/llvm%{?llvm_major}/%{_lib}/cmake
|
||||
%endif
|
||||
|
||||
%if %{with webkit}
|
||||
pushd vendor/WebKit
|
||||
|
||||
%cmake \
|
||||
-DCMAKE_BUILD_TYPE="Release" \
|
||||
-Wno-dev \
|
||||
-DPORT="JSCOnly" \
|
||||
-DENABLE_STATIC_JSC="ON" \
|
||||
-DALLOW_LINE_AND_COLUMN_NUMBER_IN_BUILTINS="ON" \
|
||||
-DUSE_THIN_ARCHIVES="OFF" \
|
||||
-DUSE_BUN_JSC_ADDITIONS="ON" \
|
||||
-DUSE_BUN_EVENT_LOOP="ON" \
|
||||
-DENABLE_FTL_JIT="ON" \
|
||||
-DALLOW_LINE_AND_COLUMN_NUMBER_IN_BUILTINS="ON" \
|
||||
-DJSEXPORT_PRIVATE="WTF_EXPORT_DECLARATION" \
|
||||
-DUSE_VISIBILITY_ATTRIBUTE="1" \
|
||||
-DENABLE_REMOTE_INSPECTOR="ON" \
|
||||
-DCMAKE_C_FLAGS="$CFLAGS" \
|
||||
-DCMAKE_CXX_FLAGS="$CXXFLAGS -fno-c++-static-destructors" \
|
||||
-DCMAKE_C_COMPILER="$CC" \
|
||||
-DCMAKE_CXX_COMPILER="$CXX" \
|
||||
-DCMAKE_LINKER="ld.lld%{?llvm_major:-%{llvm_major}}" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -fuse-ld=lld%{?llvm_major:-%{llvm_major}}" \
|
||||
-DBUILD_SHARED_LIBS:BOOL="OFF"
|
||||
%cmake_build --target jsc
|
||||
|
||||
rm %{__cmake_builddir}/JavaScriptCore/DerivedSources/inspector/InspectorProtocolObjects.h
|
||||
|
||||
# Link system ICU libs
|
||||
ln -s %{_libdir}/libicudata.so.77.1 %{__cmake_builddir}/lib/libicudata.a
|
||||
ln -s %{_libdir}/libicui18n.so.77.1 %{__cmake_builddir}/lib/libicui18n.a
|
||||
ln -s %{_libdir}/libicuuc.so.77.1 %{__cmake_builddir}/lib/libicuuc.a
|
||||
|
||||
popd
|
||||
%endif
|
||||
|
||||
# Use system Zig if it is new enough
|
||||
%if %["%{zig_version}" >= "0.15.2"]
|
||||
rm -rf vendor/zig
|
||||
mkdir -p vendor/zig
|
||||
ln -sf /usr/lib/zig vendor/zig/lib
|
||||
ln -sf /usr/bin/zig vendor/zig/zig
|
||||
%else
|
||||
%cmake \
|
||||
|
||||
%endif
|
||||
|
||||
%{!?with_bootstrap:%{?with_self_build:%{__bun}}}%{?with_bootstrap:%{__yarn_dlx} bun} ./scripts/glob-sources.mjs
|
||||
|
||||
%cmake \
|
||||
-DCMAKE_BUILD_TYPE="Release" \
|
||||
-DUSE_STATIC_LIBATOMIC="OFF" \
|
||||
-DENABLE_CCACHE="ON" \
|
||||
-DENABLE_LTO="ON" \
|
||||
-DUSE_STATIC_SQLITE="OFF" \
|
||||
%ifnarch x86_64_v3 x86_64_v4
|
||||
-DENABLE_BASELINE="ON" \
|
||||
%endif
|
||||
-DCMAKE_C_FLAGS="$CFLAGS" \
|
||||
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
|
||||
-DCMAKE_C_COMPILER="$CC" \
|
||||
-DCMAKE_CXX_COMPILER="$CXX" \
|
||||
-DCMAKE_LINKER="ld.lld%{?llvm_major:-%{llvm_major}}" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -fuse-ld=lld%{?llvm_major:-%{llvm_major}}" \
|
||||
-DCMAKE_AR="/usr/bin/llvm-ar%{?llvm_major:-%{llvm_major}}" \
|
||||
-DLLD_PROGRAM="ld.lld%{?llvm_major:-%{llvm_major}}" \
|
||||
-DUSE_STATIC_SQLITE="OFF" \
|
||||
-DALWAYS_RUN \
|
||||
%if %["%{zig version}" >= "0.15.2"]
|
||||
-DZIG_PATH="/usr/bin/zig" \
|
||||
%endif
|
||||
-DBUILD_SHARED_LIBS:BOOL="OFF" \
|
||||
%if %{with webkit}
|
||||
-DWEBKIT_LOCAL="ON" \
|
||||
-DWEBKIT_PATH="$PWD/vendor/WebKit/%{__cmake_builddir}"
|
||||
%endif
|
||||
|
||||
%cmake_build --target %{name}
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
%terra_appstream -o %{SOURCE1}
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_bindir}/bun
|
||||
%{_bindir}/bunx
|
||||
%{_datadir}/metainfo/sh.oven.Bun.metainfo.xml
|
||||
|
||||
%files doc
|
||||
%doc docs/*
|
||||
@@ -1 +1,7 @@
|
||||
import anda/bump_extras.rhai as bump;
|
||||
|
||||
rpm.version(gh_rawfile("oven-sh/bun", "main", "LATEST"));
|
||||
|
||||
if rpm.changed {
|
||||
rpm.global("zig_version", bump::bodhi("zig", as_bodhi_ver(labels.branch)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user