diff options
-rw-r--r-- | PKGBUILD | 113 | ||||
-rw-r--r-- | blaslapack_download.patch | 11 | ||||
-rw-r--r-- | so.diff | 13 |
3 files changed, 47 insertions, 90 deletions
@@ -1,31 +1,53 @@ +# Maintainer: Carlos Aznarán <caznaranl@uni.pe> +# Contributor: eDgar <edgar@openmail.cc> # Based on AUR petsc and petsc-git package. - # Contributor: Lucas H. Gabrielli <heitzmann@gmail.com> # Contributor: Martin Diehl <aur@martin-diehl.net> _base=petsc -pkgname=("${_base}"-git "${_base}"-doc) -pkgver=3.16.3.59.g94bef9dd528 +pkgname=${_base}-git +pkgver=3.18.1.24.g1f6a6395d11 pkgrel=1 -_mainver="${pkgver:0:6}" +_config=linux-c-opt +# if --with-debugging=yes is set then PETSC_ARCH is automatically set to +#"linux-c-debug" for some things, so the _config should be changed too +#_config=linux-c-debug pkgdesc="Portable, extensible toolkit for scientific computation" arch=('i686' 'x86_64') -url="https://gitlab.com/petsc/${_base}" -license=('BSD') -options=(!staticlibs) -depends=('openmpi' 'lapack' 'fftw' 'zlib' 'cython' - 'python-mpi4py' "python-numpy" "eigen>=3" "openblas") -makedepends=('gcc' 'gcc-fortran' 'cmake' 'sowing' "pkgconf" - 'git' 'cython' 'chrpath' "hypre=2.23.0") -source=(git+${url}.git#branch=release - https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-with-docs-"${_mainver}".tar.gz - test_optdepends.sh) +url="https://${_base}.org" +license=('custom:BSD-2-clause') +options=(staticlibs) +depends=('openmpi' 'lapack' 'fftw' 'zlib' 'python-mpi4py' 'python-numpy' 'eigen') +makedepends=('gcc' 'gcc-fortran' 'cmake' 'sowing' 'pkgconf' 'git' 'cython' 'chrpath' 'hypre') +optdepends=( + "boost: Free peer-reviewed portable C++ source libraries" + "cgns: Recording and recovering computer data" + "eigen: Lightweight C++ template library for vector and matrix math" + "fftw: Fast-Fourier Transform" + "gdb: Debugging" + "hdf5: large files" + "hwloc: Portable Hardware Locality (abstraction of hierarchical architectures)" + "med>=4.0: Data Modelization and Exchanges (meshes)" + "metis: Partitioning library (for meshes)" + "mumps: Sparse solver library" + "netcdf-openmpi: Management of array-data" + "opencl-headers: for opencl (GPU computing)" + "opencl: GPU computing" + "openmp: Parallel distributed tasks" + "libpng" + "scalapack: Parallel memory linear algebra" + "scotch: Partitioning with sparse matrices" + "suitesparse: Sparse matrix library" + "superlu: Subroutines for sparsse linear systems" + "libyaml: configuration files") +source=(git+https://gitlab.com/${_base}/${_base}.git#branch=release + test_optdepends.sh) sha512sums=('SKIP' - 'ed58dd2f479b4177176f12aea55c8fd48a39e1f5105194896509d5e469095eb04c48405d4c062cc500b19e0b140a6984b482aa2a211b5fefc5be18d7071ec45a' - 'e45df388b373b5f8c86567f32f0d79ae275a855a7fd3b4bb9c03d6875351633d4064de701644a4aa2f9eff90d63806f714230298149868b2f6d92a4f21e20cb8') -install=petsc.install + 'e45df388b373b5f8c86567f32f0d79ae275a855a7fd3b4bb9c03d6875351633d4064de701644a4aa2f9eff90d63806f714230298149868b2f6d92a4f21e20cb8') +conflicts=("${_base}") +provides=("${_base}=${pkgver%.r*}" "${_base}4py=${pkgver%.r*}") +install=${_base}.install -_config=linux-c-opt _install_dir="/usr" # From UPC: Building And Using Static And Shared "C" @@ -134,32 +156,7 @@ build() { # exit # } -package_petsc-git() { - optdepends=( - "boost: Free peer-reviewed portable C++ source libraries" - "cgns: Recording and recovering computer data" - "eigen: Lightweight C++ template library for vector and matrix math" - "fftw: Fast-Fourier Transform" - "gdb: Debugging" - "hdf5: large files" - "hwloc: Portable Hardware Locality (abstraction of hierarchical architectures)" - "med>=4.0: Data Modelization and Exchanges (meshes)" - "metis: Partitioning library (for meshes)" - "mumps: Sparse solver library" - "netcdf-openmpi: Management of array-data" - "openblas: Linear algebra libraries" - "opencl-headers: for opencl (GPU computing)" - "opencl: GPU computing" - "openmp: Parallel distributed tasks" - "libpng" - "scalapack: Parallel memory linear algebra" - "scotch: Partitioning with sparse matrices" - "suitesparse: Sparse matrix library" - "superlu: Subroutines for sparsse linear systems" - "libyaml: configuration files") - provides=(${_base}="${_mainver}" petsc4py="${_mainver}") - conflicts=(${_base}) - +package() { # # From OpenCV (hack destination of petsc4py) # _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"` # sed -i "s%\(installLibPath = \)os.path.join(self.installDir, 'lib')%\1'${_pythonpath}'%" @@ -167,17 +164,17 @@ package_petsc-git() { _build_dir="${srcdir}"/"${_base}" make -C "${_build_dir}" \ - ${MAKEFLAGS} DESTDIR="${pkgdir}" install + ${MAKEFLAGS} DESTDIR="${pkgdir}" install export PETSC_DIR=${_install_dir} # install licence (even though there is no such word as licenses) install -Dm 644 ${_build_dir}/LICENSE \ - "${pkgdir}"/"${_install_dir}"/share/licenses/"${pkgname}"/LICENSE + "${pkgdir}"/"${_install_dir}"/share/licenses/"${pkgname}"/LICENSE mkdir -p "${pkgdir}"/etc/profile.d echo "export PETSC_DIR=${_install_dir}" > \ - "${pkgdir}"/etc/profile.d/${_base}.sh + "${pkgdir}"/etc/profile.d/${_base}.sh # echo "export PYTHONPATH=\$PYTHONPATH:/${_install_dir}/${_base}/${_config}/lib" \ # >> "${pkgdir}"/etc/profile.d/${_base}.sh chmod +x "${pkgdir}"/etc/profile.d/${_base}.sh @@ -185,32 +182,16 @@ package_petsc-git() { # 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/${_base}.conf + "${pkgdir}"/etc/ld.so.conf.d/${_base}.conf # install pkgconfig settings install -Dm 644 "${_build_dir}/${_config}"/lib/pkgconfig/PETSc.pc \ - "${pkgdir}"/"${_install_dir}"/share/pkgconfig/PETSc.pc + "${pkgdir}"/"${_install_dir}"/share/pkgconfig/PETSc.pc # cd "${srcdir}"/"${_base}"/src/binding/petsc4py # CFLAGS="$(echo "${CFLAGS}" | sed 's%-D[^[:space:]]*%%g')" python setup.py install --root="${pkgdir}" --optimize=1 --skip-build # cd - - _pythonpath="${pkgdir}"/`python -c "from sysconfig import get_path; print(get_path('platlib'))"` + _pythonpath="${pkgdir}"/$(python -c "from sysconfig import get_path; print(get_path('platlib'))") install -dm 755 ${_pythonpath} ln -s "${_install_dir}"/lib/petsc4py ${_pythonpath} } - -package_petsc-doc () { - depends=() - optdepends=() - provides=(${_base}-doc) - replaces=(${_base}-doc) - conflicts=() - pkgdesc="Documentation for PETSc" - # Two options: compile the documentation or get it from - # the web. Downloading is easier. - [[ -d ${pkgdir}/${_install_dir}/share/doc ]] && \ - rm -fr "${pkgdir}"/"${_install_dir}"/share/doc - mkdir -p "${pkgdir}"/"${_install_dir}"/share/doc - cp -r "${srcdir}/${_base}-${_mainver}/docs" \ - "${pkgdir}"/"${_install_dir}"/share/doc/${_base} -} diff --git a/blaslapack_download.patch b/blaslapack_download.patch deleted file mode 100644 index abf007480f17..000000000000 --- a/blaslapack_download.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- b/petsc/config/BuildSystem/config/packages/BlasLapack.py 2021-09-17 23:26:42.115594175 -0500 -+++ b/petsc/config/BuildSystem/config/packages/BlasLapack.py 2021-09-17 22:53:07.122154127 -0500 -@@ -187,7 +187,7 @@ - yield ('OpenBLAS with full path', None, os.path.join(self.openblas.libDir,'libopenblas.a'),self.openblas.known64,self.openblas.usesopenmp) - else: - yield ('OpenBLAS', None, self.openblas.lib,self.openblas.known64,self.openblas.usesopenmp) -- raise RuntimeError('--download-openblas libraries cannot be used') -+ ###raise RuntimeError('--download-openblas libraries cannot be used') - if 'with-blas-lib' in self.argDB and not 'with-lapack-lib' in self.argDB: - raise RuntimeError('If you use the --with-blas-lib=<lib> you must also use --with-lapack-lib=<lib> option') - if not 'with-blas-lib' in self.argDB and 'with-lapack-lib' in self.argDB: diff --git a/so.diff b/so.diff deleted file mode 100644 index 0445c02248a3..000000000000 --- a/so.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/config/BuildSystem/config/libraries.py b/config/BuildSystem/config/libraries.py
-index 0d93f57fc0..d94932899f 100644
---- a/config/BuildSystem/config/libraries.py
-+++ b/config/BuildSystem/config/libraries.py
-@@ -133,7 +133,7 @@ class Configure(config.base.Configure):
- # remove duplicate -L, -Wl,-rpath options - and only consecutive -l options
- if j in newldflags and any([j.startswith(flg) for flg in dupflags]): continue
- if newlibs and j == newlibs[-1]: continue
-- if j.startswith('-l') or j.endswith('.lib') or j.endswith('.a') or j.endswith('.o') or j == '-Wl,-Bstatic' or j == '-Wl,-Bdynamic' or j == '-Wl,--start-group' or j == '-Wl,--end-group':
-+ if j.startswith('-l') or j.endswith('.lib') or j.endswith('.a') or j.endswith('.so') or j.endswith('.o') or j == '-Wl,-Bstatic' or j == '-Wl,-Bdynamic' or j == '-Wl,--start-group' or j == '-Wl,--end-group':
- newlibs.append(j)
- else:
- newldflags.append(j)
|