recipes: compressors/xz: Upgraded to version 5.6.2
[dragora.git] / recipes / libs / libepoxy / recipe
blob0ecc6fef5ed4ca4c38e467d7b62001eaf96a84a5
1 # Build recipe for liepoxy.
3 # Copyright (c) 2017 Mateus P. Rodrigues, <mprodrigues@dragora.org>.
4 # Copyright (c) 2018, 2020-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
19 set -e
21 program=libepoxy
22 version=1.5.10
23 release=1
25 # Define a category for the output of the package name
26 pkgcategory=libs
28 tarname=${program}-${version}.tar.xz
30 # Remote source(s)
31 fetch=https://download.gnome.org/sources/libepoxy/"${version%.*}"/$tarname
33 description="
34 A library for handling OpenGL function pointer management.
36 It hides the complexity of dlopen(), dlsym(), glXGetProcAddress(),
37 eglGetProcAddress(), etc. from the app developer, with very little
38 knowledge needed on their part.  They get to read GL specs and write
39 code using undecorated function names like glCompileShader().
42 homepage=https://github.com/anholt/libepoxy
43 license=MIT
45 # Source documentation
46 docs="COPYING README.md"
47 docsdir="${docdir}/${program}-${version}"
49 build()
51     unpack "${tardir}/$tarname"
53     cd "$srcdir"
55     # Set sane permissions
56     chmod -R u+w,go-w,a+rX-s .
58     rm -rf BUILD
59     mkdir BUILD
60     cd BUILD
62     CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
63     meson setup $configure_args \
64      --libdir /usr/lib${libSuffix} \
65      --buildtype=release \
66      --strip \
67      -Dglx=yes \
68      -Degl=yes \
69      -Dx11=true \
70      ..
72     ninja -j${jobs}
73     DESTDIR="$destdir" ninja -j${jobs} install
75     cd ..
77     # Copy documentation
78     mkdir -p "${destdir}/$docsdir"
79     cp -p $docs "${destdir}/$docsdir"