public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Luca Barbato" <lu_zero@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect:extern commit in: modules/
Date: Thu, 21 Jun 2012 12:26:18 +0000 (UTC)	[thread overview]
Message-ID: <1339592695.8e767488c39d9f9599d07db766352f433ecc5e1d.lu_zero@gentoo> (raw)

commit:     8e767488c39d9f9599d07db766352f433ecc5e1d
Author:     Luca Barbato <lu_zero <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 25 01:07:06 2012 +0000
Commit:     Luca Barbato <lu_zero <AT> gentoo <DOT> org>
CommitDate: Wed Jun 13 13:04:55 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=8e767488

opengl: support gles only implementation

Additionally make switching headers and libraries work for GLES OpenVG
and EGL.

---
 modules/opengl.eselect |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/modules/opengl.eselect b/modules/opengl.eselect
index 2e8dd23..fa1e8f7 100644
--- a/modules/opengl.eselect
+++ b/modules/opengl.eselect
@@ -140,14 +140,15 @@ setup_extensions_symlinks() {
 
 setup_includes_symlinks() {
 	local target=$1
+	local files=$2
 	local file
+	local mdir=$3
 	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}"
@@ -155,6 +156,9 @@ setup_includes_symlinks() {
 				fi
 			done
 		done
+		test -d ${mdir} && for file in ${mdir}/*.h; do
+			upgrade_file "${file}" "${target}"
+		done
 	popd &> /dev/null
 }
 
@@ -165,6 +169,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 +183,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 +247,20 @@ 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[EGL]="eglext.h egl.h eglplatform.h"
+		gl_header[KHR]="khrplatform.h"
+		gl_header[VG]="openvg.h vgext.h vgplatform.h vgu.h"
+		for gl_dir in {EGL,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



             reply	other threads:[~2012-06-21 12:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 12:26 Luca Barbato [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-01-05 15:35 [gentoo-commits] proj/eselect:extern commit in: modules/ Ulrich Mueller
2013-03-11  2:16 Christoph Junghans
2013-03-11  2:16 Christoph Junghans
2013-03-11  2:16 Christoph Junghans
2013-03-11  7:06 Ulrich Mueller
2013-09-20 20:34 Ulrich Mueller
2013-11-17  8:34 Ryan Hill
2013-12-30  7:49 Ryan Hill
2015-01-04 10:00 Michał Górny
2015-01-04 10:00 Michał Górny
2015-01-04 10:00 Michał Górny
2015-02-26  6:52 Ben de Groot
2018-03-10 10:22 Ulrich Müller
2018-03-10 10:22 Ulrich Müller
2018-03-10 10:22 Ulrich Müller
2018-08-30 16:48 Ulrich Müller
2020-05-09  2:22 Patrick McLean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1339592695.8e767488c39d9f9599d07db766352f433ecc5e1d.lu_zero@gentoo \
    --to=lu_zero@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox