@@ -0,0 +1,13 @@
|
||||
diff -urN parmetis-4.0.3.orig/metis/GKlib/gk_arch.h parmetis-4.0.3/metis/GKlib/gk_arch.h
|
||||
--- parmetis-4.0.3.orig/metis/GKlib/gk_arch.h 2013-03-30 08:24:50.000000000 -0700
|
||||
+++ parmetis-4.0.3/metis/GKlib/gk_arch.h 2019-11-13 22:02:07.318990500 -0800
|
||||
@@ -41,7 +41,9 @@
|
||||
#endif
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
+#ifndef __MINGW32__
|
||||
#include <sys/resource.h>
|
||||
+#endif
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
diff -urN parmetis-4.0.3.orig/metis/GKlib/gk_getopt.h parmetis-4.0.3/metis/GKlib/gk_getopt.h
|
||||
--- parmetis-4.0.3.orig/metis/GKlib/gk_getopt.h 2013-03-30 08:24:50.000000000 -0700
|
||||
+++ parmetis-4.0.3/metis/GKlib/gk_getopt.h 2019-11-11 22:48:38.248965700 -0800
|
||||
@@ -52,12 +52,11 @@
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
-extern int gk_getopt(int __argc, char **__argv, char *__shortopts);
|
||||
-extern int gk_getopt_long(int __argc, char **__argv, char *__shortopts,
|
||||
- struct gk_option *__longopts, int *__longind);
|
||||
-extern int gk_getopt_long_only (int __argc, char **__argv,
|
||||
- char *__shortopts, struct gk_option *__longopts, int *__longind);
|
||||
-
|
||||
+extern int gk_getopt(int gk_argc, char **gk_argv, char *__shortopts);
|
||||
+extern int gk_getopt_long(int gk_argc, char **gk_argv, char *__shortopts,
|
||||
+ struct gk_option *__longopts, int *__longind);
|
||||
+extern int gk_getopt_long_only (int gk_argc, char **gk_argv,
|
||||
+ char *__shortopts, struct gk_option *__longopts, int *__longind);
|
||||
|
||||
|
||||
#endif
|
||||
18
mingw-w64-parmetis/0003-WIN32-Install-RUNTIME-to-bin.patch
Normal file
18
mingw-w64-parmetis/0003-WIN32-Install-RUNTIME-to-bin.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
diff -urN parmetis-4.0.3.orig/libparmetis/CMakeLists.txt parmetis-4.0.3/libparmetis/CMakeLists.txt
|
||||
--- parmetis-4.0.3.orig/libparmetis/CMakeLists.txt 2013-03-30 08:24:50.000000000 -0700
|
||||
+++ parmetis-4.0.3/libparmetis/CMakeLists.txt 2019-11-11 23:27:19.061446400 -0800
|
||||
@@ -8,7 +8,13 @@
|
||||
target_link_libraries(parmetis metis ${MPI_LIBRARIES})
|
||||
set_target_properties(parmetis PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
|
||||
|
||||
+if(WIN32)
|
||||
+ set(RT_DEST bin)
|
||||
+else()
|
||||
+ set(RT_DEST lib)
|
||||
+endif()
|
||||
+
|
||||
install(TARGETS parmetis
|
||||
LIBRARY DESTINATION lib
|
||||
- RUNTIME DESTINATION lib
|
||||
+ RUNTIME DESTINATION ${RT_DEST}
|
||||
ARCHIVE DESTINATION lib)
|
||||
65
mingw-w64-parmetis/0004-METIS-GKLIB-location.patch
Normal file
65
mingw-w64-parmetis/0004-METIS-GKLIB-location.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
diff -urN parmetis-4.0.3.orig/CMakeLists.txt parmetis-4.0.3/CMakeLists.txt
|
||||
--- parmetis-4.0.3.orig/CMakeLists.txt 2013-03-30 08:24:50.000000000 -0700
|
||||
+++ parmetis-4.0.3/CMakeLists.txt 2019-11-12 01:46:27.177627800 -0800
|
||||
@@ -1,12 +1,18 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(ParMETIS)
|
||||
|
||||
-set(GKLIB_PATH METIS/GKlib CACHE PATH "path to GKlib")
|
||||
-set(METIS_PATH METIS CACHE PATH "path to METIS")
|
||||
+include(FindPkgConfig)
|
||||
+pkg_check_modules(METIS metis)
|
||||
+if(NOT METIS_FOUND)
|
||||
+ message(FATAL_ERROR "metis is not found")
|
||||
+endif()
|
||||
+
|
||||
+set(GKLIB_PATH "${CMAKE_SOURCE_DIR}/metis/GKlib" CACHE PATH "path to GKlib")
|
||||
+#set(METIS_PATH METIS CACHE PATH "path to METIS")
|
||||
|
||||
# Symlink ./metis to wherever metis is. This allows files to be
|
||||
# included from metis/libmetis/.
|
||||
-execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${METIS_PATH} metis)
|
||||
+#execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${METIS_PATH} metis)
|
||||
|
||||
# Search for MPI.
|
||||
# GK commented this out as it seems to be creating problems
|
||||
@@ -30,10 +36,11 @@
|
||||
include_directories(include)
|
||||
include_directories(${MPI_INCLUDE_PATH})
|
||||
include_directories(${GKLIB_PATH})
|
||||
-include_directories(${METIS_PATH}/include)
|
||||
+#include_directories(${METIS_PATH}/include)
|
||||
+include_directories(${METIS_INCLUDE_DIRS})
|
||||
|
||||
# List of directories that cmake will look for CMakeLists.txt
|
||||
-add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis)
|
||||
+#add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis)
|
||||
add_subdirectory(include)
|
||||
add_subdirectory(libparmetis)
|
||||
add_subdirectory(programs)
|
||||
diff -urN parmetis-4.0.3.orig/libparmetis/CMakeLists.txt parmetis-4.0.3/libparmetis/CMakeLists.txt
|
||||
--- parmetis-4.0.3.orig/libparmetis/CMakeLists.txt 2013-03-30 08:24:50.000000000 -0700
|
||||
+++ parmetis-4.0.3/libparmetis/CMakeLists.txt 2019-11-12 01:37:03.599001000 -0800
|
||||
@@ -5,7 +5,7 @@
|
||||
# Create libparmetis
|
||||
add_library(parmetis ${ParMETIS_LIBRARY_TYPE} ${parmetis_sources})
|
||||
# Link with metis and MPI libraries.
|
||||
-target_link_libraries(parmetis metis ${MPI_LIBRARIES})
|
||||
+target_link_libraries(parmetis ${METIS_LINK_LIBRARIES} ${MPI_LIBRARIES})
|
||||
set_target_properties(parmetis PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
|
||||
|
||||
install(TARGETS parmetis
|
||||
diff -urN parmetis-4.0.3.orig/metis/GKlib/CMakeLists.txt parmetis-4.0.3/metis/GKlib/CMakeLists.txt
|
||||
--- parmetis-4.0.3.orig/metis/GKlib/CMakeLists.txt 2013-03-30 08:24:50.000000000 -0700
|
||||
+++ parmetis-4.0.3/metis/GKlib/CMakeLists.txt 2019-11-12 01:45:02.052483700 -0800
|
||||
@@ -1,9 +1,7 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(GKlib)
|
||||
|
||||
-get_filename_component(abs "." ABSOLUTE)
|
||||
-set(GKLIB_PATH ${abs})
|
||||
-unset(abs)
|
||||
+set(GKLIB_PATH "${CMAKE_SOURCE_DIR}/metis/GKlib" CACHE PATH "path to GKlib")
|
||||
include(GKlibSystem.cmake)
|
||||
|
||||
include_directories(".")
|
||||
21
mingw-w64-parmetis/0005-find-MPI.patch
Normal file
21
mingw-w64-parmetis/0005-find-MPI.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff -urN parmetis-4.0.3.orig/CMakeLists.txt parmetis-4.0.3/CMakeLists.txt
|
||||
--- parmetis-4.0.3.orig/CMakeLists.txt 2013-03-30 08:24:50.000000000 -0700
|
||||
+++ parmetis-4.0.3/CMakeLists.txt 2019-11-12 00:35:22.652916600 -0800
|
||||
@@ -9,12 +9,11 @@
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${METIS_PATH} metis)
|
||||
|
||||
# Search for MPI.
|
||||
-# GK commented this out as it seems to be creating problems
|
||||
-# include(FindMPI)
|
||||
-# if(NOT MPI_FOUND)
|
||||
-# message(FATAL_ERROR "mpi is not found")
|
||||
-# endif()
|
||||
-# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_COMPILE_FLAGS}")
|
||||
+include(FindMPI)
|
||||
+if(NOT MPI_FOUND)
|
||||
+ message(FATAL_ERROR "mpi is not found")
|
||||
+endif()
|
||||
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_COMPILE_FLAGS}")
|
||||
|
||||
# Prepare libraries.
|
||||
if(SHARED)
|
||||
78
mingw-w64-parmetis/PKGBUILD
Normal file
78
mingw-w64-parmetis/PKGBUILD
Normal file
@@ -0,0 +1,78 @@
|
||||
# Contributor: Oleg A. Khlybov <fougas@mail.ru>
|
||||
|
||||
_realname=parmetis
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=4.0.3
|
||||
pkgrel=1
|
||||
pkgdesc="Parallel Graph Partitioning and Fill-reducing Matrix Ordering (mingw-w64)"
|
||||
arch=('any')
|
||||
url='http://glaros.dtc.umn.edu/gkhome/views/parmetis'
|
||||
license=('Apache')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-metis>=5.1.0" "${MINGW_PACKAGE_PREFIX}-msmpi")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake")
|
||||
options=('strip' 'staticlibs')
|
||||
source=("http://glaros.dtc.umn.edu/gkhome/fetch/sw/${_realname}/parmetis-${pkgver}.tar.gz"
|
||||
"0001-mingw-w64-does-not-have-sys-resource-h.patch"
|
||||
"0002-mingw-w64-do-not-use-reserved-double-underscored-names.patch"
|
||||
"0003-WIN32-Install-RUNTIME-to-bin.patch"
|
||||
"0004-METIS-GKLIB-location.patch"
|
||||
"0005-find-MPI.patch")
|
||||
sha256sums=('f2d9a231b7cf97f1fee6e8c9663113ebf6c240d407d3c118c55b3633d6be6e5f'
|
||||
'22e62ec7dfbaf01865b1e09e7b3f3bad20188354efbef6e64d102a03c7bf748b'
|
||||
'141026e4e39f0529a916dce718273875ba12a98b0ebe7c2730e4950866ffc845'
|
||||
'b384fa51e01b9d3384fd067236e34036b0520f375d16abe575005e518dd5b1fd'
|
||||
'f1e7a174460ac79732de10d0f076f87b2ed60d185436bda0698bd012e70ea53c'
|
||||
'642f801967edc196e94e28f7fa3a63759ab33c1a534a5924d404acdcbfea2eb2')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"/${_realname}-${pkgver}
|
||||
for p in ${srcdir}/*.patch; do
|
||||
patch -p1 -i "$p"
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
for _shared in OFF ON; do
|
||||
cd "$srcdir"/${_realname}-${pkgver}
|
||||
[[ -d "${srcdir}"/build-shared-${_shared}-${CARCH} ]] && rm -rf "${srcdir}"/build-shared-${_shared}-${CARCH}
|
||||
mkdir -p "${srcdir}"/build-shared-${_shared}-${CARCH} && cd "${srcdir}"/build-shared-${_shared}-${CARCH}
|
||||
declare -a extra_config
|
||||
if check_option "debug" "n"; then
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
|
||||
else
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
|
||||
fi
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-G'MSYS Makefiles' \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
-DCMAKE_C_COMPILER=mpicc \
|
||||
-DCMAKE_CXX_COMPILER=mpicxx \
|
||||
-DCMAKE_C_FLAGS="${CPPFLAGS} ${CFLAGS}" \
|
||||
"${extra_config[@]}" \
|
||||
-DSHARED=${_shared} \
|
||||
../${_realname}-${pkgver}
|
||||
make
|
||||
done
|
||||
}
|
||||
|
||||
package() {
|
||||
for _shared in OFF ON; do
|
||||
cd "${srcdir}"/build-shared-${_shared}-${CARCH}
|
||||
make install DESTDIR="${pkgdir}"
|
||||
mkdir -p "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig"
|
||||
echo "
|
||||
prefix=${MINGW_PREFIX}
|
||||
libdir=\${prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
Name: ${_realname}
|
||||
URL: ${url}
|
||||
Version: ${pkgver}
|
||||
Description: ${pkgdesc}
|
||||
Requires: metis msmpi
|
||||
Cflags: -I\${includedir}
|
||||
Libs: -L\${libdir} -l${_realname}
|
||||
" | sed '/^\s*$/d;s/^\s*//' > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/${_realname}.pc"
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user