[Glamor] [PATCH] Rework pkgconfig files using "Requires".
Drew Moseley
drew_moseley at mentor.com
Thu Mar 3 21:46:33 UTC 2016
The current method of building the .pc files via autoconf substitutions
embeds full paths directly into the files. With a cross-built sysroot
this may or may not be the right path. Specifically with a Yocto build
the sysroot where glamor was built may not be in the same location when
a package using it is built. This patch modifies the generated .pc
files to use "Requires" rather than embedding the dependent package
settings.
Signed-off-by: Drew Moseley <drew_moseley at mentor.com>
---
configure.ac | 7 +++++--
glamor-egl.pc.in | 6 +++---
glamor.pc.in | 1 +
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index ab9f777..c20bebf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,12 +108,12 @@ if test "x$GLAMOR_GLES2" = xyes; then
AC_DEFINE(GLAMOR_GLES2,1,[Build glamor over GLES2])
PKG_CHECK_MODULES(GLESV2, $LIBGLESV2)
REQUIRED_LIBS="$REQUIRED_LIBS $LIBGLESV2"
- GLAMOR_GL_CFLAGS="$GLESV2_CFLAGS -DGLAMOR_GLES2"
+ GLAMOR_GL_CFLAGS="-DGLAMOR_GLES2"
else
AC_DEFINE(GLAMOR_GL,1,[Build glamor over GL])
PKG_CHECK_MODULES(GL, $LIBGL)
REQUIRED_LIBS="$REQUIRED_LIBS $LIBGL"
- GLAMOR_GL_CFLAGS="$GL_CFLAGS -DGLAMOR_GL"
+ GLAMOR_GL_CFLAGS="-DGLAMOR_GL"
fi
AC_SUBST([GLAMOR_GL_CFLAGS])
@@ -133,8 +133,11 @@ if test "x$EGL = xyes"; then
AC_DEFINE(GLAMOR_HAS_GBM, 1, [Use GBM.])
AC_DEFINE(GLX_USE_SHARED_DISPATCH, 1, [GLX and GLAMOR share the glapi dispatch table.])
fi
+ REQUIRED_LIBS="$REQUIRED_LIBS $LIBEGL"
fi
+AC_SUBST([REQUIRED_LIBS])
+
PKG_CHECK_MODULES(GBMv9, $LIBGBMv9, [GBMv9=yes], [GBMv9=no])
AC_MSG_CHECKING([Enable Glamor Dri3 helpers])
diff --git a/glamor-egl.pc.in b/glamor-egl.pc.in
index 3ee8c6f..26042c6 100644
--- a/glamor-egl.pc.in
+++ b/glamor-egl.pc.in
@@ -5,10 +5,10 @@ includedir=@includedir@
moduledir=@moduledir@
sdkdir=@sdkdir@
GLAMOR_GL_CFLAGS=@GLAMOR_GL_CFLAGS@
-GLAMOR_EGL_CFLAGS=@EGL_CFLAGS@ @EGL_LIBS@
Name: glamor-egl
Description: X.Org glamor common library.
Version: @PACKAGE_VERSION@
-Cflags: -I${sdkdir} -L${moduledir} ${GLAMOR_GL_CFLAGS} ${GLAMOR_EGL_CFLAGS}
-
+Cflags: -I${sdkdir} ${GLAMOR_GL_CFLAGS}
+Libs: -L${moduledir}
+Requires: @REQUIRED_LIBS@
diff --git a/glamor.pc.in b/glamor.pc.in
index 5257468..d9835d8 100644
--- a/glamor.pc.in
+++ b/glamor.pc.in
@@ -10,3 +10,4 @@ Description: X.Org glamor common library.
Version: @PACKAGE_VERSION@
Cflags: -I${sdkdir} ${GLAMOR_GL_CFLAGS}
Libs: -L${libdir} -lglamor
+Requires: @REQUIRED_LIBS@
--
2.7.1
More information about the Glamor
mailing list