ThirdParty: fix compilation of mesquite-2.1.2 with gcc 4.6.x. Contribution from Philippose Rajan

This commit is contained in:
Martin Beaudoin 2012-05-10 01:48:59 -04:00
parent 91073b20d4
commit c4a76be138
2 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1,11 @@
diff -rupN mesquite-2.1.2/include/Mesquite.hpp mesquite-2.1.2_mod/include/Mesquite.hpp
--- mesquite-2.1.2/include/Mesquite.hpp 2012-05-09 20:53:10.558214520 +0200
+++ mesquite-2.1.2_mod/include/Mesquite.hpp 2012-04-30 10:24:48.000000000 +0200
@@ -53,6 +53,7 @@
#define MESQUITE_EXPORT
#endif
+#include <cstddef>
#include <cmath>
#include <cfloat>
#include <climits>

View file

@ -31,6 +31,9 @@
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
# Contributor:
# Philippose Rajan : patch0 for gcc 4.6.x
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
@ -77,6 +80,7 @@ URL: http://software.sandia.gov/~jakraft
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
Patch0: mesquite-2.1.2_patch0
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
@ -86,6 +90,8 @@ Group: Development/Tools
%prep
%setup -q
%patch0 -p1
%build
# export WM settings in a form that GNU configure recognizes
[ -n "$WM_CC" ] && export CC="$WM_CC"
@ -111,7 +117,7 @@ Group: Development/Tools
[ -e include/Mesquite_all_headers.hpp ] && rm -f include/Mesquite_all_headers.hpp
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS
make -j $WM_NCOMPPROCS OPTFLAGS="-O3 -mtune=native -fPIC"
%install
make install DESTDIR=$RPM_BUILD_ROOT