[arch-commits] Commit in pythia8/repos (4 files)

Felix Yan felixonmars at archlinux.org
Mon Nov 9 11:27:22 UTC 2020


    Date: Monday, November 9, 2020 @ 11:27:21
  Author: felixonmars
Revision: 746840

archrelease: copy trunk to community-staging-x86_64

Added:
  pythia8/repos/community-staging-x86_64/
  pythia8/repos/community-staging-x86_64/PKGBUILD
    (from rev 746839, pythia8/trunk/PKGBUILD)
  pythia8/repos/community-staging-x86_64/fix_python_lib_paths.patch
    (from rev 746839, pythia8/trunk/fix_python_lib_paths.patch)
  pythia8/repos/community-staging-x86_64/pythia8.sh
    (from rev 746839, pythia8/trunk/pythia8.sh)

----------------------------+
 PKGBUILD                   |  116 +++++++++++++++++++++++++++++++++++++++++++
 fix_python_lib_paths.patch |   12 ++++
 pythia8.sh                 |    3 +
 3 files changed, 131 insertions(+)

Copied: pythia8/repos/community-staging-x86_64/PKGBUILD (from rev 746839, pythia8/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-11-09 11:27:21 UTC (rev 746840)
@@ -0,0 +1,116 @@
+# Maintainer: Konstantin Gizdov < arch at kge dot pw >
+# Contributor: Joshua Ellis < josh at jpellis dot me >
+# Contributor: Stefano Campanella < stefanocampanella1729 at gmail dot com >
+
+pkgbase=pythia8
+pkgname=('pythia8' 'python-pythia8')
+pkgver=8.3.03
+_pkgid="${pkgbase:0:-1}${pkgver//./}"
+pkgrel=2
+pkgdesc="High-energy physics events generator"
+arch=('x86_64')
+url="http://home.thep.lu.se/Pythia/"
+license=('GPL')
+depends=('python' 'openmp')
+makedepends=('fastjet' 'hepmc' 'hepmc2' 'lhapdf>=6.2' 'root')
+source=("http://home.thep.lu.se/~torbjorn/pythia8/${_pkgid}.tgz"
+        'pythia8.sh'
+        'fix_python_lib_paths.patch')
+sha256sums=('cd7c2b102670dae74aa37053657b4f068396988ef7da58fd3c318c84dc37913e'
+            '4e373b685960e410024b4e33e22c2dea360dfedd7962837087332f428c974ae5'
+            '661d0d54bea576bccd0075cb1f7a0cbbf7df05b241d97eec6f7fbc1389b5f992')
+get_pyver () {
+    python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
+}
+
+prepare() {
+    cd "${srcdir}/${_pkgid}"
+    patch -Np1 -i "${srcdir}/fix_python_lib_paths.patch"
+}
+
+build() {
+    _bin=/usr/bin
+    _inc=/usr/include
+    _lib=/usr/lib
+    _share="/usr/share/${pkgbase}"
+    _pyver="$(get_pyver)"
+
+    cd "${srcdir}/${_pkgid}"
+    ./configure \
+        --prefix=/usr \
+        --prefix-bin="${_bin}" \
+        --prefix-include="${_inc}" \
+        --prefix-lib="${_lib}" \
+        --prefix-share="${_share}" \
+        --cxx=/usr/bin/g++ \
+        --cxx-common="${CXXFLAGS} -fPIC" \
+        --cxx-shared="-shared ${LDFLAGS} -ldl" \
+        --with-fastjet3 \
+        --with-fastjet3-include=${_inc} \
+        --with-fastjet3-lib=${_lib} \
+        --with-gzip \
+        --with-gzip-include=${_inc} \
+        --with-gzip-lib=${_lib} \
+        --with-hepmc2 \
+        --with-hepmc2-include=${_inc} \
+        --with-hepmc2-lib=${_lib} \
+        --with-hepmc3 \
+        --with-hepmc3-include=${_inc} \
+        --with-hepmc3-lib=${_lib} \
+        --with-lhapdf5 \
+        --with-lhapdf5-include=${_inc} \
+        --with-lhapdf5-lib=${_lib} \
+        --with-lhapdf6 \
+        --with-lhapdf6-include=${_inc} \
+        --with-lhapdf6-lib=${_lib} \
+        --with-python \
+        --with-python-include="/usr/include/python${_pyver}" \
+        --with-python-lib="/usr/lib/python${_pyver}" \
+        --with-root \
+        --with-root-include=/usr/include/root \
+        --with-root-lib=/usr/lib/root \
+        --with-openmp \
+        --with-openmp-include=${_inc} \
+        --with-openmp-lib=${_lib}
+    make
+}
+
+package_pythia8() {
+    optdepends=('fastjet: fast jet finding in pp and e+e- collisions'
+                'hepmc: storing collisions from Monte Carlo'
+                'hepmc2: storing collisions from Monte Carlo (old interface)'
+                'lhapdf: evaluate PDFs from discretised data files'
+                'root: integrated examples with CERN ROOT data analysis framework')
+
+    cd "${srcdir}/${_pkgid}"
+
+    install -Dm755 bin/pythia8-config "${pkgdir}/usr/bin/pythia8-config"
+    install -Dm644 lib/libpythia8.a "${pkgdir}/usr/lib/libpythia8.a"
+    install -Dm755 lib/libpythia8.so "${pkgdir}/usr/lib/libpythia8.so"
+    install -Dm755 lib/libpythia8lhapdf5.so "${pkgdir}/usr/lib/libpythia8lhapdf5.so"
+    install -Dm755 lib/libpythia8lhapdf6.so "${pkgdir}/usr/lib/libpythia8lhapdf6.so"
+
+    cp -r include "${pkgdir}/usr/"
+    install -d "${pkgdir}/usr/share/${pkgbase}"
+    cp -r share/Pythia8/* "${pkgdir}/usr/share/${pkgbase}/"
+    cp -r examples "${pkgdir}/usr/share/${pkgbase}/"
+
+    install -D "${srcdir}/pythia8.sh" "${pkgdir}/etc/profile.d/pythia8.sh"
+}
+
+package_python-pythia8() {
+    pkgdesc="Python bindings for Pythia"
+    replaces=('python-pythia')
+    depends=('pythia8')
+
+    cd "${srcdir}/${_pkgid}"
+    _pyver="$(get_pyver)"
+
+    install -Dm755 lib/pythia8.so "${pkgdir}/usr/lib/python${_pyver}/site-packages/pythia8.so"
+
+    # recompile pycache to strip $pkgdir from embedded paths
+    python -m compileall -d "/usr/lib/python${_pyver}" \
+        "${pkgdir}/usr/lib/python${_pyver}"
+    python -O -m compileall -d "/usr/lib/python${_pyver}" \
+        "${pkgdir}/usr/lib/python${_pyver}"
+}

Copied: pythia8/repos/community-staging-x86_64/fix_python_lib_paths.patch (from rev 746839, pythia8/trunk/fix_python_lib_paths.patch)
===================================================================
--- community-staging-x86_64/fix_python_lib_paths.patch	                        (rev 0)
+++ community-staging-x86_64/fix_python_lib_paths.patch	2020-11-09 11:27:21 UTC (rev 746840)
@@ -0,0 +1,12 @@
+diff -aur pythia8303-old/plugins/python/Makefile pythia8303-new/plugins/python/Makefile
+--- pythia8303-old/plugins/python/Makefile	2020-09-01 14:37:05.000000000 +0300
++++ pythia8303-new/plugins/python/Makefile	2020-09-25 18:28:43.852513423 +0300
+@@ -27,7 +27,7 @@
+ LOCAL_INCLUDE=include
+ LOCAL_MKDIRS:=$(shell mkdir -p $(LOCAL_TMP) $(TOP_LIB))
+ OBJ_COMMON=-MD $(CXX_COMMON) -Iinclude $(PYTHON_INCLUDE) -w -fpermissive
+-LIB_COMMON=-Wl,-rpath,$(TOP_LIB) -ldl $(GZIP_LIB)
++LIB_COMMON=-ldl $(GZIP_LIB)
+ PYTHIA=$(TOP_LIB)/libpythia8$(LIB_SUFFIX)
+ 
+ # Determine the headers.

Copied: pythia8/repos/community-staging-x86_64/pythia8.sh (from rev 746839, pythia8/trunk/pythia8.sh)
===================================================================
--- community-staging-x86_64/pythia8.sh	                        (rev 0)
+++ community-staging-x86_64/pythia8.sh	2020-11-09 11:27:21 UTC (rev 746840)
@@ -0,0 +1,3 @@
+# /etc/profile.d/pythia8.sh
+export PYTHIA8=/usr
+export PYTHIA8DATA=$PYTHIA8/share/pythia8/xmldoc



More information about the arch-commits mailing list