[Buildroot] [PATCH 1/1] libjpeg: add pkg-config file for libjpeg

Olivier Schonken olivier.schonken at gmail.com
Mon Oct 23 13:17:43 UTC 2017


Signed-off-by: Olivier Schonken <olivier.schonken at gmail.com>
---
This change is necessary to successfully build cups-filters with
either libjpeg-turbo or libjpeg

 package/libjpeg/libjpeg.mk |  7 +++++++
 package/libjpeg/libjpeg.pc | 10 ++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 package/libjpeg/libjpeg.pc

diff --git a/package/libjpeg/libjpeg.mk b/package/libjpeg/libjpeg.mk
index e5bd454479..9e8380f44c 100644
--- a/package/libjpeg/libjpeg.mk
+++ b/package/libjpeg/libjpeg.mk
@@ -16,6 +16,13 @@ define LIBJPEG_REMOVE_USELESS_TOOLS
 	rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtran rdjpgcom wrjpgcom)
 endef
 
+define LIBJPEG_INSTALL_STAGING_PC
+	$(INSTALL) -D package/libjpeg/libjpeg.pc \
+		$(STAGING_DIR)/usr/lib/pkgconfig/libjpeg.pc
+endef
+
+LIBJPEG_POST_INSTALL_STAGING_HOOKS += LIBJPEG_INSTALL_STAGING_PC
+
 LIBJPEG_POST_INSTALL_TARGET_HOOKS += LIBJPEG_REMOVE_USELESS_TOOLS
 
 $(eval $(autotools-package))
diff --git a/package/libjpeg/libjpeg.pc b/package/libjpeg/libjpeg.pc
new file mode 100644
index 0000000000..41cd21ce64
--- /dev/null
+++ b/package/libjpeg/libjpeg.pc
@@ -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: 9.2.0
+Libs: -L${libdir} -ljpeg
+Cflags: -I${includedir}
-- 
2.11.0



More information about the buildroot mailing list