diff options
author | L.G. Sarmiento | 2015-06-14 19:41:04 +0200 |
---|---|---|
committer | L.G. Sarmiento | 2015-06-14 19:41:04 +0200 |
commit | c1216d814552ec8ef61bbfdc13a147bfdc5acbfc (patch) | |
tree | fe1acb5f72e544bee88ae3aa4e499028b87c2ae1 | |
download | aur-c1216d814552ec8ef61bbfdc13a147bfdc5acbfc.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 61 | ||||
-rw-r--r-- | Geant4InterfaceOptions.patch | 49 | ||||
-rw-r--r-- | PKGBUILD | 109 | ||||
-rw-r--r-- | geant4.install | 49 |
4 files changed, 268 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..53a7a39e3dd5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,61 @@ +pkgbase = geant4 + pkgdesc = A simulation toolkit for particle physics interactions. + pkgver = 10.01.01 + pkgrel = 1 + url = http://geant4.cern.ch/ + install = geant4.install + arch = x86_64 + arch = i686 + license = custom: http://geant4.cern.ch/license/ + depends = cmake>=2.8.2 + depends = xerces-c + depends = qt5-base + depends = qt5-connectivity + depends = qt5-declarative + depends = qt5-enginio + depends = qt5-graphicaleffects + depends = qt5-imageformats + depends = qt5-location + depends = qt5-multimedia + depends = qt5-quick1 + depends = qt5-quickcontrols + depends = qt5-script + depends = qt5-sensors + depends = qt5-serialport + depends = qt5-svg + depends = qt5-tools + depends = qt5-translations + depends = qt5-wayland + depends = qt5-webchannel + depends = qt5-webengine + depends = qt5-webkit + depends = qt5-websockets + depends = qt5-x11extras + depends = qt5-xmlpatterns + depends = glu + depends = soxt + depends = mesa + depends = clhep + optdepends = java-environment: for histogram visualizations and analysis + optdepends = tcsh: for C Shell support + optdepends = python: for G4Python support + optdepends = geant4-abladata: Data files for nuclear shell effects in INCL/ABLA hadronic mode + optdepends = geant4-ledata: Data files for low energy electromagnetic processes + optdepends = geant4-levelgammadata: Data files for photon evaporation + optdepends = geant4-neutronhpdata: Neutron data files with thermal cross sections + optdepends = geant4-neutronxsdata: Data files for evaluated neutron cross sections on natural composition of elements + optdepends = geant4-piidata: Data files for shell ionisation cross sections + optdepends = geant4-radioactivedata: Data files for radioactive decay hadronic processes + optdepends = geant4-realsurfacedata: Data files for measured optical surface reflectance + optdepends = geant4-saiddata: Data files from evaluated cross-sections in SAID data-base + replaces = geant4-deb + options = !emptydirs + source = http://geant4.cern.ch/support/source/geant4.10.01.p01.tar.gz + source = Geant4InterfaceOptions.patch + source = geant4.install + md5sums = 145c91d167a3fda2ad811a468dd8221c + md5sums = cc428f31958c6e036cb01c0220b3fd83 + md5sums = c3652d79011cd3fab2e1081e22f9f513 + +pkgname = geant4 + diff --git a/Geant4InterfaceOptions.patch b/Geant4InterfaceOptions.patch new file mode 100644 index 000000000000..5480f870dc7c --- /dev/null +++ b/Geant4InterfaceOptions.patch @@ -0,0 +1,49 @@ +--- src/geant4.10.00.p02/cmake/Modules/Geant4InterfaceOptions.cmake 2014-06-19 11:56:29.000000000 +0200 ++++ Geant4InterfaceOptions.cmake 2014-10-26 19:04:58.407396452 +0100 +@@ -88,29 +88,29 @@ + find_package(Qt5OpenGL QUIET) + find_package(Qt5PrintSupport QUIET) + +- if(Qt5Core_FOUND +- AND Qt5Gui_FOUND +- AND Qt5Widgets_FOUND +- AND Qt5OpenGL_FOUND +- AND Qt5PrintSupport_FOUND) +- # Compatibility +- macro(qt4_wrap_cpp) +- qt5_wrap_cpp(${ARGN}) +- endmacro() +- set(Qt5_USE_FILE_IN "${PROJECT_SOURCE_DIR}/cmake/Templates/Geant4UseQt5.cmake.in") +- set(QT_USE_FILE "${PROJECT_BINARY_DIR}/Geant4UseQt5.cmake") +- configure_file("${Qt5_USE_FILE_IN}" "${QT_USE_FILE}" @ONLY) +- get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION) +- set(G4QTLIBLIST "-lQt5PrintSupport -lQt5Widgets -lQt5Gui -lQt5Core") +- set(G4GLQTLIBLIST "-lQt5OpenGL ${G4QTLIBLIST}") +- else() ++# if(Qt5Core_FOUND ++# AND Qt5Gui_FOUND ++# AND Qt5Widgets_FOUND ++# AND Qt5OpenGL_FOUND ++# AND Qt5PrintSupport_FOUND) ++# # Compatibility ++# macro(qt4_wrap_cpp) ++# qt5_wrap_cpp(${ARGN}) ++# endmacro() ++# set(Qt5_USE_FILE_IN "${PROJECT_SOURCE_DIR}/cmake/Templates/Geant4UseQt5.cmake.in") ++# set(QT_USE_FILE "${PROJECT_BINARY_DIR}/Geant4UseQt5.cmake") ++# configure_file("${Qt5_USE_FILE_IN}" "${QT_USE_FILE}" @ONLY) ++# get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION) ++# set(G4QTLIBLIST "-lQt5PrintSupport -lQt5Widgets -lQt5Gui -lQt5Core") ++# set(G4GLQTLIBLIST "-lQt5OpenGL ${G4QTLIBLIST}") ++# else() + unset(Qt5Core_DIR CACHE) + unset(Qt5Gui_DIR CACHE) + unset(Qt5Widgets_DIR CACHE) + unset(Qt5OpenGL_DIR CACHE) + unset(Qt5PrintSupport_DIR CACHE) + find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui QtOpenGL) +- endif() ++# endif() + + find_package(OpenGL REQUIRED) + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..eb8c8463b9e3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,109 @@ +# Maintainer: Luis Sarmiento < Luis.Sarmiento-ala-nuclear.lu.se > +pkgname='geant4' +pkgver=10.01.01 +_pkgver=10.01.p01 +pkgrel=1 +pkgdesc="A simulation toolkit for particle physics interactions." +depends=('cmake>=2.8.2' 'xerces-c' 'qt5-base' 'qt5-connectivity' 'qt5-declarative' 'qt5-enginio' 'qt5-graphicaleffects' 'qt5-imageformats' 'qt5-location' 'qt5-multimedia' 'qt5-quick1' 'qt5-quickcontrols' 'qt5-script' 'qt5-sensors' 'qt5-serialport' 'qt5-svg' 'qt5-tools' 'qt5-translations' 'qt5-wayland' 'qt5-webchannel' 'qt5-webengine' 'qt5-webkit' 'qt5-websockets' 'qt5-x11extras' 'qt5-xmlpatterns' 'glu' 'soxt' 'mesa' 'clhep') +replaces=('geant4-deb') +optdepends=('java-environment: for histogram visualizations and +analysis' + 'tcsh: for C Shell support' + 'python: for G4Python support' + 'geant4-abladata: Data files for nuclear shell effects in INCL/ABLA hadronic mode' + 'geant4-ledata: Data files for low energy electromagnetic processes' + 'geant4-levelgammadata: Data files for photon evaporation' + 'geant4-neutronhpdata: Neutron data files with thermal cross sections' + 'geant4-neutronxsdata: Data files for evaluated neutron cross sections on natural composition of elements' + 'geant4-piidata: Data files for shell ionisation cross sections' + 'geant4-radioactivedata: Data files for radioactive decay hadronic processes' + 'geant4-realsurfacedata: Data files for measured optical surface reflectance' + 'geant4-saiddata: Data files from evaluated cross-sections in SAID data-base') +url="http://geant4.cern.ch/" +arch=('x86_64' 'i686') +license=('custom: http://geant4.cern.ch/license/') +options=('!emptydirs') +install="${pkgname}.install" +source=("http://geant4.cern.ch/support/source/${pkgname}.${_pkgver}.tar.gz" + "Geant4InterfaceOptions.patch" + "${pkgname}.install") +md5sums=('145c91d167a3fda2ad811a468dd8221c' + 'cc428f31958c6e036cb01c0220b3fd83' + 'c3652d79011cd3fab2e1081e22f9f513') + +## Remove this if you want to keep an even smaller package +## No need to wait for compression when just installing it. +PKGEXT='.pkg.tar' + +prepare() { + cd ${srcdir}/${pkgname}.${_pkgver}/cmake/Modules/ +# patch -Np1 Geant4InterfaceOptions.cmake < ${srcdir}/Geant4InterfaceOptions.patch +} + +## Geant4 Build Options +## http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch02s03.html + +build() { + [ -d ${srcdir}/build ] || mkdir ${srcdir}/build + cd ${srcdir}/build + env -i \ + QT_SELECT=5 \ + PATH=/usr/bin \ + cmake -Wno-dev \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DGEANT4_USE_GDML=ON \ + -DGEANT4_USE_G3TOG4=ON \ + -DGEANT4_USE_QT=ON \ + -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt5 \ + -DGEANT4_USE_XM=ON \ + -DGEANT4_BUILD_MULTITHREADED=ON \ + -DGEANT4_USE_SYSTEM_CLHEP=ON \ + -DGEANT4_USE_OPENGL_X11=ON \ + -DGEANT4_USE_INVENTOR=ON \ + -DGEANT4_USE_RAYTRACER_X11=ON \ + -DGEANT4_USE_SYSTEM_EXPAT=ON \ + -DGEANT4_USE_SYSTEM_ZLIB=ON \ + ../${pkgname}.${_pkgver} + + make + + ## -DGEANT4_BUILD_CXXSTD=c++11 \ + ## this presents issues with some random number generation routines. +} + +package() { + + #Since the basic package does not include the data files, their + #configuration should be removed from the configuration file. Data + #files are also available on the AUR and the environment variables + #are set automatically for you from the packages. + + msg "Removing wrongly set environment variables" + + variables=("G4LEDATA" \ + "G4LEVELGAMMADATA" \ + "G4NEUTRONHPDATA" \ + "G4NEUTRONXSDATA" \ + "G4PIIDATA" \ + "G4RADIOACTIVEDATA" \ + "G4REALSURFACEDATA" \ + "G4SAIDXSDATA" \ + "G4ABLADATA" ) + + for _varname in ${variables[*]} + do + sed -i "/${_varname}/d" ${srcdir}/build/InstallTreeFiles/geant4.sh + sed -i "/${_varname}/d" ${srcdir}/build/InstallTreeFiles/geant4.csh + done + + cd ${srcdir}/build + make DESTDIR="${pkgdir}" install + + echo 'pushd /usr/bin &> /dev/null && source geant4.sh && popd &>/dev/null' > ${srcdir}/geant4.profile.sh + echo 'pushd /usr/bin &> /dev/null && source geant4.csh && popd &>/dev/null' > ${srcdir}/geant4.profile.csh + install -d ${pkgdir}/etc/profile.d + install -m755 ${srcdir}/geant4.profile.sh ${pkgdir}/etc/profile.d/geant4.sh + install -m755 ${srcdir}/geant4.profile.csh ${pkgdir}/etc/profile.d/geant4.csh +} diff --git a/geant4.install b/geant4.install new file mode 100644 index 000000000000..970c6c17090f --- /dev/null +++ b/geant4.install @@ -0,0 +1,49 @@ +#!/bin/sh + +_init() { + variables=("G4LEDATA" \ + "G4LEVELGAMMADATA" \ + "G4NEUTRONHPDATA" \ + "G4NEUTRONXSDATA" \ + "G4PIIDATA" \ + "G4RADIOACTIVEDATA" \ + "G4REALSURFACEDATA" \ + "G4SAIDXSDATA" \ + "G4ABLADATA" ) + +shell=("sh" "csh") + +existing="existing" +path="/etc/profile.d" +} +_clean(){ + for _ext in ${shell[*]} + do + rm -f $existing.${_ext} + done +} +_read() { + _init + for _varname in ${variables[*]} + do + for _ext in ${shell[*]} + do + sed -n /${_varname}/p ${path}/geant4.${_ext} >> $existing.${_ext} + done + done +} +_keep() { + _init + for _ext in ${shell[*]} + do + cat $existing.${_ext} >> ${path}/geant4.${_ext} + done + _clean +} + +pre_upgrade() { + _read +} +post_upgrade() { + _keep +} |