graphics/opencv- pkg trying to install nonexistent files, due to PY_FLAVOR, results in port not being installed

From: parv/FreeBSD <parv.0zero9+freebsd_at_gmail.com>
Date: Thu, 04 Aug 2022 07:31:04 UTC
Hi there,

I was building "graphics/opencv" with ...

- ports tree as of 20220803) on FreeBSD 13 (as of 20220729);
- root shell was zsh once, other time was /bin/sh;
- in /etc/make.conf, I have "DEFAULT_VERSIONS+= python=3.10
  python3=3.10 ; USE_PYTHON= concurrent"

... instead of installing package as I needed it be lighter than
default; certainly do not need any heavy database clients.

The installation fails when pkg-static tries to install nonexistent
files related to *cascades*. For example below path without "py310-"
exists (in "Installing:" message) but not the one with it (in
"pkg-static:" message) ...

   (grep output has been formatted to show path distinction)
   /usr/local/bin/grep -iE --color /haarcascade_eye.xml log.build
log.install
   log.install:-- Installing:

/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_eye.xml
   log.install:pkg-static: Unable to access file

/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_eye.xml:No
such file or directory

How do I solve the issue of presence of PY_FLAVOR in path of a file
being installed that does not exist? I had this issue in other ports
too which had started only recently (I would say since pkg(8) gained
FLAVOR awareness).

Selected build+install log, "make showconfig", env(1) output,
/etc/make.conf are at the end.


- parv


# make showconfig.

===> The following configuration options are available for opencv-4.5.5_8:
     EIGEN=on: Add Eigen v3 Support, builds sfm modules
     GDAL=off: Add Geospatial Data Abstraction Library Support
     GDCM=on: Add Open source DICOM library Support
     HARDENING=off: Enables Build Hardening
     JAVA=off: Enable Java Support
     LTO=off: Enables Link Time Optimizations
     OPENCL=on: Add OpenCL Support
     PATENTED=off: Enable patented 2d feature detection USE AT OWN RISK
     PROTOBUF=on: Enable protobuf support, builds dnn modules
     PYTHON=on: Enable Python Support 3.6 or greater
     TBB=off: Add Intel Threading Building Blocks Support
     TESSERACT=on: Add Tesseract-based OCR
====> GUI (Graphical User Interface) support
     GTK3=off: GTK+ 3 GUI toolkit support
     VTK=off: Include VTK library support (build opencv_viz module)
====> Options available for the group IMAGE
     GPHOTO2=on: Add Gphoto2 Support
     JPEG=on: Add LibJpeg Support
     OPENEXR=on: Add OpenEXR Support
     PNG=on: Add LibPNG Support
     TIFF=on: Add LibTIFF Support
====> Video support
     DC1394=on: IEEE 1394 camera support
     FFMPEG=off: Link with ffmpeg
     GSTREAMER=on: Add GSTREAMER Support
     V4L=on: Enable support for Video for Linux
     VULKAN=on: Add Vulkan Support
     WEBP=on: Add Webp Support
     XINE=off: Add Xine Support
====> Options available for the single BLAS: you have to select
exactly one of them
     ATLAS=off: ATLAS blas implementation with lapacke
     OPENBLAS=on: OpenBLAS blas implementation with lapacke
     NOBLAS=off: Disable support for lapack/blas
====> Options available for the radio JPEG2K: you can only select none
or one of them
     JASPER=off: Add Jasper Support for JPEG2000
     OPENJPEG=on: Add OpenJPEG Support for JPEG2000, OpenCV preferred
===> Use 'make config' to modify these settings


# grep cascades log.{build,install}


# grep cascades log.*

log.build:[ 60% 916/1514] /usr/local/libexec/ccache/c++ -DVK_NO_PROTOTYPES
-D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/3rdparty/quirc/include
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/ts/include
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/objdetect/include
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/imgcodecs/include
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/flann/include
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/imgproc/include
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/dnn/include
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/features2d/include
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/calib3d/include
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/videoio/include
-I/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/highgui/include
-isystem /build/ports/src-ports/ports/graphics/opencv/work/.build -isystem
/usr/local/include/eigen3 -O2 -pipe -fno-omit-frame-pointer -march=nocona
-fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing
 -isystem /usr/local/include   -fsigned-char -W -Wall -Werror=return-type
-Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat
-Werror=format-security -Wmissing-declarations -Wmissing-prototypes
-Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow
-Wsign-promo -Wuninitialized -Winconsistent-missing-override
-Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment
-Wno-deprecated-enum-enum-conversion
-Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option
-Wno-long-long -pthread -Qunused-arguments -ffunction-sections
-fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden
-fvisibility-inlines-hidden -O2 -pipe -fno-omit-frame-pointer -march=nocona
-fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing
 -isystem /usr/local/include  -DNDEBUG -fPIE -std=c++11 -MD -MT
modules/objdetect/CMakeFiles/opencv_perf_objdetect.dir/perf/opencl/perf_cascades.cpp.o
-MF
modules/objdetect/CMakeFiles/opencv_perf_objdetect.dir/perf/opencl/perf_cascades.cpp.o.d
-o
modules/objdetect/CMakeFiles/opencv_perf_objdetect.dir/perf/opencl/perf_cascades.cpp.o
-c
/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/objdetect/perf/opencl/perf_cascades.cpp
log.build:In file included from
/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/objdetect/perf/opencl/perf_cascades.cpp:1:
log.build:/build/ports/src-ports/ports/graphics/opencv/work/opencv-4.5.5/modules/objdetect/perf/opencl/perf_cascades.cpp:16:27:
note: in instantiation of function template specialization
'testing::Combine<testing::internal::ValueArray3<std::string, std::string,
std::string>, testing::internal::ValueArray3<std::string, std::string,
std::string>, testing::internal::ValueArray3<int, int, int>>' requested here
log.build:[ 65% 990/1514] : && /usr/local/libexec/ccache/c++ -O2 -pipe
-fno-omit-frame-pointer -march=nocona -fstack-protector-strong -isystem
/usr/local/include -fno-strict-aliasing  -isystem /usr/local/include
-fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor
-Werror=address -Werror=sequence-point -Wformat -Werror=format-security
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef
-Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized
-Winconsistent-missing-override -Wno-delete-non-virtual-dtor
-Wno-unnamed-type-template-args -Wno-comment
-Wno-deprecated-enum-enum-conversion
-Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option
-Wno-long-long -pthread -Qunused-arguments -ffunction-sections
-fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden
-fvisibility-inlines-hidden -O2 -pipe -fno-omit-frame-pointer -march=nocona
-fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing
 -isystem /usr/local/include  -DNDEBUG -L/usr/local/lib
-fstack-protector-strong -L/usr/local/lib  -Wl,--gc-sections
-Wl,--as-needed
modules/objdetect/CMakeFiles/opencv_perf_objdetect.dir/perf/opencl/perf_cascades.cpp.o
modules/objdetect/CMakeFiles/opencv_perf_objdetect.dir/perf/opencl/perf_hogdetect.cpp.o
modules/objdetect/CMakeFiles/opencv_perf_objdetect.dir/perf/perf_main.cpp.o
modules/objdetect/CMakeFiles/opencv_perf_objdetect.dir/perf/perf_qrcode_pipeline.cpp.o
-o bin/opencv_perf_objdetect
 -Wl,-rpath,/build/ports/src-ports/ports/graphics/opencv/work/.build/lib
 lib/libopencv_ts.a  lib/libopencv_objdetect.so.4.5.5
 lib/libopencv_highgui.so.4.5.5  lib/libopencv_dnn.so.4.5.5
 lib/libopencv_calib3d.so.4.5.5  -lm  -lpthread
 lib/libopencv_videoio.so.4.5.5  lib/libopencv_imgcodecs.so.4.5.5  -lm
 -lpthread  lib/libopencv_features2d.so.4.5.5  lib/libopencv_flann.so.4.5.5
 lib/libopencv_imgproc.so.4.5.5  lib/libopencv_core.so.4.5.5 && :
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_eye.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_eye_tree_eyeglasses.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_frontalcatface.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_frontalcatface_extended.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_frontalface_alt.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_frontalface_alt2.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_frontalface_alt_tree.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_frontalface_default.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_fullbody.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_lefteye_2splits.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_licence_plate_rus_16stages.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_lowerbody.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_profileface.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_righteye_2splits.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_russian_plate_number.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_smile.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/haarcascades/haarcascade_upperbody.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/lbpcascades/lbpcascade_frontalcatface.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/lbpcascades/lbpcascade_frontalface.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/lbpcascades/lbpcascade_frontalface_improved.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/lbpcascades/lbpcascade_profileface.xml
log.install:-- Installing:
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/opencv4/lbpcascades/lbpcascade_silverware.xml
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_eye.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_eye_tree_eyeglasses.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_frontalcatface.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_frontalcatface_extended.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_frontalface_alt.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_frontalface_alt2.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_frontalface_alt_tree.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_frontalface_default.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_fullbody.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_lefteye_2splits.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_licence_plate_rus_16stages.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_lowerbody.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_profileface.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_righteye_2splits.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_russian_plate_number.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_smile.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/haarcascades/haarcascade_upperbody.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/lbpcascades/lbpcascade_frontalcatface.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/lbpcascades/lbpcascade_frontalface.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/lbpcascades/lbpcascade_frontalface_improved.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/lbpcascades/lbpcascade_profileface.xml:No
such file or directory
log.install:pkg-static: Unable to access file
/build/ports/src-ports/ports/graphics/opencv/work/stage/usr/local/share/py310-opencv/lbpcascades/lbpcascade_silverware.xml:No
such file or directory


