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

Konstantin Gizdov kgizdov at archlinux.org
Fri Sep 25 15:38:50 UTC 2020


    Date: Friday, September 25, 2020 @ 15:38:50
  Author: kgizdov
Revision: 712024

upgpkg: pythia8 8.3.03-1

Added:
  pythia8/trunk/fix_python_lib_paths.patch
Modified:
  pythia8/trunk/PKGBUILD
Deleted:
  pythia8/trunk/fix_lhapdf_build.patch
  pythia8/trunk/respect_lib_suffix.patch

----------------------------+
 PKGBUILD                   |   75 ++++++++++------------
 fix_lhapdf_build.patch     |   12 ---
 fix_python_lib_paths.patch |   12 +++
 respect_lib_suffix.patch   |  141 -------------------------------------------
 4 files changed, 47 insertions(+), 193 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-09-25 15:22:31 UTC (rev 712023)
+++ PKGBUILD	2020-09-25 15:38:50 UTC (rev 712024)
@@ -4,23 +4,21 @@
 
 pkgbase=pythia8
 pkgname=('pythia8' 'python-pythia8')
-pkgver=8.2.44
+pkgver=8.3.03
 _pkgid="${pkgbase:0:-1}${pkgver//./}"
-pkgrel=6
+pkgrel=1
 pkgdesc="High-energy physics events generator"
 arch=('x86_64')
 url="http://home.thep.lu.se/Pythia/"
 license=('GPL')
-depends=('python')
-makedepends=('fastjet' 'hepmc2' 'lhapdf>=6.2' 'root')
+depends=('python' 'openmp')
+makedepends=('fastjet' 'hepmc' 'hepmc2' 'lhapdf>=6.2' 'root')
 source=("http://home.thep.lu.se/~torbjorn/pythia8/${_pkgid}.tgz"
         'pythia8.sh'
-        'fix_lhapdf_build.patch'
-        'respect_lib_suffix.patch')
-sha256sums=('e34880f999daf19cdd893a187123927ba77d1bf851e30f6ea9ec89591f4c92ca'
+        'fix_python_lib_paths.patch')
+sha256sums=('cd7c2b102670dae74aa37053657b4f068396988ef7da58fd3c318c84dc37913e'
             '4e373b685960e410024b4e33e22c2dea360dfedd7962837087332f428c974ae5'
-            'f7c70b069b350005ac7e9028617713dece9b82c1e8b0dc5fb1f2870abec1d94c'
-            '4eb15725cfb5e287fdd9520cb4211b88ebc38a690b7522690ba0664d50bc8669')
+            '661d0d54bea576bccd0075cb1f7a0cbbf7df05b241d97eec6f7fbc1389b5f992')
 get_pyver () {
     python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
 }
@@ -27,41 +25,26 @@
 
 prepare() {
     cd "${srcdir}/${_pkgid}"
-
-    patch -p1 -i "${srcdir}/respect_lib_suffix.patch"
-    patch -p1 -i "${srcdir}/fix_lhapdf_build.patch"
+    patch -Np1 -i "${srcdir}/fix_python_lib_paths.patch"
 }
 
 build() {
+    _bin=/usr/bin
     _inc=/usr/include
     _lib=/usr/lib
-    _share=/usr/share/${pkgbase}
+    _share="/usr/share/${pkgbase}"
+    _pyver="$(get_pyver)"
 
     cd "${srcdir}/${_pkgid}"
-    # # no such package yet
-    # --with-evtgen \
-    # --with-evtgen-include=${_inc} \
-    # --with-evtgen-lib=${_lib} \
-    # # no such package yet
-    # --with-hepmc3 \
-    # --with-hepmc3-include=${_inc} \
-    # --with-hepmc3-lib=${_lib} \
-    # # no such package yet
-    # --with-powheg \
-    # --with-powheg-include=${_inc} \
-    # --with-powheg-lib=${_lib} \
-    # # no such package yet
-    # --with-promc \
-    # --with-promc-include=${_inc} \
-    # --with-promc-lib=${_lib} \
     ./configure \
         --prefix=/usr \
-        --prefix-include=${_inc} \
-        --prefix-lib=${_lib} \
-        --prefix-share=${_share} \
+        --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" \
-        --enable-shared \
         --with-fastjet3 \
         --with-fastjet3-include=${_inc} \
         --with-fastjet3-lib=${_lib} \
@@ -71,6 +54,9 @@
         --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} \
