Blame etc/README.md

Lucio Andrés Illanes Albornoz 6d9a3c
> N.B. If you're interested in building Midipix using this script, please join
Lucio Andrés Illanes Albornoz 6d9a3c
the project's IRC channel #midipix on Freenode and ask for the address of the
Lucio Andrés Illanes Albornoz 6d9a3c
internal repositories required in order to build Midipix.
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "{{{ Table of contents"
Lucio Andrés Illanes Albornoz 6d9a3c
# Table of Contents  
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
1. [What is midipix, and how is it different?](#1-what-is-midipix-and-how-is-it-different)  
Lucio Andrés Illanes Albornoz 6d9a3c
2. [Building a midipix distribution](#2-building-a-midipix-distribution)  
Lucio Andrés Illanes Albornoz 23f3c2
	2.1. [Build-time dependencies](#21-build-time-dependencies)  
Lucio Andrés Illanes Albornoz 23f3c2
		2.1.1. [Alpine-specific notate bene](#211-alpine-specific-notate-bene)  
Lucio Andrés Illanes Albornoz 23f3c2
	2.2. [Deployment](#22-deployment)  
Lucio Andrés Illanes Albornoz 23f3c2
	2.3. [System requirements](#23-system-requirements)  
Lucio Andrés Illanes Albornoz 6d9a3c
3. [Common tasks](#3-common-tasks)  
Lucio Andrés Illanes Albornoz 23f3c2
	3.1. [Fault-tolerant & highly optimised 3D laser show-equipped usage screen](#31-fault-tolerant--highly-optimised-3d-laser-show-equipped-usage-screen)  
Lucio Andrés Illanes Albornoz 23f3c2
4. [Build variables](#4-build-variables)  
Lucio Andrés Illanes Albornoz 23f3c2
	4.1. [Package variables](#41-package-variables)  
Lucio Andrés Illanes Albornoz 23f3c2
5. [References](#5-references)  
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: "}}}"
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "{{{ 1. What is midipix, and how is it different?"
Lucio Andrés Illanes Albornoz 23f3c2
## 1. What is midipix, and how is it different?
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 2a4027
midipix is a development environment that lets you create programs
Lucio Andrés Illanes Albornoz 2a4027
for Windows using the standard C and POSIX APIs. No compromises made,
Lucio Andrés Illanes Albornoz 2a4027
no shortcuts taken.  
Lucio Andrés Illanes Albornoz 2a4027
  
Lucio Andrés Illanes Albornoz 2a4027
If you are interested in cross-platform programming that reclaims
Lucio Andrés Illanes Albornoz 2a4027
the notion of write once, compile everywhere; if you believe that the
Lucio Andrés Illanes Albornoz 2a4027
'standard' in the C Standard Library should not be a null signifier;
Lucio Andrés Illanes Albornoz 2a4027
and if you like cooking your code without #ifdef hell and low-level
Lucio Andrés Illanes Albornoz 2a4027
minutiae, then this page is for you.  
Lucio Andrés Illanes Albornoz 2a4027
  
Lucio Andrés Illanes Albornoz 6d9a3c
midipix makes cross-platform programming better, simpler and faster,
Lucio Andrés Illanes Albornoz 2a4027
specifically by bringing a modern, conforming C Runtime Library to the
Lucio Andrés Illanes Albornoz 2a4027
Windows platform. While the idea itself is not new, the approach taken
Lucio Andrés Illanes Albornoz 2a4027
in midipix to code portability is radically different from that found
Lucio Andrés Illanes Albornoz 2a4027
in other projects.  
Lucio Andrés Illanes Albornoz 2a4027
  
Lucio Andrés Illanes Albornoz 6d9a3c
*(reproduced from [\[3](#r3)])*
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[Back to top](#table-of-contents)
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: "}}}"
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "{{{ 2. Building a midipix distribution"
Lucio Andrés Illanes Albornoz 6d9a3c
## 2. Building a midipix distribution
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
A Midipix distribution consists of the following:
Lucio Andrés Illanes Albornoz 6d9a3c
* the native Midipix toolchain, consisting of perk, gcc, its dependencies,
Lucio Andrés Illanes Albornoz 6d9a3c
  and binutils,
Lucio Andrés Illanes Albornoz 6d9a3c
* musl, a lightweight, fast, simple, and free libc[\[1](#r1)] used by Midipix,
Lucio Andrés Illanes Albornoz 6d9a3c
* the Midipix runtime components that bridge the gap between the libc and the
Lucio Andrés Illanes Albornoz 6d9a3c
  executive subsystems of all Windows NT-derived Windows OS starting with and
Lucio Andrés Illanes Albornoz 6d9a3c
  including Windows XP, and
Lucio Andrés Illanes Albornoz 6d9a3c
* a steadily increasing number of 3rd party open source packages, as expected in
Lucio Andrés Illanes Albornoz 6d9a3c
  any modern POSIX-compliant \*nix environment, including GNU coreutils, shells,
Lucio Andrés Illanes Albornoz 6d9a3c
  libraries such as ncurses, libressl, as well as Perl and Python.
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 23f3c2
Install the build-time dependencies listed in section [2.1](#21-build-time-dependencies),
Lucio Andrés Illanes Albornoz 6d9a3c
clone this repository, and run the following command line:
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
```shell
Lucio Andrés Illanes Albornoz 6d9a3c
./build.sh -a nt64 -b release -D minipix,zipdist -P -v
Lucio Andrés Illanes Albornoz 6d9a3c
```
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
By default, the build will take place within ``${HOME}/midipix/nt64/release``
Lucio Andrés Illanes Albornoz 6d9a3c
and package archive files and/or Git repositores will be downloaded into
Lucio Andrés Illanes Albornoz 23f3c2
``${HOME}/midipix/dlcache``. Consult sections [3.1](#31-fault-tolerant--highly-optimised-3d-laser-show-equipped-usage-screen), [4](#4-build-variables), and [4.1](#41-package-variables)
Lucio Andrés Illanes Albornoz 2a4027
for the list of available build variables and how to override them.  
Lucio Andrés Illanes Albornoz 2a4027
Parallelisation is enabled by the above command line for both packages that
Lucio Andrés Illanes Albornoz 2a4027
can be built independently of each other and make(1) child processes via ``-j``,
Lucio Andrés Illanes Albornoz 2a4027
limited to the amount of logical processors on the build host divided by two
Lucio Andrés Illanes Albornoz 2a4027
(2).
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[Back to top](#table-of-contents)
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "}}}"
Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "{{{ 2.1. Build-time dependencies"
Lucio Andrés Illanes Albornoz 6d9a3c
### 2.1. Build-time dependencies
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
* **Alpine Linux**: binutils bzip2 cmake coreutils curl findutils g++ gawk gcc
Lucio Andrés Illanes Albornoz 6d9a3c
		    git grep gzip libc-dev linux-headers lzip make musl-dev
Lucio Andrés Illanes Albornoz 6d9a3c
		    net-tools patch perl perl-xml-parser procps sed tar
Lucio Andrés Illanes Albornoz 6d9a3c
		    util-linux wget xz zip
Lucio Andrés Illanes Albornoz 6d9a3c
* **Debian/-derived Linux**: binutils bzip2 clzip cmake coreutils curl findutils
Lucio Andrés Illanes Albornoz 6d9a3c
			     g++ gawk gcc git grep gzip hostname libc6-dev
Lucio Andrés Illanes Albornoz 6d9a3c
			     libxml-parser-perl lzma make patch perl procps sed
Lucio Andrés Illanes Albornoz 6d9a3c
			     tar util-linux wget xz-utils zip
Lucio Andrés Illanes Albornoz 6d9a3c
* **OpenSUSE Linux**: binutils bzip2 cmake coreutils curl findutils gawk gcc
Lucio Andrés Illanes Albornoz 6d9a3c
		      gcc-c++ git grep gzip hostname linux-glibc-devel lzip make
Lucio Andrés Illanes Albornoz 6d9a3c
		      patch perl perl-XML-Parser procps sed tar util-linux wget
Lucio Andrés Illanes Albornoz 6d9a3c
		      xz zip
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
> N.B. Busybox is not supported.
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[Back to top](#table-of-contents)
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "}}}"
Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "{{{ 2.1.1. Alpine-specific notate bene"
Lucio Andrés Illanes Albornoz 6d9a3c
#### 2.1.1. Alpine-specific notate bene
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
Some packages (*coreutils*, *grep*, and *tar*, among others) override Alpine's
Lucio Andrés Illanes Albornoz 6d9a3c
BusyBox utilities of the same name, as the latter are either non-conformant or
Lucio Andrés Illanes Albornoz 6d9a3c
defective.
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[Back to top](#table-of-contents)
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "}}}"
Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "{{{ 2.2. Deployment"
Lucio Andrés Illanes Albornoz 6d9a3c
### 2.2. Deployment
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
On successful completion of the build, a ZIP archive containing the Midipix
Lucio Andrés Illanes Albornoz 6d9a3c
distribution will be created. Extract its contents on the target machine, run
Lucio Andrés Illanes Albornoz 6d9a3c
``bash.bat``, and then ``/install.sh`` inside the resulting self-contained
Lucio Andrés Illanes Albornoz 6d9a3c
Midipix installation shell window.
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[Back to top](#table-of-contents)
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "}}}"
Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "{{{ 2.3. System requirements"
Lucio Andrés Illanes Albornoz 6d9a3c
### 2.3. System requirements
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
The following system requirements are assessed on build hosts equipped with the
Lucio Andrés Illanes Albornoz 6d9a3c
following hardware at minimum:
Lucio Andrés Illanes Albornoz 6d9a3c
* Intel(R) Xeon(R) CPU W3520 @ 2.67GHz (8 cores)
Lucio Andrés Illanes Albornoz 6d9a3c
* 7200 RPM SATA 3.1 HDD
Lucio Andrés Illanes Albornoz 6d9a3c
* 6 GB RAM
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 2a4027
| Target architecture | Build type | Distribution kinds selected | Average build time | Disk space required | Peak RAM usage |
Lucio Andrés Illanes Albornoz 2a4027
| ------------------- | ---------- | --------------------------- | ------------------ | ------------------- | -------------- |
Lucio Andrés Illanes Albornoz 2a4027
| nt64                | debug      | (none)                      | 2 hours            | 57.60 GB            | ? GB           |
Lucio Andrés Illanes Albornoz 2a4027
| nt64                | release    | (none)                      | 1 hours 45 minutes | 35.16 GB            | 1.52 GB        |
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
Package archive files and/or Git repositories additionally consume at least
Lucio Andrés Illanes Albornoz 6d9a3c
1.70 GB.
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
*(last update: Wed, 04 Mar 2020 14:07:26 +0000)*
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[Back to top](#table-of-contents)
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "}}}"
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "{{{ 3. Common tasks"
Lucio Andrés Illanes Albornoz 6d9a3c
## 3. Common tasks
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
Rebuild set of packages in isolation, along w/ their dependencies, if any, as
Lucio Andrés Illanes Albornoz 6d9a3c
needed, or forcibly, respectively:
Lucio Andrés Illanes Albornoz 6d9a3c
```shell
Lucio Andrés Illanes Albornoz 6d9a3c
./build.sh [ ... ] -r mc,zsh
Lucio Andrés Illanes Albornoz 6d9a3c
./build.sh [ ... ] -r \*mc,zsh
Lucio Andrés Illanes Albornoz 6d9a3c
./build.sh [ ... ] -r \*\*mc,zsh
Lucio Andrés Illanes Albornoz 6d9a3c
```
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
Restart the ``configure``, ``build``, and ``install`` steps of the ``coreutils``
Lucio Andrés Illanes Albornoz 6d9a3c
package.
Lucio Andrés Illanes Albornoz 6d9a3c
```shell
Lucio Andrés Illanes Albornoz 6d9a3c
./build.sh -r coreutils:configure,build,install
Lucio Andrés Illanes Albornoz 6d9a3c
```
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
Rebuild entire build group:
Lucio Andrés Illanes Albornoz 6d9a3c
```shell
Lucio Andrés Illanes Albornoz 6d9a3c
./build.sh [ ... ] -r ALL native_runtime
Lucio Andrés Illanes Albornoz 6d9a3c
```
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[Back to top](#table-of-contents)
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "}}}"
Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "{{{ 3.1. Fault-tolerant & highly optimised 3D laser show-equipped usage screen"
Lucio Andrés Illanes Albornoz 6d9a3c
## 3.1. Fault-tolerant & highly optimised 3D laser show-equipped usage screen
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
```
Lucio Andrés Illanes Albornoz 6d9a3c
usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-C dir[,..]] [-D kind[,..]] [-F ipv4|ipv6|offline]
Lucio Andrés Illanes Albornoz 6d9a3c
                  [-h] [-p jobs] [-P] [-r [*[*]]ALL|LAST|name[,..][:step,..]] [-R] [-v[v[v[v]]]]
Lucio Andrés Illanes Albornoz 6d9a3c
                  [--as-needed] [--debug-minipix] [<group>[ ..]]
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
        -a nt32|nt64      Selects 32-bit or 64-bit architecture; defaults to nt64.
Lucio Andrés Illanes Albornoz 6d9a3c
        -b debug|release  Selects debug or release build; defaults to debug.
Lucio Andrés Illanes Albornoz 6d9a3c
        -C dir[,..]       Clean build directory (build,) ${PREFIX} before processing build
Lucio Andrés Illanes Albornoz 6d9a3c
                          scripts (prefix,) source directory (src,) and/or destination directory
Lucio Andrés Illanes Albornoz 6d9a3c
                          (dest) after successful package builds.
Lucio Andrés Illanes Albornoz 6d9a3c
        -D kind[,..]      Produce minimal midipix distribution directory (minipix,) RPM binary
Lucio Andrés Illanes Albornoz 6d9a3c
                          packages (rpm,) and/or deployable distribution ZIP archive (zipdist.)
Lucio Andrés Illanes Albornoz 6d9a3c
                          zipdist implies minipix.
Lucio Andrés Illanes Albornoz 6d9a3c
        -F ipv4|ipv6|offline
Lucio Andrés Illanes Albornoz 6d9a3c
                          Force IPv4 (ipv4) or IPv6 (ipv6) when downloading package archives
Lucio Andrés Illanes Albornoz 6d9a3c
                          and/or Git repositories or don't download either at all (offline.)
Lucio Andrés Illanes Albornoz 6d9a3c
        -h                Show this screen.
Lucio Andrés Illanes Albornoz 6d9a3c
        -p jobs           Enables parallelisation at group-level, whenever applicable.
Lucio Andrés Illanes Albornoz 6d9a3c
        -P                The maximum count of jobs defaults to the number of logical
Lucio Andrés Illanes Albornoz 6d9a3c
                          processors on the host system divided by two (2.)
Lucio Andrés Illanes Albornoz 6d9a3c
                          If -R is not specified and at least one (1) package fails to build,
Lucio Andrés Illanes Albornoz 6d9a3c
                          all remaining package builds will be forcibly aborted for convenience.
Lucio Andrés Illanes Albornoz 6d9a3c
        -r [*[*]]ALL[:step,..]|LAST|name[,..][:step,..]
Lucio Andrés Illanes Albornoz 6d9a3c
                          Restart all packages/the specified comma-separated package(s)
Lucio Andrés Illanes Albornoz 6d9a3c
                          completely or at optionally specified comma-separated step(s)
Lucio Andrés Illanes Albornoz 6d9a3c
                          or restart the last failed package and resume build.
Lucio Andrés Illanes Albornoz 6d9a3c
                          Prepend w/ `*' to automatically include dependencies and `**' to
Lucio Andrés Illanes Albornoz 6d9a3c
                          forcibly rebuild all dependencies.
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
                          Currently defined steps are:
Lucio Andrés Illanes Albornoz 6d9a3c
                          fetch_wget, fetch_git, fetch_extract,
Lucio Andrés Illanes Albornoz 6d9a3c
                          configure_patch_pre, configure_autotools, configure_patch, configure,
Lucio Andrés Illanes Albornoz 6d9a3c
                          build,
Lucio Andrés Illanes Albornoz 6d9a3c
                          install_subdirs, install_make, install_files, install_libs, install, and install_rpm.
Lucio Andrés Illanes Albornoz 6d9a3c
        -R                Ignore build failures, skip printing package logs, and continue
Lucio Andrés Illanes Albornoz 6d9a3c
                          building (relaxed mode.)
Lucio Andrés Illanes Albornoz 6d9a3c
        -v[v[v[v]]]       Be verbose; -vv: always print package logs; -vvv: set xtrace during package builds; -vvvv: logs fileops.
Lucio Andrés Illanes Albornoz 6d9a3c
        --as-needed       Don't build unless the midipix_build repository has received new commits.
Lucio Andrés Illanes Albornoz 6d9a3c
        --debug-minipix   Don't strip(1) minipix binaries to facilitate debugging minipix.
Lucio Andrés Illanes Albornoz 2a4027
        <group>[ ..]      One of: dev_packages, dist, host_deps, host_deps_rpm, host_toolchain,
Lucio Andrés Illanes Albornoz 2a4027
                          host_tools, minipix, native_packages, native_runtime, native_toolchain,
Lucio Andrés Illanes Albornoz 2a4027
                          native_tools.
Lucio Andrés Illanes Albornoz 6d9a3c
```
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[Back to top](#table-of-contents)
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "}}}"
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 23f3c2
[//]: # "{{{ 4. Build variables"
Lucio Andrés Illanes Albornoz 23f3c2
## 4. Build variables
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
The following variables are primarily defined in ``midipix.env`` and may be
Lucio Andrés Illanes Albornoz 6d9a3c
overriden on a per-build basis on the command-line after the last argument,
Lucio Andrés Illanes Albornoz 6d9a3c
if any, e.g.:
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
```shell
Lucio Andrés Illanes Albornoz 6d9a3c
./build.sh -a nt64 -b release -D minipix,zipdist -P -v PREFIX_ROOT="${HOME}/midipix_tmp"
Lucio Andrés Illanes Albornoz 6d9a3c
```
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
Furthermore, ``${HOME}/midipix_build.vars``, ``${HOME}/.midipix_build.vars``,
Lucio Andrés Illanes Albornoz 6d9a3c
and/or ``../midipix_build.vars`` are sourced during build initialisation and
Lucio Andrés Illanes Albornoz 6d9a3c
may contain additional overrides, particularly ``${DEFAULT_GITROOT_HEAD}``.
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
| Variable name    | Default value                   | Description                                                                   |
Lucio Andrés Illanes Albornoz 6d9a3c
| ---------------- | ------------------------------- | ----------------------------------------------------------------------------- |
Lucio Andrés Illanes Albornoz 6d9a3c
| ARCH             | nt64                            | Target 32-bit (nt32) or 64-bit (nt64) architecture                            |
Lucio Andrés Illanes Albornoz 6d9a3c
| BUILD            | debug                           | Build w/ debugging (debug) or release compiler flags                          |
Lucio Andrés Illanes Albornoz 6d9a3c
| BUILD_DLCACHEDIR | ${PREFIX_ROOT}/dlcache          | Absolute pathname to package downloads cache root directory                   |
Lucio Andrés Illanes Albornoz 6d9a3c
| BUILD_WORKDIR    | ${PREFIX}/tmp                   | Absolute pathname to temporary package build root directory                   |
Lucio Andrés Illanes Albornoz 6d9a3c
| PREFIX           | ${PREFIX_ROOT}/${ARCH}/${BUILD} | Absolute pathname to architecture- & build type-specific build root directory |
Lucio Andrés Illanes Albornoz 6d9a3c
| PREFIX_CROSS     | ${PREFIX}/${DEFAULT_TARGET}     | Absolute pathname to toolchain root directory                                 |
Lucio Andrés Illanes Albornoz 6d9a3c
| PREFIX_MINGW32   | ${PREFIX}/x86_64-w64-mingw32    | Absolute pathname to MinGW toolchain root directory                           |
Lucio Andrés Illanes Albornoz 6d9a3c
| PREFIX_MINIPIX   | ${PREFIX}/minipix               | Absolute pathname to minipix distribution root directory                      |
Lucio Andrés Illanes Albornoz 6d9a3c
| PREFIX_NATIVE    | ${PREFIX}/native                | Absolute pathname to cross-compiled packages root directory                   |
Lucio Andrés Illanes Albornoz 6d9a3c
| PREFIX_ROOT      | ${HOME}/midipix                 | Absolute pathname to top-level directory                                      |
Lucio Andrés Illanes Albornoz 6d9a3c
| PREFIX_RPM       | ${PREFIX}/rpm                   | Absolute pathname to package RPM archive root directory                       |
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[Back to top](#table-of-contents)
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "}}}"
Lucio Andrés Illanes Albornoz 23f3c2
[//]: # "{{{ 4.1. Package variables"
Lucio Andrés Illanes Albornoz 23f3c2
## 4.1. Package variables
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
The following variables are package-specific and receive their value from either
Lucio Andrés Illanes Albornoz 6d9a3c
top-level defaults defined in ``midipix.env``, build group-specific defaults
Lucio Andrés Illanes Albornoz 6d9a3c
from the build group the package pertains to and defined in its corresponding
Lucio Andrés Illanes Albornoz 6d9a3c
file beneath ``groups/``, or package-specific overrides defined either in the
Lucio Andrés Illanes Albornoz 6d9a3c
latter and/or in its corresponding file beneath ``vars/``. Additionally,
Lucio Andrés Illanes Albornoz 6d9a3c
overrides may be specified on a per-build basis on the command-line after the
Lucio Andrés Illanes Albornoz 6d9a3c
last argument, with each variable prefixed w/ ``PKG_``, e.g.: ``./build.sh
Lucio Andrés Illanes Albornoz 6d9a3c
[ ... ] PKG_ZSH_CC="/bin/false"``.  
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
The minimum set of package variables that must be provided is ``SHA256SUM, URL,
Lucio Andrés Illanes Albornoz 6d9a3c
VERSION`` and/or ``URLS_GIT``, respectively.
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
| Package variable name       | Description                                                                                                                             |
Lucio Andrés Illanes Albornoz 6d9a3c
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
Lucio Andrés Illanes Albornoz 6d9a3c
| AR                          | Command- or pathname of toolchain library archive editor (ar(1))                                                                        |
Lucio Andrés Illanes Albornoz 6d9a3c
| BASE_DIR                    | Absolute pathname to package build root directory beneath ${BUILD_WORKDIR}                                                              |
Lucio Andrés Illanes Albornoz 6d9a3c
| BUILD_DIR                   | Directory name of package build directory beneath ${PKG_BASE_DIR}                                                                       |
Lucio Andrés Illanes Albornoz 6d9a3c
| BUILD_STEPS_DISABLE         | List of build steps to disable during package build                                                                                     |
Lucio Andrés Illanes Albornoz 6d9a3c
| BUILD_TYPE                  | Cross-compiled toolchain (cross,) host (host,) or cross-compiled package build type                                                     |
Lucio Andrés Illanes Albornoz 6d9a3c
| CC                          | Command- or pathname of toolchain C compiler (cc(1))                                                                                    |
Lucio Andrés Illanes Albornoz 6d9a3c
| CFLAGS_BUILD_EXTRA          | Additional C compiler flags during package (make(1)) build                                                                              |
Lucio Andrés Illanes Albornoz 6d9a3c
| CFLAGS_CONFIGURE            | C compiler flags during package (autotools or similar) configuration                                                                    |
Lucio Andrés Illanes Albornoz 6d9a3c
| CFLAGS_CONFIGURE_EXTRA      | Additional C compiler flags during package (GNU autotools or similar) configuration                                                     |
Lucio Andrés Illanes Albornoz 6d9a3c
| CONFIG_CACHE                | List of GNU autotools configuration cache variables                                                                                     |
Lucio Andrés Illanes Albornoz 6d9a3c
| CONFIG_CACHE_EXTRA          | Additional list of GNU autotools configuration cache variables                                                                          |
Lucio Andrés Illanes Albornoz 6d9a3c
| CONFIG_CACHE_LOCAL          | Additional list of GNU autotools configuration cache variables                                                                          |
Lucio Andrés Illanes Albornoz 6d9a3c
| CONFIGURE                   | Command- or pathname to package (GNU autotools or similar) configuration script                                                         |
Lucio Andrés Illanes Albornoz 6d9a3c
| CONFIGURE_ARGS              | List of arguments to package (GNU autotools or similar) configuration script                                                            |
Lucio Andrés Illanes Albornoz 6d9a3c
| CONFIGURE_ARGS_EXTRA        | Additional list of arguments to package (GNU autotools or similar) configuration script                                                 |
Lucio Andrés Illanes Albornoz 6d9a3c
| CXX                         | Command- or pathname of toolchain C++ compiler (c++(1))                                                                                 |
Lucio Andrés Illanes Albornoz 6d9a3c
| CXXFLAGS_CONFIGURE          | List of C++ compiler flags during package (autotools or similar) configuration                                                          |
Lucio Andrés Illanes Albornoz 6d9a3c
| CXXFLAGS_CONFIGURE_EXTRA    | Additional list of C++ compiler flags during package (autotools or similar) configuration                                               |
Lucio Andrés Illanes Albornoz 6d9a3c
| DEPENDS                     | List of package-package dependencies                                                                                                    |
Lucio Andrés Illanes Albornoz 6d9a3c
| DESTDIR                     | Directory name of package installation destination directory beneath ${PKG_BASE_DIR}                                                    |
Lucio Andrés Illanes Albornoz 6d9a3c
| DISABLED                    | Disable package                                                                                                                         |
Lucio Andrés Illanes Albornoz 6d9a3c
| ENV_VARS_EXTRA              | List of double colon-separated environment variable equality sign-separated name-value pairs to set during package build                |
Lucio Andrés Illanes Albornoz 6d9a3c
| FNAME                       | Filename of package archive file                                                                                                        |
Lucio Andrés Illanes Albornoz 6d9a3c
| FORCE_AUTORECONF            | Forcibly run autoreconf -fiv prior to package (GNU autotools or similar) configuration                                                  |
Lucio Andrés Illanes Albornoz 6d9a3c
| GITROOT                     | midipix packages Git URL prefix                                                                                                         |
Lucio Andrés Illanes Albornoz 6d9a3c
| INHERIT_FROM                | Inherit variables from named package                                                                                                    |
Lucio Andrés Illanes Albornoz 6d9a3c
| INSTALL_FILES               | Whitespace-separated list of files to manually install into the package installation destination directory beneath ${PKG_BASE_DIR}      |
Lucio Andrés Illanes Albornoz 6d9a3c
| INSTALL_FILES_DESTDIR       | Whitespace-separated list of files to initialise the package installation destination directory beneath ${PKG_BASE_DIR} with            |
Lucio Andrés Illanes Albornoz 6d9a3c
| INSTALL_FILES_DESTDIR_EXTRA | Additional whitespace-separated list of files to initialise the package installation destination directory beneath ${PKG_BASE_DIR} with |
Lucio Andrés Illanes Albornoz 6d9a3c
| INSTALL_TARGET              | Name of package build make(1) installation target                                                                                       |
Lucio Andrés Illanes Albornoz 6d9a3c
| INSTALL_TARGET_EXTRA        | Additional name of package build make(1) installation target                                                                            |
Lucio Andrés Illanes Albornoz 6d9a3c
| IN_TREE                     | Build package in-tree within ${PKG_SUBDIR}                                                                                              |
Lucio Andrés Illanes Albornoz 6d9a3c
| LDFLAGS_BUILD_EXTRA         | Additional linker flags during package (make(1)) build                                                                                  |
Lucio Andrés Illanes Albornoz 6d9a3c
| LDFLAGS_CONFIGURE           | Linker flags during package (autotools or similar) configuration                                                                        |
Lucio Andrés Illanes Albornoz 6d9a3c
| LDFLAGS_CONFIGURE_EXTRA     | Additional linker flags during package (autotools or similar) configuration                                                             |
Lucio Andrés Illanes Albornoz 6d9a3c
| LIBTOOL                     | Command- or pathname of libtool                                                                                                         |
Lucio Andrés Illanes Albornoz 6d9a3c
| MAKE                        | Command line of make(1)                                                                                                                 |
Lucio Andrés Illanes Albornoz 6d9a3c
| MAKEFLAGS_BUILD             | List of make(1) flags during package (make(1)) build                                                                                    |
Lucio Andrés Illanes Albornoz 6d9a3c
| MAKEFLAGS_BUILD_EXTRA       | Additional list of make(1) flags during package (make(1)) build                                                                         |
Lucio Andrés Illanes Albornoz 6d9a3c
| MAKEFLAGS_INSTALL           | List of make(1) flags during package (make(1)) installation                                                                             |
Lucio Andrés Illanes Albornoz 6d9a3c
| MAKEFLAGS_INSTALL_EXTRA     | Additional list of make(1) flags during package (make(1)) installation                                                                  |
Lucio Andrés Illanes Albornoz 6d9a3c
| MAKE_INSTALL_VNAME          | Variable name of make(1) installation destination directory variable during package (make(1)) installation                              |
Lucio Andrés Illanes Albornoz 6d9a3c
| NO_CLEAN                    | Inhibit cleaning of package build directory beneath ${PKG_BASE_DIR} pre-finish                                                          |
Lucio Andrés Illanes Albornoz 6d9a3c
| NO_CLEAN_BASE_DIR           | Inhibit cleaning of package build root directory beneath ${BUILD_WORKDIR}                                                               |
Lucio Andrés Illanes Albornoz 6d9a3c
| NO_LOG_VARS                 | Inhibit logging of build & package variables pre-package build                                                                          |
Lucio Andrés Illanes Albornoz 6d9a3c
| PATCHES_EXTRA               | Additional list of patches to apply                                                                                                     |
Lucio Andrés Illanes Albornoz 6d9a3c
| PKG_CONFIG                  | Command- or pathname of pkg-config(1)                                                                                                   |
Lucio Andrés Illanes Albornoz 6d9a3c
| PKG_CONFIG_PATH             | pkg-config(1) search path                                                                                                               |
Lucio Andrés Illanes Albornoz 6d9a3c
| PKGLIST_DISABLE             | Inhibit inclusion into ${PREFIX}/pkglist.${PKG_BUILD_TYPE}                                                                              |
Lucio Andrés Illanes Albornoz 6d9a3c
| PREFIX                      | Absolute pathname of top-level installation directory and package search path                                                           |
Lucio Andrés Illanes Albornoz 6d9a3c
| PYTHON                      | Command- or pathname of Python                                                                                                          |
Lucio Andrés Illanes Albornoz 6d9a3c
| RANLIB                      | Command- or pathname of toolchain library archive index generator (ranlib(1))                                                           |
Lucio Andrés Illanes Albornoz 6d9a3c
| RPM_DISABLE                 | Inhibit creation of RPM archive                                                                                                         |
Lucio Andrés Illanes Albornoz 6d9a3c
| SHA256SUM                   | SHA-256 message digest of package archive                                                                                               |
Lucio Andrés Illanes Albornoz 6d9a3c
| SUBDIR                      | Name of extracted archive or git-{clone,pull}(1)'d directory                                                                            |
Lucio Andrés Illanes Albornoz 6d9a3c
| TARGET                      | Dash-separated {build,host,target} triplet                                                                                              |
Lucio Andrés Illanes Albornoz 6d9a3c
| URL                         | URL to package archive                                                                                                                  |
Lucio Andrés Illanes Albornoz 6d9a3c
| URLS_GIT                    | List of package Git URL(s) (*name*=*URL*@*branch*)                                                                                      |
Lucio Andrés Illanes Albornoz 6d9a3c
| VERSION                     | Package version                                                                                                                         |
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[Back to top](#table-of-contents)
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "}}}"
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 23f3c2
[//]: # "{{{ 5. References"
Lucio Andrés Illanes Albornoz 23f3c2
## 5. References
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
* ``Sun, 25 Apr 2016 09:04:08 +0000 [1]`` musl FAQ  
Lucio Andrés Illanes Albornoz 6d9a3c
* ``Wed, 04 Mar 2020 12:57:39 +0000 [2]`` midipix  
Lucio Andrés Illanes Albornoz 6d9a3c
* ``Wed, 04 Mar 2020 13:36:19 +0000 [3]`` midipix - what is midipix, and how is it different?  
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[Back to top](#table-of-contents)
Lucio Andrés Illanes Albornoz 6d9a3c

Lucio Andrés Illanes Albornoz 6d9a3c
[//]: # "}}}"
Lucio Andrés Illanes Albornoz 6d9a3c
  
Lucio Andrés Illanes Albornoz 6d9a3c
[modeline]: # ( vim: set ff=dos tw=0: )