# grep -v '^#' /etc/make.conf.

SRC_BASE=   /src-ports/freesd

PACKAGES=  /src-ports/pkg-save
PORTSDIR=  /src-ports/ports
WRKDIRPREFIX=  /build/ports

WITH_CCACHE_BUILD=  yes

CPUTYPE?=   nocona
WITH_CTF=1
CFLAGS+=-fno-omit-frame-pointer

ONLY_FOR_ARCHS= amd64

BATCH=  yes

DEFAULT_VERSIONS+= ssl=openssl
DEFAULT_VERSIONS+= python=3.10 python3=3.10
USE_PYTHON= concurrent


OPTIONS_UNSET+=HAL
OPTIONS_UNSET+= WAYLAND VIDEO_WAYLAND PLATFORM_WAYLAND
x11-toolkits_gtk30_UNSET+=WAYLAND
OPTIONS_UNSET+= WX

OPTIONS_UNSET+= DEBUG TEST DOCS EXAMPLES DOXYGEN INFO
OPTIONS_UNSET+= READLINE
OPTIONS_UNSET+= GNUTLS
OPTIONS_UNSET+= OPENCL
OPTIONS_UNSET+= LTO

OPTIONS_SET+= OPTIMIZED_CFLAGS ASM SIMD AVX CPU_OPTS
OPTIONS_SET+= OPENMP
OPTIONS_SET+= MANPAGES MAN3 MAN1 MAN8
OPTIONS_SET+= NLS ICU ICONV L10N FRIBIDI
OPTIONS_SET+= BROTLI ZSTD ZLIB LZ4
OPTIONS_SET+= LIBEDIT PCRE2
OPTIONS_SET+= KERBEROS
OPTIONS_SET+= SSL OPENSSL SSH LIBSSH2 SASL
OPTIONS_SET+= SIGNATURE
OPTIONS_SET+= IDN IPV6 SOCKS SMB FETCH CURL LDAP LDAPS
OPTIONS_SET+= OPENJPEG JPEG2000 GIF PNG WEBP TIFF XPM
OPTIONS_SET+= SDL SVGALIB V4L TESSERACT RTMP
OPTIONS_SET+= SNDIO OPUS JACK TWOLAME OGG VORBIS FLAC MPG123
OPTIONS_SET+= X11 VIDEO_X11 PLATFORM_X11

.if ${.CURDIR:M/*/*/www/firefox*}
   OPTIONS_SET+= DBUS
.endif

.if ${.CURDIR:M/*/*/lang/rust*}
   OPTIONS_UNSET+= DOCS EXAMPLES MANPAGES GDB SOURCES
   OPTIONS_SET+= WASM
.endif

.if ${.CURDIR:M/*/*/*/qt*} || ${.CURDIR:M/*/*/*/*docbook*}
   OPTIONS_UNSET+= DOCS MANPAGES HELP EXAMPLES
.endif
.if ${.CURDIR:M/*/*/lib*}
   OPTIONS_UNSET+= DOCS MANPAGES HELP EXAMPLES
.endif
.if ${.CURDIR:M/*/*/devel/tevent*} || ${.CURDIR:M/*/*/devel/talloc*} ||
${.CURDIR:M/*/*/databases/tdb*}
   OPTIONS_UNSET+= DOCS MANPAGES HELP EXAMPLES
.endif

.if ${.CURDIR:M/*/*/shell*/bash*}
   OPTIONS_UNSET+= DOCS MANPAGES HELP
   OPTIONS_UNSET+= CMAKE_MODULES SYSBASHRC SYSLOG
   OPTIONS_UNSET+= FDESCFS STATIC

   OPTIONS_SET+= SHARED
.endif

