summaryrefslogtreecommitdiff
path: root/sci-physics/pythia
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-physics/pythia
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-physics/pythia')
-rw-r--r--sci-physics/pythia/Manifest27
-rw-r--r--sci-physics/pythia/files/pythia-8.2.26-run-tests.patch27
-rw-r--r--sci-physics/pythia/files/pythia8209-root-noninteractive.patch17
-rw-r--r--sci-physics/pythia/files/pythia8209-run-tests.patch20
-rw-r--r--sci-physics/pythia/metadata.xml25
-rw-r--r--sci-physics/pythia/pythia-6.4.28-r1.ebuild68
-rw-r--r--sci-physics/pythia/pythia-6.4.28.ebuild67
-rw-r--r--sci-physics/pythia/pythia-8.1.86-r1.ebuild100
-rw-r--r--sci-physics/pythia/pythia-8.1.86.ebuild100
-rw-r--r--sci-physics/pythia/pythia-8.2.10.ebuild183
-rw-r--r--sci-physics/pythia/pythia-8.2.26.ebuild184
11 files changed, 818 insertions, 0 deletions
diff --git a/sci-physics/pythia/Manifest b/sci-physics/pythia/Manifest
new file mode 100644
index 000000000000..88f7f9907c0e
--- /dev/null
+++ b/sci-physics/pythia/Manifest
@@ -0,0 +1,27 @@
+AUX pythia-8.2.26-run-tests.patch 1044 SHA256 2ea7f4a3f4464a6db7414b2919f9ed06a3150b24f01f22760285089ae3350e4d SHA512 37297dbf852b402adc03f9a60ca2f9108d192dc005de1c6dfd9a9725220a50da322267938a91cfe082301942059a9b4caf91a85e41179becee6e9889881c9b57 WHIRLPOOL 5452bef046813a79c14cc68a5cf0339ed82938077185c956c92cae9e5ce20c51cd616be8e21cdb7889ab10d2d62e60e7e223e34af875d4892ff7fecab2fd6c22
+AUX pythia8209-root-noninteractive.patch 500 SHA256 c38c2adc49affd1c795d91592ee6965f813c11a2a9e9c464874496d6978ec8e0 SHA512 9dad44ee084b5edea6560ba639e562c6ddc56cd7170ec21628176aeaec11d535de2813599b9c45b49511ad3d0ad9cb0540d9052179c9e9907d10d81ea55bdea2 WHIRLPOOL 1e30b9ed028dde60c83d73666a618016593240f4e763d14faeb2766419cbcd786ca451ce7a9311cbb2a53952401dc422330a1838b6b696515ee6bcd2e62d1e31
+AUX pythia8209-run-tests.patch 962 SHA256 a720d26670f1de89fc59e10fc6b647e8fa9bd61b7d2fb69c40701d7afcee20be SHA512 e0629ca9016fc77cef78d81ed84d4a54171d7497488e8c1a2b60adef0e32f18a96353e55d9d08789ebc144dee209844f8f7cb8215347c7ed943725fff21921b0 WHIRLPOOL c7454aeae278124356bbe6361a14482ced0967be2a391c2f6b90df7c6093593e3dbbac98e3b28b9a02ab0e90c7f3f631917e75b2d5c4f2e09c8e2a627d529e12
+DIST CT10.tar.gz 10246366 SHA256 bcef4600c5af42d6b151b60e29297609e3604f02f5e80f8ec7767a22b185f49d SHA512 90406bd102ab54b683fa3e6f3fc759febea2454a0b96c6a8d373cdec297f5d652097057a015c7d87241792ed9b5d9ac658a33155cdd7362f59110f8f06ecce73 WHIRLPOOL a433983f9938d848a0b23f94195c41a3caf2a4a131f225f8ec27b43d7ca88761e302ed7968c66492b1fee7288e921aa7a40644833d90eeb66a139a8524553003
+DIST MRST2004qed.tar.gz 185079 SHA256 f043f5385d828523169458c01e2d82767468002789ad792d3543efacc4fcb9cd SHA512 404aacf0e241f572cc42ad4cf963deef1acd3d365fa68cfa3518878f921858046377ea39caf663fdced2cdde07af2f6ce695737f7fea229489df3d3f38283c95 WHIRLPOOL 1eb5a8c5a63005b1087ad5b39faf5ba928071ca1edb3aa9e957b43b0a32a3ddb252b75c5fd30f2e364f628583834febc6ff14984b832f2916ad06a2fcdf0d77d
+DIST MRST2007lomod.tar.gz 56685 SHA256 26533c463c17c96c467d40a0aa5603bbe657f986e05154e90782aac43f34598d SHA512 8e55627a01c85d90a62e4fb11b115c2faac2220479b6d558d3d6f1b801fc5c3e88abc377cd5437ccaeedd34b2ca42d6e833014566b796e5e1eebcf4d620e5dc0 WHIRLPOOL 16dfc110168fb3d865f3e743b4a8ce5e5995496fee53a286e82c647eff5afb7072e9d1ef8c940408c4a8184e5a9f7a190f9deea26e1b7bf227c1e5d6eaa3ff77
+DIST NNPDF23_nlo_as_0119_qed_mc.tar.gz 25223180 SHA256 61e36f3aec29e7b38d161a4ebc4978032e5e1f7af70764f6726cabdbac6283b1 SHA512 fc6998d50a61bbe65eef827021c0f453164795c079daef6a4932f825f8db4ae318bbf0e8781b61f1d3ffa9a495b5c4813af3aa31c77694657a44356d93fa970f WHIRLPOOL 31fe0ba55fac9d032441dc955a2117d42d2ab1cc697567e4b9350c4c1866982036178378a9ddeb5416ef1c2712e54cbba32dac4260fff0de07d7fc8c3a2b339d
+DIST NNPDF23_nnlo_as_0119_qed_mc.tar.gz 28940412 SHA256 4f9598322452856e165ea419ef878bb9b5d8284933cef896b7bc339d1f8ae728 SHA512 5088c30acbd1da4e412ba9f6a997ceaa34f426f41c7ebacaf4d2e8aa49b8b45052913e8d873b293d9f140c01e82c05735b66dd527a9aa124b86f73bf5e4d8c53 WHIRLPOOL 1845bb1dbd7b23389fa45af43517e36abc941d6beb2fc650462e1ef875781d0ab40186ae4f4ddfc0ed6d819be056dd11fd63e2bdf02ae1d9365892476415235c
+DIST cteq66.tar.gz 8647237 SHA256 1e1987c3b844d06bac8c205544ea1613515de2965e7e5565892acf37984a2626 SHA512 25d0fa01dcdb59d71c7092367af8258471a2bc6dfd146766cc79f90ffb0feafa0f2011d0a37a7d75315c10ba7c7a6e3fa583d9c0a28119b072228ac800294e48 WHIRLPOOL a8c34f0242fd6a2986484bf60793604a07ad0356b1fabb6350289afd4655f2eeb1953d0e558440b94ed30a7af4cd5d58d9fc07f3f06a72c3f3381094b8036321
+DIST cteq6l1.tar.gz 317834 SHA256 57c9c99d7b83c8ed1ca70480a0ec7bf2183bfa1bd9276a0e146772c5cf3bb5ac SHA512 7177608e97077eaf45a292db4ea74eb9a28b4b500ab8be02098b4837a5583cd397828abc3bf43ead448926eaa75ae3968bd059ecde333d90ed6e4295cbe1873c WHIRLPOOL cb0fff30e96dbcda1ac76550968bda22872d249d6fe14f31060aef5d1913b314365b933fb2bc57676ac5578f39ed3824cce2cd657086b4a92aa4d6e4ce037239
+DIST lutp0613man2.pdf 2902047 SHA256 03d637310ea80f0d7aea761492bd38452c602890d8cf913a1ec9edacd79fa43d SHA512 a8439b3b150b6f3924d4d3671a4fad6a815c374b1f46060072ca6c1faa797a2f73f8727920aaa7ae885c4f6f135c8d8f94d43e518cfe25271bb95652112def58 WHIRLPOOL dd74046a145264653efdc1f96c330a0aa1e71b72578f32b114d9041c6a50e6e03aa5b3e028ab737afa01d9f3fc9928fa3589238ff4c232e90c8362201792ef99
+DIST pythia-6.4.18-examples.tar.bz2 36366 SHA256 17b1809fb0cffba20115c2bc1032c24d8efece25bd3f1f632f88265ade4dd084 SHA512 ba921379a6df4ca417b60ea5b78af506f13135cdf896fa6beeca9713428ad6f298c94c0fe65fca3e583f8f268dcf84ebe4f1f81b46fd865d5f641f7c1e9fa7e1 WHIRLPOOL 5b53f523d0819400da791d471c207c4d0d6cfd43cbb9423900b593015aa4db68632d97615ffd213493ff0b0306ce7b8c4851e58672e1188df1a61352e1af0d17
+DIST pythia-6.4.28.tar.xz 490248 SHA256 6ca6acc172314cf7b56e2a8e18321d28ce57a511e34210a6c64ebbfd5e06d5f4 SHA512 f9db72658f2132ce08d31c8a9f7fe727466b184ef41cc4b762fe2bde48dbdfd7b5df19b21a869e20a1f107c96e9daec115c980e11592968eb2cad666b7c96bdc WHIRLPOOL d6ab42af092348b1ae5c5078c34ef17042b46f728d6c4068cd0930999ccbfefae9b55be05499188525c9fc6499c8cb8c490fe6a37f04bf9b45048f7cf8026cdb
+DIST pythia6-20160413.tar.gz 567976 SHA256 d613dcb27c905710e2f13a934913cc5545e3e5d0e477e580107385d9ef260056 SHA512 2a9ea2ae299e8d49bd9750f8c68f0b7f534fb91254c2eebc60ef40828400bdf5e5c4e0956d61807e773a51db873ab4a036c3ac264f904d0bb2b85f4860e538d3 WHIRLPOOL ab69aeb8d3591b3b0adcc22ed249047bac99f05daf74801c6d26d04df1ad6807cb4ce66ce8acf54476ea20eb9cdac2b719fc6d9280d546fe4be1d09f55840d01
+DIST pythia6.tar.gz 567451 SHA256 ebc90b8ec94897d8b09030341323d2c7c6e5c7c65077f98b96c8cff00d40a5ce SHA512 baa18023de22c3e90f14d2a5a39efa171905f507a31a90f87c65dca271b3be4c9f0d1a56282f5a04b3efabe0b5b15c964e4569d1f9994a75750e52e0be4360b1 WHIRLPOOL e334779f77e938cde85ecd0fbc2dbf0d86a52fc1ef673c909b8533f779e51d6d6680bc5de3aceeb002015ccfdf03da3f975aaf0cc7a249c462cdd3b206c359a2
+DIST pythia8186.tgz 8921248 SHA256 1c0914fc04801ee922c1ad3b544a3cd48b34d9afa4407ae40afbacd009039bd2 SHA512 84729004abbdf522183c27918ae35db037a8954af761a2b452dcff54f82076b1e3bfc7fe9ea0a7cb2c0b6499aedb1c25cc13768d47b24edaa08d631b55d0b86b WHIRLPOOL ecef83d2cb018b1aac55225850cf2a3a8f2b87d08f99bd9c5881f4fa341f012eeabed3b9a43ffda3699daebc54c181d08aac30c1f6b514e98516c29e88a6fbaf
+DIST pythia8210.tgz 14301345 SHA256 a2564c6011235a286115ba9da065f50c1233229b2f1a824583565dfeec0baa35 SHA512 fe2d02e32fd5d25bcdcc216754b91ca509a189c58f1a06ca8deba975af552586632fc8cf8ad3e62920884ee64c4af596fbe7c6872f5ddbd1f5a0cea4ba4bc90d WHIRLPOOL d2d3f212ed2ad700fa6ae44b2b670cce1623e80382af04072bee884a72ea269346c10728cc77cfa4c9377e8cd775febe9488427cb0b890e52c651efebd66f60c
+DIST pythia8226.tgz 17639842 SHA256 8ff4281bce9d22b17f1ec88e9e9353e8172512d5ef96296ace9486860e9ed2c9 SHA512 85db807264f99c27dd87ad0572b98f4ac8d37fed818c3dd1ac89f0ac124ae0a5ee13b290727e515cb04269a6e0be8b386d954bed62309f26d1e60b431f952ca0 WHIRLPOOL 6e020ec815b4d0b9649ebf2f9a149fc4680ba804568625e854005fa8ccdd3bbabde79df78da4f1ffaa1710df4809a17b4b8e745bcd909e9e914f05500d061472
+EBUILD pythia-6.4.28-r1.ebuild 1908 SHA256 1b90c96d8afe8e34591d82fd18b01a35c1d177e78d04bb442cf6c77d3f8958a9 SHA512 dcbf3226adf25fb2c738f0825cd70aef70d3c1d77d123bb765db2f9666b7fe23e06f469ed2ee285dd1a315731ddc7a90d798e53b88723b72586a0dfe11ad7863 WHIRLPOOL c3195e173dddc0ea189d53ddb74c028bae0f27325f431e3e03764d7fa29f88a35b986629259886a4003244c642caa70cf413c127ae5bba7dd2683ab0e29c5c82
+EBUILD pythia-6.4.28.ebuild 1864 SHA256 8d8ed0bd27789648c8f5db52f9876ceb8f4b326d966d1ee055a23d397292c60f SHA512 9e3fa32d791672b3aec15f779700fd33a6a83488ca315e365e3fdc7eb88ee3a8405dffcc6eda705d3334c79e8a726c1130ba97b2baf0d91004c881b1e922a2af WHIRLPOOL 5e546aa26c93d282c30e5eb696a78ff19bf3cedaf4c4b4e642592bd9f5d9f9431346890aeeffb84b7aa84d80fe57a179f9ebd76045e221f6458cd4fe5cfed4a0
+EBUILD pythia-8.1.86-r1.ebuild 2618 SHA256 3e0da89cdfafd7b83785064c6ef699270377dfe32fc1fdcf3a558fe77fed626b SHA512 0b07f2d9d85cc46a04cd79d9363bb044f80494c20ace27411d9593d4847932c79453129a158fc20ddf616f63a0965be165c1e68c61994919f0fb17e13a14af1c WHIRLPOOL 0caf70264889395cafbfc99fd2178ea279037c9d06347593a7b6ecdf95942bcb6c02bf4402eaac6e137dcf76842a505fc88a8cca860f88c2d9f36a04e2bc8b03
+EBUILD pythia-8.1.86.ebuild 2573 SHA256 e9fb92f26097fa230e1c112d2193229e212e81bbdae6a3bef02c7d3eea95d789 SHA512 e1682daf71c734fd97a0d957975856158e3ba4c674a804be6ee9e1dedf4b03fb3f5b2639a39a2ae37bbef96d980efe1ce57b9d6dc89e2635c6a720df75b9a5f5 WHIRLPOOL edd093d1eec6b22f01c4cc09ce1f40c6ccdc28a2807cf7748f81e7a6cb2c624c3a72e02f0403dbe370dc24803f5849fb4f2ff09d842a700ae804e38e3eaf1f4e
+EBUILD pythia-8.2.10.ebuild 5797 SHA256 55101f279291705835f2105808543e4515c79f8d2de3713020d0705168ae67e2 SHA512 51c097f3449f1224eec5691fa5d64ab23d8d29d6473f350578683dbe49e0edc0c6020615c28bdcd01d110984838a7dbe2e6c09312fed7d430ee5f7ab1805dd14 WHIRLPOOL 9002ceb788fc1322495a0ec0b1658d552aa68cfcfb1c6bfb1a062b1471dee670cbdc2c73ac0153f1040900e6999faf6a90154202c13ab404a4afcd132125acbc
+EBUILD pythia-8.2.26.ebuild 5823 SHA256 ac510983cb09725afe2e3c900d74b7551be21dabe5372fd65c02529d62bc470e SHA512 85988101cfee5d378a4024c1da7206ac57297972ed506d5bf968bc9ede0f1b1dd1d6990d6f605c10f43b39113ae98aba32fc1c84198794fc12c061127bae6fc1 WHIRLPOOL a92d9e0a708590bccd136e2f0275dbf87d439af075221dbe16c639563200a5719ef5bae7089fdff8fa21c207d87d86cd431eb716530dc48c86b154baa4e748c1
+MISC ChangeLog 3142 SHA256 f6b496654a55b4b6f7a1ea59688912f27e4b3bdbc986bb25625a3bdb1a02496e SHA512 21ccfb65798ffead4532fa46faa4130d902498f3a0cf72f6bb0b15c5c5b9f0e77d8dc9e6da46431473b9e667414e8b18f3b7296643da4056eb6d530d5906fb75 WHIRLPOOL fa9d175dd816fb98f722a41ed09d7c1361040274be1084d299cf84ff5671ae4d98e7c56bfa70491107efaa47e8fa6cda2098030accffffcafebb30c171bc7ceb
+MISC ChangeLog-2015 9682 SHA256 5ed2e9a82e9604471d44f36747aceb031c330451eba55f91cc66c33fd6f4074d SHA512 0fdbdd098f837dd47b298c814166aca76ba0086d9c34b8e6fd4880aa236e9511ae31c893971bd2d2592e13b30806404c2dcee95416c97da661de3ee78ad4e2f9 WHIRLPOOL 7231aad59148ddf01b180eafd4b291c97516bcc2e2e118232be9c91cac57e6a8805d3e7059eafab508f58bcf3623491a8ee3e79d160c66c3e7bde739333ebf1e
+MISC metadata.xml 1298 SHA256 d286eff10cc261968fe26a6c2785f05dc39d2e262aff1ab09849b29414d28b7f SHA512 b991381193c62d05d01ea82c74a2fabe3968683b4a1e0914027768dbbc3d2b52a85584b77b1b7274e77222e10da0aaa1a55d3982b423bc7c2b5deb4d775e6389 WHIRLPOOL 57a6cb583f22f2d4a01135664f82c74411f57cb2cecf58d93f5b3043fb0b80b8630c1e692173422e6ee2745efa3f63732db5d3c446bd0e07e46e498e3d21e8f8
diff --git a/sci-physics/pythia/files/pythia-8.2.26-run-tests.patch b/sci-physics/pythia/files/pythia-8.2.26-run-tests.patch
new file mode 100644
index 000000000000..34c7179fa55d
--- /dev/null
+++ b/sci-physics/pythia/files/pythia-8.2.26-run-tests.patch
@@ -0,0 +1,27 @@
+--- examples/Makefile.orig 2017-07-25 11:56:03.545393093 +0200
++++ examples/Makefile 2017-07-25 11:56:37.468572887 +0200
+@@ -158,6 +158,7 @@
+ rm -f $(LOCAL_EXAMPLE)/weakbosons.lhe
+ rm -f $(LOCAL_EXAMPLE)/Pythia8.promc
+ rm -f $(LOCAL_EXAMPLE)/hist.root
++ rm main*out *.dat
+
+ # Clean all temporary and generated files.
+ distclean: clean
+@@ -168,3 +169,16 @@
+ rm -f $(LOCAL_SHARE)/COPYING
+ rm -f $(LOCAL_SHARE)/GUIDELINES
+ rm -f $(LOCAL_SHARE)/README
++
++# Run tests, inject test-specific arguments when needed
++main%.out: main%
++ ./$< \
++ $(if $(findstring $*,16 42 43 $(shell seq 81 89)), main$*.cmnd) \
++ $(if $(findstring $*, $(shell seq 81 83)), w+_production_lhc_0.lhe) \
++ $(if $(findstring $*, 84), hepmcout84.dat 2 w+_production_lhc) \
++ $(if $(findstring $*, $(shell seq 85 88)), w_production) \
++ $(if $(findstring $*, 42 43 $(shell seq 81 89)), histout$*.dat) \
++ > $@
++
++main89.out: main89
++ $(foreach cmd, $(wildcard main89*.cmnd), ./$< $(cmd) histout-$(cmd).dat >> $@ || exit;)
diff --git a/sci-physics/pythia/files/pythia8209-root-noninteractive.patch b/sci-physics/pythia/files/pythia8209-root-noninteractive.patch
new file mode 100644
index 000000000000..4581eaea389b
--- /dev/null
+++ b/sci-physics/pythia/files/pythia8209-root-noninteractive.patch
@@ -0,0 +1,17 @@
+--- pythia8209/examples/main91.cc.orig 2015-06-05 07:44:27.000000000 +0300
++++ pythia8209/examples/main91.cc 2015-06-05 08:17:22.477228166 +0300
+@@ -62,13 +62,9 @@
+ // Statistics on event generation.
+ pythia.stat();
+
+- // Show histogram. Possibility to close it.
+- mult->Draw();
+- std::cout << "\nDouble click on the histogram window to quit.\n";
+- gPad->WaitPrimitive();
+-
+ // Save histogram on file and close file.
+ mult->Write();
++ outFile->Close();
+ delete outFile;
+
+ // Done.
diff --git a/sci-physics/pythia/files/pythia8209-run-tests.patch b/sci-physics/pythia/files/pythia8209-run-tests.patch
new file mode 100644
index 000000000000..d1edc8393726
--- /dev/null
+++ b/sci-physics/pythia/files/pythia8209-run-tests.patch
@@ -0,0 +1,20 @@
+--- pythia8209/examples/Makefile.orig 2015-06-04 22:21:53.000000000 +0300
++++ pythia8209/examples/Makefile 2015-06-05 05:35:25.324262331 +0300
+@@ -139,3 +139,17 @@
+ rm -f test[0-9][0-9][0-9]; rm -f out[0-9][0-9][0-9];\
+ rm -f weakbosons.lhe; rm -f Pythia8.promc; rm -f hist.root;\
+ rm -f *~; rm -f \#*; rm -f core*; rm -f *Dct.*
++ rm -f main*out *.dat
++
++# Run tests, inject test-specific arguments when needed
++main%.out: main%
++ ./$< \
++ $(if $(findstring $*,16 42 43 $(shell seq 81 89)), main$*.cmnd) \
++ $(if $(findstring $*, $(shell seq 81 83)), w+_production_lhc_0.lhe) \
++ $(if $(findstring $*, 84), hepmcout84.dat 2 w+_production_lhc) \
++ $(if $(findstring $*, $(shell seq 85 88)), w_production) \
++ $(if $(findstring $*, 42 43 $(shell seq 81 89)), histout$*.dat) \
++ > $@
++
++main89.out: main89
++ $(foreach cmd, $(wildcard main89*.cmnd), ./$< $(cmd) histout-$(cmd).dat >> $@ || exit;)
diff --git a/sci-physics/pythia/metadata.xml b/sci-physics/pythia/metadata.xml
new file mode 100644
index 000000000000..aaef5640ca63
--- /dev/null
+++ b/sci-physics/pythia/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ PYTHIA is a program for the generation of high-energy physics
+ events, i.e. for the description of collisions at high energies
+ between elementary particles such as e+, e-, p and pbar in various
+ combinations. It contains theory and models for a number of physics
+ aspects, including hard and soft interactions, parton distributions,
+ initial- and final-state parton showers, multiple interactions,
+ fragmentation and decay. It is largely based on original research,
+ but also borrows many formulae and other knowledge from the
+ literature.
+</longdescription>
+ <use>
+ <flag name="fastjet">Build jets using the <pkg>sci-physics/fastjet</pkg> package</flag>
+ <flag name="hepmc">Adds support for High Energy Physics Monte Carlo Generators <pkg>sci-physics/hepmc</pkg></flag>
+ <flag name="lhapdf">Support the use of external PDF sets via <pkg>sci-physics/lhapdf</pkg></flag>
+ <flag name="root">Use <pkg>sci-physics/root</pkg> trees and histograms (in examples only)</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-physics/pythia/pythia-6.4.28-r1.ebuild b/sci-physics/pythia/pythia-6.4.28-r1.ebuild
new file mode 100644
index 000000000000..92d4af7849ac
--- /dev/null
+++ b/sci-physics/pythia/pythia-6.4.28-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools fortran-2 versionator
+
+MV=$(get_major_version)
+MY_PN=${PN}${MV}
+DOC_PV=0613
+EX_PV=6.4.18
+PYR_P=pythia6-20160413
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia6.hepforge.org/"
+
+# pythia6 from root is needed for some files to interface pythia6 with root.
+# To produce a split version, replace the 6.4.x by the current version:
+# svn export http://svn.hepforge.org/pythia6/tags/v_6_4_x/ pythia-6.4.x
+# tar cJf pythia-6.4.x.tar.xz
+SRC_URI="
+ https://dev.gentoo.org/~bicatali/distfiles/${P}.tar.xz
+ https://root.cern.ch/download/pythia6.tar.gz -> ${PYR_P}.tar.gz
+ doc? ( http://home.thep.lu.se/~torbjorn/pythia/lutp${DOC_PV}man2.pdf )
+ examples? ( mirror://gentoo/${PN}-${EX_PV}-examples.tar.bz2 )"
+
+SLOT="6"
+LICENSE="public-domain"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples static-libs"
+
+src_prepare() {
+ cp ../pythia6/tpythia6_called_from_cc.F .
+ cp ../pythia6/pythia6_common_address.c .
+ cat > configure.ac <<-EOF
+ AC_INIT(${PN},${PV})
+ AM_INIT_AUTOMAKE
+ AC_PROG_F77
+ LT_INIT
+ AC_CHECK_LIB(m,sqrt)
+ AC_CONFIG_FILES(Makefile)
+ AC_OUTPUT
+ EOF
+ echo >> Makefile.am "lib_LTLIBRARIES = libpythia6.la"
+ echo >> Makefile.am "libpythia6_la_SOURCES = \ "
+ # replace wildcard from makefile to ls in shell
+ local f
+ for f in py*.f struct*.f up*.f fh*.f; do
+ echo >> Makefile.am " ${f} \\"
+ done
+ echo >> Makefile.am " ssmssm.f sugra.f visaje.f pdfset.f \\"
+ echo >> Makefile.am " tpythia6_called_from_cc.F pythia6_common_address.c"
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ dodoc update_notes.txt
+ use doc && dodoc "${DISTDIR}"/lutp${DOC_PV}man2.pdf
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r "${WORKDIR}"/examples
+ fi
+}
diff --git a/sci-physics/pythia/pythia-6.4.28.ebuild b/sci-physics/pythia/pythia-6.4.28.ebuild
new file mode 100644
index 000000000000..af2b9cbbb1be
--- /dev/null
+++ b/sci-physics/pythia/pythia-6.4.28.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools fortran-2 versionator
+
+MV=$(get_major_version)
+MY_PN=${PN}${MV}
+DOC_PV=0613
+EX_PV=6.4.18
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia6.hepforge.org/"
+
+# pythia6 from root is needed for some files to interface pythia6 with root.
+# To produce a split version, replace the 6.4.x by the current version:
+# svn export http://svn.hepforge.org/pythia6/tags/v_6_4_x/ pythia-6.4.x
+# tar cJf pythia-6.4.x.tar.xz
+SRC_URI="
+ https://dev.gentoo.org/~bicatali/distfiles/${P}.tar.xz
+ https://root.cern.ch/download/pythia6.tar.gz
+ doc? ( http://home.thep.lu.se/~torbjorn/pythia/lutp${DOC_PV}man2.pdf )
+ examples? ( mirror://gentoo/${PN}-${EX_PV}-examples.tar.bz2 )"
+
+SLOT="6"
+LICENSE="public-domain"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples static-libs"
+
+src_prepare() {
+ cp ../pythia6/tpythia6_called_from_cc.F .
+ cp ../pythia6/pythia6_common_address.c .
+ cat > configure.ac <<-EOF
+ AC_INIT(${PN},${PV})
+ AM_INIT_AUTOMAKE
+ AC_PROG_F77
+ LT_INIT
+ AC_CHECK_LIB(m,sqrt)
+ AC_CONFIG_FILES(Makefile)
+ AC_OUTPUT
+ EOF
+ echo >> Makefile.am "lib_LTLIBRARIES = libpythia6.la"
+ echo >> Makefile.am "libpythia6_la_SOURCES = \ "
+ # replace wildcard from makefile to ls in shell
+ local f
+ for f in py*.f struct*.f up*.f fh*.f; do
+ echo >> Makefile.am " ${f} \\"
+ done
+ echo >> Makefile.am " ssmssm.f sugra.f visaje.f pdfset.f \\"
+ echo >> Makefile.am " tpythia6_called_from_cc.F pythia6_common_address.c"
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ dodoc update_notes.txt
+ use doc && dodoc "${DISTDIR}"/lutp${DOC_PV}man2.pdf
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r "${WORKDIR}"/examples
+ fi
+}
diff --git a/sci-physics/pythia/pythia-8.1.86-r1.ebuild b/sci-physics/pythia/pythia-8.1.86-r1.ebuild
new file mode 100644
index 000000000000..60aca11c2471
--- /dev/null
+++ b/sci-physics/pythia/pythia-8.1.86-r1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils versionator toolchain-funcs multilib
+
+MV=$(get_major_version)
+MY_P=${PN}$(replace_all_version_separators "" ${PV})
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia8.hepforge.org/"
+SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz"
+
+SLOT="8"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gzip +hepmc static-libs"
+
+DEPEND="
+ gzip? ( dev-libs/boost sys-libs/zlib )
+ hepmc? ( sci-physics/hepmc:0= )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ PYTHIADIR="${EPREFIX}/usr/share/pythia8"
+ # set datadir for xmldor in include file
+ sed -i \
+ -e "s:../xmldoc:${PYTHIADIR}/xmldoc:" \
+ include/Pythia8/Pythia.h || die
+ # respect libdir, prefix, flags
+ sed -i \
+ -e "s:/lib:/$(get_libdir):g" \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e "s:-O2::g" \
+ configure || die
+ sed -i \
+ -e "s:LIBDIR=.*:LIBDIR=$(get_libdir):" \
+ -e "s:LIBDIRARCH=.*:LIBDIRARCH=$(get_libdir):" \
+ -e "s:cp -r lib:cp -r $(get_libdir):" \
+ -e '/ln -fs/d' \
+ Makefile examples/Makefile || die
+}
+
+src_configure() {
+ export USRCXXFLAGS="${CXXFLAGS}"
+ export USRLDFLAGSSHARED="${LDFLAGS}"
+ tc-export CC CXX
+ # homemade configure script
+ ./configure \
+ --installdir="${EPREFIX}/usr" \
+ --datadir="${PYTHIADIR}" \
+ --enable-shared \
+ $(usex gzip "--enable-gzip=yes" "") \
+ $(usex hepmc "--with-hepmcversion=2 --with-hepmc=${EPREFIX}/usr" "") \
+ || die
+ if ! use static-libs; then
+ sed -i \
+ -e '/targets.*=$(LIBDIR.*\.a$/d' \
+ -e 's/+=\(.*libpythia8\.\)/=\1/' \
+ Makefile || die
+ sed -i \
+ -e 's:\.a:\.so:g' \
+ -e 's:$(LIBDIRARCH):$(LIBDIR):g' \
+ examples/Makefile || die
+ fi
+}
+
+src_test() {
+ cd examples || die
+ # use emake for parallel instead of long runmains
+ local tests="$(echo main0{1..8})" t
+ use hepmc && tests="${tests} main31"
+ emake ${tests}
+ for t in ${tests}; do
+ LD_LIBRARY_PATH="${S}/$(get_libdir):${LD_LIBRARY_PATH}" \
+ bin/${t}.exe > ${t}.out || die "test ${t} failed"
+ done
+ emake clean && rm main*out
+}
+
+src_install() {
+ emake INSTALLDIR="${ED}/usr" DATADIR="${D}/${PYTHIADIR}" install
+ rm -r "${D}"/${PYTHIADIR}/{html,php}doc || die
+ echo "PYTHIA8DATA=${PYTHIADIR}/xmldoc" >> 99pythia8
+ doenvd 99pythia8
+
+ dodoc GUIDELINES AUTHORS README
+ if use doc; then
+ dodoc worksheet.pdf htmldoc/pythia8100.pdf
+ dohtml -r htmldoc/*
+ fi
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples rootexamples
+ docompress -x /usr/share/doc/${PF}/{root,}examples
+ fi
+}
diff --git a/sci-physics/pythia/pythia-8.1.86.ebuild b/sci-physics/pythia/pythia-8.1.86.ebuild
new file mode 100644
index 000000000000..b7a47e6657ba
--- /dev/null
+++ b/sci-physics/pythia/pythia-8.1.86.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils versionator toolchain-funcs multilib
+
+MV=$(get_major_version)
+MY_P=${PN}$(replace_all_version_separators "" ${PV})
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia8.hepforge.org/"
+SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz"
+
+SLOT="8"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gzip +hepmc static-libs"
+
+DEPEND="
+ gzip? ( dev-libs/boost sys-libs/zlib )
+ hepmc? ( sci-physics/hepmc:0= )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ PYTHIADIR="${EPREFIX}/usr/share/pythia8"
+ # set datadir for xmldor in include file
+ sed -i \
+ -e "s:../xmldoc:${PYTHIADIR}/xmldoc:" \
+ include/Pythia8/Pythia.h || die
+ # respect libdir, prefix, flags
+ sed -i \
+ -e "s:/lib:/$(get_libdir):g" \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e "s:-O2::g" \
+ configure || die
+ sed -i \
+ -e "s:LIBDIR=.*:LIBDIR=$(get_libdir):" \
+ -e "s:LIBDIRARCH=.*:LIBDIRARCH=$(get_libdir):" \
+ -e "s:cp -r lib:cp -r $(get_libdir):" \
+ -e '/ln -fs/d' \
+ Makefile examples/Makefile || die
+}
+
+src_configure() {
+ export USRCXXFLAGS="${CXXFLAGS}"
+ export USRLDFLAGSSHARED="${LDFLAGS}"
+ tc-export CC CXX
+ # homemade configure script
+ ./configure \
+ --installdir="${EPREFIX}/usr" \
+ --datadir="${PYTHIADIR}" \
+ --enable-shared \
+ $(usex gzip "--enable-gzip=yes" "") \
+ $(usex hepmc "--with-hepmcversion=2 --with-hepmc=${EPREFIX}/usr" "") \
+ || die
+ if ! use static-libs; then
+ sed -i \
+ -e '/targets.*=$(LIBDIR.*\.a$/d' \
+ -e 's/+=\(.*libpythia8\.\)/=\1/' \
+ Makefile || die
+ sed -i \
+ -e 's:\.a:\.so:g' \
+ -e 's:$(LIBDIRARCH):$(LIBDIR):g' \
+ examples/Makefile || die
+ fi
+}
+
+src_test() {
+ cd examples || die
+ # use emake for parallel instead of long runmains
+ local tests="$(echo main0{1..8})" t
+ use hepmc && tests="${tests} main31"
+ emake ${tests}
+ for t in ${tests}; do
+ LD_LIBRARY_PATH="${S}/$(get_libdir):${LD_LIBRARY_PATH}" \
+ bin/${t}.exe > ${t}.out || die "test ${t} failed"
+ done
+ emake clean && rm main*out
+}
+
+src_install() {
+ emake INSTALLDIR="${ED}/usr" DATADIR="${D}/${PYTHIADIR}" install
+ rm -r "${D}"/${PYTHIADIR}/{html,php}doc || die
+ echo "PYTHIA8DATA=${PYTHIADIR}/xmldoc" >> 99pythia8
+ doenvd 99pythia8
+
+ dodoc GUIDELINES AUTHORS README
+ if use doc; then
+ dodoc worksheet.pdf
+ dohtml -r htmldoc/*
+ fi
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/sci-physics/pythia/pythia-8.2.10.ebuild b/sci-physics/pythia/pythia-8.2.10.ebuild
new file mode 100644
index 000000000000..84240a7e7d52
--- /dev/null
+++ b/sci-physics/pythia/pythia-8.2.10.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs versionator
+
+MV=$(get_major_version)
+MY_P=${PN}$(replace_all_version_separators "" ${PV})
+LHA_VER="6.1"
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia8.hepforge.org/"
+SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz
+ test? ( lhapdf? (
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/CT10.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/MRST2007lomod.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nlo_as_0119_qed_mc.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nnlo_as_0119_qed_mc.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq66.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq6l1.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/unvalidated/MRST2004qed.tar.gz
+ ) )"
+
+SLOT="8"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gzip +hepmc fastjet lhapdf root static-libs test"
+
+RDEPEND="
+ fastjet? ( >=sci-physics/fastjet-3 )
+ gzip? ( sys-libs/zlib )
+ hepmc? ( sci-physics/hepmc:0= )
+ lhapdf? ( >=sci-physics/lhapdf-6:= )
+"
+# ROOT is used only when building related tests
+DEPEND="${RDEPEND}
+ test? ( root? ( sci-physics/root:= ) )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_pretend() {
+ if use root && ! use test; then
+ ewarn "ROOT support will only affect examples code build during test stage."
+ ewarn "Since you have tests disabled, this is a no-op."
+ fi
+}
+
+src_prepare() {
+ PYTHIADIR="/usr/share/pythia8"
+ EPYTHIADIR="${EPREFIX}${PYTHIADIR}"
+ # set datadir for xmldor in include file
+ sed -i \
+ -e "s:../share/Pythia8/xmldoc:${EPYTHIADIR}/xmldoc:" \
+ include/Pythia8/Pythia.h || die
+ # respect libdir, prefix, flags
+ sed -i \
+ -e "s:/lib:/$(get_libdir):g" \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e "s:-O2:${CXXFLAGS}:g" \
+ -e "s:Cint:Core:g" \
+ configure || die
+ sed -i 's:$(CXX) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED):$(CXX) $(LDFLAGS) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED):g' \
+ Makefile || die
+ sed -i 's:$(CXX):$(CXX) $(LDFLAGS):' examples/Makefile || die
+ # we use lhapdf6 instead of lhapdf5
+ # some PDFs changed, use something similar
+ sed -i \
+ -e "s:LHAPDF5:LHAPDF6:g" \
+ -e "s:\.LHgrid::g" \
+ -e "s:\.LHpdf::g" \
+ -e "s:MRST2001lo:MRST2007lomod:g" \
+ -e "s:cteq6ll:cteq6l1:g" \
+ -e "s:cteq6m:cteq66:g" \
+ examples/*.{cc,cmnd} || die
+ # After lhapdf5->6 migration PDFs are identical within ~1/1000
+ # https://www.hepforge.org/archive/lhapdf/pdfsets/6.1/README
+ sed -i \
+ -e "s:1e-8:3e-1:g" \
+ -e "s:nlo_as_0119_qed:nlo_as_0119_qed_mc:g" \
+ -e "s:xmldoc:share/Pythia8/xmldoc:g" \
+ examples/main54.cc || die
+ # ask cflags from root
+ sed -i "s:root-config:root-config --cflags:g" examples/Makefile || die
+ if ! use static-libs; then
+ sed -i \
+ -e '/TARGETS=$(LOCAL_LIB)\/libpythia8\.a/d' \
+ -e 's:libpythia8\.a$:libpythia8\.so$:g' \
+ Makefile || die
+ sed -i 's:libpythia8\.a:libpythia8\.so:g' \
+ examples/Makefile || die
+ fi
+
+ epatch "${FILESDIR}/${PN}8209-run-tests.patch"
+ epatch "${FILESDIR}/${PN}8209-root-noninteractive.patch"
+}
+
+# TODO: the following optional packages are out of Gentoo tree:
+# - EvtGen http://atlas-computing.web.cern.ch/atlas-computing/links/externalDirectory/EvtGen/
+# - PowHEG http://powhegbox.mib.infn.it/
+# - ProMC https://github.com/Argonne-National-Laboratory/ProMC/
+src_configure() {
+ # homemade configure script
+ ./configure \
+ --arch=Linux \
+ --cxx=$(tc-getCXX) \
+ --enable-shared \
+ --prefix="${EPREFIX}/usr" \
+ --prefix-lib="$(get_libdir)" \
+ --prefix-share="${EPYTHIADIR}" \
+ $(usex fastjet "--with-fastjet3" "") \
+ $(usex gzip "--with-gzip" "") \
+ $(usex hepmc "--with-hepmc2" "") \
+ $(usex lhapdf "--with-lhapdf6
+ --with-lhapdf6-plugin=LHAPDF6.h
+ --with-lhapdf6-lib=${EPREFIX}/usr/$(get_libdir)" "") \
+ $(usex root "--with-root
+ --with-root-include=${EPREFIX}/usr/include/root
+ --with-root-lib=${EPREFIX}/usr/$(get_libdir)/root" "") \
+ || die
+
+ # fix pythia config script
+ sed -i \
+ -e 's:pythia8/examples/Makefile.inc:pythia8/Makefile.inc:' \
+ -e 's:LINE%=:LINE%%=:' \
+ bin/pythia8-config || die
+}
+
+src_test() {
+ cd examples || die
+
+ local tests="$(echo main{{01..32},37,38,61,62,73,80}.out)"
+ use hepmc && tests+=" $(echo main{41,42,85,86}.out)"
+ use hepmc && use lhapdf && tests+=" $(echo main{43,{87..89}}.out)"
+ use lhapdf && tests+=" $(echo main{51..54}.out)"
+ use fastjet && tests+=" $(echo main{71,72}.out)"
+ use fastjet && use hepmc && use lhapdf && tests+=" $(echo main{81..84}).out"
+ use root && tests+=" main91.out"
+ # Disabled tests:
+ # 33 needs PowHEG
+ # 46 needs ProMC
+ # 48 needs EvtGen
+ # 92 generated ROOT dictionary is badly broken
+
+ # use emake for parallel instead of long runmains
+ LD_LIBRARY_PATH="${S}/$(get_libdir):${LD_LIBRARY_PATH}" \
+ PYTHIA8DATA="../share/Pythia8/xmldoc/" \
+ LHAPDF_DATA_PATH="${WORKDIR}" \
+ emake ${tests}
+ emake clean
+}
+
+src_install() {
+ # make install is too broken, much easier to install manually
+ dobin bin/pythia8-config
+ doheader -r include/*
+ dolib lib/*
+ insinto "${PYTHIADIR}"
+ doins -r share/Pythia8/xmldoc examples/Makefile.inc
+
+ echo "PYTHIA8DATA=${EPYTHIADIR}/xmldoc" >> 99pythia8
+ doenvd 99pythia8
+
+ dodoc AUTHORS GUIDELINES README
+ if use doc; then
+ dodoc share/Pythia8/pdfdoc/*
+ dohtml -r share/Pythia8/htmldoc/*
+ fi
+ if use examples; then
+ # reuse system Makefile.inc
+ rm examples/Makefile.inc || die
+ sed -i "s:include Makefile.inc:include ${EPYTHIADIR}:" \
+ examples/Makefile || die
+
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ # cleanup
+ unset PYTHIADIR EPYTHIADIR
+}
diff --git a/sci-physics/pythia/pythia-8.2.26.ebuild b/sci-physics/pythia/pythia-8.2.26.ebuild
new file mode 100644
index 000000000000..2851fad340e6
--- /dev/null
+++ b/sci-physics/pythia/pythia-8.2.26.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib toolchain-funcs versionator
+
+MV=$(get_major_version)
+MY_P=${PN}$(replace_all_version_separators "" ${PV})
+LHA_VER="6.1"
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia8.hepforge.org/"
+SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz
+ test? ( lhapdf? (
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/CT10.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/MRST2007lomod.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nlo_as_0119_qed_mc.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nnlo_as_0119_qed_mc.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq66.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq6l1.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/unvalidated/MRST2004qed.tar.gz
+ ) )"
+
+SLOT="8"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gzip +hepmc fastjet lhapdf root static-libs test"
+
+RDEPEND="
+ fastjet? ( >=sci-physics/fastjet-3 )
+ gzip? ( sys-libs/zlib )
+ hepmc? ( sci-physics/hepmc:0= )
+ lhapdf? ( >=sci-physics/lhapdf-6:= )
+"
+# ROOT is used only when building related tests
+DEPEND="${RDEPEND}
+ test? ( root? ( sci-physics/root:= ) )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_pretend() {
+ if use root && ! use test; then
+ ewarn "ROOT support will only affect examples code build during test stage."
+ ewarn "Since you have tests disabled, this is a no-op."
+ fi
+}
+
+src_prepare() {
+ PYTHIADIR="/usr/share/pythia8"
+ EPYTHIADIR="${EPREFIX}${PYTHIADIR}"
+ # set datadir for xmldor in include file
+ sed -i \
+ -e "s:../share/Pythia8/xmldoc:${EPYTHIADIR}/xmldoc:" \
+ include/Pythia8/Pythia.h || die
+ # respect libdir, prefix, flags
+ sed -i \
+ -e "s:/lib:/$(get_libdir):g" \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e "s:-O2:${CXXFLAGS}:g" \
+ -e "s:Cint:Core:g" \
+ configure || die
+ sed -i 's:$(CXX) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED):$(CXX) $(LDFLAGS) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED):g' \
+ Makefile || die
+ sed -i 's:$(CXX):$(CXX) $(LDFLAGS):' examples/Makefile || die
+ # we use lhapdf6 instead of lhapdf5
+ # some PDFs changed, use something similar
+ sed -i \
+ -e "s:LHAPDF5:LHAPDF6:g" \
+ -e "s:\.LHgrid::g" \
+ -e "s:\.LHpdf::g" \
+ -e "s:MRST2001lo:MRST2007lomod:g" \
+ -e "s:cteq6ll:cteq6l1:g" \
+ -e "s:cteq6m:cteq66:g" \
+ examples/*.{cc,cmnd} || die
+ # After lhapdf5->6 migration PDFs are identical within ~1/1000
+ # https://www.hepforge.org/archive/lhapdf/pdfsets/6.1/README
+ sed -i \
+ -e "s:1e-8:3e-1:g" \
+ -e "s:nlo_as_0119_qed:nlo_as_0119_qed_mc:g" \
+ -e "s:xmldoc:share/Pythia8/xmldoc:g" \
+ examples/main54.cc || die
+ # ask cflags from root
+ sed -i "s:root-config:root-config --cflags:g" examples/Makefile || die
+ if ! use static-libs; then
+ sed -i \
+ -e '/TARGETS=$(LOCAL_LIB)\/libpythia8\.a/d' \
+ -e 's:libpythia8\.a$:libpythia8$(LIB_SUFFIX):g' \
+ Makefile || die
+ sed -i 's:libpythia8\.a:libpythia8$(LIB_SUFFIX):g' \
+ examples/Makefile || die
+ fi
+
+ eapply "${FILESDIR}/${PF}-run-tests.patch"
+ eapply "${FILESDIR}/${PN}8209-root-noninteractive.patch"
+ eapply_user
+}
+
+# TODO: the following optional packages are out of Gentoo tree:
+# - EvtGen http://atlas-computing.web.cern.ch/atlas-computing/links/externalDirectory/EvtGen/
+# - PowHEG http://powhegbox.mib.infn.it/
+# - ProMC https://github.com/Argonne-National-Laboratory/ProMC/
+src_configure() {
+ # homemade configure script
+ ./configure \
+ --arch=Linux \
+ --cxx=$(tc-getCXX) \
+ --enable-shared \
+ --prefix="${EPREFIX}/usr" \
+ --prefix-lib="$(get_libdir)" \
+ --prefix-share="${EPYTHIADIR}" \
+ $(usex fastjet "--with-fastjet3" "") \
+ $(usex gzip "--with-gzip" "") \
+ $(usex hepmc "--with-hepmc2" "") \
+ $(usex lhapdf "--with-lhapdf6
+ --with-lhapdf6-plugin=LHAPDF6.h
+ --with-lhapdf6-lib=${EPREFIX}/usr/$(get_libdir)" "") \
+ $(usex root "--with-root
+ --with-root-include=${EPREFIX}/usr/include/root
+ --with-root-lib=${EPREFIX}/usr/$(get_libdir)/root" "") \
+ || die
+
+ # fix pythia config script
+ sed -i \
+ -e 's:pythia8/examples/Makefile.inc:pythia8/Makefile.inc:' \
+ -e 's:LINE%=:LINE%%=:' \
+ bin/pythia8-config || die
+}
+
+src_test() {
+ cd examples || die
+
+ local tests="$(echo main{{01..32},37,38,61,62,73,80}.out)"
+ use hepmc && tests+=" $(echo main{41,42,85,86}.out)"
+ use hepmc && use lhapdf && tests+=" $(echo main{43,{87..89}}.out)"
+ use lhapdf && tests+=" $(echo main{51..54}.out)"
+ use fastjet && tests+=" $(echo main{71,72}.out)"
+ use fastjet && use hepmc && use lhapdf && tests+=" $(echo main{81..84}).out"
+ use root && tests+=" main91.out"
+ # Disabled tests:
+ # 33 needs PowHEG
+ # 46 needs ProMC
+ # 48 needs EvtGen
+ # 92 generated ROOT dictionary is badly broken
+
+ # use emake for parallel instead of long runmains
+ LD_LIBRARY_PATH="${S}/$(get_libdir):${LD_LIBRARY_PATH}" \
+ PYTHIA8DATA="../share/Pythia8/xmldoc/" \
+ LHAPDF_DATA_PATH="${WORKDIR}" \
+ emake ${tests}
+ emake clean
+}
+
+src_install() {
+ # make install is too broken, much easier to install manually
+ dobin bin/pythia8-config
+ doheader -r include/*
+ dolib lib/*
+ insinto "${PYTHIADIR}"
+ doins -r share/Pythia8/xmldoc examples/Makefile.inc
+
+ echo "PYTHIA8DATA=${EPYTHIADIR}/xmldoc" >> 99pythia8
+ doenvd 99pythia8
+
+ dodoc AUTHORS GUIDELINES README
+ if use doc; then
+ dodoc share/Pythia8/pdfdoc/*
+ dohtml -r share/Pythia8/htmldoc/*
+ fi
+ if use examples; then
+ # reuse system Makefile.inc
+ rm examples/Makefile.inc || die
+ sed -i "s:include Makefile.inc:include ${EPYTHIADIR}:" \
+ examples/Makefile || die
+
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ # cleanup
+ unset PYTHIADIR EPYTHIADIR
+}