diff options
Diffstat (limited to 'meta-oe/recipes-support/opencv/opencv_4.5.2.bb')
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv_4.5.2.bb | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv_4.5.2.bb b/meta-oe/recipes-support/opencv/opencv_4.5.2.bb index 31dcc3c29..7eefbccfe 100644 --- a/meta-oe/recipes-support/opencv/opencv_4.5.2.bb +++ b/meta-oe/recipes-support/opencv/opencv_4.5.2.bb | |||
@@ -5,8 +5,8 @@ SECTION = "libs" | |||
5 | LICENSE = "Apache-2.0" | 5 | LICENSE = "Apache-2.0" |
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" |
7 | 7 | ||
8 | ARM_INSTRUCTION_SET_armv4 = "arm" | 8 | ARM_INSTRUCTION_SET:armv4 = "arm" |
9 | ARM_INSTRUCTION_SET_armv5 = "arm" | 9 | ARM_INSTRUCTION_SET:armv5 = "arm" |
10 | 10 | ||
11 | DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" | 11 | DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" |
12 | 12 | ||
@@ -53,7 +53,7 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \ | |||
53 | file://0001-Make-ts-module-external.patch \ | 53 | file://0001-Make-ts-module-external.patch \ |
54 | file://0001-sfm-link-with-Glog_LIBS.patch;patchdir=../contrib \ | 54 | file://0001-sfm-link-with-Glog_LIBS.patch;patchdir=../contrib \ |
55 | " | 55 | " |
56 | SRC_URI_append_riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib" | 56 | SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib" |
57 | 57 | ||
58 | S = "${WORKDIR}/git" | 58 | S = "${WORKDIR}/git" |
59 | 59 | ||
@@ -100,17 +100,17 @@ EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \ | |||
100 | ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \ | 100 | ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \ |
101 | ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \ | 101 | ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \ |
102 | " | 102 | " |
103 | EXTRA_OECMAKE_append_x86 = " -DX86=ON" | 103 | EXTRA_OECMAKE:append:x86 = " -DX86=ON" |
104 | 104 | ||
105 | PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ | 105 | PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ |
106 | ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \ | 106 | ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \ |
107 | ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "libav", "", d)}" | 107 | ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "libav", "", d)}" |
108 | 108 | ||
109 | # TBB does not build for powerpc so disable that package config | 109 | # TBB does not build for powerpc so disable that package config |
110 | PACKAGECONFIG_remove_powerpc = "tbb" | 110 | PACKAGECONFIG:remove:powerpc = "tbb" |
111 | # tbb now needs getcontect/setcontext which is not there for all arches on musl | 111 | # tbb now needs getcontect/setcontext which is not there for all arches on musl |
112 | PACKAGECONFIG_remove_libc-musl_riscv64 = "tbb" | 112 | PACKAGECONFIG:remove:libc-musl:riscv64 = "tbb" |
113 | PACKAGECONFIG_remove_libc-musl_riscv32 = "tbb" | 113 | PACKAGECONFIG:remove:libc-musl:riscv32 = "tbb" |
114 | 114 | ||
115 | PACKAGECONFIG[gapi] = "-DWITH_ADE=ON -Dade_DIR=${STAGING_LIBDIR},-DWITH_ADE=OFF,ade" | 115 | PACKAGECONFIG[gapi] = "-DWITH_ADE=ON -Dade_DIR=${STAGING_LIBDIR},-DWITH_ADE=OFF,ade" |
116 | PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas," | 116 | PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas," |
@@ -158,7 +158,7 @@ PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'samples', '${PN}-samples', ' | |||
158 | ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-${BPN}', '', d)} \ | 158 | ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-${BPN}', '', d)} \ |
159 | ${PN}-apps" | 159 | ${PN}-apps" |
160 | 160 | ||
161 | python populate_packages_prepend () { | 161 | python populate_packages:prepend () { |
162 | cv_libdir = d.expand('${libdir}') | 162 | cv_libdir = d.expand('${libdir}') |
163 | do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True) | 163 | do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True) |
164 | do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev') | 164 | do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev') |
@@ -167,58 +167,58 @@ python populate_packages_prepend () { | |||
167 | 167 | ||
168 | pn = d.getVar('PN') | 168 | pn = d.getVar('PN') |
169 | metapkg = pn + '-dev' | 169 | metapkg = pn + '-dev' |
170 | d.setVar('ALLOW_EMPTY_' + metapkg, "1") | 170 | d.setVar('ALLOW_EMPTY:' + metapkg, "1") |
171 | blacklist = [ metapkg ] | 171 | blacklist = [ metapkg ] |
172 | metapkg_rdepends = [ ] | 172 | metapkg_rdepends = [ ] |
173 | packages = d.getVar('PACKAGES').split() | 173 | packages = d.getVar('PACKAGES').split() |
174 | for pkg in packages[1:]: | 174 | for pkg in packages[1:]: |
175 | if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'): | 175 | if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'): |
176 | metapkg_rdepends.append(pkg) | 176 | metapkg_rdepends.append(pkg) |
177 | d.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends)) | 177 | d.setVar('RRECOMMENDS:' + metapkg, ' '.join(metapkg_rdepends)) |
178 | 178 | ||
179 | metapkg = pn | 179 | metapkg = pn |
180 | d.setVar('ALLOW_EMPTY_' + metapkg, "1") | 180 | d.setVar('ALLOW_EMPTY:' + metapkg, "1") |
181 | blacklist = [ metapkg, "libopencv-ts" ] | 181 | blacklist = [ metapkg, "libopencv-ts" ] |
182 | metapkg_rdepends = [ ] | 182 | metapkg_rdepends = [ ] |
183 | for pkg in packages[1:]: | 183 | for pkg in packages[1:]: |
184 | if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'): | 184 | if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'): |
185 | metapkg_rdepends.append(pkg) | 185 | metapkg_rdepends.append(pkg) |
186 | d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) | 186 | d.setVar('RDEPENDS:' + metapkg, ' '.join(metapkg_rdepends)) |
187 | } | 187 | } |
188 | 188 | ||
189 | PACKAGES_DYNAMIC += "^libopencv-.*" | 189 | PACKAGES_DYNAMIC += "^libopencv-.*" |
190 | 190 | ||
191 | FILES_${PN} = "" | 191 | FILES:${PN} = "" |
192 | FILES_${PN}-dbg += "${datadir}/OpenCV/java/.debug/* ${datadir}/OpenCV/samples/bin/.debug/*" | 192 | FILES:${PN}-dbg += "${datadir}/OpenCV/java/.debug/* ${datadir}/OpenCV/samples/bin/.debug/*" |
193 | FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/cmake/opencv4/*.cmake" | 193 | FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/cmake/opencv4/*.cmake" |
194 | FILES_${PN}-staticdev += "${libdir}/opencv4/3rdparty/*.a" | 194 | FILES:${PN}-staticdev += "${libdir}/opencv4/3rdparty/*.a" |
195 | FILES_${PN}-apps = "${bindir}/* ${datadir}/opencv4 ${datadir}/licenses" | 195 | FILES:${PN}-apps = "${bindir}/* ${datadir}/opencv4 ${datadir}/licenses" |
196 | FILES_${PN}-java = "${datadir}/OpenCV/java" | 196 | FILES:${PN}-java = "${datadir}/OpenCV/java" |
197 | FILES_${PN}-samples = "${datadir}/opencv4/samples/" | 197 | FILES:${PN}-samples = "${datadir}/opencv4/samples/" |
198 | 198 | ||
199 | INSANE_SKIP_${PN}-java = "libdir" | 199 | INSANE_SKIP:${PN}-java = "libdir" |
200 | INSANE_SKIP_${PN}-dbg = "libdir" | 200 | INSANE_SKIP:${PN}-dbg = "libdir" |
201 | 201 | ||
202 | ALLOW_EMPTY_${PN} = "1" | 202 | ALLOW_EMPTY:${PN} = "1" |
203 | 203 | ||
204 | SUMMARY_python-opencv = "Python bindings to opencv" | 204 | SUMMARY:python-opencv = "Python bindings to opencv" |
205 | FILES_python-opencv = "${PYTHON_SITEPACKAGES_DIR}/*" | 205 | FILES:python-opencv = "${PYTHON_SITEPACKAGES_DIR}/*" |
206 | RDEPENDS_python-opencv = "python-core python-numpy" | 206 | RDEPENDS:python-opencv = "python-core python-numpy" |
207 | 207 | ||
208 | SUMMARY_python3-opencv = "Python bindings to opencv" | 208 | SUMMARY:python3-opencv = "Python bindings to opencv" |
209 | FILES_python3-opencv = "${PYTHON_SITEPACKAGES_DIR}/*" | 209 | FILES:python3-opencv = "${PYTHON_SITEPACKAGES_DIR}/*" |
210 | RDEPENDS_python3-opencv = "python3-core python3-numpy" | 210 | RDEPENDS:python3-opencv = "python3-core python3-numpy" |
211 | 211 | ||
212 | RDEPENDS_${PN}-apps = "bash" | 212 | RDEPENDS:${PN}-apps = "bash" |
213 | 213 | ||
214 | do_compile_prepend() { | 214 | do_compile:prepend() { |
215 | # remove the build host info to improve reproducibility | 215 | # remove the build host info to improve reproducibility |
216 | if [ -f ${WORKDIR}/build/modules/core/version_string.inc ]; then | 216 | if [ -f ${WORKDIR}/build/modules/core/version_string.inc ]; then |
217 | sed -i "s#${WORKDIR}#/workdir#g" ${WORKDIR}/build/modules/core/version_string.inc | 217 | sed -i "s#${WORKDIR}#/workdir#g" ${WORKDIR}/build/modules/core/version_string.inc |
218 | fi | 218 | fi |
219 | } | 219 | } |
220 | 220 | ||
221 | do_install_append() { | 221 | do_install:append() { |
222 | # Move Python files into correct library folder (for multilib build) | 222 | # Move Python files into correct library folder (for multilib build) |
223 | if [ "$libdir" != "/usr/lib" -a -d ${D}/usr/lib ]; then | 223 | if [ "$libdir" != "/usr/lib" -a -d ${D}/usr/lib ]; then |
224 | mv ${D}/usr/lib/* ${D}/${libdir}/ | 224 | mv ${D}/usr/lib/* ${D}/${libdir}/ |