Fix two build problems in OpenCV, triggered after recent changes in

ports tree (that doesn't meant that those problems come from lands other
than OpenCV itself):

1. Stop exporting opencv_java target: noone links to the libopencv_java.so,
   anyway, and it breaks find_package(OpenCV) when opencv-java is absent.
   The actual broken port was Digikam on i386 (yes, due to some funny
   reasons, this didn't trigger on amd64).

2. Switch to gstreamer1 since OpenCV picks it up nowadays, if the former
   is found. WANTLIB updates included.

Initial report and testing by sthen@.

Okays:
   (1) by dcoppa@, sthen@ (implicit) and Rafael Sadowski (MAINTAINER).
   (2) by sthen@ (implicit).
This commit is contained in:
zhuk 2015-01-30 21:38:37 +00:00
parent 7da44266f9
commit 59e21bf682
2 changed files with 29 additions and 11 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.33 2015/01/26 21:59:55 zhuk Exp $
# $OpenBSD: Makefile,v 1.34 2015/01/30 21:38:37 zhuk Exp $
ONLY_FOR_ARCHS = ${GCC4_ARCHS}
ONLY_FOR_ARCHS-java = amd64 i386
@ -14,7 +14,8 @@ DISTNAME = opencv-$V
PKGNAME-main = ${PKGNAME}
PKGNAME-docs = opencv-docs-$V
PKGNAME-java = opencv-java-$V
REVISION-main = 0
REVISION-main = 1
REVISION-java = 0
HOMEPAGE = http://www.opencv.org/
MAINTAINER = Rafael Sadowski <rafael@sizeofvoid.org>
@ -46,19 +47,20 @@ WANTLIB-main = Half Iex IlmImf IlmThread Imath X11 Xcomposite Xcursor
WANTLIB-main += Xdamage Xext Xfixes Xi Xinerama Xrandr Xrender atk-1.0
WANTLIB-main += avcodec avformat avutil bz2 c cairo fontconfig
WANTLIB-main += freetype gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0
WANTLIB-main += gmodule-2.0 gobject-2.0 gstapp-0.10 gstbase-0.10
WANTLIB-main += gstreamer-0.10 gstvideo-0.10 gthread-2.0 gtk-x11-2.0
WANTLIB-main += gobject-2.0 gstapp-1.0 gstbase-1.0 gstpbutils-1.0
WANTLIB-main += gstreamer-1.0 gstriff-1.0 gstvideo-1.0 gthread-2.0 gtk-x11-2.0
WANTLIB-main += jasper jpeg m pango-1.0 pangocairo-1.0
WANTLIB-main += pangoft2-1.0 png pthread stdc++ swscale tiff xml2 z
WANTLIB-main += ${MODGETTEXT_WANTLIB} ${MODPY_WANTLIB}
WANTLIB-docs =
WANTLIB-java = m pthread stdc++ z
WANTLIB-java = m pthread stdc++
WANTLIB-java += opencv_calib3d opencv_contrib opencv_core
WANTLIB-java += opencv_features2d opencv_flann opencv_highgui
WANTLIB-java += opencv_imgproc opencv_ml opencv_objdetect
WANTLIB-java += opencv_photo opencv_video
WANTLIB-java += opencv_gpu opencv_legacy opencv_nonfree opencv_ocl
MULTI_PACKAGES = -main -docs -java
PSEUDO_FLAVORS = no_docs no_java
@ -88,7 +90,7 @@ RUN_DEPENDS-java = ${MODJAVA_RUN_DEPENDS}
LIB_DEPENDS-main = ${LIB_DEPENDS} \
${MODPY_LIB_DEPENDS} \
multimedia/gstreamer-0.10/plugins-base \
multimedia/gstreamer1/plugins-base \
x11/gtk+2 \
graphics/ffmpeg \
graphics/ilmbase \

View File

@ -1,8 +1,10 @@
$OpenBSD: patch-modules_java_CMakeLists_txt,v 1.2 2014/06/03 20:41:36 zhuk Exp $
JNI shared object is installed in the same directory, so this should
be under lib/.
--- modules/java/CMakeLists.txt.orig Fri Apr 11 12:15:26 2014
+++ modules/java/CMakeLists.txt Mon May 26 22:11:21 2014
$OpenBSD: patch-modules_java_CMakeLists_txt,v 1.3 2015/01/30 21:38:37 zhuk Exp $
1. JNI shared object is installed in the same directory, so this should
be under lib/.
2. Avoid exporting opencv_java together with other targets, unbreaks calling
find_package(OpenCV) without opencv-java package being installed.
--- modules/java/CMakeLists.txt.orig Wed Oct 1 11:33:36 2014
+++ modules/java/CMakeLists.txt Thu Jan 29 21:20:33 2015
@@ -280,7 +280,7 @@ else(ANDROID)
if(WIN32)
set(JAR_INSTALL_DIR java)
@ -12,3 +14,17 @@ be under lib/.
endif(WIN32)
install(FILES ${JAR_FILE} DESTINATION ${JAR_INSTALL_DIR} COMPONENT java)
endif(ANDROID)
@@ -357,11 +357,11 @@ if(ANDROID)
ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT java)
else()
if(NOT INSTALL_CREATE_DISTRIB)
- ocv_install_target(${the_module} EXPORT OpenCVModules
+ ocv_install_target(${the_module}
RUNTIME DESTINATION ${JAR_INSTALL_DIR} COMPONENT java
LIBRARY DESTINATION ${JAR_INSTALL_DIR} COMPONENT java)
else()
- ocv_install_target(${the_module} EXPORT OpenCVModules
+ ocv_install_target(${the_module}
RUNTIME DESTINATION ${JAR_INSTALL_DIR}/${OpenCV_ARCH} COMPONENT java
LIBRARY DESTINATION ${JAR_INSTALL_DIR}/${OpenCV_ARCH} COMPONENT java)
endif()