Warning: there may be occasional oddness due to css and blog edits. **KNOWN ISSUE: possible hidden text**

Friday, August 9, 2024

make.conf in control

I have mentioned previously that I have a rather extensive /etc/make.conf file.  This very copiously commented file is below.  In the past I defined many of the defaults listed but now accept many of those as defined by /usr/ports/Mk/bsd.default-versions.mk because some of the most current versions are set as default.  Some other ports which may have ambiguous versions I choose to be specific or if the default is not as new as I wish, I set it.  It is a very good idea to include comments where ever possible in any configuration file because you may want to note a documentation source as the reason or to recall why something was done.

Using this extensive make.conf it should default to any options defined within, if the config is removed (make rmconfig).  Some things specifically set options, some options are defined in order to help avoid conflicts, especially when radio buttons are used.  Many documentation excerpts from /usr/ports/Mk files.  The bulk set/unset keywords assume that those keywords are consistent across disparite ports but where this is not true or other keywords are needed, those are options defined.  it would be a very good idea to periodically revisit this file to see what needs adjusting.  Check with each release and when noted in /usr/ports/updating when things change, especially defaults in /usr/ports/Mk/bsd.default-versions.mk to be sure the desired result is achieved.

### make.conf
#################################################################################################################################################
# There are a number of things you can do to reduce the size and number of files in /boot/kernel.
#
# Possibly the best space saving is to be had by setting WITHOUT_KERNEL_SYMBOLS in /etc/src.conf
# (if this file doesn't already exist, just create it), and the next time you installkernel, the
# debug symbol files won't be installed. It's safe to delete them now, if you need the space
# immediately (rm /boot/kernel/*.symbols)
#
# There are a few make.conf settings that control what modules are built:
#
#    NO_MODULES - disable building of modules completely
#    MODULES_OVERRIDE - specify the modules you want to build
#    WITHOUT_MODULES - list of modules that should not be built
#
# The NO_MODULES option is probably a bit too heavy-handed, so a judicious combination of the
# other two is a better choice. If you know exactly which modules you want, you can simply set
# them in MODULES_OVERRIDE. Note that WITHOUT_MODULES is evaluated after MODULES_OVERRIDE, so
# any module named in both lists will not be built.
#
# If you really want to suppress building of all modules, you can use NO_MODULES, and ensure
# that all required drivers and modules are statically compiled into the kernel. Each driver's
# manpage shows the appropriate lines to add to your kernel config file, so you should be able
# to figure out what you need.
#################################################################################################################################################
#_______________________________________________________________________________
#										|
# This toggle for developer helps to discover issues with ports building. It is |
# not used by poudriere, which would need testport or other options.		|
#_______________________________________________________________________________|

DEVELOPER=yes

DISABLE_VULNERABILITIES=yes
TRYBROKEN=true

#_______________________________________________________________
#								|
# USE_PACKAGE_DEPENDS=yes					|
#								|
# Try to install dependencies from existing packages instead	|
#  of building the port from scratch. Fallback on source	|
#  if an existing package is not present.			|
#								|
# USE_PACKAGE_DEPENDS_ONLY=yes					|
#								|
# Like USE_PACKAGE_DEPENDS, but do not fallback on source.	|
#_______________________________________________________________|

USE_PACKAGE_DEPENDS=yes

#_______________________________________________________
#							#
# Use ccache for builds					#
#_______________________________________________________#

WITH_CCACHE_BUILD=yes

.if ${.CURDIR:M^/usr/src/}
CCACHE_DIR=/var/cache/base/ccache
.else
CCACHE_DIR=/var/cache/ccache
.endif

#_______________________________________________________________________________
#										#
#  This is set in /usr/ports/Mk/Uses/jpeg.mk					#
#	JPEG_PORT=graphics/jpeg-turbo						#
#_______________________________________________________________________________#

#_______________________________________________________
#							#
#WITH_DEBUG_PORTS+=editors/openoffice-devel		#
#WITH_DEBUG_PORTS+=editors/openoffice-4			#
#_______________________________________________________#

#################################################################################################################################################

#  _____________________________________________________________
# /								\
# | Universal DEFAULT versions					|
# |								|
# | values defined in /usr/ports/Mk/bsd.default-versions.mk	|
# \_____________________________________________________________/


#_______________________________________________________
#							#
# No reason to set this as prefer llvm etc.		#
# DEFAULT_VERSIONS+=gcc=12				#
#_______________________________________________________#


#_______________________________________________________
#							#
# Ghostscript						#
# Possible values: 10					#
# DEFAULT_VERSIONS+=GHOSTSCRIPT=10			#
#_______________________________________________________#


#_______________________________________________________
#							#
# Possible values: mesa-libs, mesa-devel		#
# GL_DEFAULT?=            mesa-libs			#
# DEFAULT_VERSIONS+=gl=mesa-libs			#
#_______________________________________________________#


#_______________________________________________________
#							#
# Imagemagick						#
# Possible versions: 6, 7				#
# Possible flavors:  x11, nox11				#
#                    (defaults to x11 if not specified) #
# Format:            version[-flavor]			#
# Examples:          6-nox11, 7				#
#							#
# DEFAULT_VERSIONS+=IMAGEMAGICK=7			#
#_______________________________________________________#


#_______________________________________________________
#							#
# Java							#
# Possible values: 8, 11, 17, 18, 19, 20, 21		#
#_______________________________________________________#
DEFAULT_VERSIONS+=JAVA=21


#_______________________________________________________
#							#
# centos or rocky linux	both downstream rhel		#
# centos is deprecated but has 32bit?			#
# rocky is newer but 64bit only?			#
# Possible values: c7 rl9				#
#_______________________________________________________#
DEFAULT_VERSIONS+=LINUX=rl9


#_______________________________________________________
#							#
# llvm							#
# Possible values: 					#
#  11, 12, 13, 14, 15, 16, 17, -devel			#
# (to be used when non-base compiler is required)	#
# 							#
#_______________________________________________________#
DEFAULT_VERSIONS+=LLVM=17


#_______________________________________________________
#							#
# Lua							#
# Possible values: 5.1, 5.2, 5.3, 5.4			#
#							#
# DEFAULT_VERSIONS+=LUA=5.4				#
#_______________________________________________________#


#_______________________________________________________
#                                                       #
# Luajit                                                #
# Possible values:                                      #
#        luajit, luajit-devel, luajit-openresty         #
#                                                       #
# Auto sets to luajit-devel if not powerpc64*		#
#                                                       #
# DEFAULT_VERSIONS+=LUAJIT=luajit-openresty		#
#_______________________________________________________#


#_______________________________________________________
# Possible values: 3.8, 3.9, 3.10, 3.11			#
#							#
# PYTHON_DEFAULT?=        3.11				#
#							#
# Possible values: 2.7					#
# PYTHON2_DEFAULT?=       2.7				#
#							#
# DEFAULT_VERSIONS+=python=3.11				#
#_______________________________________________________#


#_______________________________________________________
#							#
# Ruby							#
# Possible values: 2.7, 3.0, 3.1, 3.2			#
#							#
# DEFAULT_VERSIONS+=RUBY=3.2				#
#_______________________________________________________#


#_______________________________________________________
#							#
# Rust 							#
# While it may make some sense to have -nightly the 	#
# default, it is build fail prone or too new.		#
# Possible values: rust, rust-nightly			#
#_______________________________________________________#
DEFAULT_VERSIONS+=RUST=rust


#_______________________________________________________________________________
#										#
# Would prefer libressl for all things but it tends to be incompatible with any	#
# random thing periodically which breaks MANY ports.				#
# libressl-devel is often too new for rust-nightly etc				#
#										#
# FYI:	security/cryptopp is just as important for many ports.			#
#	py-cryptography								#
#										#
# When updating this, please also update the same list in ssl.mk and the checks	#
# for USES=ssl in qa.sh!							#
# Possible values: base, openssl, openssl111, openssl31, openssl32, openssl33,	#
#				   libressl, libressl-devel			#
#.  if !defined(SSL_DEFAULT)							#
#       If no preference was set, check for an installed base version		#
#       but give an installed port preference over it.				#
# SSL										#
# Possible values: base, openssl, libressl, libressl-devel			#
#										#
# DEFAULT_VERSIONS+=SSL=openssl							#
#										#
# Do I have ssl in base built or denied?					#
#_______________________________________________________________________________#
DEFAULT_VERSIONS+=SSL=openssl


#_______________________________________________________
#							#
# tcl/tk						#
# Possible values: 8.5, 8.6, 8.7			#
#							#
# DEFAULT_VERSIONS+=TCLTK=8.6				#
#_______________________________________________________#
DEFAULT_VERSIONS+=TCLTK=8.7


#################################################################################################################################################

#_______________________________________________________
#							#
# Changes in general to config toggles			#
#_______________________________________________________#

OPTIONS_UNSET+=A4 ALSA APE APPLEDEV ARCHDEF ATK_BRIDGE ATLAS AVAHI AVX AVX2
OPTIONS_UNSET+=BASH BONMIN BOOTSTRAP
OPTIONS_UNSET+=CCL CHEESE CHINESE CHROMECAST CMUCL COLORD CPACK CPU_CLIP
OPTIONS_UNSET+=DBUS DEBUG DEVD DTRACE
OPTIONS_UNSET+=ECL EMACS_KEYS ENCODINGS ETERSOFT
OPTIONS_UNSET+=FAM FREERDP FRENCH
OPTIONS_UNSET+=GCRYPT GEOCLUE GEOIP GEOLOC GLX GNUTLS GNOMEUI GNOMEVFS GPERFTOOLS GPOD GPS GPSD GRAPHITE GRAPHVIZ
OPTIONS_UNSET+=HAL HALD
OPTIONS_UNSET+=IMOBILE INOTIFY INTEGER_SAMPLES IPOD IPOPT
OPTIONS_UNSET+=JACK JAPANESE
OPTIONS_UNSET+=KOREAN
OPTIONS_UNSET+=LAPACK LDAP LIBBLURAY LIBEXECINFO LIBJTE LIBSIGSEGV LIRC LOCALE_DE LOCALE_RU
OPTIONS_UNSET+=MAD MARS MDNS MDNSRESPONDER METRIC MHASH MTPFS MTPZ MUPDF
OPTIONS_UNSET+=NETTLE NLS NOTIFY NTSC NVIDIA NVIT NVTHREADS NVTT
OPTIONS_UNSET+=OPENBLAS OPENCV
OPTIONS_UNSET+=PAL PERL_64BITINT PGSQL PSGHOSTSCRIPT PSHYBRID PULSEAUDIO PURPOSE
OPTIONS_UNSET+=Q8BIT QPOASES QTWEBENGINE QT5AGGBACKEND
OPTIONS_UNSET+=RCC READLINE RUNROOT RUSSIAN RETEXTURE_FULL
OPTIONS_UNSET+=SAGE SAMBA SASL SCFB SMB SKYDRIVE SNDIO SOX SPEECHD SPEED STATIC
OPTIONS_UNSET+=TEST TOMCAT85 TOMCAT9 TPM
OPTIONS_UNSET+=UPNP
OPTIONS_UNSET+=V4L
OPTIONS_UNSET+=WEBENGINE WIIMOTEDEV WIKI_PUBLISHER
OPTIONS_UNSET+=XBACKLIGHT
OPTIONS_UNSET+=ZSH

#----------

OPTIONS_SET+=3DNOW 7ZIP
OPTIONS_SET+=A52 AALIB AAC ALLSTAGES ANY2DJVU AOM API APNG ARMOR ASM ASS AUDIO AUDIOCD
OPTIONS_SET+=BABEL BE_AMDGPU BEATPORT BE_NATIVE BOOST BROTLI BUNDLED_READLINE BZIP2
OPTIONS_SET+=CA_BUNDLE CACA CAIRO CBLAS CDDA2MP3 CDDA2OGG CDDB CERTS CLANG CLEARTYPE CLIENT COMPFACE COMPILER_RT COINMP CONFIG \
		CONTRIB CPU_OPTS CRAFTY CRYPTO CRYPTOPP CUPS CURL