.if ${.CURDIR:M/*/*/shell*/zsh*}
   OPTIONS_SET+= STATIC
   OPTIONS_SET+= DOCS MANPAGES HELP EXAMPLES
.endif

.if ${.CURDIR:M/*/*/www/mongoose}
   OPTIONS_SET+= DOCS EXAMPLES
.endif

.if ${.CURDIR:M/*/*/lang/perl5*} || ${.CURDIR:M/*/*/p5-*}
   # Cannot use DEBUG as XS modules cause panic "failed to extend arg
stack".
   #OPTIONS_UNSET+= DEBUG
   OPTIONS_UNSET+= PERL_64BITINT DOT_INC

   OPTIONS_SET+= DEBUG
   OPTIONS_SET+= PERL_MALLOC
   OPTIONS_SET+= DTRACE MULTIPLICITY SITECUSTOMIZE THREADS
.endif

.if ${.CURDIR:M/*/*/*/python3*} || ${.CURDIR:M/*/*/*/py*}
   OPTIONS_UNSET+= DEBUG LIBMPDEC PYMALLOC

   OPTIONS_SET+= SIGNATURE
   OPTIONS_SET+= SIPHASH
.endif

.if ${.CURDIR:M/*/*/*/python3*} || ${.CURDIR:M/*/*/*/py*} ||
${.CURDIR:M/*/*/lang/perl5*} || ${.CURDIR:M/*/*/p5-*}
   OPTIONS_SET+= DOCS MANPAGES HELP EXAMPLES
.endif


.if ${.CURDIR:M/*/*/editors/vim*}
   LDFLAGS+= -static
   FLAVOR=  console
   OPTIONS_SET+= DOCS EXAMPLES MANPAGES
.endif

.if ${.CURDIR:M/*/*/lang/lua*}
   # Some Lua ports mark LIBEDIT to be broken, promote LIBEDIT_DL instead.
   OPTIONS_UNSET+= LIBEDIT
   OPTIONS_SET+= LIBEDIT_DL
   OPTIONS_SET+= DOCS MANPAGES HELP EXAMPLES
.endif

.if ${.CURDIR:M/*/*/*/sqlite*}
   OPTIONS_UNSET+= UNKNOWN_SQL

   OPTIONS_SET+= DOCS MANPAGES HELP EXAMPLES
   OPTIONS_SET+= ARMOR LIKENOTBLOB NORMALIZE STMT JSON1
.endif

.if ${.CURDIR:M/*/*/devel/apr*}
   OPTIONS_SET+= SQLITE
.endif

.if ${.CURDIR:M/*/*/devel/git*}
   OPTIONS_UNSET+= CVS SVN P4

   OPTIONS_SET+= DOCS MANPAGES HELP EXAMPLES
   OPTIONS_SET+= CONTRIB CURL GUI HTMLDOCS GITWEB GUI PERL SEND_EMAIL
SUBTREE
.endif

.if ${.CURDIR:M/*/*/devel/subversion*}
   OPTIONS_UNSET+= GPG_AGENT STATIC FREEBSD_TEMPLATE SVNSERVE_WRAPPER
   OPTIONS_SET+= BDB DOCS NLS SASL SERF TOOLS
.endif

.if ${.CURDIR:M/*/*/math/gmp*}
   OPTIONS_SET+= CPU_OPTS
.endif

.if ${.CURDIR:M/*/*/security/*gpg*} || ${.CURDIR:M/*/*/security/*gnupg*}
   OPTIONS_UNSET+= LDAP LDAPS
.endif

.if ${.CURDIR:M/*/*/ftp/curl*}
   OPTIONS_UNSET+= GPG_AGENT FREEBSD_TEMPLATE
   OPTIONS_SET+= DOCS EXAMPLES MANPAGES
   OPTIONS_SET+= SASL SERF
   OPTIONS_SET+= FREEBSD_TEMPLATE
.endif


# root's "env".

VENDOR=amd
LESS=-sSIXR
LSCOLORS=xxGAxxxxxxxxxxxxxx
LOGNAME=root
PAGER=less
LANG=C.UTF-8
OSTYPE=FreeBSD
MACHTYPE=x86_64
MAIL=/var/mail/root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
EDITOR=vi
HOST=gaia
OLDPWD=/root
CCACHE_DIR=/src-build/ccache
PWD=/src-ports/ports/graphics/opencv
GROUP=wheel
TERM=xterm
USER=root
HOME=/root
HOSTTYPE=FreeBSD
SHELL=/bin/csh
MM_CHARSET=UTF-8
BLOCKSIZE=K
SHLVL=1