From 0f113b83e067a8330c3ee379043221d2b77538b9 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 17:35:27 +0100 Subject: [PATCH] package created using the webbuild interface [release 1.25.0-1mamba;Mon Apr 09 2018] --- README.md | 2 + rustc-1.25.0-disable-llvm-ocaml-binding.patch | 33 ++++ rustc.spec | 170 ++++++++++++++++++ 3 files changed, 205 insertions(+) create mode 100644 rustc-1.25.0-disable-llvm-ocaml-binding.patch create mode 100644 rustc.spec diff --git a/README.md b/README.md index bb0de6c..e33566e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # rustc +The Rust programming language, designed to be a safe, concurrent, practical language. + diff --git a/rustc-1.25.0-disable-llvm-ocaml-binding.patch b/rustc-1.25.0-disable-llvm-ocaml-binding.patch new file mode 100644 index 0000000..7d764ae --- /dev/null +++ b/rustc-1.25.0-disable-llvm-ocaml-binding.patch @@ -0,0 +1,33 @@ +--- src/llvm/cmake/config-ix.cmake 2017-12-14 22:25:15.988551420 +0100 ++++ src/llvm/cmake/config-ix.cmake.no_llvm_ocaml_bindings 2017-12-14 22:35:08.087110357 +0100 +@@ -564,29 +564,6 @@ + # Keep the version requirements in sync with bindings/ocaml/README.txt. + include(FindOCaml) + include(AddOCaml) +-if(WIN32) +- message(STATUS "OCaml bindings disabled.") +-else() +- find_package(OCaml) +- if( NOT OCAML_FOUND ) +- message(STATUS "OCaml bindings disabled.") +- else() +- if( OCAML_VERSION VERSION_LESS "4.00.0" ) +- message(STATUS "OCaml bindings disabled, need OCaml >=4.00.0.") +- else() +- find_ocamlfind_package(ctypes VERSION 0.4 OPTIONAL) +- if( HAVE_OCAML_CTYPES ) +- message(STATUS "OCaml bindings enabled.") +- find_ocamlfind_package(oUnit VERSION 2 OPTIONAL) +- set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml") +- +- set(LLVM_OCAML_INSTALL_PATH "${OCAML_STDLIB_PATH}" CACHE STRING +- "Install directory for LLVM OCaml packages") +- else() +- message(STATUS "OCaml bindings disabled, need ctypes >=0.4.") +- endif() +- endif() +- endif() +-endif() ++message(STATUS "OCaml bindings disabled.") + + string(REPLACE " " ";" LLVM_BINDINGS_LIST "${LLVM_BINDINGS}") diff --git a/rustc.spec b/rustc.spec new file mode 100644 index 0000000..2cfd4e7 --- /dev/null +++ b/rustc.spec @@ -0,0 +1,170 @@ +%define stage1 1 +Name: rustc +Version: 1.25.0 +Release: 1mamba +Summary: The Rust programming language, designed to be a safe, concurrent, practical language +Group: Applications/Development +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://www.rust-lang.org +Source: https://static.rust-lang.org/dist/rustc-%{version}-src.tar.gz +Patch0: rustc-1.25.0-disable-llvm-ocaml-binding.patch +License: MIT +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libcurl-devel +BuildRequires: libgcc +BuildRequires: libopenssl-devel +BuildRequires: libssh2-devel +BuildRequires: libstdc++6-devel +BuildRequires: libz-devel +## AUTOBUILDREQ-END +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} +%if "%{stage1}" != "1" +BuildRequires: rustc +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +The Rust programming language, designed to be a safe, concurrent, practical language. + +%package -n lib%{name} +Group: System/Libraries +Summary: Shared libraries for %{name} + +%description -n lib%{name} +This package contains shared libraries for %{name}. + +%package apidocs +Group: Documentation +Summary: Documentation for %{name} + +%description apidocs +This package contains the documentation for %{name}. + +%debug_package + +%prep +%setup -q -n %{name}-%{version}-src +#-D -T +#:<< _EOF +%patch0 -p0 + +cat < config.toml +# see config.toml.example for more possible options +[llvm] +ninja = true + +[build] +%if "%{stage1}" != "1" +cargo = "/usr/bin/cargo" +rustc = "/usr/bin/rustc" +%endif +python = "python2.7" +extended = true +sanitizers = false + +[install] +prefix = "%{_prefix}" +libdir = "%{_lib}" +docdir = "share/doc/rust" + +[rust] +# 0 or the new default of 16 is faster, but can result in worse performance +# https://github.com/rust-lang/rust/issues/47745 +codegen-units = 1 +debuginfo = true +debuginfo-lines = true +channel = "stable" +rpath = false +EOF + +%build +#:<< _EOF +./x.py build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +DESTDIR=%{buildroot} ./x.py install + +cd %{buildroot}%{_libdir} +rm rustlib/{components,manifest-rustc,rust-installer-version} +%ifarch %{ix86} +ln -sf rustlib/i686-unknown-linux-gnu/lib/*.so . +%else +ln -sf rustlib/%{_arch}-unknown-linux-gnu/lib/*.so . +%endif +cd - + +%find_lang %{name} || touch %{name}.lang + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -n lib%{name} -p /sbin/ldconfig +%postun -n lib%{name} -p /sbin/ldconfig + +%files -f %{name}.lang +%defattr(-,root,root) +%{_sysconfdir}/bash_completion.d/cargo +%{_bindir}/cargo +%{_bindir}/cargo-fmt +%{_bindir}/rls +%{_bindir}/rust-gdb +%{_bindir}/rust-lldb +%{_bindir}/rustc +%{_bindir}/rustdoc +%{_bindir}/rustfmt +%{_mandir}/man1/cargo-*.1* +%{_mandir}/man1/cargo.1* +%{_mandir}/man1/rustc.1* +%{_mandir}/man1/rustdoc.1* +%{_datadir}/zsh/site-functions/_cargo + +%files -n lib%{name} +%defattr(-,root,root) +%{_libdir}/libarena-*.so +%{_libdir}/libfmt_macros-*.so +%{_libdir}/libgraphviz-*.so +%{_libdir}/libproc_macro-*.so +%{_libdir}/librustc*.so +%{_libdir}/libserialize-*.so +%{_libdir}/libstd-*.so +%{_libdir}/libsyntax*.so +%{_libdir}/libterm-*.so +%{_libdir}/libtest-*.so +%dir %{_libdir}/rustlib +%dir %{_libdir}/rustlib/etc +%{_libdir}/rustlib/etc/* +%{_libdir}/rustlib/install.log +%{_libdir}/rustlib/manifest-* +%dir %{_libdir}/rustlib/src +%dir %{_libdir}/rustlib/src/rust +%dir %{_libdir}/rustlib/src/rust/src +%{_libdir}/rustlib/src/rust/src/* +%{_libdir}/rustlib/uninstall.sh +%ifarch %{ix86} +%dir %{_libdir}/rustlib/i686-unknown-linux-gnu +%{_libdir}/rustlib/i686-unknown-linux-gnu/* +%else +%dir %{_libdir}/rustlib/%{_arch}-unknown-linux-gnu +%{_libdir}/rustlib/%{_arch}-unknown-linux-gnu/* +%endif + +%files apidocs +%defattr(-,root,root) +%dir %{_datadir}/doc/rust +%{_datadir}/doc/rust/COPYRIGHT +%{_datadir}/doc/rust/LICENSE-* +%{_datadir}/doc/rust/README.md +%{_datadir}/doc/rust/README.md.old +%{_datadir}/doc/rust/html/.lock +%{_datadir}/doc/rust/html/.stamp +%dir %{_datadir}/doc/rust/html +%{_datadir}/doc/rust/html/* +%doc README.md + +%changelog +* Mon Apr 09 2018 Silvan Calarco 1.25.0-1mamba +- package created using the webbuild interface