diff options
author | sigvaldm | 2018-01-08 15:05:59 +0100 |
---|---|---|
committer | sigvaldm | 2018-01-08 15:05:59 +0100 |
commit | 02422c2789552feb5d6182b1b4b70cfd16a968bd (patch) | |
tree | de3ccfc9d1607ab8aa375537f99f8a2e3838d35a | |
download | aur-02422c2789552feb5d6182b1b4b70cfd16a968bd.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | src.patch | 45 |
3 files changed, 126 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5eeada9938b0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = dolfin + pkgdesc = the C++ and Python interfaces of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations (stable). + pkgver = 20170509 + pkgrel = 1 + url = https://bitbucket.org/fenics-project/dolfin + arch = i686 + arch = x86_64 + groups = fenics + license = GPL3 + makedepends = git + depends = cppunit + depends = eigen + depends = gl2ps + depends = hdf5 + depends = python-ffc + depends = slepc + depends = suitesparse + optdepends = scotch: libraries for graph, mesh and hypergraph partitioning + conflicts = dolfin-git + options = !emptydirs + source = dolfin::git+https://bitbucket.org/fenics-project/dolfin.git#tag=2017.1.0 + md5sums = SKIP + +pkgname = dolfin + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ee58a68606fd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Sigvald Marholm <marholm@marebakken.com> +# Based on dolfin-git, maintained by Lucas H. Gabrielli <heitzmann@gmail.com> and submitted by myles + +_base=dolfin +_fragment="#tag=2017.1.0" +pkgname=${_base} +pkgdesc="the C++ and Python interfaces of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations (stable)." +pkgver=20170509 +pkgrel=1 +arch=('i686' 'x86_64') +url="https://bitbucket.org/fenics-project/${_base}" +license=('GPL3') +groups=('fenics') +conflicts=('dolfin-git') +depends=('cppunit' 'eigen' 'gl2ps' 'hdf5' 'python-ffc' 'slepc' 'suitesparse') +optdepends=('scotch: libraries for graph, mesh and hypergraph partitioning') +makedepends=('git') +options=(!emptydirs) +source=("${_base}::git+https://bitbucket.org/fenics-project/${_base}.git${_fragment}") +md5sums=('SKIP') + +export MAKEFLAGS="-j1" + +pkgver() { + cd ${_base} + git log --format="%cd" --date=short -1 | sed 's/-//g' +} + +build() { + cd ${_base} + [ -d build ] && rm -rf build + mkdir build + cd build + + local py_interp=`python -c "import os,sys; print(os.path.realpath(sys.executable))"` + + [ -z "$PETSC_DIR" ] && source /etc/profile.d/petsc.sh + [ -z "$SLEPC_DIR" ] && source /etc/profile.d/slepc.sh + + cmake ..\ + -DCMAKE_INSTALL_PREFIX="${pkg}"/usr \ + -DPYTHON_EXECUTABLE="${py_interp}" \ + -DDOLFIN_ENABLE_DOCS=FALSE \ + -DCMAKE_SKIP_BUILD_RPATH=TRUE \ + -DCMAKE_SKIP_RPATH=TRUE \ + -DCMAKE_BUILD_TYPE="Release" + + make +} + +package() { + cd ${_base}/build + make install DESTDIR="${pkgdir}" +} + +# vim: shiftwidth=2 softtabstop=2 tabstop=2 noexpandtab diff --git a/src.patch b/src.patch new file mode 100644 index 000000000000..036fe68d6fc1 --- /dev/null +++ b/src.patch @@ -0,0 +1,45 @@ +diff --git a/src/dolfin/CMakeLists.txt b/src/dolfin/CMakeLists.txt +index afb33ce..96a5460 100644 +--- a/src/dolfin/CMakeLists.txt ++++ b/src/dolfin/CMakeLists.txt +@@ -61,7 +61,7 @@ endif() + + # Set location of our FindFoo.cmake modules + set(DOLFIN_CMAKE_DIR "${DOLFIN_SOURCE_DIR}/cmake" CACHE INTERNAL "") +-set(CMAKE_MODULE_PATH "${DOLFIN_CMAKE_DIR}/modules") ++set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${DOLFIN_CMAKE_DIR}/modules") + + # Make sure CMake uses the correct DOLFINConfig.cmake for tests and demos + set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${CMAKE_CURRENT_BINARY_DIR}/dolfin) +diff --git a/src/dolfin/cmake/modules/FindPaStiX.cmake b/src/dolfin/cmake/modules/FindPaStiX.cmake +index be2f60a..6b2566a 100644 +--- a/src/dolfin/cmake/modules/FindPaStiX.cmake ++++ b/src/dolfin/cmake/modules/FindPaStiX.cmake +@@ -123,6 +123,8 @@ elseif (PASTIX_INCLUDE_DIRS AND PASTIX_LIBRARIES) + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${MPI_C_COMPILE_FLAGS}") + endif() + ++ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} "-lpastix -llapack -lbz2 -lptscotch -lscotcherr") ++ + # Build and run test program + include(CheckCSourceRuns) + check_c_source_runs(" +diff --git a/src/dolfin/cmake/modules/FindSCOTCH.cmake b/src/dolfin/cmake/modules/FindSCOTCH.cmake +index 58b96b4..97d7264 100644 +--- a/src/dolfin/cmake/modules/FindSCOTCH.cmake ++++ b/src/dolfin/cmake/modules/FindSCOTCH.cmake +@@ -159,6 +159,14 @@ elseif (SCOTCH_INCLUDE_DIRS AND SCOTCH_LIBRARIES) + set(CMAKE_REQUIRED_INCLUDES ${SCOTCH_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES ${SCOTCH_LIBRARIES}) + #set(CMAKE_REQUIRED_LIBRARIES ${SCOTCH_LIBRARY} ${SCOTCHERR_LIBRARY}) ++ # TODO: see if scotch was built against bzip2 before finding ++ # nm --dynamic /usr/lib/libscotch.so | grep -w BZ2_bzRead ++ if (NOT BZIP2_FOUND) ++ find_package(BZip2) ++ endif() ++ if (BZIP2_FOUND) ++ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${BZIP2_LIBRARIES}) ++ endif() + + # Add MPI variables if MPI has been found + if (MPI_CXX_FOUND) |