summaryrefslogtreecommitdiff
path: root/media-libs/opencv
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-05-29 03:22:09 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-05-29 03:22:09 +0100
commitd4bd6695641f6d2ec7ff8681913d304e995902f5 (patch)
tree6ec8d4c38152bb4f2bb4b93277236ebd9fbbd21d /media-libs/opencv
parent22910f5d14da606bd7f06e19a2f61c5d1a8fc94b (diff)
gentoo resync : 29.05.2018
Diffstat (limited to 'media-libs/opencv')
-rw-r--r--media-libs/opencv/Manifest14
-rw-r--r--media-libs/opencv/files/opencv-3.1.0-cmake-no-opengl.patch22
-rw-r--r--media-libs/opencv/files/opencv-3.1.0-git-autodetect.patch42
-rw-r--r--media-libs/opencv/files/opencv-3.1.0-remove-graphcut-for-cuda-8.patch23
-rw-r--r--media-libs/opencv/files/opencv-3.4.0-disable-download.patch29
-rw-r--r--media-libs/opencv/metadata.xml1
-rw-r--r--media-libs/opencv/opencv-3.1.0-r8.ebuild328
-rw-r--r--media-libs/opencv/opencv-3.4.1-r1.ebuild494
8 files changed, 531 insertions, 422 deletions
diff --git a/media-libs/opencv/Manifest b/media-libs/opencv/Manifest
index e682197eda6e..8c068e3b9506 100644
--- a/media-libs/opencv/Manifest
+++ b/media-libs/opencv/Manifest
@@ -6,11 +6,8 @@ AUX opencv-2.4.3-gcc47.patch 835 BLAKE2B 2e0f71fff77a23c2db9747d8bb7f9301de18acd
AUX opencv-2.4.8-javamagic.patch 1165 BLAKE2B 0f12fd471145e1e303a517e5bc704fb5abc5ac5731fb1eadf08ef61e618bd70f9348c9c7a23296eefeb37826fd6701baaab0fc475ad0c441302b20516cf9bb9a SHA512 fd8a0d33997889c9316c0a4474c836b2528b676cd26bbb0e6ee2262377e45c5a0c465534831bd7fec3c0aa9cb198bc792a53f958b05a5217009314b678076d64
AUX opencv-2.4.9-cuda-pkg-config.patch 373 BLAKE2B 389a27607926170c38c69cba955e91e0dfde65a51ee88dd0aec315056ba0f36a303ef2d4b95e226f323e92c59a251b93e9deae5cb3822ad69d257e1cb3cb1f34 SHA512 5b8f931758c6c8edfc3cae35a16d1c8674f17716f13b424ee0510eb313f06ed334b80205262e6bfcce22db235467cad81fddfa96e0cf669972794cc8524f6937
AUX opencv-3.0.0-gles.patch 481 BLAKE2B 3eecd8c754abd9fdbfc2878b8b5a8b5ac3c6410342eb0756162ac901fe0903f7e1236bf2cc6e2ec5c7eeb638037f0dfad2b5aa9ebc905c485c4084936daed24e SHA512 37cac226bc39b91a87e4891e1d58169a0c2723240215670ebaecbfaf9b066b571296041fc5140aff7274cc44ca132b6f1b3bd4cf6d6dd23b950cac6eca548ad9
-AUX opencv-3.1.0-cmake-no-opengl.patch 867 BLAKE2B afa14f7a299546dd06885ad3239c2e7280444d974659e1a3078083517ce126c7fbef952264ac1642ddc3ef441ff2257d91ab0bb51a7554be6df4fce1a6ea1c47 SHA512 668a41e2bc4419c3b5f0e0e89f3b62514a9f3489bf8db4d32653288688894c9b647c7abbe45b3f23ec1dcf7dfb645ef308ceb61ab87129229fde0ba87346bb20
AUX opencv-3.1.0-find-libraries-fix.patch 2056 BLAKE2B 5527e02dfe9545b7d3959ef98f1f6402c199115bb337c1f3f3d7228ea5d640a74bb41c1866a60826d689e341b40fcaad56f9fe25ffdeee96f4642b5747d19938 SHA512 3246a866f347f5f9715edf1ae759ef7097bc2fe54dab84838cf1e229bcbcc33d5c97224a13ab20546615cee03d4475b3ec1b44ee894676808b7212f1b4b45bd2
-AUX opencv-3.1.0-git-autodetect.patch 1417 BLAKE2B 04c2335c647f4f4c33b56391e4e30baf10072dde0a96d6262b1dde8c3b58b619e031d62634041e6c9fc5e47e2c9e15c861842a89c0d9c3fcdfd425bc79d2e641 SHA512 af437e6f57a716f26b6840f32f89042fc6886e13ab8111cfc3b3a67694362705ea54128e898588184105b3cac37e451514cb84aff18fab24f54d5960d9aad3f7
AUX opencv-3.1.0-java-magic.patch 2302 BLAKE2B c380c7563dff740ff4105a8c50f298939596c5a2d787f2de1c9a9d77d8e2c3acfa971791426138869d8e9dde2b1235d7217e35e78e535d8e43b6d44846d2e391 SHA512 ee10c3fd6897ab1a8c4e006994b15a53d3d3ba7fc40975b67fc0a4104daa4473e4edabe9b7cdf1b82f87b14500d6db29485a1ee197aa7381551f030a7ba23a22
-AUX opencv-3.1.0-remove-graphcut-for-cuda-8.patch 1032 BLAKE2B 088c3c472707e395bfdf9542c8bdc4f823e34050761b591667976d118d1a237fc40c142c5abd228ac17b4bb33a4fbcd6d36f7105e93660c88aefd8a1074ef546 SHA512 ab30a26bf31767efd81933a6c0aa24517a467e8cb78184c161f0515ae04ded9dcaabb7eb4eb5b3cc61d510e5712d1b39e065074eae3fba984f43ba329fe46a20
AUX opencv-3.2.0-contrib_xfeatures2d-autodownload.patch 626 BLAKE2B a505fc9a45cbb783c2eb43b6f54f4be8c00b54a85f8bee7d1294ddbb54b02b34a03185773e24e3d5b4cc9d2ed1f61f65609430b4a205f34a18da6171124d0beb SHA512 74d21eb562a6b1bf28d20bad4221b3d158ed76925a255498f548726b83fa0c9d4e234ba7df8c58deaf662744a5e9da82d2635ea60048ef90f63a97e76fc10a02
AUX opencv-3.2.0-cpu-mno-sse2.patch 383 BLAKE2B dff2ca26a8c0055afc82e04ed4131baadcbb895519c4d311f8f896e5ffcd2bb4bced791cb7455ad4039ceb3d112df2958e05af07780303ebe73924fb4e53dcad SHA512 139a4e0bad15b3e0a8856716d4621d5e7d49a0ba1338d16bd32e27eb881849a43ed22fdcc6d1502a295e023abc325835677e8683aac35f6d561c4a04ce46e978
AUX opencv-3.2.0-fix_ussage_cpu_instructions.patch 1931 BLAKE2B 7a4764d8b0a6d5f50042e4435bf046a1d139dd041942fc6064b7758f3c0d6f531ec7b16ecd4099356b6e545bdcc5ce3ed80ddb8b4afafa729321c9572d5d624f SHA512 6d041966540c9fadb98d13cf3c3302bd800268fd03ebdf38e5da79fde604f3839244c78e7989e8e354ff7e265636f27ebcaabed4f9e0d57f46e3ced988182f01
@@ -21,21 +18,24 @@ AUX opencv-3.3.0-cuda9-cmake.patch 4676 BLAKE2B 9de3c4b988720a0b5fad1674d3967271
AUX opencv-3.3.0-cuda9-compute20.patch 775 BLAKE2B 7a818042ba9c75fd835b7fc8f6c0793aab8fef6f72964e9b57738e164c67ca16f885a8ad362360065b13bd35d4045e9c1a2683b59cc5d2b4162dc7794558a542 SHA512 00468ac115865acaba15efcf3791a927d6434ee54e37af3dd78bae3485868108ce4d1068ce94739a4d92b1673dd2111ebc30831446d69db4c999b95c5454c9cf
AUX opencv-3.3.0-cuda9-saturate.patch 1075 BLAKE2B 9e7af021924e84d0f12e8f9b764630dbd35e8d732550f2c16d7f812e9cbd4d4a1499182d7239b266985d39061a8a3f3e95b65e876c8dd339de9f1b764e769089 SHA512 e19b95957c282af846d08d2d6a7d8290c32692af165bc9c627a3d2e42319775d5128a832a4f639915b1331f8db979f2b88c1528e6059aeb78159a8f5409e1644
AUX opencv-3.3.0-remove-tiny-dnn-autodownload.patch 1138 BLAKE2B 0bf85ca7a0e3759a4de14a844f2929120a47f9c0c212992d078b19cc7a602e157d5233ebc30d7eb6dcfa8c5a9606e3acea15e5a96717842fa80d2d8b3fa3189c SHA512 6824c3fc193491d0d776a7a904d71515309a5b67b0dfa1790bbd402c40b68e813c9fdfc3037a60f31893341ea78553d97470d152e90f34485004e0e50e6d66f6
+AUX opencv-3.4.0-disable-download.patch 1050 BLAKE2B 6f39f61588d9231cc8d877624538a49654ec8cf63091f8d0251cd01cc14684f2f5264c295a149c4a5754a9336e1ad4d1760cc26471fd85a6f571404f7c8d540d SHA512 95f2043c286a7de33fb4718fc1e2ded1fd943b20a5c4cc0c3d7af84fc317e53e3aa6358a33e4781195f8a80904d6bc615171142cde5d30a83d16045d36f85826
DIST imgcodecs-opencv-3.3.0.tar.gz 7724 BLAKE2B 0e1c931a6dd796a7fa8e4a958f9a959d3bbba9bfa636a74a22d839b2919a8e1d0843765bcb69c5fbff7156efad0db2e5b3b70a2fc6e1911c0317ba46142cc130 SHA512 9c6fc31830e299e3d15da1cfc3468fe23eecda970a02e5826e0a7cfba34200c557c0e46f940154a26e9916da05859a83376217cbe7452ec8d14e99bc76f63d37
DIST opencv-2.4.13.tar.gz 91669572 BLAKE2B 7f6be39e29c0db5d005cb14215fdf5955fa69c34d72c4f1e1fa8bf8de1e748a0d2fe5febb43296ef529c57e4dec8d1b6739c0c4df9e64657b9550ed382fbc4b9 SHA512 efdc4340fdf557dae44ac604c8c20f61ced89f99274264b61c2640f28741504462c6b57076e207040ca2513e3921275bdfbe6c22fc123bd50df78745e6b7bcd6
-DIST opencv-3.1.0.tar.gz 76135587 BLAKE2B 59d0facba6573ae7b6ec8b4d8097693181244988c8c460a738004b975a65442230f387eef172920cd56682a4fa19f28368262ad85b7c79f243e2063c56275755 SHA512 57e0fe41e3d5d1dc036e7fc5673523e53d54f5f62e4d3bcb95238a9cd53e79da7c1704dc136ce632f7cfce369ebf5eb27f629a9b6ac4f7fa34120b80b5c7438f
-DIST opencv-3.1.0_contrib-75b3ea9.tar.gz 54277105 BLAKE2B 0e73381acea4cc8552579208ac438239f52c6ebafd1cc533c658b237bfd010754bf19a2645db766dffe1e7613470f1dee99eb867eed95f627182a101defd788b SHA512 d1d11520b8729fbaf0257c927654251ff9ac1ba5cf937af9dd973ec39f483d1ee08aff7ad3f1a9941fef921a35dc466ac5574918197ddecd3f6c66b682bf671a
DIST opencv-3.2.0.tar.gz 78861546 BLAKE2B 6d44263792b9cd2d009c7eeaddc2ef87acb01482cc9d36f2fe7717f981ff85a4e5007e4018d3ae15f383f6c3b1a0e009049f319bde0bce98575f04ccd6062cd8 SHA512 a338f4b4cdebfc2dcd763427b9c9632b3a3b0d072117b8e6367c73ea1ac21f7148553a23c7afbb44b01a48be3be95520789c2de1d6ae230b7b414ee713d3606d
DIST opencv-3.2.0_contrib.tar.gz 54765210 BLAKE2B 6c5bcb1c18da937751f234cc1edaae58416ab9ab5a3407a2ab2c22f4e174ffeb800396d34fe489f424b288fbd608e106cd5f5b458a06a509cea5f7d8e23a67a7 SHA512 eadb6a8a3625235b0c71e29c36d15d9342278aaf9148ef6a7e1aa80f4db0491aaf30b6df16bfd0cd358402b2a3059b6acbce23fb5fe2c0c57150a733ffbbff5a
DIST opencv-3.3.0.tar.gz 81238534 BLAKE2B 9eac7de8eefbcc9981a249343052c2dcada4e73c3406d545a89b9e6a054a7c7153933537d123f227caf51f23196fcaaed4135229db195e9c4139f2977e034e34 SHA512 13dee5c1c5fec1dccdbb05879d299b93ef8ddeb87f561a6c4178e33a4cf5ae919765119068d0387a3efea0e09a625ca993cffac60a772159690fcbee4e8d70fb
DIST opencv-3.3.0_contrib.tar.gz 54848519 BLAKE2B 53615af19426bf7a1540a6f23c7803276d6de594260b0d87b06b6b12c9e20326925a275e31e017784e8e876e30df7b8f326e192a75c5300252ae09f50d0d9a8b SHA512 ebe3dbe6c754c6fbaabbf6b0d2a4209964e625fd68e593f30ce043792740c8c1d4440d7870949b5b33f488fd7e2e05f3752287b7f50dd24c29202e268776520e
+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-3.4.1.tar.gz 87051748 BLAKE2B 87c83ab9b3d7fb048263f047aa5d6e95b153e1a28f3e34cc885eff7eb080a2258cfa1aa494cd56b32f1098ab158c17c23fc8464fcbe70642a3a1842f2fd1b4ac SHA512 e1fc14285090c6fe9e26e721f2d67d7096650c523147e925567426ef76aa7f4c6f12035d6f6ce3ec7991a75a6828a810fd4f9b75f78ed5fcccecefbadd79944b
+DIST opencv-3.4.1_contrib.tar.gz 57126844 BLAKE2B 63d9d5cb088371754eb132607789c8f1d4820f3e0e486593d6f64ee8f918ea4362152f050baec16f17904c03a6cdc0abc6e5fb2510308dcbabebe97b29285fbc SHA512 431dfba0f413071d7faa18bc6e6f5e4f015285e2cc730c5dd69b2a4d6aa4250b7e0bcb1814ac6f06f5c76f103aea1f93f72f32aee6bc0cd7ddacdaf1f40075c1
DIST tiny-dnn-1.0.0a3.tar.gz 12885646 BLAKE2B 85c0715ab6c692b77522487775e70b0db645528baed1830c83c9f44d2b67a5207e4f7ea1709b35c6a4217d287199549304e9be19f4a5cec9a1183b0b5dccc562 SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b
DIST vgg_boostdesc-3.2.0.tar.gz 1867770 BLAKE2B 1fa5b58e73b6fa56ecf8d19af22298f729942ee1369082e173445d09d3de767bf844bad3d2b462efc1199c392f37c88ba49a9996ba8bfd84b4abeba7de94db63 SHA512 4a046aedd639c8eb4b295b0f499e756deb66210ca083f0124c75531e540663367cb58f6d175f66c4713324177036cd89a8869bdab2de8d1736dafc7f00ef9f44
EBUILD opencv-2.4.13-r3.ebuild 6007 BLAKE2B 1b78cbb84733a057876a8e0a942c753786ac0b836b4e1116b9225b46cb36c37deca4c53d5df78784b99ce628e15010bf60ee750691c657d935ffa75733f54cdf SHA512 eb633e9f6e19de369a8bfcc75ca644a47cb2ca2fb2ccc8a91703e1c964d952dbdbcbae635163014839d62a647b0fa9a6c6ad8ae20c9d72fa87b270de55a57a44
-EBUILD opencv-3.1.0-r8.ebuild 10666 BLAKE2B cb0777a26f6258df80001bedb0705bd1804d1bc3a01592eba66c9d52d0d93b1538697e41ceeef7ca90ef57c7d7e6a834450cfb463bdb5b0a4614dae1f662a0aa SHA512 a8c40927311623d1b40f96c4a49bf7f135c74e7956246ea0b8f817a49faeaf694216afae498786fb4d46bfefa9222bab25fc01e4f544f521fc4d19b1db14c3ff
EBUILD opencv-3.2.0-r2.ebuild 10387 BLAKE2B d9b6b704e465ee03862a2b264af592025197b7b7a79b8ce61ca0e2535bd4b7d0930d53d5e4acefb44774a1135488c394424066ce3320560bc8f694358272628f SHA512 e065790498734f16ce6f5fa4446e44e776b7097467f4ce8dc9da39d65038f4c8a646ef0e286daa4c1a5070c41595cbfe7731cc6965206b7650969306385db8af
EBUILD opencv-3.2.0-r3.ebuild 12171 BLAKE2B f5fdc59285166a2a4e2e31901eef8d66cf0bfa948ce4b06ee9f80c91f2acceeefccc6fa4a03cbf05f609d1d51ebe58f9b192df071a016d157f921b738d00ef13 SHA512 b4dc53882ea13aeb90454dd54818d5d7ea3f0d00425c2f3eaea9ee493f84dd0956115bf2289e58b36b5de35dff455a86e24df0a804faf0f53db490030e99affb
EBUILD opencv-3.3.0-r2.ebuild 12169 BLAKE2B a6ed4ce0fc0f3a2bd432979c2caa88f8e27ad2dfe2b94e8c871d394496b7443452323463e7cbc47b52a8bdfaf02d9573d146746bd38248e26da05bcf36d0203e SHA512 d56942b7173929b842e068fcc83dceba38c9cad6e48dfc745438d2bd007a1db604e312034a423e299fd082a3d22ae0cbe52ad82219ffe8a228fb3a8e3ecc80f6
EBUILD opencv-3.3.0-r4.ebuild 16525 BLAKE2B 053b335e77f6a85ccc3d31de2e0ab7211fff0ef93d37d43f659161581d130c2fd64d9e5558e4f3c0fb2628dee01e37093782ed05e57c74a1eff74064d4c194bd SHA512 4b2a62017bc97ea01c08e56fb33a55f48abebea743cb6d6b9be15cc42c7fbc26707bc016b4f27f39c183abbeca1c4666e7c98844413e2495ebd6a93cf85d42ba
EBUILD opencv-3.3.0-r5.ebuild 17096 BLAKE2B b831fe5601493b228023ee9f2d86d265b3841375beec391c1c2622df8c7b673c239086d249470a98b09aade2be3c7f983e7748b386f385d23dd2762ccd8cfa0e SHA512 9f8b51d1adaae620133c144ca3f4c1ad6d249a4bc77db883a7318eb3d80034978e371852d003866de5376824e1808fc2644da2308365920842f4c3590b0b452f
-MISC metadata.xml 2541 BLAKE2B cc1a2f017f2cc80c76edc9e20cc4bb224a2f55351575d6faf5fba43e82906f9a99bd4abeb1de2677c527d40354dca3bd0bc69015145a339285341f3d46760cde SHA512 9800b705fa2571dee354b3fd6b34a71505ac66482d47b1bd974b49afdf42b7c27f37a375053c5cf469991f2d095535c3e96f4c5c89dc9a4e9820c57b8f1a21bc
+EBUILD opencv-3.4.1-r1.ebuild 18274 BLAKE2B 1bcf6b99f53bc30edb77f73810edceca0de7baa06e60b99843448d23d98769096abf725bb4d20bbba72b5c4a02bd25fdec604e44969ecab7aaf4aed58453f0c0 SHA512 caed3d62f9b8bb3c7dd2380a3bcf4c736a876442d5b9dc1d40ba2df495327a690436e4b27d8ad10d76dd278b8593bc72a21005dbafb61ed7440a4386c74ceaa6
+MISC metadata.xml 2648 BLAKE2B fe794c98503b602b365ea04bf32c1011fc485faf7da60e4475db32a3403be3f13be3c713270121feab8f5ec7dc6ac4caa7cbd9dbefaa121fa337273184d5a326 SHA512 60544f21407bffb30e12a2207288832487f0e2ff535343f06d103c0db13441776d84c0645d568ee7a9f7d502ca4267a8be923fe1cbbb8902a950ca7395616848
diff --git a/media-libs/opencv/files/opencv-3.1.0-cmake-no-opengl.patch b/media-libs/opencv/files/opencv-3.1.0-cmake-no-opengl.patch
deleted file mode 100644
index d6d70d717d3b..000000000000
--- a/media-libs/opencv/files/opencv-3.1.0-cmake-no-opengl.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From cdb9c60dcb65e04e7c0bd6bef9b86841191c785a Mon Sep 17 00:00:00 2001
-From: Alexander Alekhin <alexander.alekhin@itseez.com>
-Date: Thu, 31 Dec 2015 02:24:54 +0300
-Subject: [PATCH] gpu samples: fix REMOVE_ITEM error
-
----
- samples/gpu/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt
-index 6085cac..852a8c2 100644
---- a/samples/gpu/CMakeLists.txt
-+++ b/samples/gpu/CMakeLists.txt
-@@ -97,7 +97,7 @@ endif()
- if(INSTALL_C_EXAMPLES AND NOT WIN32)
- file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd )
- if(NOT WITH_OPENGL)
-- list(REMOVE_ITEM all_samples "opengl.cpp")
-+ list(REMOVE_ITEM install_list "opengl.cpp")
- endif(NOT WITH_OPENGL)
- install(FILES ${install_list}
- DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/gpu
diff --git a/media-libs/opencv/files/opencv-3.1.0-git-autodetect.patch b/media-libs/opencv/files/opencv-3.1.0-git-autodetect.patch
deleted file mode 100644
index f4bf0da2cc92..000000000000
--- a/media-libs/opencv/files/opencv-3.1.0-git-autodetect.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/CMakeLists.txt 2016-04-07 14:34:35.090937125 +0200
-+++ b/CMakeLists.txt 2016-04-07 14:35:18.492935300 +0200
-@@ -444,23 +444,23 @@
- # ----------------------------------------------------------------------------
- # Autodetect if we are in a GIT repository
- # ----------------------------------------------------------------------------
--find_host_package(Git QUIET)
-+#find_host_package(Git QUIET)
-
--if(GIT_FOUND)
-- execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags --always --dirty --match "[0-9].[0-9].[0-9]*"
-- WORKING_DIRECTORY "${OpenCV_SOURCE_DIR}"
-- OUTPUT_VARIABLE OPENCV_VCSVERSION
-- RESULT_VARIABLE GIT_RESULT
-- ERROR_QUIET
-- OUTPUT_STRIP_TRAILING_WHITESPACE
-- )
-- if(NOT GIT_RESULT EQUAL 0)
-- set(OPENCV_VCSVERSION "unknown")
-- endif()
--else()
-- # We don't have git:
-- set(OPENCV_VCSVERSION "unknown")
--endif()
-+#if(GIT_FOUND)
-+# execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags --always --dirty --match "[0-9].[0-9].[0-9]*"
-+# WORKING_DIRECTORY "${OpenCV_SOURCE_DIR}"
-+# OUTPUT_VARIABLE OPENCV_VCSVERSION
-+# RESULT_VARIABLE GIT_RESULT
-+# ERROR_QUIET
-+# OUTPUT_STRIP_TRAILING_WHITESPACE
-+# )
-+# if(NOT GIT_RESULT EQUAL 0)
-+# set(OPENCV_VCSVERSION "unknown")
-+# endif()
-+#else()
-+# # We don't have git:
-+# set(OPENCV_VCSVERSION "unknown")
-+#endif()
-
-
- # ----------------------------------------------------------------------------
diff --git a/media-libs/opencv/files/opencv-3.1.0-remove-graphcut-for-cuda-8.patch b/media-libs/opencv/files/opencv-3.1.0-remove-graphcut-for-cuda-8.patch
deleted file mode 100644
index 64761a263a17..000000000000
--- a/media-libs/opencv/files/opencv-3.1.0-remove-graphcut-for-cuda-8.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 10896129b39655e19e4e7c529153cb5c2191a1db Mon Sep 17 00:00:00 2001
-From: Vladislav Vinogradov <vlad.vinogradov@itseez.com>
-Date: Fri, 6 May 2016 11:37:32 +0300
-Subject: [PATCH] GraphCut deprecated in CUDA 7.5 and removed in 8.0
-
----
- modules/cudalegacy/src/graphcuts.cpp | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/modules/cudalegacy/src/graphcuts.cpp b/modules/cudalegacy/src/graphcuts.cpp
-index eb08c3c..1a1eb85 100644
---- a/modules/cudalegacy/src/graphcuts.cpp
-+++ b/modules/cudalegacy/src/graphcuts.cpp
-@@ -42,7 +42,8 @@
-
- #include "precomp.hpp"
-
--#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
-+// GraphCut has been removed in NPP 8.0
-+#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) || (CUDART_VERSION >= 8000)
-
- void cv::cuda::graphcut(GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, Stream&) { throw_no_cuda(); }
- void cv::cuda::graphcut(GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, Stream&) { throw_no_cuda(); }
diff --git a/media-libs/opencv/files/opencv-3.4.0-disable-download.patch b/media-libs/opencv/files/opencv-3.4.0-disable-download.patch
new file mode 100644
index 000000000000..245ad3b3d028
--- /dev/null
+++ b/media-libs/opencv/files/opencv-3.4.0-disable-download.patch
@@ -0,0 +1,29 @@
+--- a/CMakeLists.txt 2018-05-13 20:47:11.635871328 +0200
++++ b/CMakeLists.txt 2018-05-13 20:47:49.289872617 +0200
+@@ -187,6 +187,7 @@
+ # ----------------------------------------------------------------------------
+
+ OCV_OPTION(OPENCV_ENABLE_NONFREE "Enable non-free algorithms" OFF)
++OCV_OPTION(ENABLE_DOWNLOAD "Enable download during configure" ON)
+
+ # 3rd party libs
+ OCV_OPTION(BUILD_ZLIB "Build zlib from source" WIN32 OR APPLE)
+
+--- a/cmake/OpenCVDownload.cmake 2018-05-13 21:22:14.966943336 +0200
++++ b/cmake/OpenCVDownload.cmake 2018-05-13 21:23:15.959945424 +0200
+@@ -32,6 +32,7 @@
+
+
+ function(ocv_download)
++ if(ENABLE_DOWNLOAD)
+ cmake_parse_arguments(DL "UNPACK;RELATIVE_URL" "FILENAME;HASH;DESTINATION_DIR;ID;STATUS" "URL" ${ARGN})
+
+ macro(ocv_download_log)
+@@ -236,4 +237,7 @@
+ if(OCV_DOWNLOAD_HASH_NAME)
+ set(${OCV_DOWNLOAD_HASH_NAME} "${DL_HASH}" CACHE INTERNAL "")
+ endif()
++ else()
++ message( "Download was disabled during configure phase by ENABLE_DOWNLOAD=OFF" )
++ endif()
+ endfunction()
diff --git a/media-libs/opencv/metadata.xml b/media-libs/opencv/metadata.xml
index 5e3541cd325b..f87770fadafa 100644
--- a/media-libs/opencv/metadata.xml
+++ b/media-libs/opencv/metadata.xml
@@ -27,6 +27,7 @@ Face Recognition; Gesture Recognition; Motion Tracking, Ego Motion, Motion Under
<flag restrict="&gt;=media-libs/opencv-3.3.0" name="contrib_dnn">DNN module contrib requires tiny dnn</flag>
<flag restrict="&gt;=media-libs/opencv-3.1.0" name="contrib_hdf">HDF module requires <pkg>sci-libs/hdf5</pkg></flag>
<flag restrict="&gt;=media-libs/opencv-3.1.0" name="contrib_sfm">SFM module requires eigen, gflags, and glog</flag>
+ <flag restrict="&gt;=media-libs/opencv-3.4.0" name="dnn_samples">Download dnn caffeemodel samples</flag>
<flag name="opencl">Add support for OpenCL</flag>
<flag restrict="&gt;=media-libs/opencv-3.1.0" name="tesseract">Use Google's OCR Engine</flag>
<flag name="testprograms">Build and install programs for testing OpenCV (performance)</flag>
diff --git a/media-libs/opencv/opencv-3.1.0-r8.ebuild b/media-libs/opencv/opencv-3.1.0-r8.ebuild
deleted file mode 100644
index e794ca1e0802..000000000000
--- a/media-libs/opencv/opencv-3.1.0-r8.ebuild
+++ /dev/null
@@ -1,328 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-inherit toolchain-funcs python-r1 java-pkg-opt-2 java-ant-2 \
- cmake-multilib
-
-DESCRIPTION="A collection of algorithms and sample code for
- various computer vision problems"
-HOMEPAGE="https://opencv.org"
-
-BASE_URI="https://github.com/${PN}/${PN}"
-#commit from Thu, 02 Jun 2016
-CONTRIB_URI="75b3ea9f72fdb083140fc63855b7677d67748376"
-CONTRIB_P="${P}_contrib-${CONTRIB_URI:0:7}"
-
-SRC_URI="${BASE_URI}/archive/${PV}.tar.gz -> ${P}.tar.gz
- contrib? ( ${BASE_URI}_contrib/archive/${CONTRIB_URI}.tar.gz -> ${CONTRIB_P}.tar.gz )"
-LICENSE="BSD"
-SLOT="0/3.1" # subslot = libopencv* soname version
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux"
-IUSE="contrib cuda +eigen examples ffmpeg gdal gflags glog gphoto2 gstreamer gtk \
- ieee1394 ipp jpeg jpeg2k libav opencl openexr opengl openmp pch png \
- +python qt5 tesseract testprograms threads tiff vaapi v4l vtk webp xine \
- contrib_cvv contrib_hdf contrib_sfm"
-
-# OpenGL needs gtk or Qt installed to activate, otherwise build system
-# will silently disable it without the user knowing, which defeats the
-# purpose of the opengl use flag.
-REQUIRED_USE="
- cuda? ( tesseract? ( opencl ) )
- gflags? ( contrib )
- glog? ( contrib )
- contrib_cvv? ( contrib qt5 )
- contrib_hdf? ( contrib )
- contrib_sfm? ( contrib eigen gflags glog )
- opengl? ( || ( gtk qt5 ) )
- python? ( ${PYTHON_REQUIRED_USE} )
- tesseract? ( contrib )"
-
-# The following logic is intrinsic in the build system, but we do not enforce
-# it on the useflags since this just blocks emerging pointlessly:
-# gtk? ( !qt5 )
-# openmp? ( !threads )
-
-RDEPEND="
- app-arch/bzip2[${MULTILIB_USEDEP}]
- sys-libs/zlib[${MULTILIB_USEDEP}]
- cuda? ( dev-util/nvidia-cuda-toolkit:0= )
- ffmpeg? (
- libav? ( media-video/libav:0=[${MULTILIB_USEDEP}] )
- !libav? ( 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}]
- )
- gtk? (
- dev-libs/glib:2[${MULTILIB_USEDEP}]
- x11-libs/gtk+:2[${MULTILIB_USEDEP}]
- opengl? ( x11-libs/gtkglext[${MULTILIB_USEDEP}] )
- )
- java? ( >=virtual/jre-1.6:* )
- jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] )
- jpeg2k? ( media-libs/jasper:=[${MULTILIB_USEDEP}] )
- ieee1394? (
- media-libs/libdc1394[${MULTILIB_USEDEP}]
- sys-libs/libraw1394[${MULTILIB_USEDEP}]
- )
- ipp? ( sci-libs/ipp )
- contrib_hdf? ( sci-libs/hdf5 )
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
- openexr? ( media-libs/openexr[${MULTILIB_USEDEP}] )
- 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=] )
- threads? ( dev-cpp/tbb[${MULTILIB_USEDEP}] )
- tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
- v4l? ( >=media-libs/libv4l-0.8.3[${MULTILIB_USEDEP}] )
- vtk? ( sci-libs/vtk[rendering] )
- webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] )
- xine? ( media-libs/xine-lib )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig[${MULTILIB_USEDEP}]
- eigen? ( dev-cpp/eigen:3 )
- java? ( >=virtual/jdk-1.6 )"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/opencv2/cvconfig.h
- /usr/include/opencv2/opencv_modules.hpp
- # [contrib_cvv]
- /usr/include/opencv2/cvv.hpp
- /usr/include/opencv2/cvv/call_meta_data.hpp
- /usr/include/opencv2/cvv/cvv.hpp
- /usr/include/opencv2/cvv/debug_mode.hpp
- /usr/include/opencv2/cvv/dmatch.hpp
- /usr/include/opencv2/cvv/filter.hpp
- /usr/include/opencv2/cvv/final_show.hpp
- /usr/include/opencv2/cvv/show_image.hpp
- # [contrib_hdf]
- /usr/include/opencv2/hdf.hpp
- /usr/include/opencv2/hdf/hdf5.hpp
- # [vtk]
- /usr/include/opencv2/viz.hpp
- /usr/include/opencv2/viz/types.hpp
- /usr/include/opencv2/viz/viz3d.hpp
- /usr/include/opencv2/viz/vizcore.hpp
- /usr/include/opencv2/viz/widget_accessor.hpp
- /usr/include/opencv2/viz/widgets.hpp
-)
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.0.0-gles.patch
- "${FILESDIR}"/${P}-cmake-no-opengl.patch
- "${FILESDIR}"/${P}-git-autodetect.patch
- "${FILESDIR}"/${P}-java-magic.patch
- "${FILESDIR}"/${P}-remove-graphcut-for-cuda-8.patch
- "${FILESDIR}"/${P}-find-libraries-fix.patch
-)
-
-GLOBALCMAKEARGS=()
-
-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() {
- cmake-utils_src_prepare
-
- # remove bundled stuff
- rm -rf 3rdparty || die "Removing 3rd party components failed"
- sed -e '/add_subdirectory(.*3rdparty.*)/ d' \
- -i CMakeLists.txt cmake/*cmake || die
-
- 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() {
- # please dont sort here, order is the same as in CMakeLists.txt
- GLOBALCMAKEARGS=(
- # Optional 3rd party components
- # ===================================================
- -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 gtk)
- -DWITH_GTK_2_X=$(usex gtk)
- -DWITH_IPP=$(multilib_native_usex ipp)
- -DWITH_JASPER=$(usex jpeg2k)
- -DWITH_JPEG=$(usex jpeg)
- -DWITH_WEBP=$(usex webp)
- -DWITH_OPENEXR=$(usex openexr)
- -DWITH_OPENGL=$(usex opengl)
- -DWITH_OPENNI=OFF # Not packaged
- -DWITH_OPENNI2=OFF # Not packaged
- -DWITH_PNG=$(usex png)
- -DWITH_PVAPI=OFF # Not packaged
- -DWITH_GIGEAPI=OFF
- -DWITH_QT=$(multilib_native_usex qt5 5 OFF)
- -DWITH_WIN32UI=OFF # Windows only
- -DWITH_QUICKTIME=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_JAVA=$(multilib_native_usex java) # Ant needed, no compile flag
- -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)
- # ===================================================
- # 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)
- -DCUDA_NPP_LIBRARY_ROOT_DIR=$(usex cuda "${EPREFIX}/opt/cuda" "")
- # ===================================================
- # OpenCV build components
- # ===================================================
- -DBUILD_SHARED_LIBS=ON
- -DBUILD_ANDROID_EXAMPLES=OFF
- -DBUILD_DOCS=OFF # Doesn't install anyways.
- -DBUILD_EXAMPLES=$(multilib_native_usex examples)
- -DBUILD_PERF_TESTS=OFF
- -DBUILD_TESTS=$(multilib_native_usex testprograms)
- -DOPENCV_EXTRA_MODULES_PATH=$(usex contrib "${WORKDIR}/opencv_contrib-${CONTRIB_URI}/modules" "")
- # ===================================================
- # OpenCV installation options
- # ===================================================
- -DINSTALL_C_EXAMPLES=$(multilib_native_usex examples)
- -DINSTALL_TESTS=$(multilib_native_usex testprograms)
- # ===================================================
- # OpenCV build options
- # ===================================================
- -DENABLE_PRECOMPILED_HEADERS=$(usex pch)
- -DHAVE_opencv_java=$(multilib_native_usex java YES NO)
- # ===================================================
- # things we want to be hard off or not yet figured out
- # ===================================================
- -DBUILD_PACKAGE=OFF
- -DENABLE_PROFILING=OFF
- # ===================================================
- # things we want to be hard enabled not worth useflag
- # ===================================================
- -DCMAKE_SKIP_RPATH=ON
- -DOPENCV_DOC_INSTALL_PATH=
- )
-
- # ===================================================
- # OpenCV Contrib Modules
- # ===================================================
- if use contrib; then
- GLOBALCMAKEARGS+=(
- -DBUILD_opencv_dnn=OFF
- -DBUILD_opencv_dnns_easily_fooled=OFF
- -DBUILD_opencv_cvv=$(usex contrib_cvv ON OFF)
- -DBUILD_opencv_hdf=$(multilib_native_usex contrib_hdf ON OFF)
- -DBUILD_opencv_sfm=$(usex contrib_sfm 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
- )
-
- cmake-utils_src_configure
-}
-
-python_module_compile() {
- local BUILD_DIR=${orig_BUILD_DIR}
- local mycmakeargs=( ${GLOBALCMAKEARGS[@]} )
-
- # Set all python variables to load the correct Gentoo paths
- mycmakeargs+=(
- # upstream doesn't really care about 2/3, and if we don't
- # disable this, it builds python2 + python3 module for the same
- # version of Python 3 (i.e. two identical modules)...
- -DPYTHON3_EXECUTABLE=/bin/false
- -DINSTALL_PYTHON_EXAMPLES=$(usex examples)
- )
-
- # Regenerate cache file. Can't use rebuild_cache as it won't
- # have the Gentoo specific options.
- rm -rf CMakeCache.txt || die "rm failed"
- cmake-utils_src_configure
- cmake-utils_src_compile
- cmake-utils_src_install
-
- # Remove compiled binary so new version compiles
- # Avoid conflicts with new module builds as build system doesn't
- # really support it.
- rm -rf modules/python2 || die "rm failed"
-}
-
-multilib_src_install() {
- cmake-utils_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-3.4.1-r1.ebuild b/media-libs/opencv/opencv-3.4.1-r1.ebuild
new file mode 100644
index 000000000000..578d147619a3
--- /dev/null
+++ b/media-libs/opencv/opencv-3.4.1-r1.ebuild
@@ -0,0 +1,494 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit java-pkg-opt-2 java-ant-2 python-r1 toolchain-funcs cmake-multilib
+
+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
+ dnn_samples? ( https://dev.gentoo.org/~amynka/snap/${PN}-3.4.0-res10_300x300-caffeemodel.tar.gz )
+ contrib? (
+ https://github.com/${PN}/${PN}_contrib/archive/${PV}.tar.gz -> ${P}_contrib.tar.gz
+ contrib_dnn? ( https://github.com/tiny-dnn/tiny-dnn/archive/v${TINY_DNN_PV}.tar.gz -> tiny-dnn-${TINY_DNN_PV}.tar.gz
+ https://dev.gentoo.org/~amynka/snap/${PN}-3.4.0-face_landmark_model.tar.gz
+ )
+ contrib_xfeatures2d? ( https://dev.gentoo.org/~amynka/snap/vgg_boostdesc-3.2.0.tar.gz )
+ )"
+
+LICENSE="BSD"
+SLOT="0/3.4.1" # subslot = libopencv* soname version
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux"
+IUSE="contrib contrib_cvv contrib_dnn contrib_hdf contrib_sfm contrib_xfeatures2d cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cpu_flags_x86_popcnt cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_fma3 cuda debug dnn_samples +eigen examples ffmpeg gdal gflags glog gphoto2 gstreamer gtk ieee1394 ipp jpeg jpeg2k lapack libav opencl openexr opengl openmp pch png +python qt5 tesseract testprograms threads tiff vaapi v4l vtk webp xine"
+# 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.
+REQUIRED_USE="
+ cuda? ( tesseract? ( opencl ) )
+ dnn_samples? ( examples )
+ gflags? ( contrib )
+ glog? ( contrib )
+ contrib_cvv? ( contrib qt5 )
+ contrib_dnn? ( contrib )
+ contrib_hdf? ( contrib )
+ contrib_sfm? ( contrib eigen gflags glog )
+ contrib_xfeatures2d? ( contrib cuda )
+ java? ( python )
+ opengl? ( || ( gtk qt5 ) )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ tesseract? ( contrib )"
+
+# The following logic is intrinsic in the build system, but we do not enforce
+# it on the useflags since this just blocks emerging pointlessly:
+# gtk? ( !qt5 )
+# openmp? ( !threads )
+
+RDEPEND="
+ app-arch/bzip2[${MULTILIB_USEDEP}]
+ dev-libs/protobuf:=[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ cuda? ( dev-util/nvidia-cuda-toolkit:0= )
+ contrib_hdf? ( sci-libs/hdf5 )
+ ffmpeg? (
+ libav? ( media-video/libav:0=[${MULTILIB_USEDEP}] )
+ !libav? ( 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}]
+ )
+ gtk? (
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ x11-libs/gtk+:2[${MULTILIB_USEDEP}]
+ opengl? ( x11-libs/gtkglext[${MULTILIB_USEDEP}] )
+ )
+ ieee1394? (
+ media-libs/libdc1394[${MULTILIB_USEDEP}]
+ sys-libs/libraw1394[${MULTILIB_USEDEP}]
+ )
+ ipp? ( sci-libs/ipp )
+ java? ( >=virtual/jre-1.6:* )
+ jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] )
+ jpeg2k? ( media-libs/jasper:=[${MULTILIB_USEDEP}] )
+ lapack? ( virtual/lapack )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ openexr? ( media-libs/openexr[${MULTILIB_USEDEP}] )
+ 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=] )
+ threads? ( dev-cpp/tbb[${MULTILIB_USEDEP}] )
+ tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
+ v4l? ( >=media-libs/libv4l-0.8.3[${MULTILIB_USEDEP}] )
+ vtk? ( sci-libs/vtk[rendering] )
+ webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] )
+ xine? ( media-libs/xine-lib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+ contrib_dnn? ( dev-libs/cereal )
+ eigen? ( dev-cpp/eigen:3 )
+ java? ( >=virtual/jdk-1.6 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/opencv2/cvconfig.h
+ /usr/include/opencv2/opencv_modules.hpp
+ # [contrib_cvv]
+ /usr/include/opencv2/cvv.hpp
+ /usr/include/opencv2/cvv/call_meta_data.hpp
+ /usr/include/opencv2/cvv/cvv.hpp
+ /usr/include/opencv2/cvv/debug_mode.hpp
+ /usr/include/opencv2/cvv/dmatch.hpp
+ /usr/include/opencv2/cvv/filter.hpp
+ /usr/include/opencv2/cvv/final_show.hpp
+ /usr/include/opencv2/cvv/show_image.hpp
+ # [contrib_hdf]
+ /usr/include/opencv2/hdf.hpp
+ /usr/include/opencv2/hdf/hdf5.hpp
+ # [vtk]
+ /usr/include/opencv2/viz.hpp
+ /usr/include/opencv2/viz/types.hpp
+ /usr/include/opencv2/viz/viz3d.hpp
+ /usr/include/opencv2/viz/vizcore.hpp
+ /usr/include/opencv2/viz/widget_accessor.hpp
+ /usr/include/opencv2/viz/widgets.hpp
+ # [cudev]
+ /usr/include/opencv2/cudaarithm.hpp
+ /usr/include/opencv2/cudabgsegm.hpp
+ /usr/include/opencv2/cudacodec.hpp
+ /usr/include/opencv2/cudafeatures2d.hpp
+ /usr/include/opencv2/cudafilters.hpp
+ /usr/include/opencv2/cudaimgproc.hpp
+ /usr/include/opencv2/cudalegacy.hpp
+ /usr/include/opencv2/cudalegacy/NCVBroxOpticalFlow.hpp
+ /usr/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp
+ /usr/include/opencv2/cudalegacy/NCV.hpp
+ /usr/include/opencv2/cudalegacy/NCVPyramid.hpp
+ /usr/include/opencv2/cudalegacy/NPP_staging.hpp
+ /usr/include/opencv2/cudaobjdetect.hpp
+ /usr/include/opencv2/cudaoptflow.hpp
+ /usr/include/opencv2/cudastereo.hpp
+ /usr/include/opencv2/cudawarping.hpp
+ /usr/include/opencv2/cudev/block/block.hpp
+ /usr/include/opencv2/cudev/block/detail/reduce.hpp
+ /usr/include/opencv2/cudev/block/detail/reduce_key_val.hpp
+ /usr/include/opencv2/cudev/block/dynamic_smem.hpp
+ /usr/include/opencv2/cudev/block/reduce.hpp
+ /usr/include/opencv2/cudev/block/scan.hpp
+ /usr/include/opencv2/cudev/block/vec_distance.hpp
+ /usr/include/opencv2/cudev/common.hpp
+ /usr/include/opencv2/cudev/expr/binary_func.hpp
+ /usr/include/opencv2/cudev/expr/binary_op.hpp
+ /usr/include/opencv2/cudev/expr/color.hpp
+ /usr/include/opencv2/cudev/expr/deriv.hpp
+ /usr/include/opencv2/cudev/expr/expr.hpp
+ /usr/include/opencv2/cudev/expr/per_element_func.hpp
+ /usr/include/opencv2/cudev/expr/reduction.hpp
+ /usr/include/opencv2/cudev/expr/unary_func.hpp
+ /usr/include/opencv2/cudev/expr/unary_op.hpp
+ /usr/include/opencv2/cudev/expr/warping.hpp
+ /usr/include/opencv2/cudev/functional/color_cvt.hpp
+ /usr/include/opencv2/cudev/functional/detail/color_cvt.hpp
+ /usr/include/opencv2/cudev/functional/functional.hpp
+ /usr/include/opencv2/cudev/functional/tuple_adapter.hpp
+ /usr/include/opencv2/cudev/grid/copy.hpp
+ /usr/include/opencv2/cudev/grid/detail/copy.hpp
+ /usr/include/opencv2/cudev/grid/detail/histogram.hpp
+ /usr/include/opencv2/cudev/grid/detail/integral.hpp
+ /usr/include/opencv2/cudev/grid/detail/minmaxloc.hpp
+ /usr/include/opencv2/cudev/grid/detail/pyr_down.hpp
+ /usr/include/opencv2/cudev/grid/detail/pyr_up.hpp
+ /usr/include/opencv2/cudev/grid/detail/reduce.hpp
+ /usr/include/opencv2/cudev/grid/detail/reduce_to_column.hpp
+ /usr/include/opencv2/cudev/grid/detail/reduce_to_row.hpp
+ /usr/include/opencv2/cudev/grid/detail/split_merge.hpp
+ /usr/include/opencv2/cudev/grid/detail/transform.hpp
+ /usr/include/opencv2/cudev/grid/detail/transpose.hpp
+ /usr/include/opencv2/cudev/grid/histogram.hpp
+ /usr/include/opencv2/cudev/grid/integral.hpp
+ /usr/include/opencv2/cudev/grid/pyramids.hpp
+ /usr/include/opencv2/cudev/grid/reduce.hpp
+ /usr/include/opencv2/cudev/grid/reduce_to_vec.hpp
+ /usr/include/opencv2/cudev/grid/split_merge.hpp
+ /usr/include/opencv2/cudev/grid/transform.hpp
+ /usr/include/opencv2/cudev/grid/transpose.hpp
+ /usr/include/opencv2/cudev.hpp
+ /usr/include/opencv2/cudev/ptr2d/constant.hpp
+ /usr/include/opencv2/cudev/ptr2d/deriv.hpp
+ /usr/include/opencv2/cudev/ptr2d/detail/gpumat.hpp
+ /usr/include/opencv2/cudev/ptr2d/extrapolation.hpp
+ /usr/include/opencv2/cudev/ptr2d/glob.hpp
+ /usr/include/opencv2/cudev/ptr2d/gpumat.hpp
+ /usr/include/opencv2/cudev/ptr2d/interpolation.hpp
+ /usr/include/opencv2/cudev/ptr2d/lut.hpp
+ /usr/include/opencv2/cudev/ptr2d/mask.hpp
+ /usr/include/opencv2/cudev/ptr2d/remap.hpp
+ /usr/include/opencv2/cudev/ptr2d/resize.hpp
+ /usr/include/opencv2/cudev/ptr2d/texture.hpp
+ /usr/include/opencv2/cudev/ptr2d/traits.hpp
+ /usr/include/opencv2/cudev/ptr2d/transform.hpp
+ /usr/include/opencv2/cudev/ptr2d/warping.hpp
+ /usr/include/opencv2/cudev/ptr2d/zip.hpp
+ /usr/include/opencv2/cudev/util/atomic.hpp
+ /usr/include/opencv2/cudev/util/detail/tuple.hpp
+ /usr/include/opencv2/cudev/util/detail/type_traits.hpp
+ /usr/include/opencv2/cudev/util/limits.hpp
+ /usr/include/opencv2/cudev/util/saturate_cast.hpp
+ /usr/include/opencv2/cudev/util/simd_functions.hpp
+ /usr/include/opencv2/cudev/util/tuple.hpp
+ /usr/include/opencv2/cudev/util/type_traits.hpp
+ /usr/include/opencv2/cudev/util/vec_math.hpp
+ /usr/include/opencv2/cudev/util/vec_traits.hpp
+ /usr/include/opencv2/cudev/warp/detail/reduce.hpp
+ /usr/include/opencv2/cudev/warp/detail/reduce_key_val.hpp
+ /usr/include/opencv2/cudev/warp/reduce.hpp
+ /usr/include/opencv2/cudev/warp/scan.hpp
+ /usr/include/opencv2/cudev/warp/shuffle.hpp
+ /usr/include/opencv2/cudev/warp/warp.hpp
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.0-gles.patch"
+ "${FILESDIR}/${PN}-3.4.0-disable-download.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() {
+ cmake-utils_src_prepare
+
+ # remove bundled stuff
+ rm -rf 3rdparty || die "Removing 3rd party components failed"
+ sed -e '/add_subdirectory(.*3rdparty.*)/ d' \
+ -i CMakeLists.txt cmake/*cmake || die
+
+ if use dnn_samples; 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
+ eapply "${FILESDIR}/${PN}-3.3.0-remove-tiny-dnn-autodownload.patch"
+
+ if use contrib_xfeatures2d; then
+ mv "${WORKDIR}"/*.i "${WORKDIR}/${PN}_contrib-${PV}"/modules/xfeatures2d/src/ || die
+ fi
+ 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() {
+ # please dont sort here, order is the same as in CMakeLists.txt
+ GLOBALCMAKEARGS=(
+ # Optional 3rd party components
+ # ===================================================
+ -DENABLE_DOWNLOAD=OFF
+ -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 gtk)
+ -DWITH_GTK_2_X=$(usex gtk)
+ -DWITH_IPP=$(multilib_native_usex ipp)
+ -DWITH_JASPER=$(usex jpeg2k)
+ -DWITH_JPEG=$(usex jpeg)
+ -DWITH_WEBP=$(usex webp)
+ -DWITH_OPENEXR=$(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
+ -BUILD_opencv_apps=
+ -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=$(multilib_native_usex java)
+ # -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
+ # opencv uses both ${CMAKE_INSTALL_LIBDIR} and ${LIB_SUFFIX}
+ # to set its destination libdir
+ -DLIB_SUFFIX=
+ # ===================================================
+ # OpenCV build options
+ # ===================================================
+ -DENABLE_CCACHE=OFF
+ -DENABLE_PRECOMPILED_HEADERS=$(usex pch)
+ -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
+ # ===================================================
+ -DBUILD_PROTOBUF=OFF
+ -DPROTOBUF_UPDATE_FILES=ON
+ # ===================================================
+ # things we want to be hard enabled not worth useflag
+ # ===================================================
+ -DCMAKE_SKIP_RPATH=ON
+ -DOPENCV_DOC_INSTALL_PATH=
+ # ==================================================
+ # cpu flags, should solve 633900
+ #===================================================
+ -DCPU_DISPATCH=OFF
+ -DENABLE_SSE=$(usex cpu_flags_x86_sse)
+ -DENABLE_SSE2=$(usex cpu_flags_x86_sse2)
+ -DENABLE_SSE3=$(usex cpu_flags_x86_sse3)
+ -DENABLE_SSSE3=$(usex cpu_flags_x86_ssse3)
+ -DENABLE_SSE41=$(usex cpu_flags_x86_sse4_1)
+ -DENABLE_SSE42=$(usex cpu_flags_x86_sse4_2)
+ -DENABLE_POPCNT=$(usex cpu_flags_x86_popcnt)
+ -DENABLE_AVX=$(usex cpu_flags_x86_avx)
+ -DENABLE_AVX2=$(usex cpu_flags_x86_avx2)
+ -DENABLE_FMA3=$(usex cpu_flags_x86_fma3)
+ )
+
+ # ===================================================
+ # OpenCV Contrib Modules
+ # ===================================================
+ if use contrib; then
+ GLOBALCMAKEARGS+=(
+ -DBUILD_opencv_dnn=$(usex contrib_dnn ON OFF)
+ -DTINYDNN_ROOT="${WORKDIR}/tiny-dnn-${TINY_DNN_PV}"
+ -DBUILD_opencv_dnns_easily_fooled=OFF
+ -DBUILD_opencv_xfeatures2d=$(usex contrib_xfeatures2d ON OFF)
+ -DBUILD_opencv_cvv=$(usex contrib_cvv ON OFF)
+ -DBUILD_opencv_hdf=$(multilib_native_usex contrib_hdf ON OFF)
+ -DBUILD_opencv_sfm=$(usex contrib_sfm 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
+ )
+
+ cmake-utils_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 contrib_dnn; 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+=(
+ # cheap trick: python_setup sets one of them as a symlink
+ # to the correct interpreter, and the other to fail-wrapper
+ -DPYTHON2_EXECUTABLE=$(type -P python2)
+ -DPYTHON3_EXECUTABLE=$(type -P python3)
+ -DINSTALL_PYTHON_EXAMPLES=$(usex examples)
+ )
+
+ # Regenerate cache file. Can't use rebuild_cache as it won't
+ # have the Gentoo specific options.
+ rm -rf CMakeCache.txt || die "rm failed"
+ cmake-utils_src_configure
+ cmake-utils_src_compile
+ cmake-utils_src_install
+
+ # Remove compiled binary so new version compiles
+ # Avoid conflicts with new module builds as build system doesn't
+ # really support it.
+ rm -rf modules/python2 || die "rm failed"
+}
+
+multilib_src_install() {
+ cmake-utils_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
+}