Translation

(itstool) path: example/para
Finally, <filename>distinfo</filename> needs to be regenerated to contain all the distribution files:
119/1010
Context English Portuguese (Brazil) State
will install <literal>dnscrypt-proxy</literal> to <literal>${PREFIX}/sbin</literal>.
irá instalar <literal>dnscrypt-proxy</literal> em <literal>${PREFIX}/sbin</literal>.
Building <application>Haskell</application> Applications with <command>cabal</command>
Compilando Aplicações <application>Haskell</application> com <command>cabal</command>
For ports that use <application>Cabal</application>, build system defines <literal>USES=cabal</literal>. Refer to <xref linkend="uses-cabal"/> for a list of variables that can be set to control the build process.
Para ports que usam <application>Cabal</application>, defina o sistema de compilação <literal>USES=cabal</literal>. Consulte <xref linkend="uses-cabal"/> para obter a lista de variáveis que podem ser configuradas para controlar o processo de compilação.
Creating a Port for a Hackage-hosted Haskell Application
Criando um Port para uma Aplicação Hackage-hosted Haskell
When preparing a Haskell Cabal port, the <package role="port">devel/hs-cabal-install</package> program is required, so make sure it is installed beforehand. First we need to define common ports variables that allows cabal-install to fetch the package distribution file:
Ao preparar um port Haskell Cabal, o programa <package role="port">devel/hs-cabal-install</package> é necessário, portanto, certifique-se de que esteja instalado previamente. Primeiro, precisamos definir variáveis de ports comuns que permitem ao cabal-install buscar o arquivo de distribuição de pacotes:
PORTNAME= ShellCheck
DISTVERSION= 0.6.0
CATEGORIES= devel

MAINTAINER= haskell@FreeBSD.org
COMMENT= Shell script analysis tool

USES= cabal

.include &lt;bsd.port.mk&gt;
PORTNAME= ShellCheck
DISTVERSION= 0.6.0
CATEGORIES= devel

MAINTAINER= haskell@FreeBSD.org
COMMENT= Shell script analysis tool

USES= cabal

