recipes: tde/kgtk-qt3: Added
[dragora.git] / recipes / devel / meson / recipe
blob805398592407bd8e1c9d704ad4c18b831bff6fa9
1 # Build recipe for meson.
3 # Copyright (c) 2018-2021-2022 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=meson
21 version=0.61.0
22 release=1
24 # Define a category for the output of the package name
25 pkgcategory=devel
27 tarname=${program}-${version}.tar.gz
29 # Remote source(s)
30 fetch=https://github.com/mesonbuild/meson/releases/download/${version}/$tarname
32 description="
33 A high performance build system.
35 Meson is a cross-platform build system designed to be both as fast
36 and as user friendly as possible.  It supports many languages and
37 compilers, including GCC, Clang and Visual Studio.  Its build
38 definitions are written in a simple non-turing complete DSL.
41 homepage=https://www.mesonbuild.com
42 license="Apache License v2.0"
44 # Source documentation
45 docs="COPYING PKG-INFO README.md"
46 docsdir="${docdir}/${program}-${version}"
48 build()
50     unpack "${tardir}/$tarname"
52     cd "$srcdir"
54     # Set sane permissions
55     chmod -R u+w,go-w,a+rX-s .
57     python3 setup.py install \
58      --prefix=/usr \
59      --root="$destdir"
61     # Compress and link man pages (if needed)
62     if test -d "${destdir}/$mandir"
63     then
64         (
65             cd "${destdir}/$mandir"
66             find . -type f -exec lzip -9 {} +
67             find . -type l | while read -r file
68             do
69                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
70                 rm -- "$file"
71             done
72         )
73     fi
75     # Copy documentation
76     mkdir -p "${destdir}${docsdir}"
77     cp -p $docs "${destdir}${docsdir}"