rpms/openuniverse/devel openuniverse-1.0beta3-gl.patch, NONE, 1.1 openuniverse-1.0beta3-paths.patch, NONE, 1.1 openuniverse-1.0beta3-strings.patch, NONE, 1.1 openuniverse-1.0beta3-yacc.patch, NONE, 1.1 openuniverse.1, NONE, 1.1 openuniverse.desktop, NONE, 1.1 openuniverse.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Marek Mahut (mmahut) fedora-extras-commits at redhat.com
Mon Mar 24 17:12:43 UTC 2008


Author: mmahut

Update of /cvs/pkgs/rpms/openuniverse/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24938/devel

Modified Files:
	.cvsignore sources 
Added Files:
	openuniverse-1.0beta3-gl.patch 
	openuniverse-1.0beta3-paths.patch 
	openuniverse-1.0beta3-strings.patch 
	openuniverse-1.0beta3-yacc.patch openuniverse.1 
	openuniverse.desktop openuniverse.spec 
Log Message:
Initial import of openuniverse


openuniverse-1.0beta3-gl.patch:

--- NEW FILE openuniverse-1.0beta3-gl.patch ---
--- openuniverse-1.0beta3/src/comet.cpp	2000-05-14 00:48:51.000000000 +0200
+++ openuniverse-1.0beta3.fixed/src/comet.cpp	2007-12-18 17:48:29.000000000 +0100
@@ -17,6 +17,7 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#define GL_GLEXT_LEGACY
 #include "ou.h"
 
 #ifdef WIN32

openuniverse-1.0beta3-paths.patch:

--- NEW FILE openuniverse-1.0beta3-paths.patch ---
Make screenshots in current directory -- the most logical place, and we
don't have to deal with permissions to /var as Debian does.  Furthermore
I didn't feel well about those constant length strings without bounds checking.
Also, the config file belongs to /etc.  -- Lubomir Kundrak <lkundrak at redhat.com>

