File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -2111,8 +2111,15 @@ if test "x${INCLUDE_DIR}${LIB_DIR}" = x; then
21112111 # Check if libgit2 is installed and have a version that is
21122112 # compatible with git2r.
21132113 if $PKG_CONFIG ${PKG_CONFIG_NAME} --atleast-version=${LIBGIT2_MIN_VERSION} ; then
2114- PKGCONFIG_CFLAGS=` " ${PKG_CONFIG} " --cflags " ${PKG_CONFIG_NAME} " `
2115- PKGCONFIG_LIBS=` " ${PKG_CONFIG} " --libs " ${PKG_CONFIG_NAME} " `
2114+ PKGCONFIG_CFLAGS=` " ${PKG_CONFIG} " --cflags --silence-errors " ${PKG_CONFIG_NAME} " `
2115+ case " ${host_os} " in
2116+ darwin* )
2117+ PKGCONFIG_LIBS=` " ${PKG_CONFIG} " --libs --static " ${PKG_CONFIG_NAME} " `
2118+ ;;
2119+ * )
2120+ PKGCONFIG_LIBS=` " ${PKG_CONFIG} " --libs " ${PKG_CONFIG_NAME} " `
2121+ ;;
2122+ esac
21162123 fi
21172124 fi
21182125
Original file line number Diff line number Diff line change 11# git2r, R bindings to the libgit2 library.
2- # Copyright (C) 2013-2024 The git2r contributors
2+ # Copyright (C) 2013-2025 The git2r contributors
33#
44# This program is free software; you can redistribute it and/or modify
55# it under the terms of the GNU General Public License, version 2,
@@ -52,8 +52,15 @@ if test "x${INCLUDE_DIR}${LIB_DIR}" = x; then
5252 # Check if libgit2 is installed and have a version that is
5353 # compatible with git2r.
5454 if $PKG_CONFIG ${PKG_CONFIG_NAME} --atleast-version=${LIBGIT2_MIN_VERSION}; then
55- PKGCONFIG_CFLAGS=`"${PKG_CONFIG}" --cflags "${PKG_CONFIG_NAME}"`
56- PKGCONFIG_LIBS=`"${PKG_CONFIG}" --libs "${PKG_CONFIG_NAME}"`
55+ PKGCONFIG_CFLAGS=`"${PKG_CONFIG}" --cflags --silence-errors "${PKG_CONFIG_NAME}"`
56+ case "${host_os}" in
57+ darwin*)
58+ PKGCONFIG_LIBS=`"${PKG_CONFIG}" --libs --static "${PKG_CONFIG_NAME}"`
59+ ;;
60+ *)
61+ PKGCONFIG_LIBS=`"${PKG_CONFIG}" --libs "${PKG_CONFIG_NAME}"`
62+ ;;
63+ esac
5764 fi
5865 fi
5966
You can’t perform that action at this time.
0 commit comments