DEV Community

Alfonso Siciliano
Alfonso Siciliano

Posted on

portconfig

The FreeBSD Operating Systems provides the Ports Collection to allow a simple way for users and administrators to install applications, to know more https://www.freebsd.org/ports/.

It is possible to configure a port before the building and installation, ports-mgmt/dialog4ports is a well known TUI utility for the port options, unfortunately dialog4ports depends on non-permissive open source software. portconfig is a new utility to provide the same features of dialog4ports, it and its dependecies (bsddialog and ncurses) are completely permissive.

Getting Started:

$ git clone https://gitlab.com/alfix/portconfig.git
$ cd portconfig
$ make
Enter fullscreen mode Exit fullscreen mode

Now edit /usr/ports/Mk/bsd.commands.mk, comment DIALOG4PORTS and add the absolute path to portconfig:

...
#DIALOG4PORTS?= ${LOCALBASE}/bin/dialog4ports
DIALOG4PORTS?= /absolute/path/to/portconfig
...
Enter fullscreen mode Exit fullscreen mode

Now make config uses portconfig instead of dialog4ports*, for example:

# cd /usr/ports/editor/vim
# make config
Enter fullscreen mode Exit fullscreen mode

It is possible to customize portconfig via environment variables, for example to set the dialog4ports theme (properly dialog) with tcsh:

# env PORTCONFIGTHEME="dialog" make config
Enter fullscreen mode Exit fullscreen mode

Other variables:

  • D4PHEIGHT: hight (otherwise autosize)
  • D4PWIDTH: width (otherwise autosize)
  • D4PFULLSCREEN: fullscreen mode
  • D4PALIGNCENTER: align menu text to centre (default left)
  • D4PASCIILINES: draw borders with + - | charachters

Please NOTE: portconfig is under development and distributed without any warranty.

Project repository https://gitlab.com/alfix/portconfig,
Happy Hacking!

Top comments (0)