57 lines
1.8 KiB
Plaintext
57 lines
1.8 KiB
Plaintext
# Description: Serial Graph Partitioning and Fill-reducing Matrix Ordering
|
|
# URL: https://github.com/KarypisLab/METIS
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
|
# Depends on: gklib
|
|
|
|
name=metis
|
|
version=5.2.1
|
|
release=1
|
|
source=(https://github.com/KarypisLab/METIS/archive/refs/tags/v$version.tar.gz
|
|
metis-5.2.1-add-gklib-as-required.patch
|
|
metis-5.2.1-multilib.patch
|
|
metis-5.2.1-respect-user-flags.patch)
|
|
renames=($name-$version.tar.gz SKIP SKIP SKIP)
|
|
|
|
build() {
|
|
#patch -Np1 -d METIS-$version -i $SRC/metis-5.2.1-multilib.patch
|
|
patch -Np1 -d METIS-$version -i $SRC/metis-5.2.1-add-gklib-as-required.patch
|
|
patch -Np1 -d METIS-$version -i $SRC/metis-5.2.1-respect-user-flags.patch
|
|
|
|
if prt-get isinst double-conversion; then
|
|
realwidth="#define REALTYPEWIDTH 64"
|
|
else
|
|
realwidth="#define REALTYPEWIDTH 32"
|
|
fi
|
|
idxwidth="#define IDXTYPEWIDTH 64"
|
|
|
|
mkdir -p METIS-$version/build/xinclude
|
|
echo ${idxwidth} > METIS-$version/build/xinclude/metis.h
|
|
echo ${realwidth} >> METIS-$version/build/xinclude/metis.h
|
|
cat METIS-$version/include/metis.h >> METIS-$version/build/xinclude/metis.h
|
|
cp METIS-$version/include/CMakeLists.txt METIS-$version/build/xinclude
|
|
|
|
cmake -S METIS-$version -B build -G Ninja \
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
-D SHARED=ON \
|
|
-Wno-dev
|
|
cmake --build build
|
|
DESTDIR=$PKG cmake --install build
|
|
|
|
mkdir -p $PKG/usr/lib/pkgconfig
|
|
cat >> $PKG/usr/lib/pkgconfig/metis.pc <<- EOF
|
|
prefix=/usr
|
|
exec_prefix=\${prefix}
|
|
libdir=\${exec_prefix}/lib
|
|
includedir=\${prefix}/include
|
|
|
|
Name: METIS
|
|
Description: Software for partioning unstructured graphes and meshes
|
|
Version: ${version}
|
|
Cflags: -I\${includedir}
|
|
Libs: -L\${libdir} -lmetis -lGKlib
|
|
EOF
|
|
}
|