aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim 'max_posedon' Melnikau <maxposedon@gmail.com>2009-03-09 22:43:57 +0000
committerMaksim 'max_posedon' Melnikau <maxposedon@gmail.com>2009-03-09 22:43:57 +0000
commitfdcf5bfe2c0d7f2f60350247f8c2c9bd71ae1c91 (patch)
treeea236c6880e21bab7071dfe49c4c32e3dc768373 /media-libs
parentpython-elementary should have gnutls as rdep (diff)
downloadembedded-cross-fdcf5bfe2c0d7f2f60350247f8c2c9bd71ae1c91.tar.gz
embedded-cross-fdcf5bfe2c0d7f2f60350247f8c2c9bd71ae1c91.tar.bz2
embedded-cross-fdcf5bfe2c0d7f2f60350247f8c2c9bd71ae1c91.zip
Fix freeglut compilation via ugly hack disabling useless demos.
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/freeglut/Manifest7
-rw-r--r--media-libs/freeglut/files/2.4.0-cursor.patch19
-rw-r--r--media-libs/freeglut/files/freeglut-2.4.0-bsd-usb-joystick.patch16
-rw-r--r--media-libs/freeglut/files/freeglut-2.4.0-macos.patch11
-rw-r--r--media-libs/freeglut/files/freeglut-gcc42.patch12
-rw-r--r--media-libs/freeglut/files/freeglut-no-progs.patch5
-rw-r--r--media-libs/freeglut/freeglut-2.4.0-r1.ebuild68
7 files changed, 138 insertions, 0 deletions
diff --git a/media-libs/freeglut/Manifest b/media-libs/freeglut/Manifest
new file mode 100644
index 0000000..d205aeb
--- /dev/null
+++ b/media-libs/freeglut/Manifest
@@ -0,0 +1,7 @@
+AUX 2.4.0-cursor.patch 760 RMD160 4cbf8ffe84e1463e85569153704d4dfe07961e46 SHA1 feb229abe646828c9d629172e504c7c6905deb9f SHA256 5206d52da9159b0505feb271ce4c24abdab6b3fbc4944abd7b2a4c3f0610a9d8
+AUX freeglut-2.4.0-bsd-usb-joystick.patch 755 RMD160 2453315cc3d2a882bd68d96a413d555e75a0b661 SHA1 095343909d035a9e0933a3af431fc708170db23c SHA256 52ada965b1dc6abbb9ce0bbc00bf91452c6717b74016d21e0a10df24a0ffe83c
+AUX freeglut-2.4.0-macos.patch 384 RMD160 f44ed965ac534697fa5dc4bbc17b1f464795edfd SHA1 4863883e3742162f1ace5767a6c9906e4f7d2f30 SHA256 6de982efac5a62b317e4cc73570da45c4ded0f42295b5dfeae090948d37eabf6
+AUX freeglut-gcc42.patch 283 RMD160 d0fa7fa4828d2ab8e554ce30f72b5af4a92b9e14 SHA1 34cfdaa4f6422af3d5bca097468cb60168581f42 SHA256 e718dc2c6465654c3f87872f459b008109bbacc4c9bcf2a475880ded1b18b436
+AUX freeglut-no-progs.patch 185 RMD160 4a4687224f43a093112b68e2a61dd603b5e9b6ab SHA1 62637b70faa9f620b7338512699f7f0eda0b0dcd SHA256 0ef2bec7fbe8acae20565304d8604de4bd99bfefeb74c5f71ab413265f60860b
+DIST freeglut-2.4.0.tar.gz 469557 RMD160 77465647f3d65fbb5cf253eb93ac7409e0c37b14 SHA1 91a528aa72758b7288a0d69a964b1b7e3f322a12 SHA256 269f2d50ba30b381622eb36f20b552ad43a1b43d544b9075e484e7146e81b052
+EBUILD freeglut-2.4.0-r1.ebuild 1776 RMD160 138c8118c23a1318b44f508f1dc31f9042c12057 SHA1 cf5da1ba722de168a5c7b93074a5d1e7d71e3978 SHA256 1730de8ae5709d6aa536989feaf241eb5da06366ca9b50ed2e118b0aaf262337
diff --git a/media-libs/freeglut/files/2.4.0-cursor.patch b/media-libs/freeglut/files/2.4.0-cursor.patch
new file mode 100644
index 0000000..fab7f9e
--- /dev/null
+++ b/media-libs/freeglut/files/2.4.0-cursor.patch
@@ -0,0 +1,19 @@
+--- src/freeglut_cursor.c.old 2006-10-11 20:49:13.000000000 +0200
++++ src/freeglut_cursor.c 2006-10-11 20:51:43.000000000 +0200
+@@ -147,11 +147,13 @@
+ }
+ }
+
+- if ( ( cursorIDToUse != GLUT_CURSOR_NONE ) && ( cursor == None ) ) {
++ if ( cursorIDToUse == GLUT_CURSOR_INHERIT ) {
++ XUndefineCursor( fgDisplay.Display, window->Window.Handle );
++ } else if ( cursor != None ) {
++ XDefineCursor( fgDisplay.Display, window->Window.Handle, cursor );
++ } else if ( cursorIDToUse != GLUT_CURSOR_NONE ) {
+ fgError( "Failed to create cursor" );
+ }
+- XDefineCursor( fgDisplay.Display,
+- window->Window.Handle, cursor );
+ }
+
+ #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
diff --git a/media-libs/freeglut/files/freeglut-2.4.0-bsd-usb-joystick.patch b/media-libs/freeglut/files/freeglut-2.4.0-bsd-usb-joystick.patch
new file mode 100644
index 0000000..08aa132
--- /dev/null
+++ b/media-libs/freeglut/files/freeglut-2.4.0-bsd-usb-joystick.patch
@@ -0,0 +1,16 @@
+We disable BSD usb joystick support until upstream has a better support for it
+so that it can at least build. For now it builds but does not link to libusbhid
+so that libglut.so has undefined references to hid_* symbols and causes linking
+errors later on in the build process.
+
+--- freeglut-2.4.0/src/freeglut_joystick.c.old 2008-08-08 15:26:15 +0000
++++ freeglut-2.4.0/src/freeglut_joystick.c 2008-08-08 15:26:32 +0000
+@@ -78,7 +78,7 @@
+ # include <errno.h>
+ # if defined(__FreeBSD__) || defined(__NetBSD__)
+ /* XXX The below hack is done until freeglut's autoconf is updated. */
+-# define HAVE_USB_JS 1
++# undef HAVE_USB_JS
+
+ # if defined(__FreeBSD__) && __FreeBSD_version >= 500000
+ # include <sys/joystick.h>
diff --git a/media-libs/freeglut/files/freeglut-2.4.0-macos.patch b/media-libs/freeglut/files/freeglut-2.4.0-macos.patch
new file mode 100644
index 0000000..8a05b94
--- /dev/null
+++ b/media-libs/freeglut/files/freeglut-2.4.0-macos.patch
@@ -0,0 +1,11 @@
+--- freeglut-2.4.0/src/freeglut_joystick.c.orig 2005-07-02 10:41:52.000000000 +0200
++++ freeglut-2.4.0/src/freeglut_joystick.c 2005-07-02 10:44:17.000000000 +0200
+@@ -1389,7 +1389,7 @@
+ # endif
+ #endif
+
+-#if defined( __linux__ )
++#if defined( __linux__ ) || defined(__APPLE_CC__)
+ /* Default for older Linux systems. */
+ joy->num_axes = 2;
+ joy->num_buttons = 32;
diff --git a/media-libs/freeglut/files/freeglut-gcc42.patch b/media-libs/freeglut/files/freeglut-gcc42.patch
new file mode 100644
index 0000000..27404ea
--- /dev/null
+++ b/media-libs/freeglut/files/freeglut-gcc42.patch
@@ -0,0 +1,12 @@
+--- src/freeglut_joystick.c.old 2006-07-25 21:15:14.000000000 -0600
++++ src/freeglut_joystick.c 2006-07-25 21:21:54.000000000 -0600
+@@ -1684,9 +1684,6 @@
+
+ fgInitialiseJoysticks ();
+
+- if ( !fgJoystick )
+- return 0;
+-
+ if ( !fgState.JoysticksInitialised )
+ return 0;
+
diff --git a/media-libs/freeglut/files/freeglut-no-progs.patch b/media-libs/freeglut/files/freeglut-no-progs.patch
new file mode 100644
index 0000000..85d9734
--- /dev/null
+++ b/media-libs/freeglut/files/freeglut-no-progs.patch
@@ -0,0 +1,5 @@
+--- freeglut-2.4.0/progs/Makefile.am.old 2009-03-10 00:31:37.000000000 +0200
++++ freeglut-2.4.0/progs/Makefile.am 2009-03-10 00:32:22.000000000 +0200
+@@ -1 +1 @@
+-SUBDIRS = demos
++all:
diff --git a/media-libs/freeglut/freeglut-2.4.0-r1.ebuild b/media-libs/freeglut/freeglut-2.4.0-r1.ebuild
new file mode 100644
index 0000000..9f5f245
--- /dev/null
+++ b/media-libs/freeglut/freeglut-2.4.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/freeglut/freeglut-2.4.0-r1.ebuild,v 1.14 2008/11/30 09:34:32 vapier Exp $
+
+inherit eutils flag-o-matic libtool
+
+DESCRIPTION="A completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library"
+HOMEPAGE="http://freeglut.sourceforge.net/"
+SRC_URI="mirror://sourceforge/freeglut/${P}.tar.gz"
+
+LICENSE="X11"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sh sparc x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="virtual/opengl
+ virtual/glu
+ !media-libs/glut"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ # bug #134586
+ if [[ ${CFLAGS/march/} = ${CFLAGS} ]]; then
+ ewarn "You do not have 'march' set in your CFLAGS."
+ ewarn "This is known to cause compilation problems"
+ ewarn "in ${P}. If the compile fails, please set"
+ ewarn "'march' to the appropriate architecture."
+ epause 5
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/freeglut-no-progs.patch"
+
+ # fixes bug #97390
+ epatch "${FILESDIR}"/${P}-macos.patch
+
+ # #131856
+ epatch "${FILESDIR}"/${PN}-gcc42.patch
+
+ # (#140542) fix cursor handling so flightgear works
+ epatch "${FILESDIR}"/${PV}-cursor.patch
+
+ # Disable BSD's usb joystick support, see reasons in the patch
+ epatch "${FILESDIR}"/${P}-bsd-usb-joystick.patch
+
+ # bug #134586
+ replace-flags -O3 -O2
+
+ # Needed for sane .so versionning on bsd, please don't drop
+ elibtoolize
+}
+
+src_compile() {
+ # (#191589) Don't let -Werror get tagged on
+ econf --disable-warnings || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog NEWS README TODO
+ docinto doc
+ dohtml -r doc/*.html doc/*.png
+}