Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > c6dfaf3c46c6df9d8f7c6ee16da44aaf > files > 24

gcl-2.6.8.20130823-5.mga5.src.rpm

# minor adptation of fedora package:
#	http://cvs.fedoraproject.org/viewvc/rpms/gcl/devel/
%define _disable_ld_as_needed		1
%define _disable_ld_no_undefined	1

%define	with_selinux	0

%define static_libbfd	1

# Prerelease of 2.6.8
%define alphatag 20130823

%define preversion	2.6.8

# If the emacs-el package has installed a pkgconfig file, use that to determine
# install locations and Emacs version at build time, otherwise set defaults.
%if %($(pkg-config emacs) ; echo $?)
%define emacs_version 23.3
%define emacs_lispdir %{_datadir}/emacs/site-lisp
%else
%define emacs_version %(pkg-config emacs --modversion)
%define emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
%endif

# If the xemacs-devel package has installed a pkgconfig file, use that to
# determine install locations and Emacs version at build time, otherwise set
# defaults.
%if %($(pkg-config xemacs) ; echo $?)
%define xemacs_version 21.4.22
%define xemacs_lispdir %{_datadir}/xemacs/site-packages/lisp
%else
%define xemacs_version %(pkg-config xemacs --modversion)
%define xemacs_lispdir %(pkg-config xemacs --variable sitepkglispdir)
%endif

Name:           gcl
Version:        %{preversion}.%{alphatag}
Release:        %mkrel 5
Summary:        GNU Common Lisp

Group:          Development/Other
License:        GPL+ and LGPLv2+
URL:            http://www.gnu.org/software/gcl/
Source0:        http://ftp.gnu.org/pub/gnu/gcl/gcl-%{preversion}.tar.gz
Source1:        gcl.el
# This is some info files that are needed for the DESCRIBE function to do
# something useful.  These files are present in CVS HEAD (i.e., the upcoming
# 2.7.0 release), but are missing in the 2.6 branch.
Source2:        gcl-2.6.8-info.tar.xz

# Fedora patches
Patch0:         %{name}-2.6.8-fd-leak.patch
Patch1:         %{name}-2.6.8-latex.patch
Patch2:         %{name}-2.6.8-texinfo.patch
Patch3:         %{name}-2.6.8-elisp.patch
Patch4:         %{name}-2.6.8-selinux.patch
Patch5:         %{name}-2.6.8-rename.patch
Patch6:         %{name}-2.6.8-getcwd.patch
Patch7:         %{name}-2.6.8-infrastructure.patch
Patch8:         %{name}-2.6.8-alloca.patch
Patch9:         %{name}-2.6.8-extension.patch
Patch10:        %{name}-2.6.8-unrandomize.patch
Patch11:        %{name}-2.6.8-debuginfo.patch
Patch12:        %{name}-2.6.8-asm-signal-h.patch
Patch13:        %{name}-2.6.8-plt.patch
Patch14:        %{name}-2.6.8-ellipsis.patch
Patch15:        %{name}-2.6.8-man.patch
Patch16:        %{name}-2.6.8-reloc-type.patch
Patch17:        %{name}-2.6.8-largefile.patch
Patch18:        %{name}-2.6.8-tcl.patch

# Patch required to build in Mandriva
Patch100:	gcl-2.6.8-tcl8.6.patch

BuildRequires:  libsm-devel
BuildRequires:  libxext-devel
BuildRequires:  libxaw-devel
BuildRequires:  readline-devel
BuildRequires:  binutils-devel
BuildRequires:  tk-devel
BuildRequires:  tcl-devel
BuildRequires:  gmp-devel
BuildRequires:  texlive
BuildRequires:  texlive-texmf
BuildRequires:  texinfo
BuildRequires:  emacs-bin
BuildRequires:  emacs-el
BuildRequires:  xemacs
BuildRequires:  xemacs-devel
%if %{with_selinux}
BuildRequires:  selinux-policy
%endif
BuildRequires:	x11-server-common

