From: Marcin Krol Date: Sat, 2 Apr 2022 13:55:57 +0000 (+0200) Subject: - merged 2013 from PLD X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=a8b462c1f839b0f67d81b5f94047e6e0f50c67d4;p=packages%2Frpm-tld-macros.git - merged 2013 from PLD --- diff --git a/macros.go b/macros.go index a310a5c..2cdd8f9 100644 --- a/macros.go +++ b/macros.go @@ -25,6 +25,11 @@ %endif \ %ifarch %{ix86} \ GOARCH=${GOARCH-386} \\\ +%ifarch %{x86_with_sse2} \ + GO386=${GO386-sse2} \\\ +%else \ + GO386=${GO386-softfloat} \\\ +%endif \ %endif \ %ifarch %{x8664} \ GOARCH=${GOARCH-amd64} \\\ @@ -32,7 +37,7 @@ %ifarch mips mips64 ppc64 ppc64le riscv64 s390x \ GOARCH=${GOARCH-%{_arch}} \\\ %endif \ - %{?go_cachedir:GOCACHE="%{go_cachedir}"} \\\ + %{?go_cachedir:GOCACHE="${GOCACHE-%{go_cachedir}}"} \\\ %{?__jobs:GOMAXPROCS=%{__jobs}} \\\ GOOS=${GOOS-linux} \\\ /usr/bin/go diff --git a/macros.python b/macros.python index 7b67e8d..5a012b5 100644 --- a/macros.python +++ b/macros.python @@ -25,7 +25,7 @@ # Python 3.x # python main version %__python3 /usr/bin/python3 -%py3_ver %{expand:%%global py3_ver %(%{__python3} -c "import sys; print(sys.version[:3])" 2>/dev/null || echo ERROR)}%py3_ver +%py3_ver %{expand:%%global py3_ver %(%{__python3} -c "from sys import version_info; print('{}.{}'.format(*version_info[:2]))" 2>/dev/null || echo ERROR)}%py3_ver # directories %py3_prefix %{expand:%%global py3_prefix %(%{__python3} -c "import sys; print(sys.prefix)" 2>/dev/null || echo ERROR)}%py3_prefix diff --git a/macros.rust b/macros.rust index 3f61146..9ad61a0 100644 --- a/macros.rust +++ b/macros.rust @@ -2,7 +2,7 @@ %rpmrustflags %debuginforustflags %rust_arches %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl -%cargo_target \\\ +%rust_target \\\ %ifarch i586\ i586-unknown-linux-gnu\\\ %endif\ @@ -29,8 +29,9 @@ thumbv7neon-unknown-linux-gnueabihf\\\ %endif\ %{nil} +%cargo_target %rust_target %cargo_targetdir target -%cargo_objdir %{?buildsubdir:%{_builddir}/%{buildsubdir}/}%{cargo_targetdir}/%{cargo_target}/%{!?debug:release}%{?debug:debug} +%cargo_objdir %{?buildsubdir:%{_builddir}/%{buildsubdir}/}%{cargo_targetdir}/%{rust_target}/%{!?debug:release}%{?debug:debug} %__cargo /usr/bin/cargo %__cargo_common_opts -v --offline @@ -44,7 +45,7 @@ thumbv7neon-unknown-linux-gnueabihf\\\ RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" \\\ %{?__jobs:CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-%{__jobs}}"} \\\ %{__cargo} %{__cargo_common_opts} build %{!?debug:--release} \\\ - --target %{cargo_target} \\\ + --target %{rust_target} \\\ --target-dir %{cargo_targetdir} \\\ %{nil} @@ -58,6 +59,6 @@ thumbv7neon-unknown-linux-gnueabihf\\\ RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" \\\ %{?__jobs:CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-%{__jobs}}"} \\\ %{__cargo} %{__cargo_common_opts} install \\\ - --target %{cargo_target} \\\ + --target %{rust_target} \\\ --target-dir %{cargo_targetdir} \\\ %{nil} diff --git a/macros.tld b/macros.tld index 366637d..307702c 100644 --- a/macros.tld +++ b/macros.tld @@ -194,7 +194,7 @@ pakietu oraz przy odpluskwianiu samego pakietu.\ %debugcppflags %{nil} %debugldflags %{nil} -%optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc +%optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc %{?use_ld:-Wl,-fuse-ld=%{use_ld}} %optcppflags %{nil} # common compilation flags diff --git a/rpm-tld-macros.spec b/rpm-tld-macros.spec index 8f3b07a..9649c7c 100644 --- a/rpm-tld-macros.spec +++ b/rpm-tld-macros.spec @@ -1,4 +1,4 @@ -%define rpm_macros_rev 2.011 +%define rpm_macros_rev 2.013 %define find_lang_rev 1.40 # split into individual X_prov_ver if there is a reason to desync %define prov_ver 4.15 @@ -6,7 +6,7 @@ Summary: TLD Linux RPM macros Summary(pl.UTF-8): Makra RPM dla Linuksa TLD Name: rpm-tld-macros Version: %{rpm_macros_rev} -Release: 7 +Release: 1 License: GPL v2+ Group: Development/Building Source0: macros.tld