Skip to content

Commit

Permalink
macOS: fix broken .pc file for libmtp
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
dirkhh committed Mar 12, 2022
1 parent 325addf commit 81ed235
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions scripts/libmtp.patch
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 81ed235

Please sign in to comment.