%if %{with_selinux}
Requires:       gcl-selinux
%endif

Requires(post): /sbin/install-info
Requires(postun): /sbin/install-info

%description
GCL is a Common Lisp currently compliant with the ANSI standard.  Lisp
compilation produces native code through the intermediary of the
system's C compiler, from which GCL derives efficient performance and
facile portability. Currently uses TCL/Tk as GUI.


%package emacs
Group:          Development/Other
Summary:        Emacs mode for interacting with GCL
Requires:       %{name} = %{version}-%{release}, emacs >= %{emacs_version}
# Don't make subpackages noarch as our bs does not deal with this yet
BuildArch:      noarch

%description emacs
Emacs mode for interacting with GCL


%package emacs-el
Group:          Development/Other
Summary:        Source for Emacs mode for interacting with GCL
Requires:       %{name}-emacs = %{version}-%{release}
BuildArch:      noarch

%description emacs-el
Source Elisp code for Emacs mode for interacting with GCL


%package xemacs
Group:          Development/Other
Summary:        XEmacs mode for interacting with GCL
Requires:       %{name} = %{version}-%{release}
Requires:       xemacs >= %{xemacs_version}
Requires:       xemacs-extras
BuildArch:      noarch

%description xemacs
XEmacs mode for interacting with GCL


%package xemacs-el
Group:          Development/Other
Summary:        Source for XEmacs mode for interacting with GCL
Requires:       %{name}-xemacs = %{version}-%{release}
BuildArch:      noarch

%description xemacs-el
Source Elisp code for XEmacs mode for interacting with GCL


%if %{with_selinux}
%package selinux
Group:          Development/Other
Summary:        SELinux policy for GCL images
Requires(post): policycoreutils
Requires(postun): policycoreutils

%description selinux
SELinux policy for GCL images.  All programs that dump GCL images to be run on
SELinux-enabled hosts should Require this package, and give the image the type
gcl_exec_t.
%endif


%prep
%setup -q -n gcl
%setup -q -n gcl -T -D -a 2
%patch0
%patch1
%patch2
%patch3
%patch4 -p1
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
%patch12
%patch13
%patch14
%patch15
%patch16
%patch17
%patch18

# Don't let the configure script add compiler flags we don't want
sed -i -e 's/fomit-frame-pointer/fno-strict-aliasing/' -e 's/-O3/-O2/g' configure

# Fix a path in the launch script
sed -i -e 's|/usr/lib/tk|%{_datadir}/tk|' debian/gcl.sh

# The archive is so full of spurious executable bits that we just remove them
# all here, then add back the ones that should exist
find . -type f -perm /0111 | xargs chmod a-x
chmod a+x add-defs add-defs1 config.guess config.sub configure install.sh gmp4/configure
chmod a+x bin/info bin/info1 gcl-tk/gcltksrv.in gcl-tk/ngcltksrv
chmod a+x mp/gcclab o/egrep-def utils/replace xbin/* gmp4/mpn/m4-ccas


%build
# -fstack-protector leads to segfaults because GCL uses its own conflicting
# stack protection scheme.
%define _ssp_cflags %{nil}
# SGC requires the frame pointer.
# Remove -fPIC as it is incompatible with gcl:
# https://lists.gnu.org/archive/html/gcl-devel/2013-07/msg00029.html
export CFLAGS="$(sed 's/ *-fPIC//' <<<"%optflags") -fno-omit-frame-pointer"
export CXXFLAGS="$(sed 's/ *-fPIC//' <<<"%optflags") -fno-omit-frame-pointer"
%configure2_5x --enable-readline --enable-ansi --enable-dynsysgmp --enable-xgcl \
  --enable-tclconfig=%{_libdir} --enable-tkconfig=%{_libdir} \
  --disable-custreloc \
%if %{static_libbfd}
  --enable-statsysbfd --disable-dynsysbfd
%else
  --disable-statsysbfd --enable-dynsysbfd
%endif
# FIXME: %%{?_smp_mflags} breaks the build
make 

# Build gcl.info, which is needed for DESCRIBE to work properly
make -C info gcl.info

# dwdoc needs one extra LaTeX run to resolve references
cd xgcl-2
pdflatex dwdoc.tex

%if %{with_selinux}
# Build the SELinux policy
cd ../selinux
make -f %{_datadir}/selinux/devel/Makefile
%endif

%install
%makeinstall_std

# Get rid of the parts that we don't want
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc
rm -rf $RPM_BUILD_ROOT%{_datadir}/emacs
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib/gcl-*/info

