diff --git a/common/shlibs b/common/shlibs index 227fbf902134ee..b4e6d892dbbbde 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2312,58 +2312,55 @@ libcapstone.so.5 capstone-5.0.1_1 libhavege.so.2 libhaveged-1.9.11_1 libnih.so.1 libnih-1.0.3_1 libnih-dbus.so.1 libnih-1.0.3_1 -libopencv_quality.so.412 libopencv-4.12.0_1 -libopencv_reg.so.412 libopencv-4.12.0_1 -libopencv_surface_matching.so.412 libopencv-4.12.0_1 -libopencv_xphoto.so.412 libopencv-4.12.0_1 -libopencv_freetype.so.412 libopencv-4.12.0_1 -libopencv_fuzzy.so.412 libopencv-4.12.0_1 -libopencv_hfs.so.412 libopencv-4.12.0_1 -libopencv_img_hash.so.412 libopencv-4.12.0_1 -libopencv_line_descriptor.so.412 libopencv-4.12.0_1 -libopencv_saliency.so.412 libopencv-4.12.0_1 -libopencv_structured_light.so.412 libopencv-4.12.0_1 -libopencv_aruco.so.412 libopencv-4.12.0_1 -libopencv_bgsegm.so.412 libopencv-4.12.0_1 -libopencv_bioinspired.so.412 libopencv-4.12.0_1 -libopencv_ccalib.so.412 libopencv-4.12.0_1 -libopencv_face.so.412 libopencv-4.12.0_1 -libopencv_tracking.so.412 libopencv-4.12.0_1 -libopencv_xfeatures2d.so.412 libopencv-4.12.0_1 -libopencv_optflow.so.412 libopencv-4.12.0_1 -libopencv_ximgproc.so.412 libopencv-4.12.0_1 -libopencv_plot.so.412 libopencv-4.12.0_1 -libopencv_text.so.412 libopencv-4.12.0_1 -libopencv_ml.so.412 libopencv-4.12.0_1 -libopencv_objdetect.so.412 libopencv-4.12.0_1 -libopencv_dnn.so.412 libopencv-4.12.0_1 -libopencv_shape.so.412 libopencv-4.12.0_1 -libopencv_stitching.so.412 libopencv-4.12.0_1 -libopencv_photo.so.412 libopencv-4.12.0_1 -libopencv_video.so.412 libopencv-4.12.0_1 -libopencv_calib3d.so.412 libopencv-4.12.0_1 -libopencv_features2d.so.412 libopencv-4.12.0_1 -libopencv_flann.so.412 libopencv-4.12.0_1 -libopencv_highgui.so.412 libopencv-4.12.0_1 -libopencv_videoio.so.412 libopencv-4.12.0_1 -libopencv_imgcodecs.so.412 libopencv-4.12.0_1 -libopencv_imgproc.so.412 libopencv-4.12.0_1 -libopencv_core.so.412 libopencv-4.12.0_1 -libopencv_superres.so.412 libopencv-4.12.0_1 -libopencv_videostab.so.412 libopencv-4.12.0_1 -libopencv_gapi.so.412 libopencv-4.12.0_1 -libopencv_xobjdetect.so.412 libopencv-4.12.0_1 -libopencv_datasets.so.412 libopencv-4.12.0_1 -libopencv_dnn_objdetect.so.412 libopencv-4.12.0_1 -libopencv_dnn_superres.so.412 libopencv-4.12.0_1 -libopencv_dpm.so.412 libopencv-4.12.0_1 -libopencv_phase_unwrapping.so.412 libopencv-4.12.0_1 -libopencv_stereo.so.412 libopencv-4.12.0_1 -libopencv_rapid.so.412 libopencv-4.12.0_1 -libopencv_intensity_transform.so.412 libopencv-4.12.0_1 -libopencv_alphamat.so.412 libopencv-4.12.0_1 -libopencv_barcode.so.412 libopencv-4.12.0_1 -libopencv_mcc.so.412 libopencv-4.12.0_1 +libopencv_alphamat.so.500 libopencv-5.0.0_1 +libopencv_bgsegm.so.500 libopencv-5.0.0_1 +libopencv_bioinspired.so.500 libopencv-5.0.0_1 +libopencv_calib.so.500 libopencv-5.0.0_1 +libopencv_ccalib.so.500 libopencv-5.0.0_1 +libopencv_core.so.500 libopencv-5.0.0_1 +libopencv_dnn.so.500 libopencv-5.0.0_1 +libopencv_dnn_superres.so.500 libopencv-5.0.0_1 +libopencv_face.so.500 libopencv-5.0.0_1 +libopencv_features.so.500 libopencv-5.0.0_1 +libopencv_flann.so.500 libopencv-5.0.0_1 +libopencv_freetype.so.500 libopencv-5.0.0_1 +libopencv_fuzzy.so.500 libopencv-5.0.0_1 +libopencv_geometry.so.500 libopencv-5.0.0_1 +libopencv_hdf.so.500 libopencv-5.0.0_1 +libopencv_hfs.so.500 libopencv-5.0.0_1 +libopencv_highgui.so.500 libopencv-5.0.0_1 +libopencv_img_hash.so.500 libopencv-5.0.0_1 +libopencv_imgcodecs.so.500 libopencv-5.0.0_1 +libopencv_imgproc.so.500 libopencv-5.0.0_1 +libopencv_intensity_transform.so.500 libopencv-5.0.0_1 +libopencv_line_descriptor.so.500 libopencv-5.0.0_1 +libopencv_ml.so.500 libopencv-5.0.0_1 +libopencv_objdetect.so.500 libopencv-5.0.0_1 +libopencv_optflow.so.500 libopencv-5.0.0_1 +libopencv_phase_unwrapping.so.500 libopencv-5.0.0_1 +libopencv_photo.so.500 libopencv-5.0.0_1 +libopencv_plot.so.500 libopencv-5.0.0_1 +libopencv_ptcloud.so.500 libopencv-5.0.0_1 +libopencv_quality.so.500 libopencv-5.0.0_1 +libopencv_rapid.so.500 libopencv-5.0.0_1 +libopencv_reg.so.500 libopencv-5.0.0_1 +libopencv_saliency.so.500 libopencv-5.0.0_1 +libopencv_shape.so.500 libopencv-5.0.0_1 +libopencv_signal.so.500 libopencv-5.0.0_1 +libopencv_stereo.so.500 libopencv-5.0.0_1 +libopencv_stitching.so.500 libopencv-5.0.0_1 +libopencv_structured_light.so.500 libopencv-5.0.0_1 +libopencv_surface_matching.so.500 libopencv-5.0.0_1 +libopencv_text.so.500 libopencv-5.0.0_1 +libopencv_tracking.so.500 libopencv-5.0.0_1 +libopencv_video.so.500 libopencv-5.0.0_1 +libopencv_videoio.so.500 libopencv-5.0.0_1 +libopencv_viz.so.500 libopencv-5.0.0_1 +libopencv_xfeatures2d.so.500 libopencv-5.0.0_1 +libopencv_ximgproc.so.500 libopencv-5.0.0_1 +libopencv_xobjdetect.so.500 libopencv-5.0.0_1 +libopencv_xphoto.so.500 libopencv-5.0.0_1 +libopencv_xstereo.so.500 libopencv-5.0.0_1 libuniconf.so.4.6 wvstreams-4.6.1_20 libwvbase.so.4.6 wvstreams-4.6.1_20 libwvutils.so.4.6 wvstreams-4.6.1_20 diff --git a/srcpkgs/actiona/template b/srcpkgs/actiona/template index 4572fd3963574c..06e472857e320d 100644 --- a/srcpkgs/actiona/template +++ b/srcpkgs/actiona/template @@ -1,7 +1,7 @@ # Template file for 'actiona' pkgname=actiona version=3.11.1 -revision=4 +revision=5 build_style=cmake configure_args="-DACT_UPDATER=OFF" hostmakedepends="pkg-config qt6-base qt6-tools" diff --git a/srcpkgs/digikam/patches/opencv5.patch b/srcpkgs/digikam/patches/opencv5.patch new file mode 100644 index 00000000000000..94367712a02ac0 --- /dev/null +++ b/srcpkgs/digikam/patches/opencv5.patch @@ -0,0 +1,401 @@ +# https://gitlab.archlinux.org/archlinux/packaging/packages/digikam/-/blob/main/opencv-5.patch?ref_type=heads +diff --git a/core/app/utils/digikam_opencv.h.cmake.in b/core/app/utils/digikam_opencv.h.cmake.in +index 0d3246ae07..a3d00db297 100644 +--- a/core/app/utils/digikam_opencv.h.cmake.in ++++ b/core/app/utils/digikam_opencv.h.cmake.in +@@ -55,8 +55,6 @@ + #include + #include + #include +-#include +-#include + #include + + // Image codecs module headers +@@ -70,7 +68,7 @@ + // Image processing module headers + + #include +-#include ++#include + + // Shape detection/recognition module headers + +diff --git a/core/libs/dimg/filters/nr/nrestimate.cpp b/core/libs/dimg/filters/nr/nrestimate.cpp +index 763662fb13..8c26fda714 100644 +--- a/core/libs/dimg/filters/nr/nrestimate.cpp ++++ b/core/libs/dimg/filters/nr/nrestimate.cpp +@@ -115,7 +115,7 @@ void NREstimate::startAnalyse() + readImage(); + postProgress(5); + +- //--convert fimg to CvMat*------------------------------------------------------------------------------- ++ //--convert fimg to Cv::Mat*------------------------------------------------------------------------------- + + // convert the image into YCrCb color model + +@@ -123,15 +123,15 @@ void NREstimate::startAnalyse() + + // One dimensional CvMat which stores the image + +- CvMat* points = cvCreateMat(m_orgImage.numPixels(), 3, CV_32FC1); ++ cv::Mat points = cv::Mat(m_orgImage.numPixels(), 3, CV_32FC1); + + // matrix to store the index of the clusters + +- CvMat* clusters = cvCreateMat(m_orgImage.numPixels(), 1, CV_32SC1); ++ cv::Mat clusters = cv::Mat(m_orgImage.numPixels(), 1, CV_32SC1); + + // pointer variable to handle the CvMat* points (the image in CvMat format) + +- float* pointsPtr = reinterpret_cast(points->data.ptr); ++ float* pointsPtr = reinterpret_cast(points.data); + + for (uint x = 0 ; runningFlag() && (x < m_orgImage.numPixels()) ; ++x) + { +@@ -141,19 +141,15 @@ void NREstimate::startAnalyse() + } + } + +- // Array to store the centers of the clusters +- +- CvArr* centers = nullptr; +- + qCDebug(DIGIKAM_DIMG_LOG) << "Everything ready for the cvKmeans2 or as it seems to"; + postProgress(10); + + //-- KMEANS --------------------------------------------------------------------------------------------- + +- cvKMeans2(points, d->clusterCount, clusters, +- cvTermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 10, 1.0), 3, nullptr, 0, centers, nullptr); ++ cv::kmeans(points, d->clusterCount, clusters, ++ cv::TermCriteria(cv::TermCriteria::EPS + cv::TermCriteria::MAX_ITER, 10, 1.0), 3, cv::KMEANS_PP_CENTERS); + +- qCDebug(DIGIKAM_DIMG_LOG) << "cvKmeans2 successfully run"; ++ qCDebug(DIGIKAM_DIMG_LOG) << "cv::kmeans successfully run"; + postProgress(15); + + //-- Divide into cluster->columns, sample->rows, in matrix standard deviation --------------------------- +@@ -174,7 +170,7 @@ void NREstimate::startAnalyse() + + for (uint i = 0 ; runningFlag() && (i < m_orgImage.numPixels()) ; ++i) + { +- columnIndex = clusters->data.i[i]; ++ columnIndex = clusters.at(i); + rowPosition[columnIndex]++; + } + +@@ -210,7 +206,7 @@ void NREstimate::startAnalyse() + + //-- Divide and conquer --------------------------------------------------------------------------------- + +- CvMat* sd = cvCreateMat(max, (d->clusterCount * points->cols), CV_32FC1); ++ cv::Mat sd = cv::Mat(max, (d->clusterCount * points.cols), CV_32FC1); + + postProgress(30); + +@@ -230,26 +226,26 @@ void NREstimate::startAnalyse() + + for (uint i = 0 ; runningFlag() && (i < m_orgImage.numPixels()) ; ++i) + { +- columnIndex = clusters->data.i[i]; ++ columnIndex = clusters.at(i); + rowIndex = rPosition[columnIndex]; + + // moving to the right row + +- ptr = reinterpret_cast(sd->data.ptr + rowIndex*(sd->step)); ++ ptr = reinterpret_cast(sd.data + rowIndex*(sd.step)); + + // moving to the right column + + for (int j = 0 ; runningFlag() && (j < columnIndex) ; ++j) + { +- for (int z = 0 ; runningFlag() && (z < (points->cols)) ; ++z) ++ for (int z = 0 ; runningFlag() && (z < (points.cols)) ; ++z) + { + ptr++; + } + } + +- for (int z = 0 ; runningFlag() && (z < (points->cols)) ; ++z) ++ for (int z = 0 ; runningFlag() && (z < (points.cols)) ; ++z) + { +- *ptr++ = cvGet2D(points, i, z).val[0]; ++ *ptr++ = points.at(i, z); + } + + rPosition[columnIndex] = rPosition[columnIndex] + 1; +@@ -260,33 +256,32 @@ void NREstimate::startAnalyse() + + //-- This part of the code would involve the sd matrix and make the mean and the std of the data ------------------- + +- CvScalar std; +- CvScalar mean; ++ cv::Scalar std; ++ cv::Scalar mean; + int totalcount = 0; // Number of non-empty clusters +- CvMat* meanStore = cvCreateMat(d->clusterCount, points->cols, CV_32FC1); +- CvMat* stdStore = cvCreateMat(d->clusterCount, points->cols, CV_32FC1); +- float* meanStorePtr = reinterpret_cast(meanStore->data.ptr); +- float* stdStorePtr = reinterpret_cast(stdStore->data.ptr); ++ cv::Mat meanStore = cv::Mat(d->clusterCount, points.cols, CV_32FC1); ++ cv::Mat stdStore = cv::Mat(d->clusterCount, points.cols, CV_32FC1); ++ float* meanStorePtr = reinterpret_cast(meanStore.data); ++ float* stdStorePtr = reinterpret_cast(stdStore.data); + +- for (int i = 0 ; runningFlag() && (i < sd->cols) ; ++i) ++ for (int i = 0 ; runningFlag() && (i < sd.cols) ; ++i) + { + // cppcheck-suppress knownConditionTrueFalse +- if (runningFlag() && (rowPosition[(i/points->cols)] >= 1)) ++ if (runningFlag() && (rowPosition[(i/points.cols)] >= 1)) + { +- CvMat* workingArr = cvCreateMat(rowPosition[(i / points->cols)], 1, CV_32FC1); +- ptr = reinterpret_cast(workingArr->data.ptr); ++ cv::Mat workingArr = cv::Mat(rowPosition[(i / points.cols)], 1, CV_32FC1); ++ ptr = reinterpret_cast(workingArr.data); + + // cppcheck-suppress knownConditionTrueFalse +- for (int j = 0 ; runningFlag() && (j < rowPosition[(i / (points->cols))]) ; ++j) ++ for (int j = 0 ; runningFlag() && (j < rowPosition[(i / (points.cols))]) ; ++j) + { +- *ptr++ = cvGet2D(sd, j, i).val[0]; ++ *ptr++ = sd.at(j, i); + } + +- cvAvgSdv(workingArr, &mean, &std); ++ cv::meanStdDev(workingArr, mean, std); + *meanStorePtr++ = (float)mean.val[0]; + *stdStorePtr++ = (float)std.val[0]; + totalcount++; +- cvReleaseMat(&workingArr); + } + } + +@@ -295,8 +290,8 @@ void NREstimate::startAnalyse() + + // ----------------------------------------------------------------------------------------------------------------- + +- meanStorePtr = reinterpret_cast(meanStore->data.ptr); +- stdStorePtr = reinterpret_cast(stdStore->data.ptr); ++ meanStorePtr = reinterpret_cast(meanStore.data); ++ stdStorePtr = reinterpret_cast(stdStore.data); + + if (runningFlag() && !d->path.isEmpty()) + { +@@ -367,10 +362,10 @@ void NREstimate::startAnalyse() + float weightedStd = 0.0f; + float datasd[3] = {0.0f, 0.0f, 0.0f}; + +- for (int j = 0 ; runningFlag() && (j < points->cols) ; ++j) ++ for (int j = 0 ; runningFlag() && (j < points.cols) ; ++j) + { +- meanStorePtr = reinterpret_cast(meanStore->data.ptr); +- stdStorePtr = reinterpret_cast(stdStore->data.ptr); ++ meanStorePtr = reinterpret_cast(meanStore.data); ++ stdStorePtr = reinterpret_cast(stdStore.data); + + for (int moveToChannel = 0 ; moveToChannel <= j ; ++moveToChannel) + { +@@ -384,8 +379,8 @@ void NREstimate::startAnalyse() + { + weightedMean += (*meanStorePtr) * rowPosition[i]; + weightedStd += (*stdStorePtr) * rowPosition[i]; +- meanStorePtr += points->cols; +- stdStorePtr += points->cols; ++ meanStorePtr += points.cols; ++ stdStorePtr += points.cols; + } + } + +@@ -431,7 +426,7 @@ void NREstimate::startAnalyse() + + if (m_orgImage.sixteenBit()) + { +- for (int i = 0 ; i < points->cols ; ++i) ++ for (int i = 0 ; i < points.cols ; ++i) + { + if (i < 3) + { +@@ -514,12 +509,6 @@ void NREstimate::startAnalyse() + + //-- releasing matrices and closing files ---------------------------------------------------------------------- + +- cvReleaseMat(&sd); +- cvReleaseMat(&stdStore); +- cvReleaseMat(&meanStore); +- cvReleaseMat(&points); +- cvReleaseMat(&clusters); +- + for (uint i = 0 ; i < 3 ; ++i) + { + delete [] d->fimg[i]; +diff --git a/core/libs/dnnmodelmanager/dnnmodelbase.cpp b/core/libs/dnnmodelmanager/dnnmodelbase.cpp +index d9080c3a68..785e7e79d8 100644 +--- a/core/libs/dnnmodelmanager/dnnmodelbase.cpp ++++ b/core/libs/dnnmodelmanager/dnnmodelbase.cpp +@@ -113,7 +113,9 @@ const QPair DNNModelBase::getBackendAndTarget() const + const std::map str2backend + { + { "default", cv::dnn::DNN_BACKEND_DEFAULT }, ++#if OPENCV_TEST_VERSION(5,0,0) + { "halide", cv::dnn::DNN_BACKEND_HALIDE }, ++#endif + { "ie", cv::dnn::DNN_BACKEND_INFERENCE_ENGINE }, + { "opencv", cv::dnn::DNN_BACKEND_OPENCV }, + { "cuda", cv::dnn::DNN_BACKEND_CUDA } +diff --git a/core/libs/facesengine/recognition/faceclassifier.cpp b/core/libs/facesengine/recognition/faceclassifier.cpp +index 83ef00b032..4f04a4c9bc 100644 +--- a/core/libs/facesengine/recognition/faceclassifier.cpp ++++ b/core/libs/facesengine/recognition/faceclassifier.cpp +@@ -215,7 +215,7 @@ cv::Ptr FaceClassifier::createSVM(int iterations) const + cvClassifier->setKernel(d->svm_kernel); + cvClassifier->setGamma(d->svm_gamma); + cvClassifier->setC(d->svm_C); +- cvClassifier->setTermCriteria(cvTermCriteria( ++ cvClassifier->setTermCriteria(cv::TermCriteria( + cv::TermCriteria::Type::MAX_ITER + cv::TermCriteria::Type::EPS, + iterations, + d->svm_epsilon +diff --git a/core/libs/qtopencvimg/qtopencvimg.cpp b/core/libs/qtopencvimg/qtopencvimg.cpp +index 8ebeb011d3..68d392ab1c 100644 +--- a/core/libs/qtopencvimg/qtopencvimg.cpp ++++ b/core/libs/qtopencvimg/qtopencvimg.cpp +@@ -97,7 +97,7 @@ cv::Mat QtOpenCVImg::adjustChannelsOrder(const cv::Mat& srcMat, MatColorOrder sr + { + // BGRA <==> RBGA + +- cv::cvtColor(srcMat, desMat, CV_BGRA2RGBA); ++ cv::cvtColor(srcMat, desMat, cv::ColorConversionCodes::COLOR_BGRA2RGBA); + } + } + catch (cv::Exception& e) +@@ -279,11 +279,11 @@ cv::Mat QtOpenCVImg::image2Mat(const DImg& img, int requiredMatType, MatColorOrd + { + if (MCO_RGB == requiredOrder) + { +- cv::cvtColor(mat0, mat0, CV_RGBA2GRAY); ++ cv::cvtColor(mat0, mat0, cv::ColorConversionCodes::COLOR_RGBA2GRAY); + } + else if (MCO_BGR == requiredOrder) + { +- cv::cvtColor(mat0, mat0, CV_BGRA2GRAY); ++ cv::cvtColor(mat0, mat0, cv::ColorConversionCodes::COLOR_BGRA2GRAY); + } + + break; +@@ -292,11 +292,11 @@ cv::Mat QtOpenCVImg::image2Mat(const DImg& img, int requiredMatType, MatColorOrd + { + if (MCO_RGB == requiredOrder) + { +- cv::cvtColor(mat0, mat0, CV_RGBA2RGB); ++ cv::cvtColor(mat0, mat0, cv::ColorConversionCodes::COLOR_RGBA2RGB); + } + else if (MCO_BGR == requiredOrder) + { +- cv::cvtColor(mat0, mat0, CV_BGRA2BGR); ++ cv::cvtColor(mat0, mat0, cv::ColorConversionCodes::COLOR_BGRA2BGR); + } + + break; +@@ -364,21 +364,21 @@ cv::Mat QtOpenCVImg::image2Mat(const QImage& img, int requiredMatType, MatColorO + { + if (mat0.channels() == 3) + { +- cv::cvtColor(mat0, mat_adjustCn, CV_RGB2GRAY); ++ cv::cvtColor(mat0, mat_adjustCn, cv::ColorConversionCodes::COLOR_RGB2GRAY); + } + else if (mat0.channels() == 4) + { + if (srcOrder == MCO_BGRA) + { +- cv::cvtColor(mat0, mat_adjustCn, CV_BGRA2GRAY); ++ cv::cvtColor(mat0, mat_adjustCn, cv::ColorConversionCodes::COLOR_BGRA2GRAY); + } + else if (srcOrder == MCO_RGBA) + { +- cv::cvtColor(mat0, mat_adjustCn, CV_RGBA2GRAY); ++ cv::cvtColor(mat0, mat_adjustCn, cv::ColorConversionCodes::COLOR_RGBA2GRAY); + } + else // MCO_ARGB + { +- cv::cvtColor(argb2bgra(mat0), mat_adjustCn, CV_BGRA2GRAY); ++ cv::cvtColor(argb2bgra(mat0), mat_adjustCn, cv::ColorConversionCodes::COLOR_BGRA2GRAY); + } + } + +@@ -389,13 +389,13 @@ cv::Mat QtOpenCVImg::image2Mat(const QImage& img, int requiredMatType, MatColorO + { + if (mat0.channels() == 1) + { +- cv::cvtColor(mat0, mat_adjustCn, ((requriedOrder == MCO_BGR) ? CV_GRAY2BGR : CV_GRAY2RGB)); ++ cv::cvtColor(mat0, mat_adjustCn, ((requriedOrder == MCO_BGR) ? cv::ColorConversionCodes::COLOR_GRAY2BGR : cv::ColorConversionCodes::COLOR_GRAY2RGB)); + } + else if (mat0.channels() == 3) + { + if (requriedOrder != srcOrder) + { +- cv::cvtColor(mat0, mat_adjustCn, CV_RGB2BGR); ++ cv::cvtColor(mat0, mat_adjustCn, cv::ColorConversionCodes::COLOR_RGB2BGR); + } + } + +@@ -410,11 +410,11 @@ cv::Mat QtOpenCVImg::image2Mat(const QImage& img, int requiredMatType, MatColorO + } + else if (srcOrder == MCO_BGRA) + { +- cv::cvtColor(mat0, mat_adjustCn, ((requriedOrder == MCO_BGR) ? CV_BGRA2BGR : CV_BGRA2RGB)); ++ cv::cvtColor(mat0, mat_adjustCn, ((requriedOrder == MCO_BGR) ? cv::ColorConversionCodes::COLOR_BGRA2BGR : cv::ColorConversionCodes::COLOR_BGRA2RGB)); + } + else // RGBA + { +- cv::cvtColor(mat0, mat_adjustCn, ((requriedOrder == MCO_BGR) ? CV_RGBA2BGR : CV_RGBA2RGB)); ++ cv::cvtColor(mat0, mat_adjustCn, ((requriedOrder == MCO_BGR) ? cv::ColorConversionCodes::COLOR_RGBA2BGR : cv::ColorConversionCodes::COLOR_RGBA2RGB)); + } + } + +@@ -435,11 +435,11 @@ cv::Mat QtOpenCVImg::image2Mat(const QImage& img, int requiredMatType, MatColorO + } + else if (requriedOrder == MCO_RGBA) + { +- cv::cvtColor(mat0, mat_adjustCn, CV_GRAY2RGBA); ++ cv::cvtColor(mat0, mat_adjustCn, cv::ColorConversionCodes::COLOR_GRAY2RGBA); + } + else // MCO_BGRA + { +- cv::cvtColor(mat0, mat_adjustCn, CV_GRAY2BGRA); ++ cv::cvtColor(mat0, mat_adjustCn, cv::ColorConversionCodes::COLOR_GRAY2BGRA); + } + } + else if (mat0.channels() == 3) +@@ -454,11 +454,11 @@ cv::Mat QtOpenCVImg::image2Mat(const QImage& img, int requiredMatType, MatColorO + } + else if (requriedOrder == MCO_RGBA) + { +- cv::cvtColor(mat0, mat_adjustCn, CV_RGB2RGBA); ++ cv::cvtColor(mat0, mat_adjustCn, cv::ColorConversionCodes::COLOR_RGB2RGBA); + } + else // MCO_BGRA + { +- cv::cvtColor(mat0, mat_adjustCn, CV_RGB2BGRA); ++ cv::cvtColor(mat0, mat_adjustCn, cv::ColorConversionCodes::COLOR_RGB2BGRA); + } + } + else if (mat0.channels() == 4) +@@ -560,14 +560,14 @@ QImage QtOpenCVImg::mat2Image(const cv::Mat& mat, MatColorOrder order, QImage::F + + if (order == MCO_BGR) + { +- cv::cvtColor(mat, mat_adjustCn, CV_BGR2RGB); ++ cv::cvtColor(mat, mat_adjustCn, cv::ColorConversionCodes::COLOR_BGR2RGB); + } + + #else + + format = QImage::Format_RGB32; + cv::Mat mat_tmp; +- cv::cvtColor(mat, mat_tmp, ((order == MCO_BGR) ? CV_BGR2BGRA : CV_RGB2BGRA)); ++ cv::cvtColor(mat, mat_tmp, ((order == MCO_BGR) ? cv::ColorConversionCodes::COLOR_BGR2BGRA : cv::ColorConversionCodes::COLOR_RGB2BGRA)); + + # if Q_BYTE_ORDER == Q_LITTLE_ENDIAN diff --git a/srcpkgs/digikam/template b/srcpkgs/digikam/template index c51d448efe6e5f..767cef5f904079 100644 --- a/srcpkgs/digikam/template +++ b/srcpkgs/digikam/template @@ -1,7 +1,7 @@ # Template file for 'digikam' pkgname=digikam version=9.1.0 -revision=3 +revision=4 build_style=cmake configure_args="-DBUILD_TESTING=OFF -DENABLE_AKONADICONTACTSUPPORT=ON -DENABLE_KFILEMETADATASUPPORT=ON diff --git a/srcpkgs/gmic/patches/03-plugindir-and-no-wget.patch b/srcpkgs/gmic/patches/03-plugindir-and-no-wget.patch index 5476a40dee85ec..37ee9d7a7c638b 100644 --- a/srcpkgs/gmic/patches/03-plugindir-and-no-wget.patch +++ b/srcpkgs/gmic/patches/03-plugindir-and-no-wget.patch @@ -1,11 +1,58 @@ --- a/src/Makefile +++ b/src/Makefile -@@ -86,7 +86,7 @@ - INCLUDE ?= include +@@ -87,10 +87,7 @@ + INSTALL ?= install PIC = -fPIC EXE = --WGET = wget --no-check-certificate --quiet -O +-WGET ?= $(shell \ +- if command -v wget >/dev/null 2>&1; then echo "wget --no-check-certificate --quiet -O"; \ +- elif command -v curl >/dev/null 2>&1; then echo "curl -k -L --silent -o"; \ +- else echo "echo 'Error: neither wget nor curl found' && false"; fi) +WGET = false - GIMPTOOL = $(shell command -v gimptool-3.0 >/dev/null 2>&1 && echo gimptool-3.0 || echo gimptool-2.0) - PLUGIN = $(shell $(GIMPTOOL) --gimpplugindir)/plug-ins - SHARE = $(PREFIX)/share + GIMPTOOL = $(shell \ + if command -v gimptool-3.2 >/dev/null 2>&1; then echo gimptool-3.2; \ + elif command -v gimptool-3.0 >/dev/null 2>&1; then echo gimptool-3.0; \ +@@ -137,7 +134,7 @@ + else + PREFIX ?= /opt/local + endif +-WGET = curl -k -L --silent -o ++WGET = false + endif + + ifeq ($(BUILD_OS),Windows) +@@ -160,10 +157,7 @@ + STRIP = strip + endif + +-QMAKE ?= $(shell \ +- if command -v qmake6 >/dev/null 2>&1; then echo qmake6; \ +- elif command -v qmake-qt5 >/dev/null 2>&1; then echo qmake-qt5; \ +- else echo qmake; fi) ++QMAKE = /usr/lib/qt6/bin/qmake + + #--------------------------------------------------------- + # Define compilation flags to use for each enabled feature +@@ -324,7 +318,7 @@ + + # Enable native support of webcams and video streaming, using the OpenCV library. + # (https://opencv.org/) +-OPENCV_CFLAGS = -Dcimg_use_opencv $(shell pkg-config opencv --cflags 2>/dev/null) -I/usr/include/opencv -I/usr/include/opencv4 ++OPENCV_CFLAGS = -Dcimg_use_opencv $(shell pkg-config opencv --cflags 2>/dev/null) -I/usr/include/opencv -I/usr/include/opencv5 + OPENCV_LIBS = $(shell pkg-config opencv --libs 2>/dev/null || echo -lopencv_core -lopencv_highgui -lopencv_videoio) + + # Enable support of most classical image file formats, using the GraphicsMagick++ library. +@@ -685,11 +679,11 @@ + # G'MIC-Qt (shared) + #------------------- + gimp_shared: gmic_qt_files CImg.h gmic_stdlib_community.h +- cd ../gmic-qt && $(QMAKE) CONFIG+=release $(QMAKE_BASE) GMIC_DYNAMIC_LINKING=on HOST=gimp gmic_qt.pro && $(MAKE) ++ cd .. && cmake -G Ninja -DBUILD_WITH_QT6=ON -DENABLE_SYSTEM_GMIC=OFF -DENABLE_DYNAMIC_LINKING=ON -DENABLE_OPENCV=ON -DGMIC_PATH=${SRC_PATH} -DGMIC_LIB_PATH=${SRC_PATH} -DGMIC_QT_HOST=gimp3 -DPRERELASE=$(PRERELASE) -B build -S gmic-qt && cd build && ninja + @echo "Executable 'gmic_gimp_qt' has been successfully compiled in '../gmic-qt/'." + + gmic_qt_shared: gmic_qt_files CImg.h gmic_stdlib_community.h +- cd ../gmic-qt && $(QMAKE) CONFIG+=release $(QMAKE_BASE) GMIC_DYNAMIC_LINKING=on HOST=none gmic_qt.pro && $(MAKE) ++ cd .. && cmake -G Ninja -DBUILD_WITH_QT6=ON -DENABLE_SYSTEM_GMIC=OFF -DENABLE_DYNAMIC_LINKING=ON -DENABLE_OPENCV=ON -DGMIC_PATH=${SRC_PATH} -DGMIC_LIB_PATH=${SRC_PATH} -DGMIC_QT_HOST=none -DPRERELASE=$(PRERELASE) -B build -S gmic-qt && cd build && ninja + @echo "Executable 'gmic_qt' has been successfully compiled in '../gmic-qt/'." + + # ZArt diff --git a/srcpkgs/gmic/patches/gmic-qt-cmake.patch b/srcpkgs/gmic/patches/gmic-qt-cmake.patch new file mode 100644 index 00000000000000..d6127a78563fba --- /dev/null +++ b/srcpkgs/gmic/patches/gmic-qt-cmake.patch @@ -0,0 +1,11 @@ +--- a/gmic-qt/CMakeLists.txt ++++ b/gmic-qt/CMakeLists.txt +@@ -608,7 +608,7 @@ + if (TARGET libgmicstatic OR MSVC OR NOT ENABLE_SYSTEM_GMIC) + set(gmic_qt_LIBRARIES + ${gmic_qt_LIBRARIES} +- libgmicstatic ++ gmic + ) + elseif(TARGET libgmic) + set(gmic_qt_LIBRARIES diff --git a/srcpkgs/gmic/patches/opencv5.patch b/srcpkgs/gmic/patches/opencv5.patch new file mode 100644 index 00000000000000..3c1c97cfbc6005 --- /dev/null +++ b/srcpkgs/gmic/patches/opencv5.patch @@ -0,0 +1,11 @@ +--- a/cmake/FindOpenCV.cmake ++++ b/cmake/FindOpenCV.cmake +@@ -1,7 +1,7 @@ + # The CMake modules shipped with OpenCV do not contain targets. + find_package(PkgConfig) + +-pkg_check_modules(OPENCV opencv4) ++pkg_check_modules(OPENCV opencv5) + + if(NOT OPENCV_FOUND) + pkg_check_modules(OPENCV opencv) diff --git a/srcpkgs/gmic/template b/srcpkgs/gmic/template index 49476d8cf8f325..8f033e4f0acba5 100644 --- a/srcpkgs/gmic/template +++ b/srcpkgs/gmic/template @@ -1,34 +1,40 @@ # Template file for 'gmic' pkgname=gmic -version=3.5.3 -revision=2 +version=4.0.5 +revision=1 _zart_hash=d014169343f835381ad232ee11e077326561c9eb -build_wrksrc="src" build_style=gnu-makefile build_helper=qmake -make_build_args="NOSTRIP=yes lib libc cli gmic_qt gimp_shared zart" -make_use_env=yes -hostmakedepends="pkg-config gimp qt5-host-tools qt5-qmake" +make_build_args="NOSTRIP=yes lib libc cli_shared gmic_qt_shared gimp_shared zart_shared" +hostmakedepends="pkg-config gimp qt6-base qt6-tools qt5-host-tools qt5-qmake cmake ninja eigen" makedepends="fftw-devel imath-devel libopenexr-devel MesaLib-devel libopencv-devel libgomp-devel lcms2-devel libpng-devel libjpeg-turbo-devel tiff-devel libcurl-devel - gimp-devel qt5-devel libwebp-devel" + gimp-devel qt5-devel qt6-base-devel libwebp-devel libgraphicsmagick-devel babl-devel" short_desc="GREYC's Magic for Image Computing (image processing framework)" maintainer="Orphaned " license="CECILL-2.1, CECILL-C" homepage="https://gmic.eu/" distfiles="https://gmic.eu/files/source/gmic_${version}.tar.gz https://github.com/c-koi/zart/archive/${_zart_hash}.tar.gz>zart-${_zart_hash}.tar.gz" -checksum="e91a7cac4d0dc7c0ca2620f03bb14af82aa738c85a11b4f82fcc738654606442 +checksum="c6771c48693ed615b2e85d1db7a9626358d4606eb2c75dcf009b2924f396da59 baebe339566993194f98a71895bff09520b08f38e66eae215758aaa260557bcf" disable_parallel_build=yes skip_extraction="zart-${_zart_hash}.tar.gz" +# qt5 enforces this, zart uses qt5 +CXXFLAGS+=" -fPIC" +# opencv5 & swap include for X11 'Status' that conflicts with opencv5/opencv2 enum type +# https://github.com/opencv/opencv/issues/7113 +# doesn't seem possible with qt ? since it uses x11 post_extract() { vsrcextract -C zart zart-${_zart_hash}.tar.gz + vsed -e 's|opencv4|opencv5|g' -i zart/zart.pro + vsed -e '/.*ImageConverter.h/d' -e '74#include "ImageConverter.h"' -i zart/src/MainWindow.cpp + vsed -e '79i#undef Status' -e '82#define Status int' -i zart/src/MainWindow.cpp } post_install() { - vlicense ../COPYING + vlicense COPYING if [ "$CROSS_BUILD" -a "$XBPS_TARGET_WORDSIZE" -eq 32 ]; then mv "$DESTDIR/usr/lib64"/* "$DESTDIR/usr/lib" fi diff --git a/srcpkgs/kdenlive/template b/srcpkgs/kdenlive/template index 357af08f5e665c..00f7e0ed468d97 100644 --- a/srcpkgs/kdenlive/template +++ b/srcpkgs/kdenlive/template @@ -2,7 +2,7 @@ # group=kde-gear pkgname=kdenlive version=26.08.0 -revision=2 +revision=3 build_style=cmake configure_args="-DBUILD_TESTING=OFF -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins diff --git a/srcpkgs/kstars/template b/srcpkgs/kstars/template index 817abad0ec631a..24a0f2684ddfbb 100644 --- a/srcpkgs/kstars/template +++ b/srcpkgs/kstars/template @@ -1,7 +1,7 @@ # Template file for 'kstars' pkgname=kstars version=3.7.9 -revision=1 +revision=2 build_style=cmake configure_args="-DBUILD_WITH_QT6=ON " hostmakedepends="gettext extra-cmake-modules pkg-config diff --git a/srcpkgs/libopencv4 b/srcpkgs/libopencv4 deleted file mode 120000 index f5341cf36786ee..00000000000000 --- a/srcpkgs/libopencv4 +++ /dev/null @@ -1 +0,0 @@ -opencv \ No newline at end of file diff --git a/srcpkgs/libopencv4-devel b/srcpkgs/libopencv4-devel deleted file mode 120000 index f5341cf36786ee..00000000000000 --- a/srcpkgs/libopencv4-devel +++ /dev/null @@ -1 +0,0 @@ -opencv \ No newline at end of file diff --git a/srcpkgs/libopencv4-python3 b/srcpkgs/libopencv4-python3 deleted file mode 120000 index f5341cf36786ee..00000000000000 --- a/srcpkgs/libopencv4-python3 +++ /dev/null @@ -1 +0,0 @@ -opencv \ No newline at end of file diff --git a/srcpkgs/libopenshot-audio/template b/srcpkgs/libopenshot-audio/template index 45f442eb03aded..62f896b54c8f5e 100644 --- a/srcpkgs/libopenshot-audio/template +++ b/srcpkgs/libopenshot-audio/template @@ -1,6 +1,6 @@ # Template file for 'libopenshot-audio' pkgname=libopenshot-audio -version=0.4.0 +version=1.0.0 revision=1 build_style=cmake hostmakedepends="doxygen" @@ -11,7 +11,7 @@ maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://github.com/OpenShot/libopenshot-audio" distfiles="https://github.com/OpenShot/libopenshot-audio/archive/v${version}.tar.gz" -checksum=1abdedf9c8686c972c42225a283f518ed2ade445c2e454996b6709d8cc8d1704 +checksum=80dc23fff901064194fcc7732d41cc953df6b7ed2742376fcf28df23b5a10a29 libopenshot-audio-devel_package() { short_desc+=" - development files" diff --git a/srcpkgs/libopenshot/patches/ffmpeg9.patch b/srcpkgs/libopenshot/patches/ffmpeg9.patch new file mode 100644 index 00000000000000..488b0ac397b676 --- /dev/null +++ b/srcpkgs/libopenshot/patches/ffmpeg9.patch @@ -0,0 +1,138 @@ +# https://github.com/OpenMandrivaAssociation/libopenshot/blob/43d60d4c0d4c3ef8316d398e9ce605b9db84bbf8/libopenshot-0.7.0-ffmpeg9.patch +--- a/src/FFmpegWriter.cpp 2026-04-03 01:34:37.000000000 +0200 ++++ b/src/FFmpegWriter.cpp 2026-08-13 19:59:55.020084338 +0200 +@@ -1142,19 +1142,30 @@ + #endif + + // Set valid sample rate (or throw error) +- if (codec->supported_samplerates) { +- int i; +- for (i = 0; codec->supported_samplerates[i] != 0; i++) +- if (info.sample_rate == codec->supported_samplerates[i]) { +- // Set the valid sample rate +- c->sample_rate = info.sample_rate; +- break; +- } +- if (codec->supported_samplerates[i] == 0) +- throw InvalidSampleRate("An invalid sample rate was detected for this codec.", path); +- } else +- // Set sample rate +- c->sample_rate = info.sample_rate; ++ // AVCodec.supported_samplerates removed in FFmpeg 9+ ++ { ++ const int *supported_samplerates = NULL; ++ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 13, 100) ++ if (avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_RATE, 0, ++ (const void **)&supported_samplerates, NULL) < 0) ++ supported_samplerates = NULL; ++ #else ++ supported_samplerates = codec->supported_samplerates; ++ #endif ++ if (supported_samplerates) { ++ int i; ++ for (i = 0; supported_samplerates[i] != 0; i++) ++ if (info.sample_rate == supported_samplerates[i]) { ++ // Set the valid sample rate ++ c->sample_rate = info.sample_rate; ++ break; ++ } ++ if (supported_samplerates[i] == 0) ++ throw InvalidSampleRate("An invalid sample rate was detected for this codec.", path); ++ } else ++ // Set sample rate ++ c->sample_rate = info.sample_rate; ++ } + + c->time_base = AVRational{1, c->sample_rate}; + st->time_base = c->time_base; +@@ -1162,21 +1173,32 @@ + uint64_t channel_layout = info.channel_layout; + #if HAVE_CH_LAYOUT + // Set a valid number of channels (or throw error) ++ // AVCodec.ch_layouts removed in FFmpeg 9+ + AVChannelLayout ch_layout; + av_channel_layout_from_mask(&ch_layout, info.channel_layout); +- if (codec->ch_layouts) { +- int i; +- for (i = 0; av_channel_layout_check(&codec->ch_layouts[i]); i++) +- if (av_channel_layout_compare(&ch_layout, &codec->ch_layouts[i])) { +- // Set valid channel layout +- av_channel_layout_copy(&c->ch_layout, &ch_layout); +- break; +- } +- if (!av_channel_layout_check(&codec->ch_layouts[i])) +- throw InvalidChannels("An invalid channel layout was detected (i.e. MONO / STEREO).", path); +- } else +- // Set valid channel layout +- av_channel_layout_copy(&c->ch_layout, &ch_layout); ++ { ++ const AVChannelLayout *ch_layouts = NULL; ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 13, 100) ++ if (avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_CHANNEL_LAYOUT, 0, ++ (const void **)&ch_layouts, NULL) < 0) ++ ch_layouts = NULL; ++#else ++ ch_layouts = codec->ch_layouts; ++#endif ++ if (ch_layouts) { ++ int i; ++ for (i = 0; av_channel_layout_check(&ch_layouts[i]); i++) ++ if (av_channel_layout_compare(&ch_layout, &ch_layouts[i])) { ++ // Set valid channel layout ++ av_channel_layout_copy(&c->ch_layout, &ch_layout); ++ break; ++ } ++ if (!av_channel_layout_check(&ch_layouts[i])) ++ throw InvalidChannels("An invalid channel layout was detected (i.e. MONO / STEREO).", path); ++ } else ++ // Set valid channel layout ++ av_channel_layout_copy(&c->ch_layout, &ch_layout); ++ } + #else + // Set a valid number of channels (or throw error) + if (codec->channel_layouts) { +@@ -1195,11 +1217,22 @@ + #endif + + // Choose a valid sample_fmt +- if (codec->sample_fmts) { +- for (int i = 0; codec->sample_fmts[i] != AV_SAMPLE_FMT_NONE; i++) { +- // Set sample format to 1st valid format (and then exit loop) +- c->sample_fmt = codec->sample_fmts[i]; +- break; ++ // AVCodec.sample_fmts removed in FFmpeg 9+ ++ { ++ const enum AVSampleFormat *sample_fmts = NULL; ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 13, 100) ++ if (avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, ++ (const void **)&sample_fmts, NULL) < 0) ++ sample_fmts = NULL; ++#else ++ sample_fmts = codec->sample_fmts; ++#endif ++ if (sample_fmts) { ++ for (int i = 0; sample_fmts[i] != AV_SAMPLE_FMT_NONE; i++) { ++ // Set sample format to 1st valid format (and then exit loop) ++ c->sample_fmt = sample_fmts[i]; ++ break; ++ } + } + } + if (c->sample_fmt == AV_SAMPLE_FMT_NONE) { +@@ -1401,7 +1434,15 @@ + #endif + + // Find all supported pixel formats for this codec +- const PixelFormat *supported_pixel_formats = codec->pix_fmts; ++ // AVCodec.pix_fmts removed in FFmpeg 9+ ++ const PixelFormat *supported_pixel_formats = NULL; ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 13, 100) ++ if (avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_PIX_FORMAT, 0, ++ (const void **)&supported_pixel_formats, NULL) < 0) ++ supported_pixel_formats = NULL; ++#else ++ supported_pixel_formats = codec->pix_fmts; ++#endif + while (supported_pixel_formats != NULL && *supported_pixel_formats != PIX_FMT_NONE) { + // Assign the 1st valid pixel format (if one is missing) + if (c->pix_fmt == PIX_FMT_NONE) diff --git a/srcpkgs/libopenshot/patches/opencv5.patch b/srcpkgs/libopenshot/patches/opencv5.patch new file mode 100644 index 00000000000000..ecf289f19df32c --- /dev/null +++ b/srcpkgs/libopenshot/patches/opencv5.patch @@ -0,0 +1,218 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -553,7 +553,7 @@ + + ################## OPENCV ################### + if(ENABLE_OPENCV) +- find_package(OpenCV 4) ++ find_package(OpenCV 5) + if(NOT OpenCV_FOUND) + set(ENABLE_OPENCV FALSE CACHE BOOL + "Build with OpenCV algorithms (requires Protobuf 3)" FORCE) + +# https://data.gpo.zugaina.org/bentoo/media-libs/libopenshot/files/libopenshot-1.0.0-opencv5-cxx20.patch +diff -ruN '--exclude=build*' a/src/CVObjectMask.h b/src/CVObjectMask.h +--- a/src/CVObjectMask.h 2026-08-18 03:00:44.000000000 -0300 ++++ b/src/CVObjectMask.h 2026-09-01 11:38:19.259688212 -0300 +@@ -17,6 +17,14 @@ + #include + #include + #include ++#include ++#if CV_VERSION_MAJOR >= 5 ++// OpenCV 5 split calib3d: boundingRect/getRotationMatrix2D moved to ++// geometry/2d.hpp, estimateAffinePartial2D to geometry/3d.hpp, and ++// opencv.hpp no longer pulls them in. ++#include ++#include ++#endif + #undef uint64 + #undef int64 + +diff -ruN '--exclude=build*' a/src/CVStabilization.h b/src/CVStabilization.h +--- a/src/CVStabilization.h 2026-08-18 03:00:44.000000000 -0300 ++++ b/src/CVStabilization.h 2026-09-01 11:38:19.259660250 -0300 +@@ -17,6 +17,14 @@ + #define int64 opencv_broken_int + #define uint64 opencv_broken_uint + #include ++#include ++#if CV_VERSION_MAJOR >= 5 ++// OpenCV 5 split calib3d: boundingRect/getRotationMatrix2D moved to ++// geometry/2d.hpp, estimateAffinePartial2D to geometry/3d.hpp, and ++// opencv.hpp no longer pulls them in. ++#include ++#include ++#endif + #include + #undef uint64 + #undef int64 +diff -ruN '--exclude=build*' a/src/effects/AnalogTape.cpp b/src/effects/AnalogTape.cpp +--- a/src/effects/AnalogTape.cpp 2026-08-18 03:00:44.000000000 -0300 ++++ b/src/effects/AnalogTape.cpp 2026-09-01 11:37:42.135781496 -0300 +@@ -43,7 +43,7 @@ + info.has_audio = false; + } + +-static inline float lerp(float a, float b, float t) { return a + (b - a) * t; } ++static inline float os_lerp(float a, float b, float t) { return a + (b - a) * t; } + + std::shared_ptr AnalogTape::GetFrame(std::shared_ptr frame, + int64_t frame_number) { +@@ -137,7 +137,7 @@ + const float k_stripe = stripe.GetValue(frame_number); + const float k_bands = staticBands.GetValue(frame_number); + +- int r_y = std::round(lerp(0.0f, 2.0f, k_soft) * inverse_scale_x); ++ int r_y = std::round(os_lerp(0.0f, 2.0f, k_soft) * inverse_scale_x); + if (k_noise > 0.6f) + r_y = std::min(r_y, 1); + if (r_y > 0) { +@@ -149,8 +149,8 @@ + Y.swap(tmpY); + } + +- float shift = lerp(0.0f, 2.5f, k_bleed) * inverse_scale_x; +- int r_c = std::round(lerp(0.0f, 3.0f, k_bleed) * inverse_scale_x); ++ float shift = os_lerp(0.0f, 2.5f, k_bleed) * inverse_scale_x; ++ int r_c = std::round(os_lerp(0.0f, 3.0f, k_bleed) * inverse_scale_x); + float sat = 1.0f - 0.30f * k_bleed; + float shift_h = shift * 0.5f; + #ifdef _OPENMP +@@ -195,20 +195,20 @@ + uint32_t SCHED_SEED = SEED ^ fnv1a_32(schedSalt, 0x9e3779b9u); + const float PI = 3.14159265358979323846f; + +- float sigmaY = lerp(0.0f, 0.08f, k_noise); ++ float sigmaY = os_lerp(0.0f, 0.08f, k_noise); + const float decay = 0.88f + 0.08f * k_noise; + const float amp = 0.18f * k_noise; + const float baseP = 0.0025f + 0.02f * k_noise; + +- float Hfixed = lerp(0.0f, 0.12f * h, k_stripe); ++ float Hfixed = os_lerp(0.0f, 0.12f * h, k_stripe); + float Gfixed = 0.10f * k_stripe; + float Nfixed = 1.0f + 1.5f * k_stripe; + + float rate = 0.4f * k_bands; +- int dur_frames = std::round(lerp(1.0f, 6.0f, k_bands)); +- float Hburst = lerp(0.06f * h, 0.25f * h, k_bands); +- float Gburst = lerp(0.10f, 0.25f, k_bands); +- float sat_band = lerp(0.8f, 0.5f, k_bands); ++ int dur_frames = std::round(os_lerp(1.0f, 6.0f, k_bands)); ++ float Hburst = os_lerp(0.06f * h, 0.25f * h, k_bands); ++ float Gburst = os_lerp(0.10f, 0.25f, k_bands); ++ float sat_band = os_lerp(0.8f, 0.5f, k_bands); + float Nburst = 1.0f + 2.0f * k_bands; + + struct Band { float center; double t0; }; +@@ -314,10 +314,10 @@ + } + } + +- float A = lerp(0.0f, 3.0f, k_track) * inverse_scale_x; // pixels +- float f = lerp(0.25f, 1.2f, k_track); // Hz +- float Hsk = lerp(0.0f, 0.10f * h, k_track); // pixels +- float S = lerp(0.0f, 5.0f, k_track) * inverse_scale_x; // pixels ++ float A = os_lerp(0.0f, 3.0f, k_track) * inverse_scale_x; // pixels ++ float f = os_lerp(0.25f, 1.2f, k_track); // Hz ++ float Hsk = os_lerp(0.0f, 0.10f * h, k_track); // pixels ++ float S = os_lerp(0.0f, 5.0f, k_track) * inverse_scale_x; // pixels + float phase = 2 * PI * (f * t) + 0.7f * (SEED * 0.001f); + for (int y = 0; y < h; ++y) { + const float y_ref = static_cast(y) * reference_scale_y; +diff -ruN '--exclude=build*' a/src/effects/DenoiseImage.cpp b/src/effects/DenoiseImage.cpp +--- a/src/effects/DenoiseImage.cpp 2026-08-18 03:00:44.000000000 -0300 ++++ b/src/effects/DenoiseImage.cpp 2026-09-01 11:37:42.138602824 -0300 +@@ -46,7 +46,7 @@ + return t * t * (3.0f - (2.0f * t)); + } + +-static inline float lerp(float a, float b, float amount) { ++static inline float os_lerp(float a, float b, float amount) { + return a + ((b - a) * amount); + } + +@@ -510,10 +510,10 @@ + const float out_chroma_r = out_r - out_y; + const float out_chroma_g = out_g - out_y; + const float out_chroma_b = out_b - out_y; +- out_y = lerp(out_y, prev_y, temporal_luma_mix); +- out_r = out_y + lerp(out_chroma_r, prev_r - prev_y, temporal_chroma_mix); +- out_g = out_y + lerp(out_chroma_g, prev_g - prev_y, temporal_chroma_mix); +- out_b = out_y + lerp(out_chroma_b, prev_b - prev_y, temporal_chroma_mix); ++ out_y = os_lerp(out_y, prev_y, temporal_luma_mix); ++ out_r = out_y + os_lerp(out_chroma_r, prev_r - prev_y, temporal_chroma_mix); ++ out_g = out_y + os_lerp(out_chroma_g, prev_g - prev_y, temporal_chroma_mix); ++ out_b = out_y + os_lerp(out_chroma_b, prev_b - prev_y, temporal_chroma_mix); + } + + uchar* output_pixel = output_pixels + (y * output_stride) + (x * 4); +diff -ruN '--exclude=build*' a/src/effects/FilmGrain.cpp b/src/effects/FilmGrain.cpp +--- a/src/effects/FilmGrain.cpp 2026-08-18 03:00:44.000000000 -0300 ++++ b/src/effects/FilmGrain.cpp 2026-09-01 11:37:42.141134452 -0300 +@@ -46,7 +46,7 @@ + return static_cast(value + 0.5f); + } + +-static float lerp(float a, float b, float t) { ++static float os_lerp(float a, float b, float t) { + return a + ((b - a) * t); + } + +@@ -135,11 +135,11 @@ + const float evolution_value = clamp01(static_cast(evolution.GetValue(frame_number))); + const float coherence_value = clamp01(static_cast(coherence.GetValue(frame_number))); + +- const float cell_size = lerp(1.0f, 9.0f, size_value); ++ const float cell_size = os_lerp(1.0f, 9.0f, size_value); + const float fine_frequency = 1.0f / cell_size; +- const float soft_frequency = fine_frequency * lerp(0.45f, 0.12f, softness_value); +- const float clump_frequency = fine_frequency * lerp(0.35f, 0.08f, clump_value); +- const float temporal_rate = lerp(0.0f, 1.0f, evolution_value) * lerp(1.0f, 8.0f, 1.0f - coherence_value); ++ const float soft_frequency = fine_frequency * os_lerp(0.45f, 0.12f, softness_value); ++ const float clump_frequency = fine_frequency * os_lerp(0.35f, 0.08f, clump_value); ++ const float temporal_rate = os_lerp(0.0f, 1.0f, evolution_value) * os_lerp(1.0f, 8.0f, 1.0f - coherence_value); + const float temporal_position = static_cast(frame_number) * temporal_rate; + const int time0 = static_cast(std::floor(temporal_position)); + const int time1 = time0 + 1; +@@ -227,7 +227,7 @@ + float fine_cache[2][4] = {}; + + // soft_col0/col1[time_idx][salt_idx]: value_noise y-axis columns pre-lerped. +- // Per pixel we only need one lerp across x instead of 4 hash calls + 3 lerps. ++ // Per pixel we only need one os_lerp across x instead of 4 hash calls + 3 lerps. + float soft_col0[2][4] = {}, soft_col1[2][4] = {}; + + // clump_col0/col1[salt_idx]: clump only uses time0 +@@ -269,7 +269,7 @@ + + // Soft noise: bilinear value_noise, but y-axis columns are pre-lerped into + // soft_col0/col1. Only 4 hashes needed when the x-cell changes (~every 7 px), +- // then 1 lerp per pixel instead of 4 hashes + 3 lerps every pixel. ++ // then 1 os_lerp per pixel instead of 4 hashes + 3 lerps every pixel. + float soft_sx = 0.0f; + if (use_softness) { + const float srx = reference_x * soft_frequency; +@@ -338,7 +338,7 @@ + } + if (use_clump) { + const float cluster = clump_col0[s] + (clump_col1[s] - clump_col0[s]) * clump_sx; +- grain *= lerp(1.0f, 0.45f + (std::abs(cluster) * 1.35f), clump_value); ++ grain *= os_lerp(1.0f, 0.45f + (std::abs(cluster) * 1.35f), clump_value); + } + grains[s] = grain; + } +diff -ruN '--exclude=build*' a/src/effects/Stabilizer.cpp b/src/effects/Stabilizer.cpp +--- a/src/effects/Stabilizer.cpp 2026-08-18 03:00:44.000000000 -0300 ++++ b/src/effects/Stabilizer.cpp 2026-09-01 11:38:49.136249250 -0300 +@@ -16,6 +16,10 @@ + #include + + #include "effects/Stabilizer.h" ++#include ++#if CV_VERSION_MAJOR >= 5 ++#include ++#endif + #include "Exceptions.h" + #include "stabilizedata.pb.h" diff --git a/srcpkgs/libopenshot/template b/srcpkgs/libopenshot/template index 6bbec8b7678974..d2c4070ba3abc0 100644 --- a/srcpkgs/libopenshot/template +++ b/srcpkgs/libopenshot/template @@ -1,22 +1,26 @@ # Template file for 'libopenshot' pkgname=libopenshot -version=0.4.0 -revision=3 +version=1.0.0 +revision=1 build_style=cmake # Builds fail with Ruby-2.4.1 -configure_args="-DENABLE_RUBY=OFF -DUSE_SYSTEM_JSONCPP=ON" +configure_args="-DENABLE_RUBY=OFF -DUSE_SYSTEM_JSONCPP=ON -DENABLE_OPENCV=ON" hostmakedepends="swig doxygen ruby python3 python3-setuptools pkg-config - qt5-qmake qt5-host-tools" -makedepends="python3-devel ffmpeg6-devel libmagick-devel qt5-devel libgomp-devel - libopenshot-audio-devel qt5-multimedia-devel unittest-cpp zeromq-devel cppzmq - jsoncpp-devel qt5-svg-devel" + qt6-base protobuf" +makedepends="python3-devel ffmpeg6-devel libmagick-devel qt6-base-devel libgomp-devel + libopenshot-audio-devel qt6-multimedia-devel unittest-cpp zeromq-devel cppzmq + jsoncpp-devel qt6-svg-devel libopencv-devel babl-devel boost-devel protobuf-devel" depends="python3" short_desc="Library files for the OpenShot video editor" maintainer="Orphaned " license="LGPL-3.0-or-later" homepage="https://github.com/OpenShot/libopenshot" distfiles="https://github.com/OpenShot/libopenshot/archive/v${version}.tar.gz" -checksum=be0e760d81275543f7fbbf87863645748c3fe8aa8f4b5b771ff45a5d026bc9cc +checksum=5c5f3790f6f70977f3573b9d039372d5b85bddc46f8944244a6225a79891acf2 + +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" protobuf-devel" +fi libopenshot-devel_package() { short_desc+=" - development files" diff --git a/srcpkgs/mlt7/template b/srcpkgs/mlt7/template index 2e01148b7e0d4c..9bf4c2ca5b977b 100644 --- a/srcpkgs/mlt7/template +++ b/srcpkgs/mlt7/template @@ -1,7 +1,7 @@ # Template file for 'mlt7' pkgname=mlt7 version=7.40.0 -revision=1 +revision=2 build_style=cmake configure_args="-DSWIG_PYTHON=ON -DMOD_QT6=ON" hostmakedepends="doxygen pkg-config ladspa-sdk swig python3 which diff --git a/srcpkgs/nomacs/patches/opencv5.patch b/srcpkgs/nomacs/patches/opencv5.patch new file mode 100644 index 00000000000000..c8ab200d58cce5 --- /dev/null +++ b/srcpkgs/nomacs/patches/opencv5.patch @@ -0,0 +1,528 @@ +From d5ae27412e15885d0a119ea052ae57dc3ec1b270 Mon Sep 17 00:00:00 2001 +From: Javier Tia +Date: Mon, 6 Jul 2026 16:42:03 -0600 +Subject: [PATCH] refactor(opencv): drop opencv C headers and support opencv 5 + +Replace the C API constants with their C++ equivalents and add the +header file changes required for opencv 5. + +Closes #1619 +--- + .../src/DkSkewEstimator.cpp | 6 ++-- + .../CompositePlugin/src/SbChannelWidget.cpp | 3 +- + .../CompositePlugin/src/SbCompositePlugin.cpp | 5 ++- + .../src/DkFakeMiniaturesDialog.cpp | 6 ++++ + .../src/DkPageSegmentation.cpp | 14 ++++---- + .../src/DkPageSegmentationUtils.cpp | 8 +++-- + ImageLounge/src/DkCore/DkBasicLoader.cpp | 33 +++++++++---------- + ImageLounge/src/DkCore/DkImageStorage.cpp | 19 +++++------ + ImageLounge/src/DkGui/DkDialog.cpp | 13 ++++---- + ImageLounge/src/DkGui/DkViewPort.cpp | 3 +- + 10 files changed, 57 insertions(+), 53 deletions(-) + +diff --git a/ImageLounge/plugins/AffineTransformations/src/DkSkewEstimator.cpp b/ImageLounge/plugins/AffineTransformations/src/DkSkewEstimator.cpp +index 9b126df44..73075ff74 100644 +--- a/ImageLounge/plugins/AffineTransformations/src/DkSkewEstimator.cpp ++++ b/ImageLounge/plugins/AffineTransformations/src/DkSkewEstimator.cpp +@@ -32,7 +32,7 @@ + #include + + #ifdef WITH_OPENCV +-#include "opencv2/imgproc/imgproc_c.h" ++#include "opencv2/imgproc/imgproc.hpp" + #endif + + namespace nmp +@@ -91,7 +91,7 @@ double DkSkewEstimator::getSkewAngle() + cv::Mat matGray; + + if (mMatImg.channels() > 1) +- cv::cvtColor(mMatImg, matGray, CV_BGR2GRAY); ++ cv::cvtColor(mMatImg, matGray, cv::COLOR_BGR2GRAY); + else + matGray = mMatImg; + +@@ -224,7 +224,7 @@ cv::Mat DkSkewEstimator::computeSeparability(cv::Mat integral, cv::Mat integralS + + // for displaying: + // cv::normalize(separability, separability, 0, 255, NORM_MINMAX, CV_8UC1); +- // cvtColor(separability, separability, CV_GRAY2RGB); ++ // cvtColor(separability, separability, cv::COLOR_GRAY2RGB); + + return separability; + } +diff --git a/ImageLounge/plugins/CompositePlugin/src/SbChannelWidget.cpp b/ImageLounge/plugins/CompositePlugin/src/SbChannelWidget.cpp +index d75edcc4c..0c7af4ca9 100644 +--- a/ImageLounge/plugins/CompositePlugin/src/SbChannelWidget.cpp ++++ b/ImageLounge/plugins/CompositePlugin/src/SbChannelWidget.cpp +@@ -14,7 +14,6 @@ + #include + + #include "opencv2/imgproc/imgproc.hpp" +-#include "opencv2/imgproc/imgproc_c.h" + + namespace nmc + { +@@ -77,7 +76,7 @@ void SbChannelWidget::loadImage(QString file) + mSrcFormat = qImg.copy(0, 0, 1, 1); + + mImg = DkImage::qImage2Mat(qImg); +- cv::cvtColor(mImg, mImg, CV_RGB2GRAY); ++ cv::cvtColor(mImg, mImg, cv::COLOR_RGB2GRAY); + + updateThumbnail(); + QFileInfo fi(file); +diff --git a/ImageLounge/plugins/CompositePlugin/src/SbCompositePlugin.cpp b/ImageLounge/plugins/CompositePlugin/src/SbCompositePlugin.cpp +index 97b9d5721..17b6db44d 100644 +--- a/ImageLounge/plugins/CompositePlugin/src/SbCompositePlugin.cpp ++++ b/ImageLounge/plugins/CompositePlugin/src/SbCompositePlugin.cpp +@@ -30,7 +30,6 @@ + #include + + #include "opencv2/imgproc/imgproc.hpp" +-#include "opencv2/imgproc/imgproc_c.h" + + /******************************************************************************************************* + * SbCompositePlugin - enter the plugin class name (e.g. DkPageExtractionPlugin) +@@ -231,9 +230,9 @@ void SbCompositePlugin::onNewAlpha(QImage _alpha) + mAlpha = DkImage::qImage2Mat(_alpha); + // currently it seems like qImage2Mat converts a single-channel QImage to a multi-channel Mat. so.. + if (mAlpha.channels() == 4) +- cv::cvtColor(mAlpha, mAlpha, CV_RGBA2GRAY); ++ cv::cvtColor(mAlpha, mAlpha, cv::COLOR_RGBA2GRAY); + else if (mAlpha.channels() == 3) +- cv::cvtColor(mAlpha, mAlpha, CV_RGB2GRAY); ++ cv::cvtColor(mAlpha, mAlpha, cv::COLOR_RGB2GRAY); + } + } + +diff --git a/ImageLounge/plugins/FakeMiniaturesPlugin/src/DkFakeMiniaturesDialog.cpp b/ImageLounge/plugins/FakeMiniaturesPlugin/src/DkFakeMiniaturesDialog.cpp +index 8a285238b..5ba48f8bf 100644 +--- a/ImageLounge/plugins/FakeMiniaturesPlugin/src/DkFakeMiniaturesDialog.cpp ++++ b/ImageLounge/plugins/FakeMiniaturesPlugin/src/DkFakeMiniaturesDialog.cpp +@@ -26,6 +26,12 @@ + *******************************************************************************************************/ + + #include "DkFakeMiniaturesDialog.h" ++#ifdef WITH_OPENCV ++#include "opencv2/imgproc.hpp" ++#if CV_MAJOR_VERSION >= 5 ++#include "opencv2/geometry.hpp" ++#endif ++#endif + #include "DkImageStorage.h" + + #include +diff --git a/ImageLounge/plugins/PageExtractionPlugin/src/DkPageSegmentation.cpp b/ImageLounge/plugins/PageExtractionPlugin/src/DkPageSegmentation.cpp +index c6f39b140..37fd75e32 100644 +--- a/ImageLounge/plugins/PageExtractionPlugin/src/DkPageSegmentation.cpp ++++ b/ImageLounge/plugins/PageExtractionPlugin/src/DkPageSegmentation.cpp +@@ -30,7 +30,9 @@ + #include + + #include "opencv2/imgproc/imgproc.hpp" +-#include "opencv2/imgproc/imgproc_c.h" ++#if CV_MAJOR_VERSION >= 5 ++#include "opencv2/geometry.hpp" ++#endif + + namespace nmp + { +@@ -90,7 +92,7 @@ void DkPageSegmentation::compute() + if (mScale == 1.0f && 960.0f / mImg.cols < 0.8f) + mScale = 960.0f / mImg.cols; + +- cv::cvtColor(mImg, imgLab, CV_RGB2Lab); // boost colors ++ cv::cvtColor(mImg, imgLab, cv::COLOR_RGB2Lab); // boost colors + lImg = findRectangles(mImg, mRects); + } + +@@ -102,7 +104,7 @@ cv::Mat DkPageSegmentation::findRectangles(const cv::Mat &img, std::vector assuming resize to be 1/(2^n) ++ cv::resize(img, tImg, cv::Size(), mScale, mScale, cv::INTER_AREA); // inter nn -> assuming resize to be 1/(2^n) + else + tImg = img; + +@@ -138,7 +140,7 @@ cv::Mat DkPageSegmentation::findRectangles(const cv::Mat &img, std::vector> hull; +@@ -160,7 +162,7 @@ cv::Mat DkPageSegmentation::findRectangles(const cv::Mat &img, std::vector= 5 ++#include "opencv2/geometry.hpp" ++#endif + + #include + +@@ -433,9 +435,9 @@ void PageExtractor::findPage(cv::Mat img, float scale, std::vector & + { + cv::Mat gray, bw; + +- cv::cvtColor(img, gray, CV_RGB2GRAY); ++ cv::cvtColor(img, gray, cv::COLOR_RGB2GRAY); + if (scale != 1.0f) { +- cv::resize(gray, gray, cv::Size(), scale, scale, CV_INTER_AREA); // inter nn -> assuming resize to be 1/(2^n) ++ cv::resize(gray, gray, cv::Size(), scale, scale, cv::INTER_AREA); // inter nn -> assuming resize to be 1/(2^n) + } + const int smallerSide = std::min(gray.size().width, gray.size().height); + +diff --git a/ImageLounge/src/DkCore/DkBasicLoader.cpp b/ImageLounge/src/DkCore/DkBasicLoader.cpp +index fd01f8bee..087ec1f31 100644 +--- a/ImageLounge/src/DkCore/DkBasicLoader.cpp ++++ b/ImageLounge/src/DkCore/DkBasicLoader.cpp +@@ -50,7 +50,6 @@ + #ifdef WITH_OPENCV + #include "opencv2/core/core.hpp" + #include "opencv2/imgproc/imgproc.hpp" +-#include "opencv2/imgproc/imgproc_c.h" + + #ifdef WITH_LIBRAW + #include +@@ -835,7 +834,7 @@ bool DkBasicLoader::loadDRIF(const QString &filePath, QImage &img, QSharedPointe + case DRIF_FMT_BGR888: { + cv::Mat imgMat = cv::Mat((int)h, (int)w, CV_8UC3, imgBytes); + cv::Mat rgbMat = cv::Mat((int)h, (int)w, CV_8UC3, reinterpret_cast(img.bits())); +- cv::cvtColor(imgMat, rgbMat, CV_BGR2RGB); ++ cv::cvtColor(imgMat, rgbMat, cv::COLOR_BGR2RGB); + + success = true; + } break; +@@ -869,7 +868,7 @@ bool DkBasicLoader::loadDRIF(const QString &filePath, QImage &img, QSharedPointe + case DRIF_FMT_BGRA8888: { + cv::Mat imgMat = cv::Mat((int)h, (int)w, CV_8UC4, imgBytes); + cv::Mat rgbMat = cv::Mat((int)h, (int)w, CV_8UC3, reinterpret_cast(img.bits())); +- cv::cvtColor(imgMat, rgbMat, CV_BGR2RGB, 3); ++ cv::cvtColor(imgMat, rgbMat, cv::COLOR_BGR2RGB, 3); + + success = true; + } break; +@@ -877,7 +876,7 @@ bool DkBasicLoader::loadDRIF(const QString &filePath, QImage &img, QSharedPointe + case DRIF_FMT_RGBA8888: { + cv::Mat imgMat = cv::Mat((int)h, (int)w, CV_8UC4, imgBytes); + cv::Mat rgbMat = cv::Mat((int)h, (int)w, CV_8UC3, reinterpret_cast(img.bits())); +- cv::cvtColor(imgMat, rgbMat, CV_RGBA2RGB, 3); ++ cv::cvtColor(imgMat, rgbMat, cv::COLOR_RGBA2RGB, 3); + + success = true; + } break; +@@ -885,7 +884,7 @@ bool DkBasicLoader::loadDRIF(const QString &filePath, QImage &img, QSharedPointe + case DRIF_FMT_GRAY: { + cv::Mat imgMat = cv::Mat((int)h, (int)w, CV_8UC1, imgBytes); + cv::Mat rgbMat = cv::Mat((int)h, (int)w, CV_8UC3, reinterpret_cast(img.bits())); +- cv::cvtColor(imgMat, rgbMat, CV_GRAY2RGB); ++ cv::cvtColor(imgMat, rgbMat, cv::COLOR_GRAY2RGB); + + success = true; + } break; +@@ -893,7 +892,7 @@ bool DkBasicLoader::loadDRIF(const QString &filePath, QImage &img, QSharedPointe + case DRIF_FMT_YUV420P: { + cv::Mat imgMat = cv::Mat((int)h + h / 2, (int)w, CV_8UC1, imgBytes); + cv::Mat rgbMat = cv::Mat((int)h, (int)w, CV_8UC3, reinterpret_cast(img.bits())); +- cv::cvtColor(imgMat, rgbMat, CV_YUV2RGB_I420); ++ cv::cvtColor(imgMat, rgbMat, cv::COLOR_YUV2RGB_I420); + + success = true; + } break; +@@ -901,7 +900,7 @@ bool DkBasicLoader::loadDRIF(const QString &filePath, QImage &img, QSharedPointe + case DRIF_FMT_YVU420P: { + cv::Mat imgMat = cv::Mat((int)h + h / 2, (int)w, CV_8UC1, imgBytes); + cv::Mat rgbMat = cv::Mat((int)h, (int)w, CV_8UC3, reinterpret_cast(img.bits())); +- cv::cvtColor(imgMat, rgbMat, CV_YUV2RGB_YV12); ++ cv::cvtColor(imgMat, rgbMat, cv::COLOR_YUV2RGB_YV12); + + success = true; + } break; +@@ -909,7 +908,7 @@ bool DkBasicLoader::loadDRIF(const QString &filePath, QImage &img, QSharedPointe + case DRIF_FMT_NV12: { + cv::Mat imgMat = cv::Mat((int)h + h / 2, (int)w, CV_8UC1, imgBytes); + cv::Mat rgbMat = cv::Mat((int)h, (int)w, CV_8UC3, reinterpret_cast(img.bits())); +- cv::cvtColor(imgMat, rgbMat, CV_YUV2RGB_NV12); ++ cv::cvtColor(imgMat, rgbMat, cv::COLOR_YUV2RGB_NV12); + + success = true; + } break; +@@ -917,7 +916,7 @@ bool DkBasicLoader::loadDRIF(const QString &filePath, QImage &img, QSharedPointe + case DRIF_FMT_NV21: { + cv::Mat imgMat = cv::Mat((int)h + h / 2, (int)w, CV_8UC1, imgBytes); + cv::Mat rgbMat = cv::Mat((int)h, (int)w, CV_8UC3, reinterpret_cast(img.bits())); +- cv::cvtColor(imgMat, rgbMat, CV_YUV2RGB_NV21); ++ cv::cvtColor(imgMat, rgbMat, cv::COLOR_YUV2RGB_NV21); + + success = true; + } break; +@@ -2318,14 +2317,14 @@ cv::Mat DkRawLoader::demosaic(LibRaw &iProcessor) const + + // define bayer pattern + if (type == 180) { +- cvtColor(rawMat, rgbImg, CV_BayerBG2RGB); // bitmask 10 11 01 00 -> 3(G) 2(B) 1(G) 0(R) -> RG RG RG +- // GB GB GB ++ cvtColor(rawMat, rgbImg, cv::COLOR_BayerBG2RGB); // bitmask 10 11 01 00 -> 3(G) 2(B) 1(G) 0(R) -> RG RG RG ++ // GB GB GB + } else if (type == 30) { +- cvtColor(rawMat, rgbImg, CV_BayerRG2RGB); // bitmask 00 01 11 10 -> 0 1 3 2 ++ cvtColor(rawMat, rgbImg, cv::COLOR_BayerRG2RGB); // bitmask 00 01 11 10 -> 0 1 3 2 + } else if (type == 225) { +- cvtColor(rawMat, rgbImg, CV_BayerGB2RGB); // bitmask 11 10 00 01 ++ cvtColor(rawMat, rgbImg, cv::COLOR_BayerGB2RGB); // bitmask 11 10 00 01 + } else if (type == 75) { +- cvtColor(rawMat, rgbImg, CV_BayerGR2RGB); // bitmask 01 00 10 11 ++ cvtColor(rawMat, rgbImg, cv::COLOR_BayerGR2RGB); // bitmask 01 00 10 11 + } else { + qWarning() << "Wrong Bayer Pattern (not BG, RG, GB, GR)\n"; + return cv::Mat(); +@@ -2501,7 +2500,7 @@ void DkRawLoader::reduceColorNoise(const LibRaw &iProcessor, cv::Mat &img) const + // revert back to 8-bit image + img.convertTo(img, CV_8U); + +- cv::cvtColor(img, img, CV_RGB2YCrCb); ++ cv::cvtColor(img, img, cv::COLOR_RGB2YCrCb); + + std::vector imgCh; + cv::split(img, imgCh); +@@ -2511,7 +2510,7 @@ void DkRawLoader::reduceColorNoise(const LibRaw &iProcessor, cv::Mat &img) const + cv::medianBlur(imgCh[2], imgCh[2], winSize); + + cv::merge(imgCh, img); +- cv::cvtColor(img, img, CV_YCrCb2RGB); ++ cv::cvtColor(img, img, cv::COLOR_YCrCb2RGB); + qDebug() << "median blur takes:" << dt; + } + } +@@ -2527,7 +2526,7 @@ QImage DkRawLoader::raw2Img(const LibRaw &iProcessor, cv::Mat &img) const + + // TODO: for now - fix this! + if (img.channels() == 1) +- cv::cvtColor(img, img, CV_GRAY2RGB); ++ cv::cvtColor(img, img, cv::COLOR_GRAY2RGB); + + QImage src; + src.setColorSpace(QColorSpace{QColorSpace::SRgb}); // for output_color=1 +diff --git a/ImageLounge/src/DkCore/DkImageStorage.cpp b/ImageLounge/src/DkCore/DkImageStorage.cpp +index f52cb4d7d..510f4a07a 100755 +--- a/ImageLounge/src/DkCore/DkImageStorage.cpp ++++ b/ImageLounge/src/DkCore/DkImageStorage.cpp +@@ -44,7 +44,6 @@ + + #ifdef WITH_OPENCV + #include "opencv2/imgproc/imgproc.hpp" +-#include "opencv2/imgproc/imgproc_c.h" + #endif + + #include +@@ -135,22 +134,22 @@ + } + #ifdef WITH_OPENCV + +- int ipl = CV_INTER_CUBIC; ++ int ipl = cv::INTER_CUBIC; + switch (interpolation) { + case ipl_nearest: +- ipl = CV_INTER_NN; ++ ipl = cv::INTER_NEAREST; + break; + case ipl_area: +- ipl = CV_INTER_AREA; ++ ipl = cv::INTER_AREA; + break; + case ipl_linear: +- ipl = CV_INTER_LINEAR; ++ ipl = cv::INTER_LINEAR; + break; + case ipl_cubic: +- ipl = CV_INTER_CUBIC; ++ ipl = cv::INTER_CUBIC; + break; + case ipl_lanczos: +- ipl = CV_INTER_LANCZOS4; ++ ipl = cv::INTER_LANCZOS4; + break; + } + +@@ -555,7 +554,7 @@ + #ifdef WITH_OPENCV + + cv::Mat cvImg = DkImage::qImage2Mat(img); +- cv::cvtColor(cvImg, cvImg, CV_RGB2Lab); ++ cv::cvtColor(cvImg, cvImg, cv::COLOR_RGB2Lab); + + std::vector imgs; + cv::split(cvImg, imgs); +@@ -565,7 +564,7 @@ + cvImg = imgs[0]; + + // convert it back for the painter +- cv::cvtColor(cvImg, cvImg, CV_GRAY2RGB); ++ cv::cvtColor(cvImg, cvImg, cv::COLOR_GRAY2RGB); + + imgR = DkImage::mat2QImage(cvImg, img); + #else +@@ -954,9 +953,9 @@ + cv::Mat hsvImg = DkImage::qImage2Mat(src); + + if (hsvImg.channels() > 3) +- cv::cvtColor(hsvImg, hsvImg, CV_RGBA2BGR); ++ cv::cvtColor(hsvImg, hsvImg, cv::COLOR_RGBA2BGR); + +- cv::cvtColor(hsvImg, hsvImg, CV_BGR2HSV); ++ cv::cvtColor(hsvImg, hsvImg, cv::COLOR_BGR2HSV); + + // apply hue/saturation changes + for (int rIdx = 0; rIdx < hsvImg.rows; rIdx++) { +@@ -990,7 +989,7 @@ + } + } + +- cv::cvtColor(hsvImg, hsvImg, CV_HSV2BGR); ++ cv::cvtColor(hsvImg, hsvImg, cv::COLOR_HSV2BGR); + imgR = DkImage::mat2QImage(hsvImg, src); + + #endif // WITH_OPENCV +@@ -1010,7 +1009,7 @@ + rgbImg.convertTo(rgbImg, CV_16U, 256, offset * std::numeric_limits::max()); + + if (rgbImg.channels() > 3) +- cv::cvtColor(rgbImg, rgbImg, CV_RGBA2BGR); ++ cv::cvtColor(rgbImg, rgbImg, cv::COLOR_RGBA2BGR); + + if (exposure != 0.0) + rgbImg = exposureMat(rgbImg, exposure); +@@ -1663,7 +1662,7 @@ + } + } + +- cv::remap(src, dst, mapx, mapy, CV_INTER_AREA, IPL_BORDER_REPLICATE); ++ cv::remap(src, dst, mapx, mapy, cv::INTER_AREA, cv::BORDER_REPLICATE); + } + + void DkImage::tinyPlanet(QImage &img, double scaleLog, double angle, QSize s, bool invert /* = false */) +@@ -1886,7 +1885,7 @@ + try { + cv::Mat rImgCv = DkImage::qImage2Mat(resizedImg); + cv::Mat tmp; +- cv::resize(rImgCv, tmp, cv::Size(s.width(), s.height()), 0, 0, CV_INTER_AREA); ++ cv::resize(rImgCv, tmp, cv::Size(s.width(), s.height()), 0, 0, cv::INTER_AREA); + resizedImg = DkImage::mat2QImage(tmp, resizedImg); + } catch (...) { + qWarning() << "imageStorageScaleToSize: OpenCV exception caught while resizing..."; + +diff --git a/ImageLounge/src/DkGui/DkDialog.cpp b/ImageLounge/src/DkGui/DkDialog.cpp +index 46d829db3..5096d0049 100644 +--- a/ImageLounge/src/DkGui/DkDialog.cpp ++++ b/ImageLounge/src/DkGui/DkDialog.cpp +@@ -92,7 +92,6 @@ + + #ifdef WITH_OPENCV + #include "opencv2/imgproc/imgproc.hpp" +-#include "opencv2/imgproc/imgproc_c.h" + #endif + + #ifdef WITH_QUAZIP +@@ -3200,7 +3199,7 @@ int DkMosaicDialog::computeMosaic(const QString &filter, const QString &suffix, + + mImg = mImg.rowRange(qFloor(shR), mImg.rows - qCeil(shR)).colRange(qFloor(shC), mImg.cols - qCeil(shC)); + cv::Mat mImgLab; +- cv::cvtColor(mImg, mImgLab, CV_RGB2Lab); ++ cv::cvtColor(mImg, mImgLab, cv::COLOR_RGB2Lab); + std::vector channels; + cv::split(mImgLab, channels); + cv::Mat imgL = channels[0]; +@@ -3308,7 +3307,7 @@ int DkMosaicDialog::computeMosaic(const QString &filter, const QString &suffix, + // debug + cv::Mat imgT3; + cv::merge(channels, imgT3); +- cv::cvtColor(imgT3, imgT3, CV_Lab2BGR); ++ cv::cvtColor(imgT3, imgT3, cv::COLOR_Lab2BGR); + emit updateImage(DkImage::mat2QImage(imgT3, mSrcImg)); + } + +@@ -3426,7 +3425,7 @@ cv::Mat DkMosaicDialog::createPatch(const QImage &thumb, const QString &filePath + img = thumb; + + cv::Mat cvThumb = DkImage::qImage2Mat(img); +- cv::cvtColor(cvThumb, cvThumb, CV_RGB2Lab); ++ cv::cvtColor(cvThumb, cvThumb, cv::COLOR_RGB2Lab); + std::vector channels; + cv::split(cvThumb, channels); + cvThumb = channels[0]; +@@ -3446,7 +3445,7 @@ cv::Mat DkMosaicDialog::createPatch(const QImage &thumb, const QString &filePath + if (cvThumb.rows < patchRes || cvThumb.cols < patchRes) + qDebug() << "enlarging thumbs!!"; + +- cv::resize(cvThumb, cvThumb, cv::Size(patchRes, patchRes), 0.0, 0.0, CV_INTER_AREA); ++ cv::resize(cvThumb, cvThumb, cv::Size(patchRes, patchRes), 0.0, 0.0, cv::INTER_AREA); + + return cvThumb; + } +@@ -3553,7 +3552,7 @@ bool DkMosaicDialog::postProcessMosaic(float multiply /* = 0.3 */, + origR = mOrigImg.clone(); + mosaicR = mMosaicMatSmall.clone(); + } else { +- cv::resize(mOrigImg, origR, mMosaicMat.size(), 0, 0, CV_INTER_LANCZOS4); ++ cv::resize(mOrigImg, origR, mMosaicMat.size(), 0, 0, cv::INTER_LANCZOS4); + mosaicR = mMosaicMat; + mOrigImg.release(); + } +@@ -3592,7 +3591,7 @@ bool DkMosaicDialog::postProcessMosaic(float multiply /* = 0.3 */, + + // if (!computePreview) + // mosaicMat.release(); +- cv::cvtColor(origR, origR, CV_Lab2BGR); ++ cv::cvtColor(origR, origR, cv::COLOR_Lab2BGR); + qDebug() << "color converted"; + + mMosaic = DkImage::mat2QImage(origR, mSrcImg); +diff --git a/ImageLounge/src/DkGui/DkViewPort.cpp b/ImageLounge/src/DkGui/DkViewPort.cpp +index 9b55821c0..acf10719b 100644 +--- a/ImageLounge/src/DkGui/DkViewPort.cpp ++++ b/ImageLounge/src/DkGui/DkViewPort.cpp +@@ -60,7 +60,6 @@ + + #ifdef WITH_OPENCV + #include "opencv2/imgproc/imgproc.hpp" +-#include "opencv2/imgproc/imgproc_c.h" + #endif + + #ifdef Q_OS_WIN +@@ -2539,7 +2538,7 @@ + } + // The first element in the vector contains the gray scale 'average' of the 3 channels: + cv::Mat grayMat; +- cv::cvtColor(imgUC3, grayMat, CV_BGR2GRAY); ++ cv::cvtColor(imgUC3, grayMat, cv::COLOR_BGR2GRAY); + mImgs[0] = QImage((const unsigned char *)grayMat.data, + (int)grayMat.cols, + (int)grayMat.rows, diff --git a/srcpkgs/nomacs/template b/srcpkgs/nomacs/template index 18954205aad6fb..1515ec8e34fdf6 100644 --- a/srcpkgs/nomacs/template +++ b/srcpkgs/nomacs/template @@ -1,31 +1,18 @@ # Template file for 'nomacs' pkgname=nomacs -version=3.17.2287 -revision=5 -_plugins_ver=3.17.2285 +version=3.22.3 +revision=1 build_wrksrc=ImageLounge build_style=cmake configure_args="-DCMAKE_BUILD_TYPE=None -DENABLE_TRANSLATIONS=1 - -DUSE_SYSTEM_QUAZIP=1" -hostmakedepends="pkg-config qt5-qmake qt5-host-tools quazip-devel" -makedepends="qt5-tools-devel qt5-svg-devel exiv2-devel libopencv-devel - libraw-devel quazip-devel" + -DUSE_SYSTEM_QUAZIP=1 -DENABLE_QUAZIP=1 -DENABLE_OPENCV=1 -DENABLE_PLUGINS=1" +hostmakedepends="pkg-config qt6-base qt6-imageformats qt6-tools + kf6-kimageformats quazip-qt6" +makedepends="qt6-svg-devel exiv2-devel libopencv-devel + libraw-devel quazip-qt6-devel qt6-qt5compat-devel" short_desc="Simple yet powerful Qt imageviewer" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://github.com/nomacs/nomacs" -distfiles="https://github.com/nomacs/nomacs/archive/${version}.tar.gz - https://github.com/novomesk/nomacs-plugins/archive/refs/tags/${_plugins_ver}.tar.gz>plugins.tar.gz" -checksum="6905ea615358f84a0c83d5b1b7077871dea0526ec667500a1951448cb845a92c - 946b2d754be9ecca5cb155f7ecc5dcafb164f6c3dcc7bf5c3c0610d3b47774aa" -skip_extraction="plugins.tar.gz" - -post_extract() { - cd ${build_wrksrc} - vsrcextract -C plugins "plugins.tar.gz" -} - -post_patch() { - # XXX: remove this when updating, it no longer requires git as of 3.17.2295 - vsed -i -e "s/import subprocess/return '${version}'/" ../scripts/versionupdate.py -} +distfiles="https://github.com/nomacs/nomacs/archive/${version}.tar.gz" +checksum=3dedec2c55f8b10ec81dca199b244fa77f89bbdfd5832afa8100d1de71e16121 diff --git a/srcpkgs/opencv/patches/fix-dnn-umat-dimensions.patch b/srcpkgs/opencv/patches/fix-dnn-umat-dimensions.patch new file mode 100644 index 00000000000000..9f20186a617786 --- /dev/null +++ b/srcpkgs/opencv/patches/fix-dnn-umat-dimensions.patch @@ -0,0 +1,12 @@ +diff --git a/modules/dnn/src/dnn_utils.cpp b/modules/dnn/src/dnn_utils.cpp +index 5cc1359b0d..758380b419 100644 +--- a/modules/dnn/src/dnn_utils.cpp ++++ b/modules/dnn/src/dnn_utils.cpp +@@ -60,7 +60,7 @@ void getChannelFromBlob(UMat& m, InputArray blob, int i, int j, int rows, int co + + const int newShape[1] { length }; + UMat reshaped = ublob.reshape(1, 1, newShape); +- UMat roi = reshaped(Rect(0, offset, 1, rows * cols)); ++ UMat roi = reshaped(Rect(offset, 0, rows * cols, 1)); + m = roi.reshape(CV_MAT_CN(type), rows); + } diff --git a/srcpkgs/opencv/patches/fix-std.patch b/srcpkgs/opencv/patches/fix-std.patch new file mode 100644 index 00000000000000..ee9196650e9f9e --- /dev/null +++ b/srcpkgs/opencv/patches/fix-std.patch @@ -0,0 +1,38 @@ +--- a/modules/viz/src/vtk/vtkVizInteractorStyle.cpp ++++ b/modules/viz/src/vtk/vtkVizInteractorStyle.cpp +@@ -43,6 +43,7 @@ + // + //M*/ + ++#include + #include "../precomp.hpp" + + namespace cv { namespace viz +@@ -96,7 +97,7 @@ void cv::viz::vtkVizInteractorStyle::saveScreenshot(const String &file) + snapshot_writer->SetFileName(file.c_str()); + snapshot_writer->Write(); + +- cout << "Screenshot successfully captured (" << file.c_str() << ")" << endl; ++ std::cout << "Screenshot successfully captured (" << file.c_str() << ")" << endl; + } + + ////////////////////////////////////////////////////////////////////////////////////////////// +@@ -118,7 +119,7 @@ void cv::viz::vtkVizInteractorStyle::exportScene(const String &file) + exporter->SetInput(Interactor->GetRenderWindow()); + exporter->Write(); + +- cout << "Scene successfully exported (" << file.c_str() << ")" << endl; ++ std::cout << "Scene successfully exported (" << file.c_str() << ")" << endl; + } + + void cv::viz::vtkVizInteractorStyle::exportScene() +--- a/modules/viz/src/widget.cpp ++++ b/modules/viz/src/widget.cpp +@@ -43,6 +43,7 @@ + // + //M*/ + ++#include + #include "precomp.hpp" + + /////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/srcpkgs/opencv/patches/vtk9.patch b/srcpkgs/opencv/patches/vtk9.patch new file mode 100644 index 00000000000000..a5e6b64b06bfee --- /dev/null +++ b/srcpkgs/opencv/patches/vtk9.patch @@ -0,0 +1,36 @@ +diff --git a/cmake/OpenCVDetectVTK.cmake b/cmake/OpenCVDetectVTK.cmake +index 312fd41fe4..aeda80d47c 100644 +--- a/cmake/OpenCVDetectVTK.cmake ++++ b/cmake/OpenCVDetectVTK.cmake +@@ -1,8 +1,5 @@ + if(NOT VTK_FOUND) +- find_package(VTK QUIET NAMES vtk VTK) +- if(VTK_FOUND) +- if(NOT (VTK_VERSION VERSION_LESS "9.0.0") AND (VTK_VERSION VERSION_LESS "10.0.0")) # VTK 9.x +- find_package(VTK 9 QUIET NAMES vtk COMPONENTS ++ find_package(VTK 9 QUIET NAMES vtk COMPONENTS + FiltersExtraction + FiltersSources + FiltersTexture +@@ -14,21 +11,6 @@ if(NOT VTK_FOUND) + RenderingLOD + RenderingOpenGL2 + NO_MODULE) +- elseif(VTK_VERSION VERSION_GREATER "5") # VTK 6.x components +- find_package(VTK QUIET COMPONENTS vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE) +- IF(VTK_FOUND) +- IF(VTK_RENDERING_BACKEND) #in vtk 7, the rendering backend is exported as a var. +- find_package(VTK QUIET COMPONENTS vtkRendering${VTK_RENDERING_BACKEND} vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport vtkIOGeometry NO_MODULE) +- ELSE(VTK_RENDERING_BACKEND) +- find_package(VTK QUIET COMPONENTS vtkRenderingOpenGL vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE) +- ENDIF(VTK_RENDERING_BACKEND) +- ENDIF(VTK_FOUND) +- elseif(VTK_VERSION VERSION_EQUAL "5") # VTK 5.x components +- find_package(VTK QUIET COMPONENTS vtkCommon NO_MODULE) +- else() +- set(VTK_FOUND FALSE) +- endif() +- endif() + endif() + + if(NOT VTK_FOUND) diff --git a/srcpkgs/opencv/template b/srcpkgs/opencv/template index af369793136814..c6b1edce87cbe6 100644 --- a/srcpkgs/opencv/template +++ b/srcpkgs/opencv/template @@ -1,7 +1,7 @@ # Template file for 'opencv' pkgname=opencv -version=4.12.0 -revision=2 +version=5.0.0 +revision=1 create_wrksrc=yes build_wrksrc=${pkgname}-${version} build_style=cmake @@ -12,11 +12,12 @@ configure_args="-DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_OPENMP=ON -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-${version}/modules -DBUILD_opencv_wechat_qrcode=OFF -DBUILD_opencv_rgbd=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF" -hostmakedepends="pkg-config eigen python3-numpy python3-setuptools" +hostmakedepends="pkg-config eigen python3-numpy python3-setuptools protobuf protobuf-devel" makedepends="ffmpeg6-devel libpng-devel libjpeg-turbo-devel tiff-devel jasper-devel ocl-icd-devel libgomp-devel libopenexr-devel gtk+3-devel libgphoto2-devel gst-plugins-base1-devel openblas-devel - python3-numpy python3-devel" + python3-numpy python3-devel abseil-cpp-devel freetype-devel harfbuzz-devel + libjxl-devel libglvnd-devel vtk-devel" short_desc="Computer vision and machine learning software library" maintainer="Orphaned " license="Apache-2.0" @@ -24,8 +25,8 @@ homepage="https://opencv.org" changelog="https://github.com/opencv/opencv/wiki/ChangeLog" distfiles="https://github.com/opencv/opencv/archive/${version}.tar.gz https://github.com/opencv/opencv_contrib/archive/${version}.tar.gz>contrib.tar.gz" -checksum="44c106d5bb47efec04e531fd93008b3fcd1d27138985c5baf4eafac0e1ec9e9d - 4197722b4c5ed42b476d42e29beb29a52b6b25c34ec7b4d589c3ae5145fee98e" +checksum="b0528f5a1d379d59d4701cb28c36e22214cc51cf64594e5b56f2d3e6c0233095 + c58f6344170c39abf187c56f3843b59cab1fd3e89cf19ba2ce25dc061659b27f" patch_args="-Np1 -d ${build_wrksrc}" # tests hang indenfinitely, even with test data included make_check=no @@ -41,6 +42,15 @@ case "$XBPS_TARGET_MACHINE" in ppc*) broken="grfmt_jpeg2000.cpp:380:48: error: lvalue required as unary '&' operand";; esac +# HACK: because there's a patch inside opencv_contrib +post_extract() { + mv opencv_contrib*/modules/viz opencv-${version}/modules/ +} + +post_patch() { + mv modules/viz ../opencv_contrib*/modules/ +} + libopencv_package() { short_desc+=" - library files" pkg_install() { @@ -56,7 +66,6 @@ libopencv-devel_package() { vmove usr/lib/cmake vmove usr/lib/pkgconfig vmove usr/lib/*.so - vmove usr/share/opencv4 } } @@ -67,27 +76,3 @@ libopencv-python3_package() { vmove ${py3_sitelib} } } - -opencv4_package() { - depends="${sourcepkg}>=${version}_${revision}" - short_desc+=" (transitional dummy package)" - metapackage=yes -} - -libopencv4_package() { - depends="lib${sourcepkg}>=${version}_${revision}" - short_desc+=" - library files (transitional dummy package)" - metapackage=yes -} - -libopencv4-devel_package() { - depends="lib${sourcepkg}-devel>=${version}_${revision}" - short_desc+=" - development files (transitional dummy package)" - metapackage=yes -} - -libopencv4-python3_package() { - depends="lib${sourcepkg}-python3>=${version}_${revision}" - short_desc+=" - Python3 bindings (transitional dummy package)" - metapackage=yes -} diff --git a/srcpkgs/opencv4 b/srcpkgs/opencv4 deleted file mode 120000 index f5341cf36786ee..00000000000000 --- a/srcpkgs/opencv4 +++ /dev/null @@ -1 +0,0 @@ -opencv \ No newline at end of file diff --git a/srcpkgs/openshot/template b/srcpkgs/openshot/template index 56f188f569c199..76c40221f7b0e3 100644 --- a/srcpkgs/openshot/template +++ b/srcpkgs/openshot/template @@ -1,6 +1,6 @@ # Template file for 'openshot' pkgname=openshot -version=3.3.0 +version=4.0.0 revision=1 build_style=python3-module hostmakedepends="python3 python3-setuptools" @@ -12,5 +12,5 @@ maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://www.openshot.org" distfiles="https://github.com/OpenShot/openshot-qt/archive/v${version}.tar.gz" -checksum=f5471eec94d59830ea58351b93e69d4c56b42874d927fbd6482f83b9bb545d4f +checksum=97cf3d02392527d3f386ee97724828587ba1b1badee40879269ec32fe551ae6e make_check=no # tests are broken diff --git a/srcpkgs/opentoonz/template b/srcpkgs/opentoonz/template index 4f93644655f09b..a6fadd2e02d973 100644 --- a/srcpkgs/opentoonz/template +++ b/srcpkgs/opentoonz/template @@ -1,7 +1,7 @@ # Template file for 'opentoonz' pkgname=opentoonz version=1.7.1 -revision=3 +revision=4 build_wrksrc="toonz/sources" build_style=cmake make_cmd=make diff --git a/srcpkgs/qimgv/patches/opencv5.patch b/srcpkgs/qimgv/patches/opencv5.patch new file mode 100644 index 00000000000000..77a3ab53cb5fb2 --- /dev/null +++ b/srcpkgs/qimgv/patches/opencv5.patch @@ -0,0 +1,33 @@ +diff -ruN a/qimgv/3rdparty/QtOpenCV/cvmatandqimage.cpp qimgv/qimgv/3rdparty/QtOpenCV/cvmatandqimage.cpp +--- a/qimgv/3rdparty/QtOpenCV/cvmatandqimage.cpp 2021-09-29 23:46:05.000000000 +0200 ++++ b/qimgv/3rdparty/QtOpenCV/cvmatandqimage.cpp 2026-08-14 19:24:42.931681534 +0200 +@@ -28,7 +28,7 @@ + #include + #include + #include +-#include ++#include + + namespace QtOcv { + namespace { +@@ -267,7 +267,7 @@ + #else + format = QImage::Format_RGB32; + cv::Mat mat_tmp; +- cv::cvtColor(mat, mat_tmp, order == MCO_BGR ? CV_BGR2BGRA : CV_RGB2BGRA); ++ cv::cvtColor(mat, mat_tmp, order == MCO_BGR ? cv::COLOR_BGR2BGRA : cv::COLOR_RGB2BGRA); + #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN + mat_adjustCn = mat_tmp; + #else +diff -ruN a/qimgv/3rdparty/QtOpenCV/cvmatandqimage.h qimgv/qimgv/3rdparty/QtOpenCV/cvmatandqimage.h +--- a/qimgv/3rdparty/QtOpenCV/cvmatandqimage.h 2021-09-29 23:46:05.000000000 +0200 ++++ b/qimgv/3rdparty/QtOpenCV/cvmatandqimage.h 2026-08-14 19:24:42.930514580 +0200 +@@ -27,7 +27,7 @@ + #define CVMATANDQIMAGE_H + + #include +-#include ++#include + + namespace QtOcv { + diff --git a/srcpkgs/qimgv/template b/srcpkgs/qimgv/template index a4da9d835de6f5..aa6b21cac85dd1 100644 --- a/srcpkgs/qimgv/template +++ b/srcpkgs/qimgv/template @@ -1,7 +1,7 @@ # Template file for 'qimgv' pkgname=qimgv version=1.0.2 -revision=5 +revision=6 build_style=cmake # Video support disabled as playing videos locks up the app. # KDE disabled as it searches for kf5 cmake files. diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template index 94a29c89f5e367..62f929d8f931ee 100644 --- a/srcpkgs/removed-packages/template +++ b/srcpkgs/removed-packages/template @@ -500,8 +500,12 @@ replaces=" libmpd<=11.8.17_3 libomp17-devel<=17.0.6_5 libomp17<=17.0.6_5 + libopencv4<=4.12.0_2 + libopencv4-devel<=4.12.0_2 + libopencv4-python3<=4.12.0_2 libopencv-python<=3.4.15_1 libopencv4-python<=4.5.3_2 + libopencv4-python3<=4.12.0_2 libpipewire0.2-devel<=0.2.7_2 libpipewire0.2<=0.2.7_2 libplist-python<=2.2.0_3 @@ -658,6 +662,7 @@ replaces=" onionshare<=2.2_5 openbazaar<=1.1.13_2 opencl-clhpp<=2.0.15_1 + opencv4<=4.12.0_2 openlierox<=0.58.rc5_2 opentmpfiles<=0.3.1_1 orage<=4.12.1_7 diff --git a/srcpkgs/retroshare/template b/srcpkgs/retroshare/template index 4b834864c4143a..4ffe1a76024bd8 100644 --- a/srcpkgs/retroshare/template +++ b/srcpkgs/retroshare/template @@ -1,7 +1,7 @@ # Template file for 'retroshare' pkgname=retroshare version=0.6.6 -revision=5 +revision=6 build_style=qmake #XXX broadcast feature requires an ancient udp-discovery-cpp which either needs # to be fetched+patched (FTBFS) here or packaged :/ diff --git a/srcpkgs/siril/patches/opencv5.patch b/srcpkgs/siril/patches/opencv5.patch new file mode 100644 index 00000000000000..888fcee661bc96 --- /dev/null +++ b/srcpkgs/siril/patches/opencv5.patch @@ -0,0 +1,52 @@ +From 0d53c1ed54e58b6db1fb30440d8f0f0ff19efa8b Mon Sep 17 00:00:00 2001 +From: Daeho Ro +Date: Sat, 11 Jul 2026 22:19:08 +0900 +Subject: [PATCH] Build with OpenCV 5 + +--- + ChangeLog | 1 + + meson.build | 14 +++++++++----- + 2 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/meson.build b/meson.build +index 8dc7f1c1b..c47f322a4 100644 +--- a/meson.build ++++ b/meson.build +@@ -282,11 +282,16 @@ + endif + cairo_dep = dependency('cairo', required : true) + kplot_dep = dependency('kplot', fallback : ['kplot', 'kplot_dep'], required : true) +-opencv4_dep = dependency('opencv4', required : true, version: '>= 4.2.0') ++opencv_dep = dependency('opencv5', version : '>= 5.0.0', required : false) ++if not opencv_dep.found() ++ opencv_dep = dependency('opencv4', version : '>= 4.2.0', required : true) ++endif + # checking required opencv modules +-opencv_symbols = ['HAVE_OPENCV_CORE', 'HAVE_OPENCV_IMGPROC', 'HAVE_OPENCV_CALIB3D', 'HAVE_OPENCV_STITCHING'] ++opencv_calib_module = opencv_dep.version().version_compare('>= 5.0.0') ? 'HAVE_OPENCV_GEOMETRY' : 'HAVE_OPENCV_CALIB3D' ++opencv_symbols = ['HAVE_OPENCV_CORE', 'HAVE_OPENCV_IMGPROC', opencv_calib_module, 'HAVE_OPENCV_STITCHING'] ++opencv_incdir = '-I'+opencv_dep.get_variable(pkgconfig : 'includedir') + foreach s : opencv_symbols +- cpp.has_header_symbol('opencv2/opencv_modules.hpp', s, dependencies: opencv4_dep, required : true) ++ cpp.has_header_symbol('opencv2/opencv_modules.hpp', s, args: [opencv_incdir], required : true) + endforeach + + rtprocess_dep = dependency('rtprocess', required : false) +@@ -564,7 +569,7 @@ + endforeach + + ## Dependencies configuration +-if opencv4_dep.version().version_compare('>=4.4.0') ++if opencv_dep.version().version_compare('>=4.4.0') + conf_data.set('HAVE_CV44', 1, description : 'Using OpenCV 4.4 and all registration features.') + else + warning('OpenCV 4.4 was not found, using a lower version that does not support translation-only registration instead.') +@@ -688,7 +693,7 @@ + libcurl_dep, + libgit2_dep, + gsl_dep, +- opencv4_dep, ++ opencv_dep, + rtprocess_dep, + htmesh_dep, + healpix_dep, diff --git a/srcpkgs/siril/template b/srcpkgs/siril/template index 2d84517e1e6649..2eb8e9044a86e3 100644 --- a/srcpkgs/siril/template +++ b/srcpkgs/siril/template @@ -29,4 +29,7 @@ pre_configure() { if [ "$XBPS_TARGET_LIBC" = "musl" ]; then vsed -e "s|rdynamic..|&\n siril_link_arg += ['-lexecinfo']|" -i meson.build fi + if [ "$CROSS_BUILD" ]; then + vsed -e "s|^opencv_incdir.*|opencv_incdir = \'-I/usr/${XBPS_CROSS_TRIPLET}/usr/include/opencv5\'|" -i meson.build + fi } diff --git a/srcpkgs/spectacle/patches/opencv5.patch b/srcpkgs/spectacle/patches/opencv5.patch new file mode 100644 index 00000000000000..fdeae72cff00a2 --- /dev/null +++ b/srcpkgs/spectacle/patches/opencv5.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -91,7 +91,7 @@ + find_package(PlasmaWaylandProtocols REQUIRED) + find_package(LayerShellQt REQUIRED) + find_package(KPipeWire) +-find_package(OpenCV 4.7 REQUIRED core imgproc) ++find_package(OpenCV 5.0 REQUIRED core imgproc) + find_package(PkgConfig REQUIRED) + + set_package_properties(KPipeWire PROPERTIES DESCRIPTION diff --git a/srcpkgs/spectacle/template b/srcpkgs/spectacle/template index a433d913992eb1..8715c7c771f823 100644 --- a/srcpkgs/spectacle/template +++ b/srcpkgs/spectacle/template @@ -3,7 +3,7 @@ pkgname=spectacle reverts="24.12.1_1 24.12.0_1 24.08.1_2 24.08.1_1 24.08.0_1 24.05.0_4 24.05.0_3 24.05.0_2 24.05.0_2 24.05.0_2 24.05.0_1 24.02.2_1 23.08.5_1 23.08.4_1 23.08.3_1 23.08.2_1 23.08.0_1 23.04.2_1 23.04.0_1 22.12.1_1 22.08.2_1 22.08.1_1 22.04.3_1 22.04.1_1 21.12.3_1 21.12.2_1 21.12.1_1 21.12.0_1 21.08.3_1 21.08.2_1 21.08.1_1 21.08.0_1 21.04.3_1 21.04.2_1 21.04.1_1 21.04.0_1 20.12.3_1 20.12.2_1 20.12.1_1 20.12.0_1 20.08.3_1 20.08.2_1 20.08.1_1 20.08.0_1 20.04.3_1 20.04.2_1 20.04.2_1 20.04.1_1 20.04.0_1" version=6.7.5 -revision=2 +revision=3 build_style=cmake configure_args="-DBUILD_TESTING=OFF" hostmakedepends="pkg-config extra-cmake-modules qt6-tools qt6-base diff --git a/srcpkgs/waifu2x-converter-cpp/template b/srcpkgs/waifu2x-converter-cpp/template index 309072ac837ede..d8ef79c7ee190d 100644 --- a/srcpkgs/waifu2x-converter-cpp/template +++ b/srcpkgs/waifu2x-converter-cpp/template @@ -1,7 +1,7 @@ # Template file for 'waifu2x-converter-cpp' pkgname=waifu2x-converter-cpp version=5.3.4 -revision=2 +revision=3 build_style=cmake configure_args="-DINSTALL_MODELS=ON" hostmakedepends="pkg-config" diff --git a/srcpkgs/wl-kbptr/patches/opencv5.patch b/srcpkgs/wl-kbptr/patches/opencv5.patch new file mode 100644 index 00000000000000..643d9901de1f73 --- /dev/null +++ b/srcpkgs/wl-kbptr/patches/opencv5.patch @@ -0,0 +1,44 @@ +From 0854a51cfa5b3d74c0f81f0a4da9b5bb11c9b9f1 Mon Sep 17 00:00:00 2001 +From: Dereck Angeles +Date: Mon, 3 Aug 2026 13:24:57 -0600 +Subject: [PATCH] Support building against OpenCV 4 or 5 + +Arch and other distributions have moved to OpenCV 5, which +relocated `cv::boundingRect` out of `imgproc.hpp`. Look for +OpenCV 4 first so existing builds are unaffected, and fall +back to OpenCV 5. + +fixes #99 +--- + meson.build | 2 +- + src/target_detection.cpp | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 979df4d..db88878 100644 +--- a/meson.build ++++ b/meson.build +@@ -26,7 +26,7 @@ cc = meson.get_compiler('c') + if use_opencv + add_project_arguments('-DOPENCV_ENABLED=1', language: ['c', 'cpp']) + add_languages('cpp', native: false) +- opencv = dependency('opencv4') ++ opencv = dependency('opencv4', 'opencv5') + pixman = dependency('pixman-1') + endif + +diff --git a/src/target_detection.cpp b/src/target_detection.cpp +index 31e8232..1fcf241 100644 +--- a/src/target_detection.cpp ++++ b/src/target_detection.cpp +@@ -6,6 +6,10 @@ + + #include + #include ++// OpenCV 5 moved `cv::boundingRect` out of `imgproc.hpp`. ++#if __has_include() ++#include ++#endif + #include + #include + #include diff --git a/srcpkgs/wl-kbptr/template b/srcpkgs/wl-kbptr/template index bb27fcbc1a74b4..740048718efcd2 100644 --- a/srcpkgs/wl-kbptr/template +++ b/srcpkgs/wl-kbptr/template @@ -1,7 +1,7 @@ # Template file for 'wl-kbptr' pkgname=wl-kbptr version=0.4.1 -revision=1 +revision=2 build_style=meson configure_args="-Dopencv=enabled" hostmakedepends="cmake pkg-config wayland-devel"