tUpdate - petsc-git-PKGBUILD - build template for non-complex PETSC with petsc4… | |
git clone git://src.adamsgaard.dk/petsc-git-PKGBUILD | |
Log | |
Files | |
Refs | |
--- | |
commit 483c0558a92ca886d9cbaec70948f088f8563101 | |
parent cafb49e666e6c55f288cd469460186b0f99e52e1 | |
Author: Lucas Heitzmann Gabrielli <[email protected]> | |
Date: Tue, 18 May 2021 17:57:48 -0300 | |
Update | |
Diffstat: | |
M .SRCINFO | 4 +--- | |
M PKGBUILD | 52 +++++++++--------------------… | |
D petsc4py.patch | 11 ----------- | |
3 files changed, 15 insertions(+), 52 deletions(-) | |
--- | |
diff --git a/.SRCINFO b/.SRCINFO | |
t@@ -1,6 +1,6 @@ | |
pkgbase = petsc-git | |
pkgdesc = Portable, extensible toolkit for scientific computation (ext… | |
- pkgver = 20210204 | |
+ pkgver = 20210515 | |
pkgrel = 1 | |
url = https://gitlab.com/petsc/petsc | |
install = petsc.install | |
t@@ -35,9 +35,7 @@ pkgbase = petsc-git | |
provides = petsc | |
conflicts = petsc | |
source = petsc::git+https://gitlab.com/petsc/petsc.git#branch=release | |
- source = petsc4py.patch | |
sha256sums = SKIP | |
- sha256sums = b0f4a9d33e9c3ba3f51b81808f04ec66091b0a29cf99cac6392e97232… | |
pkgname = petsc-git | |
diff --git a/PKGBUILD b/PKGBUILD | |
t@@ -1,7 +1,7 @@ | |
# Maintainer: Lucas H. Gabrielli <[email protected]> | |
pkgname=petsc-git | |
-pkgver=20210204 | |
+pkgver=20210515 | |
pkgrel=1 | |
_config=linux-c-opt | |
pkgdesc="Portable, extensible toolkit for scientific computation (external dow… | |
t@@ -19,10 +19,8 @@ optdepends=("opencl: GPU computing" | |
"libyaml: YAML configuration support" | |
"libx11: GUI tools") | |
install=petsc.install | |
-source=(petsc::git+https://gitlab.com/petsc/petsc.git#branch=release | |
- petsc4py.patch) | |
-sha256sums=('SKIP' | |
- 'b0f4a9d33e9c3ba3f51b81808f04ec66091b0a29cf99cac6392e97232edec768') | |
+source=(petsc::git+https://gitlab.com/petsc/petsc.git#branch=release) | |
+sha256sums=('SKIP') | |
_petsc_arch="arch-${_config}" | |
_petsc_dir='/usr/local/petsc' | |
t@@ -52,7 +50,6 @@ pkgver() { | |
prepare() { | |
cd "${srcdir}/petsc" | |
sed -i 's-\(self.publicInstall[^=]*=[[:space:]]\)[^#]*-\10 -g' config/Buil… | |
- patch -p1 < ../petsc4py.patch | |
} | |
t@@ -96,7 +93,6 @@ build() { | |
--download-mumps=1 | |
--download-scalapack=1 | |
--download-hypre=1 | |
- --download-petsc4py=1 | |
) | |
CONFOPTS=( "${CONFOPTS[@]}" ) | |
t@@ -135,10 +131,10 @@ build() { | |
export PETSC_ARCH="${_petsc_arch}" | |
python ./configure LDFLAGS="$LDFLAGS" \ | |
- --prefix="${_petsc_dir}/${_config}" \ | |
+ --prefix="${_install_dir}" \ | |
--MAKEFLAGS="$MAKEFLAGS" \ | |
$(for (( i=1; i<=${#CONFOPTS[@]}; i++)); do echo "${CONFOPTS[$i]}";… | |
- make clean | |
+ | |
make all | |
} | |
t@@ -152,19 +148,24 @@ package() { | |
make DESTDIR="${pkgdir}" install | |
- # Fix petsc4py runpath | |
- chrpath -r "${_install_dir}/lib:/usr/lib/openmpi" ${_build_dir}/${_petsc_a… | |
+ # petsc4py | |
+ pushd ${_build_dir}/src/binding/petsc4py | |
+ CFLAGS="$(echo "${CFLAGS}" | sed 's%-D[^[:space:]]*%%g')" python setup.py … | |
+ popd | |
# install license | |
install -Dm 644 ${_build_dir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgna… | |
mkdir -p "${pkgdir}/etc/profile.d" | |
- echo "export PETSC_DIR=${_install_dir}" > "${pkgdir}/etc/profile.d/petsc.s… | |
+ printf "export PETSC_DIR=${_install_dir}" > "${pkgdir}/etc/profile.d/petsc… | |
chmod +x "${pkgdir}/etc/profile.d/petsc.sh" | |
# show where the shared libraries are | |
install -dm 755 "${pkgdir}/etc/ld.so.conf.d/" | |
- echo "${_install_dir}/lib" > "${pkgdir}/etc/ld.so.conf.d/petsc.conf" | |
+ printf "${_install_dir}/lib" > "${pkgdir}/etc/ld.so.conf.d/petsc.conf" | |
+ | |
+ printf "PETSC_DIR = ${_petsc_dir}\nPETSC_ARCH = ${_petsc_arch}" \ | |
+ > "${pkgdir}/usr/lib/python3.9/site-packages/petsc4py/lib/petsc.cfg" | |
_rem_dir="${_build_dir}/${_petsc_arch}" | |
t@@ -175,29 +176,4 @@ package() { | |
sed -i "s#${_rem_dir}#${_install_dir}#g" "${pkgdir}${_install_dir}/lib/pet… | |
sed -i "s#${_rem_dir}#${_install_dir}#g" "${pkgdir}${_install_dir}/lib/pet… | |
sed -i "s#${_rem_dir}#${_install_dir}#g" "${pkgdir}${_install_dir}/lib/pet… | |
- sed -i "s#${_build_dir}#${_petsc_dir}#g" "${_rem_dir}/lib/petsc4py/lib/pet… | |
- | |
- # install petsc4py | |
- _python_package="${pkgdir}/usr/lib/python3.9/site-packages" | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py-3.14.1-py3.9.egg-info/PKG-INFO" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py-3.14.1-py3.9.egg-info/SOURCES.tx… | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py-3.14.1-py3.9.egg-info/dependency… | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py-3.14.1-py3.9.egg-info/not-zip-sa… | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py-3.14.1-py3.9.egg-info/requires.t… | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py-3.14.1-py3.9.egg-info/top_level.… | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/__init__.py" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/__main__.py" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/PETSc.pxd" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/PETSc.py" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/include/petsc4py/__init__.pxd" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/include/petsc4py/__init__.pyx" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/include/petsc4py/numpy.h" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/include/petsc4py/petsc4py.h" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/include/petsc4py/petsc4py.i" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/include/petsc4py/petsc4py.PETSc_… | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/include/petsc4py/petsc4py.PETSc.… | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/include/petsc4py/PETSc.pxd" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/lib/__init__.py" … | |
- install -Dm 644 "${_rem_dir}/lib/petsc4py/lib/petsc.cfg" … | |
- install -Dm 755 "${_rem_dir}/lib/petsc4py/lib/${_petsc_arch}/PETSc.cpython… | |
} | |
diff --git a/petsc4py.patch b/petsc4py.patch | |
t@@ -1,11 +0,0 @@ | |
---- a/config/BuildSystem/config/packages/petsc4py.py | |
-+++ b/config/BuildSystem/config/packages/petsc4py.py | |
-@@ -46,7 +46,7 @@ | |
- | |
- # if installing prefix location then need to set new value for PETSC_DIR/… | |
- if self.argDB['prefix'] and not 'package-prefix-hash' in self.argDB: | |
-- newdir = 'PETSC_DIR='+os.path.abspath(os.path.expanduser(self.argDB['p… | |
-+ newdir = 'MPICC=${PCC} ' | |
- else: | |
- newdir = 'MPICC=${PCC} ' | |
- |