From 5070cb7fc150fc98f1ed64a7739c3356970d9f76 Mon Sep 17 00:00:00 2001 From: Conn O'Griofa Date: Tue, 22 Oct 2019 16:10:00 +0100 Subject: [PATCH] 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 --- CMakeLists.txt | 2 +- pkgconfig/egl.pc.in | 13 ------------- pkgconfig/glesv2.pc.in | 12 ------------ pkgconfig/vg.pc.in | 11 ----------- 4 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 pkgconfig/egl.pc.in delete mode 100644 pkgconfig/glesv2.pc.in delete mode 100644 pkgconfig/vg.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index cfc8ae5..fe67fc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/pkgconfig/egl.pc.in b/pkgconfig/egl.pc.in deleted file mode 100644 index 27a6236..0000000 --- a/pkgconfig/egl.pc.in +++ /dev/null @@ -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 - diff --git a/pkgconfig/glesv2.pc.in b/pkgconfig/glesv2.pc.in deleted file mode 100644 index 5900225..0000000 --- a/pkgconfig/glesv2.pc.in +++ /dev/null @@ -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} - diff --git a/pkgconfig/vg.pc.in b/pkgconfig/vg.pc.in deleted file mode 100644 index 8c39c98..0000000 --- a/pkgconfig/vg.pc.in +++ /dev/null @@ -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}