Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix nightly manual

This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.

NAME

tix-port — download, patch, build, install, and clean a port

SYNOPSIS

tix-port [-C collection] [--build=triplet] [--cache-package] [--destination=directory] [--download-package] [--distclean] [--end=step] [--exec-prefix=prefix] [--generation=level] [--host=triplet] [--make=path] [--makeflags=makeflags] [--mirror=url] [--mirror-directory=directory] [--prefix=prefix] [--release-directory=directory] [--repository=directory] [--source-port=source-port] [--start=step] [--sysroot=directory] [--tar=path] [--target=triplet] [--tmp=directory] port

DESCRIPTION

tix-port manages the build of a port(5) of software for this operating system by downloading the source code, applying the patches, building the port, and installing the binary package. Many of the options are forwarded to the low-level tix-build(8) which performs the build once the source code has been prepared. tix-port is usually invoked through tix-metabuild(8), which builds multiple ports in the right order.
The mandatory port argument is the directory where the port's source code will be placed and the port(5) file is found by adding .port to this path. The downloaded upstream releases are placed in the created port.mirror cache directory, the source code is extracted in the port directory with the port.patch, port.execpatch, and port.rmpatch patches applied if they exist, and the port.version stamp file is created to avoid reextracting the port if the right version is already extracted.
The options are as follows:
--build=triplet
The platform triplet for the machine the port is built on. (Default: Automatically detected.)
--cache-package
Skip the build if the binary package already exists and is the right version.
-C, --collection=collection
Install the binary package into this collection created with tix-create(8). (Default: --sysroot plus --prefix)
--destination=directory
The binary package is placed inside this directory.
--distclean
Clean the port for distribution. Remove the extraction and all the metadata files. If DEVELOPMENT is true in the port(5), then emit a warning, and do nothing to avoid deleting any in-progress work.
--download-package
Download an existing binary package from the collection using tix-fetch(8) and use it if it is the right version as per --cache-package.
--end=step
Stop the build after this step:
start
The start step before anything has happened.
download
Download the source code.
extract
Extract the source code and apply patches.
tix-build-start
The start step in tix-build(8).
clean, pre-clean
Clean the source directory before the build.
configure
Configure the port.
build
Build the port.
install
Install the port into the DESTDIR.
post-install
Run the post-installation script.
post-clean
Clean the source code after the port.
package
Create the binary package.
tix-build-end
The end step in tix-build(8).
strip
Strip the executables in the binary package.
diff
Regenerate the patches if in development.
tix-install
Install the binary package.
end
The end step after everything has happened. (Default)
--exec-prefix=prefix
The prefix where architecture dependent files are installed. (Default: --prefix)
--generation=generation
Create a binary package in the format of this tix generation level. (Default: 3)
--host=triplet
The platform triplet for the machine the port will run on. (Default: --build)
--make=path
Which make(1) to use. (Default: MAKE if set and otherwise make(1))
--makeflags=makeflags
Override the MAKEFLAGS variable inherited by make.
--mirror=url
First attempt to download the upstream releases from the port's source code mirror at url before attempting the upstream site. The files are copied from the filesystem if the url has no schema.
--mirror-directory=directory
Place the downloaded upstream releases in this directory in the layout that can be used as a mirror for the --mirror option. (Default: port.mirror)
--prefix=prefix
Build the port into this prefix. (Default: The empty prefix designating the root directory)
--release-directory=release
Place the binary package inside the $release/repository/$host directory, if the --destination and --repository options are not set.
--repository=repository
Place the binary package inside the $repository/$host directory, if the --destination option is not set.
--source-port=source-port
The source code for the SOURCE_PORT per port(5) will be placed in the source-port directory along with the mirror and version file where the source port's file is found by adding .port to this path. (Default: ../$SOURCE_PORT/$SOURCE_PORT)
--start=step
Start the build at this step (see --end). (Default: start)
--sysroot=directory
The system root to use while building and installing the port. The toolchain is wrapped to transparently use this sysroot during the build.
--tar=path
Which tar(1) to use during the build. (Default: tar(1))
--target=triplet
The port's outputs targets this platform triplet. (Default: --host)
--tmp=directory
Place temporary files in this directory. (Default: TMPDIR if set otherwise /tmp)

EXIT STATUS

tix-port will exit 0 on success and non-zero otherwise.

EXAMPLES

A port(5) called proxyLoc(example).port with optional patches example.patch, example.execpatch, and example.rmpatch can be downloaded, extracted, patched, built and installed into the /local prefix for non-system software by running:
tix-create -C /local 
tix-port --prefix=/local example
This command makes a example directory with the patched source code, a example.version version stamp file to avoid unnecessary reextractions, a example.mirror cache directory with the downloaded upstream release, and the example.tix.tar.xz binary package, which is installed into /local. The --end=strip option can be used to just get the binary package (and not install it) by stopping after the binary package has been stripped.

SEE ALSO

port(5), development(7), porting(7), tix(8), tix-build(8), tix-create(8), tix-install(8), tix-metabuild(8), tix-uninstall(8)

HISTORY

tix-port originally appeared in Sortix 1.1 as a networked higher level interface around the lower level tix-build(8) from Sortix 0.8.
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org