%define major_minor_version 2.2 Summary: A GNU implementation of Scheme for application extensibility Name: guile Version: 2.2.7 Release: 1%{?dist} Epoch: 5 Source: https://ftp.gnu.org/gnu/guile/guile-%{version}.tar.xz URL: http://www.gnu.org/software/guile/ License: LGPLv3+ Group: Development/Languages BuildRequires: libtool libtool-ltdl-devel gmp-devel readline-devel BuildRequires: gettext-devel libunistring-devel libffi-devel gc-devel BuildRequires: git Requires(post): /sbin/install-info Requires(preun): /sbin/install-info Requires: coreutils Patch1: guile-multilib.patch # Avoid linking all guile consumers to libgc # TODO: consider using: Requires.private: bdw-gc Patch2: guile-2.2-gc_pkgconfig_private.patch %description GUILE (GNU's Ubiquitous Intelligent Language for Extension) is a library implementation of the Scheme programming language, written in C. GUILE provides a machine-independent execution platform that can be linked in as a library during the building of extensible programs. Install the guile package if you'd like to add extensibility to programs that you are developing. %package devel Summary: Libraries and header files for the GUILE extensibility library Group: Development/Libraries Requires: guile%{?_isa} = %{epoch}:%{version}-%{release} gmp-devel gc-devel Requires: pkgconfig %description devel The guile-devel package includes the libraries, header files, etc., that you'll need to develop applications that are linked with the GUILE extensibility library. You need to install the guile-devel package if you want to develop applications that will be linked to GUILE. You'll also need to install the guile package. %prep %autosetup -S git -n guile-%{version} %build %configure --disable-static # Remove RPATH sed -i -e 's|" $sys_lib_dlsearch_path "|" $sys_lib_dlsearch_path %{_libdir} "|' libtool %{make_build} %install %{make_install} mkdir -p %{buildroot}%{_datadir}/guile/site/%{major_minor_version} rm -f %{buildroot}%{_libdir}/libguile*.la rm -f %{buildroot}%{_infodir}/dir # Our gdb doesn't support guile yet rm -f %{buildroot}%{_libdir}/libguile*gdb.scm # Compress large documentation bzip2 NEWS for i in %{buildroot}%{_infodir}/goops.info; do iconv -f iso8859-1 -t utf-8 < $i > $i.utf8 && mv -f ${i}{.utf8,} done touch %{buildroot}%{_datadir}/guile/site/%{major_minor_version}/slibcat # Create symlinks for compatibility ln -s guile %{buildroot}%{_bindir}/guile2 ln -s guile-tools %{buildroot}%{_bindir}/guile2-tools # Adjust mtimes so they are all identical on all architectures. # When guile.x86_64 and guile.i686 are installed at the same time on an x86_64 system, # the *.scm files' timestamps change, as they normally reside in /usr/share/guile/. # Their corresponding compiled *.go file go to /usr/lib64/, or /usr/lib/, depending on the arch. # The mismatch in timestamps between *.scm and *.go files makes guile to compile itself # everytime it's run. The following code adjusts the files so that their timestamps are the same # for every file, but unique between builds. # See https://bugzilla.redhat.com/show_bug.cgi?id=1208760. find %{buildroot}%{_datadir} -name '*.scm' -exec touch -r "%{_specdir}/guile.spec" '{}' \; find %{buildroot}%{_libdir} -name '*.go' -exec touch -r "%{_specdir}/guile.spec" '{}' \; %check make %{?_smp_mflags} check ||: %post /sbin/ldconfig for i in guile r5rs; do /sbin/install-info %{_infodir}/${i}.info.gz %{_infodir}/dir &> /dev/null done : %postun -p /sbin/ldconfig %preun if [ "$1" = 0 ]; then for i in guile r5rs; do /sbin/install-info --delete %{_infodir}/${i}.info.gz \ %{_infodir}/dir &> /dev/null # Remove entries created by packages before 2.0.9-3 /sbin/install-info --delete %{_infodir}/${i}2.info.gz \ %{_infodir}/dir &> /dev/null done fi : %triggerin -- guile < 5:2.0.9-3 # Allow safe upgrade from older versions ln -f %{_bindir}/guile{,.save} ln -f %{_bindir}/guile-tools{,.save} : %posttrans # Move saved files back [ -e %{_bindir}/guile.save ] && mv -f %{_bindir}/guile{.save,} [ -e %{_bindir}/guile-tools.save ] && mv -f %{_bindir}/guile-tools{.save,} : %triggerin -- slib >= 3b4-1 rm -f %{_datadir}/guile/site/%{major_minor_version}/slibcat export SCHEME_LIBRARY_PATH=%{_datadir}/slib/ # Build SLIB catalog %{_bindir}/guile --fresh-auto-compile --no-auto-compile -c \ "(use-modules (ice-9 slib)) (require 'new-catalog)" &> /dev/null || \ rm -f %{_datadir}/guile/site/%{major_minor_version}/slibcat : %triggerun -- slib >= 3b4-1 if [ "$2" = 0 ]; then rm -f %{_datadir}/guile/site/%{major_minor_version}/slibcat fi %files %license COPYING COPYING.LESSER LICENSE %doc AUTHORS HACKING NEWS.bz2 README THANKS %{_bindir}/guile2 %{_bindir}/guile2-tools %{_bindir}/guild %{_bindir}/guile %{_bindir}/guile-tools %{_libdir}/libguile*.so.* #%{_libdir}/libguilereadline-*.so %{_libdir}/guile %dir %{_datadir}/guile %dir %{_datadir}/guile/%{major_minor_version} %{_datadir}/guile/%{major_minor_version}/ice-9 %{_datadir}/guile/%{major_minor_version}/language %{_datadir}/guile/%{major_minor_version}/oop %{_datadir}/guile/%{major_minor_version}/rnrs %{_datadir}/guile/%{major_minor_version}/scripts %{_datadir}/guile/%{major_minor_version}/srfi %{_datadir}/guile/%{major_minor_version}/sxml %{_datadir}/guile/%{major_minor_version}/system %{_datadir}/guile/%{major_minor_version}/texinfo %{_datadir}/guile/%{major_minor_version}/web %{_datadir}/guile/%{major_minor_version}/guile-procedures.txt %{_datadir}/guile/%{major_minor_version}/*.scm %dir %{_datadir}/guile/site %dir %{_datadir}/guile/site/%{major_minor_version} %ghost %{_datadir}/guile/site/%{major_minor_version}/slibcat %{_infodir}/* %{_mandir}/man1/guile.1* %files devel %{_bindir}/guile-config %{_bindir}/guile-snarf %{_datadir}/aclocal/* %{_libdir}/libguile-%{major_minor_version}.so* %{_libdir}/pkgconfig/*.pc %{_includedir}/guile