prefix.eclass
Description
Gentoo Prefix allows users to install into a self defined offset located somewhere in the filesystem. Prefix ebuilds require additional functions and variables which are defined by this eclass.
Functions
- eprefixify <list of to be eprefixified files>
-
replaces @GENTOO_PORTAGE_EPREFIX@ with ${EPREFIX} for the given files, dies if no arguments are given, a file does not exist, or changing a file failed.
- hprefixify [ -w <line match> ] [ -e <extended regex> ] [ -q <quotation char> ] <list of files>
-
Tries a set of heuristics to prefixify the given files. Dies if no arguments are given, a file does not exist, or changing a file failed.
Additional extended regular expression can be passed by -e or environment variable PREFIX_EXTRA_REGEX. The default heuristics can be constrained to lines that match a sed expression passed by -w or environment variable PREFIX_LINE_MATCH. Quotation characters can be specified by -q or environment variable PREFIX_QUOTE_CHAR, unless EPREFIX is empty.
@EXAMPLE: Only prefixify the 30th line,
Warning:Unexpected indentation.
hprefixify -w 30 configure
Warning:Block quote ends without a blank line; unexpected unindent.
- Only prefixify lines that contain "PATH",
-
hprefixify -w "/PATH/" configure
- Also delete all the /opt/gnu search paths,
-
hprefixify -e "//opt/gnu/d" configure
- Quote the inserted EPREFIX
-
hprefixify -q '"' etc/profile
- prefixify_ro <file>
-
prefixify a read-only file. copies the files to ${T}, prefixies it, echos the new file. @EXAMPLE: doexe "$(prefixify_ro "${FILESDIR}"/fix_libtool_files.sh)" epatch "$(prefixify_ro "${FILESDIR}"/${PN}-4.0.2-path.patch)"
Variables
- EPREFIX
-
The offset prefix of a Gentoo Prefix installation. When Gentoo Prefix is not used, ${EPREFIX} should be "". Prefix Portage sets EPREFIX, hence this eclass has nothing to do here in that case. Note that setting EPREFIX in the environment with Prefix Portage sets Portage into cross-prefix mode.
Maintainers
Feel free to contact the Prefix team through <prefix@gentoo.org> if
you have problems, suggestions or questions.
Reporting Bugs
Please report bugs via https://bugs.gentoo.org/