recipe 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # Build recipe for guile.
  2. #
  3. # Copyright (c) 2018-2019, 2021 Matias Fonzo, <selk@dragora.org>.
  4. # Copyright (c) 2022-2023 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=guile
  20. version=3.0.9
  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=https://ftp.gnu.org/gnu/guile/$tarname
  27. homepage=https://www.gnu.org/software/guile/
  28. description="
  29. The GNU Guile programming language.
  30. Guile is designed to help programmers create flexible applications that
  31. can be extended by users or other programmers with plug-ins, modules,
  32. or scripts. With Guile you can create applications and games for the
  33. desktop, the Web, the command-line, and more.
  34. For more information, visit:
  35. $homepage
  36. "
  37. license="GPLv3+, LGPLv3+"
  38. # Source documentation
  39. docs="AUTHORS COPYING* ChangeLog GUILE-VERSION HACKING NEWS README THANKS"
  40. docsdir="${docdir}/${program}-${version}"
  41. build()
  42. {
  43. unpack "${tardir}/$tarname"
  44. cd "$srcdir"
  45. # Set sane permissions
  46. chmod -R u+w,go-w,a+rX-s .
  47. ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" \
  48. LDFLAGS="$QILDFLAGS" \
  49. $configure_args \
  50. --libdir=/usr/lib${libSuffix} \
  51. --infodir=$infodir \
  52. --mandir=$mandir \
  53. --docdir=$docsdir \
  54. --enable-static=no \
  55. --enable-shared=yes \
  56. --disable-error-on-warning \
  57. --build="$(gcc -dumpmachine)"
  58. make -j${jobs} V=1
  59. make -j${jobs} V=1 html
  60. make -j${jobs} DESTDIR="$destdir" install-strip
  61. make -j${jobs} DESTDIR="$destdir" install-html
  62. # Delete generated charset.alias
  63. rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
  64. # Move misplaced file(s) for GDB
  65. mkdir -p "${destdir}/usr/share/gdb/auto-load/usr/lib${libSuffix}"
  66. mv "${destdir}/usr/lib${libSuffix}"/*-gdb.scm \
  67. "${destdir}/usr/share/gdb/auto-load/usr/lib${libSuffix}"
  68. # Compress info documents deleting index file for the package
  69. if test -d "${destdir}/$infodir"
  70. then
  71. rm -f "${destdir}/${infodir}/dir"
  72. lzip -9 "${destdir}/${infodir}"/*
  73. fi
  74. # Compress and link man pages (if needed)
  75. if test -d "${destdir}/$mandir"
  76. then
  77. (
  78. cd "${destdir}/$mandir"
  79. find . -type f -exec lzip -9 {} +
  80. find . -type l | while read -r file
  81. do
  82. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  83. rm -- "$file"
  84. done
  85. )
  86. fi
  87. # Copy documentation
  88. mkdir -p "${destdir}/$docsdir"
  89. cp -p $docs "${destdir}/$docsdir"
  90. }