chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 1 | # Copyright 1999-2017 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | |
| 4 | EAPI="6" |
| 5 | |
chromeos-ci-prod | 30ea59f | 2021-06-22 08:36:59 -0700 | [diff] [blame] | 6 | CROS_WORKON_COMMIT="7b5dd3eb47b82db16d8ab51a03b6cda8625fa8e9" |
| 7 | CROS_WORKON_TREE="f4b861dfec2f86b6b3c33034d7af41e0a08a86e6" |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 8 | CROS_WORKON_PROJECT="chromiumos/third_party/virglrenderer" |
chromeos-ci-prod | 4618fea | 2021-03-05 08:46:28 -0800 | [diff] [blame] | 9 | CROS_WORKON_EGIT_BRANCH="master" |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 10 | |
David Riley | 58c2173 | 2019-12-18 14:47:55 -0800 | [diff] [blame] | 11 | # Prevent automatic uprevs of this package since upstream is out of our control. |
Mike Frysinger | 46a4ee7 | 2020-11-10 01:11:36 -0500 | [diff] [blame] | 12 | CROS_WORKON_MANUAL_UPREV="1" |
Gurchetan Singh | e599bec | 2019-08-08 10:59:59 -0700 | [diff] [blame] | 13 | |
chromeos-ci-prod | 6952bcc | 2020-06-12 08:11:32 -0700 | [diff] [blame] | 14 | inherit cros-fuzzer cros-sanitizers eutils flag-o-matic meson cros-workon |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 15 | |
| 16 | DESCRIPTION="library used implement a virtual 3D GPU used by qemu" |
| 17 | HOMEPAGE="https://virgil3d.github.io/" |
| 18 | |
| 19 | LICENSE="MIT" |
| 20 | SLOT="0" |
| 21 | KEYWORDS="*" |
chromeos-ci-prod | e617f55 | 2021-04-21 08:43:45 -0700 | [diff] [blame] | 22 | IUSE="debug fuzzer profiling test vulkan" |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 23 | |
| 24 | RDEPEND=" |
| 25 | >=x11-libs/libdrm-2.4.50 |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 26 | media-libs/libepoxy |
chromeos-ci-prod | c4d92f2 | 2019-07-29 21:32:57 -0700 | [diff] [blame] | 27 | media-libs/minigbm |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 28 | fuzzer? ( |
Manoj Gupta | 51808be | 2020-02-02 16:37:22 -0800 | [diff] [blame] | 29 | virtual/opengles |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 30 | ) |
chromeos-ci-prod | e617f55 | 2021-04-21 08:43:45 -0700 | [diff] [blame] | 31 | vulkan? ( media-libs/vulkan-loader ) |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 32 | " |
| 33 | # We need autoconf-archive for @CODE_COVERAGE_RULES@. #568624 |
| 34 | DEPEND="${RDEPEND} |
chromeos-ci-prod | 4618fea | 2021-03-05 08:46:28 -0800 | [diff] [blame] | 35 | chromeos-base/percetto |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 36 | sys-devel/autoconf-archive |
David Riley | 152f5e5 | 2020-01-03 18:07:53 -0800 | [diff] [blame] | 37 | fuzzer? ( >=dev-libs/check-0.9.4 ) |
chromeos-ci-prod | e617f55 | 2021-04-21 08:43:45 -0700 | [diff] [blame] | 38 | test? ( >=dev-libs/check-0.9.4 ) |
| 39 | vulkan? ( dev-util/vulkan-headers ) |
| 40 | " |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 41 | |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 42 | src_prepare() { |
| 43 | default |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | src_configure() { |
| 47 | sanitizers-setup-env |
| 48 | |
| 49 | if use profiling; then |
| 50 | append-flags -fprofile-instr-generate -fcoverage-mapping |
| 51 | append-ldflags -fprofile-instr-generate -fcoverage-mapping |
| 52 | fi |
David Riley | 58c2173 | 2019-12-18 14:47:55 -0800 | [diff] [blame] | 53 | |
| 54 | emesonargs+=( |
chromeos-ci-prod | 4618fea | 2021-03-05 08:46:28 -0800 | [diff] [blame] | 55 | -Dtracing=percetto |
Lepton Wu | f29ce9a | 2020-04-04 22:26:41 -0700 | [diff] [blame] | 56 | -Dminigbm_allocation="true" |
David Riley | 58c2173 | 2019-12-18 14:47:55 -0800 | [diff] [blame] | 57 | -Dplatforms="egl" |
David Riley | 58c2173 | 2019-12-18 14:47:55 -0800 | [diff] [blame] | 58 | $(meson_use fuzzer) |
chromeos-ci-prod | e617f55 | 2021-04-21 08:43:45 -0700 | [diff] [blame] | 59 | $(meson_use vulkan venus-experimental) |
David Riley | 58c2173 | 2019-12-18 14:47:55 -0800 | [diff] [blame] | 60 | --buildtype $(usex debug debug release) |
| 61 | ) |
| 62 | |
David Riley | 152f5e5 | 2020-01-03 18:07:53 -0800 | [diff] [blame] | 63 | # virgl_fuzzer is only built with tests. |
| 64 | if use test || use fuzzer; then |
| 65 | emesonargs+=( -Dtests="true" ) |
| 66 | fi |
| 67 | |
David Riley | 58c2173 | 2019-12-18 14:47:55 -0800 | [diff] [blame] | 68 | meson_src_configure |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | src_install() { |
David Riley | 58c2173 | 2019-12-18 14:47:55 -0800 | [diff] [blame] | 72 | meson_src_install |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 73 | |
David Riley | 152f5e5 | 2020-01-03 18:07:53 -0800 | [diff] [blame] | 74 | fuzzer_install "${FILESDIR}/fuzzer-OWNERS" \ |
| 75 | "${WORKDIR}/${P}-build"/tests/fuzzer/virgl_fuzzer \ |
| 76 | --options "${FILESDIR}/virgl_fuzzer.options" |
| 77 | fuzzer_install "${FILESDIR}/fuzzer-OWNERS" \ |
| 78 | "${WORKDIR}/${P}-build"/vtest/vtest_fuzzer \ |
chrome-bot | 143e2ff | 2019-06-22 06:28:00 -0700 | [diff] [blame] | 79 | --options "${FILESDIR}/vtest_fuzzer.options" |
chrome-bot | 91e5ba9 | 2019-02-04 22:56:48 -0800 | [diff] [blame] | 80 | |
| 81 | find "${ED}"/usr -name 'lib*.la' -delete |
| 82 | } |