*/*: Discontinue Gentoo SuperH port
[gentoo.git] / dev-libs / wayland / wayland-1.17.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 if [[ ${PV} = *9999* ]]; then
7         EGIT_REPO_URI="https://gitlab.freedesktop.org/wayland/wayland.git"
8         inherit git-r3
9 else
10         SRC_URI="https://wayland.freedesktop.org/releases/${P}.tar.xz"
11         KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 sparc x86"
12 fi
13 inherit autotools libtool multilib-minimal toolchain-funcs
14
15 DESCRIPTION="Wayland protocol libraries"
16 HOMEPAGE="https://wayland.freedesktop.org/ https://gitlab.freedesktop.org/wayland/wayland"
17
18 LICENSE="MIT"
19 SLOT="0"
20 IUSE="doc static-libs"
21
22 BDEPEND="
23         virtual/pkgconfig
24         doc? (
25                 >=app-doc/doxygen-1.6[dot]
26                 app-text/xmlto
27                 >=media-gfx/graphviz-2.26.0
28                 sys-apps/grep[pcre]
29         )
30 "
31 DEPEND="
32         >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
33         dev-libs/libxml2:=
34         >=virtual/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
35 "
36 RDEPEND="${DEPEND}
37         !<media-libs/mesa-18.1.1-r1
38 "
39
40 src_prepare() {
41         default
42         [[ $PV = 9999* ]] && eautoreconf || elibtoolize
43 }
44
45 multilib_src_configure() {
46         local myeconfargs=(
47                 --disable-static
48                 $(multilib_native_use_enable doc documentation)
49                 $(multilib_native_enable dtd-validation)
50         )
51         tc-is-cross-compiler && myeconfargs+=( --with-host-scanner )
52
53         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
54 }
55
56 multilib_src_install_all() {
57         find "${D}" -name '*.la' -delete || die
58         einstalldocs
59 }
60
61 src_test() {
62         # We set it on purpose to only a short subdir name, as socket paths are
63         # created in there, which are 108 byte limited. With this it hopefully
64         # barely fits to the limit with /var/tmp/portage/$CAT/$PF/temp/xdr
65         export XDG_RUNTIME_DIR="${T}"/xdr
66         mkdir "${XDG_RUNTIME_DIR}" || die
67         chmod 0700 "${XDG_RUNTIME_DIR}" || die
68
69         multilib-minimal_src_test
70 }