.include &lt;bsd.port.mk&gt;
This minimal Makefile allows us to fetch the distribution file:
Esse Makefile mínimo nos permite baixar o arquivo de distribuição:
<prompt>%</prompt> <userinput>make cabal-extract</userinput>
[...]
Downloading the latest package list from hackage.haskell.org
cabal get ShellCheck-0.6.0
Downloading ShellCheck-0.6.0
Downloaded ShellCheck-0.6.0
Unpacking to ShellCheck-0.6.0/
<prompt>%</prompt> <userinput>make cabal-extract</userinput>
[...]
Downloading the latest package list from hackage.haskell.org
cabal get ShellCheck-0.6.0
Downloading ShellCheck-0.6.0
Downloaded ShellCheck-0.6.0
Unpacking to ShellCheck-0.6.0/
Now we have ShellCheck.cabal package description file, which allows us to fetch all package's dependencies, including transitive ones:
Agora, temos o arquivo de descrição do pacote ShellCheck.cabal, que permite baixar todas as dependências do pacote, incluindo as transitivas:
<prompt>%</prompt> <userinput>make cabal-extract-deps</userinput>
[...]
Resolving dependencies...
Downloading base-orphans-0.8.2
Downloaded base-orphans-0.8.2
Downloading primitive-0.7.0.0
Starting base-orphans-0.8.2 (lib)
Building base-orphans-0.8.2 (lib)
Downloaded primitive-0.7.0.0
Downloading dlist-0.8.0.7
[...]
<prompt>%</prompt> <userinput>make cabal-extract-deps</userinput>
[...]
Resolving dependencies...
Downloading base-orphans-0.8.2
Downloaded base-orphans-0.8.2
Downloading primitive-0.7.0.0
Starting base-orphans-0.8.2 (lib)
Building base-orphans-0.8.2 (lib)
Downloaded primitive-0.7.0.0
Downloading dlist-0.8.0.7
[...]
As a side effect, the package's dependencies are also compiled, so the command may take some time. Once done, a list of required dependencies can generated:
Como efeito colateral, as dependências do pacote também são compiladas, portanto, o comando pode levar algum tempo. Uma vez feito, uma lista de dependências necessárias pode ser gerada:
<prompt>%</prompt> <userinput>make make-use-cabal</userinput>
USE_CABAL=QuickCheck-2.12.6.1 \
hashable-1.3.0.0 \
integer-logarithms-1.0.3 \
[...]
<prompt>%</prompt> <userinput>make make-use-cabal</userinput>
USE_CABAL=QuickCheck-2.12.6.1 \
hashable-1.3.0.0 \
integer-logarithms-1.0.3 \
[...]
Haskell packages may contain revisions, just like FreeBSD ports. Revisions can affect only <filename>.cabal</filename> files, but it is still important to pull them in. To check <varname>USE_CABAL</varname> items for available revision updates, run following command:
Pacotes Haskell podem conter revisões, assim como nos ports do FreeBSD. As revisões podem afetar apenas os arquivos <filename>.cabal</filename>, mas ainda é importante extraí-los. Para verificar os itens <varname>USE_CABAL</varname> quanto a atualizações de revisão disponíveis, execute o seguinte comando:
<prompt>%</prompt> <userinput>make make-use-cabal-revs</userinput>
USE_CABAL=QuickCheck-2.12.6.1_1 \
hashable-1.3.0.0 \
integer-logarithms-1.0.3_2 \
[...]
<prompt>%</prompt> <userinput>make make-use-cabal-revs</userinput>
USE_CABAL=QuickCheck-2.12.6.1_1 \
hashable-1.3.0.0 \
integer-logarithms-1.0.3_2 \
[...]
Note additional version numbers after <literal>_</literal> symbol. Put newly generated <varname>USE_CABAL</varname> list instead of an old one.
Observe os números de versão adicionais após o símbolo <literal>_</literal>. Coloque a lista <varname>USE_CABAL</varname> recém-gerada em vez de uma antiga.
Finally, <filename>distinfo</filename> needs to be regenerated to contain all the distribution files:
Finalmente, o <filename>distinfo</filename> precisa ser gerado novamente para conter todos os arquivos de distribuição:
<prompt>%</prompt> <userinput>make makesum</userinput>
=&gt; ShellCheck-0.6.0.tar.gz doesn't seem to exist in /usr/local/poudriere/ports/git/distfiles/cabal.
=&gt; Attempting to fetch https://hackage.haskell.org/package/ShellCheck-0.6.0/ShellCheck-0.6.0.tar.gz
ShellCheck-0.6.0.tar.gz 136 kB 642 kBps 00s
=&gt; QuickCheck-2.12.6.1/QuickCheck-2.12.6.1.tar.gz doesn't seem to exist in /usr/local/poudriere/ports/git/distfiles/cabal.
=&gt; Attempting to fetch https://hackage.haskell.org/package/QuickCheck-2.12.6.1/QuickCheck-2.12.6.1.tar.gz
QuickCheck-2.12.6.1/QuickCheck-2.12.6.1.tar.gz 65 kB 361 kBps 00s
[...]
<prompt>%</prompt> <userinput>make makesum</userinput>
=&gt; ShellCheck-0.6.0.tar.gz doesn't seem to exist in /usr/local/poudriere/ports/git/distfiles/cabal.
=&gt; Attempting to fetch https://hackage.haskell.org/package/ShellCheck-0.6.0/ShellCheck-0.6.0.tar.gz
ShellCheck-0.6.0.tar.gz 136 kB 642 kBps 00s
=&gt; QuickCheck-2.12.6.1/QuickCheck-2.12.6.1.tar.gz doesn't seem to exist in /usr/local/poudriere/ports/git/distfiles/cabal.
=&gt; Attempting to fetch https://hackage.haskell.org/package/QuickCheck-2.12.6.1/QuickCheck-2.12.6.1.tar.gz
QuickCheck-2.12.6.1/QuickCheck-2.12.6.1.tar.gz 65 kB 361 kBps 00s
[...]
Using GNU Autotools
Usando o GNU Autotools
If a port needs any of the GNU Autotools software, add <literal>USES=autoreconf</literal>. See <xref linkend="uses-autoreconf"/> for more information.
Se um port precisar de algum software GNU Autotools, adicione <literal>USES=autoreconf</literal>. Veja <xref linkend="uses-autoreconf"/> Para maiores informações.
Using GNU <literal>gettext</literal>
Usando o GNU <literal>gettext</literal>
Basic Usage
Uso Básico
If the port requires <literal>gettext</literal>, set <literal>USES= gettext</literal>, and the port will inherit a dependency on <filename>libintl.so</filename> from <package role="port">devel/gettext</package>. Other values for <literal>gettext</literal> usage are listed in <link linkend="uses-gettext"><literal>USES=gettext</literal></link>.
Se o port requer o <literal>gettext</literal>, defina <literal>USES=gettext</literal>, e o port herdará a dependência <filename>libintl.so</filename> do <package role="port">devel/gettext</package>. Outros valores para uso do <literal>gettext</literal> estão listados em <link linkend="uses-gettext"><literal>USES=gettext</literal></link>.
A rather common case is a port using <literal>gettext</literal> and <command>configure</command>. Generally, GNU <command>configure</command> should be able to locate <literal>gettext</literal> automatically.
Um caso bastante comum é um port que utilize o <literal>gettext</literal> e o <command>configure</command>. Geralmente, o GNU <command>configure</command> deve ser capaz de localizar o <literal>gettext</literal> automaticamente.
USES= gettext
GNU_CONFIGURE= yes
USES= gettext
GNU_CONFIGURE= yes
If it ever fails to, hints at the location of <literal>gettext</literal> can be passed in <envar>CPPFLAGS</envar> and <envar>LDFLAGS</envar> as follows:
Se falhar, dicas da localização do <literal>gettext</literal> podem ser informados por meio do <envar>CPPFLAGS</envar> e <envar>LDFLAGS</envar> do seguinte modo:
USES= gettext
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib

