recipes: libs/ncurses: Upgraded to version 6.2-20200919
[dragora.git] / recipes / devel / guile / recipe
blob31c89160fe3d8fcdd1a37067291720ab39164504
1 # Build recipe for guile.
3 # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
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
9 #    http://www.apache.org/licenses/LICENSE-2.0
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.
17 # Exit immediately on any error
18 set -e
20 program=guile
21 version=2.2.6
22 release=1
24 # Define a category for the output of the package name
25 pkgcategory=devel
27 tarname=${program}-${version}.tar.lz
29 # Remote source(s)
30 fetch=http://ftp.gnu.org/gnu/guile/$tarname
32 homepage=http://www.gnu.org/software/guile/
34 description="
35 The GNU Guile programming language.
37 Guile is designed to help programmers create flexible applications that
38 can be extended by users or other programmers with plug-ins, modules,
39 or scripts.  With Guile you can create applications and games for the
40 desktop, the Web, the command-line, and more.
42 For more information, visit:
43 $homepage
46 license="GPLv3+, LGPLv3+"
48 # Source documentation
49 docs="AUTHORS COPYING* ChangeLog GUILE-VERSION HACKING NEWS README THANKS"
50 docsdir="${docdir}/${program}-${version}"
52 build()
54     unpack "${tardir}/$tarname"
56     cd "$srcdir"
58     # Set sane permissions
59     chmod -R u+w,go-w,a+rX-s .
61     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
62      $configure_args \
63      --libdir=/usr/lib${libSuffix} \
64      --infodir=$infodir \
65      --mandir=$mandir \
66      --docdir=$docsdir \
67      --enable-static=no \
68      --enable-shared=yes \
69      --disable-rpath \
70      --with-threads \
71      --build="$(gcc -dumpmachine)"
73     # Uncomment the following (two) commented lines if you want to
74     # build the documentation.  We do not build it by default in
75     # order to save 9M, approx.
77     make -j${jobs} V=1
78     #make V=1 html
79     make -j${jobs} DESTDIR="$destdir" install-strip
80     #make -j${jobs} DESTDIR="$destdir" install-html
82     # Delete generated charset.alias
83     rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
85     # Move misplaced file(s) for GDB
86     mkdir -p "${destdir}/usr/share/gdb/auto-load/usr/lib${libSuffix}"
87     mv "${destdir}/usr/lib${libSuffix}"/*-gdb.scm \
88        "${destdir}/usr/share/gdb/auto-load/usr/lib${libSuffix}"
90     # Compress info documents deleting index file for the package
91     if test -d "${destdir}/$infodir"
92     then
93         rm -f "${destdir}/${infodir}/dir"
94         lzip -9 "${destdir}/${infodir}"/*
95     fi
97     # Compress and link man pages (if needed)
98     if test -d "${destdir}/$mandir"
99     then
100         (
101             cd "${destdir}/$mandir"
102             find . -type f -exec lzip -9 {} +
103             find . -type l | while read -r file
104             do
105                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
106                 rm -- "$file"
107             done
108         )
109     fi
111     # Copy documentation
112     mkdir -p "${destdir}${docsdir}"
113     cp -p $docs "${destdir}${docsdir}"