OPTIONS_SET+=DCA DCRAW DESKTOPFILES DRILL DTS DUNSTIFY DVD DYNAMIC_ARCH DYNSIMD
OPTIONS_SET+=EDITOR EGL ELMUSIC ELSOUND ENCHANT ETCSYMLINK EXAMPLES EXIV EXPAT EXR EXTRAFONTS EXTRAS EYECANDY
OPTIONS_SET+=FAAC FAAD FAIRYMAX FETCHART FFMPEG FFTW FFTW3 FLAC FLANG FLITE FLUID FLUIDSYNTH FONTCONFIG FORTRAN FREETYPE FREI0R \
		FRIBIDI
OPTIONS_SET+=GAME GECKO GHOSTSCRIPT GIR GLASSFISH GLX GM GMP GNUCHESS GNUPG2 GOEMON GOLD GSL GSTREAMER GST_PLUGINS GUESTADDITIONS
OPTIONS_SET+=HARFBUZZ HUNSPELL HYPRE
OPTIONS_SET+=ICONV ICS_VCAL ID3TAG IJS IMAGEMAGICK IO_PTR IPV6 IRRLICHT
OPTIONS_SET+=JASPER JAVA JPEG2000 JSON
OPTIONS_SET+=KF5 KNIGHTCAP
OPTIONS_SET+=LADSPA LAME LARGE_STACK LASTFM LAUNCHER LCMS2 LHA LIBEDIT LIBEDIT_DL LIBFFI LIBPAPER LIBPLACEBO LIBPNG LIBRSVG2 LIBSSH2 \
		LIBXML LIBYAML LIT LLD LLDB LLD_LINK LOCALE_EN LUAJIT LV2 LZ4 LZO
OPTIONS_SET+=MAN MAN3 MANPAGE MANPAGES MATERIALX MFX MIDI MIKMOD MLIR MMX MNG_OPTIMIZE MODPLUG MONO MP3 MP3OGG MPG123 MPEG2 MPI \
		MT32EMU MTP MULTILIB MULTIPLICITY MUSEPACK MUSIC MYSQL
OPTIONS_SET+=NCURSES NETLIB NETTLE NONFREE NUMPY
OPTIONS_SET+=OBJC OGG OGRE ONIGURUMA OPENAL OPENAL_DLOPEN OPENCL OPENGL OPENH264 OPENJADE OPENMP OPENMPI OPTIMIZE OPTIMIZED_CFLAGS \
		OPUS OSS
OPTIONS_SET+=PANGO PANGOCAIRO PARALLEL_MARK PERL_MALLOC PETSC PHALANX PHYSFS PNG POPPLER PSPOPPLER PTHREADS PYCLANG PYGMENTS PYMALLOC \
		PYSTEMMER
#OPTIONS_SET+=QT5AGGBACKEND
OPTIONS_SET+=RAR RDOFF REALRTSP RELEASE RELRO REMIX1 REMIX2 REMIX3 REMIX4 REPLAYGAIN RETEXTURE RHASH RTCPU RUNTIME
OPTIONS_SET+=SAMPLERATE SBCL SCHROEDINGER SDL SDL1 SDL2 SDLCLIENT SDLGL SDL_AUDIO SDL_VIDEO SESSION_MGMT SHARED SHOUTCAST SIMD \
		SIPHASH SKINS SLP SLURM SMPEG SNAPPY SOLUTIONS SOUND SOUNDTOUCH SPEEX SQLITE SSE SSE2 SSH STARTUP SUITESPARSE SVG \
		SYSTEM_ZLIB
OPTIONS_SET+=TAGLIB TAGSOUP TCL THEMES THEORA THREADS TIDYHTML5 TIMIDITYPLUS TKINTER TOC2MP3 TWOLAME TZDATA TZUPDATE
OPTIONS_SET+=UDEV
OPTIONS_SET+=VAAPI VALA VDPAU VIDEOREC VIEWER VKD3D VLC VOICE VORBIS VPX VULKAN
OPTIONS_SET+=WATCHDOG WAVPACK WAYLAND WINEMAKER WXGTK
OPTIONS_SET+=X11 X264 X265 XCB XGLK XINERAMA
OPTIONS_SET+=YAML
OPTIONS_SET+=ZIP ZIPPY ZLIB ZSTD ZVBI
# ---------------------------------------------<  End user additions and modifications >--------------------------------------------- #


#_______________________________________________________________________________________________________
#													#
#  * Openblas, Netlib (cblas), and Atlas are all options for math routines.				#
#  * cblas seems to be ovewhelmingly used with games, and by py-numpy.					#
#    therefore set to prefer cblas and netlib								#
#													#
#  * qt-location is problematic and depended upon by qt-webengine					#
#													#
#  * egl purported better and more supported than glx							#
# libedit is BSD and lighter while readline is gpl/gnu -- better to use bundled readline than as port	#
#													#
#  * rhash is MIT, gcrypt is gnu/gpl, mhash is lgpl							#
#													#
#  * MTPFS and MTPZ are related to accessing mobile devices such as their internal storage.		#
#													#
#  * NOTIFY option causes dbus to be installed								#
#_______________________________________________________________________________________________________#


#_______________________________________________________________________________
#										#
#  processor instructions support						#
#										#
#   older AMD processors do not have AVX or AVX2				#
#   https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#CPUs_with_AVX2	#
#   AMD does have SSE2								#
#   newer AMD processors do not have 3dNow					#
#_______________________________________________________________________________#


#############################################        #######   #######   #######   ######   ######
####                                     ####      #######   #######   #######   ######   ######
####  an UNSET always overrides a SET    ####    #######   #######   ######    ######   ######
####                                     ####      #######   #######   #######   ######   ######
#############################################        #######   #######   #######   ######   ######

####################################################################
####								####
####	OPTIONS_UNSET_FORCE overrides user interactive set	####
####								####
####################################################################

#_______________________________________________________________________
#									#
# Flavored ports -- this works as expected				#
#_______________________________________________________________________#

.if ${.CURDIR:M*/ports/security/libressl-devel}
  #FLAVOR=libtls
  FLAVOR=default
.endif

.if ${.CURDIR:M*/ports/devel/git}
#  FLAVOR=tiny
.endif

.if ${.CURDIR:M*/ports/x11-toolkits/wx}
  FLAVOR=gtk3
.endif

.if ${.CURDIR:M*/ports/devel/bullet}
  FLAVOR=
.endif

#_______________________________________________________________________
#									#
# Flavored ports end							#
#_______________________________________________________________________#


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Static needed for use with poudriere --		#
# revisit the memcached option when not experimental	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/ccache}
  NO_CCACHE=yes
  WITH_CCACHE_BUILD=no
.endif
.if ${.CURDIR:M*/ports/devel/ccache}
  OPTIONS_UNSET=DOCS
  OPTIONS_SET=CLANGLINK STATIC LLVMLINK
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# OpenSSL has many options, some unsafe			#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

.if ${.CURDIR:M*/ports/security/openssl}
OPTIONS_SET+=ASYNC
OPTIONS_SET+=CT
OPTIONS_SET+=KTLS
OPTIONS_SET+=MAN3
OPTIONS_SET+=RFC3779
OPTIONS_SET+=SHARED
OPTIONS_SET+=ZLIB

OPTIONS_SET+=ARIA
OPTIONS_SET+=DES
OPTIONS_SET+=GOST
OPTIONS_SET+=IDEA
OPTIONS_UNSET+=SM4
OPTIONS_UNSET+=RC2
OPTIONS_UNSET+=RC4
OPTIONS_UNSET+=RC5
OPTIONS_UNSET+=WEAK-SSL-CIPHERS

OPTIONS_UNSET+=MD2
OPTIONS_UNSET+=MD4
OPTIONS_SET+=MDC2
OPTIONS_SET+=RMD160
OPTIONS_SET+=SM2
OPTIONS_SET+=SM3

OPTIONS_SET+=ASM
OPTIONS_SET+=SSE2
OPTIONS_SET+=THREADS
OPTIONS_SET+=EC

OPTIONS_SET+=NEXTPROTONEG
OPTIONS_SET+=SCTP
OPTIONS_UNSET+=SSL3
OPTIONS_SET+=TLS1
OPTIONS_SET+=TLS1_1
OPTIONS_SET+=TLS1_2
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# py-sphinx adjustments dunno why now			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/textproc/py-sphinx}
RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-devhelp>=0:textproc/py-sphinxcontrib-devhelp@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-jsmath>=0:textproc/py-sphinxcontrib-jsmath@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-htmlhelp>=2.0.0:textproc/py-sphinxcontrib-htmlhelp@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-serializinghtml>=1.1.5:textproc/py-sphinxcontrib-serializinghtml@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}sphinxcontrib-qthelp>=0:textproc/py-sphinxcontrib-qthelp@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}Jinja2>=3.0:devel/py-Jinja2@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}pygments>=2.12:textproc/py-pygments@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}docutils>=0.14,1<0.20,1:textproc/py-docutils@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}snowballstemmer>=2.0:textproc/py-snowballstemmer@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}Babel>=2.9:devel/py-babel@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}alabaster>=0.7<0.8:textproc/py-alabaster@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}imagesize>=1.3:graphics/py-imagesize@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}requests>=2.5.0:www/py-requests@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}packaging>=21.0:devel/py-packaging@${PY_FLAVOR} \
                ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# force pkg to have default: DOCS			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/json-glib}
OPTIONS_SET+=DOCS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# force pkg to have default: GNUTLS			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/net/glib-networking}
OPTIONS_SET+=GNUTLS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Speed up gcc build					#
#_______________________________________________________#
.if ${.CURDIR:M*/ports/lang/gcc*}
OPTIONS_UNSET+=LTO_BOOTSTRAP
OPTIONS_UNSET_FORCE+=LTO_BOOTSTRAP
OPTIONS_UNSET_FORCE+=STANDARD_BOOTSTRAP
.endif

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# wine fails with ccache				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/emulators/wine}
WITH_CCACHE_BUILD=no
NO_CCACHE=yes
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Until ruby builds with v3.0 this fails for manpages	#
# textproc/rubygem-asciidoctor for doc creation		#
# Rust fails to build which prevents rust-svg stuff	#
#							#
# Been building my own fvwm3-dev was with SVG or not?	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/x11-wm/fvwm3}
OPTIONS_UNSET+=SVG
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# force json-glib proper config for clutter dependency	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/json-glib}
OPTIONS_SET+=GIR
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Reverse tactic, special case this for slightly older	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/pylint}
DEFAULT_VERSIONS+=python=3.8
DEFAULT_VERSIONS+=python3=3.8
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# qbittorrent settings					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/net-p2p/qbittorrent}
  OPTIONS_SET+=PYTHON
  OPTIONS_UNSET+=DBUS DEBUG
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# zziplib has trouble with sdl?				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/zziplib}
  OPTIONS_UNSET+=SDL
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# libmad radio fix					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/audio/libmad}
  OPTIONS_UNSET+=SPEED
  OPTIONS_SET+=ACCURACY
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# soundtouch - openmp incompatible at present		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/audio/soundtouch}
  OPTIONS_UNSET+=OPENMP
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# slurm-wlm - trouble with HDF5				#
# fails if hdf5 is enabled and was built with CXX 	#
# circular dependency if hdf5 uses PARALLEL instead	#
# all other options build fine so are set.		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/sysutils/slurm-wlm}
  OPTIONS_SET+=CURL DOCS GUI HWLOC IPMI MYSQL RRD
  OPTIONS_UNSET+=HDF5
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# hdf5 circular dependency caused by PARALLEL option	#
# radio button so should define both as appropriate	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/science/hdf5}
  OPTIONS_SET+=CXX
  OPTIONS_UNSET+=PARALLEL
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# fontforge config					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/print/fontforge}
  OPTIONS_UNSET+=GTK3
  OPTIONS_SET+=READLINE FREETYPE X11
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# freetype config					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/print/freetype*}
  OPTIONS_SET+=BROTLI
  OPTIONS_UNSET+=DEBUG
  OPTIONS_SET+=DOCS
  OPTIONS_SET+=LONG_PCF_NAMES
  OPTIONS_SET+=PNG
  OPTIONS_SET+=TABLE_VALIDATION

  OPTIONS_SET+=LCD_FILTERING
  OPTIONS_UNSET+=LCD_RENDERING

  OPTIONS_SET+=TT_SIZE_METRICS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# libcaca config					#
