etc: Enable a tty for a serial port by default.
[dragora.git] / recipes / devel / guile / recipe
blobcb55035e23783ed73d4ca801aabe0638e83055da
1 # Build recipe for guile.
3 # Copyright (c) 2018-2019, 2021 Matias Fonzo, <selk@dragora.org>.
4 # Copyright (c) 2022-2023 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 # Exit immediately on any error
19 set -e
21 program=guile
22 version=3.0.9
23 release=1
25 # Define a category for the output of the package name
26 pkgcategory=devel
28 tarname=${program}-${version}.tar.lz
30 # Remote source(s)
31 fetch=https://ftp.gnu.org/gnu/guile/$tarname
33 homepage=https://www.gnu.org/software/guile/
35 description="
36 The GNU Guile programming language.
38 Guile is designed to help programmers create flexible applications that
39 can be extended by users or other programmers with plug-ins, modules,
40 or scripts.  With Guile you can create applications and games for the
41 desktop, the Web, the command-line, and more.
43 For more information, visit:
44 $homepage
47 license="GPLv3+, LGPLv3+"
49 # Source documentation
50 docs="AUTHORS COPYING* ChangeLog GUILE-VERSION HACKING NEWS README THANKS"
51 docsdir="${docdir}/${program}-${version}"
53 build()
55     unpack "${tardir}/$tarname"
57     cd "$srcdir"
59     # Set sane permissions
60     chmod -R u+w,go-w,a+rX-s .
62     ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" \
63     LDFLAGS="$QILDFLAGS" \
64      $configure_args \
65      --libdir=/usr/lib${libSuffix} \
66      --infodir=$infodir \
67      --mandir=$mandir \
68      --docdir=$docsdir \
69      --enable-static=no \
70      --enable-shared=yes \
71      --disable-error-on-warning \
72      --build="$(gcc -dumpmachine)"
74     make -j${jobs} V=1
75     make -j${jobs} V=1 html
76     make -j${jobs} DESTDIR="$destdir" install-strip
77     make -j${jobs} DESTDIR="$destdir" install-html
79     # Delete generated charset.alias
80     rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
82     # Move misplaced file(s) for GDB
83     mkdir -p "${destdir}/usr/share/gdb/auto-load/usr/lib${libSuffix}"
84     mv "${destdir}/usr/lib${libSuffix}"/*-gdb.scm \
85        "${destdir}/usr/share/gdb/auto-load/usr/lib${libSuffix}"
87     # Compress info documents deleting index file for the package
88     if test -d "${destdir}/$infodir"
89     then
90         rm -f "${destdir}/${infodir}/dir"
91         lzip -9 "${destdir}/${infodir}"/*
92     fi
94     # Compress and link man pages (if needed)
95     if test -d "${destdir}/$mandir"
96     then
97         (
98             cd "${destdir}/$mandir"
99             find . -type f -exec lzip -9 {} +
100             find . -type l | while read -r file
101             do
102                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
103                 rm -- "$file"
104             done
105         )
106     fi
108     # Copy documentation
109     mkdir -p "${destdir}/$docsdir"
110     cp -p $docs "${destdir}/$docsdir"