recipes: libs/ncurses: Do not use the C11 Noreturn feature for now
[dragora.git] / recipes / tools / dialog / recipe
bloba17637232588b0e4defedd039ac050865f804c2c
1 # Build recipe for dialog.
3 # Copyright (c) 2017-2021 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=dialog
21 version=1.3-20210324
22 release=2
24 # Define a category for the output of the package name
25 pkgcategory=tools
27 tarname=${program}-${version}.tgz
29 # Remote source(s)
30 fetch=https://invisible-mirror.net/archives/dialog/$tarname
32 description="
33 Display dialog boxes in scripts.
35 Dialog is a program that will let you present a variety
36 of questions or display messages in nice looking color
37 non-graphical dialog boxes from a shell or perl script.
40 homepage=https://www.gnu.org/software/ncurses
41 license=LGPLv2.1
43 # Source documentation
44 docs="CHANGES COPYING README VERSION"
45 docsdir="${docdir}/${program}-${version}"
47 # Custom source directory
48 srcdir=${program}-${version}
50 build()
52     unpack "${tardir}/$tarname"
54     cd "$srcdir"
56     # Set sane permissions
57     chmod -R u+w,go-w,a+rX-s .
59     ./configure CPPFLAGS="$QICPPFLAGS" \
60     CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
61      $configure_args \
62      --libdir=/usr/lib${libSuffix} \
63      --mandir=$mandir \
64      --enable-widec \
65      --enable-nls \
66      --disable-rpath-hack \
67      --build="$(gcc -dumpmachine)"
69     make -j${jobs}
70     make -j${jobs} DESTDIR="$destdir" install
72     # Insert the look & feel for Dragora 3+.  ;-)
74     mkdir -p "${destdir}/etc"
75     cp -p "${worktree}/archive/dialog/dialogrc" "${destdir}/etc/"
76     chmod 644 "${destdir}/etc/dialogrc"
78     # To manage .new (config) files via graft(8)
79     touch "${destdir}/etc/.graft-config"
81     # Compress man page and copy the documentation
83     lzip -9 "${destdir}/${mandir}/man1/dialog.1"
85     mkdir -p "${destdir}${docsdir}"
86     cp -p $docs "${destdir}${docsdir}"