Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 841e788116726c5de83f1f9f40393472 > files > 2

libdrm-2.4.115-2.mga9.src.rpm

From 332809f3ee19f07abc03b62d5892fae51b9d9902 Mon Sep 17 00:00:00 2001
From: Jan Beich <jbeich@FreeBSD.org>
Date: Wed, 8 Sep 2021 09:14:20 +0000
Subject: [PATCH 2/8] meson: drop pthread-stubs dependency on BSDs

pthread-stubs >= 0.4 simply passes -pthread which is similar to what
dependency('threads') returns. And make it a private dependency
for subprojects even on Linux.

Reviewed-by: Emmanuel Vadot <manu@FreeBSD.org>
---
 .gitlab-ci.yml        | 2 +-
 amdgpu/meson.build    | 2 +-
 etnaviv/meson.build   | 2 +-
 exynos/meson.build    | 2 +-
 freedreno/meson.build | 2 +-
 intel/meson.build     | 2 +-
 meson.build           | 5 -----
 omap/meson.build      | 2 +-
 radeon/meson.build    | 2 +-
 tegra/meson.build     | 2 +-
 10 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4a3ed2141bc9..5379476e0453 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -68,7 +68,7 @@ stages:
   variables:
     BUILD_OS: freebsd
     FDO_DISTRIBUTION_VERSION: "13.0"
-    FDO_DISTRIBUTION_PACKAGES: 'meson ninja pkgconf libpciaccess libpthread-stubs py39-docutils cairo'
+    FDO_DISTRIBUTION_PACKAGES: 'meson ninja pkgconf libpciaccess py39-docutils cairo'
     # bump this tag every time you change something which requires rebuilding the
     # base image
     FDO_DISTRIBUTION_TAG: "2022-08-22.0"
diff --git a/amdgpu/meson.build b/amdgpu/meson.build
index a1cca5a2f940..20bf6244d837 100644
--- a/amdgpu/meson.build
+++ b/amdgpu/meson.build
@@ -36,7 +36,7 @@ libdrm_amdgpu = library(
   ],
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
-  dependencies : [dep_pthread_stubs, dep_atomic_ops, dep_rt],
+  dependencies : [dep_threads, dep_atomic_ops, dep_rt],
   version : '1.0.0',
   install : true,
 )
diff --git a/etnaviv/meson.build b/etnaviv/meson.build
index 591f20f0c128..9ccf8696e079 100644
--- a/etnaviv/meson.build
+++ b/etnaviv/meson.build
@@ -32,7 +32,7 @@ libdrm_etnaviv = library(
   link_with : libdrm,
   c_args : libdrm_c_args,
   gnu_symbol_visibility : 'hidden',
-  dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops],
+  dependencies : [dep_threads, dep_rt, dep_atomic_ops],
   version : '1.0.0',
   install : true,
 )
diff --git a/exynos/meson.build b/exynos/meson.build
index 2f02ae710a51..6b4fe1e9293d 100644
--- a/exynos/meson.build
+++ b/exynos/meson.build
@@ -25,7 +25,7 @@ libdrm_exynos = library(
   gnu_symbol_visibility : 'hidden',
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
-  dependencies : [dep_pthread_stubs],
+  dependencies : [dep_threads],
   version : '1.0.0',
   install : true,
 )
diff --git a/freedreno/meson.build b/freedreno/meson.build
index de9ee14826fa..5ba1a3f11a3b 100644
--- a/freedreno/meson.build
+++ b/freedreno/meson.build
@@ -44,7 +44,7 @@ libdrm_freedreno = library(
   [files_freedreno, config_file],
   c_args : libdrm_c_args,
   include_directories : [inc_root, inc_drm],
-  dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt, dep_atomic_ops],
+  dependencies : [dep_valgrind, dep_threads, dep_rt, dep_atomic_ops],
   link_with : libdrm,
   version : '1.0.0',
   install : true,
diff --git a/intel/meson.build b/intel/meson.build
index beea42a6bfee..4af2a3573bf6 100644
--- a/intel/meson.build
+++ b/intel/meson.build
@@ -29,7 +29,7 @@ libdrm_intel = library(
   ],
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
-  dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind, dep_atomic_ops],
+  dependencies : [dep_pciaccess, dep_threads, dep_rt, dep_valgrind, dep_atomic_ops],
   c_args : libdrm_c_args,
   gnu_symbol_visibility : 'hidden',
   version : '1.0.0',
diff --git a/meson.build b/meson.build
index 8dcacb94ec74..3c2e171d75cd 100644
--- a/meson.build
+++ b/meson.build
@@ -40,11 +40,6 @@ with_freedreno_kgsl = get_option('freedreno-kgsl')
 with_install_tests = get_option('install-test-programs')
 with_tests = get_option('tests')
 
-if ['freebsd', 'dragonfly', 'netbsd'].contains(host_machine.system())
-  dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4')
-else
-  dep_pthread_stubs = []
-endif
 dep_threads = dependency('threads')
 
 cc = meson.get_compiler('c')
diff --git a/omap/meson.build b/omap/meson.build
index 22159184a6e0..eebd1420fcf1 100644
--- a/omap/meson.build
+++ b/omap/meson.build
@@ -25,7 +25,7 @@ libdrm_omap = library(
   c_args : libdrm_c_args,
   gnu_symbol_visibility : 'hidden',
   link_with : libdrm,
-  dependencies : [dep_pthread_stubs, dep_atomic_ops],
+  dependencies : [dep_threads, dep_atomic_ops],
   version : '1.0.0',
   install : true,
 )
diff --git a/radeon/meson.build b/radeon/meson.build
index 4c1c71e0a6d3..dda3877a0e7e 100644
--- a/radeon/meson.build
+++ b/radeon/meson.build
@@ -32,7 +32,7 @@ libdrm_radeon = library(
   gnu_symbol_visibility : 'hidden',
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
-  dependencies : [dep_pthread_stubs, dep_atomic_ops],
+  dependencies : [dep_threads, dep_atomic_ops],
   version : '1.0.1',
   install : true,
 )
diff --git a/tegra/meson.build b/tegra/meson.build
index 0b63d7894f9d..5325ed747a2f 100644
--- a/tegra/meson.build
+++ b/tegra/meson.build
@@ -28,7 +28,7 @@ libdrm_tegra = library(
   ],
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
-  dependencies : [dep_pthread_stubs, dep_atomic_ops],
+  dependencies : [dep_threads, dep_atomic_ops],
   c_args : libdrm_c_args,
   gnu_symbol_visibility : 'hidden',
   version : '0.0.0',
-- 
2.40.0