LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File clisp.spec of Package clisp (Project devel:languages:misc)

# spec file for package clisp
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

# minimum suse version where the full featured package builds
%define min_suse_ver 1030

Name:           clisp
Version:        2.49
Release:        0
Summary:        A Common Lisp Interpreter
License:        GPL-2.0+
Group:          Development/Languages/Other
Url:            http://clisp.cons.org

Source:         http://downloads.sf.net/clisp/%name-%version.tar.bz2
Source3:        clisp-rpmlintrc
Source4:        README.SuSE
# PATCH-EXTEND-OPENSUSE Set the process execution domain
Patch1:         clisp-2.49-personality.patch
# PATCH-FIX-OPENSUSE Fix crash on Ia64
Patch2:         clisp-2.39-ia64-wooh.dif
# PATCH-EXTEND-OPENSUSE Help (new) CLX to work out of the box
Patch3:         clisp-2.39-clx.dif
# PATCH-EXTEND-OPENSUSE Make sure to be able to use MYCLFAGS
Patch4:         clisp-2.49-configure.dif
# PATCH-FIX-OPENSUSE Make sure to use initialized token on garbage collection
Patch5:         clisp-2.49-gctoken.dif
# PATCH-FEATURE-OPENSUSE Make CLX demos usable at runtime
Patch6:         clisp-2.49-clx_demos.dif
# PATCH-EXTEND-OPENSUSE Enable postgresql SSL feature
Patch7:         clisp-2.49-postgresql.dif
# PATCH-FIX-OPENSUSE Do not use rpath but rpath-link
Patch8:         clisp-2.49-rpath.dif
# PATCH-FIX-OPENSUSE Correct path for header for System V IPC system calls
Patch12:        clisp-linux.patch
# PATCH-FIX-OPENSUSE Glibc got rid of unused __swblk_t type therefore update linux.lisp
Patch13:        clisp-glibc-fix.patch
#PATCH-FIX-UPSTREAM  patch#3474660  changeset 15557	4f5985f83127
Patch14:        clisp-hostname.patch
# PATCH-EXTEND-UPSTREAM Make armv7l work
Patch15:        clisp-arm.patch
Patch16:        clisp-db6.diff

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%global vimdir  %{_datadir}/vim/site/after/syntax
# exclude from src/lispbibl.d "CLISP not ported to this platform"
ExcludeArch:    ppc64 ppc64le s390x armv4l
BuildRequires:  db-devel
BuildRequires:  ffcall
BuildRequires:  gdbm-devel
BuildRequires:  gtk2-devel
BuildRequires:  libglade2-devel
BuildRequires:  libsigsegv-devel
BuildRequires:  openssl-devel
BuildRequires:  pcre-devel
BuildRequires:  postgresql-devel
BuildRequires:  readline-devel
BuildRequires:  screen
BuildRequires:  vim-data
%if 0%{?suse_version} >= %min_suse_ver
BuildRequires:  dbus-1-devel
BuildRequires:  fdupes
BuildRequires:  xorg-x11-devel
# If set to yes do not forget to add
#   gcc-c++
# to BuildRequires
%define debug   no
Requires(pre):  vim
Requires(pre):  vim-data
Requires:       ffcall
Provides:       %{name}-devel
Suggests:       %{name}-doc

Common Lisp is a high-level, all-purpose programming language. CLISP is
an implementation of Common Lisp that closely follows the book "Common
Lisp - The Language" by Guy L. Steele Jr. This package includes an
interactive programming environment with an interpreter, a compiler,
and a debugger.  Start this environment with the command 'clisp'.

%package doc
Summary:        Documentation of CLisp
Group:          Development/Languages/Other
Requires:       %{name}
%if 0%{?suse_version} >= 1120
BuildArch:      noarch

%description doc
CLISP documentation is placed in the following directories:



As well as the conventional CLISP, this package also includes CLX, an
extension of CLISP for the X Window System. The X Window System must be
installed before running the clx command. The description of this CLX
version (new-clx) is placed in


with the file README. The subdirectory


contains two nice applications.

%setup -qT -b0
%patch1  -p1 -b .sel
%patch2  -p1 -b .wooh
%patch3  -p1 -b .clx
%patch4  -p1 -b .conf
%patch5  -p1 -b .gc
%patch6  -p1 -b .demos
%patch7  -p1 -b .psql
%patch8  -p1 -b .rpath
%patch12 -p1
%if 0%{?suse_version} > 1220
%patch13 -p1 -b .glibc
%patch14 -p0
%patch15 -p0
%patch -P 16 -p1

# Overwrite stack size limit (hopefully a soft limit only)
ulimit -Ss unlimited || true
ulimit -Hs unlimited || true
unset LC_CTYPE
export LANG LC_ALL
# Current system
export PATH="$PATH:."
# Set gcc command line but do not use CFLAGS
if test %debug = yes ; then
CC="${CC} -g ${RPM_OPT_FLAGS} -fno-strict-aliasing -fPIC -pipe"
case "$RPM_ARCH" in
	    CC="${CC} -falign-functions=4 -mieee-fp -ffloat-store"  ;;
    ppc)    CC="${CC}"				;;
    s390)   CC="${CC}"				;;
    x86_64) CC="${CC} -fno-gcse"		;;
    sparc*) CC="${CC} -fno-gcse"		;;
    ppc64)  CC="${CC} -fno-gcse -mpowerpc64"	;;
    s390x)  CC="${CC} -fno-gcse"		;;
    ia64)   CC="${CC} -fno-gcse"		;;
    axp|alpha)  CC="${CC}"			;;
