More updates...
[dragora.git] / recipes / devel / clisp / recipe
blobe4963fb1daa7a09ddd8c497c2eaf12fb6d8d86e0
1 # Build recipe for clisp.
3 # Copyright (c) 2017 MMPG, <mmpg@vp.pl>.
4 # Copyright (c) 2017, 2019-2020 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 #    http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 program=clisp
19 version=20191103_c26de7873;     # From http://gitlab.com/gnu-clisp/clisp
20 pkgversion=2.49.93.${version}
21 release=1
23 # Define hash tag to categorize the package name output
24 pkghashtag=devel
26 tarname=${program}-${version}.tar.lz
28 # Remote source(s)
29 fetch="
30  http://rsync.dragora.org/current/sources/$tarname
31  http://mirror.cedia.org.ec/dragora/current/sources/$tarname
34 description="
35 An ANSI Common Lisp Implementation.
37 In computing, CLISP is an implementation of the programming language
38 Common Lisp originally developed by Bruno Haible and Michael Stoll for
39 the Atari ST.
41 LISP includes an interpreter, a bytecode compiler, debugger, socket
42 interface, high-level foreign language interface, strong
43 internationalization support, and two object systems:
44 Common Lisp Object System (CLOS) and metaobject protocol (MOP).
46 It is written in C and Common Lisp. It is now part of the GNU Project
47 and is free software, available under the terms of the GNU General
48 Public License (GPL).
51 hompage=http://clisp.org
52 license=GPLv2+
54 # Source documentation
55 docs="ANNOUNCE COPYRIGHT GNU-GPL HACKING SUMMARY"
56 docsdir="${docdir}/${program}-${pkgversion}"
58 build()
60     set -e
62     unpack "${tardir}/$tarname"
63         
64     cd "$srcdir"
66     # Set sane permissions
67     chmod -R u+w,go-w,a+rX-s .
69     # Build in a separate directory
70     rm -rf build
71     mkdir -p build
73     cd build
75     ../configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
76     FORCE_UNSAFE_CONFIGURE=1 \
77      --srcdir=../ \
78      --prefix=/usr \
79      --libdir=/usr/lib${libSuffix} \
80      --mandir=$mandir \
81      --docdir=$docsdir \
82      --disable-rpath \
83      --with-dynamic-ffi \
84      --with-module=berkeley-db \
85      --with-module=gdbm \
86      --with-module=pcre \
87      --with-module=zlib \
88      --build="$(cc -dumpmachine)"
90     make -j${jobs} V=1
91     make -j${jobs} DESTDIR="$destdir" install
93     cd ..
95     # Compress and link man pages (if needed)
96     if test -d "${destdir}/$mandir"
97     then
98         (
99             cd "${destdir}/$mandir"
100             find . -type f -exec lzip -9 '{}' +
101             find . -type l | while read -r file
102             do
103                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
104                 rm -- "$file"
105             done
106         )
107     fi
109     # Copy documentation
110     mkdir -p "${destdir}${docsdir}"
111     cp -p $docs "${destdir}${docsdir}"