summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Schonken <olivier.schonken@gmail.com>2017-10-23 13:17:43 (GMT)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2018-01-08 21:01:04 (GMT)
commitc93f56d46593155a244bf83fd36c78c7968ce6b0 (patch)
tree2a2c5ab2b868ec59fcef7b243b7cfce54bd843c2
parent06608f7e0bb51304f66a0d9b5d955889d00b9af8 (diff)
downloadbuildroot-c93f56d46593155a244bf83fd36c78c7968ce6b0.tar.gz
buildroot-c93f56d46593155a244bf83fd36c78c7968ce6b0.tar.bz2
libjpeg: add pkg-config file for libjpeg
Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com> [Thomas: change to automatically set the version in the generated .pc file.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/libjpeg/libjpeg.mk9
-rw-r--r--package/libjpeg/libjpeg.pc.in10
2 files changed, 19 insertions, 0 deletions
diff --git a/package/libjpeg/libjpeg.mk b/package/libjpeg/libjpeg.mk
index e5bd454..95663a9 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 0000000..59220ca
--- /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}