From ceffd7b9245690dbfef9478fff982cfff37b0611 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 10 Mar 2010 16:47:36 -0500 Subject: [PATCH] Add egl.pc file --- configs/autoconf.in | 3 +++ src/egl/main/Makefile | 19 ++++++++++++++++++- src/egl/main/egl.pc.in | 12 ++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 src/egl/main/egl.pc.in diff --git a/configs/autoconf.in b/configs/autoconf.in index 119aadb6d4f..ed8f14495ec 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -171,6 +171,9 @@ OSMESA_PC_REQ = @OSMESA_PC_REQ@ OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@ GLESv1_CM_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@ GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@ +EGL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ +EGL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ +EGL_PC_CFLAGS = @GL_PC_CFLAGS@ EGL_DRI2_CFLAGS = @EGL_DRI2_CFLAGS@ EGL_DRI2_LIBS = @EGL_DRI2_LIBS@ diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile index 3b4ebf7fec4..82fd855b1d5 100644 --- a/src/egl/main/Makefile +++ b/src/egl/main/Makefile @@ -82,10 +82,27 @@ install-headers: $(INSTALL) -m 644 $(TOP)/include/EGL/*.h \ $(DESTDIR)$(INSTALL_INC_DIR)/EGL -install: default install-headers +PKG_CONFIG_DIR = $(INSTALL_LIB_DIR)/pkgconfig + +gl_pcedit = sed \ + -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \ + -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \ + -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \ + -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \ + -e 's,@EGL_PC_REQ_PRIV@,$(EGL_PC_REQ_PRIV),' \ + -e 's,@EGL_PC_LIB_PRIV@,$(EGL_PC_LIB_PRIV),' \ + -e 's,@EGL_PC_CFLAGS@,$(EGL_PC_CFLAGS),' \ + -e 's,@EGL_LIB@,$(EGL_LIB),' + +egl.pc: egl.pc.in + $(gl_pcedit) $< > $@ + +install: default install-headers egl.pc $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) $(MINSTALL) $(TOP)/$(LIB_DIR)/$(EGL_LIB_GLOB) \ $(DESTDIR)$(INSTALL_LIB_DIR) + $(INSTALL) -d $(DESTDIR)$(PKG_CONFIG_DIR) + $(INSTALL) -m 644 egl.pc $(DESTDIR)$(PKG_CONFIG_DIR) clean: -rm -f *.o diff --git a/src/egl/main/egl.pc.in b/src/egl/main/egl.pc.in new file mode 100644 index 00000000000..2855a4980a0 --- /dev/null +++ b/src/egl/main/egl.pc.in @@ -0,0 +1,12 @@ +prefix=@INSTALL_DIR@ +exec_prefix=${prefix} +libdir=@INSTALL_LIB_DIR@ +includedir=@INSTALL_INC_DIR@ + +Name: egl +Description: Mesa EGL library +Requires.private: @EGL_PC_REQ_PRIV@ +Version: @VERSION@ +Libs: -L${libdir} -l@EGL_LIB@ +Libs.private: @EGL_PC_LIB_PRIV@ +Cflags: -I${includedir} @EGL_PC_CFLAGS@ -- 2.30.2