Add libccmio-2.6.1 as a ThirdParty package

This commit is contained in:
Martin Beaudoin 2010-12-19 22:22:59 -05:00
parent 13cfb416bb
commit 518a019e98
8 changed files with 298 additions and 10 deletions

View file

@ -75,13 +75,13 @@ else
fi
# Libccmio
#if [ -z "$LIBCCMIO_SYSTEM" ]
#then
# ( rpm_make libccmio-2.6.1 )
#else
# echo "Using system installed Libccmio"
# echo ""
#fi
if [ -z "$LIBCCMIO_SYSTEM" ]
then
( rpm_make libccmio-2.6.1 https://wci.llnl.gov/codes/visit/3rd_party/libccmio-2.6.1.tar.gz )
else
echo "Using system installed Libccmio"
echo ""
fi
# Mesquite
if [ -z "$MESQUITE_SYSTEM" ]

View file

@ -0,0 +1,78 @@
diff -ruN libccmio-2.6.1_orig/config/config.gnu.to.star libccmio-2.6.1/config/config.gnu.to.star
--- libccmio-2.6.1_orig/config/config.gnu.to.star 2007-12-17 18:32:03.000000000 -0500
+++ libccmio-2.6.1/config/config.gnu.to.star 2010-12-18 14:50:35.000000000 -0500
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# $Id: config.gnu.to.star,v 1.4 2006/06/05 21:12:16 geoffp Exp $
@@ -34,6 +34,7 @@
x86_64-unknown-linux-gnu-null) echo linux64_2.4-x86-glibc_2.2.5 ;;
ppc64-unknown-linux-gnu-null) echo linux64_2.6-pwr4-glibc_2.3.3 ;;
i386-apple-darwin8-null) echo i386-apple-darwin8 ;;
+ i386-apple-darwin10-null) echo i386-apple-darwin10 ;;
*) echo unknown ;;
esac
diff -ruN libccmio-2.6.1_orig/config/config.guess libccmio-2.6.1/config/config.guess
--- libccmio-2.6.1_orig/config/config.guess 2006-06-30 14:00:19.000000000 -0400
+++ libccmio-2.6.1/config/config.guess 2010-12-18 14:50:49.000000000 -0500
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
diff -ruN libccmio-2.6.1_orig/config/config.system libccmio-2.6.1/config/config.system
--- libccmio-2.6.1_orig/config/config.system 2008-02-25 22:07:16.000000000 -0500
+++ libccmio-2.6.1/config/config.system 2010-12-18 14:51:34.000000000 -0500
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
# $Id: config.system,v 1.2 2005/09/29 22:19:19 geoffp Exp $
@@ -87,6 +87,9 @@
i386-apple-darwin8.11.1)
echo i386-apple-darwin8 ;;
+ i386-apple-darwin10.5.0)
+ echo i386-apple-darwin10 ;;
+
*)
echo unknown
echo System type ${SYSTEM} not supported! 1>&2 ;;
diff -ruN libccmio-2.6.1_orig/config/runqmake libccmio-2.6.1/config/runqmake
--- libccmio-2.6.1_orig/config/runqmake 2006-06-30 14:00:19.000000000 -0400
+++ libccmio-2.6.1/config/runqmake 2010-12-18 14:53:41.000000000 -0500
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
PATHTOSRC=$1
shift
diff -ruN libccmio-2.6.1_orig/libadf/adf.pro libccmio-2.6.1/libadf/adf.pro
--- libccmio-2.6.1_orig/libadf/adf.pro 2006-06-30 14:00:17.000000000 -0400
+++ libccmio-2.6.1/libadf/adf.pro 2010-12-18 13:32:43.000000000 -0500
@@ -1,7 +1,7 @@
TEMPLATE = lib
windows-vc.net:TEMPLATE = vclib
windows-vc.net:config += release
-TARGET = adf
+TARGET = adf_ccmio
PATHTOSRC = ../
include($$PATHTOSRC/config/ccm.pro)
diff -ruN libccmio-2.6.1_orig/libcgns/cgns.pro libccmio-2.6.1/libcgns/cgns.pro
--- libccmio-2.6.1_orig/libcgns/cgns.pro 2006-06-30 14:00:18.000000000 -0400
+++ libccmio-2.6.1/libcgns/cgns.pro 2010-12-18 13:33:29.000000000 -0500
@@ -1,7 +1,7 @@
TEMPLATE = lib
windows-vc.net:TEMPLATE = vclib
windows-vc.net:config += release
-TARGET = cgns
+TARGET = cgns_ccmio
PATHTOSRC = ../
include($$PATHTOSRC/config/ccm.pro)