@@ -78,17 +64,21 @@
         --with-lhapdf6-include=${_inc} \
         --with-lhapdf6-lib=${_lib} \
         --with-python \
-        --with-python-include="/usr/include/python$(get_pyver)" \
-        --with-python-lib="/usr/lib/python$(get_pyver)" \
+        --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-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'
-                'hepmc2: storing collisions from Monte Carlo'
+                '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')
 
@@ -114,8 +104,13 @@
     depends=('pythia8')
 
     cd "${srcdir}/${_pkgid}"
+    _pyver="$(get_pyver)"
 
-    install -Dm755 lib/_pythia8.so "${pkgdir}/usr/lib/python$(get_pyver)/site-packages/_pythia8.so"
-    install -Dm755 lib/pythia8.py "${pkgdir}/usr/lib/python$(get_pyver)/site-packages/pythia8.py"
-    install -Dm644 lib/__pycache__/pythia8.cpython-*.pyc  -t "${pkgdir}/usr/lib/python$(get_pyver)/site-packages/__pycache__/"
+    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}"
 }

Deleted: fix_lhapdf_build.patch
===================================================================
--- fix_lhapdf_build.patch	2020-09-25 15:22:31 UTC (rev 712023)
+++ fix_lhapdf_build.patch	2020-09-25 15:38:50 UTC (rev 712024)
@@ -1,12 +0,0 @@
-diff -aur pythia8235-old/Makefile pythia8235-new/Makefile
---- pythia8235-old/Makefile	2018-03-27 18:15:17.000000000 +0100
-+++ pythia8235-new/Makefile	2018-11-27 23:42:13.813863630 +0000
-@@ -102,7 +102,7 @@
- 	$(CXX) $< -o $@ -c $(OBJ_COMMON)
- $(LOCAL_LIB)/libpythia8.a: $(OBJECTS)
- 	rm -f $(LOCAL_LIB)/libpythia8$(LIB_SUFFIX)
--	ar cru $@ $^
-+	ar rcs $@ $^
- $(LOCAL_LIB)/libpythia8$(LIB_SUFFIX): $(OBJECTS)
- 	$(CXX) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED) $(CXX_SONAME)$(notdir $@)\
- 	  $(LIB_COMMON)

Added: fix_python_lib_paths.patch
===================================================================
--- fix_python_lib_paths.patch	                        (rev 0)
+++ fix_python_lib_paths.patch	2020-09-25 15:38:50 UTC (rev 712024)
@@ -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.

Deleted: respect_lib_suffix.patch
===================================================================
--- respect_lib_suffix.patch	2020-09-25 15:22:31 UTC (rev 712023)
+++ respect_lib_suffix.patch	2020-09-25 15:38:50 UTC (rev 712024)
@@ -1,141 +0,0 @@
-diff -aur pythia8235-old/examples/Makefile pythia8235-new/examples/Makefile
---- pythia8235-new/examples/Makefile	2018-03-27 19:15:17.000000000 +0200
-+++ pythia8235-new/examples/Makefile	2018-04-16 13:45:00.155056245 +0200
-@@ -54,20 +54,20 @@
-                 in the top PYTHIA directory)
- 
- # PYTHIA libraries.
--$(PREFIX_LIB)/libpythia8.a :
-+$(PREFIX_LIB)/libpythia8$(LIB_SUFFIX) :
- 	$(error Error: PYTHIA must be built, please run "make"\
-                 in the top PYTHIA directory)
- 
- # Examples without external dependencies.
--main% : main%.cc $(PREFIX_LIB)/libpythia8.a
-+main% : main%.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- 	$(CXX) $< -o $@ $(CXX_COMMON) $(GZIP_INC) $(GZIP_FLAGS)
- 
- # MixMax.
--main23: $$@.cc $(PREFIX_LIB)/libpythia8.a
-+main23: $$@.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- 	$(CXX) $< -o $@ -std=c++11 -w $(CXX_COMMON) $(GZIP_INC) $(GZIP_FLAGS)
- 
- # GZIP (required).
--main34: $$@.cc $(PREFIX_LIB)/libpythia8.a
-+main34: $$@.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- ifeq ($(GZIP_USE),true)
- 	$(CXX) $< -o $@ $(CXX_COMMON) $(GZIP_INC) $(GZIP_FLAGS)
- else
-@@ -76,7 +76,7 @@
- 
- # HEPMC2.
- main41 main42 main43 main85 main86 main87 main88 main89: $$@.cc\
--	$(PREFIX_LIB)/libpythia8.a
-+	$(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- ifeq ($(HEPMC2_USE),true)
- 	$(CXX) $< -o $@ -I$(HEPMC2_INCLUDE) $(CXX_COMMON)\
- 	 -L$(HEPMC2_LIB) -Wl,-rpath,$(HEPMC2_LIB) -lHepMC\
-@@ -86,7 +86,7 @@
- endif
- 
- # PROMC.
--main46: $$@.cc $(PREFIX_LIB)/libpythia8.a
-+main46: $$@.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- ifeq ($(PROMC_USE),true)
- 	$(CXX) $< -o $@ -I$(PROMC_INCLUDE)/src -I$(PROMC_INCLUDE)/include\
- 	 $(CXX_COMMON) -DPROMC=\"$(PROMC_INCLUDE)\" -Wno-long-long\
-@@ -97,7 +97,7 @@
- endif
- 
- # EVTGEN (and HEPMC2).
--main48: $$@.cc $(PREFIX_LIB)/libpythia8.a
-+main48: $$@.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- ifeq ($(EVTGEN_USE)$(HEPMC2_USE)$(ENABLE_SHARED),truetruetrue)
- 	$(CXX) $< -o $@ -I$(EVTGEN_INCLUDE) $(CXX_COMMON)\
- 	 -DEVTGEN_PYTHIA -DEVTGEN_EXTERNAL -Wl,-rpath,$(HEPMC2_LIB)\
-@@ -108,7 +108,7 @@
- endif
- 
- # FASTJET3.
--main71 main72 main75: $$@.cc $(PREFIX_LIB)/libpythia8.a
-+main71 main72 main75: $$@.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- ifeq ($(FASTJET3_USE),true)
- 	$(CXX) $< -o $@ -I$(FASTJET3_INCLUDE) $(CXX_COMMON)\
- 	 -L$(FASTJET3_LIB) -Wl,-rpath,$(FASTJET3_LIB) -lfastjet\
-@@ -118,7 +118,7 @@
- endif
- 
- # FASTJET3 with modified Mass-Drop Tagger.
--main74: $$@.cc $(PREFIX_LIB)/libpythia8.a
-+main74: $$@.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- ifeq ($(FASTJET3_USE),true)
- 	$(CXX) $< -o $@ -I$(FASTJET3_INCLUDE) $(CXX_COMMON)\
- 	 -L$(FASTJET3_LIB) -Wl,-rpath,$(FASTJET3_LIB) -lfastjet -lRecursiveTools\
-@@ -128,7 +128,7 @@
- endif
- 
- # FASTJET3 and HEPMC2.
--main81 main82 main83 main84: $$@.cc $(PREFIX_LIB)/libpythia8.a
-+main81 main82 main83 main84: $$@.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- ifeq ($(FASTJET3_USE)$(HEPMC2_USE),truetrue)
- 	$(CXX) $< -o $@ -I$(FASTJET3_INCLUDE) -I$(HEPMC2_INCLUDE) $(CXX_COMMON)\
- 	 -L$(HEPMC2_LIB) -Wl,-rpath,$(HEPMC2_LIB) -lHepMC\
-@@ -139,7 +139,7 @@
- endif
- 
- # ROOT (turn off all warnings for readability).
--main91: $$@.cc $(PREFIX_LIB)/libpythia8.a
-+main91: $$@.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- ifeq ($(ROOT_USE),true)
- 	$(CXX) $< -o $@ -w -I$(ROOT_INCLUDE) $(CXX_COMMON)\
- 	 `$(ROOTBIN)root-config --cflags`\
-@@ -147,7 +147,7 @@
- else
- 	@echo "Error: $@ requires ROOT"
- endif
--main92: $$@.cc $(PREFIX_LIB)/libpythia8.a main92.so
-+main92: $$@.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX) main92.so
- ifeq ($(ROOT_USE),true)
- 	$(CXX) $< main92.so -o $@ -w -I$(ROOT_INCLUDE) $(CXX_COMMON)\
- 	 `$(ROOTBIN)root-config --cflags` -Wl,-rpath,./\
-@@ -155,7 +155,7 @@
- else
- 	@echo "Error: $@ requires ROOT"
- endif
--main92.so: main92Dct.cc $(PREFIX_LIB)/libpythia8.a
-+main92.so: main92Dct.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- 	$(CXX) $< -o $@ -w -I$(ROOT_INCLUDE) $(CXX_SHARED) $(CXX_COMMON)\
- 	 `$(ROOTBIN)root-config --cflags`
- main92Dct.cc: main92.h main92LinkDef.h
-@@ -164,7 +164,7 @@
- 
- # main93 with several dependencies. It is assumed that
- # Rivet and YODA are installed to system path or appended to it.
--main93: $$@.cc $(PREFIX_LIB)/libpythia8.a main93.so
-+main93: $$@.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX) main93.so
- ifeq ($(ROOT_USE),true)
- 	$(CXX) $< main93.so -o $@ -DUSE_ROOT -DUSE_YODA -std=c++11 -w -I$(ROOT_INCLUDE) $(CXX_COMMON)\
- 	 `$(ROOTBIN)root-config --cflags` -Wl,-rpath,./\
-@@ -174,7 +174,7 @@
- 	$(CXX) $< -o $@ -DUSE_YODA -std=c++11 -w $(CXX_COMMON) -lYODA\
- 	 -lHepMC -lRivet  $(GZIP_INC) $(GZIP_FLAGS)
- endif
--main93.so: main93Dct.cc $(PREFIX_LIB)/libpythia8.a
-+main93.so: main93Dct.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- ifeq ($(ROOT_USE),true)
- 	$(CXX) $< -o $@ -w -I$(ROOT_INCLUDE) $(CXX_SHARED) $(CXX_COMMON)\
- 	 `$(ROOTBIN)root-config --cflags`
-@@ -190,11 +190,11 @@
- endif
- 
- # User-written examples for tutorials, without external dependencies.
--mymain% : mymain%.cc $(PREFIX_LIB)/libpythia8.a
-+mymain% : mymain%.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- 	$(CXX) $< -o $@ $(CXX_COMMON) $(GZIP_INC) $(GZIP_FLAGS)
- 
- # Internally used tests, without external dependencies.
--test% : test%.cc $(PREFIX_LIB)/libpythia8.a
-+test% : test%.cc $(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
- 	$(CXX) $< -o $@ $(CXX_COMMON) $(GZIP_INC) $(GZIP_FLAGS)
- 
- # Clean.



More information about the arch-commits mailing list