recipe 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # Build recipe for guile.
  2. #
  3. # Copyright (c) 2018-2019, 2021 Matias Fonzo, <selk@dragora.org>.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. # Exit immediately on any error
  17. set -e
  18. program=guile
  19. version=3.0.7
  20. release=1
  21. # Define a category for the output of the package name
  22. pkgcategory=devel
  23. tarname=${program}-${version}.tar.lz
  24. # Remote source(s)
  25. fetch=https://ftp.gnu.org/gnu/guile/$tarname
  26. homepage=https://www.gnu.org/software/guile/
  27. description="
  28. The GNU Guile programming language.
  29. Guile is designed to help programmers create flexible applications that
  30. can be extended by users or other programmers with plug-ins, modules,
  31. or scripts. With Guile you can create applications and games for the
  32. desktop, the Web, the command-line, and more.
  33. For more information, visit:
  34. $homepage
  35. "
  36. license="GPLv3+, LGPLv3+"
  37. # Source documentation
  38. docs="AUTHORS COPYING* ChangeLog GUILE-VERSION HACKING NEWS README THANKS"
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. # Set sane permissions
  45. chmod -R u+w,go-w,a+rX-s .
  46. ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" \
  47. LDFLAGS="$QILDFLAGS" \
  48. $configure_args \
  49. --libdir=/usr/lib${libSuffix} \
  50. --infodir=$infodir \
  51. --mandir=$mandir \
  52. --docdir=$docsdir \
  53. --enable-static=no \
  54. --enable-shared=yes \
  55. --disable-rpath \
  56. --with-threads \
  57. --build="$(gcc -dumpmachine)"
  58. make -j${jobs} V=1
  59. make 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. }