]> https://gitweb.dealii.org/ - candi.git/commitdiff
resetted new p4est since it is not reconqnised by deal.II so far; corrected download...
authorUwe Köcher <koecher@hsu-hamburg.de>
Tue, 8 Jul 2014 09:19:06 +0000 (11:19 +0200)
committerUwe Köcher <koecher@hsu-hamburg.de>
Tue, 8 Jul 2014 09:19:06 +0000 (11:19 +0200)
deal.II/packages/p4est.package

index 6b6ccced92ad57344ada96917483112a2a51859a..a203b7f0d48e22c799a91632e599b8bf05c167a0 100644 (file)
@@ -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
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.