diff options
Diffstat (limited to 'vcpkg/ports/libcamera/fix-absolute-paths.patch')
| -rw-r--r-- | vcpkg/ports/libcamera/fix-absolute-paths.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/vcpkg/ports/libcamera/fix-absolute-paths.patch b/vcpkg/ports/libcamera/fix-absolute-paths.patch new file mode 100644 index 0000000..42a2431 --- /dev/null +++ b/vcpkg/ports/libcamera/fix-absolute-paths.patch @@ -0,0 +1,32 @@ +diff --git a/src/v4l2/libcamerify.in b/src/v4l2/libcamerify.in +index c4ea273f..d4e39c1b 100755 +--- a/src/v4l2/libcamerify.in ++++ b/src/v4l2/libcamerify.in +@@ -32,14 +32,25 @@ while [ $# -gt 0 ]; do + shift + done + ++SCRIPT=$(realpath "$0") ++SCRIPTPATH=$(dirname "$SCRIPT") ++ + [ $debug -gt 0 ] && loglevel=V4L2Compat:0 + [ $debug -gt 1 ] && loglevel=0 + [ "$loglevel" != "" ] && export LIBCAMERA_LOG_LEVELS=$loglevel + + if [ "$LD_PRELOAD" = "" ] ; then +- LD_PRELOAD='@LIBCAMERA_V4L2_SO@' ++ if [ $debug = 0 ] ; then ++ LD_PRELOAD="$SCRIPTPATH/../v412-compat.so" ++ else ++ LD_PRELOAD="$SCRIPTPATH/../../v412-compat.so" ++ fi + else +- LD_PRELOAD="$LD_PRELOAD "'@LIBCAMERA_V4L2_SO@' ++ if [ $debug = 0 ] ; then ++ LD_PRELOAD="$LD_PRELOAD " "$SCRIPTPATH/../v412-compat.so" ++ else ++ LD_PRELOAD="$LD_PRELOAD " "$SCRIPTPATH/../../v412-compat.so" ++ fi + fi + + export LD_PRELOAD |