%ifarch %{arm} %bcond_with bootstrap %else %bcond_with bootstrap %endif %bcond_without docs %bcond_with avx2 %define sbcl_shell /bin/bash %ifarch %{ix86} %define sbcl_arch x86 %endif %ifarch x86_64 %define sbcl_arch x86-64 %endif %ifarch %{arm} %define sbcl_arch arm %if %{with bootstrap} %define bootstrap_src -b 11 %define bootstrap_dir sbcl-1.4.11-armhf-linux %endif %endif %ifarch aarch64 %define sbcl_arch arm64 %if %{with bootstrap} %define bootstrap_src -b 12 %define bootstrap_dir sbcl-1.4.2-arm64-linux %endif %endif Name: sbcl Version: 2.2.10 Release: %mkrel 1 Summary: Steel Bank Common Lisp compiler and runtime system License: Public Domain and MIT and BSD with advertising Group: Development/Other URL: http://sbcl.sourceforge.net/ Source0: https://downloads.sourceforge.net/sbcl/sbcl-%{version}-source.tar.bz2 Source1: https://downloads.sourceforge.net/sbcl/sbcl-%{version}-documentation-html.tar.bz2 #Source11: https://downloads.sourceforge.net/sbcl/sbcl-1.4.11-armhf-linux-binary.tar.bz2 #Source12: https://downloads.sourceforge.net/sbcl/sbcl-1.4.2-arm64-linux-binary.tar.bz2 Patch2: sbcl-1.4.12-personality.patch Patch6: sbcl-2.0.10-arm.patch # From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931795 Patch7: sbcl-2.2.10-armv7.patch Patch8: sbcl-2.2.10-fix-o_largefile.patch ## upstreamable patches Patch50: sbcl-2.0.1-generate_version.patch # from gentoo # modified from https://bugs.gentoo.org/468482 Patch100: concurrency-test-2.2.10.patch Patch101: sb-posix-test-2.2.10.patch Patch102: bsd-sockets-test-2.2.10.patch Patch103: verbose-build-2.2.10.patch Patch200: sbcl-git-20221119-upstream-coalesced.patch # Patch202: sbcl-2.2.10-optflags.patch Patch203: sbcl-2.2.10-increase-control-stack-size.patch BuildRequires: emacs-common BuildRequires: gcc BuildRequires: zlib-devel # %%check/tests BuildRequires: ed BuildRequires: hostname BuildRequires: pkgconfig(libzstd) %if %{with docs} # doc generation BuildRequires: ghostscript BuildRequires: texinfo BuildRequires: time %endif %if %{without bootstrap} BuildRequires: %{name} %endif %description Steel Bank Common Lisp (SBCL) is a Open Source development environment for Common Lisp. It includes an integrated native compiler, interpreter, and debugger. %prep %autosetup -p1 %{?bootstrap_src} # fix permissions (some have eXecute bit set) find . -name '*.c' | xargs chmod 644 # set version.lisp-expr sed -i.rpmver -e "s|\"%{version}\"|\"%{version}-%{release}\"|" version.lisp-expr %build %set_build_flags %{?sbcl_arch:export SBCL_ARCH=%{sbcl_arch}} %{?sbcl_shell} \ ./make.sh \ --prefix=%{_prefix} \ %if %without avx2 --without-sb-simd \ %else --with-sb-simd \ %endif --with-sb-core-compression \ %{?with_bootstrap:--xc-host="$(pwd)/../%{bootstrap_dir}/run-sbcl.sh"} \ %nil # docs %if %{with docs} make -C doc/manual info # Handle pre-generated docs tar xvjf %{SOURCE1} cp -av %{name}-%{version}/doc/manual/* doc/manual/ %endif %install export INSTALL_ROOT=%{buildroot}%{_prefix} export LIB_DIR=%{buildroot}%{_libdir} %{?sbcl_shell} ./install.sh # handle docs in files section rm -rf %{buildroot}%{_docdir} # 'test-passed' files from %%check find %{buildroot} -name 'test-passed' | xargs rm -vf %files %license COPYING %doc BUGS CREDITS NEWS %{_bindir}/* %dir %{_prefix}/lib/%{name}/ %{_prefix}/lib/%{name}/sbcl.core %{_prefix}/lib/%{name}/sbcl.mk %dir %{_prefix}/lib/%{name}/contrib %{_prefix}/lib/%{name}/contrib/asdf.* %{_prefix}/lib/%{name}/contrib/sb-aclrepl.* %{_prefix}/lib/%{name}/contrib/sb-bsd-sockets.* %{_prefix}/lib/%{name}/contrib/sb-capstone.* %{_prefix}/lib/%{name}/contrib/sb-cltl2.* %{_prefix}/lib/%{name}/contrib/sb-concurrency.* %{_prefix}/lib/%{name}/contrib/sb-cover.* %{_prefix}/lib/%{name}/contrib/sb-executable.* %{_prefix}/lib/%{name}/contrib/sb-gmp.* %{_prefix}/lib/%{name}/contrib/sb-graph.* %{_prefix}/lib/%{name}/contrib/sb-grovel.* %{_prefix}/lib/%{name}/contrib/sb-introspect.* %{_prefix}/lib/%{name}/contrib/sb-md5.* %{_prefix}/lib/%{name}/contrib/sb-mpfr.* %{_prefix}/lib/%{name}/contrib/sb-posix.* %{_prefix}/lib/%{name}/contrib/sb-queue.* %{_prefix}/lib/%{name}/contrib/sb-rotate-byte.* %{_prefix}/lib/%{name}/contrib/sb-rt.* %ifarch x86_64 %if %with avx2 %{_prefix}/lib/%{name}/contrib/sb-simd.asd %{_prefix}/lib/%{name}/contrib/sb-simd.fasl %endif %endif %{_prefix}/lib/%{name}/contrib/sb-simple-streams.* %{_prefix}/lib/%{name}/contrib/sb-sprof.* %{_prefix}/lib/%{name}/contrib/uiop.* %{_mandir}/man?/* %if %{with docs} %doc doc/manual/sbcl.html %doc doc/manual/asdf.html %{_infodir}/asdf.info* %{_infodir}/sbcl.info* %endif