diff options
author | kwm <kwm@FreeBSD.org> | 2015-04-16 16:01:48 +0800 |
---|---|---|
committer | kwm <kwm@FreeBSD.org> | 2015-04-16 16:01:48 +0800 |
commit | f23223fcab1181264533fc15478303264a9658d6 (patch) | |
tree | f82f812712348c50e1e13e1980408fedcf7e06af /graphics/opencv | |
parent | 331f72e1c92e1e2942f2cfe55463ccd16614f1da (diff) | |
download | freebsd-ports-gnome-f23223fcab1181264533fc15478303264a9658d6.tar.gz freebsd-ports-gnome-f23223fcab1181264533fc15478303264a9658d6.tar.zst freebsd-ports-gnome-f23223fcab1181264533fc15478303264a9658d6.zip |
Add patch from debian to fix the installed pkg-config files.
This allows the gstreamer plugin to actualy link to the needed opencv libraries.
PR: 196021
Approved by: maintainer timeout (4 months)
Obtained from: debian
Diffstat (limited to 'graphics/opencv')
-rw-r--r-- | graphics/opencv/Makefile | 2 | ||||
-rw-r--r-- | graphics/opencv/files/patch-pkg-config | 50 |
2 files changed, 51 insertions, 1 deletions
diff --git a/graphics/opencv/Makefile b/graphics/opencv/Makefile index 6b80eb298d71..995dde35395b 100644 --- a/graphics/opencv/Makefile +++ b/graphics/opencv/Makefile @@ -3,7 +3,7 @@ PORTNAME?= opencv PORTVERSION= 2.4.9 -PORTREVISION?= 3 +PORTREVISION?= 4 CATEGORIES= graphics MASTER_SITES= SF/${PORTNAME}library/${PORTNAME}-unix/${PORTVERSION} diff --git a/graphics/opencv/files/patch-pkg-config b/graphics/opencv/files/patch-pkg-config new file mode 100644 index 000000000000..d2b85d0bec40 --- /dev/null +++ b/graphics/opencv/files/patch-pkg-config @@ -0,0 +1,50 @@ +Description: pkg-config is broken in OpenCV-2.4.x +Bug: http://code.opencv.org/issues/1925 +Bug-Debian: http://bugs.debian.org/721894, http://bugs.debian.org/678222 +Author: Ray Rashif +Last-Update: 2013-11-23 + +diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake +index a36b70e..a3733bc 100644 +--- cmake/OpenCVGenPkgconfig.cmake ++++ cmake/OpenCVGenPkgconfig.cmake +@@ -10,7 +10,7 @@ + # ------------------------------------------------------------------------------------------- + set(prefix "${CMAKE_INSTALL_PREFIX}") + set(exec_prefix "\${prefix}") +-set(libdir "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS ++set(libdir "\${prefix}/${OPENCV_LIB_INSTALL_PATH}") + set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}") + + if(CMAKE_BUILD_TYPE MATCHES "Release") +@@ -35,10 +35,11 @@ ocv_list_reverse(OpenCV_LIB_COMPONENTS) + ocv_list_reverse(OpenCV_EXTRA_COMPONENTS) + + #build the list of components +-set(OpenCV_LIB_COMPONENTS_ "") ++set(OpenCV_LIB_COMPONENTS_ "-L\${libdir}") + foreach(CVLib ${OpenCV_LIB_COMPONENTS}) + get_target_property(libpath ${CVLib} LOCATION_${CMAKE_BUILD_TYPE}) + get_filename_component(libname "${libpath}" NAME) ++ get_filename_component(lname "${libpath}" NAME_WE) + + if(INSTALL_TO_MANGLED_PATHS) + set(libname "${libname}.${OPENCV_VERSION}") +@@ -52,6 +53,8 @@ foreach(CVLib ${OpenCV_LIB_COMPONENTS}) + endif() + + set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} \${exec_prefix}/${installDir}/${libname}") ++ string(REPLACE "libopencv" "-lopencv" lname "${lname}") ++ set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} ${lname}") + endforeach() + + # add extra dependencies required for OpenCV +@@ -67,6 +70,8 @@ if(OpenCV_EXTRA_COMPONENTS) + + set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${maybe_l_prefix}${extra_component}") + ++ ++ + endforeach() + endif() + |