Diff to use opencv2 and some tweaks:

- fix MASTER_SITE
- s/https/https/
- dependencies
- regen PLIST

RS

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/digikam-kde4/Makefile,v
retrieving revision 1.30
diff -u -p -u -p -r1.30 Makefile
--- Makefile    29 Jun 2018 22:16:16 -0000      1.30
+++ Makefile    10 Mar 2019 20:22:58 -0000
@@ -5,7 +5,7 @@ COMMENT-main =          KDE photo management uti
 COMMENT-mediawiki =    KIPI interface for MediaWiki
 
 CATEGORIES =           graphics
-HOMEPAGE =             http://www.digikam.org/
+HOMEPAGE =             https://www.digikam.org/
 VERSION =              4.13.0
 DISTNAME =             digikam-${VERSION}
 
@@ -16,8 +16,8 @@ PKGNAME-kipi =                kipi-plugins-${VERSION}
 PKGNAME-main =         ${PKGNAME}
 PKGNAME-mediawiki =    libmediawiki-1.0.0
 
-REVISION-main =                5
-REVISION-kipi =                6
+REVISION-main =                6
+REVISION-kipi =                7
 REVISION-mediawiki =   6
 
 EXTRACT_SUFX =         .tar.bz2
@@ -30,8 +30,7 @@ SHARED_LIBS +=  digikamcore           0.1
 SHARED_LIBS +=  digikamdatabase                0.1
 SHARED_LIBS +=  mediawiki              0.1
 
-MASTER_SITES = ${MASTER_SITE_KDE:=stable/digikam/} \
-               ${MASTER_SITE_KDE:=Attic/digikam/}
+MASTER_SITES = ${MASTER_SITE_KDE:=Attic/digikam/}
 
 MULTI_PACKAGES =       -main -kipi -mediawiki
 
