1 # Build recipe for glib (release 2).
3 # Copyright (c) 2017-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.
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/libs"
27 tarname=${program}-${version}.tar.xz
30 fetch=http://download.gnome.org/sources/glib/${short_version}/$tarname
33 General purpose library of C routines.
35 GLib is the low-level core library that forms the basis for projects
36 such as GTK+ and GNOME. It provides data structure handling for C,
37 portability wrappers, and interfaces for such runtime functionality
38 as an event loop, threads, dynamic loading, and an object system.
41 homepage=http://wiki.gnome.org/Projects/GLib
44 # Source documentation
45 docs="AUTHORS COPYING HACKING NEWS README"
46 docsdir="${docdir}/${program}-${version}"
52 unpack "${tardir}/$tarname"
56 # Set sane permissions
57 chmod -R u+w,go-w,a+rX-s .
62 CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
63 meson setup $configure_args \
64 --libdir /usr/lib${libSuffix} \
70 -Dforce_posix_threads=true \
71 -Dinternal_pcre=false \
79 DESTDIR="$destdir" ninja install
83 # Delete generated charset.alias
84 rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
86 # Compress and link man pages (if needed)
87 if test -d "${destdir}/$mandir"
90 cd "${destdir}/$mandir"
91 find . -type f -exec lzip -9 '{}' +
92 find . -type l | while read -r file
94 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
101 mkdir -p "${destdir}${docsdir}"
102 cp -p $docs "${destdir}${docsdir}"