summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Heitzmann Gabrielli2018-09-03 11:49:39 -0300
committerLucas Heitzmann Gabrielli2018-09-03 11:49:39 -0300
commite7f714e82ed66708e0494c05ea7335deb4a71a34 (patch)
tree6aa6d5fdd2f68d2075a1f3dd20c52affd5fc490f
parent488119624b8ca96dad133c39186d5502e1160bf7 (diff)
downloadaur-e7f714e82ed66708e0494c05ea7335deb4a71a34.tar.gz
Remove huge src directory, link PETSc.pc
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD138
2 files changed, 71 insertions, 69 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6f25bc5b407b..9c91e7853d76 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = petsc
pkgdesc = Portable, extensible toolkit for scientific computation
pkgver = 3.9.3
- pkgrel = 1
+ pkgrel = 2
url = https://www.mcs.anl.gov/petsc/
install = petsc.install
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index b40b83084e7f..cf7b4258abc4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Contributor: Lucas H. Gabrielli <heitzmann at gmail dot com>
pkgname=petsc
pkgver=3.9.3
-pkgrel=1
+pkgrel=2
_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
@@ -16,110 +16,112 @@ options=(staticlibs)
depends=('python2' 'openmpi' 'boost' 'lapack')
makedepends=('gcc' 'gcc-fortran' 'cmake')
optdepends=('trilinos: support for trilinos'
- 'ptscotch: support for ptscotch parallel graph partitioning library'
- 'parmetis: support for parmetis parallel graph partitioning library'
- 'metis: support for metis graph partitioning library'
- 'pastix: support for the pastix solver'
- 'superlu: support for the superlu sparse solver'
- 'hypre: support for the hypre sparse system solver'
- 'hdf5: support for the parallel version of hdf5'
- 'mumps: support for the mumps sparse solver'
- 'fftw: support for the fftw fast Fourier transform'
- 'suitesparse: support for the suitesparse sparse matrix libraries'
- )
+ 'ptscotch: support for ptscotch parallel graph partitioning library'
+ 'parmetis: support for parmetis parallel graph partitioning library'
+ 'metis: support for metis graph partitioning library'
+ 'pastix: support for the pastix solver'
+ 'superlu: support for the superlu sparse solver'
+ 'hypre: support for the hypre sparse system solver'
+ 'hdf5: support for the parallel version of hdf5'
+ 'mumps: support for the mumps sparse solver'
+ 'fftw: support for the fftw fast Fourier transform'
+ 'suitesparse: support for the suitesparse sparse matrix libraries'
+ )
install=petsc.install
source=(http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${pkgname}-${pkgver/_/-}.tar.gz
- test_optdepends.sh)
+ test_optdepends.sh)
sha256sums=('6c7f2c7a28433385d74d647b4934aaeea3c1b3053b207973c9497639b6ebf7c8'
- 'dc5ac9fe550250480dcb97bc4c6b0671296ec1e8794e92fe244785b4d7d3668e')
+ 'dc5ac9fe550250480dcb97bc4c6b0671296ec1e8794e92fe244785b4d7d3668e')
_install_dir=/opt/petsc/${_config}
_petsc_arch="arch-${_config}"
-# to avoid: "make[2]: *** No rule to make target `libptesmumps.a', needed by `main_esmumps'. Stop."
+# to avoid: "make[2]: *** No rule to make target `libptesmumps.a', needed by `main_esmumps'. Stop."
export MAKEFLAGS="-j1"
prepare() {
- _build_dir="${srcdir}/${pkgname}-${pkgver/_/-}"
+ _build_dir="${srcdir}/${pkgname}-${pkgver/_/-}"
- # force using python2
- find ${srcdir} -name "*" -type f -exec \
- sed -i 's#\(/usr/bin/env \|/usr/bin/\)python[2-3]*#\1python2#' {} \;
+ # force using python2
+ find ${srcdir} -name "*" -type f -exec \
+ sed -i 's#\(/usr/bin/env \|/usr/bin/\)python[2-3]*#\1python2#' {} \;
- # install external libraries in _build_dir instead of the prefix
- sed -i 's/self.publicInstall = 1/self.publicInstall = 0/' ${_build_dir}/config/BuildSystem/config/package.py
+ # install external libraries in _build_dir instead of the prefix
+ sed -i 's/self.publicInstall = 1/self.publicInstall = 0/' ${_build_dir}/config/BuildSystem/config/package.py
}
build() {
- _build_dir="${srcdir}/${pkgname}-${pkgver/_/-}"
+ _build_dir="${srcdir}/${pkgname}-${pkgver/_/-}"
- cd ${_build_dir}
+ cd ${_build_dir}
- unset PETSC_ARCH
- export PETSC_DIR=${_build_dir}
+ unset PETSC_ARCH
+ export PETSC_DIR=${_build_dir}
- CONFOPTS="--with-shared-libraries=1 --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3"
+ CONFOPTS="--with-shared-libraries=1 --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3"
- # test for the optional dependencies for petsc
- CONFOPTS="${CONFOPTS} $(sh ${srcdir}/test_optdepends.sh)"
+ # test for the optional dependencies for petsc
+ CONFOPTS="${CONFOPTS} $(sh ${srcdir}/test_optdepends.sh)"
- # to enable use of type()
- #CONFOPTS="${CONFOPTS} --with-fortran-datatypes --FOPTFLAGS=-O2"
+ # to enable use of type()
+ #CONFOPTS="${CONFOPTS} --with-fortran-datatypes --FOPTFLAGS=-O2"
- echo ${CONFOPTS}
- python2 ./configure \
- --prefix=${_install_dir} \
- --PETSC_ARCH=${_petsc_arch} \
- ${CONFOPTS}
+ echo ${CONFOPTS}
+ python2 ./configure \
+ --prefix=${_install_dir} \
+ --PETSC_ARCH=${_petsc_arch} \
+ ${CONFOPTS}
- make ${MAKEFLAGS} PETSC_DIR=${_build_dir} PETSC_ARCH=${_petsc_arch} all
+ make ${MAKEFLAGS} PETSC_DIR=${_build_dir} PETSC_ARCH=${_petsc_arch} all
}
check() {
- _build_dir="${srcdir}/${pkgname}-${pkgver/_/-}"
- cd ${_build_dir}
+ _build_dir="${srcdir}/${pkgname}-${pkgver/_/-}"
+ cd ${_build_dir}
- make test
+ make test
}
package() {
- _build_dir="${srcdir}/${pkgname}-${pkgver/_/-}"
- #_dest_dir="${pkgdir}${_install_dir}"
+ _build_dir="${srcdir}/${pkgname}-${pkgver/_/-}"
- cd ${_build_dir}
- echo "make ${MAKEFLAGS} PETSC_DIR=${_build_dir} DESTDIR=${pkgdir} install"
- export PETSC_DIR=${_build_dir}
- make ${MAKEFLAGS} PETSC_DIR=${_build_dir} DESTDIR=${pkgdir} install # > /dev/null
+ cd ${_build_dir}
+ echo "make ${MAKEFLAGS} PETSC_DIR=${_build_dir} DESTDIR=${pkgdir} install"
+ export PETSC_DIR=${_build_dir}
+ make ${MAKEFLAGS} PETSC_DIR=${_build_dir} DESTDIR=${pkgdir} install
- export PETSC_DIR=${_install_dir}
+ export PETSC_DIR=${_install_dir}
- # Note: the hyperlinks between documentation, tutorials and examples are
- # not perfect yet
+ # Note: the hyperlinks between documentation, tutorials and examples are
+ # not perfect yet
- # documentation
- mkdir -p ${pkgdir}/usr/share/doc/$pkgname/
- cp -r ${_build_dir}/docs ${pkgdir}/usr/share/doc/$pkgname/
+ # documentation
+ mkdir -p ${pkgdir}/usr/share/doc/$pkgname/
+ cp -r ${_build_dir}/docs ${pkgdir}/usr/share/doc/$pkgname/
- # tutorials
- #cp -r ${_build_dir}/tutorials ${pkgdir}/usr/share/doc/$pkgname/
+ # src for tutorials
+ #find ./src -path '*examples*' -type f -exec \
+ # install -Dm 644 "{}" "${pkgdir}/usr/share/doc/$pkgname/{}" \;
- # src for tutorials
- cp -r ${_build_dir}/src ${pkgdir}/usr/share/doc/$pkgname/
+ # html versions of header files
+ mkdir -p ${pkgdir}/usr/share/doc/$pkgname/include
+ cp -r ${_build_dir}/include/*.html ${pkgdir}/usr/share/doc/$pkgname/include/
- # html versions of header files
- mkdir -p ${pkgdir}/usr/share/doc/$pkgname/include
- cp -r ${_build_dir}/include/*.html ${pkgdir}/usr/share/doc/$pkgname/include/
+ # install licence (even though there is no such word as licenses)
+ mkdir -p ${pkgdir}/usr/share/licenses/petsc
+ cp ${_build_dir}/docs/copyright.html ${pkgdir}/usr/share/licenses/$pkgname/
- # install licence (even though there is no such word as licenses)
- mkdir -p ${pkgdir}/usr/share/licenses/petsc
- cp ${_build_dir}/docs/copyright.html ${pkgdir}/usr/share/licenses/$pkgname/
+ mkdir -p ${pkgdir}/etc/profile.d
+ echo "export PETSC_DIR=${_install_dir}" > ${pkgdir}/etc/profile.d/petsc.sh
+ #echo "export PETSC_ARCH=${_petsc_arch}" >> ${pkgdir}/etc/profile.d/petsc.sh
+ chmod +x ${pkgdir}/etc/profile.d/petsc.sh
- mkdir -p ${pkgdir}/etc/profile.d
- echo "export PETSC_DIR=${_install_dir}" > ${pkgdir}/etc/profile.d/petsc.sh
- #echo "export PETSC_ARCH=${_petsc_arch}" >> ${pkgdir}/etc/profile.d/petsc.sh
- chmod +x ${pkgdir}/etc/profile.d/petsc.sh
+ # show where the shared libraries are
+ install -d -m755 "${pkgdir}"/etc/ld.so.conf.d/
+ echo "${_install_dir}/lib" > "${pkgdir}"/etc/ld.so.conf.d/petsc.conf
- # show where the shared libraries are
- install -d -m755 "${pkgdir}"/etc/ld.so.conf.d/
- echo "${_install_dir}/lib" > "${pkgdir}"/etc/ld.so.conf.d/petsc.conf
+ # install pkgconfig settings
+ mkdir -p "${pkgdir}"/usr/share/pkgconfig
+ ln -s "${pkgdir}${_install_dir}"/lib/pkgconfig/PETSc.pc "${pkgdir}"/usr/share/pkgconfig/PETSc.pc
+ #cp "${_build_dir}/${_petsc_arch}"/lib/pkgconfig/PETSc.pc "${pkgdir}"/usr/share/pkgconfig/
}