commit: 30badb32d8b4747c5e5d1165bd98935d756cc34a Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> AuthorDate: Mon May 7 19:31:32 2018 +0000 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> CommitDate: Mon May 7 19:31:32 2018 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=30badb32
x11-libs/libdrm: initial commit, fix ioctl() function prototype Package-Manager: Portage-2.3.24, Repoman-2.3.6 x11-libs/libdrm/Manifest | 1 + x11-libs/libdrm/files/fix-ioctl.patch | 15 +++++++ x11-libs/libdrm/libdrm-2.4.91.ebuild | 79 +++++++++++++++++++++++++++++++++++ x11-libs/libdrm/metadata.xml | 12 ++++++ 4 files changed, 107 insertions(+) diff --git a/x11-libs/libdrm/Manifest b/x11-libs/libdrm/Manifest new file mode 100644 index 0000000..77b11d5 --- /dev/null +++ b/x11-libs/libdrm/Manifest @@ -0,0 +1 @@ +DIST libdrm-2.4.91.tar.bz2 815419 BLAKE2B 7df2a4bdb4b2708cc00b71173e7e261ab7f8645a473984a7cbda2c7073f14b7f87d53eb39cc075b743e72e4cda03b2c4fca6b9df6c7d5db2c739398a13f13f35 SHA512 07578c00c121ba37033db7172590e26d1545f81c242bbce2cfb7fb904bde504822c275d6468e5c5d20360d0046ae73d9b058aa0459ba35eb11927141cc998772 diff --git a/x11-libs/libdrm/files/fix-ioctl.patch b/x11-libs/libdrm/files/fix-ioctl.patch new file mode 100644 index 0000000..3cf390b --- /dev/null +++ b/x11-libs/libdrm/files/fix-ioctl.patch @@ -0,0 +1,15 @@ +diff -Naur libdrm-2.4.91.orig/tests/nouveau/threaded.c libdrm-2.4.91/tests/nouveau/threaded.c +--- libdrm-2.4.91.orig/tests/nouveau/threaded.c 2018-03-05 21:06:45.000000000 +0000 ++++ libdrm-2.4.91/tests/nouveau/threaded.c 2018-05-07 19:25:46.371706548 +0000 +@@ -24,7 +24,10 @@ + # include "config.h" + #endif + +-#include <sys/ioctl.h> ++// Use glibc's function prototype for ioctl() ++#include <bits/ioctl.h> ++int ioctl (int, unsigned long, ...); ++ + #include <dlfcn.h> + #include <fcntl.h> + #include <stdio.h> diff --git a/x11-libs/libdrm/libdrm-2.4.91.ebuild b/x11-libs/libdrm/libdrm-2.4.91.ebuild new file mode 100644 index 0000000..e047f69 --- /dev/null +++ b/x11-libs/libdrm/libdrm-2.4.91.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/drm.git" + +if [[ ${PV} = 9999* ]]; then + GIT_ECLASS="git-r3" +fi + +inherit ${GIT_ECLASS} meson multilib-minimal + +DESCRIPTION="X.Org libdrm library" +HOMEPAGE="https://dri.freedesktop.org/" +if [[ ${PV} = 9999* ]]; then + SRC_URI="" +else + SRC_URI="https://dri.freedesktop.org/libdrm/${P}.tar.bz2" + KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" +fi + +VIDEO_CARDS="amdgpu exynos freedreno intel nouveau omap radeon tegra vc4 vivante vmware" +for card in ${VIDEO_CARDS}; do + IUSE_VIDEO_CARDS+=" video_cards_${card}" +done + +IUSE="${IUSE_VIDEO_CARDS} libkms valgrind" +RESTRICT="test" # see bug #236845 +LICENSE="MIT" +SLOT="0" + +RDEPEND="elibc_FreeBSD? ( >=dev-libs/libpthread-stubs-0.4:=[${MULTILIB_USEDEP}] ) + video_cards_intel? ( >=x11-libs/libpciaccess-0.13.1-r1:=[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + >=dev-util/meson-0.43.0 + valgrind? ( dev-util/valgrind )" + +PATCHES=( "${FILESDIR}"/fix-ioctl.patch ) + +src_unpack() { + default + [[ $PV = 9999* ]] && git-r3_src_unpack +} + +multilib_src_configure() { + local emesonargs=( + # Udev is only used by tests now. + -Dudev=false + -Dcairo-tests=false + -Damdgpu=$(usex video_cards_amdgpu true false) + -Dexynos=$(usex video_cards_exynos true false) + -Dfreedreno=$(usex video_cards_freedreno true false) + -Dintel=$(usex video_cards_intel true false) + -Dnouveau=$(usex video_cards_nouveau true false) + -Domap=$(usex video_cards_omap true false) + -Dradeon=$(usex video_cards_radeon true false) + -Dtegra=$(usex video_cards_tegra true false) + -Dvc4=$(usex video_cards_vc4 true false) + -Detnaviv=$(usex video_cards_vivante true false) + -Dvmwgfx=$(usex video_cards_vmware true false) + -Dlibkms=$(usex libkms true false) + # valgrind installs its .pc file to the pkgconfig for the primary arch + -Dvalgrind=$(usex valgrind auto false) + ) + meson_src_configure +} + +multilib_src_compile() { + meson_src_compile +} + +multilib_src_test() { + meson_src_test +} + +multilib_src_install() { + meson_src_install +} diff --git a/x11-libs/libdrm/metadata.xml b/x11-libs/libdrm/metadata.xml new file mode 100644 index 0000000..25fe9f8 --- /dev/null +++ b/x11-libs/libdrm/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>x...@gentoo.org</email> +<name>X11</name> +</maintainer> +<use> +<flag name="libkms">Enable building of libkms, a library for applications to interface with KMS</flag> +<flag name="valgrind">Compile in valgrind memory hints</flag> +</use> +</pkgmetadata>