GNU_CONFIGURE= yes
USES= gettext
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib

GNU_CONFIGURE= yes
Optional Usage
Uso Opcional
Some software products allow for disabling <acronym>NLS</acronym>. For example, through passing <option>--disable-nls</option> to <command>configure</command>. In that case, the port must use <literal>gettext</literal> conditionally, depending on the status of the <literal>NLS</literal> option. For ports of low to medium complexity, use this idiom:
Alguns softwares permitem desabilitar o <acronym>NLS</acronym>. Por exemplo, passando <option>--disable-nls</option> para o <command>configure</command>. Nesse caso, o port deve usar <literal>gettext</literal> condicionalmente, dependendo do status da opção <literal>NLS</literal>. Para ports de baixa a média complexidade, use este idioma:
GNU_CONFIGURE= yes

OPTIONS_DEFINE= NLS
OPTIONS_SUB= yes

NLS_USES= gettext
NLS_CONFIGURE_ENABLE= nls

.include &lt;bsd.port.mk&gt;
GNU_CONFIGURE= yes

OPTIONS_DEFINE= NLS
OPTIONS_SUB= yes

NLS_USES= gettext
NLS_CONFIGURE_ENABLE= nls

.include &lt;bsd.port.mk&gt;
Or using the older way of using options:
Ou usando a maneira antiga de usar opções:
GNU_CONFIGURE= yes

OPTIONS_DEFINE= NLS

.include &lt;bsd.port.options.mk&gt;

.if ${PORT_OPTIONS:MNLS}
USES+= gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
.endif

.include &lt;bsd.port.mk&gt;
GNU_CONFIGURE= yes

OPTIONS_DEFINE= NLS

.include &lt;bsd.port.options.mk&gt;

.if ${PORT_OPTIONS:MNLS}
USES+= gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
.endif

.include &lt;bsd.port.mk&gt;

Loading…

Finally, <filename>distinfo</filename> needs to be regenerated to contain all the distribution files:
Finalmente, po <filename>distinfo</filename> precisa ser gerado novamente para conter todos os arquivos de distribuição:
a month ago
Finally, <filename>distinfo</filename> needs to be regenerated to contain all the distribution files:
OFinalmente, p <filename>distinfo</filename> precisa ser gerado novamente para conter todos os arquivos de distribuição:
a month ago
Browse all component changes

Glossary

English Portuguese (Brazil)
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: example/para
Labels
No labels currently set.
Source string location
book.translate.xml:10788
Source string age
5 months ago
Translation file
books/pt_BR/porters-handbook.po, string 2046