# FTGL - Freetype font rendering in OpenGL		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/graphics/libcaca}
  OPTIONS_SET+=DOCS FTGL IMLIB2 SLANG X11
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# libplacebo config					#
# GLSLANG - since already SLANG above choose that here	#
# If determined better otherwise, change both and all	#
# same for ffmpeg					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/graphics/libplacebo}
  OPTIONS_SET+=GLSLANG
  OPTIONS_UNSET+=SHADERC
.endif

.if ${.CURDIR:M*/ports/multimedia/ffmpeg}
  OPTIONS_SET+=GLSLANG
  OPTIONS_UNSET+=SHADERC
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# mysql SASL for client not needed - connections local	#
# also has had issues with cyrus-sasl2			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/databases/mysql57-client}
  OPTIONS_UNSET+=SASLCLIENT
.endif

.if ${.CURDIR:M*/ports/databases/mysql80-client}
  OPTIONS_UNSET+=SASLCLIENT
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# sqlite better config -- luanti (minetest) uses this	#
# Many options formalized here				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/databases/sqlite3}
  OPTIONS_SET+=ARMOR DBPAGE DBSTAT DIRECT_READ DQS EXTENSION FTS3_TOKEN  FTS4 FTS5 MEMMAN METADATA SECURE_DELETE \
		STRIP TCL THREADS UNLOCK_NOTIFY URI
  OPTIONS_UNSET+=EXAMPLES LIKENOTBLOB NORMALIZE NULL_TRIM RBU SORT_REF STATIC STMT TRUSTED_SCHEMA UNKNOWN_SQL \
		UPDATE_LIMIT URI_AUTHORITY
#----
  OPTIONS_SET+=JSON1
  OPTIONS_UNSET+=SESSION
#----
  #OPTIONS_SET+=# none set
  OPTIONS_UNSET+=OFFSET SER1 SOUNDEX
#----
  OPTIONS_SET+=RTREE
  OPTIONS_UNSET+=GEOPOLY RTREE_INT
#----
  OPTIONS_SET+=UNICODE61
  OPTIONS_UNSET+=ICU
#----
  OPTIONS_SET+=TS2
  OPTIONS_UNSET+=TS0 TS1 TS3
#----
  #OPTIONS_SET+=# none set
  OPTIONS_UNSET+=STAT3 STAT4
#----
  OPTIONS_SET+=LIBEDIT
  OPTIONS_UNSET+=READLINE
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# cockatrice -- mysql fails to build server needs too	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/games/cockatrice}
  OPTIONS_UNSET+=MYSQL SERVEATRICE
.endif



#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# net-snmp config					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/net-mgmt/net-snmp}
  OPTIONS_SET+=MFD_REWRITES TKMIB
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# ode adjustments					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/ode}
  OPTIONS_UNSET+=GIMPACT OU
  OPTIONS_SET+=DOUBLE
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# exult radio conflict fix				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/games/exult}
  OPTIONS_UNSET+=SDL1
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# heretic radio conflict fix				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/games/heretic}
  OPTIONS_UNSET+=X11 SDL
  OPTIONS_SET+=FASTX11
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# uhexen2 radio conflict fix				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/games/uhexen2}
  OPTIONS_UNSET+=MAD
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# instead radio conflict fix				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/games/instead}
  OPTIONS_UNSET+=SDL
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# espeak radio conflict fix				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/audio/espeak}
  OPTIONS_UNSET+=PORTAUDIO PULSEAUDIO
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# love luajit conflict 					#
# was partly solved or was I checking it was solved?	#
#_______________________________________________________#

#.if ${.CURDIR:M*/ports/devel/love}
#  OPTIONS_UNSET+=LUAJIT
#.endif
.if ${.CURDIR:M*/ports/devel/love10}
  OPTIONS_UNSET+=LUAJIT
.endif
#.if ${.CURDIR:M*/ports/devel/love*}
#  OPTIONS_UNSET+=LUAJIT
#.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# openoffice config					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/editors/openoffice-4}
  OPTIONS_UNSET+=MMEDIA GNOME GNOMEVFS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# casadi build option failure				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/math/casadi}
  OPTIONS_UNSET+=CLANG
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# openblas build options				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/math/openblas}
  OPTIONS_SET+=AVX AVX2 AVX512 DYNAMIC_ARCH OPENMP
  OPTIONS_UNSET+=INTERFACE64
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# suitesparse build options				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/math/suitesparse-umfpack}
  OPTIONS_UNSET+=ATLAS BLIS NETLIB
  OPTIONS_SET+=OPENBLAS
.endif

.if ${.CURDIR:M*/ports/math/suitesparse-amd}
  OPTIONS_UNSET+=ATLAS BLIS NETLIB
  OPTIONS_SET+=OPENBLAS
.endif

.if ${.CURDIR:M*/ports/math/suitesparse-config}
  OPTIONS_UNSET+=ATLAS BLIS NETLIB
  OPTIONS_SET+=OPENBLAS
.endif

.if ${.CURDIR:M*/ports/math/suitesparse-camd}
  OPTIONS_UNSET+=ATLAS BLIS NETLIB
  OPTIONS_SET+=OPENBLAS
.endif

.if ${.CURDIR:M*/ports/math/suitesparse-colamd}
  OPTIONS_UNSET+=ATLAS BLIS NETLIB
  OPTIONS_SET+=OPENBLAS
.endif

.if ${.CURDIR:M*/ports/math/suitesparse-ccolamd}
  OPTIONS_UNSET+=ATLAS BLIS NETLIB
  OPTIONS_SET+=OPENBLAS
.endif

.if ${.CURDIR:M*/ports/math/suitesparse-cholmod}
  OPTIONS_UNSET+=ATLAS BLIS NETLIB
  OPTIONS_SET+=OPENBLAS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# xorg-drivers configuration -- if scfb ticked		#
# this causes scfb dependency and scfb being		#
# available to load which prevents my AMD graphics 	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/x11-drivers/xorg-drivers}
  OPTIONS_SET+=AMDGPU ATI KEYBOARD LIBINPUT MOUSE
  OPTIONS_UNSET+=NV SCFB VESA
  OPTIONS_UNSET_FORCE+=NV SCFB VESA
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# If options MANPAGE set requires DOCS too		#
# CPACK is experimental option right now.		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/cmake}
  OPTIONS_UNSET=CPACK
  OPTIONS_SET=DOCS MANPAGES
.endif
.if ${.CURDIR:M*/ports/devel/kf5-extra-cmake-modules}
  OPTIONS_SET+=DOCS
.endif
.if ${.CURDIR:M*/ports/devel/ncurses}
  OPTIONS_SET+=DOCS PROFILE
.endif
.if ${.CURDIR:M*/ports/graphics/waffle}
  OPTIONS_SET+=DOCS
.endif
.if ${.CURDIR:M*/ports/devel/ocl-icd}
  OPTIONS_SET+=DOCS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# add some capabilities, all non-defaults, and		#
# test removing fortran option to see what breaks	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/math/coinmp}
  OPTIONS_SET+=GLPK PARALLEL
  OPTIONS_UNSET+=FORTRAN
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# gkrellm2 configuration -- needs client		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/sysutils/gkrellm2}
  OPTIONS_UNSET+=DOCS NLS NTLM OPENSSL
  OPTIONS_SET+=CLIENT
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# en-hunspell configuration				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/textproc/en-hunspell}
  OPTIONS_SET+=CA_LARGE GB_IZE US_STANDARD
  OPTIONS_UNSET+=CA_STANDARD GB_ISE GB_LARGE US_LARGE
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# hplip configuration					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/print/hplip}
  OPTIONS_SET+=SNMP X11
  OPTIONS_UNSET+=FAX SCAN XSANE
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# chromium-bsu fix radio options			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/games/chromium-bsu}
  OPTIONS_UNSET+=OPENAL
  OPTIONS_SET+=SDL_MIXER
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# gdb fix radio options					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/gdb}
  OPTIONS_UNSET+=PORT_READLINE
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# ffmpeg has a LOT of options, lets formalize them here		#
#								#
# SSH causes cascade py-cryptography dependency?		#
# V4L (video for linux) is a problem				#
#								#
# disable encoders, unused features, dupes, and kitchensink	#
#_______________________________________________________________#

.if ${.CURDIR:M*/ports/multimedia/ffmpeg}
#  OPTIONS_SET+=AMR_NB AMR_WB ASM ASS BS2B CACA CDIO CELT CODEC2 DAV1D
#  OPTIONS_SET+=DC1394 DOCS DRM FLITE FONTCONFIG FREETYPE FREIOR FRIBIDI
#  OPTIONS_SET+=GLSLANG GME GSM ICONV ILBC KVAZAAR LADSPA LAME LENSFUN
#  OPTIONS_SET+=LIBRSVG2 LIBXML2 LV2 LTO MFX MODPLUG MYSOFA OPENAL OPENGL
#  OPTIONS_SET+=OPENMPT OPTIMIZED_CFLAGS OPUS RIST RTCPU RUBBERBAND SDL
#  OPTIONS_SET+=SNAPPY SPEEX SRT TESSERACT THEORA TWOLAME VAAPI VDPAU
#  OPTIONS_SET+=VIDSTAB VMAF VORBIS VPX VULKAN WEBP X264 X265 XCB XVID
#  OPTIONS_SET+=XVIDEO ZIMG ZMQ ZVBI
  OPTIONS_UNSET+=ALSA AOM DEBUG FDK_AAC JACK LIBBLURAY LV2 LTO
  OPTIONS_UNSET+=OPENH264 OPENJPG POCKETSPHINX PULSEAUDIO RABBITMQ
  OPTIONS_UNSET+=RAV1E SMB SHADERC SNDIO SOXR SSH SVTAV1 SVTHEVC SVTVP9
  OPTIONS_UNSET+=V4L VAPOURSYNTH VO_AMRWBENC
#----
  OPTIONS_SET+=GPL NONFREE
#----
  OPTIONS_SET+=GMP
  OPTIONS_UNSET+=GCRYPT LIBRTMP
#----
  OPTIONS_UNSET+=GNUTLS MBEDTLS
  OPTIONS_SET+=OPENSSL
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# vlc adjustments to avoid dbus and other reasons 	#
# QT5 removed from global set options due to this port	#
# SKINS implies QT5 so it must be disabled too		#
# lua seems to have some sort of error			#
#_______________________________________________________#
#.if ${.CURDIR:M*/ports/multimedia/vlc}
#multimedia_vlc_UNSET= QT5 SKINS DBUS AVAHI LUA
#multimedia_vlc_UNSET= SKINS DBUS AVAHI LUA
#OPTIONS_UNSET_FORCE=  SKINS DBUS AVAHI LUA
#.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# vlc has a LOT of options, lets formalize them here		#
# mostly identical to ffmpeg -- duplicated but added more	#
#								#
# SSH causes cascade py-cryptography dependency?		#
# V4L (video for linux) is a problem				#
#								#
# disable encoders, unused features, dupes, and kitchensink	#
#								#
# MAD unset because cores, SHROEDINGER is obsoleted		#
#_______________________________________________________________#

