From f302b98d8274f5da8ab058da2104fcb72147819a Mon Sep 17 00:00:00 2001 From: Kacper Kowalik Date: Sat, 26 Mar 2011 10:56:01 +0000 Subject: Clean java bits thanks to sera. General cleanup, fix linking order, fix building with gcc 4.6 wrt #360517. Drop old. (Portage version: 2.2.0_alpha27/cvs/Linux x86_64) --- sci-biology/amap/ChangeLog | 13 +++++- sci-biology/amap/amap-2.2-r1.ebuild | 62 -------------------------- sci-biology/amap/amap-2.2-r2.ebuild | 50 +++++++++++++++++++++ sci-biology/amap/files/amap-2.2-cxxflags.patch | 22 --------- sci-biology/amap/files/amap-2.2-gcc4.3.patch | 31 ------------- sci-biology/amap/files/amap-2.2-includes.patch | 44 ++++++++++++++++++ sci-biology/amap/files/amap-2.2-makefile.patch | 35 +++++++++++++++ 7 files changed, 140 insertions(+), 117 deletions(-) delete mode 100644 sci-biology/amap/amap-2.2-r1.ebuild create mode 100644 sci-biology/amap/amap-2.2-r2.ebuild delete mode 100644 sci-biology/amap/files/amap-2.2-cxxflags.patch delete mode 100644 sci-biology/amap/files/amap-2.2-gcc4.3.patch create mode 100644 sci-biology/amap/files/amap-2.2-includes.patch create mode 100644 sci-biology/amap/files/amap-2.2-makefile.patch (limited to 'sci-biology/amap') diff --git a/sci-biology/amap/ChangeLog b/sci-biology/amap/ChangeLog index f75092c591f3..943c3a54f0d0 100644 --- a/sci-biology/amap/ChangeLog +++ b/sci-biology/amap/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sci-biology/amap -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-biology/amap/ChangeLog,v 1.6 2010/08/10 15:26:30 xarthisius Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-biology/amap/ChangeLog,v 1.7 2011/03/26 10:56:00 xarthisius Exp $ + +*amap-2.2-r2 (26 Mar 2011) + + 26 Mar 2011; Kacper Kowalik -amap-2.2-r1.ebuild, + +amap-2.2-r2.ebuild, -files/amap-2.2-cxxflags.patch, + -files/amap-2.2-gcc4.3.patch, +files/amap-2.2-includes.patch, + +files/amap-2.2-makefile.patch: + Clean java bits thanks to sera. General cleanup, fix linking order, fix + building with gcc 4.6 wrt #360517. Drop old. 10 Aug 2010; Kacper Kowalik -files/2.0-fix-cxxflags.patch, -amap-2.0.ebuild, -amap-2.2.ebuild, diff --git a/sci-biology/amap/amap-2.2-r1.ebuild b/sci-biology/amap/amap-2.2-r1.ebuild deleted file mode 100644 index cdb8db6bf72b..000000000000 --- a/sci-biology/amap/amap-2.2-r1.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-biology/amap/amap-2.2-r1.ebuild,v 1.2 2010/08/10 15:26:30 xarthisius Exp $ - -# Java is optional, don't force an ant dependency -JAVA_ANT_DISABLE_ANT_CORE_DEP="yes" - -inherit eutils toolchain-funcs java-pkg-opt-2 java-ant-2 - -MY_P="${PN}.${PV}" -DESCRIPTION="Protein multiple-alignment-based sequence annealing" -HOMEPAGE="http://bio.math.berkeley.edu/amap/" -SRC_URI="http://baboon.math.berkeley.edu/amap/download/${MY_P}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" -RDEPEND=" - java? ( - >=virtual/jre-1.5 - )" -DEPEND="${RDEPEND} - java? ( - >=dev-java/ant-core-1.7.0 - >=dev-java/javatoolkit-0.3.0-r2 - >=virtual/jdk-1.5 - )" -S="${WORKDIR}/${PN}-align" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${P}-cxxflags.patch - epatch "${FILESDIR}"/${P}-gcc4.3.patch - sed -i -e "s/\$(CXX)/& \$(LDFLAGS)/" "${S}"/align/Makefile || die #332009 -} - -src_compile() { - pushd "${S}"/align - emake \ - CXX="$(tc-getCXX)" \ - OPT_CXXFLAGS="${CXXFLAGS}" \ - || die "make failed" - popd - - if use java; then - pushd "${S}"/display - eant all || die - popd - fi -} - -src_install() { - dobin align/${PN} - dodoc align/README align/PROBCONS.README - insinto /usr/share/${PN}/examples - doins examples/* || die "Failed to install examples" - if use java; then - java-pkg_newjar "${S}"/display/AmapDisplay.jar amapdisplay.jar - java-pkg_dolauncher amapdisplay --jar amapdisplay.jar - fi -} diff --git a/sci-biology/amap/amap-2.2-r2.ebuild b/sci-biology/amap/amap-2.2-r2.ebuild new file mode 100644 index 000000000000..5e47337e2554 --- /dev/null +++ b/sci-biology/amap/amap-2.2-r2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-biology/amap/amap-2.2-r2.ebuild,v 1.1 2011/03/26 10:56:00 xarthisius Exp $ + +EAPI="2" + +inherit eutils toolchain-funcs java-pkg-opt-2 java-ant-2 + +MY_P=${PN}.${PV} + +DESCRIPTION="Protein multiple-alignment-based sequence annealing" +HOMEPAGE="http://bio.math.berkeley.edu/amap/" +SRC_URI="http://baboon.math.berkeley.edu/${PN}/download/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="java" + +RDEPEND="java? ( >=virtual/jre-1.5 )" +DEPEND="java? ( >=virtual/jdk-1.5 )" + +S=${WORKDIR}/${PN}-align + +src_prepare() { + epatch "${FILESDIR}"/${P}-makefile.patch \ + "${FILESDIR}"/${P}-includes.patch +} + +src_compile() { + emake -C align CXX="$(tc-getCXX)" \ + OPT_CXXFLAGS="${CXXFLAGS}" || die "make failed" + + if use java; then + pushd "${S}"/display + eant -Ddisplay all || die + popd + fi +} + +src_install() { + dobin align/${PN} || die + dodoc align/{README,PROBCONS.README} || die + insinto /usr/share/${PN}/examples + doins examples/* || die + if use java; then + java-pkg_newjar "${S}"/display/AmapDisplay.jar amapdisplay.jar + java-pkg_dolauncher amapdisplay --jar amapdisplay.jar + fi +} diff --git a/sci-biology/amap/files/amap-2.2-cxxflags.patch b/sci-biology/amap/files/amap-2.2-cxxflags.patch deleted file mode 100644 index 314763a49ef2..000000000000 --- a/sci-biology/amap/files/amap-2.2-cxxflags.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Naur amap-align.old/align/Makefile amap-align/align/Makefile ---- amap-align.old/align/Makefile 2008-02-13 19:36:31.000000000 -0500 -+++ amap-align/align/Makefile 2008-04-17 13:22:17.000000000 -0400 -@@ -15,6 +15,8 @@ - # c) RELEASE mode - ################################################################################ - -+OPT_CXXFLAGS = -O3 -W -Wall -pedantic -funroll-loops -+ - OTHERFLAGS = -DNumInsertStates=1 -DVERSION='"AMAP.2.2"' - - # debug mode -@@ -26,8 +28,7 @@ - - # release mode - #CXXFLAGS = -O3 -W -Wall -pedantic -DNDEBUG $(OTHERFLAGS) -mmmx -msse -msse2 -mfpmath=sse -march=pentium4 -mcpu=pentium4 -funroll-loops -fomit-frame-pointer --CXXFLAGS = -O3 -W -Wall -pedantic -DNDEBUG $(OTHERFLAGS) -funroll-loops -- -+CXXFLAGS = $(OPT_CXXFLAGS) -DNDEBUG $(OTHERFLAGS) - ################################################################################ - # 3) Dependencies - ################################################################################ diff --git a/sci-biology/amap/files/amap-2.2-gcc4.3.patch b/sci-biology/amap/files/amap-2.2-gcc4.3.patch deleted file mode 100644 index 2725ab485598..000000000000 --- a/sci-biology/amap/files/amap-2.2-gcc4.3.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -Naur amap-align/align/Amap.cc amap-align.new/align/Amap.cc ---- amap-align/align/Amap.cc 2007-07-24 18:59:22.000000000 -0400 -+++ amap-align.new/align/Amap.cc 2008-04-17 13:43:12.000000000 -0400 -@@ -12,6 +12,8 @@ - #include "ProbabilisticModel.h" - #include "EvolutionaryTree.h" - #include "SparseMatrix.h" -+#include -+#include - #include - #include - #include -@@ -23,6 +25,7 @@ - #include - #include - #include -+#include - - string parametersInputFilename = ""; - string parametersOutputFilename = "no training"; -diff -Naur amap-align/align/MultiSequenceDag.h amap-align.new/align/MultiSequenceDag.h ---- amap-align/align/MultiSequenceDag.h 2007-07-24 18:59:22.000000000 -0400 -+++ amap-align.new/align/MultiSequenceDag.h 2008-04-17 13:43:12.000000000 -0400 -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - #include "MultiSequence.h" - #include "SparseMatrix.h" - diff --git a/sci-biology/amap/files/amap-2.2-includes.patch b/sci-biology/amap/files/amap-2.2-includes.patch new file mode 100644 index 000000000000..77c4261db5cf --- /dev/null +++ b/sci-biology/amap/files/amap-2.2-includes.patch @@ -0,0 +1,44 @@ +Fixes build with gcc 4.3 and 4.6 + +http://bugs.gentoo.org/217921 +http://bugs.gentoo.org/360517 + +--- amap-align/align/Amap.cc ++++ amap-align/align/Amap.cc +@@ -12,6 +12,8 @@ + #include "ProbabilisticModel.h" + #include "EvolutionaryTree.h" + #include "SparseMatrix.h" ++#include ++#include + #include + #include + #include +@@ -23,6 +25,7 @@ + #include + #include + #include ++#include + + string parametersInputFilename = ""; + string parametersOutputFilename = "no training"; +--- amap-align/align/MultiSequenceDag.h ++++ amap-align/align/MultiSequenceDag.h +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #include "MultiSequence.h" + #include "SparseMatrix.h" + +--- amap-align/align/SafeVector.h.org 2011-03-26 11:50:11.935069583 +0100 ++++ amap-align/align/SafeVector.h 2011-03-26 11:50:21.112553151 +0100 +@@ -9,6 +9,7 @@ + #define SAFEVECTOR_H + + #include ++#include + #include + + ///////////////////////////////////////////////////////////////// diff --git a/sci-biology/amap/files/amap-2.2-makefile.patch b/sci-biology/amap/files/amap-2.2-makefile.patch new file mode 100644 index 000000000000..5a9841c98255 --- /dev/null +++ b/sci-biology/amap/files/amap-2.2-makefile.patch @@ -0,0 +1,35 @@ +Respect {CXX,LD}FLAGS + +http://bugs.gentoo.org/332009 + +--- amap-align/align/Makefile ++++ amap-align/align/Makefile +@@ -15,6 +15,8 @@ + # c) RELEASE mode + ################################################################################ + ++OPT_CXXFLAGS = -O3 -W -Wall -pedantic -funroll-loops ++ + OTHERFLAGS = -DNumInsertStates=1 -DVERSION='"AMAP.2.2"' + + # debug mode +@@ -26,8 +28,7 @@ + + # release mode + #CXXFLAGS = -O3 -W -Wall -pedantic -DNDEBUG $(OTHERFLAGS) -mmmx -msse -msse2 -mfpmath=sse -march=pentium4 -mcpu=pentium4 -funroll-loops -fomit-frame-pointer +-CXXFLAGS = -O3 -W -Wall -pedantic -DNDEBUG $(OTHERFLAGS) -funroll-loops +- ++CXXFLAGS = $(OPT_CXXFLAGS) -DNDEBUG $(OTHERFLAGS) + ################################################################################ + # 3) Dependencies + ################################################################################ + +@@ -38,7 +37,7 @@ + all : $(TARGETS) + + amap : MultiSequenceDag.h MultiSequence.h ProbabilisticModel.h ScoreType.h Sequence.h FileBuffer.h SparseMatrix.h EvolutionaryTree.h Defaults.h SafeVector.h Amap.cc +- $(CXX) $(CXXFLAGS) -lm -o amap Amap.cc ++ $(CXX) $(LDFLAGS) $(CXXFLAGS) -o amap Amap.cc -lm + + .PHONY : clean + clean: -- cgit v1.2.3-65-gdbad