1 # Build recipe for glib (release 2).
3 # Copyright (c) 2017 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.
24 tarname=${program}-${version}.tar.xz
27 fetch=http://download.gnome.org/sources/glib/${short_version}/$tarname
30 General purpose library of C routines.
32 GLib is the low-level core library that forms the basis for projects
33 such as GTK+ and GNOME. It provides data structure handling for C,
34 portability wrappers, and interfaces for such runtime functionality
35 as an event loop, threads, dynamic loading, and an object system.
38 homepage=http://wiki.gnome.org/Projects/GLib
41 # Source documentation
42 docs="AUTHORS COPYING ChangeLog HACKING NEWS README README.commits"
43 docsdir="${docdir}/${program}-${version}"
49 unpack "${tardir}/$tarname"
53 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
55 --libdir=/usr/lib${libSuffix} \
62 --with-threads=posix \
64 --with-python=/usr/bin/python3 \
65 --build="$(cc -dumpmachine)"
68 make -j${jobs} DESTDIR="$destdir" install-strip
70 # Compress info documents deleting index file for the package
71 if test -d "${destdir}/$infodir"
73 rm -f "${destdir}/${infodir}/dir"
74 lzip -9 "${destdir}/${infodir}"/*
77 # Compress and link man pages (if needed)
78 if test -d "${destdir}/$mandir"
81 cd "${destdir}/$mandir"
82 find . -type f -exec lzip -9 '{}' +
83 find . -type l | while read -r file
85 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
92 mkdir -p "${destdir}${docsdir}"
93 cp -p $docs "${destdir}${docsdir}"