.if ${.CURDIR:M*/ports/multimedia/vlc}
  OPTIONS_SET+=A52 AALIB AMR_NB AMR_WB ASM ASS BS2B CACA CDIO CELT CODEC2 DAV1D
  OPTIONS_SET+=DC1394 DCA DOCS DRM DVDNAV DVDREAD FAAD FLAC FLITE FLUID
  OPTIONS_SET+=FONTCONFIG FREETYPE FREIOR FRIBIDI
  OPTIONS_SET+=GLSLANG GME GSM HARFBUZZ ICONV ILBC JPEG KATE KVAZAAR LADSPA
  OPTIONS_SET+=LAME LENSFUN LIBPLACEBO LIBRSVG2 LIBXML2
  OPTIONS_SET+=LV2 LTO MAD MFX MODPLUG MUSEPACK MYSOFA NCURSES
  OPTIONS_SET+=NOTIFY OGG OPENAL OPENGL OPENMPT
  OPTIONS_SET+=OPTIMIZED_CFLAGS OPUS PNG REALRTSP RIST RTCPU RUBBERBAND SDL
  OPTIONS_SET+=SAMPLERATE SHOUTCAST SNAPPY SPEEX SRT
  OPTIONS_SET+=TAGLIB TESSERACT THEORA TWOLAME
  OPTIONS_SET+=VAAPI VCD VDPAU VIDSTAB VMAF VORBIS VPX VULKAN
  OPTIONS_SET+=WAYLAND WEBP X264 X265 XCB XVID
  OPTIONS_SET+=XVIDEO ZIMG ZMQ ZVBI
  OPTIONS_UNSET+=ALSA AOM DEBUG FDK_AAC JACK LIBBLURAY LIBSSH2 LTO MAD
  OPTIONS_UNSET+=OPENH264 OPENJPG POCKETSPHINX PULSEAUDIO QT5 RABBITMQ
  OPTIONS_UNSET+=RAV1E SDL SCHROEDINGER SKINS SMB SNDIO SOXR SSH STREAM SVTAV1
  OPTIONS_UNSET+=SVTHEVC SVTVP9 V4L VAPOURSYNTH VO_AMRWBENC
  OPTIONS_SET+=GNUTLS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# openssh-portable config -- unset insecure option	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/security/openssh-portable}
  OPTIONS_UNSET+=NONECIPHER
  OPTIONS_UNSET_FORCE+=NONECIPHER
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# sundials add blas support				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/math/sundials}
  OPTIONS_SET+=BLAS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# better maxima config					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/math/maxima}
  OPTIONS_SET+=DOCS EXAMPLES MANPAGES NOUSERINIT TEST XMAXIMA
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# bad option name -- remove samba			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/net/kdenetwork}
  OPTIONS_UNSET+=FILESHARING
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# fix qt-multimedia radio selection			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/multimedia/qt*-multimedia}
  OPTIONS_SET+=ALSA
  OPTIONS_UNSET+=PULSEAUDIO
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# fix qt-webengine radio selection			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/multimedia/qt*-multimedia}
  OPTIONS_SET+=ALSA
  OPTIONS_UNSET+=PULSEAUDIO
  OPTIONS_UNSET+=SNDIO
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# fix qtcurve radio selection				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/x11-themes/qtcurve}
  OPTIONS_SET+=GTK2 KF5
  OPTIONS_UNSET+=QT5
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# bad audio radio selections -- remove audio support	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/mail/faces}
  OPTIONS_UNSET+=AUDIO NAS RPLAY SOX
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# fix pam conflict					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/security/sudo}
  OPTIONS_UNSET+=PAM
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# add claws-mail docs					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/mail/claws-mail}
  OPTIONS_SET+=DOCS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# radio selector fix pinentry				#
# choose default -- unset other make.conf options	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/security/pinentry}
  OPTIONS_SET+=TTY
  OPTIONS_UNSET+=NCURSES FLTK GTK2 QT5 GNOME3
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# radio selector fix neon				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/www/neon}
  OPTIONS_SET+=EXPAT
  OPTIONS_UNSET+=LIBXML
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# radio selector fix claws-mail-bogofilter		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/mail/claws-mail-bogofilter}
  OPTIONS_SET+=SQLITE
  OPTIONS_UNSET+=BDB TC
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# good zbar defaults					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/graphics/zbar}
  OPTIONS_SET+=X11 V7
  OPTIONS_UNSET+=GTK2 V4L V6
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# good py-pillow defaults				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/graphics/py-pillow}
#  OPTIONS_SET+=X11 V7
  OPTIONS_UNSET+=IMAGEQUANT
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# radio selector fix lua				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/lang/lua5*}
  OPTIONS_UNSET+=LIBEDIT
.endif

.if ${.CURDIR:M*/ports/lang/lua54}
  OPTIONS_UNSET+=LIBEDIT
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# radio selector fix wildmidi				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/audio/wildmidi}
  OPTIONS_SET+=OSS
  OPTIONS_UNSET+=ALSA OPENAL
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# radio selector fix glfw				#
#_______________________________________________________#
.if ${.CURDIR:M*/ports/graphics/glfw}
  OPTIONS_SET+=WAYLAND
  OPTIONS_UNSET+=X11
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# radio selector fix vkquake				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/games/vkquake}
  OPTIONS_SET+=MIKMOD
  OPTIONS_UNSET+=MODPLUG XMP
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# rubygem -- take advantage of clang?			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/rubygem-multi_json}
  OPTIONS_SET+=JSON
  OPTIONS_UNSET+=JSON_PURE YAJL_RUBY
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# nss from mozilla purported faster and more featured than openSSL	#
# https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/FAQ	#
#_______________________________________________________________________#

.if ${.CURDIR:M*/ports/devel/apr}
  OPTIONS_SET+=NSS
  OPTIONS_UNSET+=SSL
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# gimp help might be unique				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/graphics/gimp}
  OPTIONS_SET+=HELP
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# openSSL here is uncertain -- purports speedier	#
# http://anrieff.net/ucbench/technical_qna.html		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/archivers/libarchive}
  OPTIONS_SET+=OPENSSL
  OPTIONS_UNSET+=NETTLE
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Cannot use libressl so second best is bundled.	#
# except if openssl is used then is unset		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/www/node12}
  OPTIONS_NSET+=BUNDLED_SSL
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# radio button conflicts these ports for these options	#
# mpg123 purported to be speedier if given the choice	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/audio/sdl_mixer}
  OPTIONS_SET+=MIKMOD
  OPTIONS_UNSET+=MODPLUG
.endif

.if ${.CURDIR:M*/ports/audio/sdl2_mixer}
  OPTIONS_SET+=MIKMOD MPG123
  OPTIONS_UNSET+=MODPLUG MAD
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# some odd reason doc causes issues? Weird		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/sysutils/cdrtools}
  OPTIONS_UNSET+=DOCS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Openoffice builds or pkg install; immediately cores.	#
#_______________________________________________________#

#WITH_DEBUG_PORTS+=${PKGORIGIN}

WITH_DEBUG_PORTS+=editors/openoffice-devel
WITH_DEBUG_PORTS+=editors/openoffice-4


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# samba option fails build and hal not needed		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/gnome-vfs}
  OPTIONS_UNSET+=HAL SAMBA
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# docs fails build, manpages=docs, and bash not needed	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/security/p11-kit}
  OPTIONS_UNSET+=BASH
  OPTIONS_UNSET+=DOCS
  OPTIONS_UNSET+=MANPAGES
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# I do not use kerberos so none of them are needed      #
# proper is to explicitly set GSSAPI_NONE		#
# pkgs insist ftp/curl include GSSAPI_HEIMDAL		#
#_______________________________________________________#

OPTIONS_UNSET+=KERBEROS HEIMDAL MIT HEIMDAL_BASE KERB_GSSAPI GSSAPI_BASE GSSAPI_MIT
OPTIONS_UNSET+=GSSAPI_HEIMDAL
OPTIONS_SET+=GSSAPI_NONE


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# dependents of curl need TLS_SRP for some things?	#
# that option requires openssl or gnutls		#
# choose gnutls but libssh2 option requires openssl	#
# and TPM causes dependency loop due to gnutls		#
# gnutls causes dependency on nettle which conflicts	#
# with libressl-devel-libtls and tls-srp fails so then	#
# NSS is compromise which works, solves conflicts.	#
#							#
# only supports TLS-SRP with either OpenSSL or GnuTLS 	#
#							#
# libetpan needs something this config removes		#
# which causes claws-mail to fail to build		#
#							#
# Decided to allow openssl and libssh2			#
#							#
# threaded resolver doesn't work with luanti (minetest) #
#							#
# poudriere requires static				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/ftp/curl}
  OPTIONS_SET+=ALTSVC
  OPTIONS_SET+=BROTLI
  OPTIONS_SET+=CA_BUNDLE
  OPTIONS_SET+=COOKIES
  OPTIONS_UNSET+=CURL_DEBUG
  OPTIONS_UNSET+=DEBUG
  OPTIONS_SET+=DOCS
  OPTIONS_SET+=EXAMPLES
  OPTIONS_UNSET+=IDN
  OPTIONS_SET+=IPV6
  OPTIONS_SET+=NTLM
  OPTIONS_SET+=PROXY
  OPTIONS_SET+=PSL
  OPTIONS_SET+=STATIC
  OPTIONS_UNSET+=TLS_SRP
  OPTIONS_SET+=ZSTD

  OPTIONS_SET+=DICT
  OPTIONS_SET+=FTP
  OPTIONS_SET+=GOPHER
  OPTIONS_SET+=HTTP
  OPTIONS_SET+=HTTP2
  OPTIONS_SET+=IMAP
  OPTIONS_UNSET+=LDAP
  OPTIONS_UNSET+=LDAPS
  OPTIONS_UNSET+=LIBSSH
  OPTIONS_SET+=LIBSSH2
  OPTIONS_UNSET+=MQTT
  OPTIONS_SET+=POP3
  OPTIONS_UNSET+=RTMP
  OPTIONS_SET+=RTSP
  OPTIONS_UNSET+=SMB
  OPTIONS_SET+=SMTP
  OPTIONS_SET+=TELNET
  OPTIONS_SET+=TFTP
  OPTIONS_UNSET+=WEBSOCKET

  OPTIONS_UNSET+=GSSAPI_BASE
  OPTIONS_UNSET+=GSSAPI_HEIMDAL
  OPTIONS_UNSET+=GSSAPI_MIT
  OPTIONS_SET+=GSSAPI_NONE

  OPTIONS_SET+=CARES
  OPTIONS_UNSET+=THREADED_RESOLVER

  OPTIONS_UNSET+=GNUTLS
  OPTIONS_SET+=OPENSSL
  OPTIONS_UNSET+=WOLFSSL
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# pango has a THAI requirement or firefox throws a fit	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/ftp/curl}
  OPTIONS_SET+=DOCS MANPAGES THAI X11
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# some things require gnutls built with P11KIT option	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/security/gnutls}
  OPTIONS_UNSET+=TPM
  OPTIONS_SET+=P11KIT
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# nettle via crypto? why does textproc need crypto?	#
# gnutls calls in nettle				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/textproc/libxslt}
  OPTIONS_UNSET+=CRYPTO
.endif

.if ${.CURDIR:M*/ports/devel/py-twisted}
  OPTIONS_UNSET+=TLS
.endif

.if ${.CURDIR:M*/ports/archivers/libarchive}
  OPTIONS_SET+=OPENSSL
  OPTIONS_UNSET+=MBEDTLS NETTLE
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# some things cannot handle libressl			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/net/krdc}
  OPTIONS_UNSET+=FREERDP
.endif

.if ${.CURDIR:M*/ports/net/remotebox}
  OPTIONS_UNSET+=FREERDP
.endif

.if ${.CURDIR:M*/ports/net/remina-plugins}
  OPTIONS_UNSET+=RDP
.endif

.if ${.CURDIR:M*/ports/net/guacamole-server}
  OPTIONS_UNSET+=RDP
.endif

.if ${.CURDIR:M*/ports/net/vinagre}
  OPTIONS_UNSET+=RDP
.endif

.if ${.CURDIR:M*/ports/www/node}
  OPTIONS_UNSET+=BUNDLED_SSL
.endif

.if ${.CURDIR:M*/ports/devel/qca}
  OPTIONS_SET+=OPENSSL
.endif

.if ${.CURDIR:M*/ports/dns/ldns}
  OPTIONS_UNSET+=DANETAUSAGE GOST
  OPTIONS_SET+=DRILL
.endif

.if ${.CURDIR:M*/ports/dns/unbound}
  OPTIONS_UNSET+=ECDSA GOST EVAPI
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# npm -- node package manager, keep synced with node	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/www/npm}
  OPTIONS_SET+=NODE
  OPTIONS_UNSET+=NODE10 NODE12
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Maybe limit things with ATKONLY option?		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/accessibility/at-spi2-core}
  OPTIONS_SET+=ATKONLY
  OPTIONS_SET+=X11
