Difference between pages "Package:Eselect (OpenGL)" and "Install/pt-br/Profiles"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
(update paths)
 
 
Line 1: Line 1:
{{Ebuild
=== Profiles ===
|Summary=A Gentoo/Funtoo utility that allows the active OpenGL implementation on a system to be switched between a variety of installed options.
|CatPkg=app-admin/eselect-opengl
|Maintainer=
}}
== Introduction ==


Eselect (OpenGL) (also called <tt>eselect-opengl</tt>) is a module for [[Package:Eselect|Eselect]] that allows the OpenGL implementation on a Funtoo Linux or Gentoo Linux system to be switched between a variety of installed OpenGL implementations. It functions by creating an <tt>env.d</tt> file at <tt>/etc/env.d/03opengl</tt> which contains OpenGL settings, as well as managing symbolic links to OpenGL libraries and headers.  
Uma vez que você tenha reiniciado no Funtoo Linux, você pode mais tarde personalizar seu sistema para as suas necessidade ao usar o Funtoo Profiles.


=== Sample env.d File ===
[[Funtoo 1.0 Profile|Funtoo profiles]] são utilizados para padões para específico Portage para suas necessidades. Há 4 típicos básicos de perfil (profile types): arch, build, [[Flavors and Mix-ins|flavor, and mix-ins]]:


A sample <tt>env.d</tt> file for a multilib system with xorg-x11 OpenGL implementation may look like this:
;arch: tipicamente <code>x86-32bit</code> ou <code>x86-64bit</code>, isso define o tipo de processador e suporte do seu sistema. Isso é definido quando seu stage foi construído e não deve ser alterado.
;build: define se seu sistema é um build <code>current</code>, <code>stable</code> ou <code>experimental</code>. Sistemas <code>current</code> terão pacotes mais recentes do que os sistemas <code>stable</code>.
;flavor: define o tipo geral de sistema, tal como <code>server</code> ou <code>desktop</code>, e definirá flags padrões USE apropriadas para as suas necessidade.
;mix-ins: define várias configurações opcionais que você pode estar interessado em habilitar.


{{file|name=/etc/env.d/03opengl|desc=An example env.d file for eselect-opengl|body=
Um arch, build e flavor deve ser definido para cada sistema Funtoo Linux, enquanto mix-ins são opcionais e você pode habilitar mais de um se desejado.
# Configuration file for eselect
# This file has been automatically generated.
LDPATH="/usr/lib32/opengl/xorg-x11/lib:/usr/lib64/opengl/xorg-x11/lib"
OPENGL_PROFILE="xorg-x11"
}}


== Implementation ==
Lembre-se de que profiles pode com frequência serem herdados. Por exemplo, o flavor <code>desktop</code> herda as configurações do flavor <code>workstation</code>, que em retorno herda os mix-ins <code>X</code> e <code>audio</code>. Você pode visualizar isso ao utilizar eselect:
 
Eselect-opengl is implemented as a single bash-based [[Package:Eselect|Eselect]] module approximately 10K in size, installed at <tt>/usr/share/eselect/modules/opengl.eselect</tt>. One interfaces with this module via the main <tt>eselect</tt> command:


<console>
<console>
# ##i##eselect opengl help
(chroot) # ##i##eselect profile show
Manage the OpenGL implementation used by your system
Currently set profiles:
Usage: eselect opengl <action> <options>
    arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit
  build: gentoo:funtoo/1.0/linux-gnu/build/current
  flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/kde


##g##Standard actions:
Automatically enabled profiles:
  help                      Display help text
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print
  usage                    Display usage information
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X
  version                  Display version information
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras
</console>


##g##Extra actions:
Para visualizar profiles instalados:
  list                      List the available OpenGL implementations.
<console>
  set <target>             Select the OpenGL implementation.
(chroot) # ##i##eselect profile list
    <target>                  The profile to activate
    --use-old                If an implementation is already set, use that one instead
    --prefix=<val>            Set the source prefix (default: /usr)
    --dst-prefix=<val>        Set the destination prefix (default: /usr)
    --ignore-missing          Ignore missing files when setting a new implementation
  show                      Print the current OpenGL implementation.
</console>
</console>


== What is Switched ==
Para alterar o profile flavor:
<console>
(chroot) # ##i##eselect profile set-flavor 7
</console>