# Install the man page
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
cp -pf man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1

# Install the HTML documentation
mkdir -p html
cp -pfr info/gcl-si info/gcl-tk html

# Install and compile the Emacs code
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}/gcl
cp -pfr elisp/* $RPM_BUILD_ROOT%{emacs_lispdir}/gcl
rm -f $RPM_BUILD_ROOT%{emacs_lispdir}/gcl/makefile
rm -f $RPM_BUILD_ROOT%{emacs_lispdir}/gcl/readme
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}/site-start.d
sed -e "s|%LISP_DIR%|%{emacs_lispdir}|" %{SOURCE1} > $RPM_BUILD_ROOT%{emacs_lispdir}/site-start.d/gcl.el
pushd $RPM_BUILD_ROOT%{emacs_lispdir}/gcl
emacs -batch -no-site-file --eval "(push \"`pwd`\" load-path)" \
  -f batch-byte-compile *.el
popd

# Install and compile the XEmacs code
mkdir -p $RPM_BUILD_ROOT%{xemacs_lispdir}/gcl
cp -fr elisp/* $RPM_BUILD_ROOT%{xemacs_lispdir}/gcl
rm -f $RPM_BUILD_ROOT%{xemacs_lispdir}/gcl/makefile
rm -f $RPM_BUILD_ROOT%{xemacs_lispdir}/gcl/readme
mkdir -p $RPM_BUILD_ROOT%{xemacs_lispdir}/site-start.d
sed -e "s|%LISP_DIR%|%{xemacs_lispdir}|" %{SOURCE1} > $RPM_BUILD_ROOT%{xemacs_lispdir}/site-start.d/gcl.el
pushd $RPM_BUILD_ROOT%{xemacs_lispdir}/gcl
xemacs -batch -no-site-file -eval "(push \"`pwd`\" load-path)" \
  -f batch-byte-compile *.el
popd

%if %{with_selinux}
# Save the policy file away for later installation
mkdir -p $RPM_BUILD_ROOT%{_datadir}/selinux/packages/gcl
cp -p selinux/gcl.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/gcl
%endif

# The image has garbage strings containing RPM_BUILD_ROOT
export QA_SKIP_BUILD_ROOT=1


%post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir \
  --entry="* gcl: (gcl).	GNU Common Lisp Manual." \
  2>/dev/null || :
/sbin/install-info %{_infodir}/%{name}-si.info %{_infodir}/dir \
  --entry="* gcl-si: (gcl-si).	GNU Common Lisp System Internals." \
  2>/dev/null || :
/sbin/install-info %{_infodir}/%{name}-tk.info %{_infodir}/dir \
  --entry="* gcl-tk: (gcl-tk).	GNU Common Lisp Tk Manual." \
  2>/dev/null || :


%if %{with_selinux}
%post selinux
/usr/sbin/semodule -i %{_datadir}/selinux/packages/gcl/gcl.pp || :
/sbin/fixfiles -R gcl restore || :
%endif

%postun
if [ $1 = 0 ]; then
    /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
    /sbin/install-info --delete %{_infodir}/%{name}-si.info %{_infodir}/dir 2>/dev/null || :
    /sbin/install-info --delete %{_infodir}/%{name}-tk.info %{_infodir}/dir 2>/dev/null || :
fi


%if %{with_selinux}
%postun selinux
if [ $1 = 0 ]; then
    /usr/sbin/semodule -r gcl || :
fi
%endif

%files
%{_bindir}/gcl
%{_prefix}/lib/gcl*
%{_infodir}/*
%{_mandir}/man*/*
%doc COPYING* readme readme.xgcl RELEASE* ChangeLog* faq doc
%doc gcl*.jpg gcl.ico gcl.png
%doc html

