From: Uwe Köcher Date: Tue, 8 Jul 2014 09:19:06 +0000 (+0200) Subject: resetted new p4est since it is not reconqnised by deal.II so far; corrected download... X-Git-Tag: 0.3~15 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4b190f45f24f02f9d339dc2ed1687fb9b4b5f17;p=candi.git resetted new p4est since it is not reconqnised by deal.II so far; corrected download link for p4est-0.3.4.2 --- diff --git a/deal.II/packages/p4est.package b/deal.II/packages/p4est.package index 6b6ccce..a203b7f 100644 --- a/deal.II/packages/p4est.package +++ b/deal.II/packages/p4est.package @@ -1,24 +1,86 @@ -VERSION=1.0 -NAME=p4est -SOURCE=https://github.com/cburstedde/ -PACKING=git -CHECKSUM=ignore +VERSION=0.3.4.2 +NAME=p4est-${VERSION} +SOURCE=http://p4est.github.io/release/ +PACKING=.tar.gz +CHECKSUM=ef38ea3be84628b1548188106a5b01e7 BUILDCHAIN=custom package_specific_setup () { - cd ${UNPACK_PATH}/${EXTRACTSTO} - git checkout tags/v${VERSION} - git submodule init && git submodule update - cd sc - git checkout tags/v${VERSION} - cd .. - ./bootstrap + function bdie () { + echo "Error: $@" + exit 1 + } - cd "${BUILD_PATH}/${NAME}" - ${UNPACK_PATH}/${EXTRACTSTO}/configure --prefix=${INSTALL_PATH}/${NAME} - make - make install + if test -z "$CFLAGS" -a -z "$P4EST_CFLAGS_FAST" ; then + export CFLAGS_FAST="-O2" + else + export CFLAGS_FAST="$CFLAGS $P4EST_CFLAGS_FAST" + fi + echo "CFLAGS_FAST: $CFLAGS_FAST" + + if test -z "$CFLAGS" -a -z "$P4EST_CFLAGS_DEBUG" ; then + export CFLAGS_DEBUG="-O0 -g" + else + export CFLAGS_DEBUG="$CFLAGS $P4EST_CFLAGS_DEBUG" + fi + echo "CFLAGS_DEBUG: $CFLAGS_DEBUG" + + # choose names for fast and debug build directories + BUILD_FAST="${BUILD_PATH}/${NAME}/FAST" + BUILD_DEBUG="${BUILD_PATH}/${NAME}/DEBUG" + + # choose names for fast and debug installation directories + INSTALL_FAST="${INSTALL_PATH}/${NAME}/FAST" + INSTALL_DEBUG="${INSTALL_PATH}/${NAME}/DEBUG" + + echo + echo "This script tries configure and build the p4est library." + echo "Build FAST: $BUILD_FAST" + echo "Build DEBUG: $BUILD_DEBUG" + echo "Install FAST: $INSTALL_FAST" + echo "Install DEBUG: $INSTALL_DEBUG" + echo "Checking environment: CFLAGS P4EST_CFLAGS_FAST P4EST_CFLAGS_DEBUG" + + test -f "${UNPACK_PATH}/${EXTRACTSTO}/src/p4est.h" || bdie "Main header file missing" + test -f "${UNPACK_PATH}/${EXTRACTSTO}/configure" || bdie "Configure script missing" + echo "See output in files .../config.output and .../make.output" + echo + + # remove old versions + if test -d "${BUILD_PATH}/${NAME}"; then + rm -rf "${BUILD_PATH}/${NAME}" + fi + + echo "Build FAST version in $BUILD_FAST" + mkdir -p "$BUILD_FAST" + cd "$BUILD_FAST" + "${UNPACK_PATH}/${EXTRACTSTO}/configure" --enable-mpi --enable-shared \ + --disable-vtk-binary --without-blas \ + --prefix="$INSTALL_FAST" CFLAGS="$CFLAGS_FAST" \ + CPPFLAGS="-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL" \ + "$@" > config.output || bdie "Error in configure" + make -C sc -j${PROCS} > make.output || bdie "Error in make sc" + make -j${PROCS} >> make.output || bdie "Error in make p4est" + make install >> make.output || bdie "Error in make install" + echo "FAST version installed in $INSTALL_FAST" + + echo + echo "Build DEBUG version in $BUILD_DEBUG" + mkdir -p "$BUILD_DEBUG" + cd "$BUILD_DEBUG" + "${UNPACK_PATH}/${EXTRACTSTO}/configure" --enable-debug --enable-mpi --enable-shared \ + --disable-vtk-binary --without-blas \ + --prefix="$INSTALL_DEBUG" CFLAGS="$CFLAGS_DEBUG" \ + CPPFLAGS="-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL" \ + "$@" > config.output || bdie "Error in configure" + make -C sc -j${PROCS} > make.output || bdie "Error in make sc" + make -j${PROCS} >> make.output || bdie "Error in make p4est" + make install >> make.output || bdie "Error in make install" + echo "DEBUG version installed in $INSTALL_DEBUG" + echo + + cd "${BUILD_PATH}/${NAME}" touch dorsal_successful_build }