From 4dcd467b916ea140945ccae22634cc07754794d39cc3a4d4da0f2fdace3d58ee Mon Sep 17 00:00:00 2001 From: Luke Jones Date: Fri, 1 Mar 2019 07:54:42 +0000 Subject: [PATCH] Accepting request 680354 from home:luke_nukem:branches:devel:languages:rust - Bump minimum LLVM to 7.0 - Add conditions to build SLE versions with bundled libgit2 and libssh2 OBS-URL: https://build.opensuse.org/request/show/680354 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=195 --- rust.changes | 7 +++++++ rust.spec | 25 ++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/rust.changes b/rust.changes index 683fdbb..5ea36ce 100644 --- a/rust.changes +++ b/rust.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Mar 1 06:57:58 UTC 2019 - Luke Jones + +- Bump minimum LLVM to 7.0 +- Add conditions to build SLE versions with bundled libgit2 and + libssh2 + ------------------------------------------------------------------- Thu Feb 28 17:08:08 UTC 2019 - Federico Mena Quintero diff --git a/rust.spec b/rust.spec index 01c6a35..393388b 100644 --- a/rust.spec +++ b/rust.spec @@ -60,7 +60,7 @@ %bcond_without bundled_llvm %endif # Leap 42 to 42.3, SLE12 SP1 to SLE12 SP3 -%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120300 +%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120400 %bcond_without bundled_llvm %endif @@ -113,10 +113,13 @@ BuildRequires: pkgconfig BuildRequires: procps BuildRequires: python3-base BuildRequires: pkgconfig(libcurl) -%if !%with rust_bootstrap +# The following requires must mirror: +# LIBGIT2_SYS_USE_PKG_CONFIG && +# LIBSSH2_SYS_USE_PKG_CONFIG +%if !%with rust_bootstrap || 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120400 BuildRequires: pkgconfig(libgit2) >= 0.23 -%endif BuildRequires: pkgconfig(libssh2) >= 1.4.3 +%endif BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(zlib) # The compiler is not generally useful without the std library installed @@ -134,7 +137,7 @@ ExclusiveArch: i686 %endif # Real LLVM minimum version should be 7.x, but rust has a fallback mode %if !%with bundled_llvm -BuildRequires: llvm-devel >= 6.0 +BuildRequires: llvm-devel >= 7.0 %endif %if !%with rust_bootstrap # We will now package cargo using the version number of rustc since @@ -402,6 +405,7 @@ if [ $(%{rust_root}/bin/rustc --version | sed -En 's/rustc ([0-9].[0-9][0-9].[0- sed -i -e "s|#local-rebuild = false|local-rebuild = true|" config.toml; fi +# BEGIN EXPORTS # Keep all the "export VARIABLE" together here, so they can be # cut&pasted to the %install section below. And please keep them # in sync! @@ -410,31 +414,34 @@ fi export RUSTFLAGS="%{rustflags}" # Cargo use system libs if not bootstrapping # restircted only to libgit due to version changes causing with cargo rpm deps -%if !%with rust_bootstrap +%if !%with rust_bootstrap || 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120400 export LIBGIT2_SYS_USE_PKG_CONFIG=1 -%endif export LIBSSH2_SYS_USE_PKG_CONFIG=1 +%endif # eliminate complain from RPMlint export CPPFLAGS="%{optflags}" +# END EXPORTS ./x.py build -v ./x.py doc -v %install +# BEGIN EXPORTS # Keep all the "export VARIABLE" together here, so they can be -# cut&pasted to the %build section above. And please keep them +# cut&pasted to the %install section below. And please keep them # in sync! # If the environments between build and install and different, # everything will be rebuilt during installation! export RUSTFLAGS="%{rustflags}" # Cargo use system libs if not bootstrapping # restircted only to libgit due to version changes causing with cargo rpm deps -%if !%with rust_bootstrap +%if !%with rust_bootstrap || 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120400 export LIBGIT2_SYS_USE_PKG_CONFIG=1 -%endif export LIBSSH2_SYS_USE_PKG_CONFIG=1 +%endif # eliminate complain from RPMlint export CPPFLAGS="%{optflags}" +# END EXPORTS DESTDIR=%{buildroot} ./x.py install DESTDIR=%{buildroot} ./x.py install src