Remove legacy pkgconfig to avoid Mesa conflicts

When building software targeting Pi, it's common practice to use
the pkgconfig to assist building by specifying PKG_CONFIG_PATH.

Unfortunately, the presence of the legacy pkgconfig that conflict with
Mesa's libraries will cause issues for users that build against the
firmware pkgconfig, but wish to target Mesa. (Pi 4B or earlier revisions
using the f/kms overlay).

Although a possible workaround may be to omit the custom PKG_CONFIG_PATH
of the firmware pkgconfig during build, there are plausible use cases in
which to target a software build against Mesa whilst also leveraging
the non GL-specific firmware libraries (e.g. MMAL for hardware codec support
that works on the FKMS overlay, or BCM_HOST for basic board detection).

Note: this conflict is already resolved via the Raspbian packages by deliberately
omitting the conflicting .pc files during the packaging stage; see https://github.com/raspberrypi/firmware/issues/857
This commit is contained in:
Conn O'Griofa
2019-10-22 16:10:00 +01:00
committed by Phil Elwell
parent 8062d68f49
commit 5070cb7fc1
4 changed files with 1 additions and 37 deletions

View File

@@ -122,7 +122,7 @@ include_directories("${PROJECT_BINARY_DIR}")
include(FindPkgConfig QUIET)
if(PKG_CONFIG_FOUND)
# Produce a pkg-config file
foreach(PCFILE bcm_host.pc egl.pc glesv2.pc vg.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc )
foreach(PCFILE bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc)
configure_file("pkgconfig/${PCFILE}.in" "${PCFILE}" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PCFILE}"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")

View File

@@ -1,13 +0,0 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: EGL
Description: Fake EGL package for RPi
Version: 10
Requires: bcm_host
Libs: -L${libdir} -lEGL -lGLESv2 -lbcm_host -lvchostif
Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux \
-I${includedir}/interface/vcos/pthreads

View File

@@ -1,12 +0,0 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: GLESv2
Description: Fake GL ES 2 package for RPi
Version: 10
Requires: bcm_host
Libs: -L${libdir} -lGLESv2
Cflags: -I${includedir}

View File

@@ -1,11 +0,0 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: OpenVG
Description: Fake OpenVG package for RPi
Version: 10
Requires: bcm_host
Libs: -L${libdir} -lOpenVG
Cflags: -I${includedir}