diff --git a/README.md b/README.md index 625dc9c..a182e00 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ # clisp +Common Lisp is a high-level, general-purpose programming language. +GNU CLISP is a Common Lisp implementation by Bruno Haible of Karlsruhe University and Michael Stoll of Munich University, both in Germany. +It mostly supports the Lisp described in the ANSI Common Lisp standard. + +GNU CLISP includes an interpreter, a compiler, a debugger, a large subset of CLOS, a foreign language interface and a socket interface. +An X11 interface is available through CLX, Garnet, CLUE/CLIO. +GNU CLISP runs Maxima, ACL2 and many other Common Lisp packages. + diff --git a/clisp-2.49-db-5.1.patch b/clisp-2.49-db-5.1.patch new file mode 100644 index 0000000..04564d6 --- /dev/null +++ b/clisp-2.49-db-5.1.patch @@ -0,0 +1,46 @@ +--- a/modules/berkeley-db/bdb.c ++++ b/modules/berkeley-db/bdb.c +@@ -351,40 +351,10 @@ + DEFUN(BDB:DBE-CREATE,&key PASSWORD ENCRYPT :HOST CLIENT-TIMEOUT SERVER-TIMEOUT) + { /* Create an environment handle */ + DB_ENV *dbe, *dbe_cl; +- bool remote_p = boundp(STACK_2); /* host ==> remote */ ++ if (boundp(STACK_2)) /* :HOST */ ++ error(error_condition, GETTEXT("RPC support has been dropped in Berkeley DB 5.1")); + int cl_timeout = 0, sv_timeout = 0; +-# if defined(DB_RPCCLIENT) /* 4.2 and later */ +- SYSCALL(db_env_create,(&dbe,remote_p ? DB_RPCCLIENT : 0)); +-# elif defined(DB_CLIENT) /* 4.1 and before */ +- SYSCALL(db_env_create,(&dbe,remote_p ? DB_CLIENT : 0)); +-# else +-# error how does your Berkeley DB create a remote client? +-# endif +- if (remote_p) { +- if (uint_p(STACK_0)) sv_timeout = I_to_uint(STACK_0); +- if (uint_p(STACK_1)) cl_timeout = I_to_uint(STACK_1); +- host_restart: +- if (stringp(STACK_2)) { /* string host */ +- with_string_0(STACK_2,GLO(misc_encoding),hostz, { +- SYSCALL(dbe->set_rpc_server,(dbe,NULL,hostz,cl_timeout,sv_timeout,0)); +- }); +- } else if ((dbe_cl = (DB_ENV*)bdb_handle(STACK_2,`BDB::DBE`, +- BH_NIL_IS_NULL))) { +- /* reuse client */ +- SYSCALL(dbe->set_rpc_server,(dbe,dbe_cl->cl_handle,NULL, +- cl_timeout,sv_timeout,0)); +- } else { /* bad host */ +- pushSTACK(NIL); /* no PLACE */ +- pushSTACK(STACK_(2+1)); /* TYPE-ERROR slot DATUM */ +- pushSTACK(`(OR STRING BDB::DBE)`); /* TYPE-ERROR slot EXPECTED-TYPE */ +- pushSTACK(STACK_2); /* host */ +- pushSTACK(`BDB::DBE`); pushSTACK(S(string)); pushSTACK(S(Khost)); +- pushSTACK(TheSubr(subr_self)->name); +- check_value(type_error,GETTEXT("~S: ~S should be a ~S or a ~S, not ~S")); +- STACK_2 = value1; +- goto host_restart; +- } +- } ++ SYSCALL(db_env_create,(&dbe,0)); + if (!missingp(STACK_4)) /* :PASSWD */ + dbe_set_encryption(dbe,&STACK_3,&STACK_4); + skipSTACK(5); diff --git a/clisp-2.49-glibc-2.17-1.patch b/clisp-2.49-glibc-2.17-1.patch new file mode 100644 index 0000000..c5ae1a2 --- /dev/null +++ b/clisp-2.49-glibc-2.17-1.patch @@ -0,0 +1,20 @@ +--- ./modules/bindings/glibc/linux.lisp.orig 2008-10-08 10:36:19.000000000 -0600 ++++ ./modules/bindings/glibc/linux.lisp 2012-07-25 19:05:07.014592097 -0600 +@@ -86,7 +86,7 @@ + + (def-c-type __key_t) ; int + +-(c-lines "#include ~%") ++(c-lines "#include ~%") + (def-c-type __ipc_pid_t) ; ushort + + ; --------------------------- ----------------------------------- +@@ -293,6 +293,8 @@ + ;; for robust mutexes + (def-c-const EOWNERDEAD (:documentation "Owner died")) ; 130 + (def-c-const ENOTRECOVERABLE (:documentation "State not recoverable")) ; 131 ++(def-c-const ERFKILL (:documentation "Operation not possible due to RF-kill")) ; 132 ++(def-c-const EHWPOISON (:documentation "Memory page has hardware error")) ; 133 + + ; -------------------------- ----------------------------------- + diff --git a/clisp-2.49-glibc-2.17-2.patch b/clisp-2.49-glibc-2.17-2.patch new file mode 100644 index 0000000..5f248bc --- /dev/null +++ b/clisp-2.49-glibc-2.17-2.patch @@ -0,0 +1,31 @@ +From: Togan Muftuoglu +Date: Access: 2012-11-28 16:13:07 +0100 +Referencens: http://comments.gmane.org/gmane.comp.lib.glibc.alpha/25618 +Subject: remove __swblk_t from linux.lisp +Upstream: no + +Glibc got rid of unused __swblk_t type, so the linux.lisp package needs to +be updated, enabling build +--- + modules/bindings/glibc/linux.lisp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/modules/bindings/glibc/linux.lisp ++++ b/modules/bindings/glibc/linux.lisp +@@ -38,7 +38,6 @@ + ; =========================== =================================== + + (c-lines "#include ~%") +- + ; --------------------------- ----------------------------------- + + (def-c-type __u_char uchar) +@@ -67,7 +66,7 @@ + (def-c-type __daddr_t) ; int + (def-c-type __caddr_t) ; c-pointer + (def-c-type __time_t) ; long +-(def-c-type __swblk_t) ; long ++;;(def-c-type __swblk_t) ; long + + (def-c-type __fd_mask ulong) + (eval-when (load compile eval) diff --git a/clisp-2.49-hostname.patch b/clisp-2.49-hostname.patch new file mode 100644 index 0000000..59dbf89 --- /dev/null +++ b/clisp-2.49-hostname.patch @@ -0,0 +1,74 @@ +--- src/socket.d.orig 2009-10-08 08:45:13.000000000 -0600 ++++ src/socket.d 2012-01-12 11:22:24.701723636 -0700 +@@ -57,8 +57,8 @@ + /* ============ hostnames and IP addresses only (no sockets) ============ + + Fetches the machine's host name. +- get_hostname(host =); +- The name is allocated on the stack, with dynamic extent. ++ get_hostname(hostname); ++ where hostname is an array of MAXHOSTNAMELEN+1 characters. + < const char* host: The host name. + (Note: In some cases we could get away with less system calls by simply + setting +@@ -67,13 +67,12 @@ + sds: never: you will always get localhost/127.0.0.1 - what's the point? */ + #if defined(HAVE_GETHOSTNAME) + /* present on all supported unix systems and on woe32 */ +- #define get_hostname(host_assignment) \ +- do { var char hostname[MAXHOSTNAMELEN+1]; \ ++ #define get_hostname(hostname) \ ++ do { \ + begin_system_call(); \ + if ( gethostname(&hostname[0],MAXHOSTNAMELEN) <0) { SOCK_error(); } \ + end_system_call(); \ + hostname[MAXHOSTNAMELEN] = '\0'; \ +- host_assignment &hostname[0]; \ + } while(0) + #else + #error get_hostname is not defined +@@ -207,8 +206,8 @@ LISPFUNN(machine_instance,0) + (if (or (null address) (zerop (length address))) + hostname + (apply #'string-concat hostname " [" (inet-ntop address) "]"))) */ +- var const char* host; +- get_hostname(host =); ++ var char host[MAXHOSTNAMELEN+1]; ++ get_hostname(host); + result = asciz_to_string(host,O(misc_encoding)); /* hostname as result */ + #ifdef HAVE_GETHOSTBYNAME + pushSTACK(result); /* hostname as 1st string */ +@@ -389,8 +388,8 @@ local int resolve_host1 (const void* add + modexp struct hostent* resolve_host (object arg) { + var struct hostent* he; + if (eq(arg,S(Kdefault))) { +- var char* host; +- get_hostname(host =); ++ var char host[MAXHOSTNAMELEN+1]; ++ get_hostname(host); + begin_system_call(); + he = gethostbyname(host); + end_system_call(); +@@ -724,8 +723,9 @@ global SOCKET connect_to_x_server (const + if (conntype == conn_tcp) { + var unsigned short port = X_TCP_PORT+display; + if (host[0] == '\0') { +- get_hostname(host =); +- fd = with_host_port(host,port,&connect_to_x_via_ip,NULL); ++ var char hostname[MAXHOSTNAMELEN+1]; ++ get_hostname(hostname); ++ fd = with_host_port(hostname,port,&connect_to_x_via_ip,NULL); + } else { + fd = with_host_port(host,port,&connect_to_x_via_ip,NULL); + } +@@ -798,8 +798,8 @@ global host_data_t * socket_getlocalname + if (socket_getlocalname_aux(socket_handle,hd) == NULL) + return NULL; + if (resolve_p) { /* Fill in hd->truename. */ +- var const char* host; +- get_hostname(host =); /* was: host = "localhost"; */ ++ var char host[MAXHOSTNAMELEN+1]; ++ get_hostname(host); /* was: host = "localhost"; */ + ASSERT(strlen(host) <= MAXHOSTNAMELEN); + strcpy(hd->truename,host); + } else { diff --git a/clisp.spec b/clisp.spec new file mode 100644 index 0000000..7bf9887 --- /dev/null +++ b/clisp.spec @@ -0,0 +1,163 @@ +%define with_postgresql 0 + +Name: clisp +Version: 2.49 +Release: 2mamba +Summary: Common Lisp (ANSI CL) implementation +Group: Applications/Development +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://clisp.cons.org/ +Source: http://surfnet.dl.sourceforge.net/sourceforge/clisp/%{name}-%{version}.tar.bz2 +Patch0: %{name}-2.49-db-5.1.patch +Patch1: clisp-2.49-glibc-2.17-1.patch +Patch2: clisp-2.49-glibc-2.17-2.patch +Patch3: clisp-2.49-hostname.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libffcall-devel +BuildRequires: libncurses-devel +BuildRequires: libreadline-devel +BuildRequires: libsigsegv-devel +## AUTOBUILDREQ-END +BuildRequires: gettext-devel >= 0.14.4 +%if %with_postgresql +BuildRequires: postgresql-devel >= 8.0 +%endif +Requires(post):%{__install_info} +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Common Lisp is a high-level, general-purpose programming language. +GNU CLISP is a Common Lisp implementation by Bruno Haible of Karlsruhe University and Michael Stoll of Munich University, both in Germany. +It mostly supports the Lisp described in the ANSI Common Lisp standard. + +GNU CLISP includes an interpreter, a compiler, a debugger, a large subset of CLOS, a foreign language interface and a socket interface. +An X11 interface is available through CLX, Garnet, CLUE/CLIO. +GNU CLISP runs Maxima, ACL2 and many other Common Lisp packages. + +%package devel +Summary: Development files for CLISP +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +Common Lisp is a high-level, general-purpose programming language. +GNU CLISP is a Common Lisp implementation by Bruno Haible of Karlsruhe University and Michael Stoll of Munich University, both in Germany. +It mostly supports the Lisp described in the ANSI Common Lisp standard. + +GNU CLISP includes an interpreter, a compiler, a debugger, a large subset of CLOS, a foreign language interface and a socket interface. +An X11 interface is available through CLX, Garnet, CLUE/CLIO. +GNU CLISP runs Maxima, ACL2 and many other Common Lisp packages. + +This package contains files necessary for linking CLISP. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p0 + +%build +sed -i -e 's|^ make check$||' configure +# setting CFLAGS breaks the build +#CFLAGS="%{optflags}" \ +./configure \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + --fsstnd=openmamba \ + --with-dynamic-ffi \ + --with-module=berkeley-db \ + --with-module=clx/new-clx \ + --with-module=i18n \ + --with-module=pcre \ +%if %with_postgresql + --with-module=postgresql \ +%endif + --with-module=rawsock \ + --with-module=regexp \ + --with-module=syscalls \ + --with-module=wildcard \ + --with-module=zlib \ + --with-module=bindings/glibc \ + --with-readline \ + build \ + CC=%{_host}-gcc +# --build %{_host} \ + +cd build +make + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +cd build +%makeinstall docdir=%{_docdir}/%{name}-%{version} LN_HARD="ln -s" + +# remove unpackaged files +rm -f %{buildroot}%{_docdir}/clisp-%{version}/doc/clisp.{dvi,1,ps} + +%{find_lang} %{name} +%{find_lang} %{name}low +cat %{name}low.lang >> %{name}.lang + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%files -f build/%{name}.lang +%defattr(-,root,root) +%{_bindir}/clisp +%{_datadir}/vim/vimfiles/after/syntax/lisp.vim +%{_datadir}/emacs/site-lisp/*.el +%{_datadir}/emacs/site-lisp/*.lisp +%dir %{_libdir}/clisp-%{version} +%dir %{_libdir}/clisp-%{version}/base +%{_libdir}/clisp-%{version}/base/lispinit.mem +%{_libdir}/clisp-%{version}/base/lisp.run +%{_libdir}/clisp-%{version}/data +%{_libdir}/clisp-%{version}/dynmod +%{_mandir}/man1/* +%dir %{_docdir}/%{name}-%{version} +%{_docdir}/%{name}-%{version}/* + +%files devel +%defattr(-,root,root,-) +%attr(0755,root,root) %{_bindir}/clisp-link +%{_libdir}/clisp-%{version}/base/*.a +%{_libdir}/clisp-%{version}/base/*.o +%{_libdir}/clisp-%{version}/base/*.h +%{_libdir}/clisp-%{version}/base/makevars +%{_libdir}/clisp-%{version}/berkeley-db +%{_libdir}/clisp-%{version}/bindings/glibc +%{_libdir}/clisp-%{version}/build-aux +%{_libdir}/clisp-%{version}/clx +%{_libdir}/clisp-%{version}/linkkit +%{_libdir}/clisp-%{version}/pcre +%{_libdir}/clisp-%{version}/rawsock +%{_libdir}/clisp-%{version}/wildcard +%{_libdir}/clisp-%{version}/zlib +%{_datadir}/aclocal/clisp.m4 + +%changelog +* Sat Aug 03 2013 Silvan Calarco 2.49-2mamba +- rebuilt with db 5.1 (added patch) + +* Wed Aug 18 2010 Automatic Build System 2.49-1mamba +- automatic update by autodist + +* Wed Aug 19 2009 Automatic Build System 2.48-1mamba +- automatic update by autodist + +* Fri Nov 14 2008 Silvan Calarco 2.47-1mamba +- automatic update by autodist + +* Wed Oct 04 2006 Davide Madrisan 2.40-1qilnx +- update to version 2.40 by autospec + +* Wed Aug 31 2005 Davide Madrisan 2.35-1qilnx +- update to version 2.35 by autospec + +* Wed Aug 10 2005 Davide Madrisan 2.34-1qilnx +- package created by autospec