- 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 Summary: A freely licensed alternative to the GLUT library
Name: freeglut Name: freeglut
Version: 2.4.0 Version: 2.4.0
Release: 10%{?dist} Release: 11%{?dist}
URL: http://freeglut.sourceforge.net URL: http://freeglut.sourceforge.net
Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
License: MIT Patch0: freeglut-2.4.0-cursor.patch
Group: System Environment/Libraries License: MIT
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig BuildRequires: pkgconfig libGLU-devel libXext-devel libXxf86vm-devel
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
# The virtual Provides below is present so that this freeglut package is a # The virtual Provides below is present so that this freeglut package is a
# drop in binary replacement for "glut" which will satisfy rpm dependancies # drop in binary replacement for "glut" which will satisfy rpm dependancies
# properly. The Obsoletes tag is required in order for any pre-existing # properly. The Obsoletes tag is required in order for any pre-existing
# "glut" package to be removed and replaced with freeglut when upgrading to # "glut" package to be removed and replaced with freeglut when upgrading to
# freeglut. Note: This package will NOT co-exist with the glut package. # freeglut. Note: This package will NOT co-exist with the glut package.
Provides: glut = 3.7 Provides: glut = 3.7
Obsoletes: glut <= 3.7 Obsoletes: glut <= 3.7
%description %description
freeglut is a completely open source alternative to the OpenGL Utility Toolkit 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 contexts on a wide range of platforms and also read the mouse, keyboard and
joystick functions. joystick functions.
%package devel %package devel
Summary: Freeglut developmental libraries and header files Summary: Freeglut developmental libraries and header files
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: libGL-devel libGLU-devel
Requires: libGL-devel libGLU-devel Provides: glut-devel = 3.7
Obsoletes: glut-devel <= 3.7
Provides: glut-devel = 3.7
Obsoletes: glut-devel <= 3.7
%description devel %description devel
Developmental libraries and header files required for developing or compiling 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 alternative to the popular GLUT library, with an OSI approved free software
license. license.
%prep %prep
%setup -q %setup -q
%patch0 -p0 -z .cursor
chmod 644 doc/*.{html,png}
%build %build
%configure --enable-warnings --disable-static # --disable-warnings -> don't add -Werror to CFLAGS
make CFLAGS="$RPM_OPT_FLAGS" %configure --disable-static --disable-warnings
make %{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%makeinstall make install DESTDIR=$RPM_BUILD_ROOT
/sbin/ldconfig -n %{_libdir}
chmod 644 doc/*.{html,png}
rm $RPM_BUILD_ROOT/%{_libdir}/*.la rm $RPM_BUILD_ROOT/%{_libdir}/*.la
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO doc/*.png doc/*.html %doc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO doc/*.png doc/*.html
@ -84,7 +81,12 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/GL/*.h %{_includedir}/GL/*.h
%{_libdir}/libglut.so %{_libdir}/libglut.so
%changelog %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 * Mon Aug 27 2006 Michael J. Knox <michael[AT]knox.net.nz> - 2.4.0-10
- Rebuild for FC6 - 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. 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 * 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 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 * Fri May 30 2003 Mike A. Harris <mharris@www.linux.org.uk> 1.3-0.20020125.0