# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-05-01 19:56-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: YAML Front Matter: description #: documentation/content/en/books/porters-handbook/order/_index.adoc:1 #, no-wrap msgid "Order of Variables in FreeBSD Port Makefiles" msgstr "" #. type: YAML Front Matter: title #: documentation/content/en/books/porters-handbook/order/_index.adoc:1 #, no-wrap msgid "Chapter 15. Order of Variables in Port Makefiles" msgstr "" #. type: Title = #: documentation/content/en/books/porters-handbook/order/_index.adoc:14 #, no-wrap msgid "Order of Variables in Port Makefiles" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:53 msgid "" "The first sections of the [.filename]#Makefile# must always come in the same " "order. This standard makes it so everyone can easily read any port without " "having to search for variables in a random order." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:58 msgid "" "The sections and variables described here are mandatory in a ordinary port. " "In a slave port, many sections and variables can be skipped." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:63 msgid "" "Each following block must be separated from the previous block by a single " "blank line." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:66 msgid "" "In the following blocks, only set the variables that are required by the " "port. Define these variables in the order they are shown here." msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:69 #, no-wrap msgid "`PORTNAME` Block" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:73 msgid "" "This block is the most important. It defines the port name, version, " "distribution file location, and category. The variables must be in this " "order:" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:77 msgid "" "crossref:makefiles[makefile-portname,`PORTNAME`] * " "crossref:makefiles[makefile-versions,`PORTVERSION`]" "[crossref:order[portversion-footnote, 1]]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:80 msgid "" "crossref:makefiles[makefile-versions,`DISTVERSIONPREFIX`] * " "crossref:makefiles[makefile-versions,`DISTVERSION`]" "[crossref:order[portversion-footnote, 1]]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:81 msgid "crossref:makefiles[makefile-versions,`DISTVERSIONSUFFIX`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:82 msgid "crossref:makefiles[makefile-portrevision,`PORTREVISION`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:83 msgid "crossref:makefiles[makefile-portepoch,`PORTEPOCH`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:84 msgid "crossref:makefiles[makefile-categories,`CATEGORIES`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:85 msgid "crossref:makefiles[makefile-master_sites,`MASTER_SITES`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:86 msgid "" "crossref:makefiles[makefile-master_sites-shorthand,`MASTER_SITE_SUBDIR`] " "(deprecated)" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:87 msgid "crossref:makefiles[porting-pkgnameprefix-suffix,`PKGNAMEPREFIX`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:88 msgid "crossref:makefiles[porting-pkgnameprefix-suffix,`PKGNAMESUFFIX`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:89 msgid "crossref:makefiles[makefile-distname,`DISTNAME`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:90 msgid "crossref:makefiles[makefile-extract_sufx,`EXTRACT_SUFX`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:91 msgid "crossref:makefiles[makefile-distfiles-definition,`DISTFILES`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:92 msgid "crossref:makefiles[makefile-dist_subdir,`DIST_SUBDIR`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:93 msgid "crossref:makefiles[makefile-extract_only,`EXTRACT_ONLY`]" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:98 msgid "Only one of PORTVERSION and DISTVERSION can be used." msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:101 #, no-wrap msgid "`PATCHFILES` Block" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:105 msgid "This block is optional. The variables are:" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:107 msgid "crossref:makefiles[porting-patchfiles,`PATCH_SITES`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:108 msgid "crossref:makefiles[porting-patchfiles,`PATCHFILES`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:109 msgid "crossref:makefiles[porting-patchfiles,`PATCH_DIST_STRIP`]" msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:111 #, no-wrap msgid "`MAINTAINER` Block" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:115 msgid "This block is mandatory. The variables are:" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:117 msgid "crossref:makefiles[makefile-maintainer,`MAINTAINER`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:118 msgid "crossref:makefiles[makefile-comment,`COMMENT`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:119 msgid "crossref:makefiles[makefile-www,`WWW`]" msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:121 #, no-wrap msgid "`LICENSE` Block" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:125 msgid "" "This block is optional, although it is highly recommended. The variables " "are:" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:127 msgid "crossref:makefiles[licenses-license,`LICENSE`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:128 msgid "crossref:makefiles[licenses-license_comb,`LICENSE_COMB`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:129 msgid "" "crossref:makefiles[licenses-license_groups,`LICENSE_GROUPS`] or " "`LICENSE_GROUPS_NAME`" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:130 msgid "" "crossref:makefiles[licenses-license_name,`LICENSE_NAME`] or " "`LICENSE_NAME_NAME`" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:131 msgid "" "crossref:makefiles[licenses-license_text,`LICENSE_TEXT`] or " "`LICENSE_TEXT_NAME`" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:132 msgid "" "crossref:makefiles[licenses-license_file,`LICENSE_FILE`] or " "`LICENSE_FILE_NAME`" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:133 msgid "" "crossref:makefiles[licenses-license_perms,`LICENSE_PERMS`] or " "`LICENSE_PERMS_NAME_`" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:134 msgid "" "crossref:makefiles[licenses-license_distfiles,`LICENSE_DISTFILES`] or " "`LICENSE_DISTFILES_NAME`" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:136 msgid "" "If there are multiple licenses, sort the different LICENSE_VAR_NAME " "variables by license name." msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:138 #, no-wrap msgid "Generic `BROKEN`/`IGNORE`/`DEPRECATED` Messages" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:141 #: documentation/content/en/books/porters-handbook/order/_index.adoc:171 msgid "This block is optional. The variables are:" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:143 msgid "crossref:porting-dads[dads-deprecated,`DEPRECATED`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:144 msgid "crossref:porting-dads[dads-deprecated,`EXPIRATION_DATE`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:145 msgid "crossref:porting-dads[dads-noinstall,`FORBIDDEN`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:146 msgid "crossref:porting-dads[dads-noinstall,`BROKEN`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:147 msgid "crossref:porting-dads[dads-noinstall,`BROKEN_*`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:148 msgid "crossref:porting-dads[dads-noinstall,`IGNORE`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:149 msgid "crossref:porting-dads[dads-noinstall,`IGNORE_*`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:150 msgid "crossref:porting-dads[dads-noinstall,`ONLY_FOR_ARCHS`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:151 msgid "crossref:porting-dads[dads-noinstall,`ONLY_FOR_ARCHS_REASON*`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:152 msgid "crossref:porting-dads[dads-noinstall,`NOT_FOR_ARCHS`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:153 msgid "crossref:porting-dads[dads-noinstall,`NOT_FOR_ARCHS_REASON*`]" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:160 msgid "" "`BROKEN_*` and `IGNORE_*` can be any generic variables, for example, " "`IGNORE_amd64`, `BROKEN_FreeBSD_10`, etc. With the exception of variables " "that depend on a crossref:uses[uses,`USES`], place those in " "crossref:order[porting-order-uses, `USES` and `USE_x`]. For instance, " "`IGNORE_WITH_PHP` only works if crossref:uses[uses-php,`php`] is set, and " "`BROKEN_SSL` only if crossref:uses[uses-ssl,`ssl`] is set." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:165 msgid "" "If the port is marked BROKEN when some conditions are met, and such " "conditions can only be tested after including " "[.filename]#bsd.port.options.mk# or [.filename]#bsd.port.pre.mk#, then those " "variables should be set later, in crossref:order[porting-order-rest, The " "Rest of the Variables]." msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:168 #, no-wrap msgid "The Dependencies Block" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:173 msgid "crossref:makefiles[makefile-fetch_depends,`FETCH_DEPENDS`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:174 msgid "crossref:makefiles[makefile-extract_depends,`EXTRACT_DEPENDS`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:175 msgid "crossref:makefiles[makefile-patch_depends,`PATCH_DEPENDS`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:176 msgid "crossref:makefiles[makefile-build_depends,`BUILD_DEPENDS`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:177 msgid "crossref:makefiles[makefile-lib_depends,`LIB_DEPENDS`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:178 msgid "crossref:makefiles[makefile-run_depends,`RUN_DEPENDS`]" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:179 msgid "`TEST_DEPENDS`" msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:181 #, no-wrap msgid "Flavors" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:184 msgid "This block is optional." msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:188 msgid "" "Start this section with defining `FLAVORS`. Continue with the possible " "Flavors helpers. See crossref:flavors[flavors-using,Using FLAVORS] for more " "Information." msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:190 msgid "" "Constructs setting variables not available as helpers using `.if ${FLAVOR:U} " "== foo` should go in their respective sections below." msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:192 #, no-wrap msgid "`USES` and `USE_x`" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:195 msgid "Start this section with defining `USES`, and then possible `USE_x`." msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:198 msgid "" "Keep related variables close together. For example, if using " "crossref:makefiles[makefile-master_sites-github,`USE_GITHUB`], always put " "the `GH_*` variables right after it." msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:200 #, no-wrap msgid "Standard bsd.port.mk Variables" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:203 msgid "" "This section block is for variables that can be defined in " "[.filename]#bsd.port.mk# that do not belong in any of the previous section " "blocks." msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:208 msgid "" "Order is not important, however try to keep similar variables together. For " "example uid and gid variables `USERS` and `GROUPS`. Configuration variables " "`CONFIGURE_*` and `*_CONFIGURE`. List of files, and directories `PORTDOCS` " "and `PORTEXAMPLES`." msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:210 #, no-wrap msgid "Options and Helpers" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:215 msgid "" "If the port uses the crossref:makefiles[makefile-options,options framework], " "define `OPTIONS_DEFINE` and `OPTIONS_DEFAULT` first, then the other " "`OPTIONS_*` variables first, then the `*_DESC` descriptions, then the " "options helpers. Try and sort all of those alphabetically." msgstr "" #. type: Block title #: documentation/content/en/books/porters-handbook/order/_index.adoc:217 #, no-wrap msgid "Options Variables Order Example" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:224 msgid "" "The `FOO` and `BAR` options do not have a standard description, so one need " "to be written. The other options already have one in [.filename]#Mk/" "bsd.options.desc.mk# so writing one is not needed. The `DOCS` and " "`EXAMPLES` use target helpers to install their files, they are shown here " "for completeness, though they belong in crossref:order[porting-order-" "targets, The Targets], so other variables and targets could be inserted " "before them." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:232 #, no-wrap msgid "" "OPTIONS_DEFINE=\tDOCS EXAMPLES FOO BAR\n" "OPTIONS_DEFAULT=\tFOO\n" "OPTIONS_RADIO=\tSSL\n" "OPTIONS_RADIO_SSL= OPENSSL GNUTLS\n" "OPTIONS_SUB=\tyes\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:235 #, no-wrap msgid "" "BAR_DESC=\t\tEnable bar support\n" "FOO_DESC=\t\tEnable foo support\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:240 #, no-wrap msgid "" "BAR_CONFIGURE_WITH=\tbar=${LOCALBASE}\n" "FOO_CONFIGURE_ENABLE=\tfoo\n" "GNUTLS_CONFIGURE_ON=\t--with-ssl=gnutls\n" "OPENSSL_CONFIGURE_ON=\t--with-ssl=openssl\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:244 #, no-wrap msgid "" "post-install-DOCS-on:\n" " ${MKDIR} ${STAGEDIR}${DOCSDIR}\n" " cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:248 #, no-wrap msgid "" "post-install-EXAMPLES-on:\n" " ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}\n" " cd ${WRKSRC}/ex && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}\n" msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:253 #, no-wrap msgid "The Rest of the Variables" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:256 msgid "" "And then, the rest of the variables that are not mentioned in the previous " "blocks." msgstr "" #. type: Title == #: documentation/content/en/books/porters-handbook/order/_index.adoc:258 #, no-wrap msgid "The Targets" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:262 msgid "" "After all the variables are defined, the optional man:make[1] targets can be " "defined. Keep `pre-*` before `post-*` and in the same order as the " "different stages run:" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:264 msgid "`fetch`" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:265 msgid "`extract`" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:266 msgid "`patch`" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:267 msgid "`configure`" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:268 msgid "`build`" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:269 msgid "`install`" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:270 msgid "`test`" msgstr "" #. type: Plain text #: documentation/content/en/books/porters-handbook/order/_index.adoc:275 msgid "" "When using options helpers target keep them alphabetically sorted, but keep " "the `*-on` before the `*-off`. When also using the main target, keep the " "main target before the optional ones:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:280 #, no-wrap msgid "" "post-install:\n" "\t# install generic bits\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:283 #, no-wrap msgid "" "post-install-DOCS-on:\n" "\t# Install documentation\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:286 #, no-wrap msgid "" "post-install-X11-on:\n" "\t# Install X11 related bits\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/porters-handbook/order/_index.adoc:289 #, no-wrap msgid "" "post-install-X11-off:\n" "\t# Install bits that should be there if X11 is disabled\n" msgstr ""