* [gentoo-dev] Supporting GLES-only implementations
@ 2012-03-03 17:26 Luca Barbato
2012-03-04 13:40 ` Luca Barbato
0 siblings, 1 reply; 3+ messages in thread
From: Luca Barbato @ 2012-03-03 17:26 UTC (permalink / raw
To: gentoo-dev
I'm trying to get better support for efika and possibly other similar
systems like pandaboard.
I already started to hack eselect-opengl and mesa to keep libGLES*,
libOpenVG and libEGL in the switchable dir and it seems to work properly.
Now I'd like to make ALL the GL/ GLES/ KHR/ and such headers switchable
as well.
One of the last items is discussing about what to do with
implementations that do not provide OpenGL.
I'd introduce a separate virtual for gles2, gles1 and openvg and make so
eselect-opengl does not complain if libGL is missing.
Anybody has interest and/or better ideas?
lu
PS: I'd consider GL implementations monolithic so you cannot mix and
match them at least for now.
--
Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] Supporting GLES-only implementations
2012-03-03 17:26 Luca Barbato
@ 2012-03-04 13:40 ` Luca Barbato
0 siblings, 0 replies; 3+ messages in thread
From: Luca Barbato @ 2012-03-04 13:40 UTC (permalink / raw
To: gentoo-dev
On 03/03/12 18:26, Luca Barbato wrote:
> I'm trying to get better support for efika and possibly other similar
> systems like pandaboard.
In order to make all the headers switchable I'd move the headers to
specific dirs, so we would have global/GL and all the implementations
(nvidia and ati) would have to move specific headers, if present,
accordingly.
lu
--
Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-dev] Supporting GLES-only implementations
@ 2012-03-25 1:14 Luca Barbato
0 siblings, 0 replies; 3+ messages in thread
From: Luca Barbato @ 2012-03-25 1:14 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
Provided with the eselect opengl patch an implementation and the mesa
changes. If they are ok for everybody I'd change the ati and nvidia
drivers as well. (a better name for the amd-graphics driver would be
welcome btw)
lu
--
Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero
[-- Attachment #2: 0001-opengl-support-gles-only-implementation.patch --]
[-- Type: text/x-patch, Size: 3019 bytes --]
From 17add6bb04836ee49f4babad51ed9f15b3fd9abe Mon Sep 17 00:00:00 2001
From: Luca Barbato <lu_zero@gentoo.org>
Date: Sat, 24 Mar 2012 18:07:06 -0700
Subject: [PATCH] opengl: support gles only implementation
Additionally make switching headers and libraries work for GLES OpenVG
and EGL.
---
modules/opengl.eselect | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/modules/opengl.eselect b/modules/opengl.eselect
index 2e8dd23..3f55ed5 100644
--- a/modules/opengl.eselect
+++ b/modules/opengl.eselect
@@ -140,14 +140,14 @@ setup_extensions_symlinks() {
setup_includes_symlinks() {
local target=$1
+ local files=$2
local file
local sdir
- shift
-
+ shift 2
mkdir -p "${target}" || die "Failed to create ${target}"
pushd "${target}" &> /dev/null
- for file in gl.h glx.h glxtokens.h glext.h glxext.h glxmd.h glxproto.h; do
+ for file in ${files}; do
for sdir in "$@"; do
if [[ -e ${sdir}/${file} ]]; then
upgrade_file "${sdir}/${file}" "${target}"
@@ -165,6 +165,7 @@ set_new_implementation() {
local moduledir
local gl_dir
local gl_local
+ local -A gl_header
# Set a sane umask... bug #83115
umask 022
@@ -178,7 +179,7 @@ set_new_implementation() {
for libdir in $(list_libdirs); do
[[ ${ROOT} != / ]] && libdir=${libdir#${EROOT}}
[[ -d ${PREFIX}/${libdir}/opengl && ! -h ${PREFIX}/${libdir} ]] || continue
- [[ -f "${PREFIX}/${libdir}/opengl/${gl_implem}/lib/libGL.so" ]] && found_libgl=yes
+ [[ -f "${PREFIX}/${libdir}/opengl/${gl_implem}/lib/libGL.so" || -f "${PREFIX}/${libdir}/opengl/${gl_implem}/.gles-only" ]] && found_libgl=yes
done
if [[ -z ${found_libgl} ]]; then
@@ -242,14 +243,19 @@ set_new_implementation() {
"${PREFIX}/${libdir}/opengl/${gl_local}/extensions" \
"${DST_PREFIX}/${libdir}/${moduledir}/extensions"
- setup_includes_symlinks \
- "${DST_PREFIX}/include/GL" \
- "${PREFIX}/${libdir}/opengl/${gl_implem}/include/GL/" \
- "${PREFIX}/${libdir}/opengl/${gl_implem}/include/" \
- "${PREFIX}/${libdir}/opengl/global/include/" \
- "${PREFIX}/${libdir}/opengl/xorg-x11/include/GL/" \
- "${PREFIX}/${libdir}/opengl/xorg-x11/include/"
-
+ gl_header[GL]="gl.h glx.h glxtokens.h glext.h glxext.h glxmd.h glxproto.h"
+ gl_header[GLES]="egl.h gl_extensions.h glext.h gl.h glplatform.h"
+ gl_header[GLES2]="gl2ext.h gl2.h gl2platform.h"
+ gl_header[KHR]="khrplatform.h"
+ gl_header[VG]="openvg.h vgext.h vgplatform.h vgu.h"
+ for gl_dir in {GL,GLES,GLES2,KHR,VG}; do
+ setup_includes_symlinks \
+ "${DST_PREFIX}/include/${gl_dir}" \
+ "${gl_header[${gl_dir}]}" \
+ "${PREFIX}/${libdir}/opengl/${gl_implem}/include/${gl_dir}/" \
+ "${PREFIX}/${libdir}/opengl/global/include/${gl_dir}" \
+ "${PREFIX}/${libdir}/opengl/xorg-x11/include/${gl_dir}/"
+ done
# Setup the $LDPATH
if [[ "x${REMOVE_ONLY}" == "xfalse" ]]; then
# we need this relative to ROOT
--
1.7.8.rc1
[-- Attachment #3: amd-graphics-bin-2012.1.ebuild --]
[-- Type: text/plain, Size: 1023 bytes --]
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=3
inherit multilib
DESCRIPTION="Closed source imx5 OpenGL/OpenVG driver"
HOMEPAGE="http://freescale.com"
SRC_URI="http://localhost/${P}.tar.xz"
LICENSE="EULA"
SLOT="0"
KEYWORDS="~arm"
IUSE=""
DEPEND=">=app-admin/eselect-opengl-1.2.6"
RDEPEND="${DEPEND}
x11-libs/libX11
x11-libs/libXrender
x11-libs/libXext
"
RESTRICT="test"
src_install() {
local opengl_imp="amd-graphics"
local opengl_dir="/usr/$(get_libdir)/opengl/${opengl_imp}"
dodir "$opengl_dir"/lib "$opengl_dir"/include
local x
for x in usr/lib/lib{EGL,GL*,OpenVG}.{la,a,so*}; do
if [ -f ${x} -o -L ${x} ]; then
mv "${x}" "${ED}"/${opengl_dir}/lib \
|| die "Failed to move ${x}"
fi
done
mv usr/include/{EGL,GLES*,VG,KHR}/ \
"${ED}"/${opengl_dir}/include || die "Failed to move headers"
insinto /usr
doins -r usr/include
dolib usr/lib/*
}
pkg_postinst() {
eselect opengl set --use-old ${opengl_imp}
}
[-- Attachment #4: mesa-8.0.1-r3.diff --]
[-- Type: text/x-patch, Size: 445 bytes --]
--- /usr/portage/media-libs/mesa/mesa-8.0.1-r2.ebuild 2012-02-24 18:01:18.000000000 +0000
+++ /usr/portage/media-libs/mesa/mesa-8.0.1-r3.ebuild 2012-03-24 22:40:44.000000000 +0000
@@ -285,6 +287,9 @@
|| die "Failed to move ${x}"
fi
done
+ mv "${ED}"/usr/include/{EGL,GLES*,VG,KHR}/ \
+ "${ED}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include \
+ || die "Failed to move headers"
eend $?
if use classic || use gallium; then
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-25 1:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-25 1:14 [gentoo-dev] Supporting GLES-only implementations Luca Barbato
-- strict thread matches above, loose matches on Subject: below --
2012-03-03 17:26 Luca Barbato
2012-03-04 13:40 ` Luca Barbato
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox