buildroot/package/opencv/0002-CMakeLists.txt-Do-not-add-libdl-to-LINKER_LIBS-for-s.patch
Bernd Kuhls 9015b17ff3 package/opencv: bump version to 2.4.13.3
Removed 0002-avoid-sysctl_h.patch, applied upstream:
61936eb1a4 (diff-f3b4393df86251f502cee9ba1da034a5)

This bump includes
70489b1e22 (diff-9076fba682f6d51a018b6de8648e1cdb)
which fixes ffmpeg static linking
http://autobuild.buildroot.net/results/544/5444b0c5556a42923e3fcdae782811a805e51b1f/
http://autobuild.buildroot.net/results/44d/44d53e4c5d4570507c7e8856fb9dd0a477dcdf63/

In-source-builds are not allowed anymore:
777a0080cb

Re-numbered remaining patches.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-09-22 18:19:35 +02:00

40 lines
1.4 KiB
Diff

From 22e03ef8a9e3adcbc6b2f16c3cc98e4e14443eed Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Sat, 24 Sep 2016 17:51:22 +0200
Subject: [PATCH 1/1] CMakeLists.txt: Do not add libdl to LINKER_LIBS for
static builds
Without this patch -ldl is present in opencv.pc which breaks OpenCV
detection by ffmpeg, detected by buildroot autobuilders:
http://autobuild.buildroot.net/results/765/7657e01481995a4f0d725467e935a83928a59a04//ffmpeg-3.1.3/config.log
/home/peko/autobuild/instance-1/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.4/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -ldl
Patch sent upstream: https://github.com/opencv/opencv/pull/7337
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 007b80d..99b047d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -457,7 +457,10 @@ if(UNIX)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m)
else()
- set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} dl m pthread rt)
+ if(BUILD_SHARED_LIBS)
+ set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} dl)
+ endif()
+ set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m pthread rt)
endif()
else()
set(HAVE_LIBPTHREAD YES)
--
2.9.3