recipe 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. # Build recipe for clisp.
  2. #
  3. # Copyright (c) 2017 MMPG, <mmpg@vp.pl>.
  4. # Copyright (c) 2017, 2019-2022 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=20221228_957c79a25; # 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. # Limit parallel jobs of this build, otherwise ends in error
  49. jobs=1
  50. build()
  51. {
  52. unpack "${tardir}/$tarname"
  53. cd "$srcdir"
  54. # Set sane permissions
  55. chmod -R u+w,go-w,a+rX-s .
  56. # Build in a separate directory
  57. rm -rf BUILD
  58. mkdir BUILD
  59. cd BUILD
  60. # Bogus files in order to continue with the build
  61. touch clisp.pdf clisp-link.pdf
  62. ../configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" \
  63. LDFLAGS="$QILDFLAGS" \
  64. FORCE_UNSAFE_CONFIGURE=1 \
  65. --srcdir=../ \
  66. --prefix=/usr \
  67. --libdir=/usr/lib${libSuffix} \
  68. --infodir=$infodir \
  69. --mandir=$mandir \
  70. --docdir=$docsdir \
  71. --disable-rpath \
  72. --with-dynamic-ffi \
  73. --with-module=berkeley-db \
  74. --with-module=gdbm \
  75. --with-module=pcre \
  76. --with-module=zlib \
  77. --disable-mmap \
  78. --build="$(gcc -dumpmachine)"
  79. make -j${jobs} V=1 mandir=$mandir infodir=$infodir all
  80. make -j${jobs} mandir=$mandir infodir=$infodir DESTDIR="$destdir" install
  81. # Remove previous bogus files from the documentation
  82. rm -f "${destdir}/$docsdir"/*.pdf
  83. cd ..
  84. # Compress info documents deleting index file for the package
  85. if test -d "${destdir}/$infodir"
  86. then
  87. rm -f "${destdir}/${infodir}/dir"
  88. lzip -9 "${destdir}/${infodir}"/*
  89. fi
  90. # Compress and link man pages (if needed)
  91. if test -d "${destdir}/$mandir"
  92. then
  93. (
  94. cd "${destdir}/$mandir"
  95. find . -type f -exec lzip -9 {} +
  96. find . -type l | while read -r file
  97. do
  98. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  99. rm -- "$file"
  100. done
  101. )
  102. fi
  103. # Copy documentation
  104. mkdir -p "${destdir}/$docsdir"
  105. cp -p $docs "${destdir}/$docsdir"
  106. }