From: "Matt Turner" <mattst88@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/x11:master commit in: x11-apps/mesa-progs/
Date: Wed, 29 Aug 2012 05:38:40 +0000 (UTC) [thread overview]
Message-ID: <1346218621.45393659907d842e0c29addefe7cdb92da78e5e3.mattst88@gentoo> (raw)
commit: 45393659907d842e0c29addefe7cdb92da78e5e3
Author: Matt Turner <mattst88 <AT> gmail <DOT> com>
AuthorDate: Wed Aug 29 05:37:01 2012 +0000
Commit: Matt Turner <mattst88 <AT> gmail <DOT> com>
CommitDate: Wed Aug 29 05:37:01 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=45393659
x11-apps/mesa-progs: Add support for building egl/gles1/gles2 demos
https://bugs.gentoo.org/show_bug.cgi?id=430954 needs to be fixed before
we can add proper dependencies. I have a hard time caring at the moment.
---
x11-apps/mesa-progs/mesa-progs-9999.ebuild | 58 ++++++++++++++++++++-------
x11-apps/mesa-progs/metadata.xml | 5 ++
2 files changed, 48 insertions(+), 15 deletions(-)
diff --git a/x11-apps/mesa-progs/mesa-progs-9999.ebuild b/x11-apps/mesa-progs/mesa-progs-9999.ebuild
index 551e45d..89ddd94 100644
--- a/x11-apps/mesa-progs/mesa-progs-9999.ebuild
+++ b/x11-apps/mesa-progs/mesa-progs-9999.ebuild
@@ -6,40 +6,68 @@ EAPI=4
MY_PN=${PN/progs/demos}
MY_P=${MY_PN}-${PV}
-EGIT_REPO_URI="git://anongit.freedesktop.org/${MY_PN/-//}
- http://anongit.freedesktop.org/${MY_PN/-//}"
-[[ ${PV} = 9999* ]] && GIT_ECLASS="git-2"
+EGIT_REPO_URI="git://anongit.freedesktop.org/${MY_PN/-//}"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git"
+fi
+
inherit toolchain-funcs ${GIT_ECLASS}
DESCRIPTION="Mesa's OpenGL utility and demo programs (glxgears and glxinfo)"
HOMEPAGE="http://mesa3d.sourceforge.net/"
-[[ ${PV} == 9999* ]] || SRC_URI="ftp://ftp.freedesktop.org/pub/${MY_PN/-//}/${PV}/${MY_P}.tar.bz2"
+if [[ ${PV} == 9999* ]]; then
+ SRC_URI=""
+else
+ SRC_URI="ftp://ftp.freedesktop.org/pub/${MY_PN/-//}/${PV}/${MY_P}.tar.bz2"
+fi
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux"
-IUSE=""
+IUSE="egl gles1 gles2"
RDEPEND="virtual/opengl"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig"
+DEPEND="${RDEPEND}"
S=${WORKDIR}/${MY_P}
src_configure() {
- # We're not using the complete buildsystem to avoid dependencies
- # unnecessary for our two little tools.
- :
+ # We're not using the complete buildsystem if we only want to build
+ # glxinfo and glxgears.
+ if use egl || use gles1 || use gles2; then
+ default_src_configure
+ fi
}
src_compile() {
- local pkgs='gl x11'
- tc-export CC
- emake \
- CPPFLAGS="$(pkg-config --cflags ${pkgs}) -Isrc/util" \
- LDLIBS="$(pkg-config --libs ${pkgs}) -lm" src/xdemos/{glxgears,glxinfo}
+ if ! use egl && ! use gles1 && ! use gles2; then
+ tc-export CC
+ emake LDLIBS='-lX11 -lGL -lm' src/xdemos/{glxgears,glxinfo}
+ else
+ emake -C src/xdemos glxgears glxinfo
+ fi
+
+ if use egl; then
+ emake -C src/egl/eglut/ libeglut_screen.la libeglut_x11.la
+ emake -C src/egl/opengl/ eglgears_screen eglgears_x11
+
+ use gles1 && emake -C src/egl/opengles1/ es1_info gears_screen gears_x11
+ use gles2 && emake -C src/egl/opengles2/ es2_info es2gears_screen es2gears_x11
+ fi
}
src_install() {
dobin src/xdemos/{glxgears,glxinfo}
+ if use egl; then
+ dobin src/egl/opengl/eglgears_{screen,x11}
+
+ if use gles1; then
+ dobin src/egl/opengles1/es1_info
+ newbin src/egl/opengles1/gears_screen es1gears_screen
+ newbin src/egl/opengles1/gears_x11 es1gears_x11
+ fi
+
+ use gles2 && dobin src/egl/opengles2/es2{_info,gears_{screen,x11}}
+ fi
}
diff --git a/x11-apps/mesa-progs/metadata.xml b/x11-apps/mesa-progs/metadata.xml
index 01c4c00..c679837 100644
--- a/x11-apps/mesa-progs/metadata.xml
+++ b/x11-apps/mesa-progs/metadata.xml
@@ -2,4 +2,9 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>x11</herd>
+<use>
+ <flag name='egl'>Enable EGL support.</flag>
+ <flag name='gles1'>Enable GLESv1 support.</flag>
+ <flag name='gles2'>Enable GLESv2 support.</flag>
+</use>
</pkgmetadata>
next reply other threads:[~2012-08-29 5:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-29 5:38 Matt Turner [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-06-01 4:38 [gentoo-commits] proj/x11:master commit in: x11-apps/mesa-progs/ Chi-Thanh Christopher Nguyen
2013-03-28 22:10 Chi-Thanh Christopher Nguyen
2012-09-17 18:10 Matt Turner
2012-09-17 18:08 Matt Turner
2012-08-29 6:10 Matt Turner
2012-08-29 5:54 Matt Turner
2011-09-18 7:50 Michał Górny
2011-05-16 6:36 Michał Górny
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=1346218621.45393659907d842e0c29addefe7cdb92da78e5e3.mattst88@gentoo \
--to=mattst88@gmail.com \
--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