Gentoo Archives: gentoo-commits

From: Aric Belsito <lluixhi@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: media-libs/libepoxy/, media-libs/libepoxy/files/
Date: Thu, 01 Mar 2018 18:20:15
Message-Id: 1519928354.35a370c734c5973f57c57a51a6ccc1e4656a9c5a.lluixhi@gentoo
1 commit: 35a370c734c5973f57c57a51a6ccc1e4656a9c5a
2 Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
3 AuthorDate: Thu Mar 1 18:17:42 2018 +0000
4 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
5 CommitDate: Thu Mar 1 18:19:14 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=35a370c7
7
8 media-libs/libepoxy: add 1.5.0
9
10 uses dlvsym to load ld.so
11
12 https://github.com/anholt/libepoxy/pull/158
13
14 media-libs/libepoxy/Manifest | 1 +
15 media-libs/libepoxy/files/musl_no_dlsym.patch | 80 +++++++++++++++++++++++++++
16 media-libs/libepoxy/libepoxy-1.5.0.ebuild | 61 ++++++++++++++++++++
17 media-libs/libepoxy/metadata.xml | 11 ++++
18 4 files changed, 153 insertions(+)
19
20 diff --git a/media-libs/libepoxy/Manifest b/media-libs/libepoxy/Manifest
21 new file mode 100644
22 index 0000000..a87845e
23 --- /dev/null
24 +++ b/media-libs/libepoxy/Manifest
25 @@ -0,0 +1 @@
26 +DIST libepoxy-1.5.0.tar.gz 325983 BLAKE2B 13cec792a3f32630765e3bad755bfb8569119351a3bf83a6581c4db3210eca0779ca6681bbb67898847265283a929ed742fd7000d18977fb5f2203968815fe92 SHA512 e522c64d4f407aab031fbd31feaee1a2de4467fdd49b0267327100cfe836c2f5bebccf367449e3bd97e1a457168bbf0ace968eaa45a018020f1c038469343efe
27
28 diff --git a/media-libs/libepoxy/files/musl_no_dlsym.patch b/media-libs/libepoxy/files/musl_no_dlsym.patch
29 new file mode 100644
30 index 0000000..b31ceae
31 --- /dev/null
32 +++ b/media-libs/libepoxy/files/musl_no_dlsym.patch
33 @@ -0,0 +1,80 @@
34 +From 0bbdbcdf3917fff68cf96e89b76358e94d20d77c Mon Sep 17 00:00:00 2001
35 +From: Ross Burton <ross.burton@×××××.com>
36 +Date: Thu, 1 Mar 2018 17:37:42 +0000
37 +Subject: [PATCH 1/2] meson: add option to enable/disable the test suite
38 +
39 +---
40 + meson.build | 5 ++++-
41 + meson_options.txt | 4 ++++
42 + 2 files changed, 8 insertions(+), 1 deletion(-)
43 +
44 +diff --git a/meson.build b/meson.build
45 +index b2ebaef..9632c7a 100644
46 +--- a/meson.build
47 ++++ b/meson.build
48 +@@ -242,7 +242,10 @@ libepoxy_inc = [
49 +
50 + subdir('include/epoxy')
51 + subdir('src')
52 +-subdir('test')
53 ++
54 ++if get_option('tests')
55 ++ subdir('test')
56 ++endif
57 +
58 + if get_option('docs')
59 + doxygen = find_program('doxygen', required: false)
60 +diff --git a/meson_options.txt b/meson_options.txt
61 +index b5d7c98..dc30e68 100644
62 +--- a/meson_options.txt
63 ++++ b/meson_options.txt
64 +@@ -15,3 +15,7 @@ option('x11',
65 + type: 'boolean',
66 + value: true,
67 + description: 'Enable X11 support (GLX or EGL-X11)')
68 ++option('tests',
69 ++ type: 'boolean',
70 ++ value: true,
71 ++ description: 'Build the test suite')
72 +
73 +From 85c692f9fe46259b5a85201d96e871ae12db4bc4 Mon Sep 17 00:00:00 2001
74 +From: Ross Burton <ross.burton@×××××.com>
75 +Date: Thu, 1 Mar 2018 17:39:52 +0000
76 +Subject: [PATCH 2/2] test: skip tests that require dlvsym if it isn't
77 + available
78 +
79 +dlvsym is a glibc extension so check for it and skip the tests which need dlvsym
80 +if it isn't present.
81 +---
82 + test/meson.build | 7 ++++---
83 + 1 file changed, 4 insertions(+), 3 deletions(-)
84 +
85 +diff --git a/test/meson.build b/test/meson.build
86 +index c5788b4..b97930e 100644
87 +--- a/test/meson.build
88 ++++ b/test/meson.build
89 +@@ -1,3 +1,4 @@
90 ++has_dlvsym = cc.has_function('dlvsym', prefix : '#include<dlfcn.h>')
91 + has_gles1 = gles1_dep.found()
92 + has_gles2 = gles2_dep.found()
93 + build_x11_tests = enable_x11 and x11_dep.found()
94 +@@ -92,8 +93,8 @@ if build_glx
95 + [ 'glx_has_extension_nocontext', [ 'glx_has_extension_nocontext.c' ], [], [], true ],
96 + [ 'glx_static', [ 'glx_static.c' ], [ '-DNEEDS_TO_BE_STATIC'], [ '-static' ], libtype == 'static' ],
97 + [ 'glx_shared_znow', [ 'glx_static.c', ], [], [ '-Wl,-z,now' ], has_znow ],
98 +- [ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ],
99 +- [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ],
100 ++ [ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple and has_dlvsym ],
101 ++ [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple and has_dlvsym ],
102 + ]
103 +
104 + foreach test: glx_tests
105 +@@ -114,7 +115,7 @@ if build_glx
106 + endif
107 + endforeach
108 +
109 +- if not build_apple
110 ++ if not build_apple and has_dlvsym
111 + # GLX/EGL tests
112 + if build_egl
113 + glx_egl_sources = [
114
115 diff --git a/media-libs/libepoxy/libepoxy-1.5.0.ebuild b/media-libs/libepoxy/libepoxy-1.5.0.ebuild
116 new file mode 100644
117 index 0000000..41a5198
118 --- /dev/null
119 +++ b/media-libs/libepoxy/libepoxy-1.5.0.ebuild
120 @@ -0,0 +1,61 @@
121 +# Copyright 1999-2018 Gentoo Foundation
122 +# Distributed under the terms of the GNU General Public License v2
123 +
124 +EAPI=6
125 +
126 +EGIT_REPO_URI="https://github.com/anholt/${PN}.git"
127 +
128 +if [[ ${PV} = 9999* ]]; then
129 + GIT_ECLASS="git-r3"
130 +fi
131 +
132 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
133 +PYTHON_REQ_USE='xml(+)'
134 +inherit ${GIT_ECLASS} meson multilib-minimal python-any-r1
135 +
136 +DESCRIPTION="Epoxy is a library for handling OpenGL function pointer management for you"
137 +HOMEPAGE="https://github.com/anholt/libepoxy"
138 +if [[ ${PV} = 9999* ]]; then
139 + SRC_URI=""
140 +else
141 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
142 + SRC_URI="https://github.com/anholt/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
143 +fi
144 +
145 +LICENSE="MIT"
146 +SLOT="0"
147 +IUSE="test +X"
148 +
149 +DEPEND="${PYTHON_DEPS}
150 + media-libs/mesa[egl,${MULTILIB_USEDEP}]
151 + X? ( x11-libs/libX11[${MULTILIB_USEDEP}] )
152 + >=dev-util/meson-0.44.0"
153 +RDEPEND=""
154 +
155 +PATCHES=( "${FILESDIR}"/musl_no_dlsym.patch )
156 +
157 +src_unpack() {
158 + default
159 + [[ $PV = 9999* ]] && git-r3_src_unpack
160 +}
161 +
162 +multilib_src_configure() {
163 + local emesonargs=(
164 + -Degl=yes
165 + -Dglx=$(usex X)
166 + -Dx11=$(usex X true false)
167 + )
168 + meson_src_configure
169 +}
170 +
171 +multilib_src_compile() {
172 + meson_src_compile
173 +}
174 +
175 +multilib_src_test() {
176 + meson_src_test
177 +}
178 +
179 +multilib_src_install() {
180 + meson_src_install
181 +}
182
183 diff --git a/media-libs/libepoxy/metadata.xml b/media-libs/libepoxy/metadata.xml
184 new file mode 100644
185 index 0000000..1065cad
186 --- /dev/null
187 +++ b/media-libs/libepoxy/metadata.xml
188 @@ -0,0 +1,11 @@
189 +<?xml version="1.0" encoding="UTF-8"?>
190 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
191 +<pkgmetadata>
192 + <maintainer type="project">
193 + <email>x11@g.o</email>
194 + <name>X11</name>
195 + </maintainer>
196 + <upstream>
197 + <remote-id type="github">anholt/libepoxy</remote-id>
198 + </upstream>
199 +</pkgmetadata>