From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1ShgTb-0003Cf-FG for garchives@archives.gentoo.org; Thu, 21 Jun 2012 12:27:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 41AF0E0BE7; Thu, 21 Jun 2012 12:26:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 04F7FE0BE0 for ; Thu, 21 Jun 2012 12:26:19 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 444521B400F for ; Thu, 21 Jun 2012 12:26:19 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 0CF74E5435 for ; Thu, 21 Jun 2012 12:26:18 +0000 (UTC) From: "Luca Barbato" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Luca Barbato" Message-ID: <1339592695.8e767488c39d9f9599d07db766352f433ecc5e1d.lu_zero@gentoo> Subject: [gentoo-commits] proj/eselect:extern commit in: modules/ X-VCS-Repository: proj/eselect X-VCS-Files: modules/opengl.eselect X-VCS-Directories: modules/ X-VCS-Committer: lu_zero X-VCS-Committer-Name: Luca Barbato X-VCS-Revision: 8e767488c39d9f9599d07db766352f433ecc5e1d X-VCS-Branch: extern Date: Thu, 21 Jun 2012 12:26:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 030a4ffc-9468-4d51-ad13-6f7cddde4252 X-Archives-Hash: b0418f458121ac4a4bd3ec1b39f6820f commit: 8e767488c39d9f9599d07db766352f433ecc5e1d Author: Luca Barbato gentoo org> AuthorDate: Sun Mar 25 01:07:06 2012 +0000 Commit: Luca Barbato gentoo org> CommitDate: Wed Jun 13 13:04:55 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/eselect.git;a= =3Dcommit;h=3D8e767488 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() { =20 setup_includes_symlinks() { local target=3D$1 + local files=3D$2 local file + local mdir=3D$3 local sdir =20 - 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 } =20 @@ -165,6 +169,7 @@ set_new_implementation() { local moduledir local gl_dir local gl_local + local -A gl_header =20 # Set a sane umask... bug #83115 umask 022 @@ -178,7 +183,7 @@ set_new_implementation() { for libdir in $(list_libdirs); do [[ ${ROOT} !=3D / ]] && libdir=3D${libdir#${EROOT}} [[ -d ${PREFIX}/${libdir}/opengl && ! -h ${PREFIX}/${libdir} ]] || co= ntinue - [[ -f "${PREFIX}/${libdir}/opengl/${gl_implem}/lib/libGL.so" ]] && fo= und_libgl=3Dyes + [[ -f "${PREFIX}/${libdir}/opengl/${gl_implem}/lib/libGL.so" || -f "$= {PREFIX}/${libdir}/opengl/${gl_implem}/.gles-only" ]] && found_libgl=3Dye= s done =20 if [[ -z ${found_libgl} ]]; then @@ -242,14 +247,20 @@ set_new_implementation() { "${PREFIX}/${libdir}/opengl/${gl_local}/extensions" \ "${DST_PREFIX}/${libdir}/${moduledir}/extensions" =20 - 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]=3D"gl.h glx.h glxtokens.h glext.h glxext.h glxmd.h glxpr= oto.h" + gl_header[GLES]=3D"egl.h gl_extensions.h glext.h gl.h glplatform.h" + gl_header[GLES2]=3D"gl2ext.h gl2.h gl2platform.h" + gl_header[EGL]=3D"eglext.h egl.h eglplatform.h" + gl_header[KHR]=3D"khrplatform.h" + gl_header[VG]=3D"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}" =3D=3D "xfalse" ]]; then # we need this relative to ROOT