From 81ed23583e93f91a4b5ad522302df53816e6c146 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 10 Feb 2022 18:09:33 -0800 Subject: [PATCH] macOS: fix broken .pc file for libmtp This has bugged me forever. The existing file creates a warning on every single compiler invocation. I really need to figure out if I can get this fixed upstream. But while I'm at it, I submitted it here to make it easier to spot warnings in the build output. Signed-off-by: Dirk Hohndel --- scripts/build.sh | 1 + scripts/libmtp.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 scripts/libmtp.patch diff --git a/scripts/build.sh b/scripts/build.sh index 35eb7a3cd..33d021674 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -438,6 +438,7 @@ if [[ $PLATFORM = Darwin && "$BUILD_DEPS" == "1" ]] ; then ./${SRC_DIR}/scripts/get-dep-lib.sh single . libmtp pushd libmtp + patch -p1 < ../${SRC_DIR}/scripts/libmtp.patch echo 'N' | NOCONFIGURE="1" bash ./autogen.sh mkdir -p build cd build diff --git a/scripts/libmtp.patch b/scripts/libmtp.patch new file mode 100644 index 000000000..a3bac339f --- /dev/null +++ b/scripts/libmtp.patch @@ -0,0 +1,13 @@ +diff --git a/libmtp.pc.in b/libmtp.pc.in +index 93c7bbf..ff817e1 100644 +--- a/libmtp.pc.in ++++ b/libmtp.pc.in +@@ -10,6 +10,6 @@ Description: libmtp is a library for accessing Media Transfer Protocol devices + Version: @VERSION@ + Requires.private: @LIBUSB_REQUIRES@ + Conflicts: +-Libs: -L${libdir} -lmtp ++Libs: -L${libdir} -lmtp @OSFLAGS@ + Libs.private: @LIBS@ +-Cflags: -I${includedir} @OSFLAGS@ ++Cflags: -I${includedir}