diff --git a/common/shlibs b/common/shlibs index a602ccc7861290..d00055bf663ffa 100644 --- a/common/shlibs +++ b/common/shlibs @@ -535,6 +535,8 @@ libgimpcolor-3.0.so.0 libgimp-3.0.0_1 libgimpmodule-3.0.so.0 libgimp-3.0.0_1 libgmic.so.4 libgmic-4.0.7_1 libcgmic.so.4 libgmic-4.0.7_1 +libgmic.so.4 libgmic-4.0.5_1 +libcgmic.so.4 libgmic-4.0.5_1 libexiv2.so.28 exiv2-0.28.1_1 libKF5Holidays.so.5 kholidays-5.47.0_1 libKF6PulseAudioQt.so.5 pulseaudio-qt-1.5_1 @@ -2319,58 +2321,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.501 libopencv-5.0.1_1 +libopencv_bgsegm.so.501 libopencv-5.0.1_1 +libopencv_bioinspired.so.501 libopencv-5.0.1_1 +libopencv_calib.so.501 libopencv-5.0.1_1 +libopencv_ccalib.so.501 libopencv-5.0.1_1 +libopencv_core.so.501 libopencv-5.0.1_1 +libopencv_dnn.so.501 libopencv-5.0.1_1 +libopencv_dnn_superres.so.501 libopencv-5.0.1_1 +libopencv_face.so.501 libopencv-5.0.1_1 +libopencv_features.so.501 libopencv-5.0.1_1 +libopencv_flann.so.501 libopencv-5.0.1_1 +libopencv_freetype.so.501 libopencv-5.0.1_1 +libopencv_fuzzy.so.501 libopencv-5.0.1_1 +libopencv_geometry.so.501 libopencv-5.0.1_1 +libopencv_hdf.so.501 libopencv-5.0.1_1 +libopencv_hfs.so.501 libopencv-5.0.1_1 +libopencv_highgui.so.501 libopencv-5.0.1_1 +libopencv_img_hash.so.501 libopencv-5.0.1_1 +libopencv_imgcodecs.so.501 libopencv-5.0.1_1 +libopencv_imgproc.so.501 libopencv-5.0.1_1 +libopencv_intensity_transform.so.501 libopencv-5.0.1_1 +libopencv_line_descriptor.so.501 libopencv-5.0.1_1 +libopencv_ml.so.501 libopencv-5.0.1_1 +libopencv_objdetect.so.501 libopencv-5.0.1_1 +libopencv_optflow.so.501 libopencv-5.0.1_1 +libopencv_phase_unwrapping.so.501 libopencv-5.0.1_1 +libopencv_photo.so.501 libopencv-5.0.1_1 +libopencv_plot.so.501 libopencv-5.0.1_1 +libopencv_ptcloud.so.501 libopencv-5.0.1_1 +libopencv_quality.so.501 libopencv-5.0.1_1 +libopencv_rapid.so.501 libopencv-5.0.1_1 +libopencv_reg.so.501 libopencv-5.0.1_1 +libopencv_saliency.so.501 libopencv-5.0.1_1 +libopencv_shape.so.501 libopencv-5.0.1_1 +libopencv_signal.so.501 libopencv-5.0.1_1 +libopencv_stereo.so.501 libopencv-5.0.1_1 +libopencv_stitching.so.501 libopencv-5.0.1_1 +libopencv_structured_light.so.501 libopencv-5.0.1_1 +libopencv_surface_matching.so.501 libopencv-5.0.1_1 +libopencv_text.so.501 libopencv-5.0.1_1 +libopencv_tracking.so.501 libopencv-5.0.1_1 +libopencv_video.so.501 libopencv-5.0.1_1 +libopencv_videoio.so.501 libopencv-5.0.1_1 +libopencv_viz.so.501 libopencv-5.0.1_1 +libopencv_xfeatures2d.so.501 libopencv-5.0.1_1 +libopencv_ximgproc.so.501 libopencv-5.0.1_1 +libopencv_xobjdetect.so.501 libopencv-5.0.1_1 +libopencv_xphoto.so.501 libopencv-5.0.1_1 +libopencv_xstereo.so.501 libopencv-5.0.1_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 @@ -2742,7 +2741,7 @@ libmill.so.18 libmill-1.14_1 libges-1.0.so.0 gst1-editing-services-1.6.2_1 libykneomgr.so.0 libykneomgr-0.1.8_1 libopenshot-audio.so.10 libopenshot-audio-0.4.0_1 -libopenshot.so.27 libopenshot-0.4.0_1 +libopenshot.so.33 libopenshot-1.1.1_1 libpqxx-8.0.so libpqxx-8.0.2_1 libndpi.so.5 ndpi-5.0_1 libKF5WidgetsAddons.so.5 kwidgetsaddons-5.26.0_1 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/disable-aesthetic-detector.patch b/srcpkgs/digikam/patches/disable-aesthetic-detector.patch new file mode 100644 index 00000000000000..4ebea853007709 --- /dev/null +++ b/srcpkgs/digikam/patches/disable-aesthetic-detector.patch @@ -0,0 +1,37 @@ +#https://gitlab.archlinux.org/archlinux/packaging/packages/digikam/-/blob/main/disable-aesthetic-detector.patch +# opencv 5.1.0 deprecated readNetFromTensorflow +diff --git a/core/libs/imgqsort/detectors/aesthetic_detector.cpp b/core/libs/imgqsort/detectors/aesthetic_detector.cpp +index 69d9762a6e..69975eaf28 100644 +--- a/core/libs/imgqsort/detectors/aesthetic_detector.cpp ++++ b/core/libs/imgqsort/detectors/aesthetic_detector.cpp +@@ -143,29 +143,8 @@ bool AestheticDetector::s_loadModel() + QString model = QLatin1String("weights_inceptionv3_299.pb"); + QString nnmodel = appPath + QLatin1Char('/') + model; + +- if (QFileInfo::exists(nnmodel)) ++ if (false) + { +- qCDebug(DIGIKAM_DETECTOR_LOG) << "Aesthetic detector model:" << model; +- +-#ifdef Q_OS_WIN +- +- s_model = cv::dnn::readNetFromTensorflow(nnmodel.toLocal8Bit().constData()); +- +-#else +- +- s_model = cv::dnn::readNetFromTensorflow(nnmodel.toStdString()); +- +-#endif +- s_model.setPreferableBackend(cv::dnn::DNN_TARGET_CPU); +- s_model.setPreferableTarget(cv::dnn::DNN_TARGET_CPU); +- +-#if (OPENCV_VERSION == QT_VERSION_CHECK(4, 7, 0)) +- +- s_model.enableWinograd(false); +- +-#endif +- +- return true; + } + else + { diff --git a/srcpkgs/digikam/patches/facepipeline-cv-mat.patch b/srcpkgs/digikam/patches/facepipeline-cv-mat.patch new file mode 100644 index 00000000000000..9c82b378677ea6 --- /dev/null +++ b/srcpkgs/digikam/patches/facepipeline-cv-mat.patch @@ -0,0 +1,49 @@ +# zlice - diff from release 9.1.0 and gitlab +--- a/core/utilities/facemanagement/pipelines/facepipelinebase.cpp ++++ b/core/utilities/facemanagement/pipelines/facepipelinebase.cpp +@@ -65,24 +65,29 @@ + cv::Mat mean, stddev; + cv::meanStdDev(noise, mean, stddev); + +- double noiseLevel = stddev.at(0, 0); ++ double noiseLevel = stddev.at(0.0, 0.0); + + return noiseLevel; + } + + double FacePipelineBase::detectNoise2(const cv::Mat& cvGrayImage) const + { +- int H = cvGrayImage.rows; +- int W = cvGrayImage.cols; +- cv::Mat M = (cv::Mat_(3, 3) << 1, -2, 1, +- -2, 4, -2, +- 1, -2, 1); ++ int H = cvGrayImage.rows; ++ int W = cvGrayImage.cols; ++ ++ double kernelData[] = { ++ 1.0, -2.0, 1.0, ++ -2.0, 4.0, -2.0, ++ 1.0, -2.0, 1.0 ++ }; ++ ++ cv::Mat M(3, 3, CV_64F, kernelData); + + cv::Mat convolved; + cv::filter2D(cvGrayImage, convolved, CV_64F, M); + +- double sigma = cv::sum(cv::abs(convolved))[0]; +- sigma = sigma * std::sqrt(0.5 * M_PI) / (6 * (W - 2) * (H - 2)); ++ double sigma = cv::sum(cv::abs(convolved))[0]; ++ sigma = sigma * std::sqrt(0.5 * M_PI) / (6 * (W - 2) * (H - 2)); + + return sigma; + } +@@ -274,7 +279,7 @@ + catcher->enqueue(); + QList images = catcher->waitForThumbnails(); + +- if (images.size() && !images[0].isNull()) ++ if (!images.isEmpty() && !images[0].isNull()) + { + // store the thumbnail image in the package diff --git a/srcpkgs/digikam/patches/opencv5.patch b/srcpkgs/digikam/patches/opencv5.patch new file mode 100644 index 00000000000000..b4e1b07647fbfc --- /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,1,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 b25063ba25ad24..b5a6fab69b175f 100644 --- a/srcpkgs/digikam/template +++ b/srcpkgs/digikam/template @@ -1,7 +1,7 @@ # Template file for 'digikam' pkgname=digikam version=9.1.0 -revision=4 +revision=5 build_style=cmake configure_args="-DBUILD_TESTING=OFF -DENABLE_AKONADICONTACTSUPPORT=ON -DENABLE_KFILEMETADATASUPPORT=ON -DBUILD_WITH_QT6=ON" diff --git a/srcpkgs/gmic/patches/opencv5.patch b/srcpkgs/gmic/patches/opencv5.patch new file mode 100644 index 00000000000000..bef6e334ca9dbe --- /dev/null +++ b/srcpkgs/gmic/patches/opencv5.patch @@ -0,0 +1,45 @@ +# https://github.com/OpenMandrivaAssociation/gmic/blob/master/gmic-opencv5.patch +--- 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) +--- a/zart/zart.pro ++++ b/zart/zart.pro +@@ -34,13 +34,16 @@ + # + # OpenCV + # ++packagesExist(opencv5) { ++ PKGCONFIG += opencv5 ++} + packagesExist(opencv4) { # e.g. Ubuntu 20.04 + PKGCONFIG += opencv4 + } + packagesExist(opencv) { + PKGCONFIG += opencv + } +-!packagesExist(opencv):!packagesExist(opencv4) { ++!packagesExist(opencv):!packagesExist(opencv4):!packagesExist(opencv5) { + error(Cannot find OpenCV) + } + +--- a/zart/src/ZArt.cpp ++++ b/zart/src/ZArt.cpp +@@ -99,9 +99,7 @@ + WebcamSource::clearSavedSettings(); + } + WebcamSource::retrieveWebcamResolutions(WebcamSource::getWebcamList(), &splashScreen); +- if (!gmic::init_rc()) { +- cerr << "[ZArt] Warning: Could not create resources directory.\n"; +- } ++ gmic::init_rc(); + MainWindow mainWindow; + QStringList args = QApplication::arguments(); + if ((args.size() > 1) && QFileInfo(args.back()).isReadable()) { diff --git a/srcpkgs/gmic/template b/srcpkgs/gmic/template index cfd4230d95d05f..5a1feef7d13c62 100644 --- a/srcpkgs/gmic/template +++ b/srcpkgs/gmic/template @@ -1,6 +1,6 @@ # Template file for 'gmic' pkgname=gmic -version=4.0.7 +version=4.0.8 revision=1 _zart_hash=d014169343f835381ad232ee11e077326561c9eb build_style=gnu-makefile @@ -14,9 +14,9 @@ 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/get_file.php?file=source/gmic_${version}.tar.gz>gmic_${version}.tar.gz +distfiles="https://github.com/GreycLab/gmic/releases/download/v.${version}/gmic_${version}.tar.gz https://github.com/c-koi/zart/archive/${_zart_hash}.tar.gz>zart-${_zart_hash}.tar.gz" -checksum="f84b215f40cb00de37bff5ec801103af211679794c3602d39c5430dab76005de +checksum="de30b742c2c69526732ace3a413d4e81fc08d9cf770c3a7b197298b6ab830b0f baebe339566993194f98a71895bff09520b08f38e66eae215758aaa260557bcf" skip_extraction="zart-${_zart_hash}.tar.gz" diff --git a/srcpkgs/kdenlive/template b/srcpkgs/kdenlive/template index dfba5c26dd58a1..8beb40fbadaa66 100644 --- a/srcpkgs/kdenlive/template +++ b/srcpkgs/kdenlive/template @@ -2,7 +2,7 @@ # group=kde-gear pkgname=kdenlive version=26.08.3 -revision=1 +revision=2 build_style=cmake configure_args="-DBUILD_TESTING=OFF" hostmakedepends=" diff --git a/srcpkgs/kstars/template b/srcpkgs/kstars/template index 24a0f2684ddfbb..b270d093541f3f 100644 --- a/srcpkgs/kstars/template +++ b/srcpkgs/kstars/template @@ -1,7 +1,7 @@ # Template file for 'kstars' pkgname=kstars version=3.7.9 -revision=2 +revision=3 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..0720b60bbc0a4e 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.2 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=4ea883b1b0a7d62a2c39e65138997c947996ecd3040a7b439b83f2dbd353d28a libopenshot-audio-devel_package() { short_desc+=" - development files" diff --git a/srcpkgs/libopenshot/patches/musl.patch b/srcpkgs/libopenshot/patches/musl.patch index b1a105ddea3fe5..616e04fbb59a37 100644 --- a/srcpkgs/libopenshot/patches/musl.patch +++ b/srcpkgs/libopenshot/patches/musl.patch @@ -3,39 +3,39 @@ @@ -16,6 +16,14 @@ #include #include - + +#ifdef __MINGW32__ -+ #include -+ #include -+ #include ++ #include ++ #include ++ #include +#elif defined(__GLIBC__) -+ #include ++ #include +#endif + using namespace std; using namespace openshot; - -@@ -34,7 +42,7 @@ CrashHandler *CrashHandler::Instance() + +@@ -34,7 +42,7 @@ // TODO: Windows exception handling methods signal(SIGSEGV, CrashHandler::abortHandler); - + -#else +#elif defined(__GLIBC__) struct sigaction sa; sa.sa_flags = SA_SIGINFO; sa.sa_sigaction = CrashHandler::abortHandler; -@@ -111,6 +119,7 @@ void CrashHandler::abortHandler( int sig - +@@ -112,6 +120,7 @@ + void CrashHandler::printStackTrace(FILE *out, unsigned int max_frames) { +#ifdef __GLIBC__ fprintf(out, "---- Unhandled Exception: Stack Trace ----\n"); - ZmqLogger::Instance()->LogToFile("---- Unhandled Exception: Stack Trace ----\n"); + Logger::Instance()->LogToFile("---- Unhandled Exception: Stack Trace ----\n"); stringstream stack_output; -@@ -306,4 +315,5 @@ void CrashHandler::printStackTrace(FILE - +@@ -307,4 +316,5 @@ + fprintf(out, "---- End of Stack Trace ----\n"); - ZmqLogger::Instance()->LogToFile("---- End of Stack Trace ----\n"); + Logger::Instance()->LogToFile("---- End of Stack Trace ----\n"); +#endif // __GLIBC__ } --- a/src/CrashHandler.h diff --git a/srcpkgs/libopenshot/patches/opencv5-mat.patch b/srcpkgs/libopenshot/patches/opencv5-mat.patch new file mode 100644 index 00000000000000..0e09628e35b06d --- /dev/null +++ b/srcpkgs/libopenshot/patches/opencv5-mat.patch @@ -0,0 +1,61 @@ +# https://patch-diff.githubusercontent.com/raw/OpenShot/libopenshot/pull/1148 +From d3db9e0b6df1862ab55a8c49b934c733430ba5ce Mon Sep 17 00:00:00 2001 +From: Ajrat Makhmutov +Date: Wed, 18 Nov 2026 14:33:47 +0000 +Subject: [PATCH] fix(opencv): Restore matrix initialization with OpenCV 5 + +OpenCV 5 removed the comma initializer used by the Kalman tracker +and the object-mask affine transform. + +Link: https://github.com/opencv/opencv/pull/29948 +Link: https://bugzilla.altlinux.org/show_bug.cgi?id=61513 +--- + src/CVObjectDetection.cpp | 4 ++-- + src/sort_filter/KalmanTracker.cpp | 18 +++++++++--------- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/src/CVObjectDetection.cpp b/src/CVObjectDetection.cpp +index 7f3c0c1aa..1f8512480 100644 +--- a/src/CVObjectDetection.cpp ++++ b/src/CVObjectDetection.cpp +@@ -159,9 +159,9 @@ CVObjectMaskData TransformMaskToBox( + + const double xScale = targetMaskBox.width / sourceMaskBox.width; + const double yScale = targetMaskBox.height / sourceMaskBox.height; +- cv::Mat transform = (cv::Mat_(2, 3) << ++ const cv::Matx23d transform{ + xScale, 0.0, targetMaskBox.x - xScale * sourceMaskBox.x, +- 0.0, yScale, targetMaskBox.y - yScale * sourceMaskBox.y); ++ 0.0, yScale, targetMaskBox.y - yScale * sourceMaskBox.y}; + + cv::Mat source = DecodeBinaryMaskRLE(sourceMask); + cv::Mat transformed; +diff --git a/src/sort_filter/KalmanTracker.cpp b/src/sort_filter/KalmanTracker.cpp +index 2552a0450..5f2ce987b 100644 +--- a/src/sort_filter/KalmanTracker.cpp ++++ b/src/sort_filter/KalmanTracker.cpp +@@ -22,15 +22,15 @@ void KalmanTracker::init_kf( + + measurement = Mat::zeros(measureNum, 1, CV_32F); + +- kf.transitionMatrix = (Mat_(8, 8) << 1, 0, 0, 0, 1, 0, 0, 0, +- +- 0, 1, 0, 0, 0, 1, 0, 0, +- 0, 0, 1, 0, 0, 0, 1, 0, +- 0, 0, 0, 1, 0, 0, 0, 1, +- 0, 0, 0, 0, 1, 0, 0, 0, +- 0, 0, 0, 0, 0, 1, 0, 0, +- 0, 0, 0, 0, 0, 0, 1, 0, +- 0, 0, 0, 0, 0, 0, 0, 1); ++ kf.transitionMatrix = Mat(Matx{ ++ 1, 0, 0, 0, 1, 0, 0, 0, ++ 0, 1, 0, 0, 0, 1, 0, 0, ++ 0, 0, 1, 0, 0, 0, 1, 0, ++ 0, 0, 0, 1, 0, 0, 0, 1, ++ 0, 0, 0, 0, 1, 0, 0, 0, ++ 0, 0, 0, 0, 0, 1, 0, 0, ++ 0, 0, 0, 0, 0, 0, 1, 0, ++ 0, 0, 0, 0, 0, 0, 0, 1}); + + setIdentity(kf.measurementMatrix); + setIdentity(kf.processNoiseCov, Scalar::all(1e-1)); diff --git a/srcpkgs/libopenshot/template b/srcpkgs/libopenshot/template index 6bbec8b7678974..5fbf28bf75e0b4 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.1.1 +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=c5d650629b4104ec4368a2e3c183482e07de3e342d78d1e26f1cb297f9973439 + +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..ab1f693ef7163d 100644 --- a/srcpkgs/mlt7/template +++ b/srcpkgs/mlt7/template @@ -1,11 +1,11 @@ # 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 - qt5-host-tools qt5-qmake qt6-base qt6-tools" + qt5-host-tools qt5-qmake qt6-base qt6-tools graphviz" makedepends="alsa-lib-devel ffmpeg6-devel gtk+-devel jack-devel ladspa-sdk libexif-devel libsamplerate-devel libxml2-devel sox-devel SDL2_image-devel fftw-devel frei0r-plugins python3-devel pulseaudio-devel movit-devel 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 f4b2b0c2680d0e..58df4381b24efb 100644 --- a/srcpkgs/nomacs/template +++ b/srcpkgs/nomacs/template @@ -1,7 +1,7 @@ # Template file for 'nomacs' pkgname=nomacs version=3.22.5 -revision=1 +revision=2 build_wrksrc=ImageLounge build_style=cmake configure_args="-DCMAKE_BUILD_TYPE=None -DENABLE_TRANSLATIONS=1 diff --git a/srcpkgs/opencv/patches/fix-std.patch b/srcpkgs/opencv/patches/fix-std.patch new file mode 100644 index 00000000000000..44f0a5ede9ed69 --- /dev/null +++ b/srcpkgs/opencv/patches/fix-std.patch @@ -0,0 +1,21 @@ +--- 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 + +--- 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 6e713c112c2d09..52f6edef18dd62 100644 --- a/srcpkgs/opencv/template +++ b/srcpkgs/opencv/template @@ -1,7 +1,7 @@ # Template file for 'opencv' pkgname=opencv -version=4.12.0 -revision=3 +version=5.1.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" -makedepends="ffmpeg6-devel libpng-devel libjpeg-turbo-devel tiff-devel +hostmakedepends="pkg-config eigen python3-numpy python3-setuptools protobuf protobuf-devel" +makedepends="ffmpeg-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="638c1dae7e37e45afea21aa217dc667ad7cf57acc66cdf652c074f1e0e5ad6d2 + 6aee68285f0e7b7bf77d3656bc6568820c6f15704860fc0922def357d40ebeff" patch_args="-Np1 -d ${build_wrksrc}" # tests hang indenfinitely, even with test data included make_check=no @@ -41,6 +42,17 @@ case "$XBPS_TARGET_MACHINE" in ppc*) broken="grfmt_jpeg2000.cpp:380:48: error: lvalue required as unary '&' operand";; esac +# see https://github.com/opencv/opencv/issues/29458 for ocv_check_modules sed +# HACK: because there's a patch inside opencv_contrib +post_extract() { + vsed -e '/ocv_check_modules/d' -i opencv_contrib-${version}/modules/freetype/CMakeLists.txt + mv opencv_contrib-${version}/modules/viz opencv-${version}/modules/ +} + +post_patch() { + mv modules/viz ../opencv_contrib*/modules/ +} + libopencv_package() { short_desc+=" - library files" pkg_install() { @@ -56,7 +68,6 @@ libopencv-devel_package() { vmove usr/lib/cmake vmove usr/lib/pkgconfig vmove usr/lib/*.so - vmove usr/share/opencv4 } } @@ -67,27 +78,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..964316e197625f 100644 --- a/srcpkgs/openshot/template +++ b/srcpkgs/openshot/template @@ -1,16 +1,16 @@ # Template file for 'openshot' pkgname=openshot -version=3.3.0 +version=4.1.1 revision=1 build_style=python3-module hostmakedepends="python3 python3-setuptools" makedepends="ffmpeg6-devel python3-PyQt5" -depends="ImageMagick libopenshot python3-PyQt5-svg +depends="ImageMagick libopenshot python3-PyQt5-svg python3-defusedxml python3-PyQt5-webkit python3-httplib2 python3-pyzmq python3-requests" short_desc="Open-source, non-linear video editor for Linux" 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=d444b2ad74c19f1c2f1360c705d06cc984dae4f658f6c81e7a4373a5fb2db542 make_check=no # tests are broken diff --git a/srcpkgs/opentoonz/patches/opencv5.patch b/srcpkgs/opentoonz/patches/opencv5.patch new file mode 100644 index 00000000000000..fc8dc14cd1ee57 --- /dev/null +++ b/srcpkgs/opentoonz/patches/opencv5.patch @@ -0,0 +1,32 @@ +# https://gitlab.archlinux.org/archlinux/packaging/packages/opentoonz/-/blob/main/opencv-5.patch?ref_type=heads +diff --git a/toonz/sources/toonz/penciltestpopup.h b/toonz/sources/toonz/penciltestpopup.h +index ca042a0b2..fe9507627 100644 +--- a/toonz/sources/toonz/penciltestpopup.h ++++ b/toonz/sources/toonz/penciltestpopup.h +@@ -7,6 +7,7 @@ + #include "toonzqt/lineedit.h" + #include "toonz/namebuilder.h" + #include "opencv2/opencv.hpp" ++#include + #include "tfilepath.h" + #include "toonz/tproject.h" + #include "filebrowserpopup.h" +diff --git a/toonz/sources/stdfx/iwa_bloomfx.h b/toonz/sources/stdfx/iwa_bloomfx.h +index a7322d8aa..aa8ec3bae 100644 +--- a/toonz/sources/stdfx/iwa_bloomfx.h ++++ b/toonz/sources/stdfx/iwa_bloomfx.h +@@ -16,6 +16,7 @@ value + #include "stdfx.h" + #include "tfxparam.h" + #include ++#include + + class Iwa_BloomFx : public TStandardRasterFx { + FX_PLUGIN_DECLARATION(Iwa_BloomFx) +@@ -62,4 +63,4 @@ public: + bool tileIsLinear) const override; + }; + +-#endif +\ No newline at end of file ++#endif diff --git a/srcpkgs/opentoonz/template b/srcpkgs/opentoonz/template index a6fadd2e02d973..23ec026dd17160 100644 --- a/srcpkgs/opentoonz/template +++ b/srcpkgs/opentoonz/template @@ -1,7 +1,7 @@ # Template file for 'opentoonz' pkgname=opentoonz -version=1.7.1 -revision=4 +version=1.8.0 +revision=1 build_wrksrc="toonz/sources" build_style=cmake make_cmd=make @@ -15,7 +15,7 @@ maintainer="Orphaned " license="BSD-3-Clause" homepage="https://opentoonz.github.io/e/" distfiles="https://github.com/opentoonz/opentoonz/archive/v${version}.tar.gz" -checksum=d0daf60d06510efe15d0db3f9eed0162499ed58061504dca27892c2b9ea5f22d +checksum=4bfcc012cac5f52358250ba5b6aaffb9311760377d4bfd6a542d4e2b71d1e05e export CMAKE_GENERATOR="Unix Makefiles" 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 cc46d848b7691c..3285fb3ce37f10 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 347de01c29f3b7..9d1d7b92e5981d 100644 --- a/srcpkgs/removed-packages/template +++ b/srcpkgs/removed-packages/template @@ -509,8 +509,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 @@ -669,6 +673,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/patches/musl.patch b/srcpkgs/retroshare/patches/musl.patch new file mode 100644 index 00000000000000..e759cfc41fd8d6 --- /dev/null +++ b/srcpkgs/retroshare/patches/musl.patch @@ -0,0 +1,313 @@ +--- a/libretroshare/src/ft/ftfileprovider.cc ++++ b/libretroshare/src/ft/ftfileprovider.cc +@@ -196,7 +196,7 @@ + /* + * seek for base_loc + */ +- if(fseeko64(fd, base_loc, SEEK_SET) == -1) ++ if(fseeko(fd, base_loc, SEEK_SET) == -1) + { + #ifdef DEBUG_FT_FILE_PROVIDER + std::cerr << "ftFileProvider::getFileData() Failed to seek. Data_size=" << data_size << ", base_loc=" << base_loc << " !" << std::endl; + +--- a/libretroshare/src/pgp/pgphandler.cc ++++ b/libretroshare/src/pgp/pgphandler.cc +@@ -1918,13 +1918,13 @@ + + bool PGPHandler::locked_syncPublicKeyring() + { +- struct stat64 buf ; ++ struct stat buf ; + #ifdef WINDOWS_SYS + std::wstring wfullname; + librs::util::ConvertUtf8ToUtf16(_pubring_path, wfullname); + if(-1 == _wstati64(wfullname.c_str(), &buf)) + #else +- if(-1 == stat64(_pubring_path.c_str(), &buf)) ++ if(-1 == stat(_pubring_path.c_str(), &buf)) + #endif + std::cerr << "PGPHandler::syncDatabase(): can't stat file " << _pubring_path << ". Can't sync public keyring." << std::endl; + +@@ -1962,13 +1962,13 @@ + + bool PGPHandler::locked_syncTrustDatabase() + { +- struct stat64 buf ; ++ struct stat buf ; + #ifdef WINDOWS_SYS + std::wstring wfullname; + librs::util::ConvertUtf8ToUtf16(_trustdb_path, wfullname); + if(-1 == _wstati64(wfullname.c_str(), &buf)) + #else +- if(-1 == stat64(_trustdb_path.c_str(), &buf)) ++ if(-1 == stat(_trustdb_path.c_str(), &buf)) + #endif + { + std::cerr << "PGPHandler::syncDatabase(): can't stat file " << _trustdb_path << ". Will force write it." << std::endl; + +--- a/libretroshare/src/ft/ftfilecreator.cc +@@ -66,7 +66,7 @@ + rstime_t now = time(NULL) ; + _creation_time = now ; + +- struct stat64 buf; ++ struct stat buf; + + // Initialise last recv time stamp to last modification time for the partial file. + // +@@ -75,7 +75,7 @@ + librs::util::ConvertUtf8ToUtf16(file_name, wfullname); + if ( 0 == _wstati64(wfullname.c_str(), &buf)) + #else +- if ( 0 == stat64(file_name.c_str(), &buf)) ++ if ( 0 == stat(file_name.c_str(), &buf)) + #endif + _last_recv_time_t = buf.st_mtime ; + else +@@ -212,7 +212,7 @@ + /* + * go to the offset of the file + */ +- if (0 != fseeko64(this->fd, offset, SEEK_SET)) ++ if (0 != fseeko(this->fd, offset, SEEK_SET)) + { + std::cerr << "ftFileCreator::addFileData() Bad fseek at offset " << offset << ", fd=" << (void*)(this->fd) << ", size=" << mSize << ", errno=" << errno << std::endl; + return 0; +@@ -733,7 +733,7 @@ + unsigned char *buff = new unsigned char[chunk_size] ; + uint32_t len ; + +- if(fseeko64(fd,(uint64_t)chunk_number * (uint64_t)chunk_size,SEEK_SET)==0 && (len = fread(buff,1,chunk_size,fd)) > 0) ++ if(fseeko(fd,(uint64_t)chunk_number * (uint64_t)chunk_size,SEEK_SET)==0 && (len = fread(buff,1,chunk_size,fd)) > 0) + { + Sha1CheckSum comp = RsDirUtil::sha1sum(buff,len) ; + +--- a/libretroshare/src/ft/ftdatamultiplex.cc ++++ b/libretroshare/src/ft/ftdatamultiplex.cc +@@ -710,7 +710,7 @@ + return false ; + } + uint32_t len ; +- if(fseeko64(fd,(uint64_t)chunk_number * (uint64_t)ChunkMap::CHUNKMAP_FIXED_CHUNK_SIZE,SEEK_SET)!=0 || 0==(len = fread(buf,1,ChunkMap::CHUNKMAP_FIXED_CHUNK_SIZE,fd))) ++ if(fseeko(fd,(uint64_t)chunk_number * (uint64_t)ChunkMap::CHUNKMAP_FIXED_CHUNK_SIZE,SEEK_SET)!=0 || 0==(len = fread(buf,1,ChunkMap::CHUNKMAP_FIXED_CHUNK_SIZE,fd))) + { + std::cerr << "Cannot fseek/read from file " << filename << " at position " << (uint64_t)chunk_number * (uint64_t)ChunkMap::CHUNKMAP_FIXED_CHUNK_SIZE << std::endl; + fclose(fd) ; + +@@ -346,14 +346,14 @@ + return (CopyFileW(sourceW.c_str(), destW.c_str(), FALSE) != 0); + + #else +- FILE *in = fopen64(source.c_str(),"rb") ; ++ FILE *in = fopen(source.c_str(),"rb") ; + + if(in == NULL) + { + return false ; + } + +- FILE *out = fopen64(dest.c_str(),"wb") ; ++ FILE *out = fopen(dest.c_str(),"wb") ; + + if(out == NULL) + { +@@ -409,8 +409,8 @@ + val = _wstat(wfilename.c_str(), &buf); + st_mode = buf.st_mode; + #else +- struct stat64 buf; +- val = stat64(filename.c_str(), &buf); ++ struct stat buf; ++ val = stat(filename.c_str(), &buf); + st_mode = buf.st_mode; + #endif + if (val == -1) +@@ -605,9 +605,9 @@ + //unsigned char gblBuf[512]; + + /* determine size */ +- fseeko64(fd, 0, SEEK_END); +- size = ftello64(fd); +- fseeko64(fd, 0, SEEK_SET); ++ fseeko(fd, 0, SEEK_END); ++ size = ftello(fd); ++ fseeko(fd, 0, SEEK_SET); + + /* check if thread is running */ + bool isRunning = thread ? thread->isRunning() : true; +@@ -826,7 +826,7 @@ + + return _wfopen(wfilename.c_str(), wmode.c_str()); + #else +- return fopen64(filename, mode); ++ return fopen(filename, mode); + #endif + } + +@@ -1292,15 +1292,15 @@ + /***** XXX TO MAKE WIDE SYSTEM CALL ******************************************************/ + std::string fp(filepath.begin(), filepath.end()); + +- if (NULL == (fd = fopen64(fp.c_str(), "rb"))) ++ if (NULL == (fd = fopen(fp.c_str(), "rb"))) + return false; + + /***** XXX TO MAKE WIDE SYSTEM CALL ******************************************************/ + + /* determine size */ +- fseeko64(fd, 0, SEEK_END); +- size = ftello64(fd); +- fseeko64(fd, 0, SEEK_SET); ++ fseeko(fd, 0, SEEK_END); ++ size = ftello(fd); ++ fseeko(fd, 0, SEEK_SET); + + SHA1_Init(sha_ctx); + while((len = fread(gblBuf,1, 512, fd)) > 0) + +--- a/libretroshare/src/rsserver/rsaccounts.cc ++++ b/libretroshare/src/rsserver/rsaccounts.cc +@@ -534,7 +534,7 @@ + return false ; + } + +- struct stat64 buf; ++ struct stat buf; + + for(;dirIt.isValid();dirIt.next()) + { +@@ -550,7 +550,7 @@ + librs::util::ConvertUtf8ToUtf16(fullname, wfullname); + if (-1 != _wstati64(wfullname.c_str(), &buf)) + #else +- if (-1 != stat64(fullname.c_str(), &buf)) ++ if (-1 != stat(fullname.c_str(), &buf)) + #endif + + { + +--- a/libretroshare/src/util/folderiterator.cc ++++ b/libretroshare/src/util/folderiterator.cc +@@ -50,14 +50,14 @@ + + // Grab the last modification time for the directory + +- struct stat64 buf ; ++ struct stat buf ; + + #ifdef WINDOWS_SYS + std::wstring wfullname; + librs::util::ConvertUtf8ToUtf16(folderName, wfullname); + if ( 0 == _wstati64(wfullname.c_str(), &buf)) + #else +- if ( 0 == stat64(folderName.c_str(), &buf)) ++ if ( 0 == stat(folderName.c_str(), &buf)) + #endif + { + mFolderModTime = buf.st_mtime ; +@@ -153,7 +153,7 @@ + } + #endif + +- struct stat64 buf ; ++ struct stat buf ; + + #ifdef DEBUG_FOLDER_ITERATOR + std::cerr << "FolderIterator: next. Looking into file " << mFileName ; +@@ -164,7 +164,7 @@ + librs::util::ConvertUtf8ToUtf16(mFullPath, wfullname); + if ( 0 == _wstati64(wfullname.c_str(), &buf)) + #else +- if ( 0 == stat64(mFullPath.c_str(), &buf)) ++ if ( 0 == stat(mFullPath.c_str(), &buf)) + #endif + { + mFileModTime = buf.st_mtime ; + +--- a/libretroshare/src/util/rsdiscspace.cc ++++ b/libretroshare/src/util/rsdiscspace.cc +@@ -106,9 +106,9 @@ + free_blocks = buf.f_bavail; + block_size = buf.f_frsize ; + #else +- struct statvfs64 buf; ++ struct statvfs buf; + +- if (0 != statvfs64 (file, &buf)) ++ if (0 != statvfs (file, &buf)) + { + std::cerr << "Size estimate failed for file " << file << std::endl ; + return false; + +--- a/libretroshare/src/util/rsdir.cc ++++ b/libretroshare/src/util/rsdir.cc +@@ -345,14 +345,14 @@ + return (CopyFileW(sourceW.c_str(), destW.c_str(), FALSE) != 0); + + #else +- FILE *in = fopen64(source.c_str(),"rb") ; ++ FILE *in = fopen(source.c_str(),"rb") ; + + if(in == NULL) + { + return false ; + } + +- FILE *out = fopen64(dest.c_str(),"wb") ; ++ FILE *out = fopen(dest.c_str(),"wb") ; + + if(out == NULL) + { +@@ -408,8 +408,8 @@ + val = _wstat(wfilename.c_str(), &buf); + st_mode = buf.st_mode; + #else +- struct stat64 buf; +- val = stat64(filename.c_str(), &buf); ++ struct stat buf; ++ val = stat(filename.c_str(), &buf); + st_mode = buf.st_mode; + #endif + if (val == -1) +@@ -604,9 +604,9 @@ + //unsigned char gblBuf[512]; + + /* determine size */ +- fseeko64(fd, 0, SEEK_END); +- size = ftello64(fd); +- fseeko64(fd, 0, SEEK_SET); ++ fseeko(fd, 0, SEEK_END); ++ size = ftello(fd); ++ fseeko(fd, 0, SEEK_SET); + + /* check if thread is running */ + bool isRunning = thread ? thread->isRunning() : true; +@@ -825,7 +825,7 @@ + + return _wfopen(wfilename.c_str(), wmode.c_str()); + #else +- return fopen64(filename, mode); ++ return fopen(filename, mode); + #endif + } + +@@ -1291,15 +1291,15 @@ + /***** XXX TO MAKE WIDE SYSTEM CALL ******************************************************/ + std::string fp(filepath.begin(), filepath.end()); + +- if (NULL == (fd = fopen64(fp.c_str(), "rb"))) ++ if (NULL == (fd = fopen(fp.c_str(), "rb"))) + return false; + + /***** XXX TO MAKE WIDE SYSTEM CALL ******************************************************/ + + /* determine size */ +- fseeko64(fd, 0, SEEK_END); +- size = ftello64(fd); +- fseeko64(fd, 0, SEEK_SET); ++ fseeko(fd, 0, SEEK_END); ++ size = ftello(fd); ++ fseeko(fd, 0, SEEK_SET); + + SHA1_Init(sha_ctx); + while((len = fread(gblBuf,1, 512, fd)) > 0) 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/cross.patch b/srcpkgs/siril/patches/cross.patch deleted file mode 100644 index ea3bffa6131d22..00000000000000 --- a/srcpkgs/siril/patches/cross.patch +++ /dev/null @@ -1,15 +0,0 @@ -get_variable doesn't respect the target sysroot on cross - ---- a/meson.build -+++ b/meson.build -@@ -285,9 +285,8 @@ - opencv4_dep = dependency('opencv4', required : true, version: '>= 4.2.0') - # checking required opencv modules - opencv_symbols = ['HAVE_OPENCV_CORE', 'HAVE_OPENCV_IMGPROC', 'HAVE_OPENCV_CALIB3D', 'HAVE_OPENCV_STITCHING'] --opencv_incdir = '-I'+opencv4_dep.get_variable(pkgconfig : 'includedir') - foreach s : opencv_symbols -- cpp.has_header_symbol('opencv2/opencv_modules.hpp', s, args: [opencv_incdir], required : true) -+ cpp.has_header_symbol('opencv2/opencv_modules.hpp', s, dependencies: opencv4_dep, required : true) - endforeach - - rtprocess_dep = dependency('rtprocess', required : false) diff --git a/srcpkgs/siril/patches/opencv-mat.patch b/srcpkgs/siril/patches/opencv-mat.patch new file mode 100644 index 00000000000000..efcea6286f6af1 --- /dev/null +++ b/srcpkgs/siril/patches/opencv-mat.patch @@ -0,0 +1,15 @@ +--- a/src/opencv/opencv.cpp ++++ b/src/opencv/opencv.cpp +@@ -998,7 +998,11 @@ + // computing the maximum error + double err = 0., norm2; + for (int i = 0; i < n; i++) { +- res = H * (Mat_(3,1) << star_array_out[i].x - 0.5, star_array_out[i].y - 0.5, 1) - (Mat_(3,1) << star_array_in[i].x - 0.5, star_array_in[i].y - 0.5, 1); ++ double outarr[] = { star_array_out[i].x - 0.5, star_array_out[i].y - 0.5, 1.0 }; ++ double inarr[] = { star_array_in[i].x - 0.5, star_array_in[i].y - 0.5, 1.0 }; ++ cv::Mat matout(3, 1, CV_64F, outarr); ++ cv::Mat matin(3, 1, CV_64F, inarr); ++ res = H * matout - matin; + norm2 = cv::norm(res); + if (norm2 > err) err = norm2; + } diff --git a/srcpkgs/siril/template b/srcpkgs/siril/template index 5fbc870e705cf0..9dfaccff4bbc87 100644 --- a/srcpkgs/siril/template +++ b/srcpkgs/siril/template @@ -1,7 +1,7 @@ # Template file for 'siril' pkgname=siril -version=1.4.4 -revision=3 +version=1.4.5 +revision=1 build_style=meson meson_builddir=mbuild hostmakedepends="pkg-config cmake-bootstrap glib-devel" @@ -15,16 +15,15 @@ maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://www.siril.org/" distfiles="https://free-astro.org/download/siril-${version}.tar.bz2" -checksum=b1682f2129d2e06b034445ed225766a06e38cfaa7451b92d606a3ee36eb077a4 +checksum=ed30edc3535d6f8fde2cf84f23039db7c87380f16df740936bdc75362fa50a6d export PATH="$PATH:/usr/libexec/xbps-src/bin" +CFLAGS="-fcommon" if [ "$XBPS_TARGET_LIBC" = "musl" ]; then makedepends+=" libexecinfo-devel" fi -CFLAGS="-fcommon" - pre_configure() { if [ "$XBPS_TARGET_LIBC" = "musl" ]; then vsed -e "s|rdynamic..|&\n siril_link_arg += ['-lexecinfo']|" -i meson.build 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"