Warning: there may be occasional oddness due to css and blog edits. **KNOWN ISSUE: possible hidden text**
Showing posts with label ports-mgmt. Show all posts
Showing posts with label ports-mgmt. Show all posts

Monday, March 11, 2024

Poudriere bulk build lists

I may have briefely mentioned or possibly even described how I collect what is installed on my system for rebuilding via poudriere.  I have two methods that I use from time to time, one takes a list direct from those directories which exist in the ports tree, and the other uses pkg to collect what is installed already.  There are only two areas which I am most likely to install all or a majority of the ports and that is fonts and games.  I might use these lists periodically to ensure that new things were added.  I could use the ports tree built-in mechanisms to build every port in a category such as fonts or games but this means I would get items I do not desire.  Building via poudriere will permit me to limit to what I wish and more quickly handle the task as it would work upon a bulk list and has a blacklist capability.

The simple script to collect all the fonts that could be installed looks like this:

#!/bin/sh
[ -f /root/allfonts-list ] && rm /root/allfonts-list
for dir in `ls /usr/ports/x11-fonts`
 do
  echo x11-fonts/$dir >> /root/allfonts-list
done

The same for games is only changed a little:

#!/bin/sh
[ -f /root/allgames-list ] && rm /root/allgames-list
for dir in `ls /usr/ports/games`
 do
  echo games/$dir >> /root/allgames-list
done

My script to create the gross bulk list as well as lists divided into categories of what ports are installed is a bit larger and provides more feedback than most of my scripts.  It was quieter but I decided that it is nice to know what its doing rather than possibly failing, so more of my newer or re-written scripts include a bit more echoes.  You may notice in this script (below) that I specifically exclude the various llvm ports from the bulk list.  These I won't ever need built as non-dependent ports so I expect that poudriere or pkg would draw them in automatically.  This also eliminates the chance that I would have multiple versions of llvm in any bulk list which could become outdated and unneeded.  The blacklist can further eliminate old versions of llvm which could be dependencies but probably ought to be newer versions when upstream for those ports finally get to that task.

#!/bin/sh
echo "Clearing /var/tmp p-keglist files.."
rm /var/tmp/installed-pkgs-gross 2>/dev/null &&echo -n "."
rm /var/tmp/installed-pkgs-gross-added 2>/dev/null &&echo -n "."
rm /var/tmp/installed-pkgs-gross-sorted 2>/dev/null &&echo -n "."
rm /var/tmp/installed-pkgs-ungamed 2>/dev/null &&echo -n "."
rm /var/tmp/installed-pkgs-* 2>/dev/null &&echo -n "."
echo;echo "--"; echo


echo "Backing up installed-gross list to /var/tmp"
cp ~/installed-pkgs-gross /var/tmp/installed-pkgs-gross.backup
echo;echo "--"; echo


echo "Gathering list of installed pkgs.."
pkg origin >> /var/tmp/installed-pkgs-gross
echo;echo "--"; echo


echo "Organizing the list.."
cat /var/tmp/installed-pkgs-gross | sort -d | sort -u >> /var/tmp/installed-pkgs-gross-added &&echo -n "."
cat /var/tmp/installed-pkgs-gross-added | sed -E 's:devel\/llvm[0-9]*::'| sort -u -d > /var/tmp/installed-pkgs-gross-sorted &&echo -n "."
mv /var/tmp/installed-pkgs-gross-sorted /var/tmp/installed-pkgs-gross &&echo -n "."
cp /var/tmp/installed-pkgs-gross ~ &&echo -n "."
echo;echo "--"; echo


echo "Dividing the list.."
category=0

for portorigin in `cat /var/tmp/installed-pkgs-gross-added`
do
category=`echo $portorigin | cut -d / -f 1`
echo $portorigin >> /var/tmp/installed-pkgs-$category

echo $category $portorigin
if ! [ "$category" = "games" ] ; then
echo $portorigin >> /var/tmp/installed-pkgs-ungamed
fi
done
echo;echo "--"; echo


rm /var/tmp/installed-pkgs-gross-added 2>/dev/null

echo "Finalizing and checking list sizes, one looong moment.."
for listfile in `ls -1 /var/tmp/installed-pkgs-*`
do
wc -l $listfile |sed -e 's:\/var\/tmp\/::'
done

cp /var/tmp/installed-pkgs-* ~
echo;echo "--"; echo

I had noticed that my bulk list constructing script seemed to be including duplicates while my intent at that time had been to maintain a list of what had been installed which had newer items added.  I want to keep track of the things I consistently have installed on my system but which due to some upgrade might be left out due to becoming uninstalled (unintentionally).  During that moment if I were to create the bulk list, those items which I didn't truly want removed from my system would not be included in my bulk list.  My solution may have been faulty, to add-to my bulk list, which caused the duplicates in the bulk listings.  This is why I include a little bit of an attempt to remove possible duplicate lines.  There is also a bulk list which excludes games because those might not be what is most important at the time.

