diff options
author | Justin Bronder <jsbronder@gentoo.org> | 2010-09-13 18:38:12 +0000 |
---|---|---|
committer | Justin Bronder <jsbronder@gentoo.org> | 2010-09-13 18:38:12 +0000 |
commit | 0ab5d9f76d2e2727422fde50fe67c774c3d5bd2e (patch) | |
tree | d49f16aeb1e4d85d7236e6297b9e0cc2e59c6024 /sys-cluster/mpe2 | |
parent | Bug #337104: verbump. (diff) | |
download | gentoo-2-0ab5d9f76d2e2727422fde50fe67c774c3d5bd2e.tar.gz gentoo-2-0ab5d9f76d2e2727422fde50fe67c774c3d5bd2e.tar.bz2 gentoo-2-0ab5d9f76d2e2727422fde50fe67c774c3d5bd2e.zip |
Respect LDFLAGS, #335590.
(Portage version: 2.2_rc80/cvs/Linux x86_64)
Diffstat (limited to 'sys-cluster/mpe2')
-rw-r--r-- | sys-cluster/mpe2/ChangeLog | 11 | ||||
-rw-r--r-- | sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch | 68 | ||||
-rw-r--r-- | sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch | 68 | ||||
-rw-r--r-- | sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild | 142 |
4 files changed, 287 insertions, 2 deletions
diff --git a/sys-cluster/mpe2/ChangeLog b/sys-cluster/mpe2/ChangeLog index 9caf443ecea3..00c2fd6db16f 100644 --- a/sys-cluster/mpe2/ChangeLog +++ b/sys-cluster/mpe2/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-cluster/mpe2 -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpe2/ChangeLog,v 1.3 2009/12/28 23:48:35 maekke Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpe2/ChangeLog,v 1.4 2010/09/13 18:38:12 jsbronder Exp $ + +*mpe2-1.0.6_p1-r1 (13 Sep 2010) + + 13 Sep 2010; Justin Bronder <jsbronder@gentoo.org> + +files/slog2sdk-trace_rlog-makefile-fixes.patch, +mpe2-1.0.6_p1-r1.ebuild, + +files/slog2sdk-trace_sample-makefile-fixes.patch: + Respect LDFLAGS, #335590. 28 Dec 2009; Markus Meier <maekke@gentoo.org> mpe2-1.0.6_p1.ebuild: x86 stable, bug #290933 diff --git a/sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch b/sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch new file mode 100644 index 000000000000..4f2119ec69f0 --- /dev/null +++ b/sys-cluster/mpe2/files/slog2sdk-trace_rlog-makefile-fixes.patch @@ -0,0 +1,68 @@ +From 5bc91497bd4b3d2e4e962ffb2d5b9b471c4183c2 Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@gmail.com> +Date: Mon, 13 Sep 2010 14:18:51 -0400 +Subject: [PATCH 1/2] slog2sdk/trace_rlog makefile fixes + +- Respect user-defined LDFLAGS when linking PGM_PRINT and PGM_CHECK. +- Do not install libraries during the compile phase. +--- + src/slog2sdk/trace_rlog/src/Makefile.in | 19 ++++++++----------- + 1 files changed, 8 insertions(+), 11 deletions(-) + +diff --git a/src/slog2sdk/trace_rlog/src/Makefile.in b/src/slog2sdk/trace_rlog/src/Makefile.in +index 9b289b8..2d772e0 100644 +--- a/src/slog2sdk/trace_rlog/src/Makefile.in ++++ b/src/slog2sdk/trace_rlog/src/Makefile.in +@@ -48,7 +48,8 @@ RM = @RM@ + + JNI_INC = @JNI_INC@ + CFLAGS = -I.. $(JNI_INC) -I$(TRACE_INCDIR) @COPTS@ +-LDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@ ++LDFLAGS = @LDFLAGS@ ++LIBLDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@ + + # memory leak checker + MEMLIBS = @DEBUG_LIBS@ +@@ -66,33 +67,29 @@ ALL: $(libbuild_dir)/$(LIB_TRACE) $(binbuild_dir)/$(PGM_PRINT) $(binbuild_dir)/$ + + $(libbuild_dir)/$(LIB_TRACE): $(LOBJ) + if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -export-symbols $(srcdir)/JavaTraceInput.sym \ + -rpath $(libbuild_dir) ; \ + else \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -rpath $(libbuild_dir) ; \ + fi +- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(libbuild_dir) +- $(LIBTOOL) --finish $(libbuild_dir) + + INSTALL_LIBSO: $(LOBJ) + if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -export-symbols $(srcdir)/JavaTraceInput.sym \ + -rpath $(LIBDIR) ; \ + else \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -rpath $(LIBDIR) ; \ + fi +- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(DESTDIR)$(LIBDIR) +- $(LIBTOOL) --finish $(LIBDIR) + + $(binbuild_dir)/$(PGM_PRINT): $(OBJ4T) +- $(CC) @COPTS@ -o $@ $(OBJ4T) $(MEMLIBS) ++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4T) $(MEMLIBS) + + $(binbuild_dir)/$(PGM_CHECK): $(OBJ4E) +- $(CC) @COPTS@ -o $@ $(OBJ4E) $(MEMLIBS) ++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4E) $(MEMLIBS) + + clean: + @-$(RM) *.@OBJEXT@ *.lo *.la +-- +1.7.1 + diff --git a/sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch b/sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch new file mode 100644 index 000000000000..717911ffb710 --- /dev/null +++ b/sys-cluster/mpe2/files/slog2sdk-trace_sample-makefile-fixes.patch @@ -0,0 +1,68 @@ +From b23d8d40cf62d03cad7ce777565069368e040a96 Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@gmail.com> +Date: Mon, 13 Sep 2010 14:22:10 -0400 +Subject: [PATCH 2/2] slog2sdk/trace_sample makefile fixes + +- Respect user-defined LDFLAGS when linking PGM_PRINT and PGM_CHECK. +- Do not install libraries during the compile phase. +--- + src/slog2sdk/trace_sample/src/Makefile.in | 19 ++++++++----------- + 1 files changed, 8 insertions(+), 11 deletions(-) + +diff --git a/src/slog2sdk/trace_sample/src/Makefile.in b/src/slog2sdk/trace_sample/src/Makefile.in +index f716fff..8d3641a 100644 +--- a/src/slog2sdk/trace_sample/src/Makefile.in ++++ b/src/slog2sdk/trace_sample/src/Makefile.in +@@ -48,7 +48,8 @@ RM = @RM@ + + JNI_INC = @JNI_INC@ + CFLAGS = -I.. $(JNI_INC) -I$(TRACE_INCDIR) @COPTS@ +-LDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@ ++LDFLAGS = @LDFLAGS@ ++LIBLDFLAGS = -module -no-undefined -avoid-version @LDFLAGS@ + + # memory leak checker + MEMLIBS = @DEBUG_LIBS@ +@@ -66,33 +67,29 @@ ALL: $(libbuild_dir)/$(LIB_TRACE) $(binbuild_dir)/$(PGM_PRINT) $(binbuild_dir)/$ + + $(libbuild_dir)/$(LIB_TRACE): $(LOBJ) + if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -export-symbols $(srcdir)/JavaTraceInput.sym \ + -rpath $(libbuild_dir) ; \ + else \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -rpath $(libbuild_dir) ; \ + fi +- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(libbuild_dir) +- $(LIBTOOL) --finish $(libbuild_dir) + + INSTALL_LIBSO: $(LOBJ) + if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -export-symbols $(srcdir)/JavaTraceInput.sym \ + -rpath $(LIBDIR) ; \ + else \ +- $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LIBLDFLAGS) \ + -rpath $(LIBDIR) ; \ + fi +- $(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(DESTDIR)$(LIBDIR) +- $(LIBTOOL) --finish $(LIBDIR) + + $(binbuild_dir)/$(PGM_PRINT): $(OBJ4T) +- $(CC) @COPTS@ -o $@ $(OBJ4T) $(MEMLIBS) ++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4T) $(MEMLIBS) + + $(binbuild_dir)/$(PGM_CHECK): $(OBJ4E) +- $(CC) @COPTS@ -o $@ $(OBJ4E) $(MEMLIBS) ++ $(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4E) $(MEMLIBS) + + clean: + @-$(RM) *.@OBJEXT@ *.lo *.la +-- +1.7.1 + diff --git a/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild b/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild new file mode 100644 index 000000000000..9bfbe60ca577 --- /dev/null +++ b/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpe2/mpe2-1.0.6_p1-r1.ebuild,v 1.1 2010/09/13 18:38:12 jsbronder Exp $ + +EAPI=2 +inherit fortran eutils java-utils-2 + +MY_P=${P/_/} +DESCRIPTION="MPI development tools" +HOMEPAGE="http://www-unix.mcs.anl.gov/perfvis/download/index.htm" +SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${PN%2}/${MY_P}.tar.gz" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="minimal fortran threads debug" + +COMMON_DEPEND="!minimal? ( x11-libs/libXtst + x11-libs/libXi ) + || ( sys-cluster/openmpi[fortran?,threads?] + sys-cluster/mpich2[fortran?,threads?] )" + +DEPEND="!minimal? ( >=virtual/jdk-1.4 ) + ${COMMON_DEPEND}" + +RDEPEND="!minimal? ( >=virtual/jre-1.4 ) + ${COMMON_DEPEND}" + +S="${WORKDIR}"/${MY_P} +MPE_IMP="" + +# README: +# This ebuild is created to handle building with both mpich2 and openmpi. +# However, without empi (in the science overlay), and some further +# conversion to use mpi.eclass, we can only handle one implementation +# at a time. I still believe it's better to have the ebuild setup +# correctly in preperation. + +pkg_setup() { + local i + + if has_version sys-cluster/openmpi; then + MPE_IMP=openmpi + elif has_version sys-cluster/mpich2; then + MPE_IMP=mpich2 + else + die "Unknown MPI implementation" + fi + + if use fortran ; then + FORTRAN="g77 gfortran ifort ifc" + fortran_pkg_setup + fi + + export JFLAGS="${JFLAGS} $(java-pkg_javac-args)" + + if [[ "${MPE_IMP}" == openmpi ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then + elog "" + elog "Currently src_test fails on collchk with openmpi, hence" + elog "testing is disabled by default. If you would like to" + elog "force testing, please add MPE_FORCE_OPENMPI_TEST=1" + elog "to your environment." + elog "" + fi + + einfo "Building with support for: sys-cluster/${MPE_IMP}" +} + +src_prepare() { + # Don't assume path contains ./ + sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in + epatch "${FILESDIR}"/slog2sdk-trace_rlog-makefile-fixes.patch + epatch "${FILESDIR}"/slog2sdk-trace_sample-makefile-fixes.patch +} + +src_configure() { + local c="--with-mpicc=/usr/bin/mpicc" + + if use fortran; then + c="${c} --with-mpif77=/usr/bin/mpif77" + export F77=${FORTRANC} + else + c="${c} --disable-f77" + fi + + if use minimal; then + c="${c} --enable-slog2=no --disable-rlog --disable-sample" + else + c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build" + fi + + if [[ "${MPE_IMP}" == openmpi ]]; then + c="${c} --disable-rlog --disable-sample" + fi + + econf ${c} \ + --sysconfdir=/etc/${PN} \ + --datadir=/usr/share/${PN} \ + --with-htmldir=/usr/share/${PN} \ + --with-docdir=/usr/share/${PN} \ + --enable-collchk \ + --enable-wrappers \ + $(use_enable !minimal graphics) \ + $(use_enable threads threadlogging) \ + $(use_enable debug g) \ + || die +} + +src_test() { + local rc + + cd "${S}" + if [[ "${MPE_IMP}" == mpich2 ]]; then + echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf + chmod 600 "${T}"/mpd.conf + export MPD_CONF_FILE="${T}/mpd.conf" + "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid + elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then + elog + elog "Skipping tests for openmpi" + elog + return 0 + fi + + emake \ + CC="${S}"/bin/mpecc \ + FC="${S}"/bin/mpefc \ + MPERUN="${ROOT}/usr/bin/mpiexec -n 4" \ + CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \ + check; + rc=${?} + if [[ "${MPE_IMP}" == mpich2 ]]; then + "${ROOT}"usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid) + fi + + return ${rc} +} + +src_install() { + emake DESTDIR="${D}" install || die + rm -f "${D}"/usr/sbin/mpeuninstall || die +} |