- Minor specfile cleanups

- Add a patch from gentoo to stop flightgear from crashing
This commit is contained in:
Hans de Goede 2007-03-18 20:13:49 +00:00
parent bed0555e6d
commit 96a1817fc4
2 changed files with 57 additions and 36 deletions

View File

@ -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

View File

@ -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 <j.w.r.degoede@hhs.nl> 2.4.0-11
- Minor specfile cleanups
- Add a patch from gentoo to stop flightgear from crashing
* Mon Aug 27 2006 Michael J. Knox <michael[AT]knox.net.nz> - 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 <mharris@www.linux.org.uk> 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 <mharris@www.linux.org.uk> 1.3-0.20020125.0