--- openuniverse-1.0beta3/src/scrnshot.cpp.orig	2007-12-18 18:44:44.000000000 +0100
+++ openuniverse-1.0beta3/src/scrnshot.cpp	2007-12-18 18:44:25.000000000 +0100
@@ -37,18 +37,15 @@ extern "C" {
 	FILE *outfile;				/* target file */
 	JSAMPROW row_pointer[1];	/* pointer to JSAMPLE row[s] */
 	int row_stride;				/* physical row width in image buffer */
-	char shotspath[100] = SHOTS_DIR;
-	static char line[200];
 
 	cinfo.err = jpeg_std_error(&jerr);
 	/* Now we can initialize the JPEG compression object. */
 	fflush(stdout);
 	jpeg_create_compress(&cinfo);
 
-	sprintf(line, "%s/%s", shotspath, filename);
-	if ((outfile = fopen(line, "wb")) == NULL) {
+	if ((outfile = fopen(filename, "wb")) == NULL) {
 		error("can't write screenshot\n");
-		shutdown(1);
+		return;
 	}
 
 	jpeg_stdio_dest(&cinfo, outfile);
--- openuniverse-1.0beta3.orig/src/cfgparse.y	2007-12-18 19:17:52.000000000 +0100
+++ openuniverse-1.0beta3/src/cfgparse.y	2007-12-18 19:25:49.000000000 +0100
@@ -463,13 +463,9 @@ void yyerror(char *s)
 /* Read configuration file */
 void ReadConfigFile(void)
 {
-    char s[200];
-
-    sprintf(s, "ou.conf");
-    cfgin = fopen(s, "rt");
+    cfgin = fopen("ou.conf", "rt");
     if (cfgin == NULL) {
-    	sprintf(s, "%s/ou.conf", confpath);
-    	cfgin = fopen(s, "rt");
+    	cfgin = fopen("/etc/ou.conf", "rt");
 	if (cfgin == NULL) {
 	    error("Couldn't find configuration file");
 	    shutdown(1);

openuniverse-1.0beta3-strings.patch:

--- NEW FILE openuniverse-1.0beta3-strings.patch ---
strcpy(), memcpy(), etc. can be macros, so we need the headers. They actually
are, as we're compiling with _FORTIFY_SOURCE=2 -- Lubomir Kundrak <lkundrak at redhat.com>

--- openuniverse-1.0beta3/src/cfglex.l	2000-06-04 21:34:41.000000000 +0200
+++ openuniverse-1.0beta3.fixed/src/cfglex.l	2007-12-18 17:30:26.000000000 +0100
@@ -1,5 +1,6 @@
 %{
 #include <math.h>
+#include <string.h>
 #include "ou.h"
 
 int reserverd_word(char *s);
--- openuniverse-1.0beta3/src/cfgparse.y	2000-06-04 21:34:38.000000000 +0200
+++ openuniverse-1.0beta3.fixed/src/cfgparse.y	2007-12-18 17:31:22.000000000 +0100
@@ -1,5 +1,6 @@
 %{
 #include <math.h>		/* For math functions, cos(), sin(), etc. */
+#include <string.h>
 #include <time.h>
 #include "ou.h"
 
--- openuniverse-1.0beta3/src/cmdline.cpp	2000-05-14 00:48:45.000000000 +0200
+++ openuniverse-1.0beta3.fixed/src/cmdline.cpp	2007-12-18 17:32:13.000000000 +0100
@@ -17,6 +17,7 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#include <string.h>
 #include "ou.h"
 #ifdef HAVE_GLUI
 #include "gui.h"
--- openuniverse-1.0beta3/src/font.cpp	2000-05-14 00:49:11.000000000 +0200
+++ openuniverse-1.0beta3.fixed/src/font.cpp	2007-12-18 17:38:19.000000000 +0100
@@ -17,6 +17,7 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#include <string.h>
 #include "ou.h"
 
 char fontpath[100] = FONT_DIR;
--- openuniverse-1.0beta3/src/jpeg.cpp	2000-05-14 00:49:50.000000000 +0200
+++ openuniverse-1.0beta3.fixed/src/jpeg.cpp	2007-12-18 17:37:59.000000000 +0100
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <setjmp.h>
+#include <string.h>
 extern "C" {
 #include "jpeglib.h"
 }
--- openuniverse-1.0beta3/src/milkyway.cpp	2000-05-14 00:50:25.000000000 +0200
+++ openuniverse-1.0beta3.fixed/src/milkyway.cpp	2007-12-18 17:31:42.000000000 +0100
@@ -17,6 +17,7 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#include <string.h>
 #include "ou.h"
 
 int milkyway = 1, milkyway_texsize = 0;
--- openuniverse-1.0beta3/src/stars.cpp	2000-05-14 00:51:11.000000000 +0200
+++ openuniverse-1.0beta3.fixed/src/stars.cpp	2007-12-18 17:31:57.000000000 +0100
@@ -17,6 +17,7 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#include <string.h>
 #include "ou.h"
 
 float star_size = 40.0;

openuniverse-1.0beta3-yacc.patch:

--- NEW FILE openuniverse-1.0beta3-yacc.patch ---
--- openuniverse-1.0beta3/src/cfgparse.y	2000-06-04 21:34:38.000000000 +0200
+++ openuniverse-1.0beta3.fixed/src/cfgparse.y	2007-12-18 17:31:22.000000000 +0100
@@ -173,13 +174,13 @@ SPLASHBITMAP '=' INTEGER_NUM {
 }
 
 |FONT '=' INTEGER_NUM {
-fonttype = $3}
+fonttype = $3;}
 
 |LEVELOFDETAIL '=' INTEGER_NUM {
-LOD = $3}
+LOD = $3;}
 
 |TEXTURECOMPRESSION '=' INTEGER_NUM {
-tex_compr *= $3}
+tex_compr *= $3;}
 
 |COLORDEPTH '=' INTEGER_NUM {
     color_depth = $3;


--- NEW FILE openuniverse.1 ---
.\"                                      Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH OPENUNIVERSE 1 "December 18, 2007"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n>    insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
openuniverse \- 3D space simulation
.SH SYNOPSIS
.B openuniverse
.RI [ -bench ] [ -fullscreen [ mode_string ] ] 
.SH DESCRIPTION
This manual page documents briefly the
.B openuniverse
command.
.PP
OpenUniverse (also called OU) is a fun, fast and free OpenGL space simulator. 
It currently focusses on the Solar System and lets you visit all of its planets, most major moons and a vast 
collection of smaller bodies in colorful, glorious and realtime 
3D. If you've ever had a chance to visit Mercury or asteroid Geographos, 
here you'll find them looking exactly the same way, following exactly 
the same path as when you've left them.
.PP
This program \fBreally\fP benefits of a 3D accelerator graphic card. 
It's the only way to ensure a decent framerate (speed). 
.
.PP
When OpenUniverse starts up we suggest to simply lay back for a few seconds. 
Because you have just reached Earth! OU's 
main screen with it's helpful information shows up now and the blue 
planet will slowly rotate in front of you, while you have a moment 
to enjoy it's beauty and fragility.
.PP
To view the Help press the 'H' key, you can swith on and off the
demo mode with the 'd' key. For other commands and functions see OU's manual.
.PP
This manual page was written for the Debian GNU/Linux distribution
because the original program does not have a manual page.
Instead, it has documentation in the HTML format; see below.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
.\" respectively.
.SH OPTIONS
A summary of options is included below.
For a complete description, see OU's manual.
.TP
.B \-h, \-\-help
Show summary of options.
.TP
.B \-bench 
Do a benchmark of your system.
.TP
.B \-fullscren mode_screen
Launch openuniverse fullscren. The value 
.I mode_screen
defines the screen resolution, colordepth and refresh rate. For example the
command line
.B openuniverse -fullscreen 640x480:32 at 70
will run OpenUniverse in an resolution of 640x480
pixels, a colordeph of 32 bit (truecolor) and at a refresh rate of
70Hz. Please note that the characters 'x' and ':' are important and
can't be removed (you don't have to suppy refresh rate if you don't
want as it'll use default refresh rate for the supplied
resolution). Note as well that a lot of 3D cards are only capable
of resolutions up to 800x600 and colordepths up to 16bit.
.SH ABOUT
.br
The programs are documented in the manual pages (not quite complete yet)
available in /usr/share/openuniverse/docs. Also go away
and check the screenshots (not available in this package) that
can be seen in www.openuniverse.org
.SH FILES
.TP
.B /usr/share/openuniverse/textures
Textures used for planets.
.TP
.B /usr/share/openuniverse/fonts
Fonts used by the program.
.TP
.B /usr/share/openuniverse/3dmodels
Three dimensional models of the objects (satellites and space station).
.TP
.B /usr/share/openuniverse/data
Stellar data sets, it includes a few objects from the Messier catalog
and a basic set of bright stars derived from the yale bright star catalog
(it includes only those entries Bayer and/or Flamsteed number and
provides common names which were overlayed by closes postition match
from a hand-edited list)
.B /etc
Location of the configuration of openuniverse (\fBou.conf\fR)
.TP
.B /usr/share/openuniverse/docs
Additional documentation.
 

.SH AUTHOR
This manual page was written by Javier Fernandez-Sanguino <jfs at computer.org>
for the Debian GNU/Linux system (but may be used by others). Modified for
Fedora by Lubomir Kundrak <lkundrak at redhat.com>


--- NEW FILE openuniverse.desktop ---
[Desktop Entry]
Version=1.0
Name=OpenUniverse Space Simulator
GenericName=Space Simulator
Comment=Explore the solar system in this accurate simulation
Type=Application
Exec=openuniverse
Icon=openuniverse
Categories=Application;Science;Education;Astronomy;


--- NEW FILE openuniverse.spec ---
%define snapshot beta3

Name:           openuniverse
Version:        1.0
Release:        0.%{snapshot}%{?dist}
Summary:        OpenGL space simulator focused on the Solar System

Group:          Amusements/Graphics
License:        GPLv2+
URL:            http://www.openuniverse.org/
Source0:        http://download.sourceforge.net/openuniverse/%{name}-%{version}%{snapshot}.tar.gz
Source1:        openuniverse.1
Source2:        openuniverse.desktop
Patch0:         openuniverse-1.0beta3-strings.patch
Patch1:         openuniverse-1.0beta3-gl.patch
Patch2:         openuniverse-1.0beta3-yacc.patch
Patch3:         openuniverse-1.0beta3-paths.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  desktop-file-utils
BuildRequires:  bison flex
BuildRequires:  mesa-libGL-devel
BuildRequires:  mesa-libGLU-devel
BuildRequires:  freeglut-devel
BuildRequires:  libXmu-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libICE-devel
BuildRequires:  libSM-devel
BuildRequires:  libX11-devel
BuildRequires:  libXext-devel
BuildRequires:  libXi-devel
BuildRequires:  libXmu-devel


%description
OpenUniverse is a space simulator.  It currently focusses on the Solar
System and lets you visit all of its planets, major moons and a vast
collection of smaller bodies in colorful, glorious and realtime 3D.

If you've ever had a chance to visit Mercury or asteroid Geographos, here
you'll find them looking exactly the same way, following exactly the same
path as when you've left them.


%prep
%setup -q -n %{name}-%{version}%{snapshot}
%patch0 -p1 -b .strings
%patch1 -p1 -b .gl
%patch2 -p1 -b .yacc
%patch3 -p1 -b .paths


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install SHOTS_DIR=. DESTDIR=$RPM_BUILD_ROOT

# Manual
install -d $RPM_BUILD_ROOT%{_mandir}/man1
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1

# Menu entry
desktop-file-install --vendor fedora                    \
        --dir $RPM_BUILD_ROOT%{_datadir}/applications   \
        %{SOURCE2}

# Fixup config file paths
install -d $RPM_BUILD_ROOT%{_sysconfdir}
mv $RPM_BUILD_ROOT%{_datadir}/openuniverse/conf/ou.conf \
       $RPM_BUILD_ROOT%{_sysconfdir}
rmdir $RPM_BUILD_ROOT%{_datadir}/openuniverse/conf



%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/ou.conf
%{_bindir}/openuniverse
%{_datadir}/openuniverse
%{_mandir}/man1/openuniverse.1*
%{_datadir}/applications/*.desktop
%doc AUTHORS NEWS README ChangeLog COPYING INSTALL docs/manual.html
%doc %{_datadir}/openuniverse/docs


%changelog
* Tue Dec 18 2007 Lubomir Kundrak <lkundrak at redhat.com> 1.0-0.beta3
- Initial packaging attempt


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/openuniverse/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	24 Mar 2008 17:00:20 -0000	1.1
+++ .cvsignore	24 Mar 2008 17:12:04 -0000	1.2
@@ -0,0 +1 @@
+openuniverse-1.0beta3.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/openuniverse/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	24 Mar 2008 17:00:20 -0000	1.1
+++ sources	24 Mar 2008 17:12:04 -0000	1.2
@@ -0,0 +1 @@
+e6a3e069269db0138e80f926184df3b8  openuniverse-1.0beta3.tar.gz




More information about the fedora-extras-commits mailing list