commit:     3b6a89c3e3d5a081401a08d27e94da375574b93e
Author:     Andrew Savchenko <bircoph <AT> gmail <DOT> com>
AuthorDate: Fri Jun  5 07:32:14 2015 +0000
Commit:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
CommitDate: Fri Jun  5 07:32:14 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=3b6a89c3

sci-physics/pythia: ready for ~arch

 sci-physics/pythia/ChangeLog                       |  6 ++++++
 ...ythia-8.2.09.ebuild => pythia-8.2.09-r1.ebuild} | 25 +++++++++++-----------
 2 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/sci-physics/pythia/ChangeLog b/sci-physics/pythia/ChangeLog
index ae20b92..ff984f4 100644
--- a/sci-physics/pythia/ChangeLog
+++ b/sci-physics/pythia/ChangeLog
@@ -2,6 +2,12 @@
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
 # $Header: /var/cvsroot/gentoo-x86/sci-physics/pythia/ChangeLog,v 1.62 
2015/05/27 14:06:39 bircoph Exp $
 
+*pythia-8.2.09-r1 (05 Jun 2015)
+
+  05 Jun 2015; Andrew Savchenko <[email protected]> -pythia-8.2.09.ebuild,
+  +pythia-8.2.09-r1.ebuild:
+  Fix LDFLAGS support, re-enable static-libs.
+
   05 Jun 2015; Andrew Savchenko <[email protected]> pythia-8.2.09.ebuild,
   +files/pythia8209-root-noninteractive.patch,
   +files/pythia8209-run-tests.patch:

diff --git a/sci-physics/pythia/pythia-8.2.09.ebuild 
b/sci-physics/pythia/pythia-8.2.09-r1.ebuild
similarity index 90%
rename from sci-physics/pythia/pythia-8.2.09.ebuild
rename to sci-physics/pythia/pythia-8.2.09-r1.ebuild
index b112f9a..ded0fe5 100644
--- a/sci-physics/pythia/pythia-8.2.09.ebuild
+++ b/sci-physics/pythia/pythia-8.2.09-r1.ebuild
@@ -25,8 +25,8 @@ 
SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz
 
 SLOT="8"
 LICENSE="GPL-2"
-KEYWORDS=""
-IUSE="doc examples gzip +hepmc fastjet lhapdf root test"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gzip +hepmc fastjet lhapdf root static-libs test"
 
 RDEPEND="
        fastjet? ( >=sci-physics/fastjet-3 )
@@ -62,6 +62,9 @@ src_prepare() {
                -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 \
@@ -79,18 +82,16 @@ src_prepare() {
                -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.*=$(LIBDIR.*\.a$/d' \
-#                      -e 's/+=\(.*libpythia8\.\)/=\1/' \
-#                      Makefile || die
-#              sed -i \
-#                      -e 's:\.a:\.so:g' \
-#                      examples/Makefile || die
-#      fi
+       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"

Reply via email to