All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 4/9] libepoxy: convert to meson build
Date: Thu, 21 Dec 2017 15:04:29 +0200	[thread overview]
Message-ID: <20171221130434.24427-4-alexander.kanavin@linux.intel.com> (raw)
In-Reply-To: <20171221130434.24427-1-alexander.kanavin@linux.intel.com>

Add a patch to work around absence of dlvsym() on musl
(wasn't previously a problem as autotools weren't building tests by default)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...sible-to-disable-the-use-of-dlvsym-needed.patch | 55 ++++++++++++++++++++++
 meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb   | 12 +++--
 2 files changed, 63 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch

diff --git a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
new file mode 100644
index 00000000000..c2a2fa34535
--- /dev/null
+++ b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
@@ -0,0 +1,55 @@
+From 7bcefd311cd696955376fe2c5298ec85e8f954ce Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 15 Nov 2017 12:48:27 +0200
+Subject: [PATCH] Make it possible to disable the use of dlvsym() (needed for
+ musl)
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ meson_options.txt | 3 +++
+ test/meson.build  | 6 +++---
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 244476a..071f0b6 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,6 +1,9 @@
+ option('enable-docs',
+        type: 'boolean', value: false,
+        description: 'Enable generating the Epoxy API reference (depends on Doxygen)')
++option('has-dlvsym',
++       type: 'boolean', value: true,
++       description: 'Whether dlvsym() is available (it is not when using musl C library)')
+ option('enable-glx',
+        type: 'combo',
+        choices: [ 'auto', 'yes', 'no' ],
+diff --git a/test/meson.build b/test/meson.build
+index 2340fc6..bc4330b 100644
+--- a/test/meson.build
++++ b/test/meson.build
+@@ -86,8 +86,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 get_option('has-dlvsym') == true ],
++    [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple and get_option('has-dlvsym') == true ],
+   ]
+ 
+   foreach test: glx_tests
+@@ -108,7 +108,7 @@ if build_glx
+     endif
+   endforeach
+ 
+-  if not build_apple
++  if not build_apple and get_option('has-dlvsym') == true
+     # GLX/EGL tests
+     if build_egl
+       glx_egl_sources = [
+-- 
+2.15.0
+
diff --git a/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb b/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb
index 0172322b92d..72167a2fb8c 100644
--- a/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb
+++ b/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb
@@ -6,17 +6,21 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
 
 SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz \
-           file://Add-fallback-definition-for-EGL-CAST.patch"
+           file://Add-fallback-definition-for-EGL-CAST.patch \
+           file://0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch \
+           "
 SRC_URI[md5sum] = "af4c3ce0fb1143bdc4e43f85695a9bed"
 SRC_URI[sha256sum] = "0b808a06c9685a62fca34b680abb8bc7fb2fda074478e329b063c1f872b826f6"
 UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases"
 
-inherit autotools pkgconfig distro_features_check
+inherit meson pkgconfig distro_features_check
 
 REQUIRED_DISTRO_FEATURES = "opengl"
 
 DEPENDS = "util-macros"
 
-PACKAGECONFIG[egl] = "--enable-egl, --disable-egl, virtual/egl"
-PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11"
+PACKAGECONFIG[egl] = "-Denable-egl=yes, -Denable-egl=no, virtual/egl"
+PACKAGECONFIG[x11] = "-Denable-glx=yes, -Denable-glx=no, virtual/libx11"
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
+
+EXTRA_OEMESON_append_libc-musl = " -Dhas-dlvsym=false "
-- 
2.15.1



  parent reply	other threads:[~2017-12-21 13:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-21 13:04 [PATCH 1/9] meson: add a recipe and class from meta-oe Alexander Kanavin
2017-12-21 13:04 ` [PATCH 2/9] gnomebase.bbclass: split into autotools and meson versions Alexander Kanavin
2018-01-03 11:11   ` Richard Purdie
2018-01-04 13:13     ` Alexander Kanavin
2017-12-21 13:04 ` [PATCH 3/9] json-glib: convert to meson build Alexander Kanavin
2018-01-04  8:40   ` ChenQi
2018-01-04 12:35     ` Alexander Kanavin
2018-01-04  8:51   ` ChenQi
2018-01-04  9:27     ` Alexander Kanavin
2018-01-12  7:49       ` Yi Zhao
2017-12-21 13:04 ` Alexander Kanavin [this message]
2017-12-21 13:04 ` [PATCH 5/9] libinput: " Alexander Kanavin
2017-12-21 13:04 ` [PATCH 6/9] sysprof: " Alexander Kanavin
2017-12-21 13:04 ` [PATCH 7/9] gst-player: Upgrade, rename to gst-examples Alexander Kanavin
2017-12-21 13:04 ` [PATCH 8/9] meson: export native env only for native build Alexander Kanavin
2017-12-21 13:04 ` [PATCH 9/9] meson: Port pkgconfig-native patch to 0.44.0 Alexander Kanavin
  -- strict thread matches above, loose matches on Subject: below --
2018-01-04 13:12 [PATCH 1/9] meson: add a recipe and class from meta-oe Alexander Kanavin
2018-01-04 13:12 ` [PATCH 4/9] libepoxy: convert to meson build Alexander Kanavin
2017-11-17 12:02 [PATCH 0/9] Introduce meson build system Alexander Kanavin
2017-11-17 12:02 ` [PATCH 4/9] libepoxy: convert to meson build Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171221130434.24427-4-alexander.kanavin@linux.intel.com \
    --to=alexander.kanavin@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.