.endif

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# This adds samba support that I don't use		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/net/kdenetwork}
  OPTIONS_UNSET+=FILESHARING
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# gtk3 adjustments but will it still ask for dbus?	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/x11-toolkits/gtk30}
  OPTIONS_UNSET+=ATK_BRIDGE CLOUDPRINT COLORD DEBUG
  OPTIONS_SET+=BROADWAY CUPS WAYLAND X11
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# openal -  avoiding dbus means no config utility	#
# Warnings from this report "alsoft" self-identifier	#
# qt5 requires dbus so we avoid qt5 too			#
# sndio causes trouble for firefox audio		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/audio/openal-soft}
  OPTIONS_UNSET+=CONFIG EXAMPLES JACK PORTAUDIO PULSEAUDIO SNDIO UTILS
  OPTIONS_SET+=OSS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Try optimal firefox config				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/www/firefox}
  OPTIONS_UNSET+=CANBERRA DBUS DEBUG OPTIMIZED_CFLAGS PROFILE LIBPROXY TEST ALSA JACK PULSEAUDIO SNDIO
  OPTIONS_SET+=LTO FFMPEG
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# does firefox issue with libressl via libevent remain?	#
# mysql needs libevent to have openssl			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/libevent}
#  OPTIONS_UNSET+=OPENSSL
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Minetest special adjustments test			#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/games/minetest}
#  OPTIONS_SET+=CURL DOCS EXAMPLES LUAJIT SOUND CLIENT SERVER FREETYPE
#  OPTIONS_UNSET+=NCURSES NLS PGSQL LEVELDB REDIS SPATIAL
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# override defaults for llvm?				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/devel/llvm*}
  OPTIONS_UNSET+=BE_FREEBSD BE_STANDARD
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# match rust-nightly					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/lang/rust}
  OPTIONS_UNSET+=GDB
## maybe firefox needs webassembly?
  OPTIONS_SET+=WASM
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# mDNSResponder vs Avahi choose Avahi			#
# if mDNSResponder does not require dbus, revise	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/net/ntp-devel}
 CONFLICTS+=avahi*
.endif
.if ${.CURDIR:M*/ports/audio/murmur}
 CONFLICTS+=avahi*
.endif

.if ${.CURDIR:M*/ports/devel/android-tools-adb}
  OPTIONS_UNSET+=MDNSRESPONDER
.endif

.if ${.CURDIR:M*/ports/audio/shairplay}
  OPTIONS_UNSET+=MDNSRESPONDER
.endif

.if ${.CURDIR:M*/ports/audio/xmms2}
  OPTIONS_UNSET+=MDNS_APPLE
  OPTIONS_SET+=MDNS_AVAHI
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Fix circular dependency loops				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/net/avahi}
  OPTIONS_UNSET+=GTK
.endif

.if ${.CURDIR:M*/ports/print/cups}
  OPTIONS_UNSET+=AVAHI GNUTLS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  remove dbus from cups				#
#_______________________________________________________#
.if ${.CURDIR:M*/ports/print/cups}
  OPTIONS_UNSET+=DBUS
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# ImageMagick6 vs 7 conflict -- most use V6		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/graphics/zbar}
  OPTIONS_UNSET+=V7
  OPTIONS_SET+=V6
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# damned wayland additions				#
# some cause problems? Looks like I changed my mind?	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/graphics/mesa-dri}
#    OPTIONS_UNSET+=WAYLAND
    OPTIONS_SET+=WAYLAND
.endif
.if ${.CURDIR:M*/ports/graphics/mesa-libs}
#    OPTIONS_UNSET+=WAYLAND
    OPTIONS_SET+=WAYLAND
.endif
.if ${.CURDIR:M*/ports/devel/sdl20}
#    OPTIONS_UNSET+=VIDEO_WAYLAND
    OPTIONS_SET+=VIDEO_WAYLAND
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  sdl2 options settings				#
#_______________________________________________________#
.if ${.CURDIR:M*/ports/devel/sdl20}
    OPTIONS_UNSET+=CSD DBUS FCITX HIDAPI IBUS JOYSTICK \
		ALSA JACK NAS PIPEWIRE PULSEAUDIO SNDIO
    OPTIONS_SET+=SAMPLERATE UDEV \
		OSS \
		KMSDRM OPENGL OPENGLES VULCAN X11
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  libglvnd must have X11 set for cairo			#
#_______________________________________________________#
.if ${.CURDIR:M*/ports/graphics/libglvnd}
    OPTIONS_SET+=X11
    OPTIONS_SET_FORCE=X11
.endif


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# ImageMagick7  - explicitly set options		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/graphics/ImageMagick7}
  OPTIONS_UNSET+=FPX GRAPHVIZ GSLIB
  OPTIONS_SET+=16BIT_PIXEL BZIP2 DJVU DOCS FFMPEG FFTW FLIF FONTCONFIG FREETYPE HDRI HEIF JBIG JPEG
  OPTIONS_SET+=JXL LCMS2 LQR LZMA MODULES OPENEXR OPENMP PANGO PDF PERL PNG RAQM RAW SVG THREADS
  OPTIONS_SET+=TIFF WEBP WMF
.endif

# ---------------------------------------------<  End user additions and modifications >--------------------------------------------- #


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Automatically added portconf section -- DON'T TOUCH	#
#_______________________________________________________#


Sunday, March 31, 2024

Easy fresh hobo HDD

It was a suprisingly simple fresh install on an attached HDD using some cables to power and then access by USB.  I put together a seperate hard drive to use on a machine I do not own.  I had the 14.0 installer on a usb, the only question was which attached drive via the bios boot menu would be the one among many.  The bios menu does show 'transcend' for the usb3.0 reader which is good but the real HDD attached via usb looked to blend into all the others.  I figured it out (maybe a semi-random guess) and got FreeBSD installed clean.

I chose ports and source, chose various needed options, and it installed as a ZFS stripe to the one drive.  The 14.0 installer is quite nice actually, even though it is not vastly different than most in the past.  I cannot make a custom kernel or reduced install since this will be used with hardware I cannot know right now, it may have nVidia and intel.  My next task was to get as much setup as possible so that when I finally use this drive I will be able to get right back to minetest or anything else.

I began with trying to install fvwm3 which gave me the temporary error that pkg was not yet setup.  Once pkg was functional, I installed fvwm3, then xorg-server and xorg-drivers, I tried to startx but it was not yet present, a very simple solitary line "exec fvwm3" was in my .xinitrc file.  Installing xinit and then xauth solved the startx issue.  I could get fvwm3 up but quickly realized xterm was not yet present.  I looked at the fvwm menu option for "XDG Menu" which needed py39-xdg, and after that I fleshed out most of my usual desktop items.  I installed firefox, gkrellm2, flameshot, and feh.

I chose to create a unique wallpaper for this portable 'hobo' drive, and then I tried to add it to the fvwm options for wallpaper but it wasn't displaying how I wished.  It took a bit of time before I figured out that what I needed was feh --no-fehbg --bg-max hobo_wall.png & in my .xinitrc above the exec fvwm3 line.  Everything was now about as workable as I could want, the rest I needed was to copy a bunch of things from my primary box, like my .cshrc and 'Ported_Software' and Blog directories.  I forgot to add bluefish but that is just one thing, if I end up writing another blog post via the drive running on another's pc.

This makes me wonder about my struggles to restore a desktop or graphics on my primary box when something disturbs what was installed and configured.  Certainly installing everything by pkg from the FreeBSD repo means it should all just work which is good, and I guess proves how much I need to learn or how fragile things can be when you customize.  I could have used desktop-installer but I did not, and succeeded anyway.  It definitely helps to have an idea of which components are necessary to get a desktop GUI up, though fvwm is much simpler than KDE or any other all-encompassing Desktop Environment.

Thursday, March 28, 2024

Streamlining minetest

Not long ago the upstream minetest developers made a commit which would fold irrlichtMt back into minetest.The minetest devs split the two apart quite a long time ago so they could focus on what they needed to strip out of irrlicht and what needed to be customized for their own needs.  With this recent commit it seems as though much of that effort has been accomplished and further improvements would be made with it more integral to minetest once more.  I was not ready to make this overhaul of my own Makefile but I knew I would soon enough.

The first thing I did was to revise the minetest Makefile for the recent commit date and hash, then I changed directory into /usr/home/tigersharke/Ported_Software/games/minetest-dev/work/minetest-6a7a613741fe32fa14897a4f780d7382105a103c/ so that I could check the cmake options via

cmake -L | awk '{if(f)print} /-- Cache values/{f=1}' > ../../cmake_options_new

with a diff.  Since I had the previous cmake_options gathered in the same fashion, I could take a diff to see how things changed.  This would also prove to me that nearly all of the Makefile options from irrlicht-minetest would be shifted into minetest-dev.

diff -y -W 120 cmake_opts cmake_opts_new | more

APPLY_LOCALE_BLACKLIST:BOOL=ON                                  APPLY_LOCALE_BLACKLIST:BOOL=ON
BUILD_BENCHMARKS:BOOL=FALSE                                     BUILD_BENCHMARKS:BOOL=FALSE
BUILD_CLIENT:BOOL=TRUE                                          BUILD_CLIENT:BOOL=TRUE
BUILD_DOCUMENTATION:BOOL=TRUE                                   BUILD_DOCUMENTATION:BOOL=TRUE
                                                           >    BUILD_EXAMPLES:BOOL=OFF
BUILD_SERVER:BOOL=FALSE                                         BUILD_SERVER:BOOL=FALSE
BUILD_UNITTESTS:BOOL=TRUE                                       BUILD_UNITTESTS:BOOL=TRUE
CMAKE_BUILD_TYPE:STRING=Release                                 CMAKE_BUILD_TYPE:STRING=Release
CMAKE_INSTALL_PREFIX:PATH=/usr/local                            CMAKE_INSTALL_PREFIX:PATH=/usr/local
CUSTOM_BINDIR:STRING=                                           CUSTOM_BINDIR:STRING=
CUSTOM_DOCDIR:STRING=                                           CUSTOM_DOCDIR:STRING=
CUSTOM_EXAMPLE_CONF_DIR:STRING=                                 CUSTOM_EXAMPLE_CONF_DIR:STRING=
CUSTOM_ICONDIR:STRING=                                          CUSTOM_ICONDIR:STRING=
CUSTOM_LOCALEDIR:STRING=                                        CUSTOM_LOCALEDIR:STRING=
CUSTOM_MANDIR:STRING=                                           CUSTOM_MANDIR:STRING=
CUSTOM_SHAREDIR:STRING=                                         CUSTOM_SHAREDIR:STRING=
CUSTOM_XDG_APPS_DIR:STRING=                                     CUSTOM_XDG_APPS_DIR:STRING=
ENABLE_CURL:BOOL=ON                                             ENABLE_CURL:BOOL=ON
ENABLE_CURSES:BOOL=ON                                           ENABLE_CURSES:BOOL=ON
ENABLE_GETTEXT:BOOL=ON                                          ENABLE_GETTEXT:BOOL=ON
                                                           >    ENABLE_GLES1:BOOL=OFF
                                                           >    ENABLE_GLES2:BOOL=OFF
ENABLE_LEVELDB:BOOL=ON                                          ENABLE_LEVELDB:BOOL=ON
ENABLE_LTO:BOOL=TRUE                                            ENABLE_LTO:BOOL=TRUE
ENABLE_LUAJIT:BOOL=ON                                           ENABLE_LUAJIT:BOOL=ON
                                                           >    ENABLE_OPENGL:BOOL=ON
                                                           >    ENABLE_OPENGL3:BOOL=ON
