[1/1] package/mesa3d-headers: fix install of dri.pc
diff mbox series

Message ID 20191012173011.11419-1-bernd.kuhls@t-online.de
State Superseded
Headers show
Series
  • [1/1] package/mesa3d-headers: fix install of dri.pc
Related show

Commit Message

Bernd Kuhls Oct. 12, 2019, 5:30 p.m. UTC
Due to the switch of mesa3d to the meson build system the upstream
tarball does not include dri.pc.in anymore, it is created during the
build now:
https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/meson.build?h=19.2#n93

In order to provide dri.pc we need to add a version taken from a dri-
based mesa3d build to our source repository, by doing so we can reduce
the number of sed commands.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/mesa3d-headers/dri.pc            | 10 ++++++++++
 package/mesa3d-headers/mesa3d-headers.mk |  9 ++-------
 2 files changed, 12 insertions(+), 7 deletions(-)
 create mode 100644 package/mesa3d-headers/dri.pc

Comments

Thomas Petazzoni Oct. 22, 2019, 9:02 p.m. UTC | #1
On Sat, 12 Oct 2019 19:30:11 +0200
Bernd Kuhls <bernd.kuhls@t-online.de> wrote:

> Due to the switch of mesa3d to the meson build system the upstream
> tarball does not include dri.pc.in anymore, it is created during the
> build now:
> https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/meson.build?h=19.2#n93
> 
> In order to provide dri.pc we need to add a version taken from a dri-
> based mesa3d build to our source repository, by doing so we can reduce
> the number of sed commands.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

But does it make sense for mesa3d-headers to install dri.pc in the
first place ? mesa3d-headers is normally only supposed to install the
Khronos headers that some OpenGL implementation do not provide.

I'm not sure it makes sense for it to install dri.pc.

Could you give more details about the situation you've encountered
where dri.pc was missing, and that let you to propose this patch ? This
might help figuring out what is the right solution (which may turn out
to be your proposal, but I'd like to understand better).

Thanks!

Thomas
Bernd Kuhls Oct. 23, 2019, 6:25 a.m. UTC | #2
Am Tue, 22 Oct 2019 23:02:39 +0200 schrieb Thomas Petazzoni:

> Could you give more details about the situation you've encountered where
> dri.pc was missing, and that let you to propose this patch ?

Hi,

dri.pc is needed by xserver_xorg-server, sent new series:
http://patchwork.ozlabs.org/project/buildroot/list/?series=137951

Regards, Bernd

Patch
diff mbox series

diff --git a/package/mesa3d-headers/dri.pc b/package/mesa3d-headers/dri.pc
new file mode 100644
index 0000000000..bd9a33b6c6
--- /dev/null
+++ b/package/mesa3d-headers/dri.pc
@@ -0,0 +1,10 @@ 
+prefix=/usr
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+dridriverdir=/usr/lib/dri
+
+Name: dri
+Description: Direct Rendering Infrastructure
+Version: @VERSION@
+Cflags: -I${includedir}
diff --git a/package/mesa3d-headers/mesa3d-headers.mk b/package/mesa3d-headers/mesa3d-headers.mk
index 8670184742..99d6e52498 100644
--- a/package/mesa3d-headers/mesa3d-headers.mk
+++ b/package/mesa3d-headers/mesa3d-headers.mk
@@ -34,13 +34,8 @@  ifeq ($(BR2_PACKAGE_XORG7),y)
 # Not using $(SED) because we do not want to work in-place, and $(SED)
 # contains -i.
 define MESA3D_HEADERS_BUILD_DRI_PC
-	sed -e 's:@\(exec_\)\?prefix@:/usr:' \
-	    -e 's:@libdir@:$${exec_prefix}/lib:' \
-	    -e 's:@includedir@:$${prefix}/include:' \
-	    -e 's:@DRI_DRIVER_INSTALL_DIR@:$${libdir}/dri:' \
-	    -e 's:@VERSION@:$(MESA3D_HEADERS_VERSION):' \
-	    -e 's:@DRI_PC_REQ_PRIV@::' \
-	    $(@D)/src/mesa/drivers/dri/dri.pc.in \
+	sed -e 's:@VERSION@:$(MESA3D_HEADERS_VERSION):' \
+	    package/mesa3d-headers/dri.pc \
 	    >$(@D)/src/mesa/drivers/dri/dri.pc
 endef