recipes: devel/meson: ugpraded to version 0.52.0
[dragora.git] / recipes / devel / meson / recipe
blobd054eca94db1af4c8bbf69e96c0e7094d09fa4aa
1 # Build recipe for meson.
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 program=meson
18 version=0.52.0
19 release=1
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/devel"
24 tarname=${program}-${version}.tar.gz
26 # Remote source(s)
27 fetch=http://github.com/mesonbuild/meson/releases/download/${version}/$tarname
29 description="
30 A high performance build system.
32 Meson is a cross-platform build system designed to be both as fast
33 and as user friendly as possible.  It supports many languages and
34 compilers, including GCC, Clang and Visual Studio.  Its build
35 definitions are written in a simple non-turing complete DSL.
38 homepage=http://www.mesonbuild.com
39 license="Apache License v2.0"
41 # Source documentation
42 docs="COPYING PKG-INFO README.md"
43 docsdir="${docdir}/${program}-${version}"
45 build()
47     set -e
49     unpack "${tardir}/$tarname"
51     cd "$srcdir"
53     # Set sane permissions
54     chmod -R u+w,go-w,a+rX-s .
56     python3 setup.py install \
57      --prefix=/usr \
58      --root="$destdir"
60     # Compress and link man pages (if needed)
61     if test -d "${destdir}/$mandir"
62     then
63         (
64             cd "${destdir}/$mandir"
65             find . -type f -exec lzip -9 '{}' +
66             find . -type l | while read -r file
67             do
68                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
69                 rm -- "$file"
70             done
71         )
72     fi
74     # Copy documentation
75     mkdir -p "${destdir}${docsdir}"
76     cp -p $docs "${destdir}${docsdir}"