View file

@ -0,0 +1,181 @@
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright held by original author
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Script
# RPM spec file for libccmio-2.6.1
#
# Description
# RPM spec file for creating a relocatable RPM
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
#
#------------------------------------------------------------------------------
# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable
%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)}
%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)}
# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory
%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild
%define _tmppath %{_topdir}/tmp
# Will install the package directly $WM_THIRD_PARTY_DIR
# Some comments about package relocation:
# By using this prefix for the Prefix: parameter in thi file, you will make this
# package relocatable.
#
# This is fine, as long as your software is itself relocatable.
#
# Simply take note that libraries built with libtool are not relocatable because the
# prefix we specify will be hard-coded in the library .la files.
# Ref: http://sourceware.org/autobook/autobook/autobook_80.html
#
# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will
# not be able to reutilize this RPM, even though it is relocatable. You will need to
# regenerate the RPM.
#
%define _prefix %{_WM_THIRD_PARTY_DIR}
%define name libccmio
%define release %{_WM_OPTIONS}
%define version 2.6.1
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: libccmio
License: Unkown
Name: %{name}
Version: %{version}
Release: %{release}
URL: https://wci.llnl.gov/codes/visit/3rd_party
Source: %url/%{name}-%{version}.tar.gz
Prefix: %{_prefix}
Group: Development/Tools
Patch0: libccmio-2.6.1.patch_0
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
%description
%{summary}
%prep
%setup -q
%patch0 -p1
%build
[ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
%ifos darwin
# Missing configuration for Mac OS X 10
[ ! -d configi386-apple-darwin10 ] && cp -r config/i386-apple-darwin8 config/i386-apple-darwin10
%endif
# Warning:
# 1: The name of the ADF library will be renamed to libadf_ccmio since this
# is an old version of ADF, and the author modified the source code
# 2: The name of the CGNS library will be renamed to libcgns_ccmio as well
# since this is an old version of CGNS.
#
# This way, the libraries libadf_ccmio and libcgns_ccmio will not get in
# conflict with any other packages that might depend on a newer version
# of libadf or libcgns
#
unset RELEASE
unset DEBUG
unset STATIC
unset SHARED
if [ -d libadf ]; then ( cd libadf; RELEASE=1 SHARED=1 make -f Makefile.qmake all; ) fi
if [ -d libccmio ]; then ( cd libccmio; RELEASE=1 SHARED=1 make -f Makefile.qmake all; ) fi
# We don't need libcgns_ccmio. We keep it here as a reference
#if [ -d libcgns ]; then cd libcgns; RELEASE=1 SHARED=1 make -f Makefile.qmake all; fi
%install
# Manual installation
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/include/libccmio
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/lib
libsdir=`find ./lib -name release-shared`
mv ${libsdir}/* $RPM_BUILD_ROOT/%{_installPrefix}/lib
cp libccmio/*.h $RPM_BUILD_ROOT/%{_installPrefix}/include/libccmio
# Creation of OpenFOAM specific .csh and .sh files"
echo ""
echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}"
echo ""
#
# Generate package specific .sh file for OpenFOAM
#
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc
cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export LIBCCMIO_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
export LIBCCMIO_BIN_DIR=\$LIBCCMIO_DIR/bin
export LIBCCMIO_LIB_DIR=\$LIBCCMIO_DIR/lib
export LIBCCMIO_INCLUDE_DIR=\$LIBCCMIO_DIR/include
# Enable access to the package runtime applications and libraries
[ -d \$LIBCCMIO_BIN_DIR ] && _foamAddPath \$LIBCCMIO_BIN_DIR
[ -d \$LIBCCMIO_LIB_DIR ] && _foamAddLib \$LIBCCMIO_LIB_DIR
DOT_SH_EOF
#
# Generate package specific .csh file for OpenFOAM
#
cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh
# Load %{name}-%{version} libraries and binaries if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv LIBCCMIO_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
setenv LIBCCMIO_BIN_DIR \$LIBCCMIO_DIR/bin
setenv LIBCCMIO_LIB_DIR \$LIBCCMIO_DIR/lib
setenv LIBCCMIO_INCLUDE_DIR \$LIBCCMIO_DIR/include
if ( -e \$LIBCCMIO_BIN_DIR ) then
_foamAddPath \$LIBCCMIO_BIN_DIR
endif
if ( -e \$LIBCCMIO_LIB_DIR ) then
_foamAddLib \$LIBCCMIO_LIB_DIR
endif
DOT_CSH_EOF
%clean
rm -rf %{buildroot}
%Files
%defattr(-,root,root)
%{_installPrefix}/*

View file

@ -1,10 +1,10 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I${WM_THIRD_PARTY_DIR}/libccmio-2.6.1 \
-I${WM_THIRD_PARTY_DIR}/libccmio-2.6.1/lnInclude
-I${LIBCCMIO_INCLUDE_DIR} \
-I${LIBCCMIO_INCLUDE_DIR}/libccmio
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lccmio
-L${LIBCCMIO_LIB_DIR} -lccmio -ladf_ccmio

View file

@ -90,6 +90,13 @@
#setenv PARMGRIDGEN_LIB_DIR $PARMGRIDGEN_DIR/lib
#setenv PARMGRIDGEN_INCLUDE_DIR $PARMGRIDGEN_DIR/include
# System installed Libccmio
#setenv LIBCCMIO_SYSTEM 1
#setenv LIBCCMIO_DIR path_to_system_installed_libccmio
#setenv LIBCCMIO_BIN_DIR $LIBCCMIO_DIR/bin
#setenv LIBCCMIO_LIB_DIR $LIBCCMIO_DIR/lib
#setenv LIBCCMIO_INCLUDE_DIR $LIBCCMIO_DIR/include
# System installed Scotch
#setenv SCOTCH_SYSTEM 1
#setenv SCOTCH_DIR path_to_system_installed_scotch

View file

@ -92,6 +92,13 @@ compilerInstall=system
#export PARMGRIDGEN_LIB_DIR=$PARMGRIDGEN_DIR/lib
#export PARMGRIDGEN_INCLUDE_DIR=$PARMGRIDGEN_DIR/include
# System installed Libccmio
#export LIBCCMIO_SYSTEM=1
#export LIBCCMIO_DIR=path_to_system_installed_libccmio
#export LIBCCMIO_BIN_DIR=$LIBCCMIO_DIR/bin
#export LIBCCMIO_LIB_DIR=$LIBCCMIO_DIR/lib
#export LIBCCMIO_INCLUDE_DIR=$LIBCCMIO_DIR/include
# System installed Scotch
#export SCOTCH_SYSTEM=1
#export SCOTCH_DIR=path_to_system_installed_scotch

View file

@ -394,6 +394,13 @@ if ( $?PARMGRIDGEN_SYSTEM == 0 && -e $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.
_foamSource $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.0/platforms/$WM_OPTIONS/etc/ParMGridGen-1.0.csh
endif
# Load Libccmio library
# ~~~~~~~~~~~~~~~~~~~~~
if ( $?LIBCCMIO_SYSTEM == 0 && -e $WM_THIRD_PARTY_DIR/packages/libccmio-2.6.1 ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/libccmio-2.6.1/platforms/$WM_OPTIONS/etc/libccmio-2.6.1.csh
endif
# Scotch library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( $?SCOTCH_SYSTEM == 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-5.1.10b ) then

View file

@ -452,6 +452,14 @@ export MPI_BUFFER_SIZE
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PARMGRIDGEN_DIR is initialized to: $PARMGRIDGEN_DIR"
# Load Libccmio library
# ~~~~~~~~~~~~~~~~~~~~~
[ -z "$LIBCCMIO_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/libccmio-2.6.1 ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/libccmio-2.6.1/platforms/$WM_OPTIONS/etc/libccmio-2.6.1.sh
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " LIBCCMIO_DIR is initialized to: $LIBCCMIO_DIR"
# Load Scotch library
# ~~~~~~~~~~~~~~~~~~~
[ -z "$SCOTCH_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-5.1.10b ] && {