1 # Build recipe for GObject Introspection.
3 # Copyright (C) 2018, MMPG <mmpg@vp.pl>
4 # Copyright (C) 2018-2019, 2021-2022 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
21 program=gobject-introspection
25 # Define a category for the output of the package name
28 tarname=${program}-${version}.tar.xz
31 fetch="https://download.gnome.org/sources/gobject-introspection/${version%.*}/$tarname"
34 A layer between C libraries (using GObject) and language bindings.
36 GObject Introspection is a project for providing machine readable
37 introspection data of the API of C libraries. This introspection data
38 can be used for automatic code generation for bindings, API
39 verification, and documentation generation.
42 homepage=https://wiki.gnome.org/Projects/GObjectIntrospection/
43 license="GPLv2+ | LGPLv2+, some MIT code in giscanner/"
46 docs="COPYING* NEWS TODO"
47 docsdir="${docdir}/${program}-${version}"
51 unpack "${tardir}/$tarname"
55 # Apply a patch that allows building with Meson version 0.61 or above
56 # Thanks to "Beyond Linux From Scratch"
57 patch -Np1 -i "${worktree}/patches/gobject-introspection/gobject-introspection-1.70.0-build_fix-1.patch"
59 # Set sane permissions
60 chmod -R u+w,go-w,a+rX-s .
66 CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
67 meson setup $configure_args \
68 --libdir /usr/lib${libSuffix} \
74 DESTDIR="$destdir" ninja -j${jobs} install
78 # Compress and link man pages (if needed)
79 if test -d "${destdir}/$mandir"
82 cd "${destdir}/$mandir"
83 find . -type f -exec lzip -9 {} +
84 find . -type l | while read -r file
86 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
93 mkdir -p "${destdir}/$docsdir"
94 cp -p $docs "${destdir}/$docsdir"