summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoreolianoe2015-09-30 14:28:52 +0200
committereolianoe2015-09-30 14:28:52 +0200
commit3af071ccd956a956b6be86e13ff5518fe3cac84b (patch)
treec6b21b263f286aee67992301ccde82e3617cfbba
parenta023fe394ff7e5176ddb67c4c874b5419dadf172 (diff)
downloadaur-3af071ccd956a956b6be86e13ff5518fe3cac84b.tar.gz
Respect the prepare/build/package function
Create a _build_command() function that invoke the build_visit_script with the right arguments.
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD110
-rw-r--r--no_extract_visit.patch24
3 files changed, 96 insertions, 46 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c160dbb2e1d..4718e8ab1e1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = visit-build
pkgdesc = Interactive parallel visualization and graphical analysis tool (built with build_visit).
pkgver = 2.9.2
- pkgrel = 1
+ pkgrel = 2
url = https://wci.llnl.gov/simulation/computer-codes/visit
arch = i686
arch = x86_64
@@ -20,10 +20,14 @@ pkgbase = visit-build
provides = visit
conflicts = visit
conflicts = visit-bin
- source = http://portal.nersc.gov/svn/visit/trunk/releases/2.9.2/build_visit2_9_2
+ source = https://portal.nersc.gov/svn/visit/trunk/releases/2.9.2/build_visit2_9_2
+ source = https://portal.nersc.gov/svn/visit/trunk/releases/2.9.2/visit2.9.2.tar.gz
source = visit.sh
+ source = no_extract_visit.patch
sha256sums = 4b1d396b41923b3b2c1b2da2524cb424f0166d9898d04f367f52a0426ae7a688
+ sha256sums = 97d19e2609fbba655772feb055919b925214ab68c95ff46481572bd7e9c9ea31
sha256sums = d07a11e67ad646579fbc341f30e1eb63ebd38a5fbdd4f3ea36e8f460419028da
+ sha256sums = 13f14a8b61cf4b59155c2f1d22fc59e670615343b8b9d78dfbfd9c2e321f6cc7
pkgname = visit-build
diff --git a/PKGBUILD b/PKGBUILD
index 17a69c122ef..b785380b582 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,30 +5,53 @@ pkgname=visit-build
_pkgname=visit
pkgver=2.9.2
_pkgver=2_9_2
-pkgrel=1
+pkgrel=2
pkgdesc="Interactive parallel visualization and graphical analysis tool (built with build_visit)."
arch=('i686' 'x86_64')
url="https://wci.llnl.gov/simulation/computer-codes/visit"
-_url="http://portal.nersc.gov"
license=('BSD' 'custom')
makedepends=('qtchooser' 'cmake' 'svn' 'java-runtime' 'gcc-fortran')
depends=('qtwebkit' 'python2-numpy' 'openmpi' 'glu' 'java-environment')
conflicts=('visit' 'visit-bin')
provides=('visit')
-source=("${_url}/svn/${_pkgname}/trunk/releases/${pkgver}/build_${_pkgname}${_pkgver}"
- "visit.sh")
-
+source=("https://portal.nersc.gov/svn/${_pkgname}/trunk/releases/${pkgver}/build_${_pkgname}${_pkgver}"
+ "https://portal.nersc.gov/svn/${_pkgname}/trunk/releases/${pkgver}/${_pkgname}${pkgver}.tar.gz"
+ "visit.sh"
+ 'no_extract_visit.patch')
sha256sums=('4b1d396b41923b3b2c1b2da2524cb424f0166d9898d04f367f52a0426ae7a688'
- 'd07a11e67ad646579fbc341f30e1eb63ebd38a5fbdd4f3ea36e8f460419028da')
+ '97d19e2609fbba655772feb055919b925214ab68c95ff46481572bd7e9c9ea31'
+ 'd07a11e67ad646579fbc341f30e1eb63ebd38a5fbdd4f3ea36e8f460419028da'
+ '13f14a8b61cf4b59155c2f1d22fc59e670615343b8b9d78dfbfd9c2e321f6cc7')
prepare(){
- cd ${srcdir}
+ cd "${srcdir}"
- # Fix to use python2
- sed -i 's/python-config/python2-config/g' build_${_pkgname}${_pkgver}
- sed -i 's/PYTHON_COMMAND="python"/PYTHON_COMMAND="python2"/g' build_${_pkgname}${_pkgver}
-}
+ # Fix to use python2 in the build script
+ sed -i -e 's/python-config/python2-config/g' -e 's/PYTHON_COMMAND="python"/PYTHON_COMMAND="python2"/g'\
+ "${srcdir}/build_${_pkgname}${_pkgver}"
+
+ # Build directory
+ #rm -rf -- "${srcdir}/build-${pkgver}"
+ #mkdir -p "${srcdir}/build-${pkgver}"
+
+ # Do not re-extract the visit source code
+ patch < no_extract_visit.patch
+
+ # Fix to use python2 in every scripts
+ sed -i 's/exec\ python/exec\ python2/' \
+ "${srcdir}/${_pkgname}${pkgver}/src/bin/frontendlauncher"
+ sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+ -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
+ -i $(find "${srcdir}/${_pkgname}${pkgver}/" -name '*.py')
+
+ # Thirdparty libs
+ #rm -rf -- "${srcdir}/thirdparty-${pkgver}"
+ #mkdir -p "${srcdir}/thirdparty-${pkgver}"
+ # Download all files with '--download-only' option
+ _build_command ${srcdir} --download-only
+}
build() {
cd "${srcdir}"
@@ -36,51 +59,24 @@ build() {
export PAR_INCLUDE=-I/usr/include
export SILO_EXTRA_OPTIONS="LIBS='-lstdc++'"
export FC_COMPILER=gfortran
-
- # To avoid some incompatibilities with Qt5
- export QT_SELECT=4
-
- mkdir -p build-${pkgver}
- mkdir -p thirdparty-${pkgver}
+ export FCFLAGS="-O2"
# Fix in case the ${MAKEFLAGS} variable is empty
if [ -z "${MAKEFLAGS}" ]; then
MAKEFLAGS="-j1"
fi
- echo yes | bash build_${_pkgname}${_pkgver} --console \
- --installation-build-dir "${srcdir}/build-${pkgver}" \
- --thirdparty-path "${srcdir}/thirdparty-${pkgver}" \
- --system-cmake --system-qt --system-python \
- --parallel-build --parallel \
- --makeflags ${MAKEFLAGS} \
- --cc gcc --cxx g++ --fortran \
- --build-mode Release \
- --java \
- --pyside \
- --silo \
- --xdmf \
- --netcdf \
- --szip --zlib \
- --hdf4 --hdf5
-
+ _build_command ${srcdir} "--makeflags ${MAKEFLAGS}"
- # Fix to use python2 in every scripts
- cd "${srcdir}/build-${pkgver}/${_pkgname}${pkgver}"
- sed -i 's/exec\ python/exec\ python2/' \
- src/bin/frontendlauncher
- sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
- -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
- -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
- -i $(find . -name '*.py')
}
package(){
- cd "${srcdir}/build-${pkgver}/${_pkgname}${pkgver}/src"
+ cd "${srcdir}/${_pkgname}${pkgver}/src"
# The prefix could not be set in the build_visit script,
- # because it will install it in the build function of the PKGBUILD.
- sed -i 's/\/usr\/local/\/opt\/visit/' cmake_install.cmake
+ # because it will install it in the build() function of the PKGBUILD,
+ # so set it now.
+ sed -i 's:/usr/local:/opt/visit:g' cmake_install.cmake
make install DESTDIR="${pkgdir}"
@@ -92,4 +88,30 @@ package(){
install -Dm755 "${srcdir}/visit.sh" "${pkgdir}/etc/profile.d/visit.sh"
}
+_build_command(){
+ dir=${1}
+ opt=${2}
+
+ # To avoid some incompatibilities with Qt5
+ export QT_SELECT=4
+
+ echo yes | bash build_${_pkgname}${_pkgver} --console \
+ --installation-build-dir "${dir}/build-${pkgver}" \
+ --thirdparty-path "${dir}/thirdparty-${pkgver}" \
+ --tarball "${dir}/${_pkgname}${pkgver}.tar.gz" \
+ --system-cmake --system-qt --system-python \
+ --parallel-build --parallel \
+ --cc gcc --cxx g++ --fortran \
+ --build-mode Release \
+ --hdf4 \
+ --hdf5 \
+ --java \
+ --netcdf \
+ --silo \
+ --szip \
+ --xdmf \
+ --zlib \
+ ${opt}
+}
+
# vim:set ts=2 sw=2 et:
diff --git a/no_extract_visit.patch b/no_extract_visit.patch
new file mode 100644
index 00000000000..7de7c3d7c36
--- /dev/null
+++ b/no_extract_visit.patch
@@ -0,0 +1,24 @@
+--- build_visit2_9_2 2015-09-29 18:35:16.929401021 +0200
++++ build_visit2_9_2.new 2015-09-29 18:36:49.289624506 +0200
+@@ -2433,14 +2433,14 @@
+ return -1
+ fi
+ elif [[ -f ${SRC_FILE%.*} ]] ; then
+- info "Untarring ${SRC_FILE%.*} . . ."
+- $TAR xf ${SRC_FILE%.*}
++ #info "Untarring ${SRC_FILE%.*} . . ."
++ #$TAR xf ${SRC_FILE%.*}
+ untarred_src=1
+- if [[ $? != 0 ]] ; then
+- warn \
+-"Unable to untar ${SRC_FILE%.*}. Corrupted file or out of space on device?"
+- return -1
+- fi
++ #if [[ $? != 0 ]] ; then
++ #warn \
++#"Unable to untar ${SRC_FILE%.*}. Corrupted file or out of space on device?"
++ #return -1
++ #fi
+ fi
+
+ return $untarred_src