Now that the bulk lists exist, one could issue the following command for their poudriere build process poudriere bulk -j 14amd64 -f `p-keg-deblack installed-pkgs-games` with some small explanation that the "installed=pkgs-games" is the bulk list preceded with -f to indicate to poudriere to take the list from a file.  The "p-keg-deblack" is a script mentioned prevously which filters blacklisted items before sending the list to poudriere, it acts upon the bulk list and the content within the ` characters is seen by poudriere as "installed-pkgs-games-deblack" which is a new file it created.  The -j indicates the poudriere jail that it will use for building.  The blacklist can be crafted how ever you wish, my own and a revised p-keg-deblack script is shown in a previous blog post, Working on a blacklist which may be something you could use, however, Essential caveat: Use this script at your own risk, I make no promises.

Working on a blacklist

The ports-mgmt tool poudriere as a local package builder for installing built ports on the same system is a pretty efficient and effective tool nearly all of the time.  It seems that the default or more well-known method is to build everything in the entire ports tree, surely because the primary or initial intent of this tool was for that particular task.  Whether you use a subset with the -f option and a filename of listed port origins, or use that default massive build, you will be able to get some scrutiny on the builds via poudriere's testing, and bunch of ports will be added to your repository.  It will also build multiple ports in rough parallel which speeds the whole process.  Sometimes even when you give it up to the four or six processor cores worth of builds to do at the same time, it will drop to fewer because a larger dependency like llvm or rust is needed as an update for further ports depending on those.  The file list option I mention is one way to determine what is built, but you can more forcefully deny other things from being built by creating a blacklist.

A blacklist for poudriere is simply a listing of port origins in a file and can include comments or further organization any way you wish.  This file is created and placed in the poudriere directory.  The manpage describes the required filename:

   Blacklist ports
     You can also specify a blacklist which will disallow the lists port
     origins from building on the matched jail. Any of the following are
     allowed and will all be used in the order shown:

           /usr/local/etc/poudriere.d/blacklist
           /usr/local/etc/poudriere.d/<setname>-blacklist
           /usr/local/etc/poudriere.d/<tree>-blacklist
           /usr/local/etc/poudriere.d/<jailname>-blacklist
           /usr/local/etc/poudriere.d/<tree>gt;-<setname>-blacklist
           /usr/local/etc/poudriere.d/<jailname>-<tree>-blacklist
           /usr/local/etc/poudriere.d/<jailname>-<setname>-blacklist
           /usr/local/etc/poudriere.d/<jailname>-<tree>-<setname>-blacklist

     If QEMU is being used then a special qemu blacklist is also loaded.
           /usr/local/etc/poudriere.d/qemu-blacklist

I have been using the jailname option as this is how I have been building my ports, I have not looked deeper into the other methods yet.  My jail is 14amd64, this means the proper path for my blacklist is /usr/local/etc/poudriere.d/14amd64-blacklist and below is what mine looks like at present.

# Doesn't exist
devel/libtar

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  oddness with py39 something issue			#
#_______________________________________________________#
graphics/lensfun


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  these presently fail					#
#_______________________________________________________#
games/wesnoth
games/abstreet
games/opendungeons
games/jinput
graphics/ocaml-images
emulators/wine
www/py-aiohttp
devel/opengrok
games/DDNet
games/libretro-fbneo
www/nspluginwrapper
games/orthorobot


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Try to use version 7 and avoid 6			#
#_______________________________________________________#
graphics/ImageMagick6
graphics/ImageMagick6-nox11


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  use 17 rather than 16 or others.			#
#_______________________________________________________#
www/node16


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  These do not exist in ports				#
#_______________________________________________________#
#sysutils/pcbsd-libsh
#x11-fonts/font-bitstream-speedo
#x11-fonts/fontconfig-reference
#x11-wm/fvwm-crystal
net/libmms


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Expired/Deprecated/Unsupported upstream		#
#_______________________________________________________#
multimedia/schroedinger


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Except when using testport Build outside poudriere	#
# minetest fork of irrlicht does not conflict		#
#_______________________________________________________#
games/minetest-dev
games/minetestmapper-dev
x11-toolkits/irrlicht-minetest
x11-wm/fvwm3-dev
graphics/feh-dev
graphics/libthorvg
games/lutris-freebsd
games/eternallands-dev
games/eternallands-data
databases/dbeaver-dev
devel/distcc-dev


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Build without poudriere: tigersharke/Ported_Software #
#_______________________________________________________#
games/el
games/el-data
games/minetest
games/minetestmapper
games/minetest_game
net/libmms
audio/easytag
x11-toolkits/irrlicht
x11-wm/fvwm3
graphics/feh
games/lutris
graphics/libthorvg
games/godot-dev
games/ryzomcore
games/eternallands-data
databases/dbeaver-dev


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  avoid bulk build of these silly things		#
# These or others get added by bulk list creation	#
#_______________________________________________________#
games/pink-pony
games/cowsay
games/neo-cowsay
games/xcowsay
games/coffeebreak
games/powdertoy
games/powder-toy
games/powdertoy-devel
games/powder-toy-devel
games/sex
games/weebsay


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  builds but doesn't work				#
#_______________________________________________________#
games/excido


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  toggle these - often cause troubles or take FOREVER	#
#_______________________________________________________#
#games/veloren-weekly
#games/veloren
#www/firefox
#lang/rust
lang/rust-nightly
#x11-fonts/iosevka
#lang/rust-bootstrap
#devel/efl
#x11-wm/enlightenment
#devel/rust-cbindgen


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  conflicts in port or its depends			#
#_______________________________________________________#
java/jmf
devel/typetools
games/openarena
games/slade
games/golly
games/gnubik
games/openmw


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Try to force more current version of llvm 		#
#  Discover what breaks and adjust accordingly.		#
# first is "default" version, unversioned		#
#							#
# favoring llvm13					#
#_______________________________________________________#
#devel/llvm
#devel/llvm17@default
#
devel/llvm70
devel/llvm80
devel/llvm90
devel/llvm10
devel/llvm11
devel/llvm12
#
#devel/llvm13
devel/llvm14
devel/llvm15
devel/llvm16
#devel/llvm17
#devel/llvm-devel
#devel/ccache


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  This built with python39 not 38 as makefile expects	#
#							#
# Need to make a Ported_Software build for it		#
#_______________________________________________________#
#www/bluefish


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Should be no need for these at all due to git	#
#_______________________________________________________#
devel/subversion
devel/p5-subversion


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  these fail due to ruby default			#
#_______________________________________________________#
#accessibility/rubygem-atk
#archivers/rubygem-rubyzip
#devel/git@tiny
#devel/rubygem-cairo-gobject
#devel/rubygem-gettext
#devel/rubygem-gio2
#devel/rubygem-glib2
#devel/rubygem-gobject-introspection
#devel/rubygem-highline
#devel/rubygem-json_pure
#devel/rubygem-locale
#devel/rubygem-manpages
#devel/rubygem-native-package-installer
#devel/rubygem-optimist
#devel/rubygem-paint
#devel/rubygem-pkg-config
#devel/rubygem-rake
#devel/rubygem-thor
#devel/ruby-sdl
#editors/neovim
#games/freecell-solver
#games/jaggedalliance2
#games/magicmaze
#games/ninix-aya
#games/rubygem-fortune_gem
#games/rubygem-lolcat
#games/rubygem-vimgolf
#graphics/rubygem-cairo
#graphics/rubygem-gdk_pixbuf2
#graphics/rubygem-opengl
#math/rubygem-narray
#multimedia/rubygem-gstreamer
#textproc/rubygem-asciidoctor
#textproc/rubygem-charlock_holmes
#textproc/rubygem-text
#x11-toolkits/rubygem-gdk3
#x11-toolkits/rubygem-gtk3
#x11-toolkits/rubygem-pango


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Openoffice 						#
#_______________________________________________________#
editors/openoffice-4
editors/openoffice-devel
java/bootstrap-openjdk6
math/suitesparse


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# According to vigra comment: 				#
# Using py-NumPY implies Fortran and GCC 4.7+ as hard 	#
# dependencies and require all ports, depending on 	#
# vigra, to set USE_GCC=yes				#
#							#
# So lets avoid py-numpy				#
#_______________________________________________________#
#math/py-numpy
graphics/vigra


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Dependent upon py-numpy via math/suitesparse		#
#_______________________________________________________#
games/freeorion


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  unexplained dependency on openjdk7 which fails build #
#_______________________________________________________#
java/openjdk7
java/bootstrap-openjdk6
#
#math/cgal
#math/suitesparse
#math/eigen3

devel/apr1
#databases/db5
textproc/redland
www/serf


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  mesa-libs conflicts with libglvnd?			#
#_______________________________________________________#
#graphics/libglvnd


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# complicates the issue?				#
#_______________________________________________________#
#graphics/linux-c7-libglvnd


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  avoid colord						#
#_______________________________________________________#
graphics/colord


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  dbus dependent -- GNOME - not a necessary dependency #
#_______________________________________________________#
#devel/dconf


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Until dependencies fixed in official Makefile	#
#  Use home/tigersharke/Ported_Software instead		#
#_______________________________________________________#
sysutils/dunst


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  lets avoid dbus -- it sucks but allowing for now	#
#_______________________________________________________#
#devel/dbus
#devel/dbus-glib


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  dbus dependent so no need for them - subset likely	#
#_______________________________________________________#
#accessibility/at-spi2-atk
# accessibility/at-spi2-core
#net/avahi-app
#net/avahi-libdns
#sysutils/bsdisks
#x11/compton-conf
#sysutils/consolekit2
#devel/dconf
#x11-toolkits/kf5-attica
#devel/kf5-kauth
#devel/kf5-kbookmarks
#x11-toolkits/kf5-kcompletion
#devel/kf5-kconfig
#x11-toolkits/kf5-kconfigwidgets
#devel/kf5-kcrash
#devel/kf5-kdbusaddons
#x11/kf5-kded
#devel/kf5-kdoctools
#x11/kf5-kglobalaccel
#x11-toolkits/kf5-kguiaddons
#devel/kf5-ki18n
#x11-themes/kf5-kiconthemes
#x11-toolkits/kf5-kitemviews
#x11-toolkits/kf5-kjobwidgets
#devel/kf5-kservice
#x11-toolkits/kf5-ktextwidgets
#x11/kf5-kwayland
#x11-toolkits/kf5-kwidgetsaddons
#x11/kf5-kwindowsystem
#x11-toolkits/kf5-kxmlgui
#textproc/kf5-sonnet
#security/libgnome-keyring
#x11/lumina-coreutils
#sysutils/polkit
#sysutils/polkit-qt
#sysutils/polkit-qt-1
#devel/py39-dbus
#devel/py39-qt5-dbussupport
# devel/qt5-dbus
# x11-toolkits/qt5-declarative
#graphics/qt5-graphicaleffects
# x11-toolkits/qt5-gui
#graphics/qt5-imageformats
#multimedia/qt5-multimedia
#graphics/qt5-opengl
# print/qt5-printsupport
#accessibility/qt5-speech
# graphics/qt5-svg
# x11-toolkits/qt5-uiplugin
# devel/qt5-uitools
#graphics/qt5-wayland
# x11-toolkits/qt5-widgets
#x11/qt5-x11extras


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Since qt5-core has no config, and requires dbus as	#
# well as accessibility/at-spi2-core			#
#_______________________________________________________#
#devel/qt5-core


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Dependent upon math/suitesparse			#
#_______________________________________________________#
#devel/boost-python-libs


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# kerberos or heimdal or gssapi stuff not needed	#
#_______________________________________________________#
net-mgmt/nagstamon
net/rubygem-omniauth-kerberos
security/cyrus-sasl2-gssapi
#security/heimdal
security/krb5-appl
security/krb5-devel
security/p5-Authen-Krb5
security/p5-Authen-Krb5-Simple
security/p5-Authen-Simple-Kerberos
security/p5-GSSAPI
security/p5-Heimdal-Kadm5
security/pam_krb5
security/py-flask-kerberos
security/py-gssapi
security/py-kerberos
security/py-pywinrm
security/py-requests-kerberos
security/rubygem-gssapi
www/gitlab-ce
www/mod_auth_gssapi
www/mod_auth_kerb2


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Unmaintained and dead upstream, 			#
#	does not build with -fno-common (llvm 11)	#
#_______________________________________________________#
#games/bomberinstinct
#games/bygfoot
#games/cavezofphear
games/cosmo
games/cre
games/drm


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# avoid this as luajit-openresty is preferred		#
# -- conflicts with luajit				#
#_______________________________________________________#
lang/luajit
lang/luajit-devel


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Build outside of ports until luajit-openresty default #
#_______________________________________________________#
games/catesc
games/freeminer-default
games/freeminer
games/instead
games/mari0
games/minerbold
games/minetest_game
games/minetest
games/naev
games/powder-toy
games/solarus-quest-editor
games/solarus
games/voadi


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Avoid libressl of any variety on desktop, use openSSL	#
# libressl is fine on simpler systems like firewall but	#
# is NOT properly supported by software in general.	#
#_______________________________________________________#
security/libressl
security/libressl-devel
security/libressl*


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# conflicts with libressl-devel				#
#	but maybe avoid anyhow if possible		#
#_______________________________________________________#
#security/gnutls
#security/nettle


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# these things require gnupg -- no option visible	#
#_______________________________________________________#
#devel/kf5-kcmutils
#devel/kf5-kdeclarative
#devel/kf5-kio
#devel/kf5-knewstuff
#devel/kf5-knotifyconfig
#devel/kf5-kparts
#devel/libgdata
#games/kanagram
#games/khangman
mail/gmime30
misc/libkeduvocdocument
#multimedia/totem-pl-parser
net/gnome-online-accounts
security/gcr
#security/gpgme
#security/gpgme-cpp
#security/gpgme-qt5
#sysutils/kf5-kwallet
#x11/kf5-kactivities
#x11/kf5-kinit
x11/kf5-plasma-framework
#x11-toolkits/kf5-kirigami2


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# nettle dependents					#
#_______________________________________________________#
#devel/librest
#devel/libsoup
#devel/qca
#mail/gmime30
#multimedia/totem-pl-parser
#net/geoclue
#net/glib-networking
#net-im/gloox
#net/uhttpmock
#security/gnupg

#security/gnutls

#security/gpgme
#security/gpgme-cpp
#security/gpgme-qt5
#security/libgsasl
#sysutils/password-store
#sysutils/qtpass
#sysutils/tracker
#x11-toolkits/gnome-pty-helper
#x11-toolkits/vte


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# these things require nettle -- no option visible	#
#_______________________________________________________#
audio/audacity
audio/lollypop
#devel/appstream-glib
#devel/glade
#devel/libgdata
#devel/librest
#devel/libsoup
#games/0ad
#games/atomix
#games/diaspora
#games/four-in-a-row
#games/freedink
#games/freedink-dfarc
#games/gnome-2048
#games/gnome-chess
#games/gnome-nibbles
#games/gnome-robots
#games/gnome-sudoku
#games/golly
#games/hitori
#games/iagno
#games/megaglest
#games/pioneers
#games/quadrapassel
#games/trenchbroom
#games/wxlauncher
#graphics/gimp
#graphics/gimp-app
#graphics/gimp-data-extras
#mail/claws-mail
#mail/claws-mail-gdata
#mail/claws-mail-libravatar
#mail/claws-mail-litehtml_viewer
#mail/claws-mail-mailmbox
#mail/claws-mail-newmail
#mail/claws-mail-notification
#mail/claws-mail-rssyl
##multimedia/totem-pl-parser
#net/glib-networking
#net/gnome-online-accounts
#net-im/gloox
#net/uhttpmock
#print/gimp-gutenprint

#security/gnutls

#www/gtkhtml4
#www/webkit2-gtk3
#x11-fonts/cantarell-fonts
x11/gnome-desktop
#x11-toolkits/libhandy
#x11-toolkits/wxgtk30
#x11-toolkits/wxgtk31
#x11/yelp


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# git -- avoid other flavors				#
#_______________________________________________________#
devel/git@default
devel/git@gui
devel/git@lite
devel/git@svn
devel/git-default
devel/git-gui
devel/git-lite
devel/git-svn


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# avoid -- also dbus dependents				#
#_______________________________________________________#
accessibility/at-spi2-atk
#accessibility/at-spi2-core


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# accessibility/at-spi2-atk dependents without config	#
#_______________________________________________________#
devel/electron11
editors/vscode
www/chromium
x11/cinnamon
x11/gnome-shell
x11-toolkits/gtkada3


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# db5 issue 						#
#_______________________________________________________#
audio/jack


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  obslete and would need makefile changes to fix build	#
#_______________________________________________________#
graphics/osg34


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  osg34 dependent cannot build				#
#_______________________________________________________#


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Rebuild only with updated kernel/world		#
#  and maybe keep pkg locked in between times.		#
#_______________________________________________________#
emulators/virtualbox-ose
emulators/virtualbox-ose-kmod


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  talloc and tevent not needed -- ldap/samba focus	#
#_______________________________________________________#
devel/talloc
devel/tevent


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  openblas conflicts with netlib/cblas preferred	#
#_______________________________________________________#
math/openblas


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  openblas dependent cannot build			#
#_______________________________________________________#
biology/bolt-lmm
biology/gcta
biology/gemma
biology/plink
cad/gmsh
graphics/opencv
math/adept
math/ambit
math/armadillo
math/blaze
math/blazeiterative
math/casadi
math/ceres-solver
math/cminpack
math/coinutils
math/dbcsr
math/deal.ii
math/dune-common
math/dune-fem
math/dune-geometry
math/dune-grid
math/dune-pdelab
math/dune-polygongrid
math/dune-uggrid
math/dune-vtk
#math/eigen3
math/elemental
math/elpa
math/faiss
math/fflas-ffpack
math/flint2
math/freefem++
math/g2o
math/hmat-oss
math/iml
math/jags
math/lapack++
math/linbox
math/moab
math/octave
math/octave-forge-ltfat
math/openturns
math/osi
math/primme
#math/py-numpy
math/py-scs
math/qposases
math/sage
math/scalapack
math/scs
math/suitesparse
math/sundials
misc/mxnet
misc/openmvg
misc/visp
science/bagel
science/berkeleygw
science/chemps2
science/chrono
science/code_saturne
science/dalton
science/elk
science/elmerfem
science/erkale
science/gamess-us
science/iboview
science/lammps
science/latte
science/libcint
science/mpb
science/multiwfn
science/opensim-core
science/py-gpaw
science/py-phono3py
science/py-scipy
science/qiskit-aer
science/qmcpack
science/simbody
science/xtb

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Avoid all nvidia -- hidden deps			#
#_______________________________________________________#
graphics/nvidia-texture-tools
net-mgmt/nvidia_gpu_prometheus_exporter
x11/linux-nvidia-libs*
#x11/linux-nvidia-libs-304
#x11/linux-nvidia-libs-340
#x11/linux-nvidia-libs-390
x11/nvidia-driver*
#x11/nvidia-driver-304
#x11/nvidia-driveR-340
#X11/nvidia-driver-390
x11/nvidia*
#x11/nvidia-settings
#x11/nvidia-xconfig


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  Avoid all nvidia -- hidden deps			#
#_______________________________________________________#
x11-drivers/xf86-video-scfb


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  fails when fontforge fails				#
#_______________________________________________________#
#x11-fonts/oxygen-fonts


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  deprecated version of python 2.7			#
#_______________________________________________________#
lang/python27


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  python27 dependent cannot build			#
#_______________________________________________________#
devel/py-backports.functools_lru_cache
graphics/gif2png
devel/godot2
lang/cython@py27
devel/py-enum34
devel/py-future@py27
devel/py-game_sdl2@py27
net/py-ipaddress
devel/py-setuptools@py27
x11-toolkits/py-tkinter@py27
devel/scons@py27
net/py-ipaddress
#
devel/electron13
devel/py-setuptools44
dns/py-dnspython1
games/renpy
lang/python2
mail/mailman
mail/mailman-exim4
mail/mailman-postfix
sysutils/uefi-edk2-bhyve-csm
www/moinmoin
www/qt5-webengine


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  license confirmation needed				#
#_______________________________________________________#
games/taipan
games/tyrian-data
games/linux-unigine-valley
games/primateplunge
games/linux-unigine-heaven
games/minecraft-server
games/rawgl
games/steelstorm
games/mtaserver
games/goonies


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  cdrom or mount of cdrom needed			#
#_______________________________________________________#
games/HeroesOfMightAndMagic
games/jaggedalliance2
games/kodi-addon-game.libretro.genplus
games/kodi-addon-game.libretro.pcsx-rearmed
games/kodi-addon-game.libretro.picodrive
games/linux-quake4
games/linux-ssamtse
games/linux-ssamtfe
games/linux-unrealgold
games/linux-ut



#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  i386 only or fails on amd64				#
#_______________________________________________________#
#devel/bennugd-core
games/q3cellshading
games/quake3
games/lmpc
games/doom


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  run depends						#
#_______________________________________________________#
emulators/i386-wine-devel


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  stupid dependencies					#
#_______________________________________________________#
games/valyriatear
games/eboard
games/foobillard
games/xconq


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  stupid nvidia textures dependency			#
#_______________________________________________________#
games/xray_re-tools


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  fetch - config issue (missing file via option)	#
#_______________________________________________________#
games/quake2-extras


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  stage - broken due to missing file			#
#_______________________________________________________#
#games/odamex


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  depends upon broken love				#
#_______________________________________________________#
#games/mari0
#games/gunfudeadlands


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  broken due to sdl12 & opengl includes in source	#
#_______________________________________________________#
devel/love07
devel/love08


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  investigation needed					#
#_______________________________________________________#
#devel/godot2


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  dependencies already blacklisted			#
#_______________________________________________________#


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  metaport fails due to blacklisted component		#
#_______________________________________________________#
#games/gnome-games

Lots of text, many comments.  I have changed my mind about building and installing various things, used the standard ports tree for most and chose custom ones for others.  Eventually if I take the time, I might better understand what some of the other poudriere build methods mean, and possibly could gain a bit more flexibility with how I bulk build via my lists.

There is no other need except to create and properly place the blacklist file, it is found without an added commandline option, but for me, I would issue poudriere bulk -j 14amd64 -f `p-keg-deblack installed-pkgs-gross` because I discovered that poudriere would cull them as part of its initial process.  I believe that there is no need to send a list of files which may include blacklisted items, so I pre-remove them from the initial list.  This alleviates a little of the extra, but poudriere will still use the blacklist file if there still remain hidden among dependencies things I do not desire built.

The p-keg-deblack script is described in a prior blog post, poudriere blacklist filter but I had since revised it as below:

#!/bin/sh
rm ~/$1-deblack 2>/dev/null
rm /var/tmp/cleaned_blacklist 2>/dev/null
rm /var/tmp/list 2>/dev/null
rm /var/tmp/sorted_list 2>/dev/null
cp $1 /var/tmp/list
cat /var/tmp/list | sort -d -u > /var/tmp/sorted_list && rm $1 && cp /var/tmp/sorted_list $1
grep -v \# ~/Symbolic_Links/14amd64-blacklist | sort -d -u > /var/tmp/cleaned_blacklist

diff -B -w $1 /var/tmp/cleaned_blacklist | grep \< |sed  -e 's/^<\ //g' -e 's/---//g' -e '1d' > ~/$1-deblack

echo $1-deblack

I'll repeat myself as I said previously, Essential caveat: Use this script at your own risk, I make no promises.

Whether you simply use the blacklist mechanism within poudriere or pre-filter your file list with my script, either way there will be fewer ports built into packages in your repo.  There is no need for the whole circus including troupe of clowns to be handled by your system, if your purpose is a local repo for your own use and install.  I make larger bulk lists which may include all of the games or all of the fonts, and neither might all be installed, so I use the blacklist to avoid some I wouldn't use.  Those two bulk lists would be made directly from what is present in the ports tree while other things I install are based on what I do have installed already on my system.  Build your needed ports into installed packages through the use of poudriere, its a good tool for the average user when its limited to what you need rather than everything it might ordinarily act upon without a blacklist.

Sunday, March 10, 2024

Portclippy minetest finesse

I recently discovered another option that I left out of the exposed config for my unofficial minetest-dev port.  It is not much of a task to add another option but in the process of doing it I re-read some porter's handbook documentation (https://docs.freebsd.org/en/books/porters-handbook/testing/).  I was wondering how to test for correctness and whether all my dependencies were included.  I haven't had issues with building from my Makefile, although it warns that I may be including too many dependencies, things that it might not link to anyway.  These are only warnings, they could remain as is, though why not fix them, and I noticed mention of portclippy.

I've used portlint frequently and its direction has helped me correct flaws, including the most annoying "wrong linetype" issue when I copy-paste something and it converts from tabs to spaces.  This tool, portclippy is much more visual and makes the needed adjustments much more obvious.  Below is the output I had when I ran it on the minetest-dev Makefile.  The manpage describes "The output of portclippy is inspired by unified diff(1) output.  Here RUN_DEPENDS is in the wrong position (marked with -) and should be moved to before USES (marked with +)." which means there are a lot of line moves to do.

/usr/home/tigersharke/Ported_Software/games/minetest-dev # portclippy Makefile
# PORTNAME block
PORTNAME
DISTVERSION
CATEGORIES
PKGNAMESUFFIX
DISTNAME
DIST_SUBDIR

# Maintainer block
MAINTAINER
COMMENT
WWW

# License block
LICENSE

# Dependencies
LIB_DEPENDS

# USES block
USES

-CONFLICTS

USE_GITHUB
GH_ACCOUNT
GH_PROJECT
GH_TAGNAME
+USE_SDL

# USES=cmake related variables
CMAKE_ARGS

-USE_SDL
# Conflicts
+CONFLICTS

# WRKSRC block
WRKSRC

# Packaging list block
PORTDATA
PORTDOCS

# Options definitions
OPTIONS_DEFAULT
OPTIONS_GROUP
-OPTIONS_SINGLE
-OPTIONS_MULTI

-MISC_DESC

+OPTIONS_GROUP_BUILD
+OPTIONS_GROUP_DATABASE
OPTIONS_GROUP_MISC

-NEEDS_DESC

OPTIONS_GROUP_NEEDS

-SYSTEM_DESC

OPTIONS_GROUP_SYSTEM

-SOFTWARE_DESC

+OPTIONS_MULTI
OPTIONS_MULTI_SOFTWARE
+OPTIONS_SINGLE
+OPTIONS_SINGLE_GRAPHICS
+OPTIONS_SUB

# Options descriptions
+BUILD_DESC
+CLIENT_DESC
+CURL_DESC
+DATABASE_DESC
+DEVTEST_DESC
+DOCS_DESC
+EXAMPLES_DESC
+FREETYPE_DESC
+GLVND_DESC
+GRAPHICS_DESC
+LEGACY_DESC
+LEVELDB_DESC
+LTO_DESC
+MISC_DESC
+NCURSES_DESC
+NEEDS_DESC
+NLS_DESC
+PGSQL_DESC
+PROFILING_DESC
+PROMETHEUS_DESC
+REDIS_DESC
+SERVER_DESC
+SOFTWARE_DESC
+SOUND_DESC
+SPATIAL_DESC
+SYSTEM_DESC
+SYSTEM_FONTS_DESC
SYSTEM_GMP_DESC

-SYSTEM_GMP_CMAKE_BOOL
-SYSTEM_GMP_CMAKE_ON
-SYSTEM_GMP_LIB_DEPENDS

SYSTEM_JSONCPP_DESC

-SYSTEM_JSONCPP_CMAKE_BOOL
-SYSTEM_JSONCPP_CMAKE_ON
-SYSTEM_JSONCPP_LIB_DEPENDS

SYSTEM_LUAJIT_DESC

-SYSTEM_LUAJIT_USES

-SYSTEM_FONTS_DESC

-SYSTEM_FONTS_RUN_DEPENDS

-BUILD_DESC

-OPTIONS_GROUP_BUILD

-EXAMPLES_DESC

-EXAMPLES_CMAKE_BOOL

-DEVTEST_DESC

-DEVTEST_CMAKE_BOOL

+TOUCH_DESC
UNITTESTS_DESC

# Options helpers
-UNITTESTS_CMAKE_BOOL

-OPTIONS_SINGLE_GRAPHICS

-GRAPHICS_DESC
-GLVND_DESC

-GLVND_CMAKE_BOOL
-GLVND_CMAKE_ON
-GLVND_USE
-GLVND_LIB_DEPENDS

-LEGACY_DESC

-LEGACY_CMAKE_BOOL
-LEGACY_CMAKE_ON
-LEGACY_USE

-DATABASE_DESC

-OPTIONS_GROUP_DATABASE
-OPTIONS_SUB

-CLIENT_DESC

-CLIENT_CMAKE_BOOL_ON

CLIENT_LIB_DEPENDS
CLIENT_USES
CLIENT_USE

-SERVER_DESC

-SERVER_CMAKE_BOOL

-CURL_DESC

-CURL_CMAKE_BOOL
CURL_LIB_DEPENDS

-SOUND_DESC

-SOUND_CMAKE_BOOL

-DOCS_DESC

+CURL_CMAKE_BOOL
+DEVTEST_CMAKE_BOOL
DOCS_CMAKE_BOOL

-FREETYPE_DESC

-FREETYPE_CMAKE_BOOL
+EXAMPLES_CMAKE_BOOL
FREETYPE_LIB_DEPENDS

-NCURSES_DESC

-NCURSES_CMAKE_BOOL
-NCURSES_USES

-LEVELDB_DESC

-LEVELDB_CMAKE_BOOL
+FREETYPE_CMAKE_BOOL
+GLVND_LIB_DEPENDS
+GLVND_USE
+GLVND_CMAKE_BOOL
+GLVND_CMAKE_ON
+LEGACY_USE
+LEGACY_CMAKE_BOOL
+LEGACY_CMAKE_ON
LEVELDB_LIB_DEPENDS

-PGSQL_DESC

+LEVELDB_CMAKE_BOOL
+LTO_CMAKE_BOOL
+NCURSES_USES
+NCURSES_CMAKE_BOOL
+NLS_USES
+NLS_CMAKE_BOOL
+NLS_LDFLAGS
PGSQL_USES
PGSQL_CMAKE_BOOL

-REDIS_DESC

-REDIS_CMAKE_BOOL
+PROFILING_CMAKE_BOOL
+PROMETHEUS_CMAKE_BOOL
REDIS_LIB_DEPENDS

-SPATIAL_DESC

+REDIS_CMAKE_BOOL
+SERVER_CMAKE_BOOL
+SOUND_CMAKE_BOOL
SPATIAL_LIB_DEPENDS
SPATIAL_CMAKE_BOOL

-NLS_DESC

-NLS_CMAKE_BOOL
-NLS_USES
-NLS_LDFLAGS

-TOUCH_DESC

+SYSTEM_FONTS_RUN_DEPENDS
+SYSTEM_GMP_LIB_DEPENDS
+SYSTEM_GMP_CMAKE_BOOL
+SYSTEM_GMP_CMAKE_ON
+SYSTEM_JSONCPP_LIB_DEPENDS
+SYSTEM_JSONCPP_CMAKE_BOOL
+SYSTEM_JSONCPP_CMAKE_ON
+SYSTEM_LUAJIT_USES
TOUCH_CMAKE_BOOL
+UNITTESTS_CMAKE_BOOL

-PROMETHEUS_DESC

-PROMETHEUS_CMAKE_BOOL

-PROFILING_DESC

-PROFILING_CMAKE_BOOL

-LTO_DESC

-LTO_CMAKE_BOOL
# Unknown variables
# WARNING:
# The following variables were not recognized.
# They could just be typos or Portclippy needs to be made aware of them.
# Please double check them.
#
# Prefix them with an _ or wrap in '.ifnmake portclippy' to tell
# Portclippy to ignore them.
#
# If in doubt please report this on portfmt's bug tracker:
# https://codeberg.org/tobik/portfmt/issues
+CLIENT_CMAKE_BOOL_ON
/usr/home/tigersharke/Ported_Software/games/minetest-dev #

So it looks like I will need to scroll down to the first group of lines with the "-" prefix, and move them where the matching lines with the "+" prefix are in the file.  After quite a bit of cut and paste using vi, I have re-run portclippy for the results below.

/usr/home/tigersharke/Ported_Software/games/minetest-dev # portclippy Makefile
# PORTNAME block
PORTNAME
DISTVERSION
CATEGORIES
PKGNAMESUFFIX
DISTNAME
DIST_SUBDIR

# Maintainer block
MAINTAINER
COMMENT
WWW

# License block
LICENSE

# Dependencies
LIB_DEPENDS

# USES block
USES
USE_GITHUB
GH_ACCOUNT
GH_PROJECT
GH_TAGNAME
USE_SDL

# USES=cmake related variables
CMAKE_ARGS

# Conflicts
CONFLICTS

# WRKSRC block
WRKSRC

# Packaging list block
PORTDATA
PORTDOCS

# Options definitions
OPTIONS_DEFAULT
OPTIONS_GROUP
OPTIONS_GROUP_BUILD
OPTIONS_GROUP_DATABASE
OPTIONS_GROUP_MISC
OPTIONS_GROUP_NEEDS
OPTIONS_GROUP_SYSTEM
OPTIONS_MULTI
OPTIONS_MULTI_SOFTWARE
+OPTIONS_SINGLE
+OPTIONS_SINGLE_GRAPHICS
+OPTIONS_SUB

# Options descriptions
BUILD_DESC
CLIENT_DESC
CURL_DESC
DATABASE_DESC
DEVTEST_DESC
DOCS_DESC
EXAMPLES_DESC
FREETYPE_DESC
GLVND_DESC
GRAPHICS_DESC
LEGACY_DESC
LEVELDB_DESC
LTO_DESC
MISC_DESC
NCURSES_DESC
NEEDS_DESC
NLS_DESC
PGSQL_DESC
PROFILING_DESC
PROMETHEUS_DESC
REDIS_DESC
SERVER_DESC
SOFTWARE_DESC
SOUND_DESC
SPATIAL_DESC
SYSTEM_DESC
SYSTEM_FONTS_DESC
SYSTEM_GMP_DESC
SYSTEM_JSONCPP_DESC
SYSTEM_LUAJIT_DESC
TOUCH_DESC
UNITTESTS_DESC

# Options helpers
CLIENT_LIB_DEPENDS
CLIENT_USES
CLIENT_USE
CLIENT_CMAKE_ON
CURL_LIB_DEPENDS
CURL_CMAKE_BOOL
DEVTEST_CMAKE_BOOL
DOCS_CMAKE_BOOL
EXAMPLES_CMAKE_BOOL
FREETYPE_LIB_DEPENDS
FREETYPE_CMAKE_BOOL
GLVND_LIB_DEPENDS
GLVND_USE
GLVND_CMAKE_BOOL
GLVND_CMAKE_ON
LEGACY_USE
LEGACY_CMAKE_BOOL
LEGACY_CMAKE_ON
LEVELDB_LIB_DEPENDS
LEVELDB_CMAKE_BOOL
LTO_CMAKE_BOOL
NCURSES_USES
NCURSES_CMAKE_BOOL
NLS_USES
NLS_CMAKE_BOOL
NLS_LDFLAGS
PGSQL_USES
PGSQL_CMAKE_BOOL
PROFILING_CMAKE_ON
PROMETHEUS_CMAKE_BOOL
REDIS_LIB_DEPENDS
REDIS_CMAKE_BOOL
SERVER_CMAKE_BOOL
SOUND_CMAKE_BOOL
SPATIAL_LIB_DEPENDS
SPATIAL_CMAKE_BOOL
SYSTEM_FONTS_RUN_DEPENDS
SYSTEM_GMP_LIB_DEPENDS
SYSTEM_GMP_CMAKE_BOOL
SYSTEM_GMP_CMAKE_ON
SYSTEM_JSONCPP_LIB_DEPENDS
SYSTEM_JSONCPP_CMAKE_BOOL
SYSTEM_JSONCPP_CMAKE_ON
SYSTEM_LUAJIT_USES
TOUCH_CMAKE_BOOL
UNITTESTS_CMAKE_BOOL

-OPTIONS_SINGLE
-OPTIONS_SINGLE_GRAPHICS
-OPTIONS_SUB
/usr/home/tigersharke/Ported_Software/games/minetest-dev #

I have small personal objection to how the options are ordered, since I like to group them together with all parts for any config option.  This way I am more sure not to miss something and for me its easier to read.  Above is the portclippy output after I complied with all but three lines of its instruction, the comments are generated by the tool, any comments actually in the Makefile are ignored.  I added similar comments as this is my first time doing this and it may help me with other ports I attempt.  If I complied 100% with what portclippy wanted changed, it would not provide any output, no feedback needed.

This is a nice tool, it very visually helps get the Makefile organized for official ports, so it will help those new to the process perfect their skills with this part of the job.  I am not sure whether I would revert the options order to what I prefer.  I could pre-add incompletely filled lines (leave out the assigned values part) of any new option for all of the different sections even if some remain unused (or might not be filled) as a way to avoid missing any.

Sunday, March 28, 2021

Tool without fanfare

Due to our fairly recent VCS change and impending portsnap retirement, it is somewhat surprising that gitup was released to seemingly very little or no fanfare.  It might be used to solve the issue of svn being replaced by git for obtaining source, and both portsnap and svn for maintaining one's local ports tree.  It also is apparently even smaller or less dependency encumbered than git@tiny which should be a rather large positive for the average consumer as well as being quite simple to configure and use.

Firstly, the configuration file provided with the port when installed might need to be updated or modified to suit your needs.

# $FreeBSD$
#
# Default configuration options for gitup.conf.
# github.com/freebsd/freebsd-ports
#
# ${repo} can be replaced by doc, ports and src. (*)
#
# https://git.freebsd.org/${repo}.git
# ssh://anongit@git.freebsd.org/${repo}.git
# (*) In subversion, base is used for FreeBSD src repository (src).
{
        "defaults" : {
                "host"                  : "github.com",
                "port"                  : "443",
                "verbosity"             : "1",
                "work_directory"        : "/var/db/gitup",
        },

        "ports" : {
                "repository"            : "/freebsd/freebsd-ports.git",
                "branch"                : "main",
                "target"                : "/usr/ports",
                "ignores"               : [
                        "distfiles",
                        "packages",
                ],
        },

        "quarterly" : {
                "host"                  : "git.freebsd.org",
                "repository"            : "/freebsd/freebsd-ports.git",
                "branch"                : "quarterly",
                "target"                : "/usr/ports",
                "ignores"               : [
                        "distfiles",
                        "packages",
                ],
        },

        "release" : {
                "repository"            : "/src.git",
                "branch"                : "releng/12.2",
                "target"                : "/usr/src",
                "ignores"               : [
                        "sys/arm64/conf",
                        "sys/i386/conf",
                        "sys/pc98/conf",
                        "sys/powerpc/conf",
                        "sys/riscv/conf",
                        "sys/sparc64/conf",
                ],
        },

        "stable" : {
                "repository"            : "/src.git",
                "branch"                : "stable/13",
                "target"                : "/usr/src",
                "ignores"               : [
                        "sys/arm64/conf",
                        "sys/i386/conf",
                        "sys/pc98/conf",
                        "sys/powerpc/conf",
                        "sys/riscv/conf",
                        "sys/sparc64/conf",
                ],
        },
}

This is because, as we can see above, the defined aliases are no longer appropriate.  The present pending release is 13.0, and current is now 14, while stable is also 13.x, so this should be an easy adjustment.

There does not seem to be an option to simply show what the configured sections are but if one tries to initiate gitup with a bit of nonsense, the message will tell you and so now we can see how the above configuration works.

gitup blargh
gitup:
Cannot find a matching section in the command line arguments.  These are the configured sections:
         * ports
         * quarterly
         * release
         * stable
         * current
: Invalid argument

The short manpage gives further insight and tells of how it can be used to repair a repo and other things.

NAME
     gitup – A minimalist, dependency-free program to clone/pull Git
     repositories.

SYNOPSIS
     gitup section [-ckrV] [-C configuration file] [-h commit checksum]
           [-t tag] [-u pack file] [-v verbosity] [-w commit checksum]

DESCRIPTION
     gitup is a minimalist, dependency-free program used to clone or
     synchronize a local copy of a Git repository.  It is not intended to be a
     full-featured replacement for the devel/git port, but rather, is intended
     to provide a convenient way for users to update FreeBSD source files
     without having to install devel/git (and all of its related dependencies)
     and without the substantial disk overhead that normally accompany local
     Git repositories.

     gitup currently only supports anonymous, encrypted transfers via the
     "Smart HTTP" protocol.

OPTIONS
     Configuration options are stored in /usr/local/etc/gitup.conf and are
     grouped into commonly used sections (additional custom sections can be
     added to this file).  The following command line options can be used to
     override the default and/or section values:

     -C          The location of the configuration file to use.

     -c          Force gitup to clone the repository.

     -h          The "have" commit checksum of the repository to use.  Only
                 needed when importing a pack file generated by the official
                 Git client.

     -k          Save a copy of the pack data.

     -r          Repair the local repository, replacing any files that are
                 missing or have been modified.

     -t          Fetch the commit referenced by the specified tag.

     -u          Skip the download of the pack data and use the specified file
                 instead.

     -v          How verbose the output should be (0 = no output, 1 = show
                 only names of the updated files, 2 = also show commands sent
                 to the server and additional debugging information).

     -V          Display the version number and exit.

     -w          The "want" commit checksum of the repository to retrieve.

FILES
     /usr/local/etc/gitup.conf  Default location of the gitup configuration
                                file.

     /var/db/gitup              Default location where gitup stores its lists
                                of known files.  The files stored here are
                                used during subsequent runs to reconstruct the
                                local repository state and confirm that the
                                local tree is intact.

CAVEATS
     Because gitup neither uses nor updates the .git directory, it is not a
     drop-in replacement for the official Git client.  gitup should only be
     used on repositories originally cloned with the official Git client if
     there is no intention to ever use the official Git client on that local
     repository again.

     To keep its footprint as small as possible, gitup does not retain pack
     files downloaded from the repository (unless explicitly instructed to do
     so) and does not use a saved pack file (unless explicitly instructed to
     do so).  gitup relies on the known remote files lists stored in
     /var/db/gitup and the current state of the local repository to
     reconstruct data that would normally be stored in the pack file.
     Discrepancies in the local repository will be flagged as errors and gitup
     will attempt to any restore any missing or modified files from the
     server, returning the local repository to a clean state.

     Extra care should be given when specifying a commit to pull as gitup only
     performs shallow clones and does not have access to a repository's full
     commit history.  If a commit is passed in via the -w command line
     argument and that commit exists on a different branch, the Git server
     will neither object nor inform gitup of the branch change and will send a
     pack file that will convert the local repository.  If the change of
     branches is intentional, the relevant section in
     /usr/local/etc/gitup.conf will need to be manually updated.

EXAMPLES
     Using the configuration options for commonly used repositories/branches
     stored in /usr/local/etc/gitup.conf, to clone/pull a copy of the most
     recent revision of stable/12:

           gitup stable

     To retrieve a copy of freebsd-ports at commit
     0123456789abcdef0123456789abcdef01234567:

           gitup ports -w 0123456789abcdef0123456789abcdef01234567

SEE ALSO
     gitup.conf(5)

AUTHORS
     John Mehr  is the author of gitup and this man page.


What I like most about this tool is that by default it avoids repairs to the ports tree where I may have made modifications to Makefiles or hidden patch files or any other similar adjustments.  This way I can keep a slightly modified local ports tree which I can use to build individual ports (such as minetest) which I then explicitly blacklist for the poudriere repo pkg builds.  This requires that any pkg built and part of the poudriere repo is removed or a pkg upgrade will still see it.

The initial run, regardless of whether the repair option is used or a clean fresh ports tree is constructed by it, offers no feedback from this tool that it is doing anything and the processes or file transfers involved take quite a bit of time. I did enable maximum verbosity but that did not help, I would strongly recommend to the author that a spinning cursor or some other indication that the tool is doing something be added so that we know that our configuration is correct and we know everything is okay.  I am fine with things taking time to function (in this case about 14 minutes), to produce results, but silence is a killer as it makes me wonder and may cause me to end a process which is less than a second away from finally doing something visible.  The level of verbosity does not affect the 14 minutes of silence, only the output that follows it.  If this is used as part of an unattended script, I would recommend watching for results once outside of the script to be certain it acts as it should before hiding everything, or you may never know if anything is wrong such as an error in the configuration file.

FYI:

When the branch gets changed, which it has twice recently, first it shifted to main, and now its back to master once more, you may end up with an error should you have verbosity enabled for that repo. If you use poudriere, the message may appear similar to below, simply change it to what you might find is used at github/freebsd.

# Host: github.com
# Port: 443
# Repository: /freebsd/freebsd-ports.git
# Target: /usr/ports
# Have: 4010f7bbc03638d71781ce091bf40a0907fa12fe
# Want: 4010f7bbc03638d71781ce091bf40a0907fa12fe
# Branch: main
[00:00:00] Updating portstree "default" with git...fatal: couldn't find remote ref refs/heads/master

The solution for poudriere seems to be a bit overkill, but it is as follows below.

Delete the "default" ports tree:

poudriere ports -d

Re-create the "default" ports tree using branch=main by method=git. poudriere ports -c -B main -m git

Friday, March 12, 2021

Poudriere blacklist filter

Remember when I mentioned in a previous blog post how it seemed strange that the blacklist was not applied to the input file at the outset?  I have finally perfected a script which will do this with only minor adjustment to the poudriere commandline invocation.  Of course, file names, script names, may need adjustment to suit your environment or tastes.  Below is the relatively simple sh script named p-keg-deblack which does the work.

#!/bin/sh
rm /var/tmp/cleaned_blacklist 2>/dev/null
grep -v \# ~/Symbolic_Links/13amd64-blacklist | sort -d -u >> /var/tmp/cleaned_blacklist

diff $1 /var/tmp/cleaned_blacklist | grep \< |sed  -e 's/^<\ //g' -e 's/---//g' -e '1d' > ~/$1-deblack

echo $1-deblack

First, it removes any temporary files it had created, if none exist the error is silenced.  Your blacklist file for poudriere may include comment lines which would begin with # and so those are excluded by an inverted grep.  Since my build lists are all sorted in dictionary order with only unique lines, we treat the blacklist the same way, regardless of how it is actually organized, the output is placed in a temporary file.  Now we compare the build list with the cleaned blacklist.  Diff will place all the lines unique to each file preceded with a < or > depending upon which file, the first is on the left "<" and the second is on the right ">".  We want those lines which are only in the build list, so we grep all lines beginning with "<" then we remove "< " to prepare the list for poudriere.  The first line of the diff indicates where in the file that section begins, and there is another line "---" which we do not want.  We create a file with your input file name adding a suffix of -deblack.  When this script is used, all that poudriere will see is this filename with suffix we just created.

How do we use this script when we invoke poudriere?  This makes the process as unobtrusive as possible, we add one more word and two characters.  Normally we would do something like the following:

poudriere bulk -f installed-pkgs-Gross -j 13amd64 -J 2:16
However, to include the script we use the line below:
poudriere bulk -f `p-keg-deblack installed-pkgs-Gross` -j 13amd64 -J 2:16

Essential caveat: Use this script at your own risk, I make no promises.

Saturday, February 20, 2021

make doesn't config

Clearly something is broken but I do not know precisely how or exactly what.  All that I do know is that when I try to configure a port, by going to that port directory, such as for minetest, or use the command as below,

make -C /usr/ports/games/minetest config

all I get is this.

===> Options unchanged

I am not aware of any of the myriad of changes I have ever made to my system which would result in such a bizarre error.  My extensive make.conf permits me the ability to adjust options but it is a far more tedious method, especially since I must first look at the Makefile or freshports.org to parse out the possible options.

Prior to this recent very strange issue, I had another, which I may have partially resolved more by avoiding certain ports than by curing the weird dependency issue.  Yes, for surely the second time my system claims a vast number of dependencies which are inaccurate.  Previously it was rust which somehow gained the excess dependents and now it is openjdk7 which has remained wrong even with kernel and world update, and various attempts to solve the issue.  My seeming quasi-solution was to discover by close monitoring, which port was the first of the series which suddenly required openjdk7.  I also gathered the list of ports which failed when openjdk7 itself failed to build and by failing made it very easy to see all the dependents.  I then tweaked the option config for each of the ports in turn, and in the process also discovered that for ages I have had kerberos installed but never used.  The initial lynchpin was apr.  The additional peculiarity is that the dependency issue seems to somehow very strangely be limited to poudriere bulk port builds as individual semi-automated make builds seem to be immune in some way while even after succeeding outside of poudriere, within its jail the dependency issue remained.

So it is very likely that this whole dependency issue (attempts to repair it) is what provoked some other modification to my system which has finally broken my ability to configure ports the normal way within the ports tree.

I could say "the fun part about.." but I'm not sure this is really fun as it is rather frustrating and there doesn't seem to be any documentation about how to extricate my system from this pickle.  What is needed to be able to configure a port?  There is no such list, no steps to enable, nothing.  The same goes for my prior dependency issue, there is no tool or method to solve it or to reset the mess to get things working properly again.  Lucky for you, if I ever solve it for myself there will be this blog post to reference if you somehow manage to accidentally follow in my footsteps.

I cannot be certain yet if anything regarding the dependency issue has changed, but I discovered that I can obtain an index file by make -C /usr/ports fetchindex though when I attempted this it failed due I suspect to ssl or cert issues.  I simply used the url with fetch and adjusted for no ssl.  The file was obtained in bzip2 format so I unpacked it.  I used my recert alias which is set to make -C /usr/ports/security/ca_root_nss reinstall clean to update my local certs after.

Since I can survive tediously without the ability to adjust port configs the usual way, I am rebuilding all my ports with poudriere.  It seems that I may have squashed the openjdk7 dependency issue afterall, as there have not yet been 1200 skipped ports due to openjdk7 failing to build, thus proving it.  I could be wrong, but the series of skipped ports usually appeared near the beginning of the over 2000 port bulk build.  Once that finishes and the installed packages are updated/installed, I can resume beating my head against the 'make config' wall.

How about I list the things I know that I did to possibly resolve the dependency issue?  Maybe some or all of it caused the present issue.  In approximate order mostly:

  • removed the /var/db/ports directory
  • reinstalled as many ports as would successfully build (though my script iterated a list):
    make -C /usr/ports/port/origin install clean
  • erased the /var/db/pkg files: FreeBSD.meta, local.sqlite, poudriere.meta, repo-FreeBSD.sqlite, repo-poudriere.sqlite
  • removed the /usr/ports/INDEX-12 file
  1. reinstalled pkg
    make -C /usr/ports/ports-mgmt/pkg deinstall reinstall clean
  2. (rebootstrapped pkg)
    pkg bootstrap -f
  3. attempted to find missing dependencies
    pkg check -Ba
  4. re-created the poudriere repo:
    pkg repo /usr/local/poudriere/data/packages/13amd64-default
  5. updated /usr/src, rebuilt and reinstalled kernel and world
  6. updated the poudriere 13amd64 jail
  7. re-created the poudriere repo:
    pkg repo /usr/local/poudriere/data/packages/13amd64-default
  8. copied a fresh /etc/pkg.conf from /etc/pkg.conf.sample and revised it to match my former revised pkg.conf

I keep thinking (now) that the one thing I have not yet touched is also directly related to make, the /etc/make.conf but if it had some sort of syntax error surely it would be noticed, caught automatically by shell or make itself.  Once my latest round of poudriere bulk port builds are finished, I can stash the extensive make.conf and see if that solves the configuration issue.  The make.conf is copied to an appropriately named poudriere make.conf file name, so it could affect both methods of build somehow.  However, as well as I can remember, outside of the poudriere jail ports did not have inordinate dependence upon openjdk7.  Stashing the make.conf did not solve the issue.

Finally, I managed to type the right search terms which found an old FreeBSD forum post that helped solve my issue.

make -C /usr/ports/ports-mgmt/dialog4ports install clean

Exactly why ports-mgmt/dialog4ports is not a dependency somewhere, or automatically installed by make config in any port directory, or at least mentioned in man ports is a complete mystery to me.  Instead, it appears that I am blind, below is a subsection of man 7 ports.

     The following targets will be run automatically by each proceeding target
     in order.  That is, build will be run (if necessary) by install, and so
     on all the way to fetch.  Usually, you will only use the install target.

     config         Configure OPTIONS for this port using dialog4ports(1).

     fetch          Fetch all of the files needed to build this port from the
                    sites listed in MASTER_SITES and PATCH_SITES.  See
                    FETCH_CMD, MASTER_SITE_OVERRIDE and MASTER_SITE_BACKUP.

     checksum       Verify that the fetched distfile's checksum matches the
                    one the port was tested against.  If the distfile's
                    checksum does not match, it also fetches the distfiles
                    which are missing or failed the checksum calculation.
                    Defining NO_CHECKSUM will skip this step.

     depends        Install (or compile if only compilation is necessary) any
                    dependencies of the current port.  When called by the
                    extract or fetch targets, this is run in piecemeal as
                    fetch-depends, build-depends, etc.  Defining NO_DEPENDS
                    will skip this step.

     extract        Expand the distfile into a work directory.

     patch          Apply any patches that are necessary for the port.

     configure      Configure the port.  Some ports will ask you questions
                    during this stage.  See INTERACTIVE and BATCH.

     build          Build the port.  This is the same as calling the all
                    target.

     install        Install the port and register it with the package system.
                    This is all you really need to do.

     The following targets are not run during the normal install process.

     showconfig           Display OPTIONS config for this port.

     showconfig-recursive
                          Display OPTIONS config for this port and all its
                          dependencies.

     rmconfig             Remove OPTIONS config for this port.

     rmconfig-recursive   Remove OPTIONS config for this port and all its
                          dependencies.

     config-conditional   Skip the ports which have already had their OPTIONS
                          configured.

     config-recursive     Configure OPTIONS for this port and all its
                          dependencies using dialog4ports(1).

I would strongly recommend looking at the rest of the manpage, as you may discover other interesting capabilities as yet unknown.  In particular from the manpage for ports: did you know about showconfig or config-conditional?

Thursday, February 4, 2021

Configuring ports: an extensive make.conf

I may have mentioned before that I favor configuring my ports by maintaining a rather elaborate and extensive /etc/make.conf file.  It is always a good idea to include comments in any configuration file if there is a capability to have null or parser-ignored lines because this helps document for your future self or for sharing with others.  It is helpful to include any source url where the tip was found, including explanatory comments from other files such as those in the /usr/ports/Mk directory.  As this is fairly self-explanatory and my make.conf is heavily commented, I'll simply paste it below for your perusal.  With regard to the build process, the verbose make.conf will override any defaults given by the port Makefile which means that make rmconfig will revert the configuration options to those defined by the make.conf file instead of port defaults.  Long lines might not be nice for everyone but not an issue from an xterm window on my desktop, some options are grouped alphabetically for easier elimination of duplicates.

### 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.
###############################################################################################################################################################################################################################################################

#ALLOW_UNSUPPORTED_SYSTEM=true 
#DISABLE_VULNERABILITIES=yes

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# FreeBSD 13.x has many debugging features turned on, in both the kernel        #
# and userland.  These features attempt to detect incorrect use of              #
# system primitives, and encourage loud failure through extra sanity            #
# checking and fail stop semantics.  They also substantially impact             #
# system performance.  If you want to do performance measurement,               #
# benchmarking, and optimization, you'll want to turn them off.  This           #
# includes various WITNESS- related kernel options, INVARIANTS, malloc          #
# debugging flags in userland, and various verbose features in the              #
# kernel.  Many developers choose to disable these features on build            #
# machines to maximize performance.  (To completely disable malloc              #
# debugging, define MALLOC_PRODUCTION in /etc/make.conf                         #
#                                                                               #
# From /usr/src/UPDATING, #20200912:                                            #
#     The make.conf(5) MALLOC_PRODUCTION variable, used for disabling and       #
#     enabling assertions and statistics gathering in malloc(3), has been       #
#     migrated to a src.conf(5) WITH/WITHOUT_MALLOC_PRODUCTION option.          #
#                                                                               #
#     On stable branches, WITH_MALLOC_PRODUCTION is set by default, which       #
#     means that malloc(3) has assertions and statistics gathering disabled,    #
#     for improved performance.                                                 #
#                                                                               #
#     For backwards compatibility, the make.conf(5) MALLOC_PRODUCTION is still  #
#     honored, but it is now deprecated and undocumented.                       #
#MALLOC_PRODUCTION=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


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


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

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Universal DEFAULT versions					#
#_______________________________________________________________#

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Prefer libressl for all things, build ports against security/libressl		#
# libressl-devel is often too new for rust-nightly etc				#
#_______________________________________________________________________________#
OPENSSL_PORT=           security/libressl
DEFAULT_VERSIONS+=SSL=libressl

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Possible values: 60, 70, 80, 90, 10, 11, -devel 	#
# (to be used when non-base compiler is required)	#
#							#
# LLVM=10 may work but some ports struggle with it.	#
#_______________________________________________________#
DEFAULT_VERSIONS+=LLVM=11

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Default python versions  -- there is NO python 3.5	#
# and 3.7 was too new for devel/ninja			#
# Possible values: 2.7, 3.6, 3.7, 3.8, 3.9		#
#							#
# Below as of 1-12-21					#
#PYTHON_DEFAULT?=        3.7				#
# Possible values: 2.7					#
#PYTHON2_DEFAULT?=       2.7				#
# Possible values: 3.6, 3.7, 3.8, 3.9			#
#PYTHON3_DEFAULT?=       3.9				#
#_______________________________________________________#
DEFAULT_VERSIONS+=python3=3.9
DEFAULT_VERSIONS+=python=3.9

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# 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

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

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# make Linux infrastructure ports install mixed amd64/i386 CentOS 6 packages	#
#_______________________________________________________________________________#
DEFAULT_VERSIONS+=LINUX=c7

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  The graphics/jpeg port has been removed in favor of graphics/jpeg-turbo.	#
#  The former port was vulnerable and used an outdated ABI and API.		#
#										#
#  Please check your make configuration for JPEG_PORT and remove it or		#
#  set it to "jpeg-turbo" if it is currently set to "jpeg".			#
#_______________________________________________________________________________#
JPEG_PORT=graphics/jpeg-turbo

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

OPTIONS_UNSET+=A4 APE APPLEDEV ARCHDEF ATLAS AVX AVX2 
OPTIONS_UNSET+=BASH BONMIN BOOTSTRAP
OPTIONS_UNSET+=CCL CHEESE CHINESE CHROMECAST CMUCL CPACK CPU_CLIP
OPTIONS_UNSET+=DEBUG DEVD DTRACE 
OPTIONS_UNSET+=ECL EMACS_KEYS ENCODINGS ETERSOFT
OPTIONS_UNSET+=FAM FREERDP FRENCH 
OPTIONS_UNSET+=GCRYPT GEOCLUE GEOIP GEOLOC GLX GNOMEUI GNOMEVFS GPERFTOOLS GPOD GPS GPSD GRAPHITE GVFS 
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+=MARS MDNS MDNSRESPONDER METRIC MHASH MTPFS MTPZ MUPDF 
OPTIONS_UNSET+=NLS NTSC NVIDIA NVIT NVTHREADS 
OPTIONS_UNSET+=OPENBLAS OPENCV 
OPTIONS_UNSET+=PAL PERL_64BITINT PGSQL PSGHOSTSCRIPT PSHYBRID PULSEAUDIO PURPOSE 
OPTIONS_UNSET+=Q8BIT QPOASES QTWEBENGINE 
OPTIONS_UNSET+=RCC READLINE RUNROOT RUSSIAN RETEXTURE_FULL
OPTIONS_UNSET+=SAGE SAMBA SASL SCFB SMB SKYDRIVE SNDIO 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 ALSA ANY2DJVU AOM API APNG ARMOR ASM ASS AUDIO AUDIOCD AVAHI
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 COLORD COMPFACE COMPILER_RT COINMP CONFIG CONTRIB CPU_OPTS CRAFTY CRYPTO CRYPTOPP CUPS CURL 
OPTIONS_SET+=DBUS 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+=MAD 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 NOTIFY 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+=QT5 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
## added for vlc, check if other option elsewhere triggered too.
OPTIONS_SET+=KATE


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  * 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.		#
#_______________________________________________________________________________________________________#


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#  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    ####    #######   #######   ######    ######   ######    
####                                     ####      #######   #######   #######   ######   ######  
#############################################        #######   #######   #######   ######   ######


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# 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


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

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


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

.if ${.CURDIR:M*/ports/devel/json-glib}
OPTIONS_SET+=GIR
.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


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# freetype2 config					#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/print/freetype2}
  OPTIONS_UNSET+=DEBUG
  OPTIONS_SET+=V38 V40 TABLE_VALIDATION
.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 					#
#_______________________________________________________#

#.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


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# 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 VESA
  OPTIONS_UNSET+=NV SCFB
.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


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# libressl configuration				#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/security/libressl}
  OPTIONS_SET+=MAN3 NC
.endif
.if ${.CURDIR:M*/ports/security/libressl-devel}
  OPTIONS_SET+=MAN3 NC
.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


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

.if ${.CURDIR:M*/ports/security/openssh-portable}
  OPTIONS_UNSET+=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 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


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# 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.	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/www/node12}
  OPTIONS_SET+=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      #
# explicitly set GSSAPI_NONE				#
#_______________________________________________________#

OPTIONS_UNSET+=KERBEROS HEIMDAL MIT HEIMDAL_BASE KERB_GSSAPI GSSAPI_BASE GSSAPI_MIT 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		#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/ftp/curl}
  OPTIONS_UNSET+=OPENSSL LIBSSH2
  OPTIONS_SET+=GNUTLS RESOLV
.endif


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

.if ${.CURDIR:M*/ports/security/gnutls}
  OPTIONS_UNSET+=TPM
  OPTIONS_SET+=P11KIT
.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_SET+=BUNDLED_SSL
.endif

.if ${.CURDIR:M*/ports/devel/qca}
  OPTIONS_UNSET+=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


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

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



#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Optimizing and profiling fails build? and dbus too?	#
#_______________________________________________________#

.if ${.CURDIR:M*/ports/www/firefox}
  OPTIONS_UNSET+=PROFILE OPTIMIZED_CFLAGS DBUS
.endif

 
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# firefox issue with libressl via libevent		#
#_______________________________________________________#

.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


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# rust-nightly fails build -- newer libressl causes it	#
#_______________________________________________________#

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


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

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

# python27 (and other things) fails with libressl-devel


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# qscintilla oddness					#
# py-qt4 items needed API unset				#
# defunct -- removed					#
#_______________________________________________________#
 

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# mDNSResponder vs Avahi choose Avahi			#
#_______________________________________________________#

.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


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

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


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# damned wayland additions				#
# clearly this is love-hate for the system and have 	#
# flip-flopped on this.					#
#_______________________________________________________#

.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

Frequently viewed this week