recipe 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. # Build recipe for clisp.
  2. #
  3. # Copyright (c) 2017 MMPG, <mmpg@vp.pl>.
  4. # Copyright (c) 2017, 2019-2021 Matias Fonzo, <selk@dragora.org>.
  5. #
  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
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  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.
  17. # Exit immediately on any error
  18. set -e
  19. program=clisp
  20. version=20210628_de01f0f47; # From https://gitlab.com/gnu-clisp/clisp
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=devel
  24. tarname=${program}-${version}.tar.lz
  25. # Remote source(s)
  26. fetch="
  27. https://dragora.mirror.garr.it/current/sources/$tarname
  28. rsync://rsync.dragora.org/current/sources/$tarname
  29. "
  30. description="
  31. An ANSI Common Lisp Implementation.
  32. In computing, CLISP is an implementation of the programming language
  33. Common Lisp originally developed by Bruno Haible and Michael Stoll for
  34. the Atari ST.
  35. LISP includes an interpreter, a bytecode compiler, debugger, socket
  36. interface, high-level foreign language interface, strong
  37. internationalization support, and two object systems:
  38. Common Lisp Object System (CLOS) and metaobject protocol (MOP).
  39. It is written in C and Common Lisp. It is now part of the GNU Project
  40. and is free software, available under the terms of the GNU General
  41. Public License (GPL).
  42. "
  43. hompage=https://clisp.org
  44. license=GPLv2+
  45. # Source documentation
  46. docs="ANNOUNCE COPYRIGHT GNU-GPL HACKING SUMMARY"
  47. docsdir="${docdir}/${program}-${version}"
  48. build()
  49. {
  50. unpack "${tardir}/$tarname"
  51. cd "$srcdir"
  52. # Set sane permissions
  53. chmod -R u+w,go-w,a+rX-s .
  54. # Build in a separate directory
  55. rm -rf BUILD
  56. mkdir BUILD
  57. cd BUILD
  58. ../configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" \
  59. LDFLAGS="$QILDFLAGS" \
  60. FORCE_UNSAFE_CONFIGURE=1 \
  61. --srcdir=../ \
  62. --prefix=/usr \
  63. --libdir=/usr/lib${libSuffix} \
  64. --mandir=$mandir \
  65. --docdir=$docsdir \
  66. --disable-rpath \
  67. --with-dynamic-ffi \
  68. --with-module=berkeley-db \
  69. --with-module=gdbm \
  70. --with-module=pcre \
  71. --with-module=zlib \
  72. --build="$(gcc -dumpmachine)"
  73. make -j${jobs} V=1
  74. make -j${jobs} DESTDIR="$destdir" install
  75. cd ..
  76. # Compress and link man pages (if needed)
  77. if test -d "${destdir}/$mandir"
  78. then
  79. (
  80. cd "${destdir}/$mandir"
  81. find . -type f -exec lzip -9 {} +
  82. find . -type l | while read -r file
  83. do
  84. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  85. rm -- "$file"
  86. done
  87. )
  88. fi
  89. # Copy documentation
  90. mkdir -p "${destdir}/$docsdir"
  91. cp -p $docs "${destdir}/$docsdir"
  92. }