forked from dealii/candi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparmetis.package
71 lines (55 loc) · 1.81 KB
/
parmetis.package
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
VERSION=4.0.3
NAME=parmetis-${VERSION}
SOURCE=http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/
PACKING=.tar.gz
CHECKSUM=f69c479586bf6bb7aff6a9bc0c739628
BUILDCHAIN=custom
INSTALL_PATH=${INSTALL_PATH}/${NAME}
package_specific_build() {
cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* .
# Firstly build metis
cd metis
make config prefix=${INSTALL_PATH} shared=1
quit_if_fail "parmetis/metis make config failed"
make -j${PROCS}
quit_if_fail "parmetis/metis make failed"
make install
quit_if_fail "parmetis/metis make install failed"
# Secondly build parmetis
cd ..
make config prefix=${INSTALL_PATH} shared=1 cc=$CC cxx=$CXX
quit_if_fail "parmetis make config failed"
make -j${PROCS}
quit_if_fail "parmetis make failed"
make install
quit_if_fail "parmetis make install failed"
}
package_specific_patch () {
if [ ${PLATFORM_OSTYPE} == linux ]; then
if [ ${VERSION} == "4.0.3" ]; then
cd ${UNPACK_PATH}/${EXTRACTSTO}
cecho ${WARN} "applying patch for building METIS shared libraries"
patch -p0 --forward < ${ORIG_DIR}/${PROJECT}/patches/parmetis-4.0.3-build.patch || true
fi
fi
}
package_specific_register () {
export METIS_DIR=${INSTALL_PATH}
export PARMETIS_DIR=${INSTALL_PATH}
if [ ${PLATFORM_OSTYPE} == macos ]; then
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
fi
}
package_specific_conf () {
# Generate configuration file
CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
rm -f $CONFIG_FILE
echo "
export METIS_DIR=${INSTALL_PATH}
export PARMETIS_DIR=${INSTALL_PATH}
" >> $CONFIG_FILE
if [ ${PLATFORM_OSTYPE} == macos ]; then
echo "export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
" >> $CONFIG_FILE
fi
}