aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libcamera/fix-absolute-paths.patch
blob: 42a2431586e4cc0c5f5fea570de820db32decd37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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