diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-02-04 17:43:06 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-02-04 17:43:06 +0000 |
commit | 27ad6a285576ce16e4c74d806efee77166f0c3c6 (patch) | |
tree | a24d8faefbaa796b7f97c5f8aac57c68f8958001 /media-libs | |
parent | 11300a8104238529425a7b6651499bf195bf1839 (diff) |
gentoo auto-resync : 04:02:2024 - 17:43:06
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/Manifest.gz | bin | 69170 -> 69165 bytes | |||
-rw-r--r-- | media-libs/opencv/Manifest | 13 | ||||
-rw-r--r-- | media-libs/opencv/files/opencv-4.8.0-fix-flatbuffer.patch | 31 | ||||
-rw-r--r-- | media-libs/opencv/files/opencv-4.8.1-protobuf-22.patch | 190 | ||||
-rw-r--r-- | media-libs/opencv/metadata.xml | 1 | ||||
-rw-r--r-- | media-libs/opencv/opencv-4.8.0-r3.ebuild | 593 | ||||
-rw-r--r-- | media-libs/opencv/opencv-4.8.1-r1.ebuild | 4 |
7 files changed, 196 insertions, 636 deletions
diff --git a/media-libs/Manifest.gz b/media-libs/Manifest.gz Binary files differindex 7763be201204..56007607dfbc 100644 --- a/media-libs/Manifest.gz +++ b/media-libs/Manifest.gz diff --git a/media-libs/opencv/Manifest b/media-libs/opencv/Manifest index 319445d63332..210fb7d2e4be 100644 --- a/media-libs/opencv/Manifest +++ b/media-libs/opencv/Manifest @@ -5,12 +5,12 @@ AUX opencv-4.4.0-disable-native-cpuflag-detect.patch 1218 BLAKE2B 06569f6b7d33ec AUX opencv-4.5.0-link-with-cblas-for-lapack.patch 726 BLAKE2B adbffd961c88229bf810e13fe20705352ff506a653c1d55bb0687c03d8daf9e05aed0f2ba9cd6e306c625837d6ddf64eeb99dc6cbf2b15fae833f4a7eea6aad0 SHA512 4c3108e304721c2cd78eb82f5d7bccc18831db5f47bc628a98ae6a37da389deef30e7e9b6dc5644e3bc0e0fafdd907dc37822a58a25555999698527d2ac364b0 AUX opencv-4.8.0-arm64-fp16.patch 12222 BLAKE2B 18803d74cb57bbc303c8159ca69d24dcc47d00a314bfdababeadd3b85306d289c8b35a1106011086931396e0ab82d98964434d0c0eaa34c25451c766ca9b9199 SHA512 1d9d42a711a1ae0ec7f1f641a68271d4b36f6b8701997a05d65c633d3531cad75e4edbf71c4f80cc59a9a14baa8ddebf19081dc67b99898dce13da8e3746227e AUX opencv-4.8.0-fix-cuda-12.2.0.patch 1920 BLAKE2B c43157c4859666a962fa40ed435aeab6b17ac01b9b67dbba0955fb7c009504b1780f5de2a40ee63db245cadf0da41b40fda0d7e06ad719071b12ba385f693ea2 SHA512 5ab0c15811748307971e8939a40c08c2c9cf3e38d2acafff72a3890f6d7c7133d8c7a087cf1a05b2dbe1907dd88911872c61c10f7638edb46ee679f658b265c6 -AUX opencv-4.8.0-fix-flatbuffer.patch 1764 BLAKE2B 806f61bf7017fbcb5b5058686db9dd2272eb61d6a2952f0f029bc76d62172a18f9a21661426f13cfd5066fc60710b218bb9b2dfded61e33040469da0e0b72c94 SHA512 2679f52c3df16b7daac1fafa0b24796568a2555de03805ee6ee6b2e08a2be9f63fca44c1b472f5ffe2dfb7fe8b3d754b3ba39a71419974613a9b3de70a09cefb AUX opencv-4.8.1-ade-0.1.2a.tar.gz.patch 652 BLAKE2B 91b933513485c5e4a33b3711328f01752ea8f77bf26701744ff9a7d56f899227c1f5899dd68ec7050929c2068e2d5dc805533173543ac0ab5a5db827a6d075c3 SHA512 61267dae88ca1e9f5d99e6d57101c0a0a2df2bc5fc9f646d14953707f8c1f4fc9f58e7861b007f5970603f267f797c43cbc35e29aa66e343fcfa6e568750934e AUX opencv-4.8.1-drop-python2-detection.patch 1041 BLAKE2B bd7c4f66b36d04b57a4493df1b00ee6700ed6f28464f2538bde62d2b2a3d29ebb82946a1765540e6977ce6ee111dc2f37c3419ee74536f9c55340ae2e550d48a SHA512 7e5e36fa1fc312a4c791c099618c73b2f4ed5810a66f4de4ead5d0f5917d60c191c55289538bf908bcfa45522939ddfac62505e79fbfb7c3ea046a2027b576ff AUX opencv-4.8.1-eliminate-lto-compiler-warnings.patch 1241 BLAKE2B eead5a16616fd9afcced21180e8e336e32ad387ff4010c55e5edcf2f81f09244c4914c98ab0439911f5ab8df1f61527a83ff5f09db65743fc5266748fc8bf969 SHA512 b3907b9d9f96f107fd27189961fe1a15b5706f66524cf21ea342ed04eedfa21c08d7572001d3afb70c54a7bfef56093fd7f8ac7a5dd9ea768f1b0412b5658eec AUX opencv-4.8.1-libpng16.patch 2299 BLAKE2B 2aa6e7c2e35106b5c9243ad04b55eff650dc5351d73eafa2d4f703e2a965992c2145ba80f32e5e3c8a35b2370f301cb716387d9366cfc729add455a734243f6d SHA512 35b5441e78e7f62e5965350e1eae3060f258be26ac27d5a8c723b18b14e381327bb202409dfa0915ee81903b4f5ca660abd689967119ee6b3eb3bdb32072be4f AUX opencv-4.8.1-opencv_test.patch 724 BLAKE2B 0b56c5a7a9bd86c0d85b740284f00ecddecf2a36319565074cf23966599adf632747d67dac0dd55471a4110b157173849558920fe8cc2fa4b7126542eb546fac SHA512 a1ba01ce63f27fd8f3197860af5153940a4e751bb56cec2cd978ca3c1495da9ee9bac8e70187f1e6ef0a7d3585f8625f79753b10c41500344d35104b4f774795 +AUX opencv-4.8.1-protobuf-22.patch 6895 BLAKE2B 5f4f6d249f523de5722b628cd2233b0bb14ea2cd6fe72d221dfbdb5561a821c592d24a306022900b5efc6b71e8f135e4a537bd96d09756c8d5ccd29fad8b2a55 SHA512 63f43ea4e91726937aaa8b538d79503a3654f9a873d0398667c65e1c706ce1c591d64731970147ef82726fb2646817d439ca12b513616809e03794b57e8486ef AUX opencv-4.8.1-python3_12-support.patch 1354 BLAKE2B 6f1e5c7b8c3ddd3bbbe3bc9f4123ef114312155cab5eec34e431574cbc7e564f1ac87152a8adf11af75d386b2701bf4f7c337eb1941a6c699170b400013d5683 SHA512 2638f1cfb638de73e5e8a46b415844961d02ae9f398d9748535ec392c410ece010b3ee8d82a6510a153879f213aa07008f445e1cfa1144e7fd9ffbfe13e94e82 AUX opencv-4.8.1-use-system-flatbuffers.patch 1522 BLAKE2B a9000e3269266cf9e85b6ba247fd977eb1c2e0bf771d0ba1432ba1f56802f72062402e55e7327e91085be870338e452ac08ec8a958d3cf51fdd9a8daf0cfee76 SHA512 50d7ee7de6513ea56974c598641c2d9edb7679f273f6313c1dd7e68ba667688ad50fd61691661702fab75ddfa1165cd96a52ebebd19c8c09116612c90c8b11d3 AUX opencv-4.8.1-use-system-opencl.patch 933 BLAKE2B 557448d74771f6b9fc8b2fa5af79e6287c1dbad9a6c5dabe520080c7481d033002164cbfdd5a767d3b4cc54ec1344423ea8a0bbbd13a873ca955d95787924d10 SHA512 1602b74e829cd8842efbe6535e91a426a88c9ae08280d863bc4150cbe2a9d3ebef02b2abe98ee470f26412bb6fca653529492bf54b87f4d53fe20f242ef03771 @@ -18,11 +18,6 @@ AUX opencv_contrib-4.8.1-NVIDIAOpticalFlowSDK-2.0.tar.gz.patch 1158 BLAKE2B c4b1 AUX opencv_contrib-4.8.1-rgbd.patch 477 BLAKE2B 0120e631199d7099bae437d459f0c950c3cbd11e5f0a900d687ca5aedf1d7602f7faa3be5ba1a9b3e0758f3fd70574450f97bd7429e447df7440d58326ceb99b SHA512 6fe2ef40bf26d40e4f52d84b17183f6e536b2fe51bf65266be6a59865def0b9c074aa5eff58a60d673afec776a7ba03acaba667c917b78751950b77f68759d96 DIST NVIDIAOpticalFlowSDK-edb50da3cf849840d680249aa6dbef248ebce2ca.tar.gz 8771 BLAKE2B f579960448bdaf57fbefd5e88002d8f6f4dbb828429b0f3a0112916c03039d4e4de65263eb8464a4d62924c1b77f0a61c2d93b7307657439bfbf7d59785f1533 SHA512 85dfdc52260f54f62c980508f4b6ab384e44200bd1c13761c4947f9a898c08f0faed2d734a85a4ba7a46f8788ed58ee89f12f61cee97881b69ba626bbd04f655 DIST ade-0.1.2a.tar.gz 116737 BLAKE2B 9ac2af2f21aab8cb5d599e0b653bb6126642588e508f55e5fbfe5ce9607267f25e5187fd31ed69349064551c06e15b2ba548319708ed5f70e7761470775cc6e0 SHA512 d3ed210ff25f4c05393b0039cb4a73a6ceb8b42ba3d776e0469da2362899d3f76564cc6a06965b7de91f38517e1cd4ff4b18c00185d2b1a0af5a34ecf0d9dd44 -DIST opencv-3.4.0-face_landmark_model.tar.gz 63299830 BLAKE2B 58f08cd8c030ee1c8b66e76a561fd625e112face427d001185f8d7c0eaace55adbd8474663021841a1382bfe393a210e64c51223441713cdb9156fac866a845c SHA512 2cd29ce42c08b2966db3ef4a2bc217ab3d07051819757ec6de8f3deea29e28f60abab39f101dba03f766f17018598e411bd687a7eaab0c681c113e10a2de2b23 -DIST opencv-3.4.0-res10_300x300-caffeemodel.tar.gz 10036604 BLAKE2B 2a2de48fc420f13e7be146ac88f311901c5b4e409c30e466152e33cae1f8afd87dcb6d758af447c268d90bd67989c8798cd80cab172b10499a6ad5224509dbdf SHA512 96fee9f447d5739bc01a5cab37c453cf7237457dfb5d2bf93ac37f8e5aa557ac222316f449cd58e37e856abe4d8e9d4a7820daaba32f0b22cbcde8e340287d4b -DIST opencv-4.4.0_extdep.tar.gz 65334871 BLAKE2B 89fa0083da428e986bb4287295bdbff626d0f84866377413649c1d7ca77338288141f22d2a3c0b64d6d0fc1db98f918c8b33a665274cee4c4aefb44359e4333d SHA512 7b758099ce4abef151051e3e9e1e45b73e4054669d3aa53051e4d4c5f43d9373c9bda5ecbce51f6b024562cb566bd1117505af29ab5f3c36a493f185111a3b4e -DIST opencv-4.8.0.tar.gz 91992565 BLAKE2B eede5479acdcef7dfb49d260b696ed14e85a27b8cd7211934d3fa9df9a46072daca9e1b7c50d1d56633d5e7bdf96e4a5731c8ea0e04886dc381e7864357ed8de SHA512 48738c3e7460a361274357aef1dd427082ccd59f749d6317d92a414b3741ce6116ea15ed4fedd2d47a25e456c705f3ba114357558646097bfc0e6dba9b3b865c -DIST opencv-4.8.0_contrib.tar.gz 59201076 BLAKE2B e30c4f17e1e89c8b0821bbf8ea44b6b4ce505ad2761222a8b119c5aee5ae4ef50e06a73f41fee3b2fa60b71c736989904f6d1fb31a16abfe39e605e2d32d851b SHA512 81cc41cfe1ea03e60b0657edeaa76a90926e5e79a9f93a482e17bc9edbf1b5ce36b13d108fd8fb097f2fb3d6381fbeb102811f44bfc761c2de7f69bf3c5298a1 DIST opencv-4.8.1.tar.gz 92006711 BLAKE2B 54728a37e3e8a528bd8d2e6df5963a996820a51160d05ac72b350234ce5372f99c037af96e13c55de1452e517fffb478c2335b9e1cbc07a36c78f99351eabd58 SHA512 b98d89b8e7b8ae8138bce00c5226816b761b53fbeb8f28ca516e08c5d130f216f9388a81785cd6684034530f768e097cbe12f19a9361f362b7d2048bfc427a65 DIST opencv-4.8.1_contrib.tar.gz 59200293 BLAKE2B 8cf3ee60cb38a9fa2649013b9b4704022abe5cc65c331078dc7ea87028bc99df8b0de12f835905f5bb5c00a811f256754cac018ca8e02739ac5c6fe36aa4346d SHA512 e3df49e6a1411f55eebbc02f4534ddefabff961b4f63c69b21fe06ff3df894773a8643ab0cb123b83c2bdc8fa02698b332d3c243e8546c894e6c6c8ecaa65500 DIST opencv_3rdparty-34e4206aef44d50e6bbcd0ab06354b52e7466d26.tar.gz 397901 BLAKE2B 9adbe14ee3a2c90b890be694aa80d65b67e23a23f47ccabee4564e31eb9857d717b5a751df32004cfa5d6a53a9e1d8ea8d8943b705a0eaea5ca741169e2222f6 SHA512 8a92555aed2ac8752818586ab9762dd96ec128c5465cb87e402f15b15d16f7d371b3de045ef7295526e9ef99ec817766bb685a21d24dba29c650cf44e384a4e3 @@ -30,7 +25,5 @@ DIST opencv_3rdparty-8afa57abc8229d611c4937165d20e2a2d9fc5a12.tar.gz 63301261 BL DIST opencv_3rdparty-a8b69ccc738421293254aec5ddb38bd523503252.tar.gz 920403 BLAKE2B 5f834e8ccef9d88d0650f8ae5d215a2d07d0a356aaad4de1622068e0b2a7def88fccc84bc4397f0182732e836fcd6e363ae25a2cdeaa4d458a7d8ef9afc81da5 SHA512 5611b9db40477759213ab35320570c198f1f224f92ca801ca3accd1f7620faf3d44f306e44abefd10be118acee9b56da643ca82abaa7c4d2102fe92e5b298a6e DIST opencv_3rdparty-b2bfc75f6aea5b1f834ff0f0b865a7c18ff1459f.tar.gz 10036903 BLAKE2B c13559569808db24105049e2081bc466c0e8b6dab58bcc69001e49ff82e03ec4701e25648b5e542b7df2c8e522abfbd82c9825e66c37d6a673847b41bf6effae SHA512 3fc44f12802aa1dad0b12372d53242ae2134a2d74ca0b6d8e4639551623426106781a41d77ebfce79ac625a49aec26b0d7425e0d31f09bab6a15e3d43caef8bc DIST opencv_3rdparty-fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d.tar.gz 1470898 BLAKE2B f1794cc8f8684501f670db3d720c02f35c57ebe91f276cc21dea1f1c1426740d03569143fec74380e941703b5086db5f013ca913fb296eda99559115fd53ca30 SHA512 07118b9d688bf0ff34a6e4ca1548006124d80d11e7b48f08c9e1910b64249b1dad0ace460f50adda0ecb69b90871fc59cc25f451570c63f7c6d6ba2b92d8801c -DIST vgg_boostdesc-3.2.0.tar.gz 1867770 BLAKE2B 1fa5b58e73b6fa56ecf8d19af22298f729942ee1369082e173445d09d3de767bf844bad3d2b462efc1199c392f37c88ba49a9996ba8bfd84b4abeba7de94db63 SHA512 4a046aedd639c8eb4b295b0f499e756deb66210ca083f0124c75531e540663367cb58f6d175f66c4713324177036cd89a8869bdab2de8d1736dafc7f00ef9f44 -EBUILD opencv-4.8.0-r3.ebuild 21551 BLAKE2B dc795690c4d8672c82ce44ba3e7fb67c32206155cc18624109da4106b0eee16d03fd3591d843af6bd1b5caf0c5050c4ee75201758e8a0d764ffdb4195844f301 SHA512 f9d927735bdd34d41b0dcc9a2a7ce5944c7f40f75934b0e93574ce2619d06a0d01527a20c1320a9cfd907ce11f51dddb3de2e413796ddf9f2f90d3932db5bbac -EBUILD opencv-4.8.1-r1.ebuild 29007 BLAKE2B cd2580fc114db3fba4f40ef2b4531098bafd03febc39e287d10f71de653f1de55148803432529edebf902e17458119b469e22fae7cacfc67bd36cf4d41531423 SHA512 42114345bfc09af6933c02440ec064f8b904a79790480eeddb19a085e333ede171b74e9342496be9fe94170a853e7f0e8f3778864d54dc8e405f068c45737ed9 -MISC metadata.xml 3428 BLAKE2B 17df3db9dc912981f85b6dd7e500b593504fe6d17c85d1ebc07afa8ab04266489550b03aa20ee80615f52f8e2a206c77b00d9bfc9096bf77239378fa0874a0db SHA512 15e6dc56efd85d9b6d173979ef5edc38978cf31f0b2700674ffda5fb53923df77453234b431c21ff61943c57218f8fe4fe611701abb630c9867ed990cf953d49 +EBUILD opencv-4.8.1-r1.ebuild 29072 BLAKE2B bb02548e91bf43056200443667e4695bea73912bc1b3ac41909588cc31e13b7ac4271af3e1910bd9816833df2350450273d729988cf61e4fbc89785e7a3c74c3 SHA512 3d0ce895e1e6eab2eccd5d56be44370e1aabb77796a33b40970474c4a36f5e53051b4bbb01544dc650db0ff91bb8b45f6b67ae72039dd2204c24d24d2ce9b32f +MISC metadata.xml 3358 BLAKE2B 743310fbf9c032d8818e365d095c8facc9c5f07068098f5569cc172d6eafb8b6afd93c8d3f2eb7a0bf7d03fc30504b664545222facdf3b38271011fc6fb6dbc2 SHA512 b91fea919ce5e6aaa9af7b9f28735f749ebb700ea50689b1bbf1c5d75539a4df6bb9bfa666fbecd0e3a10eb9083b6e3a407bc8449c10c34a0084a195c9dd0315 diff --git a/media-libs/opencv/files/opencv-4.8.0-fix-flatbuffer.patch b/media-libs/opencv/files/opencv-4.8.0-fix-flatbuffer.patch deleted file mode 100644 index 395f0998a3b9..000000000000 --- a/media-libs/opencv/files/opencv-4.8.0-fix-flatbuffer.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/modules/dnn/misc/tflite/schema_generated.h 2023-06-28 19:53:33.000000000 +0800 -+++ b/modules/dnn/misc/tflite/schema_generated.h 2023-08-24 15:17:19.594480034 +0800 -@@ -8,9 +8,9 @@ - - // Ensure the included flatbuffers.h is the same version as when this file was - // generated, otherwise it may not be compatible. --static_assert(FLATBUFFERS_VERSION_MAJOR == 23 && -- FLATBUFFERS_VERSION_MINOR == 5 && -- FLATBUFFERS_VERSION_REVISION == 9, -+static_assert(FLATBUFFERS_VERSION_MAJOR == FLATBUFFERS_VERSION_MAJOR && -+ FLATBUFFERS_VERSION_MINOR == FLATBUFFERS_VERSION_MINOR && -+ FLATBUFFERS_VERSION_REVISION == FLATBUFFERS_VERSION_REVISION, - "Non-compatible flatbuffers version included"); - - namespace opencv_tflite { ---- a/cmake/OpenCVDetectFlatbuffers.cmake 2023-08-24 15:31:50.129947159 +0800 -+++ b/cmake/OpenCVDetectFlatbuffers.cmake 2023-08-24 15:36:15.176705845 +0800 -@@ -1,9 +1,9 @@ - if(WITH_FLATBUFFERS) - set(HAVE_FLATBUFFERS 1) -- set(flatbuffers_VERSION "23.5.9") -- ocv_install_3rdparty_licenses(flatbuffers "${OpenCV_SOURCE_DIR}/3rdparty/flatbuffers/LICENSE.txt") -- ocv_add_external_target(flatbuffers "${OpenCV_SOURCE_DIR}/3rdparty/flatbuffers/include" "" "HAVE_FLATBUFFERS=1") -- set(CUSTOM_STATUS_flatbuffers " Flatbuffers:" "builtin/3rdparty (${flatbuffers_VERSION})") -+ #set(flatbuffers_VERSION "23.5.9") -+ #ocv_install_3rdparty_licenses(flatbuffers "${OpenCV_SOURCE_DIR}/3rdparty/flatbuffers/LICENSE.txt") -+ #ocv_add_external_target(flatbuffers "${OpenCV_SOURCE_DIR}/3rdparty/flatbuffers/include" "" "HAVE_FLATBUFFERS=1") -+ #set(CUSTOM_STATUS_flatbuffers " Flatbuffers:" "builtin/3rdparty (${flatbuffers_VERSION})") - endif() - - if(WITH_FLATBUFFERS OR HAVE_FLATBUFFERS) diff --git a/media-libs/opencv/files/opencv-4.8.1-protobuf-22.patch b/media-libs/opencv/files/opencv-4.8.1-protobuf-22.patch new file mode 100644 index 000000000000..1e8a369777a5 --- /dev/null +++ b/media-libs/opencv/files/opencv-4.8.1-protobuf-22.patch @@ -0,0 +1,190 @@ +From 6f3dde396f6eed53afcd5cc882402e18ff7c1ca8 Mon Sep 17 00:00:00 2001 +From: Kumataro <Kumataro@users.noreply.github.com> +Date: Sat, 7 Oct 2023 10:11:25 +0900 +Subject: [PATCH] 3rdparty: supporting protobuf v22 and later + +subsumes: + +- dnn: disable some tests for external protobuf +- use GREATER instead of GREATER_EQUAL and remove new blank line at EOF +- fix for BUILD_TESTS=OFF +- Use Config mode in CMake. + +(cleaning up review noise) + +--- + cmake/OpenCVFindProtobuf.cmake | 35 +++++++++++++++++++++++++++----- + modules/dnn/CMakeLists.txt | 6 ++++++ + modules/dnn/test/test_layers.cpp | 24 ++++++++++++++++++---- + 3 files changed, 56 insertions(+), 9 deletions(-) + +diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake +index 8835347..5b1e175 100644 +--- a/cmake/OpenCVFindProtobuf.cmake ++++ b/cmake/OpenCVFindProtobuf.cmake +@@ -30,8 +30,14 @@ if(BUILD_PROTOBUF) + set(Protobuf_LIBRARIES "libprotobuf") + set(HAVE_PROTOBUF TRUE) + else() ++ # we still need this for command PROTOBUF_GENERATE_CPP. ++ set(protobuf_MODULE_COMPATIBLE ON) ++ + unset(Protobuf_VERSION CACHE) +- find_package(Protobuf QUIET) ++ find_package(Protobuf QUIET CONFIG) ++ if(NOT Protobuf_FOUND) ++ find_package(Protobuf QUIET) ++ endif() + + # Backwards compatibility + # Define camel case versions of input variables +@@ -67,6 +73,20 @@ else() + endif() + endif() + ++# See https://github.com/opencv/opencv/issues/24369 ++# In Protocol Buffers v22.0 and later drops C++11 support and depends abseil-cpp. ++# Details: https://protobuf.dev/news/2022-08-03/ ++# And if std::text_view is in abseil-cpp requests C++17 and later. ++ ++if(HAVE_PROTOBUF) ++ if(NOT (Protobuf_VERSION VERSION_LESS 22)) ++ if((CMAKE_CXX_STANDARD EQUAL 98) OR (CMAKE_CXX_STANDARD LESS 17)) ++ message(STATUS "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is too old to support protobuf(${Protobuf_VERSION}) and/or abseil-cpp. Use C++17 or later. Turning HAVE_PROTOBUF off") ++ set(HAVE_PROTOBUF FALSE) ++ endif() ++ endif() ++endif() ++ + if(HAVE_PROTOBUF AND PROTOBUF_UPDATE_FILES AND NOT COMMAND PROTOBUF_GENERATE_CPP) + message(FATAL_ERROR "Can't configure protobuf dependency (BUILD_PROTOBUF=${BUILD_PROTOBUF} PROTOBUF_UPDATE_FILES=${PROTOBUF_UPDATE_FILES})") + endif() +@@ -74,15 +94,20 @@ endif() + if(HAVE_PROTOBUF) + list(APPEND CUSTOM_STATUS protobuf) + if(NOT BUILD_PROTOBUF) ++ unset( __location) + if(TARGET "${Protobuf_LIBRARIES}") + get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_RELEASE) + if(NOT __location) + get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION) + endif() +- elseif(Protobuf_LIBRARY) +- set(__location "${Protobuf_LIBRARY}") +- else() +- set(__location "${Protobuf_LIBRARIES}") ++ endif() ++ ++ if(NOT __location) ++ if(Protobuf_LIBRARY) ++ set(__location "${Protobuf_LIBRARY}") ++ else() ++ set(__location "${Protobuf_LIBRARIES}") ++ endif() + endif() + endif() + list(APPEND CUSTOM_STATUS_protobuf " Protobuf:" +diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt +index 804b78e..9fcc460 100644 +--- a/modules/dnn/CMakeLists.txt ++++ b/modules/dnn/CMakeLists.txt +@@ -245,6 +245,12 @@ ocv_create_module(${libs} ${dnn_runtime_libs}) + ocv_add_samples() + ocv_add_accuracy_tests(${dnn_runtime_libs}) + ++if(NOT BUILD_PROTOBUF) ++ if(TARGET opencv_test_dnn) ++ ocv_target_compile_definitions(opencv_test_dnn PRIVATE "OPENCV_DNN_EXTERNAL_PROTOBUF=1") ++ endif() ++endif() ++ + set(perf_path "${CMAKE_CURRENT_LIST_DIR}/perf") + file(GLOB_RECURSE perf_srcs "${perf_path}/*.cpp") + file(GLOB_RECURSE perf_hdrs "${perf_path}/*.hpp" "${perf_path}/*.h") +diff --git a/modules/dnn/test/test_layers.cpp b/modules/dnn/test/test_layers.cpp +index 763d94b..6cb6d54 100644 +--- a/modules/dnn/test/test_layers.cpp ++++ b/modules/dnn/test/test_layers.cpp +@@ -756,11 +756,15 @@ TEST_F(Layer_RNN_Test, get_set_test) + + TEST_P(Test_Caffe_layers, Accum) + { ++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF ++ throw SkipTestException("Requires patched protobuf"); ++#else + if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU) + applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL, CV_TEST_TAG_DNN_SKIP_OPENCL_FP16); + + testLayerUsingCaffeModels("accum", false, false, 0.0, 0.0, 2); + testLayerUsingCaffeModels("accum_ref", false, false, 0.0, 0.0, 2); ++#endif + } + + TEST_P(Test_Caffe_layers, FlowWarp) +@@ -780,27 +784,39 @@ TEST_P(Test_Caffe_layers, ChannelNorm) + + TEST_P(Test_Caffe_layers, DataAugmentation) + { ++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF ++ throw SkipTestException("Requires patched protobuf"); ++#else + if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) + applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL_FP16); + testLayerUsingCaffeModels("data_augmentation", true, false); + testLayerUsingCaffeModels("data_augmentation_2x1", true, false); + testLayerUsingCaffeModels("data_augmentation_8x6", true, false); ++#endif + } + + TEST_P(Test_Caffe_layers, Resample) + { ++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF ++ throw SkipTestException("Requires patched protobuf"); ++#else + if (backend != DNN_BACKEND_OPENCV) + applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); + testLayerUsingCaffeModels("nearest_2inps", false, false, 0.0, 0.0, 2); + testLayerUsingCaffeModels("nearest", false, false); ++#endif + } + + TEST_P(Test_Caffe_layers, Correlation) + { ++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF ++ throw SkipTestException("Requires patched protobuf"); ++#else + if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) + applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, + CV_TEST_TAG_DNN_SKIP_OPENCL, CV_TEST_TAG_DNN_SKIP_OPENCL_FP16); + testLayerUsingCaffeModels("correlation", false, false, 0.0, 0.0, 2); ++#endif + } + + TEST_P(Test_Caffe_layers, Convolution2Inputs) +@@ -1641,12 +1657,11 @@ private: + int outWidth, outHeight, zoomFactor; + }; + +-#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF + TEST_P(Test_Caffe_layers, Interp) +-#else +-TEST_P(Test_Caffe_layers, DISABLED_Interp) // requires patched protobuf (available in OpenCV source tree only) +-#endif + { ++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF ++ throw SkipTestException("Requires patched protobuf"); ++#else + #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021030000) + if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD) + applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); // exception +@@ -1670,6 +1685,7 @@ TEST_P(Test_Caffe_layers, DISABLED_Interp) // requires patched protobuf (availa + + // Test an implemented layer. + testLayerUsingCaffeModels("layer_interp", false, false); ++#endif + } + + INSTANTIATE_TEST_CASE_P(/*nothing*/, Test_Caffe_layers, dnnBackendsAndTargets()); +-- +2.43.0 + diff --git a/media-libs/opencv/metadata.xml b/media-libs/opencv/metadata.xml index fc1efa988e96..4fbf7c494e1c 100644 --- a/media-libs/opencv/metadata.xml +++ b/media-libs/opencv/metadata.xml @@ -27,7 +27,6 @@ <flag name="cuda">Enable NVIDIA Cuda computations support (Experimental!)</flag> <flag name="cudnn">Enable support for nVidia cuDNN library</flag> <flag name="dnnsamples">Enable dnn caffeemodel samples</flag> - <flag name="download">Enable download during cmake configure</flag> <flag name="eigen">Enable usage of <pkg>dev-cpp/eigen</pkg> for computations</flag> <flag name="features2d">Enable features2d module</flag> <flag name="gdal">Enable support for <pkg>sci-libs/gdal</pkg> library</flag> diff --git a/media-libs/opencv/opencv-4.8.0-r3.ebuild b/media-libs/opencv/opencv-4.8.0-r3.ebuild deleted file mode 100644 index 99a65fe7d7c7..000000000000 --- a/media-libs/opencv/opencv-4.8.0-r3.ebuild +++ /dev/null @@ -1,593 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# No 3.12 yet for bug #912987 -PYTHON_COMPAT=( python3_{10..11} ) -inherit flag-o-matic java-pkg-opt-2 java-ant-2 cmake-multilib python-r1 toolchain-funcs - -DESCRIPTION="A collection of algorithms and sample code for various computer vision problems" -HOMEPAGE="https://opencv.org" -TINY_DNN_PV="1.0.0a3" -SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz - dnnsamples? ( https://dev.gentoo.org/~amynka/snap/${PN}-3.4.0-res10_300x300-caffeemodel.tar.gz ) - download? ( https://github.com/rossbridger/opencv-extdep/archive/4.4.0.tar.gz -> ${PN}-4.4.0_extdep.tar.gz ) - contrib? ( - https://github.com/${PN}/${PN}_contrib/archive/${PV}.tar.gz -> ${P}_contrib.tar.gz - contribdnn? ( https://dev.gentoo.org/~amynka/snap/${PN}-3.4.0-face_landmark_model.tar.gz ) - contribxfeatures2d? ( https://dev.gentoo.org/~amynka/snap/vgg_boostdesc-3.2.0.tar.gz ) - )" - -LICENSE="Apache-2.0" -SLOT="0/${PV}" # subslot = libopencv* soname version -KEYWORDS="amd64 ~arm arm64 ~loong ~ppc ~ppc64 ~riscv x86" -IUSE="contrib contribcvv contribdnn contribfreetype contribhdf contribovis contribsfm contribxfeatures2d cuda debug dnnsamples download +eigen examples +features2d ffmpeg gdal gflags glog gphoto2 gstreamer gtk3 ieee1394 jpeg jpeg2k lapack opencl openexr opengl openmp opencvapps png +python qt5 tesseract testprograms threads tiff vaapi v4l vtk webp xine" - -# The following lines are shamelessly stolen from ffmpeg-9999.ebuild with modifications -ARM_CPU_FEATURES=( - cpu_flags_arm_neon:NEON - cpu_flags_arm_vfpv3:VFPV3 -) -PPC_CPU_FEATURES=( - cpu_flags_ppc_vsx:VSX - cpu_flags_ppc_vsx3:VSX3 -) -X86_CPU_FEATURES_RAW=( - avx:AVX - avx2:AVX2 - avx512f:AVX_512F - f16c:FP16 - fma3:FMA3 - popcnt:POPCNT - sse:SSE - sse2:SSE2 - sse3:SSE3 - ssse3:SSSE3 - sse4_1:SSE4_1 - sse4_2:SSE4_2 -) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${PPC_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} ${CPU_FEATURES_MAP[@]%:*}" - -# OpenGL needs gtk or Qt installed to activate, otherwise build system -# will silently disable it Wwithout the user knowing, which defeats the -# purpose of the opengl use flag. -# cuda needs contrib, bug #701712 -REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_f16c ) - cpu_flags_x86_f16c? ( cpu_flags_x86_avx ) - cuda? ( contrib - tesseract? ( opencl ) ) - dnnsamples? ( examples ) - gflags? ( contrib ) - glog? ( contrib ) - contribcvv? ( contrib qt5 ) - contribdnn? ( contrib ) - contribfreetype? ( contrib ) - contribhdf? ( contrib ) - contribovis? ( contrib ) - contribsfm? ( contrib eigen gflags glog ) - contribxfeatures2d? ( contrib download ) - examples? ( contribdnn ) - java? ( python ) - opengl? ( qt5 ) - python? ( ${PYTHON_REQUIRED_USE} ) - tesseract? ( contrib ) - ?? ( gtk3 qt5 )" - -# The following logic is intrinsic in the build system, but we do not enforce -# it on the useflags since this just blocks emerging pointlessly: -# openmp? ( !threads ) - -RDEPEND=" - app-arch/bzip2[${MULTILIB_USEDEP}] - <dev-libs/protobuf-23:=[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - cuda? ( dev-util/nvidia-cuda-toolkit:0= ) - contribdnn? ( dev-libs/flatbuffers:= ) - contribhdf? ( sci-libs/hdf5:= ) - contribfreetype? ( - media-libs/freetype:2[${MULTILIB_USEDEP}] - media-libs/harfbuzz:=[${MULTILIB_USEDEP}] - ) - contribovis? ( dev-games/ogre:0/1.12 ) - ffmpeg? ( media-video/ffmpeg:0=[${MULTILIB_USEDEP}] ) - gdal? ( sci-libs/gdal:= ) - gflags? ( dev-cpp/gflags:=[${MULTILIB_USEDEP}] ) - glog? ( dev-cpp/glog:=[${MULTILIB_USEDEP}] ) - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) - gstreamer? ( - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] - media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}] - ) - gtk3? ( - dev-libs/glib:2[${MULTILIB_USEDEP}] - x11-libs/gtk+:3[${MULTILIB_USEDEP}] - ) - ieee1394? ( - media-libs/libdc1394:=[${MULTILIB_USEDEP}] - sys-libs/libraw1394[${MULTILIB_USEDEP}] - ) - java? ( >=virtual/jre-1.8:* ) - jpeg? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] ) - jpeg2k? ( media-libs/openjpeg:2=[${MULTILIB_USEDEP}] ) - lapack? ( - virtual/cblas - >=virtual/lapack-3.10 - ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - openexr? ( - dev-libs/imath:= - media-libs/openexr:= - ) - opengl? ( - virtual/opengl[${MULTILIB_USEDEP}] - virtual/glu[${MULTILIB_USEDEP}] - ) - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) - python? ( - ${PYTHON_DEPS} - dev-python/numpy[${PYTHON_USEDEP}] - ) - qt5? ( - dev-qt/qtgui:5= - dev-qt/qtwidgets:5= - dev-qt/qttest:5= - dev-qt/qtconcurrent:5= - opengl? ( dev-qt/qtopengl:5= ) - ) - tesseract? ( app-text/tesseract[opencl=,${MULTILIB_USEDEP}] ) - threads? ( dev-cpp/tbb:=[${MULTILIB_USEDEP}] ) - tiff? ( media-libs/tiff:=[${MULTILIB_USEDEP}] ) - v4l? ( >=media-libs/libv4l-0.8.3[${MULTILIB_USEDEP}] ) - vaapi? ( media-libs/libva[${MULTILIB_USEDEP}] ) - vtk? ( sci-libs/vtk[rendering] ) - webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] ) - xine? ( media-libs/xine-lib )" -DEPEND="${RDEPEND} - eigen? ( >=dev-cpp/eigen-3.3.8-r1:3 ) - java? ( >=virtual/jdk-1.8:* )" -BDEPEND="virtual/pkgconfig" - -MULTILIB_WRAPPED_HEADERS=( - # [opencv4] - /usr/include/opencv4/opencv2/cvconfig.h - /usr/include/opencv4/opencv2/opencv_modules.hpp - # [cudev] - /usr/include/opencv4/opencv2/cudaarithm.hpp - /usr/include/opencv4/opencv2/cudabgsegm.hpp - /usr/include/opencv4/opencv2/cudacodec.hpp - /usr/include/opencv4/opencv2/cudafeatures2d.hpp - /usr/include/opencv4/opencv2/cudafilters.hpp - /usr/include/opencv4/opencv2/cudaimgproc.hpp - /usr/include/opencv4/opencv2/cudalegacy.hpp - /usr/include/opencv4/opencv2/cudalegacy/NCVBroxOpticalFlow.hpp - /usr/include/opencv4/opencv2/cudalegacy/NCVHaarObjectDetection.hpp - /usr/include/opencv4/opencv2/cudalegacy/NCV.hpp - /usr/include/opencv4/opencv2/cudalegacy/NCVPyramid.hpp - /usr/include/opencv4/opencv2/cudalegacy/NPP_staging.hpp - /usr/include/opencv4/opencv2/cudaobjdetect.hpp - /usr/include/opencv4/opencv2/cudaoptflow.hpp - /usr/include/opencv4/opencv2/cudastereo.hpp - /usr/include/opencv4/opencv2/cudawarping.hpp - /usr/include/opencv4/opencv2/cudev/block/block.hpp - /usr/include/opencv4/opencv2/cudev/block/detail/reduce.hpp - /usr/include/opencv4/opencv2/cudev/block/detail/reduce_key_val.hpp - /usr/include/opencv4/opencv2/cudev/block/dynamic_smem.hpp - /usr/include/opencv4/opencv2/cudev/block/reduce.hpp - /usr/include/opencv4/opencv2/cudev/block/scan.hpp - /usr/include/opencv4/opencv2/cudev/block/vec_distance.hpp - /usr/include/opencv4/opencv2/cudev/common.hpp - /usr/include/opencv4/opencv2/cudev/expr/binary_func.hpp - /usr/include/opencv4/opencv2/cudev/expr/binary_op.hpp - /usr/include/opencv4/opencv2/cudev/expr/color.hpp - /usr/include/opencv4/opencv2/cudev/expr/deriv.hpp - /usr/include/opencv4/opencv2/cudev/expr/expr.hpp - /usr/include/opencv4/opencv2/cudev/expr/per_element_func.hpp - /usr/include/opencv4/opencv2/cudev/expr/reduction.hpp - /usr/include/opencv4/opencv2/cudev/expr/unary_func.hpp - /usr/include/opencv4/opencv2/cudev/expr/unary_op.hpp - /usr/include/opencv4/opencv2/cudev/expr/warping.hpp - /usr/include/opencv4/opencv2/cudev/functional/color_cvt.hpp - /usr/include/opencv4/opencv2/cudev/functional/detail/color_cvt.hpp - /usr/include/opencv4/opencv2/cudev/functional/functional.hpp - /usr/include/opencv4/opencv2/cudev/functional/tuple_adapter.hpp - /usr/include/opencv4/opencv2/cudev/grid/copy.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/copy.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/histogram.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/integral.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/minmaxloc.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/pyr_down.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/pyr_up.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/reduce.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/reduce_to_column.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/reduce_to_row.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/split_merge.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/transform.hpp - /usr/include/opencv4/opencv2/cudev/grid/detail/transpose.hpp - /usr/include/opencv4/opencv2/cudev/grid/histogram.hpp - /usr/include/opencv4/opencv2/cudev/grid/integral.hpp - /usr/include/opencv4/opencv2/cudev/grid/pyramids.hpp - /usr/include/opencv4/opencv2/cudev/grid/reduce.hpp - /usr/include/opencv4/opencv2/cudev/grid/reduce_to_vec.hpp - /usr/include/opencv4/opencv2/cudev/grid/split_merge.hpp - /usr/include/opencv4/opencv2/cudev/grid/transform.hpp - /usr/include/opencv4/opencv2/cudev/grid/transpose.hpp - /usr/include/opencv4/opencv2/cudev.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/constant.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/deriv.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/detail/gpumat.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/extrapolation.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/glob.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/gpumat.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/interpolation.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/lut.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/mask.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/remap.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/resize.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/texture.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/traits.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/transform.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/warping.hpp - /usr/include/opencv4/opencv2/cudev/ptr2d/zip.hpp - /usr/include/opencv4/opencv2/cudev/util/atomic.hpp - /usr/include/opencv4/opencv2/cudev/util/detail/tuple.hpp - /usr/include/opencv4/opencv2/cudev/util/detail/type_traits.hpp - /usr/include/opencv4/opencv2/cudev/util/limits.hpp - /usr/include/opencv4/opencv2/cudev/util/saturate_cast.hpp - /usr/include/opencv4/opencv2/cudev/util/simd_functions.hpp - /usr/include/opencv4/opencv2/cudev/util/tuple.hpp - /usr/include/opencv4/opencv2/cudev/util/type_traits.hpp - /usr/include/opencv4/opencv2/cudev/util/vec_math.hpp - /usr/include/opencv4/opencv2/cudev/util/vec_traits.hpp - /usr/include/opencv4/opencv2/cudev/warp/detail/reduce.hpp - /usr/include/opencv4/opencv2/cudev/warp/detail/reduce_key_val.hpp - /usr/include/opencv4/opencv2/cudev/warp/reduce.hpp - /usr/include/opencv4/opencv2/cudev/warp/scan.hpp - /usr/include/opencv4/opencv2/cudev/warp/shuffle.hpp - /usr/include/opencv4/opencv2/cudev/warp/warp.hpp - # [contrib_cvv] - /usr/include/opencv4/opencv2/cvv/call_meta_data.hpp - /usr/include/opencv4/opencv2/cvv/cvv.hpp - /usr/include/opencv4/opencv2/cvv/debug_mode.hpp - /usr/include/opencv4/opencv2/cvv/dmatch.hpp - /usr/include/opencv4/opencv2/cvv/filter.hpp - /usr/include/opencv4/opencv2/cvv/final_show.hpp - /usr/include/opencv4/opencv2/cvv.hpp - /usr/include/opencv4/opencv2/cvv/show_image.hpp - # [contrib_hdf] - /usr/include/opencv4/opencv2/hdf/hdf5.hpp - /usr/include/opencv4/opencv2/hdf.hpp - # [contrib_ovis] - /usr/include/opencv4/opencv2/ovis.hpp - # [contrib_sfm] - /usr/include/opencv4/opencv2/sfm.hpp - /usr/include/opencv4/opencv2/sfm/conditioning.hpp - /usr/include/opencv4/opencv2/sfm/fundamental.hpp - /usr/include/opencv4/opencv2/sfm/io.hpp - /usr/include/opencv4/opencv2/sfm/numeric.hpp - /usr/include/opencv4/opencv2/sfm/projection.hpp - /usr/include/opencv4/opencv2/sfm/reconstruct.hpp - /usr/include/opencv4/opencv2/sfm/robust.hpp - /usr/include/opencv4/opencv2/sfm/simple_pipeline.hpp - /usr/include/opencv4/opencv2/sfm/triangulation.hpp - # [vtk] - /usr/include/opencv4/opencv2/viz.hpp - /usr/include/opencv4/opencv2/viz/types.hpp - /usr/include/opencv4/opencv2/viz/viz3d.hpp - /usr/include/opencv4/opencv2/viz/vizcore.hpp - /usr/include/opencv4/opencv2/viz/widget_accessor.hpp - /usr/include/opencv4/opencv2/viz/widgets.hpp -) - -PATCHES=( - "${FILESDIR}"/${PN}-3.4.0-disable-download.patch - "${FILESDIR}"/${PN}-3.4.1-cuda-add-relaxed-constexpr.patch - "${FILESDIR}"/${PN}-4.1.2-opencl-license.patch - "${FILESDIR}"/${PN}-4.4.0-disable-native-cpuflag-detect.patch - "${FILESDIR}"/${PN}-4.5.0-link-with-cblas-for-lapack.patch - "${FILESDIR}"/${PN}-4.8.0-fix-flatbuffer.patch - "${FILESDIR}"/${PN}-4.8.0-arm64-fp16.patch - "${FILESDIR}"/${PN}-4.8.0-fix-cuda-12.2.0.patch -) - -pkg_pretend() { - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp -} - -pkg_setup() { - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp - java-pkg-opt-2_pkg_setup -} - -src_prepare() { - # https://bugs.gentoo.org/838274 - replace-flags -O3 -O2 - - cmake_src_prepare - - # remove bundled stuff - rm -r 3rdparty || die "Removing 3rd party components failed" - sed -e '/add_subdirectory(.*3rdparty.*)/ d' \ - -i CMakeLists.txt cmake/*cmake || die - - if use dnnsamples; then - mv "${WORKDIR}/res10_300x300_ssd_iter_140000.caffemodel" "${WORKDIR}/${P}/samples/dnn/" || die - fi - - if use contrib; then - cd "${WORKDIR}/${PN}_contrib-${PV}" || die - if use contribxfeatures2d; then - mv "${WORKDIR}"/*.i "${WORKDIR}/${PN}_contrib-${PV}"/modules/xfeatures2d/src/ || die - fi - fi - - if use download; then - mv "${WORKDIR}/${PN}-extdep-4.4.0" "${WORKDIR}/${P}/.cache/" || die - fi - - java-pkg-opt-2_src_prepare - - # this really belongs in src_prepare() too - JAVA_ANT_ENCODING="iso-8859-1" - # set encoding so even this cmake build will pick it up. - export ANT_OPTS+=" -Dfile.encoding=iso-8859-1" - java-ant-2_src_configure -} - -multilib_src_configure() { - # bug #919101 and https://github.com/opencv/opencv/issues/19020 - filter-lto - - # please dont sort here, order is the same as in CMakeLists.txt - GLOBALCMAKEARGS=( - # for protobuf - -DCMAKE_CXX_STANDARD=14 - - # Optional 3rd party components - # =================================================== - -DENABLE_DOWNLOAD=$(usex download) - -DWITH_QUIRC=OFF # Do not have dependencies - -DWITH_FLATBUFFERS=$(usex contribdnn) - -DWITH_1394=$(usex ieee1394) - # -DWITH_AVFOUNDATION=OFF # IOS - -DWITH_VTK=$(multilib_native_usex vtk) - -DWITH_EIGEN=$(usex eigen) - -DWITH_VFW=OFF # Video windows support - -DWITH_FFMPEG=$(usex ffmpeg) - -DWITH_GSTREAMER=$(usex gstreamer) - -DWITH_GSTREAMER_0_10=OFF # Don't want this - -DWITH_GTK=$(usex gtk3) - -DWITH_GTK_2_X=OFF # only want gtk3 nowadays - -DWITH_IPP=OFF - # Jasper was removed from tree because of security problems. - # Upstream were/are making progress. We use openjpeg instead. - # bug 734284 - -DWITH_JASPER=OFF - -DWITH_JPEG=$(usex jpeg) - -DWITH_OPENJPEG=$(usex jpeg2k) - -DWITH_WEBP=$(usex webp) - -DWITH_OPENEXR=$(multilib_native_usex openexr) - -DWITH_OPENGL=$(usex opengl) - -DWITH_OPENVX=OFF - -DWITH_OPENNI=OFF # Not packaged - -DWITH_OPENNI2=OFF # Not packaged - -DWITH_PNG=$(usex png) - -DWITH_GDCM=OFF - -DWITH_PVAPI=OFF - -DWITH_GIGEAPI=OFF - -DWITH_ARAVIS=OFF - -DWITH_QT=$(multilib_native_usex qt5 5 OFF) - -DWITH_WIN32UI=OFF # Windows only - # -DWITH_QUICKTIME=OFF - # -DWITH_QTKIT=OFF - -DWITH_TBB=$(usex threads) - -DWITH_OPENMP=$(usex openmp) - -DWITH_CSTRIPES=OFF - -DWITH_PTHREADS_PF=ON - -DWITH_TIFF=$(usex tiff) - -DWITH_UNICAP=OFF # Not packaged - -DWITH_V4L=$(usex v4l) - -DWITH_LIBV4L=$(usex v4l) - # -DWITH_DSHOW=ON # direct show supp - -DWITH_MSMF=OFF - -DWITH_XIMEA=OFF # Windows only - -DWITH_XINE=$(multilib_native_usex xine) - -DWITH_CLP=OFF - -DWITH_OPENCL=$(usex opencl) - -DWITH_OPENCL_SVM=OFF - -DWITH_OPENCLAMDFFT=$(usex opencl) - -DWITH_OPENCLAMDBLAS=$(usex opencl) - -DWITH_DIRECTX=OFF - -DWITH_INTELPERC=OFF - -DWITH_IPP_A=OFF - -DWITH_MATLAB=OFF - -DWITH_VA=$(usex vaapi) - -DWITH_VA_INTEL=$(usex vaapi) - -DWITH_GDAL=$(multilib_native_usex gdal) - -DWITH_GPHOTO2=$(usex gphoto2) - -DWITH_LAPACK=$(multilib_native_usex lapack) - -DWITH_ITT=OFF # 3dparty libs itt_notify - # =================================================== - # CUDA build components: nvidia-cuda-toolkit takes care of GCC version - # =================================================== - -DWITH_CUDA=$(multilib_native_usex cuda) - -DWITH_CUBLAS=$(multilib_native_usex cuda) - -DWITH_CUFFT=$(multilib_native_usex cuda) - -DWITH_NVCUVID=OFF - # -DWITH_NVCUVID=$(usex cuda) - -DCUDA_NPP_LIBRARY_ROOT_DIR=$(usex cuda "${EPREFIX}/opt/cuda" "") - # =================================================== - # OpenCV build components - # =================================================== - -DBUILD_SHARED_LIBS=ON - -DBUILD_JAVA=$(multilib_native_usex java) # Ant needed, no compile flag - -DBUILD_ANDROID_EXAMPLES=OFF - -DBUILD_opencv_apps=$(usex opencvapps ON OFF) - -DBUILD_DOCS=OFF # Doesn't install anyways. - -DBUILD_EXAMPLES=$(multilib_native_usex examples) - -DBUILD_PERF_TESTS=OFF - -DBUILD_TESTS=$(multilib_native_usex testprograms) - -DBUILD_WITH_DEBUG_INFO=$(usex debug) - # -DBUILD_WITH_STATIC_CRT=OFF - -DBUILD_WITH_DYNAMIC_IPP=OFF - -DBUILD_FAT_JAVA_LIB=OFF - # -DBUILD_ANDROID_SERVICE=OFF - -DBUILD_CUDA_STUBS=$(multilib_native_usex cuda) - -DOPENCV_EXTRA_MODULES_PATH=$(usex contrib "${WORKDIR}/opencv_contrib-${PV}/modules" "") - # =================================================== - # OpenCV installation options - # =================================================== - -DINSTALL_CREATE_DISTRIB=OFF - -DINSTALL_C_EXAMPLES=$(multilib_native_usex examples) - -DINSTALL_TESTS=$(multilib_native_usex testprograms) - -DINSTALL_PYTHON_EXAMPLES=$(multilib_native_usex examples) - # -DINSTALL_ANDROID_EXAMPLES=OFF - -DINSTALL_TO_MANGLED_PATHS=OFF - -DOPENCV_GENERATE_PKGCONFIG=ON - # opencv uses both ${CMAKE_INSTALL_LIBDIR} and ${LIB_SUFFIX} - # to set its destination libdir - -DLIB_SUFFIX= - # =================================================== - # OpenCV build options - # =================================================== - -DENABLE_CCACHE=OFF - # bug 733796, but PCH is a risky game in CMake anyway - -DENABLE_PRECOMPILED_HEADERS=OFF - -DENABLE_SOLUTION_FOLDERS=OFF - -DENABLE_PROFILING=OFF - -DENABLE_COVERAGE=OFF - - -DHAVE_opencv_java=$(multilib_native_usex java YES NO) - -DENABLE_NOISY_WARNINGS=OFF - -DOPENCV_WARNINGS_ARE_ERRORS=OFF - -DENABLE_IMPL_COLLECTION=OFF - -DENABLE_INSTRUMENTATION=OFF - -DGENERATE_ABI_DESCRIPTOR=OFF - -DDOWNLOAD_EXTERNAL_TEST_DATA=OFF - # =================================================== - # things we want to be hard off or not yet figured out - # =================================================== - -DBUILD_PACKAGE=OFF - # =================================================== - # Not building protobuf but update files bug #631418 - # =================================================== - -DWITH_PROTOBUF=ON - -DBUILD_PROTOBUF=OFF - -DPROTOBUF_UPDATE_FILES=ON - -Dprotobuf_MODULE_COMPATIBLE=ON - # =================================================== - # things we want to be hard enabled not worth useflag - # =================================================== - -DCMAKE_SKIP_RPATH=ON - -DOPENCV_DOC_INSTALL_PATH= - -DBUILD_opencv_features2d=$(usex features2d ON OFF) - ) - - # ================================================== - # cpu flags, should solve 633900 - #=================================================== - local CPU_BASELINE="" - for i in "${CPU_FEATURES_MAP[@]}" ; do - if [[ ${ABI} != x86 || ${i%:*} != "cpu_flags_x86_avx2" ]]; then # workaround for Bug 747163 - use ${i%:*} && CPU_BASELINE="${CPU_BASELINE}${i#*:};" - fi - done - - GLOBALCMAKEARGS+=( - -DOPENCV_CPU_OPT_IMPLIES_IGNORE=ON - -DCPU_BASELINE=${CPU_BASELINE} - -DCPU_DISPATCH= - ) - - # =================================================== - # OpenCV Contrib Modules - # =================================================== - if use contrib; then - GLOBALCMAKEARGS+=( - -DBUILD_opencv_dnn=$(usex contribdnn ON OFF) - -DTINYDNN_ROOT="${WORKDIR}/tiny-dnn-${TINY_DNN_PV}" - -DBUILD_opencv_dnns_easily_fooled=OFF - -DBUILD_opencv_xfeatures2d=$(usex contribxfeatures2d ON OFF) - -DBUILD_opencv_cvv=$(usex contribcvv ON OFF) - -DBUILD_opencv_hdf=$(multilib_native_usex contribhdf ON OFF) - -DBUILD_opencv_sfm=$(usex contribsfm ON OFF) - -DBUILD_opencv_freetype=$(usex contribfreetype ON OFF) - -DBUILD_opencv_ovis=$(usex contribovis ON OFF) - ) - - if multilib_is_native_abi; then - GLOBALCMAKEARGS+=( - -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=$(usex !tesseract) - ) - else - GLOBALCMAKEARGS+=( - -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=ON - ) - fi - fi - - # workaround for bug 413429 - tc-export CC CXX - - local mycmakeargs=( - ${GLOBALCMAKEARGS[@]} - -DPYTHON_EXECUTABLE=OFF - -DINSTALL_PYTHON_EXAMPLES=OFF - -DBUILD_opencv_python2=OFF - -DBUILD_opencv_python3=OFF - ) - - cmake_src_configure - - # Copy face_land_model to ${CMAKE_BINARY_DIR}/${OPENCV_TEST_DATA_INSTALL_PATH} - # TODO patch ocv_download to copy files into destination dirs - if use contribdnn; then - mkdir -p "${BUILD_DIR}"/share/OpenCV/testdata/cv/face/ || die - cp "${WORKDIR}"/face_landmark_model.dat "${BUILD_DIR}"/share/OpenCV/testdata/cv/face/ || die - fi - -} - -python_module_compile() { - local BUILD_DIR="${orig_BUILD_DIR}" - local mycmakeargs=( ${GLOBALCMAKEARGS[@]} ) - - # Set all python variables to load the correct Gentoo paths - mycmakeargs+=( - # python_setup alters PATH and sets this as wrapper - # to the correct interpreter we are building for - -DPYTHON_DEFAULT_EXECUTABLE=${EPYTHON} - -DINSTALL_PYTHON_EXAMPLES=$(usex examples) - ) - - # Regenerate cache file. Can't use rebuild_cache as it won't - # have the Gentoo specific options. - rm CMakeCache.txt || die "rm failed" - cmake_src_configure - cmake_src_compile - cmake_src_install - - # Remove compiled binary so new version compiles - # Avoid conflicts with new module builds as build system doesn't - # really support it. - rm -r modules/python3 || die "rm failed" - - python_optimize "${ED}"/$(python_get_sitedir) -} - -multilib_src_install() { - cmake_src_install - - # Build and install the python modules for all targets - if multilib_is_native_abi && use python; then - local orig_BUILD_DIR="${BUILD_DIR}" - python_foreach_impl python_module_compile - fi -} diff --git a/media-libs/opencv/opencv-4.8.1-r1.ebuild b/media-libs/opencv/opencv-4.8.1-r1.ebuild index 9d7ece8e5c85..d183c6f8d97a 100644 --- a/media-libs/opencv/opencv-4.8.1-r1.ebuild +++ b/media-libs/opencv/opencv-4.8.1-r1.ebuild @@ -117,7 +117,7 @@ REQUIRED_USE=" RDEPEND=" app-arch/bzip2[${MULTILIB_USEDEP}] - <dev-libs/protobuf-23:=[${MULTILIB_USEDEP}] + dev-libs/protobuf:=[${MULTILIB_USEDEP}] sys-libs/zlib[${MULTILIB_USEDEP}] cuda? ( dev-util/nvidia-cuda-toolkit:0= ) cudnn? ( dev-libs/cudnn:= ) @@ -214,6 +214,8 @@ PATCHES=( "${FILESDIR}/${PN}-4.8.1-libpng16.patch" "${FILESDIR}/${PN}-4.8.1-ade-0.1.2a.tar.gz.patch" + "${FILESDIR}/${PN}-4.8.1-protobuf-22.patch" # bug 909087, in 4.9.0 + # TODO applied in src_prepare # "${FILESDIR}/${PN}_contrib-${PV}-rgbd.patch" # "${FILESDIR}/${PN}_contrib-4.8.1-NVIDIAOpticalFlowSDK-2.0.tar.gz.patch" |