MirPorts: The MirOS Ports Framework

The official MirPorts homepage can always be reached at http://mirbsd.de/ports which redirects to a "known working" mirror.

Installation instructions

BSD users

General

Please refer to the installer’s manual page for an invocation reference.

Special case: MirOS system-wide installation

On MirOS BSD, you can do the backwards-compatible

 $ cd /usr/ports
 $ make setup

as well (SUDO is invoked automatically).

Macintosh users

You might need the following commands. They assume the Bourne shell (GNU bash is pre-installed) as user shell; source SetEnv.csh if using the C shell (tcsh) instead. bash is still required to build, though.

 $ localbase=$HOME/.mpkg	# or something similarily sensible
 $ cd ports
 $ mkdir -p $localbase/bin
 $ MKSH=$localbase/bin/mksh bash Setup.sh -uel $localbase
 $ . $localbase/db/SetEnv.sh	# repeat each time you want to use it

MidnightBSD users

MidnightBSD support is very new, as of 2008-03-14, and currently lacks support for the “i386-unknown-midnightbsd0.2” gnutarget in most applications. This should not be that much a problem, as we have MirLibtool, which aids in 90% of the use cases. (Besides, we did the adjustments for MirBSD already, and sometimes even for ekkoBSD. It’s possible.)

You must first install perl from mports, which creates the /usr/bin/perl link required to run some code we inherited from OpenBSD and could not yet rewrite in non-perl.

There are two possible, recommended, methods of operation of the MirPorts Framework (mirports, not to confuse with mports, the native MidnightBSD ports tree) on MidnightBSD, both of which do not interact with mports or distract it:

MidnightBSD installation – system-wide

To install, execute the following commands as a user who has sudo(8) rights:

$ cd /usr
$ sudo mkdir mirports
$ sudo chown $(id -u) mirports
$ cvs -d anoncvs@anoncvs.mirbsd.org:/cvs co -d mirports ports
$ cd mirports
$ mksh Setup.sh -e

To build, you need a user with sudo(8) rights (and write permissions on /usr/mirports, possibly via UNIX® groups). Execute the following command to set up your environment, then proceed as below.

$ . /usr/mpkg/db/SetEnv.sh		# if you’re using ksh
% source /usr/mpkg/db/SetEnv.csh	# if you’re using csh

Note that the MirPorts Framework always uses the MirBSD Korn Shell internally to run command lines embedded in the Makefiles, configure scripts, etc. Since mksh lives as /bin/mksh in MidnightBSD, there is no need to install it; however, if a more recent version is available, you can upgrade it from shells/mksh; export MKSH=$LOCALBASE/mksh then (or overwrite the system’s copy).

To use the applications built, it is often enough to place /usr/mpkg/bin in one’s $PATH – however, we recommend to also use the “dot”/“source” command from above before running an application built via the MirPorts Framework.

If you do not wish to use mports, only MirPorts, and do not fear the wrath of ctriv ☺, you can add either the source/dot command or necessary variables to the system-wide /etc/profile so that all users can benefit from the applications supplied via MirPorts without additional hassle.

MidnightBSD installation – within $HOME

This is not different from the installation inside $HOME on other operating systems, like Darwin. The installer issues a warning about not using sudo(8), but you can’t or don’t need it since you’re using a private copy of the $LOCALBASE. On the other hand, many ports, like games/bsdgames, will either not work at all or force you to manually export SUDO=sudo before building. That’s the reason for the warning.

$ cd
$ cvs -d anoncvs@anoncvs.mirbsd.org:/cvs co -d mirports ports
$ cd mirports
$ mksh Setup.sh -uel ~/.mpkg

The dot/source commands read like this then:

$ . ~/.mpkg/db/SetEnv.sh		# if you’re using ksh
% source ~/.mpkg/db/SetEnv.csh		# if you’re using csh

The notes about environment variables from above apply here as well.

OpenBSD users

We do not currently know of anyone using MirPorts on OpenBSD, although it is destined to work there quite well, and not conflict with the OpenBSD ports tree. Please use the same commands as for Macintosh users above, except you can use ksh instead of bash for the Setup.sh invocation.

If you use MirPorts on OpenBSD and are willing to help us test, please drop an eMail to the miros-discuss@ mailing list. Thanks!

Using the MirPorts Framework

To be filled in...

Basically:

 $ cd /usr/ports/editors/joe
 $ mmake install clean
 $ echo export EDITOR=/usr/mpkg/bin/jupp >>~/.profile

Other useful commands:

Writing ports for the framework

To be filled in…

MirOS Logo