Date: Thu, 18 Sep 2025 19:22:36 GMT From: Vladlen Popolitov <vladlen@FreeBSD.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org Subject: git: f12ee9e99a - main - update translation of books/porters-handbook to Russian Message-ID: <202509181922.58IJMafl006039@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by vladlen: URL: https://cgit.FreeBSD.org/doc/commit/?id=f12ee9e99a2c070bcf4965efe40975cb0f47c6ca commit f12ee9e99a2c070bcf4965efe40975cb0f47c6ca Author: Vladlen Popolitov <vladlen@FreeBSD.org> AuthorDate: 2025-09-18 19:21:21 +0000 Commit: Vladlen Popolitov <vladlen@FreeBSD.org> CommitDate: 2025-09-18 19:21:34 +0000 update translation of books/porters-handbook to Russian Reviewed by: maxim (mentor) and arrowd Approved by: maxim (mentor) and carlavilla Differential Revision: https://reviews.freebsd.org/D52053 --- .../content/ru/books/porters-handbook/_index.adoc | 20 +- .../content/ru/books/porters-handbook/_index.po | 37 + .../content/ru/books/porters-handbook/book.adoc | 17 +- .../content/ru/books/porters-handbook/book.po | 37 + .../ru/books/porters-handbook/flavors/_index.adoc | 359 + .../ru/books/porters-handbook/flavors/_index.po | 801 + .../books/porters-handbook/keeping-up/_index.adoc | 39 +- .../ru/books/porters-handbook/keeping-up/_index.po | 270 + .../books/porters-handbook/makefiles/_index.adoc | 4540 ++- .../ru/books/porters-handbook/makefiles/_index.po | 14066 ++++++++ .../ru/books/porters-handbook/new-port/_index.adoc | 14 +- .../ru/books/porters-handbook/new-port/_index.po | 101 + .../ru/books/porters-handbook/order/_index.adoc | 260 + .../ru/books/porters-handbook/order/_index.po | 780 + .../books/porters-handbook/pkg-files/_index.adoc | 228 +- .../ru/books/porters-handbook/pkg-files/_index.po | 873 + .../ru/books/porters-handbook/plist/_index.adoc | 548 +- .../ru/books/porters-handbook/plist/_index.po | 1731 + .../porters-handbook/porting-dads/_index.adoc | 214 +- .../books/porters-handbook/porting-dads/_index.po | 1473 + .../porters-handbook/porting-samplem/_index.adoc | 138 +- .../porters-handbook/porting-samplem/_index.po | 412 + .../books/porters-handbook/porting-why/_index.adoc | 10 +- .../books/porters-handbook/porting-why/_index.po | 61 + .../porters-handbook/quick-porting/_index.adoc | 166 +- .../books/porters-handbook/quick-porting/_index.po | 767 + .../ru/books/porters-handbook/security/_index.adoc | 158 +- .../ru/books/porters-handbook/security/_index.po | 858 + .../porters-handbook/slow-porting/_index.adoc | 173 +- .../books/porters-handbook/slow-porting/_index.po | 1017 + .../ru/books/porters-handbook/special/_index.adoc | 4512 ++- .../ru/books/porters-handbook/special/_index.po | 14978 ++++++++ .../ru/books/porters-handbook/testing/_index.adoc | 460 +- .../ru/books/porters-handbook/testing/_index.po | 1685 + .../books/porters-handbook/upgrading/_index.adoc | 181 +- .../ru/books/porters-handbook/upgrading/_index.po | 688 + .../ru/books/porters-handbook/uses/_index.adoc | 2185 +- .../ru/books/porters-handbook/uses/_index.po | 9971 ++++++ .../ru/books/porters-handbook/versions/_index.adoc | 6184 ++-- .../ru/books/porters-handbook/versions/_index.po | 33861 +++++++++++++++++++ 40 files changed, 99021 insertions(+), 5852 deletions(-) diff --git a/documentation/content/ru/books/porters-handbook/_index.adoc b/documentation/content/ru/books/porters-handbook/_index.adoc index 5b066cb5b0..0446d79b28 100644 --- a/documentation/content/ru/books/porters-handbook/_index.adoc +++ b/documentation/content/ru/books/porters-handbook/_index.adoc @@ -1,15 +1,19 @@ --- -title: Руководство FreeBSD по созданию портов -authors: - - author: The FreeBSD Documentation Project -copyright: 2000-2020 The FreeBSD Documentation Project -trademarks: ["freebsd", "sun", "unix", "general"] -next: books/porters-handbook/porting-why add_single_page_link: true +authors: + - + author: 'The FreeBSD Documentation Project' +bookOrder: 15 +copyright: '2000-2023 The FreeBSD Documentation Project' +description: 'Обязательно к прочтению, если вы планируете портировать стороннее программное обеспечение' +next: books/porters-handbook/porting-why +params: + path: /books/porters-handbook/ showBookMenu: true +tags: "[\"FreeBSD Porter's Handbook\", \"Porting\", \"FreeBSD Ports Collection\"]" +title: 'Руководство FreeBSD по созданию портов' +trademarks: ["freebsd", "sun", "unix", "general"] weight: 0 -params: - path: "/books/porters-handbook/" --- = Руководство FreeBSD по созданию портов diff --git a/documentation/content/ru/books/porters-handbook/_index.po b/documentation/content/ru/books/porters-handbook/_index.po new file mode 100644 index 0000000000..1aa07698c1 --- /dev/null +++ b/documentation/content/ru/books/porters-handbook/_index.po @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR The FreeBSD Project +# This file is distributed under the same license as the FreeBSD Documentation package. +# Vladlen Popolitov <vladlenpopolitov@list.ru>, 2025. +msgid "" +msgstr "" +"Project-Id-Version: FreeBSD Documentation VERSION\n" +"POT-Creation-Date: 2025-09-18 22:05+0300\n" +"PO-Revision-Date: 2025-07-12 04:45+0000\n" +"Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" +"Language-Team: Russian <https://translate-dev.freebsd.org/projects/" +"documentation/booksporters-handbook_index/ru/>\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.17\n" + +#. type: Yaml Front Matter Hash Value: description +#: documentation/content/en/books/porters-handbook/_index.adoc:1 +#, no-wrap +msgid "Essential reading if you plan on providing a port of a third party piece of software" +msgstr "Обязательно к прочтению, если вы планируете портировать стороннее программное обеспечение" + +#. type: Title = +#: documentation/content/en/books/porters-handbook/_index.adoc:1 +#: documentation/content/en/books/porters-handbook/_index.adoc:18 +#, no-wrap +msgid "FreeBSD Porter's Handbook" +msgstr "Руководство FreeBSD по созданию портов" + +#. type: Plain text +#: documentation/content/en/books/porters-handbook/_index.adoc:49 +msgid "'''" +msgstr "'''" diff --git a/documentation/content/ru/books/porters-handbook/book.adoc b/documentation/content/ru/books/porters-handbook/book.adoc index 73c6b67672..84bedca43a 100644 --- a/documentation/content/ru/books/porters-handbook/book.adoc +++ b/documentation/content/ru/books/porters-handbook/book.adoc @@ -1,13 +1,16 @@ --- -title: Руководство FreeBSD по созданию портов -authors: - - author: The FreeBSD Documentation Project -copyright: 2000-2020 The FreeBSD Documentation Project -trademarks: ["freebsd", "sun", "unix", "general"] add_split_page_link: true +authors: + - + author: 'The FreeBSD Documentation Project' +copyright: '2000-2023 The FreeBSD Documentation Project' +description: 'Обязательно к прочтению, если вы планируете портировать стороннее программное обеспечение' +tags: "[\"FreeBSD Porter's Handbook\", \"Porting\", \"FreeBSD Ports Collection\"]" +title: 'Руководство FreeBSD по созданию портов' +trademarks: ["freebsd", "sun", "unix", "general"] --- -= FreeBSD Porter's Handbook += Руководство FreeBSD по созданию портов :doctype: book :toc: macro :toclevels: 2 @@ -52,6 +55,7 @@ include::{chapters-path}quick-porting/_index.adoc[leveloffset=+1] include::{chapters-path}slow-porting/_index.adoc[leveloffset=+1] include::{chapters-path}makefiles/_index.adoc[leveloffset=+1] include::{chapters-path}special/_index.adoc[leveloffset=+1] +include::{chapters-path}flavors/_index.adoc[leveloffset=+1] include::{chapters-path}plist/_index.adoc[leveloffset=+1] include::{chapters-path}pkg-files/_index.adoc[leveloffset=+1] include::{chapters-path}testing/_index.adoc[leveloffset=+1] @@ -59,6 +63,7 @@ include::{chapters-path}upgrading/_index.adoc[leveloffset=+1] include::{chapters-path}security/_index.adoc[leveloffset=+1] include::{chapters-path}porting-dads/_index.adoc[leveloffset=+1] include::{chapters-path}porting-samplem/_index.adoc[leveloffset=+1] +include::{chapters-path}order/_index.adoc[leveloffset=+1] include::{chapters-path}keeping-up/_index.adoc[leveloffset=+1] include::{chapters-path}uses/_index.adoc[leveloffset=+1] include::{chapters-path}versions/_index.adoc[leveloffset=+1] diff --git a/documentation/content/ru/books/porters-handbook/book.po b/documentation/content/ru/books/porters-handbook/book.po new file mode 100644 index 0000000000..2994c7daaa --- /dev/null +++ b/documentation/content/ru/books/porters-handbook/book.po @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR The FreeBSD Project +# This file is distributed under the same license as the FreeBSD Documentation package. +# Vladlen Popolitov <vladlenpopolitov@list.ru>, 2025. +msgid "" +msgstr "" +"Project-Id-Version: FreeBSD Documentation VERSION\n" +"POT-Creation-Date: 2025-09-18 22:05+0300\n" +"PO-Revision-Date: 2025-07-12 04:45+0000\n" +"Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" +"Language-Team: Russian <https://translate-dev.freebsd.org/projects/" +"documentation/booksporters-handbookbook/ru/>\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.17\n" + +#. type: Yaml Front Matter Hash Value: description +#: documentation/content/en/books/porters-handbook/book.adoc:1 +#, no-wrap +msgid "Essential reading if you plan on providing a port of a third party piece of software" +msgstr "Обязательно к прочтению, если вы планируете портировать стороннее программное обеспечение" + +#. type: Title = +#: documentation/content/en/books/porters-handbook/book.adoc:1 +#: documentation/content/en/books/porters-handbook/book.adoc:12 +#, no-wrap +msgid "FreeBSD Porter's Handbook" +msgstr "Руководство FreeBSD по созданию портов" + +#. type: Plain text +#: documentation/content/en/books/porters-handbook/book.adoc:48 +msgid "'''" +msgstr "'''" diff --git a/documentation/content/ru/books/porters-handbook/flavors/_index.adoc b/documentation/content/ru/books/porters-handbook/flavors/_index.adoc new file mode 100644 index 0000000000..f69bf3938d --- /dev/null +++ b/documentation/content/ru/books/porters-handbook/flavors/_index.adoc @@ -0,0 +1,359 @@ +--- +description: 'Флейворы — это способ создания нескольких вариаций порта' +next: books/porters-handbook/plist +params: + path: /books/porters-handbook/flavors/ +prev: books/porters-handbook/special +showBookMenu: true +tags: ["Ports", "Flavors", "introduction", "how-to", "guide"] +title: 'Глава 7. Флейворы' +weight: 7 +--- + +[[flavors]] += Флейворы +:doctype: book +:toc: macro +:toclevels: 1 +:icons: font +:sectnums: +:sectnumlevels: 6 +:sectnumoffset: 7 +:partnums: +:source-highlighter: rouge +:experimental: +:images-path: books/porters-handbook/ + +ifdef::env-beastie[] +ifdef::backend-html5[] +:imagesdir: ../../../../images/{images-path} +endif::[] +ifndef::book[] +include::shared/authors.adoc[] +include::shared/mirrors.adoc[] +include::shared/releases.adoc[] +include::shared/attributes/attributes-{{% lang %}}.adoc[] +include::shared/{{% lang %}}/teams.adoc[] +include::shared/{{% lang %}}/mailing-lists.adoc[] +include::shared/{{% lang %}}/urls.adoc[] +toc::[] +endif::[] +ifdef::backend-pdf,backend-epub3[] +include::../../../../../shared/asciidoctor.adoc[] +endif::[] +endif::[] + +ifndef::env-beastie[] +toc::[] +include::../../../../../shared/asciidoctor.adoc[] +endif::[] + +[[flavors-intro]] +== Введение в флейворы (Flavors) + +Флейворы (Flavors) — это способ создания нескольких вариаций порта. Порт собирается несколько раз с различными вариациями. + +Например, порт может иметь обычную версию с множеством функций и значительным количеством зависимостей, а также облегчённую "lite"-версию только с базовыми функциями и минимальными зависимостями. + +Еще одним примером может быть порт с вариантом GTK и вариантом QT, в зависимости от используемого набора инструментов. + +[[flavors-using]] +== Использование FLAVORS + +Чтобы объявить порт с несколькими флейворами, добавьте `FLAVORS` в его [.filename]#Makefile#. Первый вариант в `FLAVORS` является вариантом по умолчанию. + +[TIP] +==== +Это может помочь упростить логику [.filename]#Makefile#, также определив `FLAVOR` как: + +[.programlisting] +.... +FLAVOR?= ${FLAVORS:[1]} +.... +==== + +[IMPORTANT] +==== +Чтобы отличать флейворы от опций, которые всегда обозначаются заглавными буквами, названия флейворов могут содержать _только_ строчные буквы, цифры и символ подчёркивания `_`. +==== + +[[flavors-using-ex1]] +.Основы использования флейворов +[example] +==== +Если порт имеет "облегченный" подчиненный порт (lite slave port), подчиненный порт можно удалить, а порт преобразовать во флейворы с помощью: + +[.programlisting] +.... +FLAVORS= default lite +lite_PKGNAMESUFFIX= -lite +[...] +.if ${FLAVOR:U} != lite +[enable non lite features] +.endif +.... + +==== + +[[flavors-using-ex2]] +.Еще один пример базового использования флейворов +[example] +==== +Если порт имеет подчиненный порт `-nox11`, подчиненный порт можно удалить, а порт преобразовать в флейворы с помощью: + +[.programlisting] +.... +FLAVORS= x11 nox11 +FLAVOR?= ${FLAVORS:[1]} +nox11_PKGNAMESUFFIX= -nox11 +[...] +.if ${FLAVOR} == x11 +[enable x11 features] +.endif +.... + +==== + +[[flavors-using-ex3]] +.Использование флейворов в более сложных примерах +[example] +==== +Вот слегка отредактированный отрывок из того, что присутствует в пакете package:devel/libpeas[], порте, который использует crossref:flavors[flavors-auto-python,флейворы Python]. При стандартных версиях Python 2 и 3, а именно 2.7 и 3.6, он автоматически получит `FLAVORS=py27 py36` + +[.programlisting] +.... +USES= gnome python +USE_PYTHON= flavors + +.if ${FLAVOR:Upy27:Mpy2*} +USE_GNOME= pygobject3 + +CONFIGURE_ARGS+= --enable-python2 --disable-python3 + +BUILD_WRKSRC= ${WRKSRC}/loaders/python +INSTALL_WRKSRC= ${WRKSRC}/loaders/python +.else # py3* +USE_GNOME+= py3gobject3 + +CONFIGURE_ARGS+= --disable-python2 --enable-python3 \ + ac_cv_path_PYTHON3_CONFIG=${LOCALBASE}/bin/python${PYTHON_VER}-config + +BUILD_WRKSRC= ${WRKSRC}/loaders/python3 +INSTALL_WRKSRC= ${WRKSRC}/loaders/python3 +.endif + +py34_PLIST= ${.CURDIR}/pkg-plist-py3 +py35_PLIST= ${.CURDIR}/pkg-plist-py3 +py36_PLIST= ${.CURDIR}/pkg-plist-py3 +.... + +Этот порт не использует `USE_PYTHON=distutils`, но всё равно требует флейворы Python. Чтобы избежать ошибки в man:make[1] из-за пустого значения `FLAVOR`, используйте `${FLAVOR:U}` в сравнениях строк вместо `${FLAVOR}`. Привязки Gnome Python gobject3 имеют два разных названия: pygobject3 для Python 2 и py3gobject3 для Python 3. Скрипт `configure` должен выполняться в [.filename]#${WRKSRC}#, но нас интересует только сборка и установка частей программного обеспечения для Python 2 или Python 3, поэтому установите базовые каталоги сборки и установки соответствующим образом. Подсказка о правильном пути к конфигурационному скрип ту Python 3. Список упаковки отличается при сборке с Python 3. Поскольку есть три возможные версии Python 3, установите `PLIST` для всех трёх с помощью crossref:flavors[flavors-using-helpers, вспомогательные инструменты флейворов]. +==== + +[[flavors-using-helpers]] +=== Вспомогательные инструменты для флейворов (Flavors Helpers) + +Чтобы упростить написание [.filename]#Makefile#, существуют несколько вспомогательных инструментов (помощников) флейворов. + +Этот список помощников установит их переменную: + +* `__flavor___PKGNAMEPREFIX` +* `__flavor___PKGNAMESUFFIX` +* `__flavor___PLIST` +* `__flavor___DESCR` + +Этот список помощников будет добавлен к их переменной: + +* `__flavor___CONFLICTS` +* `__flavor___CONFLICTS_BUILD` +* `__flavor___CONFLICTS_INSTALL` +* `__flavor___PKG_DEPENDS` +* `__flavor___EXTRACT_DEPENDS` +* `__flavor___PATCH_DEPENDS` +* `__flavor___FETCH_DEPENDS` +* `__flavor___BUILD_DEPENDS` +* `__flavor___LIB_DEPENDS` +* `__flavor___RUN_DEPENDS` +* `__flavor___TEST_DEPENDS` + +[[flavors-helpers-ex1]] +.Специфичный для флейвора `PKGNAME` +[example] +==== +Поскольку все пакеты должны иметь уникальные имена, флейворы должны изменять их, используя `__flavor___PKGNAMEPREFIX` и `__flavor___PKGNAMESUFFIX`, что упрощает задачу: + +[.programlisting] +.... +FLAVORS= normal lite +lite_PKGNAMESUFFIX= -lite +.... + +==== + +[[flavors-auto-php]] +== `USES=php` и флейворы + +При использовании crossref:uses[uses-php,`php`] с одним из этих аргументов: `phpize`, `ext`, `zend` или `pecl`, порт автоматически получит заполненный параметр `FLAVORS` с версиями PHP, которые он поддерживает. + +[[flavors-auto-php-ex1]] +.Простое расширение `USES=php` +[example] +==== +Это создаст пакет для всех поддерживаемых версий: + +[.programlisting] +.... +PORTNAME= some-ext +PORTVERSION= 0.0.1 +PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX} + +USES= php:ext +.... + +Это создаст пакет для всех поддерживаемых версий, кроме 7.2: + +[.programlisting] +.... +PORTNAME= some-ext +PORTVERSION= 0.0.1 +PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX} + +USES= php:ext +IGNORE_WITH_PHP= 72 +.... + +==== + +[[flavors-auto-php-app]] +=== Версии PHP с приложениями PHP + +Приложения PHP также могут быть созданы с использованием флейворов. + +Это позволяет создавать пакеты для всех версий PHP, чтобы пользователи могли использовать их с любой необходимой версией на своих серверах. + +[IMPORTANT] +==== +Приложения PHP, которые используют флейворы, _обязаны_ добавлять `PHP_PKGNAMESUFFIX` к именам своих пакетов. +==== + +[[flavors-auto-php-app-ex1]] +.Добавление флейворов в PHP-приложения +[example] +==== +Добавление поддержки флейворов в PHP-приложение просто: + +[.programlisting] +.... +PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} + +USES= php:flavors +.... + +==== + +[TIP] +==== +При добавлении зависимости к порту с вариантом PHP используйте `@${PHP_FLAVOR}`. _Никогда_ не используйте `FLAVOR` напрямую. +==== + +[[flavors-auto-python]] +== `USES=python` и флейворы + +При использовании crossref:uses[uses-python,`python`] и `USE_PYTHON=distutils` порт автоматически получит заполненные `FLAVORS` с версиями Python, которые он поддерживает. + +[[flavors-auto-python-ex1]] +.Простой `USES=python` +[example] +==== +Предполагая, что поддерживаемые версии Python — 2.7, 3.4, 3.5 и 3.6, а версии Python 2 и 3 по умолчанию — 2.7 и 3.6, порт с параметрами: + +[.programlisting] +.... +USES= python +USE_PYTHON= distutils +.... + +получит следующие флейворы: `py27` и `py36`. + +[.programlisting] +.... +USES= python +USE_PYTHON= distutils allflavors +.... + +получит следующие флейворы: `py27`, `py34`, `py35` и `py36`. +==== + +[[flavors-auto-python-ex2]] +.`USES=python` с требованиями к версии +[example] +==== +Предполагая, что поддерживаемые версии Python — 2.7, 3.4, 3.5 и 3.6, а версии Python 2 и 3 по умолчанию — 2.7 и 3.6, порт с параметрами: + +[.programlisting] +.... +USES= python:-3.5 +USE_PYTHON= distutils +.... + +получит следующие флейвор: `py27`. + +[.programlisting] +.... +USES= python:-3.5 +USE_PYTHON= distutils allflavors +.... + +получит следующие флейворы: `py27`, `py34` и `py35`. + +[.programlisting] +.... +USES= python:3.4+ +USE_PYTHON= distutils +.... + +получит следующий флейвор: `py36`. + +[.programlisting] +.... +USES= python:3.4+ +USE_PYTHON= distutils allflavors +.... + +получит следующие флейворы: `py34`, `py35` и `py36`. +==== + +`PY_FLAVOR` доступен для указания правильной версии модулей Python. Все зависимости от вариантов портов Python должны использовать `PY_FLAVOR`, а не `FLAVOR` напрямую. + +[[flavors-auto-python-ex3]] +.Для порта, не использующего `distutils` +[example] +==== +Если версия Python 3 по умолчанию — 3.6, следующая команда установит `PY_FLAVOR` в значение `py36`: + +[.programlisting] +.... +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mutagen>0:audio/py-mutagen@${PY_FLAVOR} + +USES= python:3.5+ +.... + +==== + +[[flavors-auto-lua]] +== `USES=lua` и флейворы + +При использовании crossref:uses[uses-lua,`lua:module`] или crossref:uses[uses-lua,`lua:flavors`] порт автоматически получит заполненный параметр `FLAVORS` с версиями Lua, которые он поддерживает. Однако предполагается, что обычные приложения (а не модули Lua) не должны использовать эту возможность; большинству приложений, которые встраивают или иным образом используют Lua, следует просто указывать `USES=lua`. + +`LUA_FLAVOR` доступен (и должен использоваться) для зависимости от правильной версии зависимостей, независимо от того, использовал ли порт параметры `flavors` или `module`. + +См. crossref:special[using-lua,Использование Lua] для получения дополнительной информации. + +[[flavors-auto-guile]] +== `USES=guile` и флейворы + +При использовании crossref:uses[uses-guile,`guile:flavors`] порт автоматически получит заполненное поле `FLAVORS` с версиями Guile, которые он поддерживает. Однако не предполагается, что обычные приложения должны использовать эту возможность; она в первую очередь предназначена для библиотек и расширений, таких как `guile-lib` или `guile-cairo`. + +`GUILE_FLAVOR` доступен (и должен использоваться) для зависимости от правильной версии зависимостей с флейворами, независимо от того, использовал ли порт параметр `flavors` или нет. + +См. crossref:special[using-guile,Использование Guile] для получения дополнительной информации. diff --git a/documentation/content/ru/books/porters-handbook/flavors/_index.po b/documentation/content/ru/books/porters-handbook/flavors/_index.po new file mode 100644 index 0000000000..9e9ed2fcb6 --- /dev/null +++ b/documentation/content/ru/books/porters-handbook/flavors/_index.po @@ -0,0 +1,801 @@ +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR The FreeBSD Project +# This file is distributed under the same license as the FreeBSD Documentation package. +# Vladlen Popolitov <vladlenpopolitov@list.ru>, 2025. +msgid "" +msgstr "" +"Project-Id-Version: FreeBSD Documentation VERSION\n" +"POT-Creation-Date: 2025-09-18 22:05+0300\n" +"PO-Revision-Date: 2025-07-13 19:10+0000\n" +"Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" +"Language-Team: Russian <https://translate-dev.freebsd.org/projects/" +"documentation/booksporters-handbookflavors_index/ru/>\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.17\n" + +#. type: Yaml Front Matter Hash Value: description +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:1 +#, no-wrap +msgid "Flavors are a way to have multiple variations of a port" +msgstr "Флейворы — это способ создания нескольких вариаций порта" + +#. type: Yaml Front Matter Hash Value: title +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:1 +#, no-wrap +msgid "Chapter 7. Flavors" +msgstr "Глава 7. Флейворы" + +#. type: Title = +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:14 +#, no-wrap +msgid "Flavors" +msgstr "Флейворы" + +#. type: Title == +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:52 +#, no-wrap +msgid "An Introduction to Flavors" +msgstr "Введение в флейворы (Flavors)" + +#. type: Plain text +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:56 +msgid "" +"Flavors are a way to have multiple variations of a port. The port is built " +"multiple times, with variations." +msgstr "" +"Флейворы (Flavors) — это способ создания нескольких вариаций порта. Порт " +"собирается несколько раз с различными вариациями." + +#. type: Plain text +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:58 +msgid "" +"For example, a port can have a normal version with many features and quite a " +"few dependencies, and a light \"lite\" version with only basic features and " +"minimal dependencies." +msgstr "" +"Например, порт может иметь обычную версию с множеством функций и " +"значительным количеством зависимостей, а также облегчённую \"lite\"-версию " +"только с базовыми функциями и минимальными зависимостями." + +#. type: Plain text +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:60 +msgid "" +"Another example could be, a port can have a GTK flavor and a QT flavor, " +"depending on which toolkit it uses." +msgstr "" +"Еще одним примером может быть порт с вариантом GTK и вариантом QT, в " +"зависимости от используемого набора инструментов." + +#. type: Title == +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:62 +#, no-wrap +msgid "Using FLAVORS" +msgstr "Использование FLAVORS" + +#. type: Plain text +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:66 +msgid "" +"To declare a port having multiple flavors, add `FLAVORS` to its " +"[.filename]#Makefile#. The first flavor in `FLAVORS` is the default flavor." +msgstr "" +"Чтобы объявить порт с несколькими флейворами, добавьте `FLAVORS` в его " +"[.filename]#Makefile#. Первый вариант в `FLAVORS` является вариантом по " +"умолчанию." + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:70 +msgid "" +"It can help simplify the logic of the [.filename]#Makefile# to also define " +"`FLAVOR` as:" +msgstr "" +"Это может помочь упростить логику [.filename]#Makefile#, также определив " +"`FLAVOR` как:" + +#. type: delimited block . 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:74 +#, no-wrap +msgid "FLAVOR?=\t${FLAVORS:[1]}\n" +msgstr "FLAVOR?=\t${FLAVORS:[1]}\n" + +#. type: Plain text +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:80 +msgid "" +"To distinguish flavors from options, which are always uppercase letters, " +"flavor names can _only_ contain lowercase letters, numbers, and the " +"underscore `_`." +msgstr "" +"Чтобы отличать флейворы от опций, которые всегда обозначаются заглавными " +"буквами, названия флейворов могут содержать _только_ строчные буквы, цифры и " +"символ подчёркивания `_`." + +#. type: Block title +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:83 +#, no-wrap +msgid "Basic Flavors Usage" +msgstr "Основы использования флейворов" + +#. type: Plain text +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:87 +msgid "" +"If a port has a \"lite\" slave port, the slave port can be removed, and the " +"port can be converted to flavors with:" +msgstr "" +"Если порт имеет \"облегченный\" подчиненный порт (lite slave port), " +"подчиненный порт можно удалить, а порт преобразовать во флейворы с помощью:" + +#. type: delimited block . 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:96 +#, no-wrap +msgid "" +"FLAVORS=\tdefault lite\n" +"lite_PKGNAMESUFFIX=\t-lite\n" +"[...]\n" +".if ${FLAVOR:U} != lite\n" +"[enable non lite features]\n" +".endif\n" +msgstr "" +"FLAVORS=\tdefault lite\n" +"lite_PKGNAMESUFFIX=\t-lite\n" +"[...]\n" +".if ${FLAVOR:U} != lite\n" +"[enable non lite features]\n" +".endif\n" + +#. type: Block title +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:101 +#, no-wrap +msgid "Another Basic Flavors Usage" +msgstr "Еще один пример базового использования флейворов" + +#. type: Plain text +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:105 +msgid "" +"If a port has a `-nox11` slave port, the slave port can be removed, and the " +"port can be converted to flavors with:" +msgstr "" +"Если порт имеет подчиненный порт `-nox11`, подчиненный порт можно удалить, а " +"порт преобразовать в флейворы с помощью:" + +#. type: delimited block . 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:115 +#, no-wrap +msgid "" +"FLAVORS=\tx11 nox11\n" +"FLAVOR?=\t${FLAVORS:[1]}\n" +"nox11_PKGNAMESUFFIX=\t-nox11\n" +"[...]\n" +".if ${FLAVOR} == x11\n" +"[enable x11 features]\n" +".endif\n" +msgstr "" +"FLAVORS=\tx11 nox11\n" +"FLAVOR?=\t${FLAVORS:[1]}\n" +"nox11_PKGNAMESUFFIX=\t-nox11\n" +"[...]\n" +".if ${FLAVOR} == x11\n" +"[enable x11 features]\n" +".endif\n" + +#. type: Block title +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:120 +#, no-wrap +msgid "More Complex Flavors Usage" +msgstr "Использование флейворов в более сложных примерах" + +#. type: Plain text +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:126 +msgid "" +"Here is a slightly edited excerpt of what is present in package:devel/" +"libpeas[], a port that uses the crossref:flavors[flavors-auto-python,Python " +"flavors]. With the default Python 2 and 3 versions being 2.7 and 3.6, it " +"will automatically get `FLAVORS=py27 py36`" +msgstr "" +"Вот слегка отредактированный отрывок из того, что присутствует в пакете " +"package:devel/libpeas[], порте, который использует crossref:flavors[flavors-" +"auto-python,флейворы Python]. При стандартных версиях Python 2 и 3, а именно " +"2.7 и 3.6, он автоматически получит `FLAVORS=py27 py36`" + +#. type: delimited block . 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:131 +#, no-wrap +msgid "" +"USES=\t\tgnome python\n" +"USE_PYTHON=\tflavors \n" +msgstr "" +"USES=\t\tgnome python\n" +"USE_PYTHON=\tflavors \n" + +#. type: delimited block . 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:134 +#, no-wrap +msgid "" +".if ${FLAVOR:Upy27:Mpy2*} \n" +"USE_GNOME=\tpygobject3 \n" +msgstr "" +".if ${FLAVOR:Upy27:Mpy2*} \n" +"USE_GNOME=\tpygobject3 \n" + +#. type: delimited block . 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:136 +#, no-wrap +msgid "CONFIGURE_ARGS+=\t--enable-python2 --disable-python3\n" +msgstr "CONFIGURE_ARGS+=\t--enable-python2 --disable-python3\n" + +#. type: delimited block . 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:141 +#, no-wrap +msgid "" +"BUILD_WRKSRC=\t${WRKSRC}/loaders/python \n" +"INSTALL_WRKSRC=\t${WRKSRC}/loaders/python \n" +".else # py3*\n" +"USE_GNOME+=\tpy3gobject3 \n" +msgstr "" +"BUILD_WRKSRC=\t${WRKSRC}/loaders/python \n" +"INSTALL_WRKSRC=\t${WRKSRC}/loaders/python \n" +".else # py3*\n" +"USE_GNOME+=\tpy3gobject3 \n" + +#. type: delimited block . 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:144 +#, no-wrap +msgid "" +"CONFIGURE_ARGS+=\t--disable-python2 --enable-python3 \\\n" +"\t\t\tac_cv_path_PYTHON3_CONFIG=${LOCALBASE}/bin/python${PYTHON_VER}-config \n" +msgstr "" +"CONFIGURE_ARGS+=\t--disable-python2 --enable-python3 \\\n" +"\t\t\tac_cv_path_PYTHON3_CONFIG=${LOCALBASE}/bin/python${PYTHON_VER}-config \n" + +#. type: delimited block . 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:148 +#, no-wrap +msgid "" +"BUILD_WRKSRC=\t${WRKSRC}/loaders/python3 \n" +"INSTALL_WRKSRC=\t${WRKSRC}/loaders/python3 \n" +".endif\n" +msgstr "" +"BUILD_WRKSRC=\t${WRKSRC}/loaders/python3 \n" +"INSTALL_WRKSRC=\t${WRKSRC}/loaders/python3 \n" +".endif\n" + +#. type: delimited block . 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:152 +#, no-wrap +msgid "" +"py34_PLIST=\t${.CURDIR}/pkg-plist-py3 \n" +"py35_PLIST=\t${.CURDIR}/pkg-plist-py3 \n" +"py36_PLIST=\t${.CURDIR}/pkg-plist-py3\n" +msgstr "" +"py34_PLIST=\t${.CURDIR}/pkg-plist-py3 \n" +"py35_PLIST=\t${.CURDIR}/pkg-plist-py3 \n" +"py36_PLIST=\t${.CURDIR}/pkg-plist-py3\n" + +#. type: Plain text +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:162 +msgid "" +"This port does not use `USE_PYTHON=distutils` but needs Python flavors " +"anyway. To guard against `FLAVOR` being empty, which would cause a " +"man:make[1] error, use `${FLAVOR:U}` in string comparisons instead of `$" +"{FLAVOR}`. The Gnome Python gobject3 bindings have two different names, one " +"for Python 2, pygobject3 and one for Python 3, py3gobject3. The `configure` " +"script has to run in [.filename]#${WRKSRC}#, but we are only interested in " +"building and installing the Python 2 or Python 3 parts of the software, so " +"set the build and install base directories appropriately. Hint about the " +"correct Python 3 config script path name. The packing list is different " +"when the built with Python 3. As there are three possible Python 3 versions, " +"set `PLIST` for all three using the crossref:flavors[flavors-using-" +"helpers,helper]." +msgstr "" +"Этот порт не использует `USE_PYTHON=distutils`, но всё равно требует " +"флейворы Python. Чтобы избежать ошибки в man:make[1] из-за пустого значения " +"`FLAVOR`, используйте `${FLAVOR:U}` в сравнениях строк вместо `${FLAVOR}`. " +"Привязки Gnome Python gobject3 имеют два разных названия: pygobject3 для " +"Python 2 и py3gobject3 для Python 3. Скрипт `configure` должен выполняться в " +"[.filename]#${WRKSRC}#, но нас интересует только сборка и установка частей " +"программного обеспечения для Python 2 или Python 3, поэтому установите " +"базовые каталоги сборки и установки соответствующим образом. Подсказка о " +"правильном пути к конфигурационному скрипту Python 3. Список упаковки " +"отличается при сборке с Python 3. Поскольку есть три возможные версии Python " +"3, установите `PLIST` для всех трёх с помощью crossref:flavors[flavors-using-" +"helpers, вспомогательные инструменты флейворов]." + +#. type: Title === +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:165 +#, no-wrap +msgid "Flavors Helpers" +msgstr "Вспомогательные инструменты для флейворов (Flavors Helpers)" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:168 +msgid "" +"To make the [.filename]#Makefile# easier to write, a few flavors helpers " +"exist." +msgstr "" +"Чтобы упростить написание [.filename]#Makefile#, существуют несколько " +"вспомогательных инструментов (помощников) флейворов." + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:170 +msgid "This list of helpers will set their variable:" +msgstr "Этот список помощников установит их переменную:" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:172 +msgid "`__flavor___PKGNAMEPREFIX`" +msgstr "`__flavor___PKGNAMEPREFIX`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:173 +msgid "`__flavor___PKGNAMESUFFIX`" +msgstr "`__flavor___PKGNAMESUFFIX`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:174 +msgid "`__flavor___PLIST`" +msgstr "`__flavor___PLIST`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:175 +msgid "`__flavor___DESCR`" +msgstr "`__flavor___DESCR`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:177 +msgid "This list of helpers will append to their variable:" +msgstr "Этот список помощников будет добавлен к их переменной:" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:179 +msgid "`__flavor___CONFLICTS`" +msgstr "`__flavor___CONFLICTS`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:180 +msgid "`__flavor___CONFLICTS_BUILD`" +msgstr "`__flavor___CONFLICTS_BUILD`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:181 +msgid "`__flavor___CONFLICTS_INSTALL`" +msgstr "`__flavor___CONFLICTS_INSTALL`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:182 +msgid "`__flavor___PKG_DEPENDS`" +msgstr "`__flavor___PKG_DEPENDS`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:183 +msgid "`__flavor___EXTRACT_DEPENDS`" +msgstr "`__flavor___EXTRACT_DEPENDS`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:184 +msgid "`__flavor___PATCH_DEPENDS`" +msgstr "`__flavor___PATCH_DEPENDS`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:185 +msgid "`__flavor___FETCH_DEPENDS`" +msgstr "`__flavor___FETCH_DEPENDS`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:186 +msgid "`__flavor___BUILD_DEPENDS`" +msgstr "`__flavor___BUILD_DEPENDS`" + +#. type: delimited block = 4 +#: documentation/content/en/books/porters-handbook/flavors/_index.adoc:187 +msgid "`__flavor___LIB_DEPENDS`" +msgstr "`__flavor___LIB_DEPENDS`" + +#. type: delimited block = 4 *** 112500 LINES SKIPPED ***home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509181922.58IJMafl006039>
