summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormyles2015-10-05 19:52:33 +0100
committermyles2015-10-05 19:52:33 +0100
commit089e82f90beefc2394cccae35e978f611d914c20 (patch)
treeae1a29aa979afc3a573df82b1b702079612122e5
parent4a8c716f2727ef84b27111bad9d539e3dbafe8fd (diff)
downloadaur-089e82f90beefc2394cccae35e978f611d914c20.tar.gz
Updates to PKGBUILD and install script, patch for src
PKGBUILD: sources petsc and slepc profiles install file: corrected path CMakeLists.txt: allow use of system's cmake Find modules FindSCOTCH.cmake: also find libbz2 because SCOTCH on Arch Linux is built against it and is needed to run the test program during dolfin configuring FindPaStiX.cmake: list all the libs needed before trying to compile the test program during config
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD33
-rw-r--r--dolfin.install2
-rw-r--r--src.patch45
4 files changed, 69 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ea2c53685ade..3234589395b0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = dolfin-git
pkgdesc = the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations.
- pkgver = 20140909
+ pkgver = 20151005
pkgrel = 1
url = https://bitbucket.org/fenics-project/dolfin
install = dolfin.install
@@ -31,9 +31,11 @@ pkgbase = dolfin-git
conflicts = dolfin
options = !emptydirs
source = dolfin::git+https://bitbucket.org/fenics-project/dolfin.git#branch=master
+ source = src.patch
source = dolfin.install
md5sums = SKIP
- md5sums = 0659b73a58b92be0ca70fc0135668809
+ md5sums = 3d0750480196e26dced7435a00e70206
+ md5sums = 284f97c4471a044dd296572fe7024686
pkgname = dolfin-git
diff --git a/PKGBUILD b/PKGBUILD
index 91bca3031491..4655bcbe4222 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Myles English <myles at rockhead dot biz>
pkgname=dolfin-git
pkgdesc="the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations."
-pkgver=20140909
+pkgver=20151005
pkgrel=1
_branch=master
arch=('i686' 'x86_64')
@@ -17,9 +17,11 @@ conflicts=('dolfin')
options=(!emptydirs)
install="dolfin.install"
source=("dolfin::git+https://bitbucket.org/fenics-project/dolfin.git#branch=${_branch}"
+ "src.patch"
"${install}")
md5sums=('SKIP'
- '0659b73a58b92be0ca70fc0135668809')
+ '3d0750480196e26dced7435a00e70206'
+ '284f97c4471a044dd296572fe7024686')
# to stop /common/timing.cpp.o coming before /common/defines.cpp.o
export MAKEFLAGS="-j1"
@@ -27,14 +29,14 @@ export MAKEFLAGS="-j1"
# export CXXFLAGS="$CXXFLAGS -Wall -Wshadow -Wextra -Werror"
pkgver() {
- cd dolfin
- git log --format="%cd" --date=short -1 | sed 's/-//g'
+ cd dolfin
+ git log --format="%cd" --date=short -1 | sed 's/-//g'
}
prepare() {
- cd dolfin
+ patch -p2 < src.patch
- #patch -Np1 -i "${srcdir}/debug_cxxflags.diff"
+ cd dolfin
find ./ -name "*" -type f -exec \
sed -i 's|^#!.*python$|#!/usr/bin/python2|' {} \;
@@ -59,20 +61,23 @@ build() {
local py2_inc="${py2_interp/\/bin\///include/}"
local py2_lib=`ldd ${py2_interp} | grep python | cut -d " " -f 3 | sed 's/\(.*.so\).*/\1/'`
- cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/g++ \
- -DCMAKE_INSTALL_PREFIX="${pkg}"/usr \
+ [ -z "$PETSC_DIR" ] && source /etc/profile.d/petsc.sh
+ [ -z "$SLEPC_DIR" ] && source /etc/profile.d/slepc.sh
+
+ cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/g++ \
+ -DCMAKE_INSTALL_PREFIX="${pkg}"/usr \
-DPYTHON_EXECUTABLE:PATH="${py2_interp}" \
- -DPYTHON_INCLUDE_DIR:PATH="${py2_inc}" \
- -DPYTHON_LIBRARY:FILEPATH="${py2_lib}" \
- -DDOLFIN_ENABLE_VTK=ON \
- -DCMAKE_SKIP_BUILD_RPATH=TRUE \
- -DCMAKE_SKIP_RPATH=TRUE \
+ -DPYTHON_INCLUDE_DIR:PATH="${py2_inc}" \
+ -DPYTHON_LIBRARY:FILEPATH="${py2_lib}" \
+ -DDOLFIN_ENABLE_VTK=ON \
+ -DCMAKE_SKIP_BUILD_RPATH=TRUE \
+ -DCMAKE_SKIP_RPATH=TRUE \
-DCMAKE_BUILD_TYPE="Debug"
# -DDOLFIN_ENABLE_TESTING=ON
make
- # Uncomment this line for documentation
+ # Uncomment the line below to build the documentation
#make SPHINXBUILD=sphinx-build2 doc
}
diff --git a/dolfin.install b/dolfin.install
index 9dba4cc68a88..35d53f36a860 100644
--- a/dolfin.install
+++ b/dolfin.install
@@ -5,7 +5,7 @@ cat << EOF
If you just ran makepkg in this directory then
to build the documentation you can try:
-$ cd src/dolfin-build/build/doc
+$ cd src/dolfin/build/doc
$ make doc SPHINXBUILD=sphinx-build2
EOF
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)