safety='-DSAFETY=3 -O'
MYCFLAGS="${MYCFLAGS} -D_GNU_SOURCE -Wno-unused -Wno-uninitialized"
case "$RPM_ARCH" in
    i[0-9]86)   MYCFLAGS="${MYCFLAGS} ${noexec}"		;;
    ppc)    MYCFLAGS="${MYCFLAGS} ${noexec}"			;;
    s390)   MYCFLAGS="${MYCFLAGS} ${noexec}"			;;
    x86_64) MYCFLAGS="${MYCFLAGS} ${safety}"			;;
    sparc*) MYCFLAGS="${MYCFLAGS} ${safety}"			;;
    ppc64)  MYCFLAGS="${MYCFLAGS} ${safety} -DWIDE_HARD"	;;
    s390x)  MYCFLAGS="${MYCFLAGS} ${safety} -DWIDE_HARD"	;;
    ia64)   MYCFLAGS="${MYCFLAGS} ${safety}"			;;
    axp|alpha)  MYCFLAGS="${MYCFLAGS} ${nommap}"		;;
export CC
unset cfi386 noexec nommap safety
# Environment for the case of missing terminal
%global _configure	screen -L -D -m ./configure
%global _make		screen -L -D -m make
SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXX) || exit 1
exec 0< /dev/null
	deflogin off
	logfile $SCREENLOG
	logfile flush 1
	logtstamp off
	log on
	setsid on
	scrollback 0
	silence on
	utf8 on
# Build the current system
if test %debug = yes ; then

find -name configure | xargs -r \
    sed -ri "/ac_precious_vars='build_alias\$/ {N; s/build_alias\\n//; }"
# The modules i18n, syscalls, regexp
# are part of the base clisp system.
tail -q -s 0.5 -f $SCREENLOG & pid=$!
%_configure build ${DEBUG}	\
    --prefix=%{_prefix}		\
    --exec-prefix=%{_prefix}	\
    --libdir=%{_libdir}		\
    --vimdir=%{vimdir}		\
    --fsstnd=suse		\
    --with-readline		\
    --with-dynamic-modules      \
    --with-gettext		\
%if 0%{?suse_version} >= %min_suse_ver
    --with-module=dbus		\
    --with-module=queens	\
    --with-module=gdbm		\
    --with-module=gtk2		\
    --with-module=pcre		\
    --with-module=rawsock	\
    --with-module=zlib		\
    --with-module=wildcard	\
    --with-module=clx/new-clx	\
    --with-module=berkeley-db	\

%_make -C build
%_make -C build check

# Stop tail
kill $pid

# Check for errors
test -z "$(ls build/tests/*.erg 2>/dev/null)"

# Current system
# Install the current system
make -C build install prefix=%{_prefix}   \
        exec_prefix=%{_prefix}      \
        mandir=%{_mandir}       \
        libdir=%{_libdir}       \
    DESTDIR=%{buildroot}        \
    INSTALL_DATA='install -cm 0444'

# The CLX interface
install -d %{buildroot}${CLXDOC}
install -d %{buildroot}${CLXLIB}
pushd modules/clx/new-clx/
  install -c -m 0444 README %{buildroot}${CLXDOC}/
  install -c -m 0444 %{S:4} %{buildroot}${CLXDOC}/
  tar cf - demos/ | (cd %{buildroot}${CLXDOC}/ ; tar xf - )
pushd modules/clx/
  tar xfz clx-manual.tar.gz -C %{buildroot}${CLXDOC}
find %{buildroot} -name "*.a" | xargs chmod u+w
chmod    u+xrw,a+rx %{buildroot}%{_bindir}/clisp
chmod    u+xrw,a+rx %{buildroot}%{_bindir}/clisp-link
chmod -R g+r,o+r    %{buildroot}${LSPDOC}/
chmod    a-x        %{buildroot}${CLXDOC}/clx-manual/html/doc-index.cgi
find   %{buildroot}${LSPDOC} -type d | xargs chmod 755
rm -f  %{buildroot}${CLXDOC}/*,v
rm -f  %{buildroot}${CLXDOC}/.\#*
rm -f  %{buildroot}${CLXDOC}/demos/*,v
rm -f  %{buildroot}${CLXDOC}/demos/.\#*
rm -f  %{buildroot}${CLXDOC}/demos/*.orig
find   %{buildroot}${LSPLIB}/ -name '*.dvi' | xargs -r rm -f
find   %{buildroot}${LSPLIB}/ -name '*.run' | xargs -r chmod 0755
rm -rf %{buildroot}${LSPLIB}/new-clx/demos/
find   %{buildroot} -type f | xargs -r chmod u+w
chmod a+x %{buildroot}${LSPLIB}/build-aux/{config,depcomp}*
%if 0%{?suse_version} >= %min_suse_ver
%fdupes %{buildroot}${LSPLIB}/
%find_lang clisp
%find_lang clisplow clisp.lang

%files -f clisp.lang
%doc %{_datadir}/man/man1/clisp*.1.gz

%files doc