[Inventor/f16] Modernize spec file. Add -funsigned-char to CXXFLAGS. Add Inventor-2.1.5-bz433154.patch (Address BZ4

corsepiu corsepiu at fedoraproject.org
Sat Jan 7 18:02:46 UTC 2012


commit fd9e1f9194ef975dd0d88769505ee98aaa3445f4
Author: Ralf Corsépius <corsepiu at fedoraproject.org>
Date:   Sat Jan 7 19:02:36 2012 +0100

    Modernize spec file.
    Add -funsigned-char to CXXFLAGS.
    Add Inventor-2.1.5-bz433154.patch (Address BZ433154).

 Inventor-2.1.5-bz433154.patch |   13 +++++++++++++
 Inventor.spec                 |   25 +++++++++++++------------
 2 files changed, 26 insertions(+), 12 deletions(-)
---
diff --git a/Inventor-2.1.5-bz433154.patch b/Inventor-2.1.5-bz433154.patch
new file mode 100644
index 0000000..fa1c18f
--- /dev/null
+++ b/Inventor-2.1.5-bz433154.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/database/src/so/SoType.c++ b/lib/database/src/so/SoType.c++
+index e712e01..1484086 100644
+--- a/lib/database/src/so/SoType.c++
++++ b/lib/database/src/so/SoType.c++
+@@ -295,7 +295,7 @@ SoType::fromName(SbName name)
+ 	if (dsoHandle  == NULL)
+ 	    return SoType::badType();
+ 
+-#if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))
++#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))
+ #define DUMMY_FUNC "_ZN%d%s9initClassEv"
+ #else
+ #define DUMMY_FUNC "initClass__%d%s%s"
diff --git a/Inventor.spec b/Inventor.spec
index fc9c1e9..1f729c9 100644
--- a/Inventor.spec
+++ b/Inventor.spec
@@ -1,12 +1,12 @@
 #
-# Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Ralf Corsepius, Ulm, Germany.
+# Copyright (c) 2004-2012 Ralf Corsepius, Ulm, Germany.
 # This file and all modifications and additions to the pristine
 # package are under the same license as the package itself.
 #
 
 Name:           Inventor
 Version:        2.1.5
-Release:        40%{?dist}
+Release:        40%{?dist}.1
 
 Summary:        SGI Open Inventor (TM)
 
@@ -24,10 +24,12 @@ Patch3:		Inventor-2.1.5-32-33.diff
 Patch4:         Inventor-2.1.5-s390x.patch
 # Indirect linkage fixes
 Patch5:         Inventor-2.1.5-33-38.diff
+# DSO loader fix.
+Patch6:		Inventor-2.1.5-bz433154.patch
 
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%define hackcxxflags -O2 -fno-strict-aliasing
+# Inventor is not aliasing-safe.
+# Inventor presumes unsigned chars.
+%define hackcxxflags -O2 -fno-strict-aliasing -funsigned-char
 
 BuildRequires:  libGLU-devel
 BuildRequires:	libGLw-devel
@@ -152,6 +154,7 @@ find -name CVS | xargs rm -rf
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 sed -i \
 -e 's,^IVPREFIX =.*$,IVPREFIX = %{_prefix},' \
@@ -192,7 +195,6 @@ rm -f data/models/scenes/chesschairs.iv
 
 %build
 # Inventor's build system wants us to install and build everything at once.
-rm -rf $RPM_BUILD_ROOT
 export LD_LIBRARY_PATH=${RPM_BUILD_ROOT}%{_libdir}
 export VCOPTS="${RPM_OPT_FLAGS} -D_REENTRANT"
 export VCXXOPTS=$(echo "${RPM_OPT_FLAGS} -D_REENTRANT -D__STDC_FORMAT_MACROS" | sed -e 's,-O2,%{hackcxxflags},')
@@ -225,7 +227,6 @@ make clean
 popd > /dev/null
 
 %install
-rm -rf $RPM_BUILD_ROOT
 export LD_LIBRARY_PATH=${RPM_BUILD_ROOT}%{_libdir}
 export VCOPTS="${RPM_OPT_FLAGS} -D_REENTRANT"
 export VCXXOPTS="${RPM_OPT_FLAGS} -D_REENTRANT"
@@ -262,11 +263,6 @@ ln -s /usr/share/fonts/liberation/LiberationMono-Italic.ttf Courier-Oblique
 ln -s /usr/share/fonts/liberation/LiberationMono-BoldItalic.ttf Courier-BoldOblique
 popd > /dev/null
 
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
@@ -352,6 +348,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/Inventor/examples
 
 %changelog
+* Sat Jan 07 2012 Ralf Corsépius <corsepiu at fedoraproject.org> - 2.1.5-40.1
+- Modernize spec file.
+- Add -funsigned-char to CXXFLAGS.
+- Add Inventor-2.1.5-bz433154.patch (Address BZ433154).
+
 * Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.1.5-40
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list