From: Olivier Schonken Date: Mon, 23 Oct 2017 13:17:43 +0000 (+0200) Subject: libjpeg: add pkg-config file for libjpeg X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c93f56d46593155a244bf83fd36c78c7968ce6b0;p=buildroot.git libjpeg: add pkg-config file for libjpeg Signed-off-by: Olivier Schonken [Thomas: change to automatically set the version in the generated .pc file.] Signed-off-by: Thomas Petazzoni --- diff --git a/package/libjpeg/libjpeg.mk b/package/libjpeg/libjpeg.mk index e5bd454479..95663a9e00 100644 --- a/package/libjpeg/libjpeg.mk +++ b/package/libjpeg/libjpeg.mk @@ -18,5 +18,14 @@ endef LIBJPEG_POST_INSTALL_TARGET_HOOKS += LIBJPEG_REMOVE_USELESS_TOOLS +define LIBJPEG_INSTALL_STAGING_PC + $(INSTALL) -D -m 0644 package/libjpeg/libjpeg.pc.in \ + $(STAGING_DIR)/usr/lib/pkgconfig/libjpeg.pc + version=`sed -e '/^PACKAGE_VERSION/!d;s/PACKAGE_VERSION = \(.*\)/\1/' $(@D)/Makefile` ; \ + $(SED) "s/@PACKAGE_VERSION@/$${version}/" $(STAGING_DIR)/usr/lib/pkgconfig/libjpeg.pc +endef + +LIBJPEG_POST_INSTALL_STAGING_HOOKS += LIBJPEG_INSTALL_STAGING_PC + $(eval $(autotools-package)) $(eval $(host-autotools-package)) diff --git a/package/libjpeg/libjpeg.pc.in b/package/libjpeg/libjpeg.pc.in new file mode 100644 index 0000000000..59220cac8a --- /dev/null +++ b/package/libjpeg/libjpeg.pc.in @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libjpeg +Description: A JPEG codec that provides the libjpeg API +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -ljpeg +Cflags: -I${includedir}