diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-libs/glfw/glfw-2.7.7.ebuild | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-libs/glfw/glfw-2.7.7.ebuild')
-rw-r--r-- | media-libs/glfw/glfw-2.7.7.ebuild | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/media-libs/glfw/glfw-2.7.7.ebuild b/media-libs/glfw/glfw-2.7.7.ebuild new file mode 100644 index 000000000000..c8155acc2cf7 --- /dev/null +++ b/media-libs/glfw/glfw-2.7.7.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils multilib toolchain-funcs + +DESCRIPTION="The Portable OpenGL FrameWork" +HOMEPAGE="http://www.glfw.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="examples static-libs" + +DEPEND="x11-libs/libX11 + x11-libs/libXrandr + virtual/glu + virtual/opengl" +RDEPEND="${DEPEND}" + +src_prepare() { + sed -i \ + -e "s:\"docs/:\"/usr/share/doc/${PF}/pdf/:" \ + readme.html || die + + epatch "${FILESDIR}"/${P}-{dyn,pkgconfig}.patch + + # respect ldflags + sed -i \ + -e "s/\$(LFLAGS)/\$(LDFLAGS) \$(LFLAGS)/" \ + {lib/x11,examples}/Makefile.x11.in || die + + # respect cflags in linking command + # build system is messing up CFLAGS variable, so sed is the easy way to go + sed -i \ + -e "/^libglfw.so/{n;s/\$(CC)/\$(CC) ${CFLAGS}/;}" \ + lib/x11/Makefile.x11.in || die + + if use !static-libs ; then + sed -i \ + -e '/^all:/s/libglfw.a//' \ + lib/x11/Makefile.x11.in || die + fi +} + +src_configure() { + sh ./compile.sh +} + +src_compile() { + emake -C lib/x11 AR=$(tc-getAR) CC=$(tc-getCC) PREFIX=/usr LIBDIR=$(get_libdir) -f Makefile.x11 all libglfw.pc + use examples && emake -C examples CC=$(tc-getCC) -f Makefile.x11 all +} + +src_install() { + use static-libs && dolib.a lib/x11/libglfw.a + dolib.so lib/x11/libglfw.so.2.7.7 + dosym libglfw.so.2.7.7 /usr/$(get_libdir)/libglfw.so + + insinto /usr/$(get_libdir)/pkgconfig + doins lib/x11/libglfw.pc + doheader -r include/GL + dohtml -r readme.html + insinto /usr/share/doc/${PF}/pdf + doins docs/*.pdf + dodoc docs/readme.txt + + if use examples; then + local f + local MY_EXAMPLES="boing gears listmodes mipmaps + mtbench mthello particles pong3d splitview + triangle wave" + local MY_PICS="mipmaps.tga pong3d_field.tga pong3d_instr.tga + pong3d_menu.tga pong3d_title.tga + pong3d_winner1.tga pong3d_winner2.tga" + + docompress -x /usr/share/doc/${PF}/examples + insinto /usr/share/doc/${PF}/examples + + doins examples/Makefile.x11 + for f in $MY_EXAMPLES; do + doins examples/${f}.c + done + for f in $MY_PICS; do + doins examples/${f} + done + + insopts -m0755 + for f in $MY_EXAMPLES; do + doins examples/${f} + done + fi +} |