@@ -55,10 +54,11 @@ WANTLIB-kipi += ${KDE4LIB}/kio ${KDE4LIB
 WANTLIB-kipi += ${KDE4LIB}/ksane
 WANTLIB-kipi += ${KDE4LIB}/nepomuk ${KDE4LIB}/nepomukutils ${KDE4LIB}/solid
 WANTLIB-kipi += ${KDE4LIB}/threadweaver
-WANTLIB-kipi += opencv_core opencv_highgui opencv_imgproc opencv_objdetect
+WANTLIB-kipi += lib/opencv2/opencv_core lib/opencv2/opencv_highgui
+WANTLIB-kipi += lib/opencv2/opencv_imgproc lib/opencv2/opencv_objdetect
 WANTLIB-kipi += exslt gdk_pixbuf-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gpod
 WANTLIB-kipi += gthread-2.0 intl jpeg
-WANTLIB-kipi += qjson kgeomap kqoauth kvkontakte mediawiki png qca soprano
+WANTLIB-kipi += qjson kgeomap kqoauth kvkontakte png16 qca soprano
 WANTLIB-kipi += tiff xml2 xslt MagickCore-6.Q16
 WANTLIB-kipi += QtGLib-2.0 QtGStreamer-1.0 QtGStreamerUtils-1.0
 
@@ -76,14 +76,18 @@ WANTLIB-main += ${KDE4LIB}/kpimutils ${K
 WANTLIB-main += ${KDE4LIB}/kresources ${KDE4LIB}/kutils
 WANTLIB-main += ${KDE4LIB}/nepomuk ${KDE4LIB}/nepomukutils
 WANTLIB-main += ${KDE4LIB}/solid ${KDE4LIB}/threadweaver
-WANTLIB-main += opencv_calib3d opencv_contrib opencv_core opencv_features2d
-WANTLIB-main += opencv_flann opencv_gpu opencv_highgui opencv_imgproc
-WANTLIB-main += opencv_legacy opencv_ml opencv_nonfree opencv_objdetect
-WANTLIB-main += opencv_ocl opencv_photo opencv_video
 WANTLIB-main += akonadi-contact akonadi-kde baloocore baloofiles baloopim
-WANTLIB-main += balooqueryparser exif gphoto2 gphoto2_port jasper jpeg
-WANTLIB-main += kface kgeomap lcms2 lensfun lqr-1 pgf png qca soprano
+WANTLIB-main += balooqueryparser gphoto2 gphoto2_port jasper jpeg
+WANTLIB-main += kface kgeomap lcms2 lensfun lqr-1 pgf png16 soprano
 WANTLIB-main += sqlite tiff usb
+WANTLIB-main += lib/opencv2/opencv_calib3d lib/opencv2/opencv_contrib
+WANTLIB-main += lib/opencv2/opencv_core lib/opencv2/opencv_features2d
+WANTLIB-main += lib/opencv2/opencv_flann lib/opencv2/opencv_gpu
+WANTLIB-main += lib/opencv2/opencv_highgui lib/opencv2/opencv_imgproc
+WANTLIB-main += lib/opencv2/opencv_legacy lib/opencv2/opencv_ml
+WANTLIB-main += lib/opencv2/opencv_nonfree lib/opencv2/opencv_objdetect
+WANTLIB-main += lib/opencv2/opencv_ocl lib/opencv2/opencv_photo
+WANTLIB-main += lib/opencv2/opencv_video
 
 WANTLIB-mediawiki =  ${WANTLIB-common}
 WANTLIB-mediawiki += lib/qt4/QtNetwork lib/qt4/QtXml
@@ -121,7 +125,7 @@ LIB_DEPENDS-kipi =  ${LIB_DEPENDS-common}
                        devel/qjson>=0.7 \
                        graphics/gdk-pixbuf2 \
                        graphics/ImageMagick \
-                       graphics/opencv>=2.4.9 \
+                       graphics/opencv2 \
                        graphics/png \
                        graphics/tiff \
                        multimedia/qt-gstreamer \
@@ -138,7 +142,6 @@ LIB_DEPENDS-kipi =  ${LIB_DEPENDS-common}
 LIB_DEPENDS-main =     ${LIB_DEPENDS-common} \
                        ${MODPHONON_LIB_DEPENDS} \
                        databases/sqlite \
-                       devel/glib2 \
                        devel/libusb-compat \
                        graphics/jasper \
                        graphics/lcms2 \
@@ -146,7 +149,7 @@ LIB_DEPENDS-main =  ${LIB_DEPENDS-common}
                        graphics/libgphoto2 \
                        graphics/liblqr \
                        graphics/libpgf \
-                       graphics/opencv>=2.4.9 \
+                       graphics/opencv2 \
                        graphics/png \
                        graphics/tiff \
                        x11/kde-applications/libkface>=15.04.3 \
@@ -159,12 +162,12 @@ LIB_DEPENDS-main =        ${LIB_DEPENDS-common}
 
 LIB_DEPENDS-mediawiki =        ${LIB_DEPENDS-common}
 
-CONFIGURE_ARGS =       -DCMAKE_DISABLE_FIND_PACKAGE_Hupnp:Bool=Yes \
-                       -DCMAKE_DISABLE_FIND_PACKAGE_QtSoap:Bool=Yes \
-                       -DENABLE_INTERNALMYSQL:Bool=No \
-                       -DENABLE_KDEPIMLIBSSUPPORT:Bool=Yes \
-                       -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen:Bool=Yes \
-                       -DENABLE_LCMS2:Bool=Yes
+CONFIGURE_ARGS =       -DCMAKE_DISABLE_FIND_PACKAGE_Hupnp=Yes \
+                       -DCMAKE_DISABLE_FIND_PACKAGE_QtSoap=Yes \
+                       -DENABLE_INTERNALMYSQL=No \
+                       -DENABLE_KDEPIMLIBSSUPPORT=Yes \
+                       -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=Yes \
+                       -DENABLE_LCMS2=Yes
 
 # no official release yet
 CONFIGURE_ARGS +=      -DDIGIKAMSC_COMPILE_LIBMEDIAWIKI=Yes
@@ -178,15 +181,26 @@ TEST_IS_INTERACTIVE =     X11
 
 .include <bsd.port.arch.mk>
 
-#.if ${ARCH} == "i386"
 CONFIGURE_ENV =                CXXFLAGS="${CXXFLAGS} 
-DOPENBSD_LIBKDCRAW_NO_CRASH=0"
-#.else
-#CONFIGURE_ENV =               CXXFLAGS="${CXXFLAGS} 
-DOPENBSD_LIBKDCRAW_NO_CRASH=1"
-#.endif
+
+OPENCV_LIBRARY_DIR =   "${LOCALBASE}/lib/opencv2"
+SUBST_VARS +=          OPENCV_LIBRARY_DIR
 
 post-extract:
        # use our Kexiv2Config.cmake instead
        rm ${WRKSRC}/cmake/modules/FindKexiv2.cmake
+
+pre-configure:
+       ${SUBST_CMD} \
+               ${WRKSRC}/core/app/CMakeLists.txt \
+               ${WRKSRC}/core/showfoto/CMakeLists.txt \
+               ${WRKSRC}/core/tests/CMakeLists.txt \
+               ${WRKSRC}/core/tests/imgqsort/detectblur/CMakeLists.txt \
+               ${WRKSRC}/core/tests/imgqsort/detectblur/CMakeLists.txt \
+               ${WRKSRC}/core/tests/imgqsort/detectnoise/CMakeLists.txt \
+               ${WRKSRC}/extra/kipi-plugins/removeredeyes/CMakeLists.txt \
+               ${WRKSRC}/extra/kipi-plugins/removeredeyes/test/CMakeLists.txt
+
 
 # XXX because OBJECT_DEPENDS doesn't work as it should in
 # the patches/patch-extra_kipi-plugins_common_libkipiplugins_CMakeLists_txt
Index: patches/patch-core_app_CMakeLists_txt
===================================================================
RCS file: patches/patch-core_app_CMakeLists_txt
diff -N patches/patch-core_app_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-core_app_CMakeLists_txt       10 Mar 2019 20:22:58 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: core/app/CMakeLists.txt
+--- core/app/CMakeLists.txt.orig
++++ core/app/CMakeLists.txt
+@@ -8,7 +8,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/utils/versi
+ 
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/database/dbconfigversion.h.cmake.in 
${CMAKE_CURRENT_BINARY_DIR}/database/dbconfigversion.h)
+ 
+ # Shared libdigikamcore 
################################################################
+-
++link_directories("${OPENCV_LIBRARY_DIR}")
+ set(digikamcore_LIB_SRCS
+     # basic libs
+     ${libdimg_SRCS}
Index: patches/patch-core_cmake_modules_modules_opencv_FindOpenCV_cmake
===================================================================
RCS file: patches/patch-core_cmake_modules_modules_opencv_FindOpenCV_cmake
diff -N patches/patch-core_cmake_modules_modules_opencv_FindOpenCV_cmake
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-core_cmake_modules_modules_opencv_FindOpenCV_cmake    10 Mar 
2019 20:22:58 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+Index: core/cmake/modules/modules_opencv/FindOpenCV.cmake
+--- core/cmake/modules/modules_opencv/FindOpenCV.cmake.orig
++++ core/cmake/modules/modules_opencv/FindOpenCV.cmake
+@@ -96,9 +96,9 @@ DBG_MSG("OpenCV_ROOT_DIR=${OpenCV_ROOT_DIR}")
+ 
+ # header include dir suffixes appended to OpenCV_ROOT_DIR
+ set(OpenCV_INCDIR_SUFFIXES
+-    include
+     include/cv
+     include/opencv
++    include/opencv2
+     cv/include
+     cxcore/include
+     cvaux/include
+@@ -110,7 +110,7 @@ set(OpenCV_INCDIR_SUFFIXES
+ 
+ # library linkdir suffixes appended to OpenCV_ROOT_DIR 
+ set(OpenCV_LIBDIR_SUFFIXES
+-    lib
++    lib/opencv2
+     OpenCV/lib
+     otherlibs/_graphics/lib
+    )
Index: patches/patch-core_showfoto_CMakeLists_txt
===================================================================
RCS file: patches/patch-core_showfoto_CMakeLists_txt
diff -N patches/patch-core_showfoto_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-core_showfoto_CMakeLists_txt  10 Mar 2019 20:22:58 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: core/showfoto/CMakeLists.txt
+--- core/showfoto/CMakeLists.txt.orig
++++ core/showfoto/CMakeLists.txt
+@@ -18,7 +18,7 @@ include_directories(BEFORE
+ if(NOT MSVC)
+     add_definitions(${KDE4_ENABLE_EXCEPTIONS})
+ endif()
+-
++link_directories("${OPENCV_LIBRARY_DIR}")
+ set(showfoto_SRCS
+     ${CMAKE_CURRENT_SOURCE_DIR}/../utilities/setup/setupeditor.cpp
+     ${CMAKE_CURRENT_SOURCE_DIR}/../utilities/setup/setupiofiles.cpp
Index: patches/patch-core_tests_CMakeLists_txt
===================================================================
RCS file: patches/patch-core_tests_CMakeLists_txt
diff -N patches/patch-core_tests_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-core_tests_CMakeLists_txt     10 Mar 2019 20:22:58 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: core/tests/CMakeLists.txt
+--- core/tests/CMakeLists.txt.orig
++++ core/tests/CMakeLists.txt
+@@ -16,6 +16,7 @@ set(advancedrenametest_SRCS
+ 
+ KDE4_ADD_UNIT_TEST(advancedrenametest ${advancedrenametest_SRCS})
+ 
++link_directories("${OPENCV_LIBRARY_DIR}")
+ target_link_libraries(advancedrenametest
+                       ${KDE4_KDEUI_LIBS}
+                       ${KEXIV2_LIBRARIES}
Index: patches/patch-core_tests_imgqsort_detectblur_CMakeLists_txt
===================================================================
RCS file: patches/patch-core_tests_imgqsort_detectblur_CMakeLists_txt
diff -N patches/patch-core_tests_imgqsort_detectblur_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-core_tests_imgqsort_detectblur_CMakeLists_txt 10 Mar 2019 
20:22:58 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: core/tests/imgqsort/detectblur/CMakeLists.txt
+--- core/tests/imgqsort/detectblur/CMakeLists.txt.orig
++++ core/tests/imgqsort/detectblur/CMakeLists.txt
+@@ -4,6 +4,7 @@
+ # Redistribution and use is allowed according to the terms of the BSD license.
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+ 
++link_directories("${OPENCV_LIBRARY_DIR}")
+ set(detectblur_SRCS detectblur.cpp)
+ KDE4_ADD_EXECUTABLE(detectblur NOGUI ${detectblur_SRCS})
+ target_link_libraries(detectblur ${OpenCV_LIBRARIES})
Index: patches/patch-core_tests_imgqsort_detectnoise_CMakeLists_txt
===================================================================
RCS file: patches/patch-core_tests_imgqsort_detectnoise_CMakeLists_txt
diff -N patches/patch-core_tests_imgqsort_detectnoise_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-core_tests_imgqsort_detectnoise_CMakeLists_txt        10 Mar 
2019 20:22:58 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: core/tests/imgqsort/detectnoise/CMakeLists.txt
+--- core/tests/imgqsort/detectnoise/CMakeLists.txt.orig
++++ core/tests/imgqsort/detectnoise/CMakeLists.txt
+@@ -3,7 +3,7 @@
+ #
+ # Redistribution and use is allowed according to the terms of the BSD license.
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+-
++link_directories("${OPENCV_LIBRARY_DIR}")
+ set(detectnoise_SRCS detectnoise.cpp)
+ KDE4_ADD_EXECUTABLE(detectnoise NOGUI ${detectnoise_SRCS})
+ target_link_libraries(detectnoise ${OpenCV_LIBRARIES})
Index: patches/patch-extra_kipi-plugins_CMakeLists_txt
===================================================================
RCS file: 
/cvs/ports/graphics/digikam-kde4/patches/patch-extra_kipi-plugins_CMakeLists_txt,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 patch-extra_kipi-plugins_CMakeLists_txt
--- patches/patch-extra_kipi-plugins_CMakeLists_txt     2 Feb 2017 12:57:13 
-0000       1.5
+++ patches/patch-extra_kipi-plugins_CMakeLists_txt     10 Mar 2019 20:22:58 
-0000
@@ -1,6 +1,7 @@
 $OpenBSD: patch-extra_kipi-plugins_CMakeLists_txt,v 1.5 2017/02/02 12:57:13 
sthen Exp $
---- extra/kipi-plugins/CMakeLists.txt.orig     Thu Sep  3 23:22:45 2015
-+++ extra/kipi-plugins/CMakeLists.txt  Wed Feb  1 14:50:16 2017
+Index: extra/kipi-plugins/CMakeLists.txt
+--- extra/kipi-plugins/CMakeLists.txt.orig
++++ extra/kipi-plugins/CMakeLists.txt
 @@ -166,7 +166,7 @@ if(KIPI_FOUND)
      include(MacroUtils)
      include(MacroOpenCV)
@@ -10,3 +11,11 @@ $OpenBSD: patch-extra_kipi-plugins_CMake
  
      include(MacroOptionalDependPackage)
  
+@@ -339,6 +339,7 @@ if(KIPI_FOUND)
+                             ${KEXIV2_INCLUDE_DIR}
+                             ${KDCRAW_INCLUDE_DIR}
+                             ${KIPI_INCLUDE_DIR}
++                            ${JPEG_INCLUDE_DIR}
+                             ${KDE4_INCLUDES}
+                             ${QT4_INCLUDES}
+                         )
Index: patches/patch-extra_kipi-plugins_removeredeyes_CMakeLists_txt
===================================================================
RCS file: patches/patch-extra_kipi-plugins_removeredeyes_CMakeLists_txt
diff -N patches/patch-extra_kipi-plugins_removeredeyes_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-extra_kipi-plugins_removeredeyes_CMakeLists_txt       10 Mar 
2019 20:22:58 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: extra/kipi-plugins/removeredeyes/CMakeLists.txt
+--- extra/kipi-plugins/removeredeyes/CMakeLists.txt.orig
++++ extra/kipi-plugins/removeredeyes/CMakeLists.txt
+@@ -6,6 +6,7 @@
+ 
+ add_subdirectory(test)
+ 
++link_directories("${OPENCV_LIBRARY_DIR}")
+ add_definitions(${KDE4_ENABLE_EXCEPTIONS})
+ 
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libcvblobs
Index: patches/patch-extra_kipi-plugins_removeredeyes_test_CMakeLists_txt
===================================================================
RCS file: patches/patch-extra_kipi-plugins_removeredeyes_test_CMakeLists_txt
diff -N patches/patch-extra_kipi-plugins_removeredeyes_test_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-extra_kipi-plugins_removeredeyes_test_CMakeLists_txt  10 Mar 
2019 20:22:58 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: extra/kipi-plugins/removeredeyes/test/CMakeLists.txt
+--- extra/kipi-plugins/removeredeyes/test/CMakeLists.txt.orig
++++ extra/kipi-plugins/removeredeyes/test/CMakeLists.txt
+@@ -6,6 +6,7 @@
+ 
+ if(NOT WIN32)
+ 
++    link_directories("${OPENCV_LIBRARY_DIR}")
+     include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../plugin
+                         ${CMAKE_CURRENT_SOURCE_DIR}/../libcvblobs
+                         ${OpenCV_INCLUDE_DIR}
Index: pkg/PLIST-kipi
===================================================================
RCS file: /cvs/ports/graphics/digikam-kde4/pkg/PLIST-kipi,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 PLIST-kipi
--- pkg/PLIST-kipi      29 Jun 2018 22:16:16 -0000      1.5
+++ pkg/PLIST-kipi      10 Mar 2019 20:22:58 -0000
@@ -410,11 +410,23 @@ share/icons/hicolor/scalable/apps/kipi-p
 share/icons/hicolor/scalable/apps/kipi-smugmug.svgz
 share/icons/hicolor/scalable/apps/kipi-wikimedia.svgz
 share/icons/hicolor/scalable/apps/kipi-zooomr.svgz
+share/icons/oxygen/128x128/
+share/icons/oxygen/128x128/apps/
 share/icons/oxygen/128x128/apps/rawconverter.png
+share/icons/oxygen/16x16/
+share/icons/oxygen/16x16/apps/
 share/icons/oxygen/16x16/apps/rawconverter.png
+share/icons/oxygen/22x22/
+share/icons/oxygen/22x22/apps/
 share/icons/oxygen/22x22/apps/rawconverter.png
+share/icons/oxygen/32x32/
+share/icons/oxygen/32x32/apps/
 share/icons/oxygen/32x32/apps/rawconverter.png
+share/icons/oxygen/48x48/
+share/icons/oxygen/48x48/apps/
 share/icons/oxygen/48x48/apps/rawconverter.png
+share/icons/oxygen/64x64/
+share/icons/oxygen/64x64/apps/
 share/icons/oxygen/64x64/apps/rawconverter.png
 share/icons/oxygen/scalable/
 share/icons/oxygen/scalable/apps/
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/graphics/digikam-kde4/pkg/PLIST-main,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 PLIST-main
--- pkg/PLIST-main      29 Jun 2018 22:16:16 -0000      1.5
+++ pkg/PLIST-main      10 Mar 2019 20:22:58 -0000
@@ -18,7 +18,6 @@ lib/kde4/kio_digikamtags.so
 @lib lib/libdigikamdatabase.so.${LIBdigikamdatabase_VERSION}
 @man man/man1/cleanup_digikamdb.1
 @man man/man1/digitaglinktree.1
-share/appdata/
 share/appdata/digiKam-ImagePlugin_Color.metainfo.xml
 share/appdata/digiKam-ImagePlugin_Decorate.metainfo.xml
 share/appdata/digiKam-ImagePlugin_Enhance.metainfo.xml
@@ -531,8 +530,6 @@ share/apps/showfoto/data/banner-showfoto
 share/apps/showfoto/data/logo-showfoto.png
 share/apps/showfoto/data/splash-showfoto.png
 share/apps/showfoto/showfotoui.rc
-share/apps/solid/
-share/apps/solid/actions/
 share/apps/solid/actions/digikam-opencamera.desktop
 share/config.kcfg/photolayoutseditor.kcfg
 share/doc/HTML/en/digikam/
@@ -973,3 +970,4 @@ share/locale/zh_CN/LC_MESSAGES/digikam.m
 share/locale/zh_TW/LC_MESSAGES/digikam.mo
 @tag update-desktop-database
 @tag gtk-update-icon-cache %D/share/icons/hicolor
+@tag gtk-update-icon-cache %D/share/icons/oxygen

Reply via email to