From 7b38a4da12a45476a66471cb094d1127d4dfb0b7 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 19 Jun 2008 05:56:46 +0000 Subject: [PATCH] gambit-c 4.2.8 (committing to Rawhide for testing) --- .cvsignore | 2 + gambc-v4_2_8-modtime.patch | 17 +++ gambit-c.spec | 241 +++++++++++++++++++++++++++++++++++++ gambit-init.el | 7 ++ sources | 2 + 5 files changed, 269 insertions(+) create mode 100644 gambc-v4_2_8-modtime.patch create mode 100644 gambit-c.spec create mode 100644 gambit-init.el diff --git a/.cvsignore b/.cvsignore index e69de29..52e7d50 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1,2 @@ +gambc-v4_2_8.tgz +termite.tar.gz diff --git a/gambc-v4_2_8-modtime.patch b/gambc-v4_2_8-modtime.patch new file mode 100644 index 0000000..65b9e0d --- /dev/null +++ b/gambc-v4_2_8-modtime.patch @@ -0,0 +1,17 @@ +--- gambc-v4_2_8/configure.modtime 2008-05-25 00:18:44.000000000 -0400 ++++ gambc-v4_2_8/configure 2008-06-07 18:51:26.000000000 -0400 +@@ -23821,10 +23821,10 @@ + srcdirpfx="\$(srcdir)/" + fi + +-INSTALL='$(rootfromhere)/install-sh -c' +-INSTALL_DATA='$(rootfromhere)/install-sh -c -m 644' +-INSTALL_LIB='$(rootfromhere)/install-sh -c -m 644' +-INSTALL_PROGRAM='$(rootfromhere)/install-sh -c -m 755' ++INSTALL='install -p' ++INSTALL_DATA='install -m 644 -p' ++INSTALL_LIB='install -m 644 -p' ++INSTALL_PROGRAM='install -m 755 -p' + + + diff --git a/gambit-c.spec b/gambit-c.spec new file mode 100644 index 0000000..da8252f --- /dev/null +++ b/gambit-c.spec @@ -0,0 +1,241 @@ +%define dirname gambc-v4_2_8 + +%if %($(pkg-config emacs) ; echo $?) +%define emacs_version 22.2 +%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 +Version: 4.2.8 +Release: 3%{?dist} +Summary: Gambit-C Scheme programming system + +Group: Development/Languages +License: ASL 2.0 or LGPLv2+ +URL: http://www.iro.umontreal.ca/~gambit +Source0: http://www.iro.umontreal.ca/~gambit/download/gambit/v4.2/source/%{dirname}.tgz +Source1: http://toute.ca/termite.tar.gz +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 termite +Summary: Termite distributed programming system +Group: Development/Languages +License: ASL 2.0 or LGPLv2+ +URL: http://www.toute.ca/ +# Not requiring base as this really is stand-alone + + +%description termite +Termite is an Erlang-like distributed programming system written in Scheme. + + +%package doc +Summary: Documentation for %{name} +Group: Documentation +License: ASL 2.0 or LGPLv2+ +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. + + +%package -n emacs-gambit +Summary: Gambit-C editing mode for Emacs +Group: Applications/Editors +Requires: emacs(bin) >= %{emacs_version} + + +%description -n emacs-gambit +An Emacs mode for editing Gambit-C Scheme source code. + + +%prep +%setup -q -n %{dirname} +%patch0 -p1 -b .modtime +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 \ + --prefix=%{_libdir}/%{name} + +# Clone the tree for Termite build +tar cf - * | (mkdir termite && pushd termite && tar xf -) + +make %{?_smp_mflags} + +pushd termite +make %{?_smp_mflags} bootstrap +# Patch Termite into Gambit-C +(cd lib && tar xf %{SOURCE1} && \ + echo '(##include "termite/termite.scm")' >> _thread.scm +) +make %{?_smp_flags} +popd + +# Compile emacs module +(cd misc && emacs -batch -f batch-byte-compile gambit.el) + + +%check +make check +(cd termite && make check) + + +%install +rm -rf $RPM_BUILD_ROOT +make install prefix=$RPM_BUILD_ROOT%{_libdir}/%{name} +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 </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 +%exclude %{_bindir}/*-termite +%{_bindir}/* +%{_libdir}/%{name} + +%files termite +%defattr(-,root,root,-) +%doc README.Termite LICENSE.Termite LGPL.txt LICENSE-2.0.txt VERSION.Termite +%doc termite/lib/termite/examples +%{_bindir}/*-termite +%{_libdir}/%{name}-termite + +%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}/* + + + +%changelog +* Wed Jun 18 2008 Michel Alexandre Salim - 4.2.8-3 +- Bundle Termite as a subpackage + +* Sat Jun 7 2008 Michel Alexandre Salim - 4.2.8-2 +- Rename six symlink to avoid clash with existing six package + +* Mon Jun 2 2008 Michel Alexandre Salim - 4.2.8-1 +- Update to 4.2.8 +- Rename to gambit-c + +* Fri Dec 28 2007 Gerard Milmeister - 4.1.2-1 +- new release 4.1.2 + +* Sat Apr 14 2007 Gerard Milmeister - 4.0-1.b22 +- new version 4.0b22 + +* Sun Oct 15 2006 Gerard Milmeister - 4.0-1.b20 +- new version 4.0b20 + +* Sat Feb 4 2006 Gerard Milmeister - 4.0-1.b17 +- new version 4.0b17 + +* Mon Nov 7 2005 Gerard Milmeister - 4.0-1.b15 +- New Version 4.0b15 + +* Fri Aug 12 2005 Gerard Milmeister - 4.0-1.b14 +- First Fedora release + diff --git a/gambit-init.el b/gambit-init.el new file mode 100644 index 0000000..a6fd5bb --- /dev/null +++ b/gambit-init.el @@ -0,0 +1,7 @@ +;; Integrate Gambit mode into Emacs scheme modes + +(autoload 'gambit-inferior-mode "gambit" "Hook Gambit mode into cmuscheme.") +(autoload 'gambit-mode "gambit" "Hook Gambit mode into scheme.") +(add-hook 'inferior-scheme-mode-hook (function gambit-inferior-mode)) +(add-hook 'scheme-mode-hook (function gambit-mode)) +(setq scheme-program-name "gsi -:t") diff --git a/sources b/sources index e69de29..e545fb5 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +1ebd2effeb9e936b380d6daffb9e11b8 gambc-v4_2_8.tgz +510cb7cd0d934bbcfb0353d82e6c757d termite.tar.gz