ENABLE_POSTGRESQL:BOOL=ON                                       ENABLE_POSTGRESQL:BOOL=ON
ENABLE_PROMETHEUS:BOOL=OFF                                      ENABLE_PROMETHEUS:BOOL=OFF
ENABLE_REDIS:BOOL=ON                                            ENABLE_REDIS:BOOL=ON
ENABLE_SOUND:BOOL=ON                                            ENABLE_SOUND:BOOL=ON
ENABLE_SPATIAL:BOOL=ON                                          ENABLE_SPATIAL:BOOL=ON
ENABLE_SYSTEM_GMP:BOOL=ON                                       ENABLE_SYSTEM_GMP:BOOL=ON
ENABLE_SYSTEM_JSONCPP:BOOL=ON                                   ENABLE_SYSTEM_JSONCPP:BOOL=ON
ENABLE_TOUCH:BOOL=OFF                                           ENABLE_TOUCH:BOOL=OFF
ENABLE_UPDATE_CHECKER:BOOL=(;NOT;TRUE;)                         ENABLE_UPDATE_CHECKER:BOOL=(;NOT;TRUE;)
GETTEXT_MSGFMT:FILEPATH=/usr/local/bin/msgfmt                   GETTEXT_MSGFMT:FILEPATH=/usr/local/bin/msgfmt
INSTALL_DEVTEST:BOOL=FALSE                                      INSTALL_DEVTEST:BOOL=FALSE
IRRLICHTMT_BUILD_DIR:PATH=                                 <
IrrlichtMt_DIR:PATH=/usr/local/lib/cmake/IrrlichtMt        <
LEVELDB_INCLUDE_DIR:PATH=/usr/include                           LEVELDB_INCLUDE_DIR:PATH=/usr/include
LEVELDB_LIBRARY:FILEPATH=LEVELDB_LIBRARY-NOTFOUND               LEVELDB_LIBRARY:FILEPATH=LEVELDB_LIBRARY-NOTFOUND
REDIS_INCLUDE_DIR:PATH=REDIS_INCLUDE_DIR-NOTFOUND               REDIS_INCLUDE_DIR:PATH=REDIS_INCLUDE_DIR-NOTFOUND
REDIS_LIBRARY:FILEPATH=REDIS_LIBRARY-NOTFOUND                   REDIS_LIBRARY:FILEPATH=REDIS_LIBRARY-NOTFOUND
REQUIRE_LUAJIT:BOOL=OFF                                         REQUIRE_LUAJIT:BOOL=OFF
RUN_IN_PLACE:BOOL=FALSE                                         RUN_IN_PLACE:BOOL=FALSE
                                                           >    SDL2_DIR:PATH=/usr/local/lib/cmake/SDL2
SPATIAL_INCLUDE_DIR:PATH=/usr/local/include                     SPATIAL_INCLUDE_DIR:PATH=/usr/local/include
SPATIAL_LIBRARY:FILEPATH=/usr/local/lib/libspatialindex.        SPATIAL_LIBRARY:FILEPATH=/usr/local/lib/libspatialindex.
USE_GPROF:BOOL=FALSE                                            USE_GPROF:BOOL=FALSE
                                                           >    USE_SDL2:BOOL=ON
VERSION_EXTRA:STRING=                                           VERSION_EXTRA:STRING=
WARN_ALL:BOOL=TRUE                                              WARN_ALL:BOOL=TRUE

Before I began the attempted reinstall, I removed irrlichtMt that was installed which also caused minetest to be removed.  This way I can know whether the newly incorporated irrlichtMt will satisfy the minetest build.  Output of the build seems to indicate that I might have a few things to adjust, although most do not seem to be critical issues I suppose I will need to add the jpeg to USES.

====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
====> Running Q/A tests (stage-qa)
Error: /usr/local/bin/minetest is linked to /usr/local/lib/libjpeg.so.8 from graphics/jpeg-turbo but it is not declared as a dependency
Warning: you need USES+=jpeg
Warning: you might not need LIB_DEPENDS on libpng.so
Warning: you might not need LIB_DEPENDS on liblua-5.4.so
Warning: you might not need LIB_DEPENDS on libSDL2.so
Warning: you might not need LIB_DEPENDS on libSDL2_ttf.so
Warning: you might not need LIB_DEPENDS on libGL.so
Warning: you might not need LIB_DEPENDS on libopenal.so.1
===>  Installing for minetest-dev-g20240326
===>  Checking if minetest-dev is already installed
===>   Registering installation for minetest-dev-g20240326
pkg-static: duplicate file listing: /usr/local/etc/rc.d/minetest, ignoring
Installing minetest-dev-g20240326...
===> Creating groups.
Using existing group 'minetest'.
===> Creating users
Using existing user 'minetest'.
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
==> Running trigger: gtk-update-icon-cache.ucl
Generating GTK icon cache for /usr/local/share/icons/hicolor
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/bin/minetestserver
/usr/local/bin/minetest

      This port has installed the following startup scripts which may cause
      these network services to be started at boot time.
/usr/local/etc/rc.d/minetest

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
https://www.minetest.net/
root@ichigo:/usr/home/tigersharke/Ported_Software/games/minetest-dev #

A quick test proved that everything runs well enough to show the main menu and access a server, so at least with most of the usual options selected for test builds-- I don't use touch option for my client nor most or any in the Admin/Dev section, it built fine.

                 ┌───────────────────────────────────────┤minetest-dev-g20240326├────────────────────────────────────────┐
                 │ 'F1' for Ports Collection help.                                                                       │
                 │ ┌───────────────────────────────────────────────────────────────────────────────────────────────────┐ │
                 │ │──────────────────────────────────────── Database support ─────────────────────────────────────────│ │
                 │ │[ ] LEVELDB        Enable LevelDB backend                                                          │ │
                 │ │[ ] PGSQL          Enable PostgreSQL map backend                                                   │ │
                 │ │[ ] REDIS          Enable Redis backend                                                            │ │
                 │ │──────────────────────────────────────── Admin/Dev needs ──────────────────────────────────────────│ │
                 │ │[X] BENCHMARKS     Build benchmarks (Adds some benchmark chat commands)                            │ │
                 │ │[X] DEVTEST        Install Development Test game also (INSTALL_DEVTEST)                            │ │
                 │ │[X] DOCS           Build and install documentation (via doxygen)                                   │ │
                 │ │[X] EXAMPLES       BUILD_EXAMPLES                                                                  │ │
                 │ │[X] NCURSES        Enables server side terminal (cli option: --terminal)                           │ │
                 │ │[X] PROFILING      Use gprof for profiling                                                         │ │
                 │ │[X] PROMETHEUS     Build with Prometheus metrics exporter                                          │ │
                 │ │[X] TOUCH          Build with touch interface support (to test on amd64)                           │ │
                 │ │[X] UNITTESTS      Build unit test sources (BUILD_UNITTESTS)                                       │ │
                 │ │─────────────────────────────────────── Client essentials ─────────────────────────────────────────│ │
                 │ │[X] CURL           Enable cURL support for fetching media: contentdb                               │ │
                 │ │[X] FREETYPE       Support for TrueType fonts with unicode                                         │ │
                 │ │[X] NLS            Native Language Support (ENABLE_GETTEXT)                                        │ │
                 │ │[X] SOUND          Enable sound via openal-soft                                                    │ │
                 │ │[X] SPATIAL        Enable SpatialIndex (Speeds up AreaStores)                                      │ │
                 │ │───────────────────────────────────────── Other options ───────────────────────────────────────────│ │
                 │ │[X] LTO            Build with IPO/LTO optimizations (smaller and more efficient than regular build)│ │
                 │ │─────────────────────────────────────── System subsitutes ─────────────────────────────────────────│ │
                 │ │[X] SYSTEM_FONTS   Use or install default fonts from ports                                         │ │
                 │ │[X] SYSTEM_GMP     Use gmp from ports (ENABLE_SYSTEM_GMP)                                          │ │
                 │ │[X] SYSTEM_JSONCPP Use jsoncpp from ports (ENABLE_SYSTEM_JSONCPP)                                  │ │
                 │ │[X] SYSTEM_LUAJIT  Use or install luajit-openresty from ports                                      │ │
                 │ │──────────────────────────── Software components [select at least one] ────────────────────────────│ │
                 │ │[X] CLIENT         Build client and add graphics support, dependency                               │ │
                 │ │[X] SERVER         Build server                                                                    │ │
                 │ │───────────────────────────── Graphics support [select at least one] ──────────────────────────────│ │
                 │ │( ) GLES1          Enable GLES1 (testing)                                                          │ │
                 │ │( ) GLES2          Enable GLES2 (testing)                                                          │ │
                 │ │(*) OPENGL         Support OPENGL (<3.x)                                                           │ │
                 │ │( ) OPENGL3        Support OPENGL3 --Builds but seems incomplete--                                 │ │
                 │ └───────────────────────────────────────────────────────────────────────────────────────────────────┘ │
                 ├───────────────────────────────────────────────────────────────────────────────────────────────────────┤
                 │                                         [  OK  ]     [Cancel]                                         │
                 └───────────────────────────────────────────────────────────────────────────────────────────────────────┘

I can add the jpeg item to the Makefile and now future minetest-dev builds will be one process.  Testing the gles1 option tells me that I cannot include SDL and so will need to adjust the options a bit more.  The jpeg item was actually a typo, having added it the wrong way in the wrong place.  There were a few other adjustments and one I cannot solve right now.  The git diff is how it looks now:

# git diff
diff --git a/Makefile b/Makefile
index e20fedc..176fcbb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 # Portname block
 PORTNAME=              minetest
-DISTVERSION=   g20240324
+DISTVERSION=   g20240326
 CATEGORIES=            games
 PKGNAMESUFFIX= -dev
 DISTNAME=              ${PORTNAME}-${GH_TAGNAME}
@@ -15,15 +15,14 @@ WWW=                        https://www.minetest.net/
 LICENSE=               LGPL21+

 # dependencies
-LIB_DEPENDS=   libIrrlichtMt.so:x11-toolkits/irrlicht-minetest libzstd.so:archivers/zstd
+LIB_DEPENDS=   libzstd.so:archivers/zstd

 # uses block
-USES=                  cmake iconv:wchar_t sqlite lua luajit ninja:make llvm:min=16 pkgconfig:build sdl
+USES=                  cmake iconv:wchar_t sqlite lua luajit ninja:make llvm:min=16 pkgconfig:build
 USE_GITHUB=     nodefault
 GH_ACCOUNT=     minetest
 GH_PROJECT=     minetest
-GH_TAGNAME=            a7908da968bba82129f60c9601c9cefabd36a389
-USE_SDL=               sdl2 ttf2
+GH_TAGNAME=            6a7a613741fe32fa14897a4f780d7382105a103c

 # uses=cmake related variables
 CMAKE_ARGS=            -DCMAKE_BUILD_TYPE="MinSizeRel" \
@@ -31,7 +30,7 @@ CMAKE_ARGS=           -DCMAKE_BUILD_TYPE="MinSizeRel" \
                                -DCMAKE_CXX_FLAGS="-stdlib=libc++"

 # conflicts
-CONFLICTS=             minetest
+CONFLICTS=             minetest irrlichtMt irrlicht-minetest

 # wrksrc block
 WRKSRC=                        ${WRKDIR}/${PORTNAME}-${GH_TAGNAME}
@@ -43,7 +42,7 @@ WRKSRC=                       ${WRKDIR}/${PORTNAME}-${GH_TAGNAME}
 # FATAL: Makefile: PORTDOCS appears in plist but DOCS is not listed in OPTIONS_DEFINE.

 # options definitions
-OPTIONS_DEFAULT=                       CURL DOCS FREETYPE LTO LUAJIT SOUND SPATIAL SYSTEM_FONTS SYSTEM_GMP SYSTEM_JSONCPP CLIENT GLVND
+OPTIONS_DEFAULT=                       CURL DOCS FREETYPE LTO LUAJIT SOUND SPATIAL SYSTEM_FONTS SYSTEM_GMP SYSTEM_JSONCPP CLIENT OPENGL
 OPTIONS_GROUP=                         DATABASE BUILD NEEDS MISC SYSTEM
 OPTIONS_GROUP_BUILD=           BENCHMARKS DEVTEST DOCS EXAMPLES NCURSES PROFILING PROMETHEUS TOUCH UNITTESTS
 OPTIONS_GROUP_DATABASE=                LEVELDB PGSQL REDIS
