# opencv/cfg - "Build" settings for package

#---------------------------------------------------------------------

[technotes]

1. If Internet and DNS are enabled,  the "opencv" build procedure will
try to download things to use.  For  the sake of consistent builds, it
might  be best to turn off DNS  temporarily during  the "opencv" build
process.

#---------------------------------------------------------------------

2. We don't recommend over-reliance on "opencv".  The  package's build
procedure is  potentially fragile  and  could stop  working as of some
future release.

#---------------------------------------------------------------------

[buildtimes]

00.37 hours (or 021.97 minutes) - 2023 dedi Xeon E3-1200 v3  4x2  32GB
                                  RAM
00.51 hours (or 030.80 minutes) - ThinkPad W530 i7 4x2 32GB RAM
01.28 hours (or 076.53 minutes) - ThinkPad W530 i7 4x2 32GB RAM  using
                                  a 64-bit kernel and 32-bit distro

#---------------------------------------------------------------------

[settings]
license  = See "license*.txt" in installed tree
licfile  = LICENSE
tmpsize  = 667M

setpaths = \
cairo ffmpeg4 gstreamer gtkcore jpeg lapack \
libdc1394 libpng libwebp openblas opencv openjpeg tiff zlib

#---------------------------------------------------------------------

[depends]
brotli
bzip2
cairo
cmake
dav1d
eigen3
expat
ffmpeg4
fontconfig
freetype2
fribidi
gnutls3
graphite2
gstreamer
gtkcore
java
jpeg
lame
lapack
libaom
libbluray
libbsd
libcroco
libdc1394
libffi
libgcrypt
libgmp
libgpg-error
libgsm
libicu
libidn2
libogg
liborc
libpng
libraw1394
librtmp
libsoxr
libssh
libunistring
libusb
libva
libvorbis
libwebp
libxml2
ncurses
nettle3
numactl
numpy
openblas
openjpeg
openssl
opus
p11kit
python2-core:strict
python3-core:strict
python:strict
speex
theora
tiff
twolame
util-linux
x264
x265
xorg
xvidcore
xzutils
zlib
zstd

#---------------------------------------------------------------------

[configure]
treetextsub --keeptimes --pattern="https:" --newtext="moo++:"
treetextsub --keeptimes --pattern="http:"  --newtext="moo+:"

mkdir obj && cd obj
cmake \
    -DCMAKE_BUILD_TYPE=RELEASE           \
    -DCMAKE_INSTALL_PREFIX=$PKGDIR_PROD  \
    ..

#---------------------------------------------------------------------

[build]
cd obj
smpmake
make install || make install

#---------------------------------------------------------------------

[postbuild]
cd $PKGDIR_PROD
treetextsub --keeptimes --pattern="moo++:" --newtext="https:"
treetextsub --keeptimes --pattern="moo+:"  --newtext="http:"

cd $PKGDIR_PROD
if [ \! -d lib ]; then
    ls      lib64
    ln -nsf lib64 lib
fi
cd $PKGDIR_PROD/lib

#---------------------------------------------------------------------

# Original URLs. These URLs were valid at one point, but may have died
# since then. If you download newer versions of tarballs [etc.], don't
# delete  the  original versions,  as you may not  be able  to replace
# them.

[urls]
url_debian  = tbd
url_home    = tbd
url_lfs     = tbd

url_tarball = https://github.com/opencv/opencv/archive/\
4.10.0/opencv-4.10.0.tar.gz

#---------------------------------------------------------------------

[history]
220723 Added package. Started with b0dc47416 ("git" hash).
230108 Updated to 725e440d2 - same as 4.7.0
240806 Updated to 4.10.0