%files emacs
%doc elisp/readme
%dir %{emacs_lispdir}/gcl
%{emacs_lispdir}/gcl/*.elc
%{emacs_lispdir}/site-start.d/*

%files emacs-el
%{emacs_lispdir}/gcl/*.el

%files xemacs
%doc elisp/readme
%dir %{xemacs_lispdir}/gcl
%{xemacs_lispdir}/gcl/*.elc
%{xemacs_lispdir}/site-start.d/*

%files xemacs-el
%{xemacs_lispdir}/gcl/*.el

%if %{with_selinux}
%files selinux
%{_datadir}/selinux/packages/gcl
%endif


%changelog
* Wed Oct 15 2014 umeabot <umeabot> 2.6.8.20130823-5.mga5
+ Revision: 742900
- Second Mageia 5 Mass Rebuild

* Mon Oct 13 2014 umeabot <umeabot> 2.6.8.20130823-4.mga5
+ Revision: 738482
- Mageia 5 Mass Rebuild

* Mon Jan 06 2014 danf <danf> 2.6.8.20130823-3.mga4
+ Revision: 565026
- Remove -fPIC from CFLAGS as it is incompatible with gcl

  + umeabot <umeabot>
    - Mageia 4 Mass Rebuild
    - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

  + luigiwalser <luigiwalser>
    - BR texlive-texmf

  + fwang <fwang>
    - omi-frame-pointer make it SGC
    - 2.6.8 final

  + kamil <kamil>
    - sync sources with Fedora
    - rebuild for Mga3 Beta1

* Mon Mar 05 2012 kamil <kamil> 2.6.8.20120109cvs-2.mga2
+ Revision: 218547
- rebuild against new gcc-4.6.3

* Mon Feb 06 2012 kamil <kamil> 2.6.8.20120109cvs-1.mga2
+ Revision: 205242
- sync source and patches with Fedora (20120109svn)
- build against emacs 23.3
- build against xemacs 21.4.22

* Wed Jul 06 2011 fwang <fwang> 2.6.8.20101115cvs-4.mga2
+ Revision: 119210
- rebuild for new tcl

* Wed May 11 2011 pterjan <pterjan> 2.6.8.20101115cvs-3.mga1
+ Revision: 97333
- Don't require a version of xemacs that we don't have yet

* Fri Apr 29 2011 dmorgan <dmorgan> 2.6.8.20101115cvs-2.mga1
+ Revision: 93455
- Minor layout change

* Thu Apr 14 2011 tv <tv> 2.6.8.20101115cvs-1.mga1
+ Revision: 85467
- fix texlive BR
- imported package gcl


* Sun Jan 30 2011 Paulo Andrade <pcpa@mandriva.com.br> 2.6.8.20101115cvs-1mdv2011.0
+ Revision: 634037
- Update to newer 2.6.8 snapshot

* Sat Aug 07 2010 Paulo Andrade <pcpa@mandriva.com.br> 2.6.8.20100201cvs-1mdv2011.0
+ Revision: 567209
- Update to a newer CVS snapshot

* Wed Feb 10 2010 Funda Wang <fwang@mandriva.org> 2.6.8.20090701cvs-3mdv2010.1
+ Revision: 503674
- fix build with gmp 5.0
- rebuild for new gmp

* Fri Nov 27 2009 Paulo Andrade <pcpa@mandriva.com.br> 2.6.8.20090701cvs-2mdv2010.1
+ Revision: 470707
- Correct problems with newer binutils causing gcl to miss read the linker map

* Wed Nov 25 2009 Paulo Andrade <pcpa@mandriva.com.br> 2.6.8.20090701cvs-1mdv2010.1
+ Revision: 470103
- Update to newer gc-2.6.8 pre snapshot.

* Wed Nov 25 2009 Paulo Andrade <pcpa@mandriva.com.br> 2.6.8.20090303cvs-5mdv2010.1
+ Revision: 469867
- Build correction for newer binutils.
- Add switch to statically link to libbfd.
- Rebuild due to newer binutils.

  + Per Øyvind Karlsen <peroyvind@mandriva.org>
    - disable -fstack-protector by overriding the %%_ssp_cflags macro that sets it

* Tue Nov 10 2009 Paulo Andrade <pcpa@mandriva.com.br> 2.6.8.20090303cvs-4mdv2010.1
+ Revision: 464339
- Correct CFLAGS as GCL has its own stack protector schema

* Sat Nov 07 2009 Frederik Himpe <fhimpe@mandriva.org> 2.6.8.20090303cvs-3mdv2010.1
+ Revision: 462595
- Don't mark subpackages as Noarch as our bs does not deal with this yet

* Sat Nov 07 2009 Frederik Himpe <fhimpe@mandriva.org> 2.6.8.20090303cvs-2mdv2010.1
+ Revision: 462330
- Bump release for rebuild for missing package

* Tue Aug 18 2009 Paulo Andrade <pcpa@mandriva.com.br> 2.6.8.20090303cvs-1mdv2010.0
+ Revision: 417506
- make selinux support optional, and default to disabled
- Update to 2.6.8, cvs 20090303.

* Sat Dec 06 2008 Adam Williamson <awilliamson@mandriva.org> 2.6.7-10mdv2009.1
+ Revision: 311069
- rebuild for new tcl

* Sat Aug 30 2008 Frederik Himpe <fhimpe@mandriva.org> 2.6.7-9mdv2009.0
+ Revision: 277528
- Make it build again:
  * add huge Debian diff, fixing many bugs (notably gnu-hash style
    support) and adding xgcl-2
  * Remove gcl-2.6.7-conf.patch, already part of Debian patch
  * Add some configure options from Gentoo

  + Thierry Vignaud <tv@mandriva.org>
    - rebuild

* Mon Jan 07 2008 Adam Williamson <awilliamson@mandriva.org> 2.6.7-6mdv2008.1
+ Revision: 146200
- rebuild for new tcl/tk and new era
- don't run autoconf any more. this makes most of the patch a no-op, but most of it is not actually useful. replace the emacs part of it with a configure option
- clean spec
- new license policy, correct license (compiled app is GPL, not LGPL)

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request


* Thu Mar 15 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.6.7-5mdv2007.1
+ Revision: 144128
- Rebuilt because corrupted RPM (bug #29516).

* Sun Feb 18 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.6.7-4mdv2007.1
+ Revision: 122448
- BuildRequires: automake1.7.
- Added Patch0 for configuring again.
- Import gcl

* Mon Jan 02 2006 Oden Eriksson <oeriksson@mandriva.com> 2.6.7-3mdk
- rebuilt against soname aware deps (tcl/tk)
- fix deps

* Sat Oct 08 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.6.7-2mdk
- Fix BuildRequires
- %%mkrel

* Wed Aug 31 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.6.7-1mdk
- Release 2.6.7.

* Thu Aug 04 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.6.7-0.cvs20050803.1mdk
- Release 2.6.7pre (current CVS).

* Fri Apr 29 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.6.6-4mdk
- Added emacs to BuildRequires.

* Mon Apr 18 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.6.6-3mdk
- Added binutils-devel to Requires.
- Added fixes to SPEC file for building under X86-64.

* Wed Feb 16 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.6.6-2mdk
- Enabled ansi.

* Wed Feb 16 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.6.6-1mdk
- Release: 2.6.6.

* Tue Oct 05 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.6.5-2mdk
- Fix permissions.

* Tue Oct 05 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.6.5-1mdk
- Release 2.6.5.

* Tue Jul 20 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.6.3-1mdk
- Release 2.6.3.