recipes: xorg/proto/xorgproto: Upgraded to version 2021.3
[dragora.git] / recipes / xorg / proto / xorgproto / recipe
blobc993e41ae2f4c7b82244504b18357ed3b98dca2a
1 # Build recipe for xorgproto.
3 # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
4 # Copyright (c) 2021 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=xorgproto
22 version=2021.3
23 release=1
25 # Define a category for the output of the package name
26 pkgcategory=xorg_proto
28 tarname=${program}-${version}.tar.bz2
30 # Remote source(s)
31 fetch=https://www.x.org/releases/individual/proto/$tarname
33 description="
34 X Window System Unified Protocol.
36 This package provides the headers and specification documents defining
37 the core protocol and (many) extensions for the X Window System.  The
38 extensions are those common among servers descended from X.Org 6.7.  It
39 also includes a number of headers that aren't purely protocol related,
40 but are depended upon by many other X Window System packages to provide
41 common definitions and porting layer.
44 homepage=https://www.x.org
45 license="MIT X Consortium"
47 # Source documentation
48 docs="AUTHORS COPYING* README.md"
49 docsdir="${docdir}/${program}-${version}"
51 build()
53     unpack "${tardir}/$tarname"
55     cd "$srcdir"
57     # Set sane permissions
58     chmod -R u+w,go-w,a+rX-s .
60     rm -rf BUILD
61     mkdir BUILD
62     cd BUILD
64     meson setup $configure_args \
65      --libdir /usr/lib${libSuffix} \
66      --mandir $mandir \
67      --buildtype=release \
68      -Dlegacy=true \
69      ..
71     ninja -j${jobs}
72     DESTDIR="$destdir" ninja -j${jobs} install
74     # This is provided by 'xorg/lib/libXvMC' currently
75     rm "${destdir}/usr/include/X11/extensions/vldXvMC.h"
77     cd ..
79     # Compress and link man pages (if needed)
80     if test -d "${destdir}/$mandir"
81     then
82         (
83             cd "${destdir}/$mandir"
84             find . -type f -exec lzip -9 {} +
85             find . -type l | while read -r file
86             do
87                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
88                 rm -- "$file"
89             done
90         )
91     fi
93     # Copy documentation
94     mkdir -p "${destdir}${docsdir}"
95     cp -p $docs "${destdir}${docsdir}"