2008-10-15 17:21:01 +00:00
|
|
|
# Build options:
|
|
|
|
#
|
|
|
|
# --with termite
|
|
|
|
# The termite distributed programming system is currently broken
|
|
|
|
|
|
|
|
%define dirname gambc-v4_2_9
|
|
|
|
%define termite_rev 080714_2216
|
2008-06-19 05:56:46 +00:00
|
|
|
|
|
|
|
%if %($(pkg-config emacs) ; echo $?)
|
2008-10-15 17:21:01 +00:00
|
|
|
%define emacs_version 21.4
|
2008-06-19 05:56:46 +00:00
|
|
|
%define emacs_lispdir %{_datadir}/emacs/site-lisp
|
|
|
|
%define emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
|
|
|
|
%else
|
|
|
|
%define emacs_version %(pkg-config emacs --modversion)
|
|
|
|
%define emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
|
|
|
|
%define emacs_startdir %(pkg-config emacs --variable sitestartdir)
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Name: gambit-c
|
2008-10-15 17:21:01 +00:00
|
|
|
Version: 4.2.9
|
|
|
|
Release: 1%{?dist}
|
2008-06-19 05:56:46 +00:00
|
|
|
Summary: Gambit-C Scheme programming system
|
|
|
|
|
|
|
|
Group: Development/Languages
|
2008-06-19 22:48:50 +00:00
|
|
|
License: ASL 2.0 or LGPLv2
|
2008-06-19 05:56:46 +00:00
|
|
|
URL: http://www.iro.umontreal.ca/~gambit
|
|
|
|
Source0: http://www.iro.umontreal.ca/~gambit/download/gambit/v4.2/source/%{dirname}.tgz
|
2008-10-15 17:21:01 +00:00
|
|
|
|
|
|
|
%if %{?_with_termite:1}%{!?_with_termite:0}
|
|
|
|
Source1: http://termite.googlecode.com/files/termite%{termite_rev}.tar.gz
|
|
|
|
%endif
|
2008-06-19 05:56:46 +00:00
|
|
|
Source2: gambit-init.el
|
|
|
|
Patch0: gambc-v4_2_8-modtime.patch
|
|
|
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
|
|
|
|
|
|
BuildRequires: emacs emacs-el
|
|
|
|
Requires: gcc
|
|
|
|
|
|
|
|
%description
|
|
|
|
Gambit-C includes a Scheme interpreter and a Scheme compiler which can
|
|
|
|
be used to build standalone executables. Because the compiler
|
|
|
|
generates portable C code it is fairly easy to port to any platform
|
|
|
|
with a decent C compiler.
|
|
|
|
|
|
|
|
The Gambit-C system conforms to the R4RS, R5RS and IEEE Scheme
|
|
|
|
standards. The full numeric tower is implemented, including: infinite
|
|
|
|
precision integers (bignums), rationals, inexact reals (floating point
|
|
|
|
numbers), and complex numbers.
|
|
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
Group: Documentation
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires(post): info
|
|
|
|
Requires(preun): info
|
|
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Gambit-C includes a Scheme interpreter and a Scheme compiler which can
|
|
|
|
be used to build standalone executables. Because the compiler
|
|
|
|
generates portable C code it is fairly easy to port to any platform
|
|
|
|
with a decent C compiler.
|
|
|
|
|
|
|
|
This package contains the Gambit-C user manual in HTML and PDF formats.
|
|
|
|
|
|
|
|
|
2008-10-15 17:21:01 +00:00
|
|
|
%if %{?_with_termite:1}%{!?_with_termite:0}
|
2008-06-19 22:48:50 +00:00
|
|
|
%package termite
|
|
|
|
Summary: Termite distributed programming system
|
|
|
|
Group: Development/Languages
|
|
|
|
URL: http://www.toute.ca/
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description termite
|
|
|
|
Termite is an Erlang-like distributed programming system written in Scheme.
|
|
|
|
|
|
|
|
|
2008-07-15 14:41:36 +00:00
|
|
|
%package termite-doc
|
|
|
|
Summary: Examples for the Termite distributed programming system
|
|
|
|
Group: Documentation
|
|
|
|
Requires: %{name}-termite = %{version}-%{release}
|
2008-06-19 22:48:50 +00:00
|
|
|
|
2008-07-15 14:41:36 +00:00
|
|
|
%description termite-doc
|
2008-06-19 22:48:50 +00:00
|
|
|
Termite is an Erlang-like distributed programming system written in Scheme.
|
|
|
|
|
|
|
|
This package contains examples and benchmarks for Termite.
|
2008-10-15 17:21:01 +00:00
|
|
|
%endif
|
2008-06-19 22:48:50 +00:00
|
|
|
|
|
|
|
|
2008-06-19 05:56:46 +00:00
|
|
|
%package -n emacs-gambit
|
|
|
|
Summary: Gambit-C editing mode for Emacs
|
|
|
|
Group: Applications/Editors
|
2008-10-15 17:21:01 +00:00
|
|
|
%if %{?!fedora:7}%{?fedora} >= 8
|
2008-06-19 05:56:46 +00:00
|
|
|
Requires: emacs(bin) >= %{emacs_version}
|
2008-10-15 17:21:01 +00:00
|
|
|
%else
|
|
|
|
Requires: /usr/bin/emacs
|
|
|
|
%endif
|
2008-06-19 05:56:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
%description -n emacs-gambit
|
|
|
|
An Emacs mode for editing Gambit-C Scheme source code.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2008-10-15 17:21:01 +00:00
|
|
|
%if %{?_with_termite:1}%{!?_with_termite:0}
|
2008-06-19 22:48:50 +00:00
|
|
|
%setup -q -n %{dirname} -a1
|
2008-10-15 17:21:01 +00:00
|
|
|
%else
|
|
|
|
%setup -q -n %{dirname}
|
|
|
|
%endif
|
2008-06-19 05:56:46 +00:00
|
|
|
%patch0 -p1 -b .modtime
|
2008-06-19 22:48:50 +00:00
|
|
|
# Not using -b, as the directory content is moved to DESTDIR as a whole
|
|
|
|
# This way we don't end up with the unpatched file lying around
|
2008-10-15 17:21:01 +00:00
|
|
|
#patch1 -p0
|
2008-06-19 22:48:50 +00:00
|
|
|
|
2008-06-19 05:56:46 +00:00
|
|
|
find . -name '*.scm' | xargs chmod 0644
|
|
|
|
find examples -name '*.scm' | xargs sed -i 's|/usr/local/Gambit-C|/usr|g'
|
|
|
|
sed -i "s|\xE9|\xC3\xA9|g" doc/gambit-c.info-2
|
|
|
|
# Permission fixes
|
|
|
|
chmod -x lib/{mem.c,setup.h}
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%configure --enable-single-host \
|
|
|
|
--enable-gcc-opts \
|
2008-07-15 14:41:36 +00:00
|
|
|
--prefix=%{_libdir}/%{name}
|
2008-06-19 05:56:46 +00:00
|
|
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
# Compile emacs module
|
|
|
|
(cd misc && emacs -batch -f batch-byte-compile gambit.el)
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
make check
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2008-07-15 14:41:36 +00:00
|
|
|
make install prefix=$RPM_BUILD_ROOT%{_libdir}/%{name} \
|
|
|
|
includedir=$RPM_BUILD_ROOT%{_includedir}
|
2008-06-19 05:56:46 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|
|
|
for i in gsc gsi
|
|
|
|
do
|
|
|
|
ln -sf ../%{_lib}/%{name}/current/bin/$i $RPM_BUILD_ROOT%{_bindir}/$i
|
|
|
|
done
|
|
|
|
cat > $RPM_BUILD_ROOT%{_bindir}/gsix <<EOF
|
|
|
|
#!/bin/sh
|
|
|
|
%{_libdir}/%{name}/current/bin/six $@
|
|
|
|
EOF
|
|
|
|
chmod +x $RPM_BUILD_ROOT%{_bindir}/gsix
|
|
|
|
|
2008-06-19 22:48:50 +00:00
|
|
|
# Remove duplicate docs
|
2008-06-19 05:56:46 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/current/doc
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_infodir}
|
|
|
|
cp -a $RPM_BUILD_ROOT%{_libdir}/%{name}/current/info/* $RPM_BUILD_ROOT%{_infodir}
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/current/info
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/current/share
|
|
|
|
|
2008-06-19 22:48:50 +00:00
|
|
|
# Emacs mode files
|
2008-06-19 05:56:46 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{emacs_startdir}
|
|
|
|
cp -p misc/gambit.el* $RPM_BUILD_ROOT%{emacs_lispdir}
|
|
|
|
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{emacs_startdir}
|
|
|
|
|
2008-10-15 17:21:01 +00:00
|
|
|
# Link static libs
|
|
|
|
(cd $RPM_BUILD_ROOT%{_libdir} && ln -s %{name}/current/lib/*.a .)
|
|
|
|
|
|
|
|
%if %{?_with_termite:1}%{!?_with_termite:0}
|
2008-06-19 05:56:46 +00:00
|
|
|
# Termite
|
2008-06-19 22:48:50 +00:00
|
|
|
chmod 755 termite termite/examples
|
|
|
|
chmod -R g+r-w,o+r termite
|
|
|
|
cd termite
|
|
|
|
mv tsi $RPM_BUILD_ROOT%{_bindir}
|
2008-06-19 05:56:46 +00:00
|
|
|
|
|
|
|
# Fix script interpreters
|
2008-06-19 22:48:50 +00:00
|
|
|
find benchmarks examples otp -name '*.scm' | xargs \
|
|
|
|
sed -i 's|/usr/local/Gambit-C/bin/gsi|/usr/bin/gsi|g'
|
|
|
|
chmod +x otp/gen_event.scm
|
2008-06-19 05:56:46 +00:00
|
|
|
|
2008-06-19 22:48:50 +00:00
|
|
|
# Move docs
|
|
|
|
mkdir ../termite-doc ../termite-more-docs
|
|
|
|
mv CHANGELOG LICENSE README VERSION ../termite-doc
|
2008-10-15 17:21:01 +00:00
|
|
|
chmod a-x ../termite-doc/* ../termite-more-docs/benchmarks/*
|
2008-06-19 22:48:50 +00:00
|
|
|
mv benchmarks examples ../termite-more-docs
|
|
|
|
rm INSTALL
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
mv termite $RPM_BUILD_ROOT%{_libdir}/%{name}/current/lib
|
2008-10-15 17:21:01 +00:00
|
|
|
%endif
|
2008-06-19 05:56:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
|
|
%post doc
|
|
|
|
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
|
|
|
|
|
|
|
|
|
|
|
|
%preun doc
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc LGPL.txt LICENSE-2.0.txt README
|
2008-10-15 17:21:01 +00:00
|
|
|
%if %{?_with_termite:1}%{!?_with_termite:0}
|
2008-06-19 22:48:50 +00:00
|
|
|
%exclude %{_bindir}/tsi
|
2008-10-15 17:21:01 +00:00
|
|
|
%endif
|
2008-06-19 05:56:46 +00:00
|
|
|
%{_bindir}/*
|
2008-07-14 21:07:26 +00:00
|
|
|
%{_includedir}/*.h
|
2008-10-15 17:21:01 +00:00
|
|
|
%if %{?_with_termite:1}%{!?_with_termite:0}
|
2008-06-19 22:48:50 +00:00
|
|
|
%exclude %{_libdir}/%{name}/*/lib/termite
|
2008-10-15 17:21:01 +00:00
|
|
|
%endif
|
2008-06-19 05:56:46 +00:00
|
|
|
%{_libdir}/%{name}
|
2008-07-15 14:41:36 +00:00
|
|
|
%{_libdir}/*.a
|
2008-06-19 05:56:46 +00:00
|
|
|
|
2008-10-15 17:21:01 +00:00
|
|
|
%if %{?_with_termite:1}%{!?_with_termite:0}
|
2008-06-19 05:56:46 +00:00
|
|
|
%files termite
|
|
|
|
%defattr(-,root,root,-)
|
2008-06-19 22:48:50 +00:00
|
|
|
%doc termite-doc/*
|
|
|
|
%{_bindir}/tsi
|
|
|
|
%{_libdir}/%{name}/v%{version}/lib/termite
|
2008-10-15 17:21:01 +00:00
|
|
|
%endif
|
2008-06-19 05:56:46 +00:00
|
|
|
|
|
|
|
%files -n emacs-gambit
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{emacs_lispdir}/*
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc doc/gambit-c.html doc/gambit-c.pdf examples
|
|
|
|
%{_infodir}/*
|
|
|
|
|
2008-10-15 17:21:01 +00:00
|
|
|
%if %{?_with_termite:1}%{!?_with_termite:0}
|
2008-06-19 22:48:50 +00:00
|
|
|
%files termite-doc
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc termite-more-docs/*
|
2008-10-15 17:21:01 +00:00
|
|
|
%endif
|
2008-06-19 22:48:50 +00:00
|
|
|
|
2008-06-19 05:56:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2008-10-15 17:21:01 +00:00
|
|
|
* Tue Oct 14 2008 Michel Salim <salimma@fedoraproject.org> - 4.2.9-1
|
|
|
|
- Update to 4.2.9
|
|
|
|
- Disable Termite for now; still broken
|
|
|
|
- When built on EL-5, depend directly on emacs binary rather than emacs(bin)
|
|
|
|
|
|
|
|
* Mon Jul 14 2008 Michel Salim <salimma@fedoraproject.org> - 4.2.8-6
|
2008-07-14 21:07:26 +00:00
|
|
|
- Put include files and libraries in standard paths
|
|
|
|
|
2008-10-15 17:21:01 +00:00
|
|
|
* Thu Jun 19 2008 Michel Salim <salimma@fedoraproject.org> - 4.2.8-5
|
2008-06-19 22:48:50 +00:00
|
|
|
- Package Termite as a module instead of bundling a custom Gambit-C with it
|
|
|
|
|
2008-10-15 17:21:01 +00:00
|
|
|
* Thu Jun 19 2008 Michel Salim <salimma@fedoraproject.org> - 4.2.8-4
|
2008-06-19 17:28:34 +00:00
|
|
|
- Permission fixes for Termite subpackage
|
|
|
|
|
2008-10-15 17:21:01 +00:00
|
|
|
* Wed Jun 18 2008 Michel Salim <salimma@fedoraproject.org> - 4.2.8-3
|
2008-06-19 05:56:46 +00:00
|
|
|
- Bundle Termite as a subpackage
|
|
|
|
|
2008-10-15 17:21:01 +00:00
|
|
|
* Sat Jun 7 2008 Michel Salim <salimma@fedoraproject.org> - 4.2.8-2
|
2008-06-19 05:56:46 +00:00
|
|
|
- Rename six symlink to avoid clash with existing six package
|
|
|
|
|
2008-10-15 17:21:01 +00:00
|
|
|
* Mon Jun 2 2008 Michel Salim <salimma@fedoraproject.org> - 4.2.8-1
|
2008-06-19 05:56:46 +00:00
|
|
|
- Update to 4.2.8
|
|
|
|
- Rename to gambit-c
|
|
|
|
|
|
|
|
* Fri Dec 28 2007 Gerard Milmeister <gemi@bluewin.ch> - 4.1.2-1
|
|
|
|
- new release 4.1.2
|
|
|
|
|
|
|
|
* Sat Apr 14 2007 Gerard Milmeister <gemi@bluewin.ch> - 4.0-1.b22
|
|
|
|
- new version 4.0b22
|
|
|
|
|
|
|
|
* Sun Oct 15 2006 Gerard Milmeister <gemi@bluewin.ch> - 4.0-1.b20
|
|
|
|
- new version 4.0b20
|
|
|
|
|
|
|
|
* Sat Feb 4 2006 Gerard Milmeister <gemi@bluewin.ch> - 4.0-1.b17
|
|
|
|
- new version 4.0b17
|
|
|
|
|
|
|
|
* Mon Nov 7 2005 Gerard Milmeister <gemi@bluewin.ch> - 4.0-1.b15
|
|
|
|
- New Version 4.0b15
|
|
|
|
|
|
|
|
* Fri Aug 12 2005 Gerard Milmeister <gemi@bluewin.ch> - 4.0-1.b14
|
|
|
|
- First Fedora release
|
|
|
|
|