SHA256
1
0
forked from pool/alacritty

Accepting request 921931 from home:firstyear:branches:X11:terminals

- Replace rust-packaging with cargo-packaging

OBS-URL: https://build.opensuse.org/request/show/921931
OBS-URL: https://build.opensuse.org/package/show/X11:terminals/alacritty?expand=0&rev=49
This commit is contained in:
Matthias Eliasson 2021-10-02 12:36:03 +00:00 committed by Git OBS Bridge
parent f754cc39ee
commit 949bbea4d6
7 changed files with 29 additions and 54 deletions

View File

@ -3,7 +3,7 @@
--> -->
<services> <services>
<service name="tar_scm" mode="manual"> <service name="obs_scm" mode="disabled">
<param name="scm">git</param> <param name="scm">git</param>
<param name="url">https://github.com/alacritty/alacritty.git</param> <param name="url">https://github.com/alacritty/alacritty.git</param>
<param name="revision">fed349aa2c567cbba900d56f72a830be45e0dfc8</param> <param name="revision">fed349aa2c567cbba900d56f72a830be45e0dfc8</param>
@ -26,10 +26,18 @@
--> -->
<param name="exclude">alacritty_terminal/tests</param> <param name="exclude">alacritty_terminal/tests</param>
</service> </service>
<service name="tar" mode="manual"/> <service name="tar" mode="disabled"/>
<service name="recompress" mode="manual"> <service name="recompress" mode="disabled">
<param name="file">*.tar</param> <param name="file">*.tar</param>
<param name="compression">xz</param> <param name="compression">xz</param>
</service> </service>
<service name="cargo_vendor" mode="disabled">
<param name="srcdir">alacritty</param>
<param name="compression">xz</param>
<param name="update">true</param>
</service>
<service name="cargo_audit" mode="disabled">
<param name="srcdir">alacritty</param>
</service>
</services> </services>

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:3b4bed2a661886599537b025525b04760b5ce70d5b32bd6c6a6ff3d3a9bba35a oid sha256:95fded611f8396a4ed2dcea94d264ae03e69ab0619fdda586ea97c7f7b15afad
size 338720 size 960252

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Sep 28 05:51:17 UTC 2021 - William Brown <william.brown@suse.com>
- Replace rust-packaging with cargo-packaging
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Aug 9 06:50:04 UTC 2021 - Aleksa Sarai <asarai@suse.com> Mon Aug 9 06:50:04 UTC 2021 - Aleksa Sarai <asarai@suse.com>

View File

@ -24,16 +24,15 @@ License: Apache-2.0
URL: https://github.com/alacritty/alacritty URL: https://github.com/alacritty/alacritty
Source0: %{name}-%{version}.tar.xz Source0: %{name}-%{version}.tar.xz
Source1: vendor.tar.xz Source1: vendor.tar.xz
Source2: cargo_config
Source3: README.suse-maint Source3: README.suse-maint
# cargo vendor supplement BuildRequires: cargo-packaging
Source99: revendor_source.sh
BuildRequires: cmake BuildRequires: cmake
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: freetype-devel BuildRequires: freetype-devel
BuildRequires: libxcb-devel BuildRequires: libxcb-devel
BuildRequires: libxkbcommon-devel BuildRequires: libxkbcommon-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: rust-packaging
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: xclip BuildRequires: xclip
BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(fontconfig)
@ -70,20 +69,10 @@ The official zsh completion script for alacritty.
%prep %prep
%autosetup -a1 %autosetup -a1
%define cargo_registry $(pwd)/vendor mkdir .cargo
%{cargo_prep} cp %{SOURCE2} .cargo/config
%ifarch aarch64 ppc64le riscv64
# Remove checksum of config.guess and config.sub since aarch64 and ppc64le modify them
sed -i 's#"expat/conftools/config.guess":"ebaffe1c6683ae2c3dcabb87825a83b892f00391514756f7640c4a3dcafbad4f",##g' ./vendor/expat-sys/.cargo-checksum.json
sed -i 's#"expat/conftools/config.sub":"523cb028db907d1fbbcecdcac6737f9e2eeba48fb639231dbc5ae69238f276c9",##g' ./vendor/expat-sys/.cargo-checksum.json
%endif
%ifarch riscv64
sed -i -e 's#"config.guess":"e0c1d7ef8ce964fb57c35e7704ae8661d7e4ca87d6a3c18950e503ae26b62319",##' -e 's#"config.sub":"f7e62c3cb15cd5bbc4e7f3617793b227481fc554d39697a9c322a266d20fb626",##' vendor/servo-fontconfig-sys/.cargo-checksum.json
%endif
%build %build
export CARGO_NET_OFFLINE=true
%{cargo_build} %{cargo_build}
%install %install

5
cargo_config Normal file
View File

@ -0,0 +1,5 @@
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"

View File

@ -1,32 +0,0 @@
#!/bin/sh
set -euo pipefail
# packaging helper to workaround:
# https://github.com/rust-lang/cargo/issues/7058
wd="$(mktemp -d /tmp/revendor.XXXXXXXXXX)"
# take what we need into the build
cp vendor*xz $wd
cd $wd
echo -n "Extracting vendor..."
tar xf vendor*xz
echo "done"
echo -n "Ejecting winapi bloat... "
rm -fr vendor/winapi*gnu*/lib/*.a
echo "done"
# remake tarball
echo -n "Compressing archive... "
tar -cf - vendor/ | xz -9 -c - > vendor-merged.tar.xz
echo "done"
cd -
echo -n "Replacing tarball... "
cp $wd/vendor-merged.tar.xz vendor.tar.xz
rm -fr $wd
echo "ok"

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:626f2061c9e170b990a763a4bfa342dd6fb50e9cdb6a05e122d274401b390ee9 oid sha256:c5662a441145cb82b4aff9a70f753fa592175362d6eaedae2af761d1ceaac676
size 7992240 size 11832896