@@ -52,13 +51,13 @@ OPTIONS_GROUP_NEEDS=                CURL FREETYPE NLS SOUND SPATIAL
 OPTIONS_GROUP_SYSTEM=          SYSTEM_FONTS SYSTEM_GMP SYSTEM_JSONCPP SYSTEM_LUAJIT
 OPTIONS_MULTI=                         SOFTWARE
 OPTIONS_MULTI_SOFTWARE=                CLIENT SERVER
-#OPTIONS_SINGLE=                       GRAPHICS  # Graphics buried option GLVND/LEGACY stuff obsoleted log ago, likely did nothing.
-#OPTIONS_SINGLE_GRAPHICS=      GLVND LEGACY
+OPTIONS_SINGLE=                                GRAPHICS
+OPTIONS_SINGLE_GRAPHICS=       GLES1 GLES2 OPENGL OPENGL3
 OPTIONS_SUB=                           yes

 # options descriptions
-BUILD_DESC=                                    Admin/Dev needs
 BENCHMARKS_DESC=                       Build benchmarks (Adds some benchmark chat commands)
+BUILD_DESC=                                    Admin/Dev needs
 CLIENT_DESC=                           Build client and add graphics support, dependency
 CURL_DESC=                                     Enable cURL support for fetching media: contentdb
 DATABASE_DESC=                         Database support
@@ -66,19 +65,22 @@ DEVTEST_DESC=                               Install Development Test game also (INSTALL_DEVTEST)
 DOCS_DESC=                                     Build and install documentation (via doxygen)
 EXAMPLES_DESC=                         BUILD_EXAMPLES
 FREETYPE_DESC=                         Support for TrueType fonts with unicode
-#GLVND_DESC=                                   Use libOpenGL or libGLX
-#GRAPHICS_DESC=                                Graphics support
-#LEGACY_DESC=                          Use libGL - where GLVND may be broken on nvidia
+GLES1_DESC=                                    Enable GLES1 --broken due to SDL--
+GLES2_DESC=                                    Enable GLES2
+GRAPHICS_DESC=                         Graphics support
 LEVELDB_DESC=                          Enable LevelDB backend
 LTO_DESC=                                      Build with IPO/LTO optimizations (smaller and more efficient than regular build)
 MISC_DESC=                                     Other options
 NCURSES_DESC=                          Enables server side terminal (cli option: --terminal)
 NEEDS_DESC=                                    Client essentials
 NLS_DESC=                                      Native Language Support (ENABLE_GETTEXT)
+OPENGL3_DESC=                          Support OPENGL3 --Builds but seems incomplete--
+OPENGL_DESC=                           Support OPENGL (<3.x)
 PGSQL_DESC=                                    Enable PostgreSQL map backend
 PROFILING_DESC=                                Use gprof for profiling
 PROMETHEUS_DESC=                       Build with Prometheus metrics exporter
 REDIS_DESC=                                    Enable Redis backend
+#SDL_DESC=                                     Use SDL
 SERVER_DESC=                           Build server
 SOFTWARE_DESC=                         Software components
 SOUND_DESC=                                    Enable sound via openal-soft
@@ -93,9 +95,9 @@ UNITTESTS_DESC=                               Build unit test sources (BUILD_UNITTESTS)

 # options helpers
 BENCHMARKS_CMAKE_BOOL=         BUILD_BENCHMARKS
-CLIENT_LIB_DEPENDS=                    libIrrlichtMt.so:x11-toolkits/irrlicht-minetest libpng.so:graphics/png
-CLIENT_USES=                           gl xorg
-CLIENT_USE=                                    jpeg GL=gl,glu \
+CLIENT_LIB_DEPENDS=                    libpng.so:graphics/png
+CLIENT_USES=                           gl xorg jpeg
+CLIENT_USE=                                    GL=gl,glu \
                                                        XORG=ice,sm,x11,xext,xcb,xres,xshmfence,xau,xaw,xcomposite,xcursor,xdamage,xdmcp,\
                                                        xfixes,xft,xi,xinerama,xkbfile,xmu,xpm,xrandr,xrender,xscreensaver,xt,xtst,xv,xxf86vm
 CLIENT_CMAKE_ON=                       BUILD_CLIENT REQUIRE_LUAJIT ENABLE_LUAJIT
@@ -107,13 +109,10 @@ DOCS_CMAKE_BOOL=                  BUILD_DOCUMENTATION
 EXAMPLES_CMAKE_BOOL=           BUILD_EXAMPLES
 FREETYPE_LIB_DEPENDS=          libfreetype.so:print/freetype2
 FREETYPE_CMAKE_BOOL=           ENABLE_FREETYPE
-#GLVND_LIB_DEPENDS=                    libOpenGL.so:graphics/libglvnd
-#GLVND_USE=                                    GL+=opengl
-#GLVND_CMAKE_BOOL=                     ENABLE_GLVND
-#GLVND_CMAKE_ON=                               -DOPENGL_GL_PREFERENCE="GLVND" -DOPENGL_xmesa_INCLUDE_DIR="${PREFIX}/lib"
-#LEGACY_USE=                                   GL+=opengl
-#LEGACY_CMAKE_BOOL=                    ENABLE_LEGACY
-#LEGACY_CMAKE_ON=                      -DOPENGL_GL_PREFERENCE="LEGACY" -DOPENGL_xmesa_INCLUDE_DIR="${PREFIX}/lib"
+GLES1_USE=                                     GL+=glesv1
+GLES1_CMAKE_BOOL=                      ENABLE_GLES1
+GLES2_USE=GL+=                         glesv2
+GLES2_CMAKE_BOOL=                      ENABLE_GLES2
 LEVELDB_LIB_DEPENDS=           libleveldb.so:databases/leveldb
 LEVELDB_CMAKE_BOOL=                    ENABLE_LEVELDB
 LTO_CMAKE_BOOL=                                ENABLE_LTO
@@ -122,12 +121,18 @@ NCURSES_CMAKE_BOOL=                       ENABLE_CURSES
 NLS_USES=                                      gettext
 NLS_CMAKE_BOOL=                                ENABLE_GETTEXT
 NLS_LDFLAGS=                           -L${LOCALBASE}/lib
+OPENGL3_USE=                           GL+=gl
+OPENGL3_CMAKE_BOOL=                    ENABLE_OPENGL3
+OPENGL3_CMAKE_ON=                      USE_SDL
+OPENGL_USE=                                    GL+=gl
+OPENGL_CMAKE_BOOL=                     ENABLE_OPENGL
 PGSQL_USES=                                    pgsql
 PGSQL_CMAKE_BOOL=                      ENABLE_POSTGRESQL
 PROFILING_CMAKE_ON=                    USE_GPROF
 PROMETHEUS_CMAKE_BOOL=         ENABLE_PROMETHEUS
 REDIS_LIB_DEPENDS=                     libhiredis.so:databases/hiredis
 REDIS_CMAKE_BOOL=                      ENABLE_REDIS
+#SDL_CMAKE_ON=                         USE_SDL2
 SERVER_CMAKE_BOOL=                     BUILD_SERVER
 SOUND_CMAKE_BOOL=                      ENABLE_SOUND
 SPATIAL_LIB_DEPENDS=           libspatialindex.so:devel/spatialindex
@@ -144,13 +149,19 @@ SYSTEM_LUAJIT_USES=                       luajit:luajit-openresty
 TOUCH_CMAKE_BOOL=                      ENABLE_TOUCH
 UNITTESTS_CMAKE_BOOL=          BUILD_UNITTESTS

+# SDL cannot be used with GLES1 but having it installed causes a fail without enabled in Makefile?
+
 .include 

+.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MOPENGL}
+USES+=                 sdl
+USE_SDL=               sdl2 ttf2
+SDL_CMAKE_ON=  USE_SDL2=ON
+.endif
+
 .if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSOUND}
 USES+=                 openal
-LIB_DEPENDS+=  libogg.so:audio/libogg \
-                               libvorbis.so:audio/libvorbis \
-                               libvorbisfile.so:audio/libvorbis
+LIB_DEPENDS+=  libogg.so:audio/libogg libvorbisfile.so:audio/libvorbis
 .endif

 .if ${PORT_OPTIONS:MSERVER}
diff --git a/distinfo b/distinfo
index f485f6f..d444723 100644
--- a/distinfo
+++ b/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1711406948
-SHA256 (minetest-dev/minetest-a7908da968bba82129f60c9601c9cefabd36a389.tar.gz) = f2431461c2307c5111cabf6c0c360e7d2e516942b7cc407ca9aaeae25843bb92
-SIZE (minetest-dev/minetest-a7908da968bba82129f60c9601c9cefabd36a389.tar.gz) = 10477004
+TIMESTAMP = 1711653177
+SHA256 (minetest-dev/minetest-6a7a613741fe32fa14897a4f780d7382105a103c.tar.gz) = 74a3c9b5038541ce4375d583d1b60ef4bb5e6e2345b8f7a5610b1ed1222020e5
+SIZE (minetest-dev/minetest-6a7a613741fe32fa14897a4f780d7382105a103c.tar.gz) = 11276813

The pkg-plist did not change, which means irrlichtMt is very integrated into the minetest build so that it is not a distinct install any longer.  It might possibly be a bit more time to compile since irrlichtMt is built also, but it will only be one thing to maintain instead of two.  It will be easier for consumers to keep updated since they will only need to look in one place, install one thing not including external dependencies.

Tuesday, March 26, 2024

Sed on a plist adjusts fvwm install

Sed can be a beast but its easy to be distracted by a silly solution you find online somewhere.  Whether it is a linuxism or simply an inaccurate solution, attempting to adapt it to your need could send you down the wrong road.  I recently cleaned up my unofficial port of fvwm3-dev to better comply via portclippy and to add options I may have missed.  After all of that, I discovered that the GO option causes some things to be present or not whether it is enabled.  This meant the pkg-plist needed a different mechanism for a few things.  I chose to have GO as a default option and with it selected when I re-verify the pkg-plist each time I update.  Since GO is enabled, there will need to be two lines added and this is what had me stuck, until I finally realized I could include newlines in the subsitution for the line prior to the added lines.  One small test proved that I could include the newline within the substitution and after that I knew the issue was solved with a little bit more editing.

I don't choose to manually edit all these things, just rename the present pkg-plist as pkg-plist-old, and after I generate a new pkg-plist, I use my plist-fix script to add all the conditional %TAG% to lines needing them, now with other adjustments as well.

Here is the script, this one is a bit more complex but many of my unofficial ports have a similar script in the files directory for the same purpose, specific to each port.

#!/bin/sh
rm /var/tmp/fvwm3-dev_pkg-plist 2>/dev/null
rm /var/tmp/fvwm3-dev_pkg-plist-fixed 2>/dev/null
cp ../pkg-plist /var/tmp/fvwm3-dev_pkg-plist

echo "adding conditional list tags"

