ThirdParty: Adjustments for ParaView 4.3.1 on Mac OSX

This commit is contained in:
Martin Beaudoin 2015-05-24 16:31:30 -04:00
parent 69f5076a14
commit 31cef14da4
3 changed files with 53 additions and 5 deletions

View file

@ -5,8 +5,8 @@ diff -ruN ParaView-4.3.1_orig/Applications/ParaView-4.3.1_extra_install_Darwin.c
+# +#
+# Additional install rules for Mac OS X platforms +# Additional install rules for Mac OS X platforms
+# +#
+INSTALL (DIRECTORY ../../buildObj/bin/paraview.app +INSTALL (DIRECTORY buildObj/bin/paraview.app
+ DESTINATION ${PV_INSTALL_BIN_DIR} + DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
+ USE_SOURCE_PERMISSIONS + USE_SOURCE_PERMISSIONS
+ COMPONENT Runtime) + COMPONENT Runtime)
+ +

View file

@ -40,6 +40,10 @@
# Disable the generation of debuginfo packages # Disable the generation of debuginfo packages
%define debug_package %{nil} %define debug_package %{nil}
# Turning off the Fascist build policy
# Useful for debugging the install section
%define _unpackaged_files_terminate_build 0
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory # The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild %define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp %define _tmppath %{_topdir}/tmp
@ -157,7 +161,15 @@ Patch0: ParaView-4.3.1.patch_darwin
%ifos darwin %ifos darwin
# Additional installation rules for Mac OSX # Additional installation rules for Mac OSX
addCMakeVariable PARAVIEW_EXTRA_INSTALL_RULES_FILE:FILEPATH=%{_topdir}/BUILD/%{name}-%{version}/Applications/ParaView-3.8.1_extra_install_Darwin.cmake addCMakeVariable PARAVIEW_EXTRA_INSTALL_RULES_FILE:FILEPATH=%{_topdir}/BUILD/%{name}-v%{version}-source/Applications/ParaView-4.3.1_extra_install_Darwin.cmake
# We activate the new Unix-style installation for Mac OS X
addCMakeVariable PARAVIEW_DO_UNIX_STYLE_INSTALLS:BOOL=ON
# Recent version of Mac OSX (Yosemite) cannot compile ParaView with the gcc compiler
# Using clang instead
CC=clang
CXX=clang++
%endif %endif
# Add the value of _qmakePath for QT_QMAKE_EXECUTABLE # Add the value of _qmakePath for QT_QMAKE_EXECUTABLE
@ -190,6 +202,15 @@ Patch0: ParaView-4.3.1.patch_darwin
cd buildObj cd buildObj
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
%ifos darwin
# Cleaning up some strange install side effect from option
# PARAVIEW_DO_UNIX_STYLE_INSTALLS
# Need to revisit this section eventually.
if [ -d "$RPM_BUILD_ROOT/$RPM_BUILD_ROOT" ]; then
mv $RPM_BUILD_ROOT/$RPM_BUILD_ROOT/%{_installPrefix}/bin/* $RPM_BUILD_ROOT/%{_installPrefix}/bin
fi
%endif
# Creation of foam-extend specific .csh and .sh files" # Creation of foam-extend specific .csh and .sh files"
echo "" echo ""
@ -272,3 +293,4 @@ DOT_CSH_EOF
%defattr(-,root,root) %defattr(-,root,root)
%{_installPrefix} %{_installPrefix}

View file

@ -127,6 +127,7 @@ rpm_make()
echo "Making package $_PACKAGE using RPM." echo "Making package $_PACKAGE using RPM."
rpm_build ${_PACKAGE} ${_SPECFILE} ${_ADDITIONALFLAGS} "$@" rpm_build ${_PACKAGE} ${_SPECFILE} ${_ADDITIONALFLAGS} "$@"
#rpm_build_install_stage_only ${_PACKAGE} ${_SPECFILE} ${_ADDITIONALFLAGS} "$@"
fi fi
# Install RPM package if not done already # Install RPM package if not done already
@ -178,6 +179,31 @@ rpm_build()
rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@" rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB -bb ./SPECS/$specFile "$@"
} }
#
# Build a RPM file using the package SPEC file. This function will only call the "%install" stage.
# Useful for debugging the "%install" stage.
#
rpm_build_install_stage_only()
{
package="$1"
specFile="$2"
shift 2
cd $buildBase
[ -e ./SPECS/$specFile ] || {
echo "rpm_build: Error: missing SPEC file for package $package. Aborting."
exit -1
}
#Build RPM package
echo "Building package $package using SPEC file : $specFile. Optional args: $@"
#rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB --clean -bb ./SPECS/$specFile "$@"
#
# Let's keep the compilation directory alive for now in order to facilitate postmortems of failed compilations
rpmbuild --define "_topdir $buildBase" --dbpath $buildBase/rpmDB --short-circuit -bi ./SPECS/$specFile "$@"
}
# #
# Uninstall a package using its RPM # Uninstall a package using its RPM
# #