* start of support for fat binaries
This commit was SVN r9021.
Этот коммит содержится в:
родитель
2b40758cf8
Коммит
ad25609c89
171
contrib/dist/macosx-pkg/buildpackage.sh
поставляемый
171
contrib/dist/macosx-pkg/buildpackage.sh
поставляемый
@ -31,11 +31,15 @@
|
|||||||
#
|
#
|
||||||
# User-configurable stuff
|
# User-configurable stuff
|
||||||
#
|
#
|
||||||
OMPI_PREFIX="/usr/local"
|
OMPI_PREFIX="/usr/local/openmpi"
|
||||||
OMPI_OPTIONS="--disable-f77 --without-cs-fs"
|
OMPI_OPTIONS="--disable-f77 --without-cs-fs -enable-mca-no-build=ras-slurm,pls-slurm,gpr-null,pml-teg,pml-uniq,ptl-self,ptl-sm,ptl-tcp,sds-pipe,sds-slurm"
|
||||||
OMPI_PACKAGE="openmpi"
|
OMPI_PACKAGE="openmpi"
|
||||||
OMPI_VER_PACKAGE="openmpi"
|
OMPI_VER_PACKAGE="openmpi"
|
||||||
OMPI_OSX_README="ReadMe.rtf"
|
OMPI_OSX_README="ReadMe.rtf"
|
||||||
|
# note - if want XGrid support, make sure that a cocoa-supported
|
||||||
|
# architecture appears first on the list.
|
||||||
|
OMPI_ARCH_LIST="ppc i386"
|
||||||
|
OMPI_SDK="/Developer/SDKs/MacOSX10.4u.sdk"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Not so modifiable stuff
|
# Not so modifiable stuff
|
||||||
@ -153,59 +157,132 @@ if test ! -d "$srcdir"; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
build_arch=`uname -p`"-apple-darwin"`uname -r`
|
||||||
# Run configure
|
|
||||||
#
|
|
||||||
cd $srcdir
|
|
||||||
config="./configure --prefix=$OMPI_PREFIX $OMPI_OPTIONS"
|
|
||||||
echo "--> Running configure: $config"
|
|
||||||
eval $config > "$BUILD_TMP/configure.out" 2>&1
|
|
||||||
|
|
||||||
if test $? != 0; then
|
real_install=1
|
||||||
echo "*** Problem running configure - aborting!"
|
for arch in $OMPI_ARCH_LIST ; do
|
||||||
echo "*** See $BUILD_TMP/configure.out for help."
|
builddir="$BUILD_TMP/build-$arch"
|
||||||
exit 1
|
mkdir "$builddir"
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
case "$arch" in
|
||||||
# Build
|
ppc)
|
||||||
#
|
host_arch="powerpc-apple-darwin"`uname -r`
|
||||||
cmd="make all"
|
;;
|
||||||
echo "--> Building: $cmd"
|
ppc64)
|
||||||
eval $cmd > "$BUILD_TMP/make.out" 2>&1
|
# lie, but makes building on G4 easier
|
||||||
|
host_arch="powerpc64-apple-darwin"`uname -r`
|
||||||
|
;;
|
||||||
|
i386)
|
||||||
|
host_arch="i386-apple-darwin"`uname -r`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if test $? != 0; then
|
#
|
||||||
echo "*** Problem building - aborting!"
|
# Run configure
|
||||||
echo "*** See $BUILD_TMP/make.out for help."
|
#
|
||||||
exit 1
|
cd $builddir
|
||||||
fi
|
config="$srcdir/configure CFLAGS=\"-isysroot $OMPI_SDK\" --prefix=$OMPI_PREFIX $OMPI_OPTIONS --build=$build_arch --host=$host_arch"
|
||||||
|
echo "--> Running configure: $config"
|
||||||
|
eval $config > "$BUILD_TMP/configure.out" 2>&1
|
||||||
|
|
||||||
#
|
if test $? != 0; then
|
||||||
# Install into tmp place
|
echo "*** Problem running configure - aborting!"
|
||||||
#
|
echo "*** See $BUILD_TMP/configure.out for help."
|
||||||
distdir="dist/"
|
exit 1
|
||||||
fulldistdir="$BUILD_TMP/$distdir"
|
fi
|
||||||
cmd="make DESTDIR=$fulldistdir install"
|
|
||||||
echo "--> Installing:"
|
|
||||||
eval $cmd > "$BUILD_TMP/install.out" 2>&1
|
|
||||||
|
|
||||||
if test $? != 0; then
|
#
|
||||||
echo "*** Problem installing - aborting!"
|
# Build
|
||||||
echo "*** See $BUILD_TMP/install.out for help."
|
#
|
||||||
exit 1
|
cmd="make all"
|
||||||
fi
|
echo "--> Building: $cmd"
|
||||||
|
eval $cmd > "$BUILD_TMP/make.out" 2>&1
|
||||||
|
|
||||||
|
if test $? != 0; then
|
||||||
|
echo "*** Problem building - aborting!"
|
||||||
|
echo "*** See $BUILD_TMP/make.out for help."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Install into tmp place
|
||||||
|
#
|
||||||
|
if $real_install -eq 1 ; then
|
||||||
|
distdir="dist"
|
||||||
|
real_install=0
|
||||||
|
else
|
||||||
|
distdir="dist-$arch"
|
||||||
|
fi
|
||||||
|
fulldistdir="$BUILD_TMP/$distdir"
|
||||||
|
cmd="make DESTDIR=$fulldistdir install"
|
||||||
|
echo "--> Installing:"
|
||||||
|
eval $cmd > "$BUILD_TMP/install.out" 2>&1
|
||||||
|
|
||||||
|
if test $? != 0; then
|
||||||
|
echo "*** Problem installing - aborting!"
|
||||||
|
echo "*** See $BUILD_TMP/install.out for help."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copy in special doc files
|
||||||
|
#
|
||||||
|
SPECIAL_FILES="README ${OMPI_OSX_README} LICENSE"
|
||||||
|
echo "--> Copying in special files: $SPECIAL_FILES"
|
||||||
|
mkdir -p "${fulldistdir}/${OMPI_PREFIX}/share/openmpi/doc"
|
||||||
|
cp $SPECIAL_FILES "${fulldistdir}/${OMPI_PREFIX}/share/openmpi/doc/."
|
||||||
|
if [ ! $? = 0 ]; then
|
||||||
|
echo "*** Problem copying files $SPECIAL_FILES. Aborting!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
distdir=
|
||||||
|
fulldistdir=
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
########################################################################
|
||||||
#
|
#
|
||||||
# Copy in special doc files
|
# Make the fat binary
|
||||||
#
|
#
|
||||||
SPECIAL_FILES="README ${OMPI_OSX_README} LICENSE"
|
########################################################################
|
||||||
echo "--> Copying in special files: $SPECIAL_FILES"
|
|
||||||
mkdir -p "${fulldistdir}/${OMPI_PREFIX}/share/openmpi/doc"
|
set -x
|
||||||
cp $SPECIAL_FILES "${fulldistdir}/${OMPI_PREFIX}/share/openmpi/doc/."
|
|
||||||
if [ ! $? = 0 ]; then
|
for arch in $OMPI_ARCH_LIST ; do
|
||||||
echo "*** Problem copying files $SPECIAL_FILES. Aborting!"
|
cd $BUILD_TMP
|
||||||
exit 1
|
other_archs=`ls arch-*`
|
||||||
fi
|
fulldistdir="$BUILD_TMP/dist"
|
||||||
|
|
||||||
|
for other_arch in $other_archs ; do
|
||||||
|
cd "$fulldistdir"
|
||||||
|
|
||||||
|
# <prefix>/bin
|
||||||
|
files=`find bin -type f -print`
|
||||||
|
for file in $files ; do
|
||||||
|
other_file="$BUILD_TMP/dist-${other_arch}/$file"
|
||||||
|
if test -r $other_file ; then
|
||||||
|
lipo -create $file $other_file -output $file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# <prefix>/lib - ignore .la files
|
||||||
|
files=`find lib -type f -print | grep -v '\.la$'`
|
||||||
|
for file in $files ; do
|
||||||
|
other_file="$BUILD_TMP/dist-${other_arch}/$file"
|
||||||
|
if test -r $other_file ; then
|
||||||
|
lipo -create $file $other_file -output $file
|
||||||
|
else
|
||||||
|
echo "Not lipoing missing file $other_file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
done
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
set +x
|
||||||
|
exit
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
#
|
#
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user