1 |
%ifarch %{arm} |
2 |
%bcond_with bootstrap |
3 |
%else |
4 |
%bcond_with bootstrap |
5 |
%endif |
6 |
|
7 |
%bcond_without docs |
8 |
|
9 |
%define sbcl_shell /bin/bash |
10 |
|
11 |
%ifarch %{ix86} |
12 |
%define sbcl_arch x86 |
13 |
%endif |
14 |
|
15 |
%ifarch x86_64 |
16 |
%define sbcl_arch x86-64 |
17 |
%endif |
18 |
|
19 |
%ifarch %{arm} |
20 |
%define sbcl_arch arm |
21 |
%if %{with bootstrap} |
22 |
%define bootstrap_src -b 11 |
23 |
%define bootstrap_dir sbcl-1.4.11-armhf-linux |
24 |
%endif |
25 |
%endif |
26 |
|
27 |
%ifarch aarch64 |
28 |
%define sbcl_arch arm64 |
29 |
%if %{with bootstrap} |
30 |
%define bootstrap_src -b 12 |
31 |
%define bootstrap_dir sbcl-1.4.2-arm64-linux |
32 |
%endif |
33 |
%endif |
34 |
|
35 |
Name: sbcl |
36 |
Version: 2.1.7 |
37 |
Release: %mkrel 1 |
38 |
Summary: Steel Bank Common Lisp compiler and runtime system |
39 |
License: Public Domain and MIT and BSD with advertising |
40 |
Group: Development/Other |
41 |
URL: http://sbcl.sourceforge.net/ |
42 |
Source0: https://downloads.sourceforge.net/sbcl/sbcl-%{version}-source.tar.bz2 |
43 |
Source1: https://downloads.sourceforge.net/sbcl/sbcl-%{version}-documentation-html.tar.bz2 |
44 |
#Source11: https://downloads.sourceforge.net/sbcl/sbcl-1.4.11-armhf-linux-binary.tar.bz2 |
45 |
#Source12: https://downloads.sourceforge.net/sbcl/sbcl-1.4.2-arm64-linux-binary.tar.bz2 |
46 |
#Patch1: sbcl-1.4.12-default-sbcl-home.patch |
47 |
Patch2: sbcl-1.4.12-personality.patch |
48 |
#Patch3: sbcl-1.4.12-optflags.patch |
49 |
#Patch4: sbcl-2.0.1-LIB_DIR.patch |
50 |
#Patch5: sbcl-1.4.14-gcc10.patch |
51 |
Patch6: sbcl-2.0.10-arm.patch |
52 |
|
53 |
## upstreamable patches |
54 |
Patch50: sbcl-2.0.1-generate_version.patch |
55 |
|
56 |
# Modified from https://bugs.gentoo.org/468482 |
57 |
Patch100: sbcl-1.4.12-concurrency-test.patch |
58 |
|
59 |
BuildRequires: emacs-common |
60 |
BuildRequires: gcc |
61 |
BuildRequires: zlib-devel |
62 |
# %%check/tests |
63 |
BuildRequires: ed |
64 |
BuildRequires: hostname |
65 |
%if %{with docs} |
66 |
# doc generation |
67 |
BuildRequires: ghostscript |
68 |
BuildRequires: texinfo |
69 |
BuildRequires: time |
70 |
%endif |
71 |
%if %{without bootstrap} |
72 |
BuildRequires: %{name} |
73 |
%endif |
74 |
|
75 |
%description |
76 |
Steel Bank Common Lisp (SBCL) is a Open Source development environment for |
77 |
Common Lisp. It includes an integrated native compiler, interpreter, and |
78 |
debugger. |
79 |
|
80 |
|
81 |
%prep |
82 |
%autosetup -p1 %{?bootstrap_src} |
83 |
|
84 |
# fix permissions (some have eXecute bit set) |
85 |
find . -name '*.c' | xargs chmod 644 |
86 |
|
87 |
# set version.lisp-expr |
88 |
sed -i.rpmver -e "s|\"%{version}\"|\"%{version}-%{release}\"|" version.lisp-expr |
89 |
|
90 |
%build |
91 |
%set_build_flags |
92 |
|
93 |
%{?sbcl_arch:export SBCL_ARCH=%{sbcl_arch}} |
94 |
|
95 |
%{?sbcl_shell} \ |
96 |
./make.sh \ |
97 |
--prefix=%{_prefix} \ |
98 |
--with-sb-core-compression \ |
99 |
%{?with_bootstrap:--xc-host="$(pwd)/../%{bootstrap_dir}/run-sbcl.sh"} \ |
100 |
%nil |
101 |
|
102 |
# docs |
103 |
%if %{with docs} |
104 |
make -C doc/manual info |
105 |
|
106 |
# Handle pre-generated docs |
107 |
tar xvjf %{SOURCE1} |
108 |
cp -av %{name}-%{version}/doc/manual/* doc/manual/ |
109 |
%endif |
110 |
|
111 |
%install |
112 |
export INSTALL_ROOT=%{buildroot}%{_prefix} |
113 |
export LIB_DIR=%{buildroot}%{_libdir} |
114 |
%{?sbcl_shell} ./install.sh |
115 |
|
116 |
# handle docs in files section |
117 |
rm -rf %{buildroot}%{_docdir} |
118 |
|
119 |
# 'test-passed' files from %%check |
120 |
find %{buildroot} -name 'test-passed' | xargs rm -vf |
121 |
|
122 |
%files |
123 |
%license COPYING |
124 |
%doc BUGS CREDITS NEWS |
125 |
%{_bindir}/* |
126 |
%dir %{_prefix}/lib/%{name}/ |
127 |
%{_prefix}/lib/%{name}/sbcl.core |
128 |
%{_prefix}/lib/%{name}/sbcl.mk |
129 |
%dir %{_prefix}/lib/%{name}/contrib |
130 |
%{_prefix}/lib/%{name}/contrib/asdf.* |
131 |
%{_prefix}/lib/%{name}/contrib/sb-aclrepl.* |
132 |
%{_prefix}/lib/%{name}/contrib/sb-bsd-sockets.* |
133 |
%{_prefix}/lib/%{name}/contrib/sb-capstone.* |
134 |
%{_prefix}/lib/%{name}/contrib/sb-cltl2.* |
135 |
%{_prefix}/lib/%{name}/contrib/sb-concurrency.* |
136 |
%{_prefix}/lib/%{name}/contrib/sb-cover.* |
137 |
%{_prefix}/lib/%{name}/contrib/sb-executable.* |
138 |
%{_prefix}/lib/%{name}/contrib/sb-gmp.* |
139 |
%{_prefix}/lib/%{name}/contrib/sb-graph.* |
140 |
%{_prefix}/lib/%{name}/contrib/sb-grovel.* |
141 |
%{_prefix}/lib/%{name}/contrib/sb-introspect.* |
142 |
%{_prefix}/lib/%{name}/contrib/sb-md5.* |
143 |
%{_prefix}/lib/%{name}/contrib/sb-mpfr.* |
144 |
%{_prefix}/lib/%{name}/contrib/sb-posix.* |
145 |
%{_prefix}/lib/%{name}/contrib/sb-queue.* |
146 |
%{_prefix}/lib/%{name}/contrib/sb-rotate-byte.* |
147 |
%{_prefix}/lib/%{name}/contrib/sb-rt.* |
148 |
%{_prefix}/lib/%{name}/contrib/sb-simple-streams.* |
149 |
%{_prefix}/lib/%{name}/contrib/sb-sprof.* |
150 |
%{_prefix}/lib/%{name}/contrib/uiop.* |
151 |
%{_mandir}/man?/* |
152 |
%if %{with docs} |
153 |
%doc doc/manual/sbcl.html |
154 |
%doc doc/manual/asdf.html |
155 |
%{_infodir}/asdf.info* |
156 |
%{_infodir}/sbcl.info* |
157 |
%endif |