* [gentoo-commits] proj/musl:master commit in: media-libs/libepoxy/, media-libs/libepoxy/files/
@ 2018-03-01 18:20 Aric Belsito
0 siblings, 0 replies; only message in thread
From: Aric Belsito @ 2018-03-01 18:20 UTC (permalink / raw
To: gentoo-commits
commit: 35a370c734c5973f57c57a51a6ccc1e4656a9c5a
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Thu Mar 1 18:17:42 2018 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Thu Mar 1 18:19:14 2018 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=35a370c7
media-libs/libepoxy: add 1.5.0
uses dlvsym to load ld.so
https://github.com/anholt/libepoxy/pull/158
media-libs/libepoxy/Manifest | 1 +
media-libs/libepoxy/files/musl_no_dlsym.patch | 80 +++++++++++++++++++++++++++
media-libs/libepoxy/libepoxy-1.5.0.ebuild | 61 ++++++++++++++++++++
media-libs/libepoxy/metadata.xml | 11 ++++
4 files changed, 153 insertions(+)
diff --git a/media-libs/libepoxy/Manifest b/media-libs/libepoxy/Manifest
new file mode 100644
index 0000000..a87845e
--- /dev/null
+++ b/media-libs/libepoxy/Manifest
@@ -0,0 +1 @@
+DIST libepoxy-1.5.0.tar.gz 325983 BLAKE2B 13cec792a3f32630765e3bad755bfb8569119351a3bf83a6581c4db3210eca0779ca6681bbb67898847265283a929ed742fd7000d18977fb5f2203968815fe92 SHA512 e522c64d4f407aab031fbd31feaee1a2de4467fdd49b0267327100cfe836c2f5bebccf367449e3bd97e1a457168bbf0ace968eaa45a018020f1c038469343efe
diff --git a/media-libs/libepoxy/files/musl_no_dlsym.patch b/media-libs/libepoxy/files/musl_no_dlsym.patch
new file mode 100644
index 0000000..b31ceae
--- /dev/null
+++ b/media-libs/libepoxy/files/musl_no_dlsym.patch
@@ -0,0 +1,80 @@
+From 0bbdbcdf3917fff68cf96e89b76358e94d20d77c Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Thu, 1 Mar 2018 17:37:42 +0000
+Subject: [PATCH 1/2] meson: add option to enable/disable the test suite
+
+---
+ meson.build | 5 ++++-
+ meson_options.txt | 4 ++++
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index b2ebaef..9632c7a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -242,7 +242,10 @@ libepoxy_inc = [
+
+ subdir('include/epoxy')
+ subdir('src')
+-subdir('test')
++
++if get_option('tests')
++ subdir('test')
++endif
+
+ if get_option('docs')
+ doxygen = find_program('doxygen', required: false)
+diff --git a/meson_options.txt b/meson_options.txt
+index b5d7c98..dc30e68 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -15,3 +15,7 @@ option('x11',
+ type: 'boolean',
+ value: true,
+ description: 'Enable X11 support (GLX or EGL-X11)')
++option('tests',
++ type: 'boolean',
++ value: true,
++ description: 'Build the test suite')
+
+From 85c692f9fe46259b5a85201d96e871ae12db4bc4 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Thu, 1 Mar 2018 17:39:52 +0000
+Subject: [PATCH 2/2] test: skip tests that require dlvsym if it isn't
+ available
+
+dlvsym is a glibc extension so check for it and skip the tests which need dlvsym
+if it isn't present.
+---
+ test/meson.build | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/test/meson.build b/test/meson.build
+index c5788b4..b97930e 100644
+--- a/test/meson.build
++++ b/test/meson.build
+@@ -1,3 +1,4 @@
++has_dlvsym = cc.has_function('dlvsym', prefix : '#include<dlfcn.h>')
+ has_gles1 = gles1_dep.found()
+ has_gles2 = gles2_dep.found()
+ build_x11_tests = enable_x11 and x11_dep.found()
+@@ -92,8 +93,8 @@ if build_glx
+ [ 'glx_has_extension_nocontext', [ 'glx_has_extension_nocontext.c' ], [], [], true ],
+ [ 'glx_static', [ 'glx_static.c' ], [ '-DNEEDS_TO_BE_STATIC'], [ '-static' ], libtype == 'static' ],
+ [ 'glx_shared_znow', [ 'glx_static.c', ], [], [ '-Wl,-z,now' ], has_znow ],
+- [ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ],
+- [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ],
++ [ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple and has_dlvsym ],
++ [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple and has_dlvsym ],
+ ]
+
+ foreach test: glx_tests
+@@ -114,7 +115,7 @@ if build_glx
+ endif
+ endforeach
+
+- if not build_apple
++ if not build_apple and has_dlvsym
+ # GLX/EGL tests
+ if build_egl
+ glx_egl_sources = [
diff --git a/media-libs/libepoxy/libepoxy-1.5.0.ebuild b/media-libs/libepoxy/libepoxy-1.5.0.ebuild
new file mode 100644
index 0000000..41a5198
--- /dev/null
+++ b/media-libs/libepoxy/libepoxy-1.5.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://github.com/anholt/${PN}.git"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+fi
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+PYTHON_REQ_USE='xml(+)'
+inherit ${GIT_ECLASS} meson multilib-minimal python-any-r1
+
+DESCRIPTION="Epoxy is a library for handling OpenGL function pointer management for you"
+HOMEPAGE="https://github.com/anholt/libepoxy"
+if [[ ${PV} = 9999* ]]; then
+ SRC_URI=""
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
+ SRC_URI="https://github.com/anholt/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test +X"
+
+DEPEND="${PYTHON_DEPS}
+ media-libs/mesa[egl,${MULTILIB_USEDEP}]
+ X? ( x11-libs/libX11[${MULTILIB_USEDEP}] )
+ >=dev-util/meson-0.44.0"
+RDEPEND=""
+
+PATCHES=( "${FILESDIR}"/musl_no_dlsym.patch )
+
+src_unpack() {
+ default
+ [[ $PV = 9999* ]] && git-r3_src_unpack
+}
+
+multilib_src_configure() {
+ local emesonargs=(
+ -Degl=yes
+ -Dglx=$(usex X)
+ -Dx11=$(usex X true 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/media-libs/libepoxy/metadata.xml b/media-libs/libepoxy/metadata.xml
new file mode 100644
index 0000000..1065cad
--- /dev/null
+++ b/media-libs/libepoxy/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>x11@gentoo.org</email>
+ <name>X11</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">anholt/libepoxy</remote-id>
+ </upstream>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-01 18:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-01 18:20 [gentoo-commits] proj/musl:master commit in: media-libs/libepoxy/, media-libs/libepoxy/files/ Aric Belsito
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox