rpms/celestia/FC-5 celestia-1.4.1-strictalias.patch, NONE, 1.1 celestia.spec, 1.18, 1.19

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


Author: steve

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

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-5/celestia.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- celestia.spec	22 Aug 2006 16:48:27 -0000	1.18
+++ celestia.spec	22 Nov 2006 22:50:10 -0000	1.19
@@ -1,6 +1,6 @@
 Name:           celestia
 Version:        1.4.1
-Release:        5%{?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,11 +47,20 @@
 %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
 make %{?_smp_mflags}
 
@@ -58,9 +68,7 @@
 %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
 
 
@@ -112,6 +130,13 @@
 
 
 %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.
+
 * Tue Aug 22 2006 Steven Pritchard <steve at kspei.com> 1.4.1-5
 - Turn on -fno-strict-aliasing to work around bug #203525.
 
@@ -216,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