Skip to contentSkip to conversation

package/mesa3d-headers: fix install of dri.pc

PATCH Superseded Bernd Kuhls 2 participants 3 messages Oct 12, 2019 – Oct 23, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/mesa3d-headers: fix install of dri.pc

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.

---
 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
package/mesa3d-headers/dri.pc new file +10 -0
new file mode 100644
index 0000000000..bd9a33b6c6
@@ -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}
package/mesa3d-headers/mesa3d-headers.mk +2 -7
index 8670184742..99d6e52498 100644
@@ -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
 
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/mesa3d-headers: fix install of dri.pc

Quoted 10 lines · On Sat, 12 Oct 2019 19:30:11 +0200 Bernd Kuhls <[email protected]> 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.

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

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/mesa3d-headers: fix install of dri.pc

Am Tue, 22 Oct 2019 23:02:39 +0200 schrieb Thomas Petazzoni:

Quoted 2 lines

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