Using <tt>eselect opengl set</tt> causes the following symbolic links to be updated to point to the files corresponding to the OpenGL implementation that you chose:  
Para adicionar um mix-in:


* ''Libraries'' (32-bit and 64-bit):
<console>
** <tt>/usr/lib(64)/libGL.so.*</tt>
(chroot) # ##i##eselect profile add 10
** <tt>/usr/lib(64)/libEGL.so.*</tt>
</console>
** <tt>/usr/lib/(32|64|)/libGLESv1.so.*</tt>
** <tt>/usr/lib/(32|64|)/libGLESv2.so.*</tt>
* ''C Headers'':
** <tt>/usr/include/GL/*</tt>
** <tt>/usr/include/EGL/*</tt>
** <tt>/usr/include/KHR/*</tt>
* <tt>/usr/lib(64|)/xorg/modules/extensions/libglx.so</tt>
 
The symbolic links point to an installed OpenGL implementation, stored inside <tt>/usr/lib(32|64|)/opengl/(implementation-name)</tt>. These files are structured as follows:
 
* <tt>/usr/lib/opengl/(implementation-name)/lib</tt>
* <tt>/usr/lib/opengl/(implementation-name)/include/(GL|EGL|KHR)</tt>
* <tt>/usr/lib/opengl/(implementation-name)/extensions/libglx.so</tt>
 
On multilib systems, ebuilds that provide an OpenGL implementation install 32-bit libraries in <tt>/usr/lib32/opengl/(implementation name)/lib</tt> and 64-bit libraries in <tt>/usr/lib64/opengl/(implementation name)/lib</tt>.
 
 
== Criticisms ==
 
=== Violation of Build Consistency ===
 
As documented in {{Bug|FL-1309}}, sometimes packages fail to merge when the "wrong" eselect opengl implementation is selected. This violates Portage's ability to consistently build a package from source, assuming all its dependencies are satisfied. This could be classified as a design bug -- eselect-opengl is functioning as intended, but its underlying theory of operation is not correct.
 
===== Possible Solutions =====
 
A possible solution to this problem, discussed in {{Bug|FL-1309}}, is to redesign eselect-opengl to only select the ''runtime'' OpenGL implementation, but to have all ebuilds build against the official xorg-x11 OpenGL implementation.
 
The rationale for this design change is that:
# There should be a consistent and repeatable build/linking process for all OpenGL applications.
# AMD and NVIDIA implementations of OpenGL are designed to be more of a "drop-in" runtime replacement for xorg-x11, rather than a standalone replacement for xorg-x11, and thus appear to exhibit more build-time bugs.
 
 
 
 
{{EbuildFooter}}

Revision as of 18:47, March 12, 2015

Profiles

Uma vez que você tenha reiniciado no Funtoo Linux, você pode mais tarde personalizar seu sistema para as suas necessidade ao usar o Funtoo Profiles.

Funtoo profiles são utilizados para padões para específico Portage para suas necessidades. Há 4 típicos básicos de perfil (profile types): arch, build, flavor, and mix-ins:

arch
tipicamente x86-32bit ou x86-64bit, isso define o tipo de processador e suporte do seu sistema. Isso é definido quando seu stage foi construído e não deve ser alterado.
build
define se seu sistema é um build current, stable ou experimental. Sistemas current terão pacotes mais recentes do que os sistemas stable.
flavor
define o tipo geral de sistema, tal como server ou desktop, e definirá flags padrões USE apropriadas para as suas necessidade.
mix-ins
define várias configurações opcionais que você pode estar interessado em habilitar.

Um arch, build e flavor deve ser definido para cada sistema Funtoo Linux, enquanto mix-ins são opcionais e você pode habilitar mais de um se desejado.

Lembre-se de que profiles pode com frequência serem herdados. Por exemplo, o flavor desktop herda as configurações do flavor workstation, que em retorno herda os mix-ins X e audio. Você pode visualizar isso ao utilizar eselect:

(chroot) # eselect profile show
Currently set profiles:
    arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit
   build: gentoo:funtoo/1.0/linux-gnu/build/current
  flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/kde

Automatically enabled profiles:
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras

Para visualizar profiles instalados:

(chroot) # eselect profile list

Para alterar o profile flavor:

(chroot) # eselect profile set-flavor 7

Para adicionar um mix-in:

(chroot) # eselect profile add 10