cat /var/tmp/fvwm3-dev_pkg-plist | \
sed \
-e 's#^\/you\/have\/to\/check\/what\/makeplist\/gives\/you##' \
-e '/^$/d' \
-e 's#^bin\/FvwmPrompt#\%\%GOLANG\%\%\bin\/FvwmPrompt#g' \
-e 's#^bin\/fvwm-convert-2.6#\%\%PERL\%\%\bin\/fvwm-convert-2.6#g' \
-e 's#^bin\/fvwm-menu-directory#\%\%PERL\%\%\bin\/fvwm-menu-directory#g' \
-e 's#^bin\/fvwm-menu-xlock#\%\%PERL\%\%\bin\/fvwm-menu-xlock#g' \
-e 's#^bin\/fvwm-perllib#\%\%PERL\%\%\bin\/fvwm-perllib#g' \
-e 's#^libexec\/fvwm3\/\([0-9]\.[0-9]\.[0-9])*\)\/FvwmCommandS#\%\%GOLANG\%\%\libexec\/fvwm3\/\1\/FvwmCommandS \
\%\%NO_GOLANG\%\%\libexec\/fvwm3\/\1\/FvwmConsoleC\n\%\%NO_GOLANG\%\%\libexec\/fvwm3\/\1\/FvwmConsole#g' \
-e 's#^libexec\/fvwm3\/\([0-9]\.[0-9]\.[0-9])*\)\/FvwmPerl#\%\%PERL\%\%\libexec\/fvwm3\/\1\/FvwmPerl#g' \
-e 's#^share\/man\/man1\/fvwm-convert-2.6#\%\%MANPAGES\%\%\%\%PERL\%\%\share\/man\/man1\/fvwm-convert-2.6#g' \
-e 's#^share\/man\/man1\/fvwm-menu-directory#\%\%MANPAGES\%\%\%\%PERL\%\%\share\/man\/man1\/fvwm-menu-directory#g' \
-e 's#^share\/man\/man1\/fvwm-menu-xlock#\%\%MANPAGES\%\%\%\%PERL\%\%\share\/man\/man1\/fvwm-menu-xlock#g' \
-e 's#^share\/man\/man1\/fvwm-perllib#\%\%MANPAGES\%\%\%\%PERL\%\%\share\/man\/man1\/fvwm-perllib#g' \
-e 's#^share\/man\/man1\/fvwmPerl#\%\%MANPAGES\%\%\%\%PERL\%\%\share\/man\/man1\/fvwmperl#g' \
-e 's#^share\/man\/man1\/fvwm-perllib#\%\%MANPAGES\%\%\%\%PERL\%\%\share\/man\/man1\/fvwm-perllib#g' \
-e 's#\%\%MANPAGES\%\%share\/man\/man1\/FvwmConsole#\%\%GOLANG\%\%\%\%MANPAGES\%\%share\/man\/man1\/FvwmConsole#g' \
-e 's#^share\/man\/man1#\%\%MANPAGES\%\%share\/man\/man1#g' \
-e 's#^\%\%DATADIR\%\%\/fvwm-menu-desktop-config.fpl#\%\%PERL\%\%\%\%DATADIR\%\%\/fvwm-menu-desktop-config.fpl#g' \
-e 's#^\%\%DATADIR\%\%\/fvwm-script-ComExample.pl#\%\%PERL\%\%\%\%DATADIR\%\%\/fvwm-script-ComExample.pl#g' \
-e 's#^\%\%DATADIR\%\%/locale#\%\%NLS\%\%\%\%DATADIR\%\%/locale#g' \
-e 's#^\%\%DATADIR\%\%/perllib#\%\%PERL\%\%\%\%DATADIR\%\%/perllib#g' \
> /var/tmp/fvwm-dev_pkg-plist-fixed
cp /var/tmp/fvwm-dev_pkg-plist-fixed ../pkg-plist

There are a few other things in the Makefile that I add simply because we often do not realize caMelcaSe is used and expect all lowercase manpages.

# This detail has been annoying, why are some manpages all lowercase and some
# have an initial capital? Whether there was a purpose, the vast majority of
# man1 manpages are all lowercase. Cure this here. Also fix the recent change
# from /usr/local/man to /usr/local/share/man  It is a mistake to change all
# these manpages to lowercase only because fvwm scripts use those camelcased,
# instead, for convenience create symbolic links.

post-stage:
    @${MV} ${STAGEDIR}${LOCALBASE}/man/man1/* \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmAnimate.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmanimate.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmAuto.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmauto.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmBacker.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmbacker.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmButtons.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmbuttons.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmCommand.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmcommand.1
#   @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmConsole.1 \
#       ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmconsole.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmEvent.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmevent.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmForm.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmform.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmIconMan.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmiconMan.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmIdent.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmident.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmMFL.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmmfl.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmPager.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmpager.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmPerl.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmperl.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmRearrange.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmrearrange.1
    @${LN} ${STAGEDIR}${LOCALBASE}/share/man/man1/FvwmScript.1 \
        ${STAGEDIR}${LOCALBASE}/share/man/man1/fvwmscript.1

These particular adjustments that I figured out may lead to finally succeeding with the dbeaver reproducible install, avoiding the generated date stamp inserted into many file or directory names which would cause pkg to fail because the pkg-plist would be different the first time it was used after an update.

Saturday, March 16, 2024

Some blog cleanup

A short time ago I looked at some old posts after changing the theme css for this blog.  Much of the theme changes should not have affected the display of any pages or posts and I still think that was not the cause. However, I did find at least two pages in the distilled section which did not display properly.  Those i had built with the online editor of this site and when I looked at the source discovered how horrible they were. Since this may be a task for me for a bit of time, to clean up and improve pages and posts here, I added a further note to the header that I am aware of the display issues while I complete this.  I also want to finally change the background image to something different that I create mysefl, but intend to use inkscape and this fails for me at present.

Since I am not going to show the rendered new versus old, I'll show you how the change looks in the source as I adjust it. Below is what I found as source on the site initially, which I wrote in 2021, already some years old now.

Simply as a precaution. Copy your last /usr/src updated with svn to a backup directory: <br /><p><span style="font-family: courier;">cp -pRP /usr/src /usr/src-last_svn_update</span></p><p><span style="font-family: courier;"> </span></p><p>Remove the directory and all contents then create a fresh directory.  As /usr/src contains hidden files or directories, this may be more appropriate and an easier sure step.  After, we still need the directory to use with git, so re-create it.<br /></p><p><span style="font-family: courier;">rm -rf /usr/src </span></p><p><span style="font-family: courier;"><span style="font-family: courier;">mkdir /usr/src</span> <br /></span></p><p>Or just delete the /usr/src directory contents:<br /></p><span style="font-family: courier;">rm -rf /usr/src/*</span><p><span style="font-family: courier;"></span></p><p> <br /><br />Now obtain source <br /><span style="font-family: courier;">git clone -b master --single-branch --depth 1 https://github.com/freebsd/freebsd.git /usr/src</span> <br /><br />Source for a specific branch (depth implies single-branch)<br /><span style="font-family: courier;">git clone -b stable/12 --depth 1 https://github.com/freebsd/freebsd.git /usr/src</span></p><p> </p><p>Update -- the first line is needed for the initial update, just the pull thereafter.<br /></p><p><span style="font-family: courier;">git config pull.rebase true</span></p><p><span style="font-family: courier;">git pull</span></p><p><br /></p><p>FYI Sept 2021 github change.</p><p>Adjust url from git:// to https://</p><p><span style="font-family: courier;">edit .git/config</span></p><p><span style="font-family: courier;">under [origin] modify the url</span></p><p><span style="font-family: courier;">from: <br /></span></p><p><span style="font-family: courier;"> url = git://github.com/freebsd/freebsd.git</span></p><p><span style="font-family: courier;">to:</span></p><p><span style="font-family: courier;"> </span><span style="font-family: courier;">url = https://github.com/freebsd/freebsd.git</span><span style="font-family: courier;"></span></p>

It turns out that once again I managed to get something done without documenting it.  The worst looking page had been "Updating Kernel & World" both with how it was rendered (many things were missing and not visible) and how the html looked. The above example is not nice but because I did a bit more complex display for the other page, there were numerous extra essentially empty span and div tags, bunches of inline style, extra page break tags.  It took a while to clean up and the revised version is somewhat different since I am using a more standardized set of css for everything. One other thing to notice about the above example source is the text formatting of it itself.  I have been using the wordwrap feature of bluefish editor so other pages and posts will look similar.  That the above includes a lot of inline style means both that it is of course old and likely edited online as well.

After the initial cleanup to better see how it is, you can notice once more a lot of excess junk that is useless or not needed. I used bluefish to replace all "<" with "<" followed with a carriage return. I am not going to show a continual pile of adjustments, just the original, this one, and the final cleaned html.

Simply as a precaution. Copy your last /usr/src updated with svn to a backup directory:
<br />
<p>
<span style="font-family: courier;">cp -pRP /usr/src /usr/src-last_svn_update
</span>
</p>
<p>
<span style="font-family: courier;"> 
</span>
</p>
<p>Remove the directory and all contents then create a fresh directory.  As /usr/src contains hidden files or directories, this may be more appropriate and an easier sure step.  After, we still need the directory to use with git, so re-create it.
<br />
</p>
<p>
<span style="font-family: courier;">rm -rf /usr/src 
</span>
</p>
<p>
<span style="font-family: courier;">
<span style="font-family: courier;">mkdir /usr/src
</span>
<br />
</span>
</p>
<p>Or just delete the /usr/src directory contents:
<br />
</p>
<span style="font-family: courier;">rm -rf /usr/src/*
</span>
<p>
<span style="font-family: courier;">
</span>
</p>
<p> 
<br />
<br />Now obtain source
<br />
<span style="font-family: courier;">git clone -b master --single-branch --depth 1 https://github.com/freebsd/freebsd.git /usr/src
</span>
<br />
<br />Source for a specific branch (depth implies single-branch)
<br />
<span style="font-family: courier;">git clone -b stable/12 --depth 1 https://github.com/freebsd/freebsd.git /usr/src
</span>
</p>
<p> 
</p>
<p>Update -- the first line is needed for the initial update, just the pull thereafter.
<br />
</p>
<p>
<span style="font-family: courier;">git config pull.rebase true
</span>
</p>
<p>
<span style="font-family: courier;">git pull
</span>
</p>
<p>
<br />
</p>
<p>FYI Sept 2021 github change.
</p>
<p>Adjust url from git:// to https://
</p>
<p>
<span style="font-family: courier;">edit .git/config
</span>
</p>
<p>
<span style="font-family: courier;">under [origin] modify the url
</span>
</p>
<p>
<span style="font-family: courier;">from:
<br />
</span>
</p>
<p>
<span style="font-family: courier;"> url = git://github.com/freebsd/freebsd.git
</span>
</p>
<p>
<span style="font-family: courier;">to:
</span>
</p>
<p>
<span style="font-family: courier;"> 
</span>
<span style="font-family: courier;">url = https://github.com/freebsd/freebsd.git
</span>
<span style="font-family: courier;">
</span>
</p>

After a lot of deletions and substitutions we have a much better version of the html for the page and it will display slightly different as it uses the css from my customized theme.  Instead of a single long line as a paragraph, each distinct paragraph within the <p> tags is one long editor word-wrapped line which still permits readability without the effort of inserting linebreaks manually (which is a bit too much unnecessary effort).

<p>Simply as a precaution. Copy your last /usr/src updated with svn to a backup directory: </p><p><span class="icode">cp -pRP /usr/src /usr/src-last_svn_update</span></p>
<p>Remove the directory and all contents then create a fresh directory.  As /usr/src contains hidden files or directories, this may be more appropriate and an easier sure step.  After, we still need the directory to use with git, so re-create it.</p>
<p><span class="icode">rm -rf /usr/src </span></p>
<p><span class="icode">mkdir /usr/src</span>
<p>Or just delete the /usr/src directory contents:</p>
<p><span class="icode">rm -rf /usr/src/*</span></p>
<p>Now obtain source </p>
<p><span class="icode">git clone -b master --single-branch --depth 1 https://github.com/freebsd/freebsd.git /usr/src</span> </p>
<p>Source for a specific branch (depth implies single-branch)</p>
<p><span class="icode">git clone -b stable/12 --depth 1 https://github.com/freebsd/freebsd.git /usr/src</span></p>
<p>Update -- the first line is needed for the initial update, just the pull thereafter.</p>
<p><span class="icode">git config pull.rebase true</span></p>
<p><span class="icode">git pull</span></p>
<p>FYI Sept 2021 github change.</p>
<p>Adjust url from git:// to https://</p>
<p><span class="icode">edit .git/config</span></p>
<p><span class="icode">under [origin] modify the url</span></p>
<p>from:</p>
<p><span class="icode">url = git://github.com/freebsd/freebsd.git</span></p>
<p>to:</p>
<p><span class="icode">url = https://github.com/freebsd/freebsd.git</span></p>

Not only have I cleaned up a number of pages and posts, with more yet to complete to my satisfaction, I decided to revise the appearance.  Gone is that orangy stained glass image background, and some other colors have been revised.  I wanted to create my own background image but as image uploads are rather indirect due to how this site or firefox has been acting lately, I may not do so much with images here, and I chose to let the online theme editor suffice.  I hope overall that this blog is now considerably more readable. Remember, you could write your own for the same purpose that I have been, to contribute back a perspective and tips and feedback to the community.

Frequently viewed this week