Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: x11-libs/libdrm/files/, x11-libs/libdrm/
Date: Mon, 07 May 2018 19:31:55
Message-Id: 1525721492.30badb32d8b4747c5e5d1165bd98935d756cc34a.blueness@gentoo
1 commit: 30badb32d8b4747c5e5d1165bd98935d756cc34a
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 7 19:31:32 2018 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Mon May 7 19:31:32 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=30badb32
7
8 x11-libs/libdrm: initial commit, fix ioctl() function prototype
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 x11-libs/libdrm/Manifest | 1 +
13 x11-libs/libdrm/files/fix-ioctl.patch | 15 +++++++
14 x11-libs/libdrm/libdrm-2.4.91.ebuild | 79 +++++++++++++++++++++++++++++++++++
15 x11-libs/libdrm/metadata.xml | 12 ++++++
16 4 files changed, 107 insertions(+)
17
18 diff --git a/x11-libs/libdrm/Manifest b/x11-libs/libdrm/Manifest
19 new file mode 100644
20 index 0000000..77b11d5
21 --- /dev/null
22 +++ b/x11-libs/libdrm/Manifest
23 @@ -0,0 +1 @@
24 +DIST libdrm-2.4.91.tar.bz2 815419 BLAKE2B 7df2a4bdb4b2708cc00b71173e7e261ab7f8645a473984a7cbda2c7073f14b7f87d53eb39cc075b743e72e4cda03b2c4fca6b9df6c7d5db2c739398a13f13f35 SHA512 07578c00c121ba37033db7172590e26d1545f81c242bbce2cfb7fb904bde504822c275d6468e5c5d20360d0046ae73d9b058aa0459ba35eb11927141cc998772
25
26 diff --git a/x11-libs/libdrm/files/fix-ioctl.patch b/x11-libs/libdrm/files/fix-ioctl.patch
27 new file mode 100644
28 index 0000000..3cf390b
29 --- /dev/null
30 +++ b/x11-libs/libdrm/files/fix-ioctl.patch
31 @@ -0,0 +1,15 @@
32 +diff -Naur libdrm-2.4.91.orig/tests/nouveau/threaded.c libdrm-2.4.91/tests/nouveau/threaded.c
33 +--- libdrm-2.4.91.orig/tests/nouveau/threaded.c 2018-03-05 21:06:45.000000000 +0000
34 ++++ libdrm-2.4.91/tests/nouveau/threaded.c 2018-05-07 19:25:46.371706548 +0000
35 +@@ -24,7 +24,10 @@
36 + # include "config.h"
37 + #endif
38 +
39 +-#include <sys/ioctl.h>
40 ++// Use glibc's function prototype for ioctl()
41 ++#include <bits/ioctl.h>
42 ++int ioctl (int, unsigned long, ...);
43 ++
44 + #include <dlfcn.h>
45 + #include <fcntl.h>
46 + #include <stdio.h>
47
48 diff --git a/x11-libs/libdrm/libdrm-2.4.91.ebuild b/x11-libs/libdrm/libdrm-2.4.91.ebuild
49 new file mode 100644
50 index 0000000..e047f69
51 --- /dev/null
52 +++ b/x11-libs/libdrm/libdrm-2.4.91.ebuild
53 @@ -0,0 +1,79 @@
54 +# Copyright 1999-2018 Gentoo Foundation
55 +# Distributed under the terms of the GNU General Public License v2
56 +
57 +EAPI=6
58 +
59 +EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/drm.git"
60 +
61 +if [[ ${PV} = 9999* ]]; then
62 + GIT_ECLASS="git-r3"
63 +fi
64 +
65 +inherit ${GIT_ECLASS} meson multilib-minimal
66 +
67 +DESCRIPTION="X.Org libdrm library"
68 +HOMEPAGE="https://dri.freedesktop.org/"
69 +if [[ ${PV} = 9999* ]]; then
70 + SRC_URI=""
71 +else
72 + SRC_URI="https://dri.freedesktop.org/libdrm/${P}.tar.bz2"
73 + KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
74 +fi
75 +
76 +VIDEO_CARDS="amdgpu exynos freedreno intel nouveau omap radeon tegra vc4 vivante vmware"
77 +for card in ${VIDEO_CARDS}; do
78 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
79 +done
80 +
81 +IUSE="${IUSE_VIDEO_CARDS} libkms valgrind"
82 +RESTRICT="test" # see bug #236845
83 +LICENSE="MIT"
84 +SLOT="0"
85 +
86 +RDEPEND="elibc_FreeBSD? ( >=dev-libs/libpthread-stubs-0.4:=[${MULTILIB_USEDEP}] )
87 + video_cards_intel? ( >=x11-libs/libpciaccess-0.13.1-r1:=[${MULTILIB_USEDEP}] )"
88 +DEPEND="${RDEPEND}
89 + >=dev-util/meson-0.43.0
90 + valgrind? ( dev-util/valgrind )"
91 +
92 +PATCHES=( "${FILESDIR}"/fix-ioctl.patch )
93 +
94 +src_unpack() {
95 + default
96 + [[ $PV = 9999* ]] && git-r3_src_unpack
97 +}
98 +
99 +multilib_src_configure() {
100 + local emesonargs=(
101 + # Udev is only used by tests now.
102 + -Dudev=false
103 + -Dcairo-tests=false
104 + -Damdgpu=$(usex video_cards_amdgpu true false)
105 + -Dexynos=$(usex video_cards_exynos true false)
106 + -Dfreedreno=$(usex video_cards_freedreno true false)
107 + -Dintel=$(usex video_cards_intel true false)
108 + -Dnouveau=$(usex video_cards_nouveau true false)
109 + -Domap=$(usex video_cards_omap true false)
110 + -Dradeon=$(usex video_cards_radeon true false)
111 + -Dtegra=$(usex video_cards_tegra true false)
112 + -Dvc4=$(usex video_cards_vc4 true false)
113 + -Detnaviv=$(usex video_cards_vivante true false)
114 + -Dvmwgfx=$(usex video_cards_vmware true false)
115 + -Dlibkms=$(usex libkms true false)
116 + # valgrind installs its .pc file to the pkgconfig for the primary arch
117 + -Dvalgrind=$(usex valgrind auto false)
118 + )
119 + meson_src_configure
120 +}
121 +
122 +multilib_src_compile() {
123 + meson_src_compile
124 +}
125 +
126 +multilib_src_test() {
127 + meson_src_test
128 +}
129 +
130 +multilib_src_install() {
131 + meson_src_install
132 +}
133
134 diff --git a/x11-libs/libdrm/metadata.xml b/x11-libs/libdrm/metadata.xml
135 new file mode 100644
136 index 0000000..25fe9f8
137 --- /dev/null
138 +++ b/x11-libs/libdrm/metadata.xml
139 @@ -0,0 +1,12 @@
140 +<?xml version="1.0" encoding="UTF-8"?>
141 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
142 +<pkgmetadata>
143 +<maintainer type="project">
144 +<email>x11@g.o</email>
145 +<name>X11</name>
146 +</maintainer>
147 +<use>
148 +<flag name="libkms">Enable building of libkms, a library for applications to interface with KMS</flag>
149 +<flag name="valgrind">Compile in valgrind memory hints</flag>
150 +</use>
151 +</pkgmetadata>