1From ad911cbc3c16397cf9d326c30571a4d1edaaa03f Mon Sep 17 00:00:00 2001 2From: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3Date: Wed, 2 Jun 2021 07:45:40 +0200 4Subject: [PATCH] Add Libs.private to libraw.pc 5 6Add Libs.private to libraw.pc to avoid the following static build 7failure when enabling libraw with jasper support in imagemagick: 8 9/home/giuliobenetti/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/giuliobenetti/autobuild/run/instance-1/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libjasper.a(jpg_enc.c.o): in function `jpg_encode': 10jpg_enc.c:(.text+0x1f4): undefined reference to `jpeg_stdio_dest' 11 12-ljpeg must be added after -ljasper because jasper depends on jpeg 13 14Fixes: 15 - http://autobuild.buildroot.org/results/88e43a1ea2059a684e50b0f5f2af407e8c6df2e1 16 17Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 18[Upstream status: https://github.com/LibRaw/LibRaw/pull/406] 19--- 20 configure.ac | 2 ++ 21 libraw.pc.in | 1 + 22 libraw_r.pc.in | 1 + 23 3 files changed, 4 insertions(+) 24 25diff --git a/configure.ac b/configure.ac 26index 4ab2f313..7bf5fdfd 100644 27--- a/configure.ac 28+++ b/configure.ac 29@@ -57,6 +57,7 @@ if test x$jpeg = xtrue; then 30 AC_CHECK_HEADERS([jpeglib.h], [ 31 CPPFLAGS="$CPPFLAGS -DUSE_JPEG -DUSE_JPEG8" 32 LIBS="$LIBS -ljpeg" 33+ AC_SUBST([PACKAGE_LIBS_PRIVATE],"-ljpeg $PACKAGE_LIBS_PRIVATE") 34 ], AC_MSG_WARN([no jpeg headers found])) 35 ], 36 AC_MSG_WARN([libjpeg not found]) 37@@ -78,6 +79,7 @@ if test x$jasper = xtrue; then 38 AC_CHECK_HEADERS([jasper/jasper.h], [ 39 CPPFLAGS="$CPPFLAGS -DUSE_JASPER" 40 LIBS="$LIBS -ljasper" 41+ AC_SUBST([PACKAGE_LIBS_PRIVATE],"-ljasper $PACKAGE_LIBS_PRIVATE") 42 ], AC_MSG_WARN([no jasper headers found])) 43 ], 44 AC_MSG_WARN([libjasper not found]) 45diff --git a/libraw.pc.in b/libraw.pc.in 46index 1bab18b8..c95fbc48 100644 47--- a/libraw.pc.in 48+++ b/libraw.pc.in 49@@ -8,4 +8,5 @@ Description: Raw image decoder library (non-thread-safe) 50 Requires: @PACKAGE_REQUIRES@ 51 Version: @PACKAGE_VERSION@ 52 Libs: -L${libdir} -lraw -lstdc++@PC_OPENMP@ 53+Libs.private: @PACKAGE_LIBS_PRIVATE@ 54 Cflags: -I${includedir}/libraw -I${includedir} 55diff --git a/libraw_r.pc.in b/libraw_r.pc.in 56index e8427271..92bbbffa 100644 57--- a/libraw_r.pc.in 58+++ b/libraw_r.pc.in 59@@ -8,4 +8,5 @@ Description: Raw image decoder library (thread-safe) 60 Requires: @PACKAGE_REQUIRES@ 61 Version: @PACKAGE_VERSION@ 62 Libs: -L${libdir} -lraw_r -lstdc++@PC_OPENMP@ 63+Libs.private: @PACKAGE_LIBS_PRIVATE@ 64 Cflags: -I${includedir}/libraw -I${includedir} 65-- 662.30.2 67 68