rpms/celestia/FC-6 celestia-1.4.1-strictalias.patch, NONE, 1.1 celestia.spec, 1.20, 1.21

Steven Pritchard (steve) fedora-extras-commits at redhat.com
Wed Nov 22 22:48:32 UTC 2006


Author: steve

Update of /cvs/extras/rpms/celestia/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13817

Modified Files:
	celestia.spec 
Added Files:
	celestia-1.4.1-strictalias.patch 
Log Message:
Really fix the cmod models problem (#203525).  (Thanks to Hans de Goede.)
Hopefully really handle the gconf schema properly.


celestia-1.4.1-strictalias.patch:

--- NEW FILE celestia-1.4.1-strictalias.patch ---
--- celestia-1.4.1/src/celengine/modelfile.cpp.strictalias	2006-11-22 14:04:15.000000000 +0100
+++ celestia-1.4.1/src/celengine/modelfile.cpp	2006-11-22 14:01:27.000000000 +0100
@@ -1080,7 +1080,9 @@
 static float readFloat(istream& in)
 {
     int i = readUint(in);
-    return *((float*) &i);
+    float f;
+    memcpy(&f, &i, sizeof(float));
+    return f;
 }
 
 


Index: celestia.spec
===================================================================
RCS file: /cvs/extras/rpms/celestia/FC-6/celestia.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- celestia.spec	28 Aug 2006 23:50:49 -0000	1.20
+++ celestia.spec	22 Nov 2006 22:48:01 -0000	1.21
@@ -1,6 +1,6 @@
 Name:           celestia
 Version:        1.4.1
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        OpenGL real-time visual space simulation
 Group:          Amusements/Graphics
 License:        GPL
@@ -9,6 +9,7 @@
 Patch0:         celestia-1.4.0-compile.patch
 Patch1:         celestia-1.4.1-lua51.patch
 Patch2:         celestia-1.4.1-lua51-resume.patch
+Patch3:         celestia-1.4.1-strictalias.patch
 URL:            http://www.shatters.net/celestia/
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -22,8 +23,8 @@
 BuildRequires:  libXt-devel
 BuildRequires:  libXmu-devel
 BuildRequires:  lua-devel
-BuildRequires:  automake17
 BuildRequires:  gettext-devel
+Requires(pre):  GConf2
 Requires(post): GConf2
 Requires(preun): GConf2
 
@@ -46,21 +47,28 @@
 %patch0 -p0
 %patch1 -p1 -b .lua51
 %patch2 -p1 -b .lua51-resume
+%patch3 -p1 -b .strictalias
+
+# Make sure we compile with the right CFLAGS/CXXFLAGS (from Hans de Goede).
+sed -i 's/CFLAGS="\$CFLAGS \$CELESTIAFLAGS \$CELESTIA_CFLAGS"/CFLAGS="\$CFLAGS \$CELESTIAFLAGS"/' configure
+sed -i 's/CXXFLAGS="\$CXXFLAGS \$CELESTIAFLAGS \$CELESTIA_CXXFLAGS"/CXXFLAGS="\$CXXFLAGS \$CELESTIAFLAGS"/' configure
+# sigh stop autoxxx from rerunning because of our patches above.
+touch aclocal.m4
+touch configure
+touch config.h.in
+touch `find -name Makefile.in`
+
 
 %build
 export GTK_LIBS="$( pkg-config --libs gtkglext-x11-1.0 libgnomeui-2.0 )"
-# http://www.shatters.net/forum/viewtopic.php?t=9605
-export CXXFLAGS="%{optflags} -fno-strict-aliasing"
-%configure --with-gnome --with-lua --disable-schemas-install
+%configure --with-gnome --with-lua
 make %{?_smp_mflags}
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
-make install DESTDIR=$RPM_BUILD_ROOT
-unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
+GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install DESTDIR=$RPM_BUILD_ROOT
 
 install -p -m 644 -D src/celestia/kde/data/hi48-app-celestia.png \
   $RPM_BUILD_ROOT%{_datadir}/pixmaps/celestia.png
@@ -86,15 +94,25 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+if [ "$1" -gt 1 ]; then
+    GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
+        gconftool-2 --makefile-uninstall-rule \
+            %{_sysconfdir}/gconf/schemas/%{name}.schemas &>/dev/null || :
+    killall -HUP gconfd-2 &>/dev/null || :
+fi
 
 %post
 GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
-  gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas &>/dev/null || :
+    gconftool-2 --makefile-install-rule \
+        %{_sysconfdir}/gconf/schemas/%{name}.schemas &>/dev/null || :
 
 %preun
-if [ "$1" = "0" ] ; then
-  GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
-    gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas &>/dev/null || :
+if [ "$1" -eq "0" ] ; then
+    GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
+        gconftool-2 --makefile-uninstall-rule \
+            %{_sysconfdir}/gconf/schemas/%{name}.schemas &>/dev/null || :
+    killall -HUP gconfd-2 &>/dev/null || :
 fi
 
 
@@ -105,12 +123,17 @@
 # Seem to have gone away in post-1.4.0 CVS...
 #%doc manual/*.html manual/*.css
 %{_bindir}/*
+%{_sysconfdir}/gconf/schemas/*
 %{_datadir}/applications/*%{name}.desktop
 %{_datadir}/%{name}
 %{_datadir}/pixmaps/%{name}.png
 
 
 %changelog
+* Wed Nov 22 2006 Steven Pritchard <steve at kspei.com> 1.4.1-7
+- Really fix the cmod models problem (#203525).  (Thanks to Hans de Goede.)
+- Hopefully really handle the gconf schema properly.
+
 * Mon Aug 28 2006 Steven Pritchard <steve at kspei.com> 1.4.1-6
 - Add --disable-schemas-install to configure.
 
@@ -218,4 +241,3 @@
 
 * Tue May 14 2002 Julien MOUTTE <julien at moutte.net>
 - Initial RPM release.
-




More information about the fedora-extras-commits mailing list