From 96a1817fc491e2cdd4a649f8cb8b1df4a71be717 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 18 Mar 2007 20:13:49 +0000 Subject: [PATCH] - Minor specfile cleanups - Add a patch from gentoo to stop flightgear from crashing --- freeglut-2.4.0-cursor.patch | 19 ++++++++++ freeglut.spec | 74 +++++++++++++++++++------------------ 2 files changed, 57 insertions(+), 36 deletions(-) create mode 100644 freeglut-2.4.0-cursor.patch diff --git a/freeglut-2.4.0-cursor.patch b/freeglut-2.4.0-cursor.patch new file mode 100644 index 0000000..fab7f9e --- /dev/null +++ b/freeglut-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/freeglut.spec b/freeglut.spec index 700cd65..394e8e0 100644 --- a/freeglut.spec +++ b/freeglut.spec @@ -1,30 +1,21 @@ -Summary: A freely licensed alternative to the GLUT library -Name: freeglut -Version: 2.4.0 -Release: 10%{?dist} -URL: http://freeglut.sourceforge.net -Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -License: MIT -Group: System Environment/Libraries -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: pkgconfig -BuildRequires: libGLU-devel -BuildRequires: libGL-devel -BuildRequires: libXext-devel -BuildRequires: libXxf86vm-devel - -# FIXME: freeglut does not require glib itself, but something included with -# it presumeably does. Need to investigate further. -#BuildRequires: glib-devel +Summary: A freely licensed alternative to the GLUT library +Name: freeglut +Version: 2.4.0 +Release: 11%{?dist} +URL: http://freeglut.sourceforge.net +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch0: freeglut-2.4.0-cursor.patch +License: MIT +Group: System Environment/Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: pkgconfig libGLU-devel libXext-devel libXxf86vm-devel # The virtual Provides below is present so that this freeglut package is a # drop in binary replacement for "glut" which will satisfy rpm dependancies # properly. The Obsoletes tag is required in order for any pre-existing # "glut" package to be removed and replaced with freeglut when upgrading to # freeglut. Note: This package will NOT co-exist with the glut package. -Provides: glut = 3.7 -Obsoletes: glut <= 3.7 - +Provides: glut = 3.7 +Obsoletes: glut <= 3.7 %description freeglut is a completely open source alternative to the OpenGL Utility Toolkit @@ -37,15 +28,14 @@ freeglut allows the user to create and manage windows containing OpenGL contexts on a wide range of platforms and also read the mouse, keyboard and joystick functions. + %package devel -Summary: Freeglut developmental libraries and header files -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -Requires: libGL-devel libGLU-devel - -Provides: glut-devel = 3.7 -Obsoletes: glut-devel <= 3.7 +Summary: Freeglut developmental libraries and header files +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: libGL-devel libGLU-devel +Provides: glut-devel = 3.7 +Obsoletes: glut-devel <= 3.7 %description devel Developmental libraries and header files required for developing or compiling @@ -53,26 +43,33 @@ software which links to the freeglut library, which is an open source alternative to the popular GLUT library, with an OSI approved free software license. + %prep %setup -q +%patch0 -p0 -z .cursor +chmod 644 doc/*.{html,png} + %build -%configure --enable-warnings --disable-static -make CFLAGS="$RPM_OPT_FLAGS" +# --disable-warnings -> don't add -Werror to CFLAGS +%configure --disable-static --disable-warnings +make %{?_smp_mflags} + %install rm -rf $RPM_BUILD_ROOT -%makeinstall -/sbin/ldconfig -n %{_libdir} -chmod 644 doc/*.{html,png} +make install DESTDIR=$RPM_BUILD_ROOT rm $RPM_BUILD_ROOT/%{_libdir}/*.la + %clean rm -rf $RPM_BUILD_ROOT + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig + %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO doc/*.png doc/*.html @@ -84,7 +81,12 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/GL/*.h %{_libdir}/libglut.so + %changelog +* Sun Mar 18 2007 Hans de Goede 2.4.0-11 +- Minor specfile cleanups +- Add a patch from gentoo to stop flightgear from crashing + * Mon Aug 27 2006 Michael J. Knox - 2.4.0-10 - Rebuild for FC6 @@ -193,7 +195,7 @@ rm -rf $RPM_BUILD_ROOT be a twilight zone thing going on. Add shared libs to file lists. * Sat May 31 2003 Mike A. Harris 1.3-0.20020125.1 -- Added -L/usr/X11R6/%{_lib} configure script invocation and CFLAGS so lib64 +- Added -L/usr/X11R6/%%{_lib} configure script invocation and CFLAGS so lib64 is treated properly on x86_64/ppc64/s390x architectures * Fri May 30 2003 Mike A. Harris 1.3-0.20020125.0